From 7d04487ccc9ce7c46dfd58727c5b87eeff555baf Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sun, 15 Jan 2023 18:58:41 +0100 Subject: [PATCH 01/49] adr: Postulate adr006 (combined tombstoning of uid and login) Refs #597 --- doc/arch/adr-006.rst | 148 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 doc/arch/adr-006.rst diff --git a/doc/arch/adr-006.rst b/doc/arch/adr-006.rst new file mode 100644 index 000000000..dce54b9da --- /dev/null +++ b/doc/arch/adr-006.rst @@ -0,0 +1,148 @@ +ADR006 +====== + +:Number: 006 +:Title: Combined tombstoning of uid and login +:Author: Lukas Juhrich, Jakob Müller +:Created: 2023-01-15 +:Status: Postulated + +.. contents:: Table of Contents + +Context +------- +In the light of data economy, we should not store the login of a :class:`User` – +which implicitly is a (partial) property of the :class:`UnixAccount` – +more than necessary. + +The only reason to keep the login is to avoid assigning the same mail address +to multiple people across time; otherwise, +mails might be send to the wrong addressee. + +Thus it has been decided (external from the development team) to store +the login in form of a hash whenever it stops being required for providing +services to a user. + +Requirements +~~~~~~~~~~~~ +The implementation has to ensure + +1. absence of the ``login`` whenever it is not needed *(legal requirement)* +2. that no login is doubly assigned *(legal / business requirement)* + +Consequently, we need to track the ``login`` hash in some kind of “tombstone”, +such that + +* it is referenced by a ``User`` or a ``UnixAccount`` +* it exists in all scenarios and is never deleted + +Since the ``login`` and the ``uid`` have the same lifecycle, and both +require tombstoning – +albeit the ``uid`` needs to be kept only for technical reasons, +not for legal ones – +it makes sense to let such a ``tombstone`` maintain both pieces of data. + +Current model +~~~~~~~~~~~~~ + +In the current model, the relevant entities are related as follows: + +1. ``User``: has a ``login`` (nullable) and a ``unix_account_id`` (nullable). +2. ``UnixAccount``: Has the columns ``uid``, ``gid``, ``home``, and ``login_shell``, + but no ``login``. +3. An ldap account (Derived entity): + If a ``User`` has a ``UnixAccount`` and the correct permissions, + this causes an LDAP account to be exported by the ldap syncer. + +Since ``user.unix_account`` is a foreign key constraint, +we have the following possible states (``U``: User, ``UA``: UnixAccount): + +========== === ========= =================== ==== +# ∃U? ∃U.login? ∃U.unix_account_id? ∃UA? +========== === ========= =================== ==== +1 ✓ ✗ ✗ ✗ +2 ✓ ✗ ✓ ✓ +3 ✓ ✓ ✗ ✗ +4 ✓ ✓ ✓ ✓ +---------- --- --------- ------------------- ---- +5 ✗ ✗ ✗ ✓ +6 ✗ ✗ ✗ ✗ +========== === ========= =================== ==== + +With regards to tombstoning, the states imply the following requirements: + +State 1. No login, no unix account + No requirements. + +State 2. No login, but unix account + This is currently allowed, but issues a warning in the ldap syncer. + Indeed, without the login the unix account cannot be exported. + With tombstones however, we require + + * :math:`(T_u)` there shall exist a tombstone with the same uid as the account + +State 3. Login, but no unix account + * :math:`(T_l)` there shall exist a tombstone with the implied login hash + +State 4. Login and unix account + * :math:`(T_u)` there shall exist a tombstone with the same uid as the account + * :math:`(T_l)` there shall exist a tombstone with the implied login hash + * :math:`(E_{ul})` both tombstones in question should be equal + +State 5. Unix account without user + * :math:`(T_u)` there shall exist a tombstone with the same uid as the account + +State 6. Tautological state + Nothing exists + + +Decision +-------- + +There shall be + +1. A new entity ``unix_tombstone(uid int, login_hash text)`` satisfying + + * ``uid`` is unique + * ``login_hash`` is unique + * Either column may be ``null``, but not both + * ``uid`` and ``login_hash`` form the primary key + +2. A generated column ``login_hash`` on the ``user`` relation + (see :class:`sqlalchemy.schema.Computed`) +3. :math:`(T_l)`: A foreign key constraint ``User.login_hash → UnixTombstone.login_hash`` +4. :math:`(T_l)`: A foreign key constraint ``UnixAccount.uid → UnixTombstone.uid`` +5. :math:`(E_{ul})`: A constraint checking consistency for users with login and unix account: + In this case, the tombstone induced by the ``account.uid`` should agree + with the tombstone induced by the ``user.login_hash`` + +Consequences +------------ + +* That the ``login_hash`` is optional allows for + ``unix_accounts`` which don't have a ``unix_login`` associated to them + to have valid tombstones as well. + However, this implies that were one to couple these accounts to users again, + the tombstone has to be modified to reflect the user's ``login`` (if it exists). + +* using a combined entity instead of an entity for the ``login`` and ``uid``, + respectively, has the advantage that one can identify ``login`` tombstones + which never had a respective ``unix_account``. + Database administrators can then decide on whether to keep these entries or not, + since technically these logins have not been used anywhere. + This might not serve any particular purpose but the + +* In the most frequent use case of creating a user with login and unix account, + A tombstone has to be created as well. This is slightly more effort + than the current implementation. + To avoid this, triggers may be created that take care of this automatically. + + .. note:: This ADR does not take a stance on whether or not to add triggers + as it is mainly concerned with ensuring the critical legal and business + requirements. + +* Tests have to be written to ensure that with any state change of the ``user`` + or ``unix_account`` relations, + the information contained in the ``tombstone`` tables is monotonous, + i.e that neither does a tombstone get deleted via a cascade + nor is a field set to ``null`` when it has been non-null before. From 1a08bc87f04b422255510d671a262c22dafaaf3b Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 16 Jan 2023 14:45:44 +0100 Subject: [PATCH 02/49] [mypy] Add type hints to pycroft.model.ddl --- pycroft/model/ddl.py | 313 ++++++++++++++++++++++++++++--------------- 1 file changed, 204 insertions(+), 109 deletions(-) diff --git a/pycroft/model/ddl.py b/pycroft/model/ddl.py index 4dd4e6019..bcae38d5a 100644 --- a/pycroft/model/ddl.py +++ b/pycroft/model/ddl.py @@ -6,19 +6,23 @@ ~~~~~~~~~~~~~~~~~ """ import inspect +import typing as t from collections import OrderedDict from collections.abc import Iterable from functools import partial, cached_property -from sqlalchemy import event as sqla_event, schema, table, text +from sqlalchemy import event as sqla_event, schema, table, text, Constraint, Table from sqlalchemy.dialects import postgresql +from sqlalchemy.engine import Dialect from sqlalchemy.ext.compiler import compiles -from sqlalchemy.sql import ClauseElement, Selectable +from sqlalchemy.sql import ClauseElement, Selectable, ColumnCollection +from sqlalchemy.sql.compiler import Compiled +from sqlalchemy.sql.selectable import SelectBase from pycroft.model.session import with_transaction, session -def _join_tokens(*tokens): +def _join_tokens(*tokens: str | None) -> str: """ Join all elements that are not None :param tokens: @@ -27,10 +31,9 @@ def _join_tokens(*tokens): return ' '.join(token for token in tokens if token is not None) -def compile_if_clause(compiler, clause): +def compile_if_clause(compiler: Compiled, clause: t.Any) -> t.Any: if isinstance(clause, ClauseElement): - return str(clause.compile(compile_kwargs={'literal_binds': True}, - dialect=compiler.dialect)) + return str(clause.compile(compile_kwargs={"literal_binds": True}, dialect=compiler.dialect)) return compiler.sql_compiler.process(clause, literal_binds=True) return clause @@ -39,7 +42,14 @@ class DropConstraint(schema.DropConstraint): """ Extends SQLALchemy's DropConstraint with support for IF EXISTS """ - def __init__(self, element, if_exists=False, cascade=False, **kw): + + def __init__( + self, + element: Constraint, + if_exists: bool = False, + cascade: bool = False, + **kw: t.Any, + ): super().__init__(element, cascade, **kw) self.element = element self.if_exists = if_exists @@ -47,11 +57,11 @@ def __init__(self, element, if_exists=False, cascade=False, **kw): # noinspection PyUnusedLocal -@compiles(DropConstraint, 'postgresql') -def visit_drop_constraint(drop_constraint, compiler, **kw): +@compiles(DropConstraint, "postgresql") +def visit_drop_constraint(drop_constraint: DropConstraint, compiler: Compiled, **kw): constraint = drop_constraint.element - opt_if_exists = 'IF EXISTS' if drop_constraint.if_exists else None - opt_drop_behavior = 'CASCADE' if drop_constraint.cascade else None + opt_if_exists = "IF EXISTS" if drop_constraint.if_exists else None + opt_drop_behavior = "CASCADE" if drop_constraint.cascade else None table_name = compiler.preparer.format_table(constraint.table) constraint_name = compiler.preparer.quote(constraint.name) return _join_tokens( @@ -60,24 +70,33 @@ def visit_drop_constraint(drop_constraint, compiler, **kw): class Function(schema.DDLElement): - on = 'postgresql' - - def __init__(self, name, arguments, rtype, definition: str | Selectable, - volatility='volatile', - strict=False, leakproof=False, language='sql', quote_tag=''): + on = "postgresql" + + def __init__( + self, + name: str, + arguments: t.Iterable[str], + rtype: str, + definition: str | Selectable, + volatility: t.Literal["volatile", "stable", "immutable"] = "volatile", + strict: bool = False, + leakproof: bool = False, + language: str = "sql", + quote_tag: str = "", + ): """ Represents PostgreSQL function - :param str name: Name of the function (excluding arguments). - :param list arguments: Arguments of the function. A function + :param name: Name of the function (excluding arguments). + :param arguments: Arguments of the function. A function identifier of ``new_function(integer, integer)`` would result in ``arguments=['integer', 'integer']``. - :param str rtype: Return type + :param rtype: Return type :param definition: Definition - :param str volatility: Either 'volatile', 'stable', or + :param volatility: Either 'volatile', 'stable', or 'immutable' - :param bool strict: Function should be declared STRICT - :param bool leakproof: Function should be declared LEAKPROOF + :param strict: Function should be declared STRICT + :param leakproof: Function should be declared LEAKPROOF :param str language: Language the function is defined in :param str quote_tag: Dollar quote tag to enclose the function definition @@ -96,26 +115,27 @@ def __init__(self, name, arguments, rtype, definition: str | Selectable, self.quote_tag = quote_tag @cached_property - def definition(self): + def definition(self) -> str: if isinstance(self._definition, str): return inspect.cleandoc(self._definition) if isinstance(self._definition, Selectable): - return str(self._definition.compile( - dialect=postgresql.dialect(), - compile_kwargs={'literal_binds': True} - )) + return str( + self._definition.compile( + dialect=t.cast(type[Dialect], postgresql.dialect)(), + compile_kwargs={"literal_binds": True}, + ) + ) raise ValueError(f"definition must be str or Selectable, not {type(self._definition)}") - def build_quoted_identifier(self, quoter): + def build_quoted_identifier(self, quoter: t.Callable[[str], str]) -> str: """Compile the function identifier from name and arguments. :param quoter: A callable that quotes the function name :returns: The compiled string, like ``"my_function_name"(integer, account_type)`` - :rtype: str """ return "{name}({args})".format( name=quoter(self.name), @@ -123,14 +143,14 @@ def build_quoted_identifier(self, quoter): ) - class CreateFunction(schema.DDLElement): """ Represents a CREATE FUNCTION DDL statement """ - on = 'postgresql' - def __init__(self, func, or_replace=False): + on = "postgresql" + + def __init__(self, func: Function, or_replace: bool = False): self.function = func self.or_replace = or_replace @@ -139,17 +159,18 @@ class DropFunction(schema.DDLElement): """ Represents a DROP FUNCTION DDL statement """ - on = 'postgresql' - def __init__(self, func, if_exists=False, cascade=False): + on = "postgresql" + + def __init__(self, func: Function, if_exists: bool = False, cascade: bool = False): self.function = func self.if_exists = if_exists self.cascade = cascade # noinspection PyUnusedLocal -@compiles(CreateFunction, 'postgresql') -def visit_create_function(element, compiler, **kw): +@compiles(CreateFunction, "postgresql") +def visit_create_function(element: CreateFunction, compiler: Compiled, **kw: t.Any) -> str: """ Compile a CREATE FUNCTION DDL statement for PostgreSQL """ @@ -170,8 +191,8 @@ def visit_create_function(element, compiler, **kw): # noinspection PyUnusedLocal -@compiles(DropFunction, 'postgresql') -def visit_drop_function(element, compiler, **kw): +@compiles(DropFunction, "postgresql") +def visit_drop_function(element: DropFunction, compiler: Compiled, **kw: t.Any) -> str: """ Compile a DROP FUNCTION DDL statement for PostgreSQL """ @@ -183,17 +204,24 @@ def visit_drop_function(element, compiler, **kw): class Rule(schema.DDLElement): - on = 'postgresql' - - def __init__(self, name, table, event, command_or_commands, - condition=None, do_instead=False): + on = "postgresql" + + def __init__( + self, + name: str, + table: Table, + event: str, + command_or_commands: str | t.Sequence[str], + condition: str | None = None, + do_instead: bool = False, + ) -> None: self.name = name self.table = table self.event = event self.condition = condition self.do_instead = do_instead - if (isinstance(command_or_commands, Iterable) and - not isinstance(command_or_commands, str)): + self.commands: tuple[str, ...] + if isinstance(command_or_commands, Iterable) and not isinstance(command_or_commands, str): self.commands = tuple(command_or_commands) else: self.commands = (command_or_commands,) @@ -203,9 +231,10 @@ class CreateRule(schema.DDLElement): """ Represents a CREATE RULE DDL statement """ - on = 'postgresql' - def __init__(self, rule, or_replace=False): + on = "postgresql" + + def __init__(self, rule: Rule, or_replace: bool = False) -> None: self.rule = rule self.or_replace = or_replace @@ -214,9 +243,10 @@ class DropRule(schema.DDLElement): """ Represents a DROP RULE DDL statement """ - on = 'postgresql' - def __init__(self, rule, if_exists=False, cascade=False): + on = "postgresql" + + def __init__(self, rule: Rule, if_exists: bool = False, cascade: bool = False) -> None: """ :param rule: :param if_exists: @@ -228,8 +258,8 @@ def __init__(self, rule, if_exists=False, cascade=False): # noinspection PyUnusedLocal -@compiles(CreateRule, 'postgresql') -def visit_create_rule(element, compiler, **kw): +@compiles(CreateRule, "postgresql") +def visit_create_rule(element: CreateRule, compiler: Compiled, **kw: t.Any) -> str: """ Compile a CREATE RULE DDL statement for PostgreSQL. """ @@ -252,8 +282,8 @@ def visit_create_rule(element, compiler, **kw): # noinspection PyUnusedLocal -@compiles(DropRule, 'postgresql') -def visit_drop_rule(element, compiler, **kw): +@compiles(DropRule, "postgresql") +def visit_drop_rule(element: DropRule, compiler: Compiled, **kw: t.Any) -> str: """ Compile a DROP RULE DDL statement for PostgreSQL """ @@ -267,15 +297,23 @@ def visit_drop_rule(element, compiler, **kw): opt_drop_behavior) +# TODO add type hints class Trigger(schema.DDLElement): - def __init__(self, name, table, events, function_call, when="AFTER"): + def __init__( + self, + name: str, + table: Table, + events: t.Sequence[str], + function_call: str, + when: t.Literal["BEFORE", "AFTER", "INSTEAD OF"] = "AFTER", + ) -> None: """Construct a trigger - :param str name: Name of the trigger + :param name: Name of the trigger :param table: Table the trigger is for - :param iterable[str] events: list of events (INSERT, UPDATE, DELETE) - :param str function_call: call of the trigger function - :param str when: Mode of execution. Must be one of ``BEFORE``, ``AFTER``, ``INSTEAD OF`` + :param events: list of events (INSERT, UPDATE, DELETE) + :param function_call: call of the trigger function + :param when: Mode of execution """ self.name = name self.table = table @@ -287,7 +325,13 @@ def __init__(self, name, table, events, function_call, when="AFTER"): class ConstraintTrigger(Trigger): - def __init__(self, *args, deferrable=False, initially_deferred=False, **kwargs): + def __init__( + self, + *args: t.Any, + deferrable: bool = False, + initially_deferred: bool = False, + **kwargs: t.Any, + ) -> None: """Construct a Constraint Trigger :param deferrable: Constraint can be deferred @@ -302,9 +346,9 @@ def __init__(self, *args, deferrable=False, initially_deferred=False, **kwargs): class CreateTrigger(schema.DDLElement): - on = 'postgresql' + on = "postgresql" - def __init__(self, trigger): + def __init__(self, trigger: Trigger) -> None: self.trigger = trigger @@ -312,9 +356,10 @@ class CreateConstraintTrigger(schema.DDLElement): """ Represents a CREATE CONSTRAINT TRIGGER DDL statement """ - on = 'postgresql' - def __init__(self, constraint_trigger): + on = "postgresql" + + def __init__(self, constraint_trigger: ConstraintTrigger) -> None: self.constraint_trigger = constraint_trigger @@ -322,17 +367,20 @@ class DropTrigger(schema.DDLElement): """ Represents a DROP TRIGGER DDL statement. """ - on = 'postgresql' - def __init__(self, trigger, if_exists=False, cascade=False): + on = "postgresql" + + def __init__(self, trigger: Trigger, if_exists: bool = False, cascade: bool = False) -> None: self.trigger = trigger self.if_exists = if_exists self.cascade = cascade # noinspection PyUnusedLocal -@compiles(CreateConstraintTrigger, 'postgresql') -def create_add_constraint_trigger(element, compiler, **kw): +@compiles(CreateConstraintTrigger, "postgresql") +def create_add_constraint_trigger( + element: CreateConstraintTrigger, compiler: Compiled, **kw: t.Any +) -> str: """ Compile a CREATE CONSTRAINT TRIGGER DDL statement for PostgreSQL """ @@ -350,8 +398,8 @@ def create_add_constraint_trigger(element, compiler, **kw): # noinspection PyUnusedLocal -@compiles(CreateTrigger, 'postgresql') -def create_add_trigger(element, compiler, **kw): +@compiles(CreateTrigger, "postgresql") +def create_add_trigger(element: CreateTrigger, compiler: Compiled, **kw: t.Any) -> str: """ Compile a CREATE CONSTRAINT TRIGGER DDL statement for PostgreSQL """ @@ -365,8 +413,8 @@ def create_add_trigger(element, compiler, **kw): # noinspection PyUnusedLocal -@compiles(DropTrigger, 'postgresql') -def visit_drop_trigger(element, compiler, **kw): +@compiles(DropTrigger, "postgresql") +def visit_drop_trigger(element: DropTrigger, compiler: Compiled, **kw: t.Any) -> str: """ Compile a DROP TRIGGER DDL statement for PostgreSQL """ @@ -381,12 +429,16 @@ def visit_drop_trigger(element, compiler, **kw): class View(schema.DDLElement): - def __init__(self, name, query, - column_names=None, - temporary=False, - view_options=None, - check_option=None, - materialized=False): + def __init__( + self, + name: str, + query: SelectBase, + column_names: t.Sequence[str] = None, + temporary: bool = False, + view_options: t.Mapping[str, t.Any] = None, + check_option: t.Literal["local", "cascaded"] | None = None, + materialized: bool = False, + ) -> None: """DDL Element representing a VIEW :param name: The name of the view @@ -428,12 +480,11 @@ def _init_table_columns(self): "The given column_names must coincide with the implicit columns of the query:" f" {my_column_names!r} != {query_column_names!r}" ) - for c in self.query.selected_columns: + for c in t.cast(ColumnCollection, self.query.selected_columns): # _make_proxy doesn't attach the column to the selectable (`self.table`) anymore # since sqla commit:aceefb508ccd0911f52ff0e50324b3fefeaa3f16 (before 1.4.0) key, col = c._make_proxy(self.table) - self.table._columns.add(col, key=key) - + self.table._columns.add(col, key=key) # type: ignore @with_transaction def refresh(self, concurrently=False): @@ -447,22 +498,22 @@ def refresh(self, concurrently=False): class CreateView(schema.DDLElement): - def __init__(self, view, or_replace=False, if_not_exists=False): + def __init__(self, view: View, or_replace: bool = False, if_not_exists: bool = False) -> None: self.view = view self.or_replace = or_replace self.if_not_exists = if_not_exists class DropView(schema.DDLElement): - def __init__(self, view, if_exists=False, cascade=False): + def __init__(self, view: View, if_exists: bool = False, cascade: bool = False) -> None: self.view = view self.if_exists = if_exists self.cascade = cascade # noinspection PyUnusedLocal -@compiles(CreateView, 'postgresql') -def visit_create_view(element: CreateView, compiler, **kw): +@compiles(CreateView, "postgresql") +def visit_create_view(element: CreateView, compiler: Compiled, **kw: t.Any) -> str: view = element.view opt_or_replace = "OR REPLACE" if element.or_replace and not view.materialized else None opt_temporary = "TEMPORARY" if view.temporary else None @@ -496,8 +547,8 @@ def visit_create_view(element: CreateView, compiler, **kw): # noinspection PyUnusedLocal -@compiles(DropView, 'postgresql') -def visit_drop_view(element, compiler, **kw): +@compiles(DropView, "postgresql") +def visit_drop_view(element: DropView, compiler: Compiled, **kw: t.Any) -> str: view = element.view opt_if_exists = "IF EXISTS" if element.if_exists else None opt_drop_behavior = "CASCADE" if element.cascade else None @@ -527,39 +578,83 @@ class DDLManager: """ def __init__(self): - self.objects = [] - - def add(self, target, create_ddl, drop_ddl, dialect=None): + self.objects: list[tuple[object, schema.DDLElement, schema.DDLElement]] = [] + + def add( + self, + target: Table, + create_ddl: schema.DDLElement, + drop_ddl: schema.DDLElement, + dialect: str | None = None, + ): if dialect: - create_ddl = create_ddl.execute_if(dialect=dialect) - drop_ddl = drop_ddl.execute_if(dialect=dialect) + create_ddl = t.cast(schema.DDLElement, create_ddl.execute_if(dialect=dialect)) + drop_ddl = t.cast(schema.DDLElement, drop_ddl.execute_if(dialect=dialect)) self.objects.append((target, create_ddl, drop_ddl)) - def add_constraint(self, table, constraint, dialect=None): - self.add(table, schema.AddConstraint(constraint), - DropConstraint(constraint, if_exists=True), dialect=dialect) + def add_constraint( + self, table: Table, constraint: Constraint, dialect: str | None = None + ) -> None: + self.add( + table, + schema.AddConstraint(constraint), + DropConstraint(constraint, if_exists=True), + dialect=dialect, + ) - def add_function(self, table, func, dialect=None): - self.add(table, CreateFunction(func, or_replace=True), - DropFunction(func, if_exists=True), dialect=dialect) + def add_function(self, table: Table, func: Function, dialect: str | None = None) -> None: + self.add( + table, + CreateFunction(func, or_replace=True), + DropFunction(func, if_exists=True), + dialect=dialect, + ) - def add_rule(self, table, rule, dialect=None): - self.add(table, CreateRule(rule, or_replace=True), - DropRule(rule, if_exists=True), dialect=dialect) + def add_rule(self, table: Table, rule: Rule, dialect: str | None = None) -> None: + self.add( + table, + CreateRule(rule, or_replace=True), + DropRule(rule, if_exists=True), + dialect=dialect, + ) - def add_trigger(self, table, trigger, dialect=None): - self.add(table, CreateTrigger(trigger), - DropTrigger(trigger, if_exists=True), dialect=dialect) + def add_trigger(self, table: Table, trigger: Trigger, dialect: str | None = None) -> None: + self.add( + table, + CreateTrigger(trigger), + DropTrigger(trigger, if_exists=True), + dialect=dialect, + ) - def add_constraint_trigger(self, table, constraint_trigger, dialect=None): - self.add(table, CreateConstraintTrigger(constraint_trigger), - DropTrigger(constraint_trigger, if_exists=True), dialect=dialect) + def add_constraint_trigger( + self, + table: Table, + constraint_trigger: ConstraintTrigger, + dialect: str | None = None, + ) -> None: + self.add( + table, + CreateConstraintTrigger(constraint_trigger), + DropTrigger(constraint_trigger, if_exists=True), + dialect=dialect, + ) - def add_view(self, table, view, dialect=None, or_replace=True, if_not_exists=True): - self.add(table, CreateView(view, or_replace=or_replace, if_not_exists=if_not_exists), - DropView(view, if_exists=True), dialect=dialect) + def add_view( + self, + table: Table, + view: View, + dialect: str | None = None, + or_replace: bool = True, + if_not_exists: bool = True, + ) -> None: + self.add( + table, + CreateView(view, or_replace=or_replace, if_not_exists=if_not_exists), + DropView(view, if_exists=True), + dialect=dialect, + ) - def register(self): + def register(self) -> None: for target, create_ddl, _drop_ddl in self.objects: sqla_event.listen(target, 'after_create', create_ddl) for target, _create_ddl, drop_ddl in reversed(self.objects): From a2488756adb2970d49273e57c518666b7874620e Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sat, 28 Jan 2023 13:59:43 +0100 Subject: [PATCH 03/49] [model] Add `UnixTombstone` class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This encompasses - A generated column `User.login_hash` - An FKey User→UnixTombstone - An FKey UnixAccount→UnixTombstone - Partial indices on the UnixTombstone table to ensure a composite nullable key with optional components, but with equality - A trigger updating the user's tombstone if a UnixAccount is inserted --- pycroft/model/user.py | 105 +++++++++++++++++++++++++++++ tests/model/test_unix_tombstone.py | 101 +++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) create mode 100644 tests/model/test_unix_tombstone.py diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 50000588d..7a34d3584 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -32,6 +32,8 @@ Index, text, event, + CheckConstraint, + Computed, ) from sqlalchemy.dialects.postgresql import ExcludeConstraint from sqlalchemy.ext.associationproxy import association_proxy @@ -96,6 +98,7 @@ class BaseUser(IntegerIdModel): __abstract__ = True login: Mapped[str40] = mapped_column(unique=True) + login_hash: Mapped[str] = mapped_column(Computed("digest(login, 'sha512')")) name: Mapped[str255] registered_at: Mapped[utc.DateTimeTz] passwd_hash: Mapped[str_deferred | None] @@ -462,6 +465,11 @@ def email_internal(self): __table_args__ = (UniqueConstraint('swdd_person_id'),) +@event.listens_for(User.__table__, "before_create") +def create_pgcrypto(target, connection, **kw): + connection.execute(text("create extension if not exists pgcrypto")) + + manager.add_function( User.__table__, ddl.Function( @@ -633,13 +641,110 @@ class Property(IntegerIdModel): class UnixAccount(IntegerIdModel): uid: Mapped[int] = mapped_column( + ForeignKey("unix_tombstone.uid"), unique=True, server_default=unix_account_uid_seq.next_value() ) + tombstone: Mapped[UnixTombstone] = relationship(viewonly=True) gid: Mapped[int] = mapped_column(default=100) login_shell: Mapped[str] = mapped_column(default="/bin/bash") home_directory: Mapped[str] = mapped_column(unique=True) +class UnixTombstone(ModelBase): + # mapped_column does not work yet for reference in `__mapper_args__`, unfortunately. + from sqlalchemy import Column, Integer, String + + uid: Mapped[int] = Column(Integer, unique=True) + login_hash: Mapped[str] = Column(String, unique=True) + + # backrefs + unix_account: Mapped[UnixAccount] = relationship(viewonly=True, uselist=False) + # /backrefs + + __table_args__ = ( + UniqueConstraint("uid", "login_hash"), + Index( + "uid_only_unique", login_hash, unique=True, postgresql_where=uid.is_(None) + ), + Index( + "login_hash_only_unique", + uid, + unique=True, + postgresql_where=login_hash.is_(None), + ), + CheckConstraint("uid is not null or login_hash is not null"), + ) + __mapper_args__ = {"primary_key": (uid, login_hash)} # fake PKey for mapper + + +# unix account creation +manager.add_function( + User.__table__, + ddl.Function( + "unix_account_ensure_tombstone", + [], + "trigger", + # IF unix_account has a corresponding user + # THEN use that tombstone. + # However, in the scenario where the user's tombstone exists and points to a different uid, + # we throw an error instead. + """ + DECLARE + v_user "user"; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; + BEGIN + select * into v_user from "user" u where u.unix_account_id = NEW.id; + select * into v_ua_ts from unix_tombstone ts where ts.uid = NEW.uid; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on u.login_hash = ts.login_hash + where u.unix_account_id = NEW.id; + + -- 1) no user, no tombstone + -- 2) no user, tombstone + -- 3) user, no tombstone -> create + -- 4a) user, tombstone with different login hash + -- 4b) user, tombstone with matching login hash + + IF v_user IS NULL THEN + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid) values (NEW.uid); + END IF; + RETURN NEW; + END IF; + -- else: user not null + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); + ELSE + IF v_ua_ts.login_hash <> v_user.login_hash THEN + RAISE EXCEPTION 'unix_account %%: tombstone login hash (%%) differs from user login hash (%%)', + NEW.id, v_ua_ts.login_hash, v_user.login_hash + USING ERRCODE = 'integrity_constraint_violation'; + END IF; + END IF; + + RETURN NEW; + END; + """, + volatility="volatile", + strict=True, + language="plpgsql", + ), +) + +manager.add_trigger( + User.__table__, + ddl.Trigger( + "unix_account_ensure_tombstone_trigger", + UnixAccount.__table__, + ("INSERT",), + "unix_account_ensure_tombstone()", + when="BEFORE", + ), +) + + class RoomHistoryEntry(IntegerIdModel): active_during: Mapped[Interval[utc.DateTimeTz]] = mapped_column(TsTzRange) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py new file mode 100644 index 000000000..c514102ad --- /dev/null +++ b/tests/model/test_unix_tombstone.py @@ -0,0 +1,101 @@ +# Copyright (c) 2023. The Pycroft Authors. See the AUTHORS file. +# This file is part of the Pycroft project and licensed under the terms of +# the Apache License, Version 2.0. See the LICENSE file for details +from hashlib import sha512 + +import pytest +from sqlalchemy import inspect +from sqlalchemy.exc import IntegrityError +from sqlalchemy.orm import Session + +from pycroft.model.user import UnixTombstone +from tests import factories as f + + +L_HASH = sha512(b"login").hexdigest() + + +class TestTombstoneConstraints: + @staticmethod + def test_tombstone_needs_login_hash_or_uid(session): + session.add(UnixTombstone()) + with pytest.raises(IntegrityError, match="CheckViolation"): + session.flush() + + @staticmethod + @pytest.mark.parametrize( + "tombstone_args", + ( + [(None, 10000)] * 2, + [(L_HASH, None)] * 2, + [(None, 10000), (L_HASH, 10000)], + [(L_HASH, 10000), (L_HASH, 10001)], + [(L_HASH, 10000), (L_HASH, None)], + [(None, None)], + ), + ) + def test_tombstone_uniqueness_violations( + session: Session, tombstone_args: list[tuple[str, int]] + ): + session.add_all([UnixTombstone(login_hash=h, uid=u) for h, u in tombstone_args]) + with pytest.raises(IntegrityError): + session.flush() + + @staticmethod + def test_valid_tombstone_combinations(session: Session): + session.add_all( + UnixTombstone(login_hash=h, uid=uid) + for h, uid in ( + (None, 10000), + (L_HASH, None), + (sha512(b"login2").hexdigest(), 10001), + (None, 20000), + ) + ) + try: + session.flush() + except IntegrityError: + pytest.fail("raised IntegrityError") + + +class TestUnixAccountUidFKey: + @staticmethod + @pytest.fixture(scope="class") + def unix_account(class_session): + account = f.UnixAccountFactory() + class_session.flush() + return account + + @staticmethod + def test_unix_account_has_tombstone(unix_account): + assert unix_account.tombstone + + @staticmethod + def test_unix_account_deletion_keeps_tombstone(session, unix_account): + tombstone = unix_account.tombstone + session.delete(unix_account) + session.flush() + session.refresh(tombstone) + assert inspect(tombstone).persistent + + @staticmethod + def test_unix_account_uid_change_does_not_change_tombstone(session, unix_account): + unix_account.uid += 1000 + session.add(unix_account) + with pytest.raises(IntegrityError, match="ForeignKeyViolation"): + session.flush() + + +class TestUserLoginHashFKey: + # TODO test user add, modify, delete + pass + + +class TestUserUnixAccountTombstoneConsistency: + # TODO test that modifications on user/unix_account + # (e.g. creation, attr modification) + # throw an error if both entities point to different tombstones + + # TODO test: adding a unix account pointing to user w/ tombstone w/ different uid + # throws an error + pass From 5d2eca87c012355daf86bf25918807d2d5bf9062 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sat, 6 Jul 2024 19:45:33 +0200 Subject: [PATCH 04/49] [tests] add some more tests for unix tombstone consistency --- tests/model/test_unix_tombstone.py | 82 +++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index c514102ad..d5c50b1d1 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -1,14 +1,16 @@ # Copyright (c) 2023. The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details +import typing as t +from contextlib import contextmanager from hashlib import sha512 import pytest -from sqlalchemy import inspect +from sqlalchemy import inspect, update, text from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session -from pycroft.model.user import UnixTombstone +from pycroft.model.user import UnixTombstone, User from tests import factories as f @@ -91,11 +93,75 @@ class TestUserLoginHashFKey: pass +@contextmanager +def constraints_deferred(session: Session, constraints: t.LiteralString = "all"): + session.execute(text(f"set constraints {constraints} deferred")) + yield + session.execute(text(f"set constraints {constraints} immediate")) + + class TestUserUnixAccountTombstoneConsistency: - # TODO test that modifications on user/unix_account - # (e.g. creation, attr modification) - # throw an error if both entities point to different tombstones + @pytest.fixture(scope="class") + def user(self, class_session) -> User: + user = f.UserFactory(with_unix_account=True) + class_session.flush() + return user + + def test_user_login_change_fails(self, session, user): + # changing `user.login` does not work due to custom validator + from sqlalchemy import update + + with pytest.raises(IntegrityError, match="user_login_hash_fkey"): + stmt = ( + update(User) + .where(User.id == user.id) + .values(login=user.login + "_") + .returning(User.login) + ) + _new_login = session.scalars(stmt) + + def test_user_login_change_works_when_changing_tombstone(self, session, user): + login_new = user.login + "_" + tombstone = user.tombstone + with constraints_deferred(session), session.begin_nested(), session.no_autoflush: + session.execute( + update(User).where(User.id == user.id).values(login=login_new).returning(User.login) + ) + session.refresh(user) + tombstone.login_hash = user.login_hash + session.add(tombstone) + + def test_user_login_change_fails_when_creating_new_tombstone(self, session, user): + login_new = user.login + "_" + hash_hew: bytes = sha512(login_new.encode()).digest() + MATCH_RE = "User tombstone.*and unix account tombstone.*differ" + with ( + pytest.raises(IntegrityError, match=MATCH_RE), + session.begin_nested(), + ): + session.add(UnixTombstone(uid=None, login_hash=hash_hew)) + session.execute( + update(User).where(User.id == user.id).values(login=login_new).returning(User.login) + ) - # TODO test: adding a unix account pointing to user w/ tombstone w/ different uid - # throws an error - pass + def test_ua_uid_change_fails(self, session, user): + pytest.fail("TODO") + + def test_ua_uid_change_works_when_changing_tombstone(self, session, user): + pytest.fail("TODO") + + def test_ua_deletion(self, session, user): + pytest.fail("TODO") + + def test_user_deletion(self, session, user): + pytest.fail("TODO") + + +class TestTombstoneLifeCycle: + # TODO: FIXTURE: isolated unix tombstone, nothing else existing + + def test_cannot_set_uid_null(self, session): + pytest.fail("TODO") + + def test_cannot_set_login_hash_null(self, session): + pytest.fail("TODO") From dcb5b7d8f005b73b9bffa72fa6d4e8bdd5ed97c4 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sat, 6 Jul 2024 19:46:22 +0200 Subject: [PATCH 05/49] [model] add missing constraint checks to UnixTombstone --- pycroft/model/user.py | 162 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 153 insertions(+), 9 deletions(-) diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 7a34d3584..8c7032748 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -29,6 +29,7 @@ Sequence, func, UniqueConstraint, + ForeignKeyConstraint, Index, text, event, @@ -212,6 +213,9 @@ class User(BaseUser, UserMixin): account_id: Mapped[int] = mapped_column(ForeignKey("account.id"), index=True) account: Mapped[Account] = relationship(back_populates="user") + tombstone: Mapped[UnixTombstone] = relationship( + viewonly=True, primaryjoin="UnixTombstone.login_hash == User.login_hash" + ) unix_account_id: Mapped[int | None] = mapped_column( ForeignKey("unix_account.id"), unique=True ) @@ -462,7 +466,10 @@ def permission_level(self) -> int: def email_internal(self): return f"{self.login}@agdsn.me" - __table_args__ = (UniqueConstraint('swdd_person_id'),) + __table_args__ = ( + UniqueConstraint("swdd_person_id"), + ForeignKeyConstraint(("login_hash",), ("unix_tombstone.login_hash",), deferrable=True), + ) @event.listens_for(User.__table__, "before_create") @@ -701,11 +708,11 @@ class UnixTombstone(ModelBase): join unix_tombstone ts on u.login_hash = ts.login_hash where u.unix_account_id = NEW.id; + -- scenarios: -- 1) no user, no tombstone -- 2) no user, tombstone -- 3) user, no tombstone -> create - -- 4a) user, tombstone with different login hash - -- 4b) user, tombstone with matching login hash + -- 4) user + tombstone IF v_user IS NULL THEN IF v_ua_ts IS NULL THEN @@ -716,12 +723,6 @@ class UnixTombstone(ModelBase): -- else: user not null IF v_ua_ts IS NULL THEN insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); - ELSE - IF v_ua_ts.login_hash <> v_user.login_hash THEN - RAISE EXCEPTION 'unix_account %%: tombstone login hash (%%) differs from user login hash (%%)', - NEW.id, v_ua_ts.login_hash, v_user.login_hash - USING ERRCODE = 'integrity_constraint_violation'; - END IF; END IF; RETURN NEW; @@ -744,6 +745,149 @@ class UnixTombstone(ModelBase): ), ) +manager.add_function( + User.__table__, + ddl.Function( + "user_ensure_tombstone", + [], + "trigger", + # This function ensures satisfaction of the user → tombstone foreign key constraint + # (a "tuple generating dependency") which says ∀u: user ∃t: tombstone: t.login_hash = u.login_hash. + # it does _not_ enforce the consistency constraint ("equality generating dependency"). + """ + DECLARE + v_ua unix_account; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; + v_u_login_hash character varying; + BEGIN + select * into v_ua from unix_account ua where ua.id = NEW.unix_account_id; + -- hash not generated yet, because we are a BEFORE trigger! + select digest(NEW.login, 'sha512') into v_u_login_hash; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on v_u_login_hash = ts.login_hash + where u.id = NEW.id; + + IF v_ua IS NULL THEN + IF v_login_ts IS NULL THEN + -- TODO check whether this was a _set_ or an _update_. + -- do we really want to automatically update this? + -- NOTE: when an update caused this, this might create an inconsistent state (different tombstones for uid and login), + -- however as soon as the check constraint fires the transaction will be aborted, anyway. + insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash) on conflict do nothing; + END IF; + -- ELSE: user tombstone exists, no need to do anything + ELSE + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + IF v_ua_ts.login_hash IS NULL THEN + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; + END IF; + END IF; + + RETURN NEW; + END; + """, + volatility="volatile", + strict=True, + language="plpgsql", + ), +) + +manager.add_trigger( + User.__table__, + ddl.Trigger( + "user_ensure_tombstone_trigger", + User.__table__, + # TODO create different trigger on UPDATE which only fires if login or unix_account has changed + ("INSERT", "UPDATE OF unix_account_id, login"), + "user_ensure_tombstone()", + when="BEFORE", + ), +) + +check_tombstone_consistency = ddl.Function( + name="check_tombstone_consistency", + arguments=[], + rtype="trigger", + definition=""" + DECLARE + v_user "user"; + v_ua unix_account; + v_user_ts unix_tombstone; + v_ua_ts unix_tombstone; + BEGIN + IF TG_TABLE_NAME = 'user' THEN + v_user := NEW; + select * into v_ua from unix_account where unix_account.id = NEW.unix_account_id; + ELSIF TG_TABLE_NAME = 'unix_account' THEN + v_ua := NEW; + select * into v_user from "user" u where u.unix_account_id = NEW.id; + ELSE + RAISE EXCEPTION + 'trigger can only be invoked on user or unix_account tables, not %%', + TG_TABLE_NAME + USING ERRCODE = 'feature_not_supported'; + END IF; + + IF v_ua IS NULL OR v_user IS NULL THEN + RETURN NEW; -- no consistency to satisfy + END IF; + ASSERT NOT v_user IS NULL, 'v_user is null!'; + ASSERT NOT v_user.login IS NULL, format('user.login is null (%%s): %%s (type %%s)', v_user.login, v_user, pg_typeof(v_user)); + + select * into v_user_ts from unix_tombstone ts where ts.login_hash = v_user.login_hash; + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + + -- this should already be ensured by the `ensure_*_tombstone` triggers, + -- but we are defensive here to ensure consistency no matter what + IF v_ua_ts IS NULL THEN + ASSERT NOT v_ua IS NULL, 'unix_account is null'; + RAISE EXCEPTION + 'unix account with id=%% (uid=%%) has no tombstone.', v_ua.id, v_ua.uid + USING ERRCODE = 'foreign_key_violation'; + END IF; + IF v_user_ts IS NULL THEN + RAISE EXCEPTION + 'user %% with id=%% (login=%%) has no tombstone.', v_user, v_user.id, v_user.login + USING ERRCODE = 'foreign_key_violation'; + END IF; + + if v_user_ts <> v_ua_ts THEN + RAISE EXCEPTION + 'User tombstone (uid=%%, login_hash=%%) and unix account tombstone (uid=%%, login_hash=%%) differ!', + v_user_ts.uid, v_user_ts.login_hash, v_ua_ts.uid, v_ua_ts.login_hash + USING ERRCODE = 'check_violation'; + END IF; + + RETURN NEW; + END; + """, + strict=True, + language="plpgsql", +) +manager.add_function(User.__table__, check_tombstone_consistency) +manager.add_constraint_trigger( + User.__table__, + ddl.ConstraintTrigger( + name="user_check_tombstone_consistency_trigger", + table=User.__table__, + events=("INSERT", "UPDATE OF unix_account_id, login"), + function_call=f"{check_tombstone_consistency.name}()", + deferrable=True, + ), +) +manager.add_constraint_trigger( + User.__table__, + ddl.ConstraintTrigger( + name="unix_account_check_tombstone_consistency_trigger", + table=UnixAccount.__table__, + events=("INSERT", "UPDATE OF uid"), + function_call=f"{check_tombstone_consistency.name}()", + deferrable=True, + ), +) + class RoomHistoryEntry(IntegerIdModel): active_during: Mapped[Interval[utc.DateTimeTz]] = mapped_column(TsTzRange) From 6168a806c1e4c7dca382fa5476f3842b397a3744 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 11:45:21 +0200 Subject: [PATCH 06/49] tests: add missing tombstone tests to (user + unix_account) case --- pycroft/model/user.py | 10 +++++++--- tests/model/test_unix_tombstone.py | 27 +++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 8c7032748..dcfc22ee5 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -217,10 +217,14 @@ class User(BaseUser, UserMixin): viewonly=True, primaryjoin="UnixTombstone.login_hash == User.login_hash" ) unix_account_id: Mapped[int | None] = mapped_column( - ForeignKey("unix_account.id"), unique=True + # SET NULL because there might be scenarios where we want to delete a unix_account but not the user. + ForeignKey("unix_account.id", ondelete="SET NULL"), + unique=True, ) unix_account: Mapped[UnixAccount] = relationship( - "UnixAccount" + "UnixAccount", + # most prominently, causes deletion of a user to propagate to the unix account. + cascade="all", ) # backref not really needed. address_id: Mapped[int] = mapped_column(ForeignKey(Address.id), index=True) @@ -648,7 +652,7 @@ class Property(IntegerIdModel): class UnixAccount(IntegerIdModel): uid: Mapped[int] = mapped_column( - ForeignKey("unix_tombstone.uid"), + ForeignKey("unix_tombstone.uid", deferrable=True), unique=True, server_default=unix_account_uid_seq.next_value() ) tombstone: Mapped[UnixTombstone] = relationship(viewonly=True) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index d5c50b1d1..03284cdaf 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -145,16 +145,35 @@ def test_user_login_change_fails_when_creating_new_tombstone(self, session, user ) def test_ua_uid_change_fails(self, session, user): - pytest.fail("TODO") + ua = user.unix_account + with pytest.raises(IntegrityError, match="violates foreign key constraint"): + ua.uid = ua.uid + 5 + session.add(ua) + session.flush() def test_ua_uid_change_works_when_changing_tombstone(self, session, user): - pytest.fail("TODO") + ua = user.unix_account + ts = ua.tombstone + new_uid = ua.uid + 5 + with constraints_deferred(session), session.begin_nested(): + ts.uid = new_uid + ua.uid = new_uid + session.add_all([ts, ua]) + session.flush() def test_ua_deletion(self, session, user): - pytest.fail("TODO") + # Since a user exists, this should leave the user and the tombstone. + uid = user.unix_account.uid + with session.begin_nested(): + session.delete(user.unix_account) + assert user.tombstone.uid == uid def test_user_deletion(self, session, user): - pytest.fail("TODO") + ua = user.unix_account + with session.begin_nested(): + session.delete(user) + assert inspect(user).deleted, "user did not get deleted" + assert inspect(ua).deleted, "unix_account did not get deleted" class TestTombstoneLifeCycle: From 16ca6aacaa2a6afe677d1f7e0eac3c283ce8c17b Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 12:26:15 +0200 Subject: [PATCH 07/49] tests: Replace `--echo` flag by automatic verbosity interpretation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First, setting `echo=True` on the engine has the disadvantage that logs are emitted internally _and_ to stdout, leading to double reporting. Furthermore, we now have a cascade of three levels 1. no verbosity (0): no logs emitted. 2. `-v` (1): statement logs are emitted, but not results – and only displayed by pytest on failure. 3. `-vv` (2): both statement logs and result rows are emitted, also on failure. --- tests/conftest.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index daa40630b..069d19c97 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,15 +15,6 @@ from pycroft.model.session import set_scoped_session, Session as PycSessionProxy -def pytest_addoption(parser): - parser.addoption( - "--echo", - action="store_true", - default=False, - help="print out sqlalchemy log messages", - ) - - @pytest.fixture(scope='session') def engine(pytestconfig): try: @@ -33,8 +24,14 @@ def engine(pytestconfig): "Environment variable PYCROFT_DB_URI must be " "set to an SQLalchemy connection string." ) from None - echo: bool = pytestconfig.getoption("echo") - return create_engine(uri, poolclass=SingletonThreadPool, future=True, echo=echo) + verbosity = pytestconfig.getoption("verbose") + if verbosity: + import logging + + engine_logger = logging.getLogger("sqlalchemy.engine") + level = logging.DEBUG if verbosity >= 2 else logging.INFO + engine_logger.setLevel(level) + return create_engine(uri, poolclass=SingletonThreadPool, future=True) @pytest.fixture(scope='session') From b540dd0f1da674a6dec14520a8f808be4bf80100 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 12:45:33 +0200 Subject: [PATCH 08/49] tombstoning: use `bytea` for `login_hash`, ensure this with meta test --- pycroft/model/user.py | 8 +++++--- tests/model/test_unix_tombstone.py | 10 ++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pycroft/model/user.py b/pycroft/model/user.py index dcfc22ee5..69b0bfdb8 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -21,6 +21,7 @@ from sqlalchemy import ( ForeignKey, String, + LargeBinary, and_, exists, join, @@ -34,6 +35,7 @@ text, event, CheckConstraint, + Column, Computed, ) from sqlalchemy.dialects.postgresql import ExcludeConstraint @@ -99,7 +101,7 @@ class BaseUser(IntegerIdModel): __abstract__ = True login: Mapped[str40] = mapped_column(unique=True) - login_hash: Mapped[str] = mapped_column(Computed("digest(login, 'sha512')")) + login_hash: Mapped[bytes] = Column(LargeBinary(512), Computed("digest(login, 'sha512')")) name: Mapped[str255] registered_at: Mapped[utc.DateTimeTz] passwd_hash: Mapped[str_deferred | None] @@ -666,7 +668,7 @@ class UnixTombstone(ModelBase): from sqlalchemy import Column, Integer, String uid: Mapped[int] = Column(Integer, unique=True) - login_hash: Mapped[str] = Column(String, unique=True) + login_hash: Mapped[bytes] = Column(LargeBinary(512), unique=True) # backrefs unix_account: Mapped[UnixAccount] = relationship(viewonly=True, uselist=False) @@ -763,7 +765,7 @@ class UnixTombstone(ModelBase): v_ua unix_account; v_login_ts unix_tombstone; v_ua_ts unix_tombstone; - v_u_login_hash character varying; + v_u_login_hash bytea; BEGIN select * into v_ua from unix_account ua where ua.id = NEW.unix_account_id; -- hash not generated yet, because we are a BEFORE trigger! diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index 03284cdaf..fe8e494e4 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -14,7 +14,13 @@ from tests import factories as f -L_HASH = sha512(b"login").hexdigest() +L_HASH: bytes = sha512(b"mylogin").digest() + + +@pytest.mark.meta +def test_login_hash_correct(session): + user = f.UserFactory(login="mylogin") + assert user.login_hash == L_HASH class TestTombstoneConstraints: @@ -50,7 +56,7 @@ def test_valid_tombstone_combinations(session: Session): for h, uid in ( (None, 10000), (L_HASH, None), - (sha512(b"login2").hexdigest(), 10001), + (sha512(b"login2").digest(), 10001), (None, 20000), ) ) From ee52d9c0959912aaf7a3f5bae1cec58994d53520 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 13:43:45 +0200 Subject: [PATCH 09/49] tests: add unix tombstone lifecycle tests --- tests/model/test_unix_tombstone.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index fe8e494e4..61e0f6814 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -183,10 +183,22 @@ def test_user_deletion(self, session, user): class TestTombstoneLifeCycle: - # TODO: FIXTURE: isolated unix tombstone, nothing else existing + @pytest.fixture(scope="class") + def tombstone(self, class_session): + tombstone = UnixTombstone(uid=999, login_hash=L_HASH) + class_session.add(tombstone) + return tombstone - def test_cannot_set_uid_null(self, session): - pytest.fail("TODO") + def test_cannot_set_uid_null(self, session, tombstone): + with pytest.raises(IntegrityError), session.begin_nested(): + session.execute( + update(UnixTombstone).values(uid=None).where(UnixTombstone.uid == tombstone.uid) + ) - def test_cannot_set_login_hash_null(self, session): - pytest.fail("TODO") + def test_cannot_set_login_hash_null(self, session, tombstone): + with pytest.raises(IntegrityError), session.begin_nested(): + session.execute( + update(UnixTombstone) + .values(login_hash=None) + .where(UnixTombstone.uid == tombstone.uid) + ) From f34e6f6e1b2e130ea775abc47b9c2de74b42352d Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 14:13:22 +0200 Subject: [PATCH 10/49] model: Implement tombstone lifecycle checks --- pycroft/model/user.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 69b0bfdb8..0475c332c 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -689,6 +689,37 @@ class UnixTombstone(ModelBase): ) __mapper_args__ = {"primary_key": (uid, login_hash)} # fake PKey for mapper +check_unix_tombstone_lifecycle_func = ddl.Function( + name="check_unix_tombstone_lifecycle", + arguments=[], + rtype="trigger", + definition=""" + BEGIN + IF (NEW.login_hash IS NULL AND OLD.login_hash IS NOT NULL) THEN + RAISE EXCEPTION 'Removing login_hash from tombstone is invalid' + USING ERRCODE = 'check_violation'; + END IF; + IF (NEW.uid IS NULL AND OLD.uid IS NOT NULL) THEN + RAISE EXCEPTION 'Removing uid from tombstone is invalid' + USING ERRCODE = 'check_violation'; + END IF; + RETURN NEW; + END; + """, + volatility="stable", + language="plpgsql", +) +manager.add_function(UnixTombstone.__table__, check_unix_tombstone_lifecycle_func) +manager.add_trigger( + UnixTombstone.__table__, + ddl.Trigger( + name="check_unix_tombstone_lifecycle_trigger", + table=UnixTombstone.__table__, + events=("UPDATE",), + function_call=f"{check_unix_tombstone_lifecycle_func.name}()", + when="BEFORE", + ), +) # unix account creation manager.add_function( From 851c3256ebadbbefde164f93555f9ef79bd9b12a Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 14:37:09 +0200 Subject: [PATCH 11/49] model: Extract `pycroft.model.unix_account` --- pycroft/lib/user.py | 2 +- pycroft/model/_all.py | 1 + pycroft/model/unix_account.py | 308 +++++++++++++++++++++++++++++ pycroft/model/user.py | 283 +------------------------- tests/factories/user.py | 3 +- tests/model/test_unix_tombstone.py | 3 +- tests/model/test_user.py | 3 +- 7 files changed, 318 insertions(+), 285 deletions(-) create mode 100644 pycroft/model/unix_account.py diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index f24e46972..ecbae27bf 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -56,13 +56,13 @@ from pycroft.model.traffic import traffic_history as func_traffic_history from pycroft.model.user import ( User, - UnixAccount, PreMember, BaseUser, RoomHistoryEntry, PropertyGroup, Membership, ) +from pycroft.model.unix_account import UnixAccount from pycroft.model.webstorage import WebStorage from pycroft.task import send_mails_async diff --git a/pycroft/model/_all.py b/pycroft/model/_all.py index 41656c256..481eccf57 100644 --- a/pycroft/model/_all.py +++ b/pycroft/model/_all.py @@ -24,6 +24,7 @@ from .task import * from .traffic import * from .user import * +from .unix_account import * from .webstorage import * # hades is special: it calls `configure_mappers()` at import time. diff --git a/pycroft/model/unix_account.py b/pycroft/model/unix_account.py new file mode 100644 index 000000000..a94ac6975 --- /dev/null +++ b/pycroft/model/unix_account.py @@ -0,0 +1,308 @@ +from __future__ import annotations +import typing as t +from sqlalchemy import ( + CheckConstraint, + Column, + ForeignKey, + Index, + LargeBinary, + Sequence, + UniqueConstraint, +) +from sqlalchemy.orm import ( + Mapped, + mapped_column, + relationship, +) + +from pycroft.model import ddl +from pycroft.model.base import ModelBase, IntegerIdModel + +# needed because the consistency trigger depends on the the `User` table +from .user import User + + +if t.TYPE_CHECKING: + # FKeys + + # Backrefs + pass + + +manager = ddl.DDLManager() +unix_account_uid_seq = Sequence("unix_account_uid_seq", start=1000, metadata=ModelBase.metadata) + + +class UnixAccount(IntegerIdModel): + uid: Mapped[int] = mapped_column( + ForeignKey("unix_tombstone.uid", deferrable=True), + unique=True, + server_default=unix_account_uid_seq.next_value(), + ) + tombstone: Mapped[UnixTombstone] = relationship(viewonly=True) + gid: Mapped[int] = mapped_column(default=100) + login_shell: Mapped[str] = mapped_column(default="/bin/bash") + home_directory: Mapped[str] = mapped_column(unique=True) + + +class UnixTombstone(ModelBase): + # mapped_column does not work yet for reference in `__mapper_args__`, unfortunately. + from sqlalchemy import Integer, String + + uid: Mapped[int] = Column(Integer, unique=True) + login_hash: Mapped[bytes] = Column(LargeBinary(512), unique=True) + + # backrefs + unix_account: Mapped[UnixAccount] = relationship(viewonly=True, uselist=False) + # /backrefs + + __table_args__ = ( + UniqueConstraint("uid", "login_hash"), + Index("uid_only_unique", login_hash, unique=True, postgresql_where=uid.is_(None)), + Index( + "login_hash_only_unique", + uid, + unique=True, + postgresql_where=login_hash.is_(None), + ), + CheckConstraint("uid is not null or login_hash is not null"), + ) + __mapper_args__ = {"primary_key": (uid, login_hash)} # fake PKey for mapper + + +check_unix_tombstone_lifecycle_func = ddl.Function( + name="check_unix_tombstone_lifecycle", + arguments=[], + rtype="trigger", + definition=""" + BEGIN + IF (NEW.login_hash IS NULL AND OLD.login_hash IS NOT NULL) THEN + RAISE EXCEPTION 'Removing login_hash from tombstone is invalid' + USING ERRCODE = 'check_violation'; + END IF; + IF (NEW.uid IS NULL AND OLD.uid IS NOT NULL) THEN + RAISE EXCEPTION 'Removing uid from tombstone is invalid' + USING ERRCODE = 'check_violation'; + END IF; + RETURN NEW; + END; + """, + volatility="stable", + language="plpgsql", +) +manager.add_function(UnixTombstone.__table__, check_unix_tombstone_lifecycle_func) +manager.add_trigger( + UnixTombstone.__table__, + ddl.Trigger( + name="check_unix_tombstone_lifecycle_trigger", + table=UnixTombstone.__table__, + events=("UPDATE",), + function_call=f"{check_unix_tombstone_lifecycle_func.name}()", + when="BEFORE", + ), +) + +# unix account creation +manager.add_function( + User.__table__, + ddl.Function( + "unix_account_ensure_tombstone", + [], + "trigger", + # IF unix_account has a corresponding user + # THEN use that tombstone. + # However, in the scenario where the user's tombstone exists and points to a different uid, + # we throw an error instead. + """ + DECLARE + v_user "user"; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; + BEGIN + select * into v_user from "user" u where u.unix_account_id = NEW.id; + select * into v_ua_ts from unix_tombstone ts where ts.uid = NEW.uid; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on u.login_hash = ts.login_hash + where u.unix_account_id = NEW.id; + + -- scenarios: + -- 1) no user, no tombstone + -- 2) no user, tombstone + -- 3) user, no tombstone -> create + -- 4) user + tombstone + + IF v_user IS NULL THEN + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid) values (NEW.uid); + END IF; + RETURN NEW; + END IF; + -- else: user not null + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); + END IF; + + RETURN NEW; + END; + """, + volatility="volatile", + strict=True, + language="plpgsql", + ), +) + +manager.add_trigger( + User.__table__, + ddl.Trigger( + "unix_account_ensure_tombstone_trigger", + UnixAccount.__table__, + ("INSERT",), + "unix_account_ensure_tombstone()", + when="BEFORE", + ), +) + +ensure_tombstone = ddl.Function( + "user_ensure_tombstone", + [], + "trigger", + # This function ensures satisfaction of the user → tombstone foreign key constraint + # (a "tuple generating dependency") which says ∀u: user ∃t: tombstone: t.login_hash = u.login_hash. + # it does _not_ enforce the consistency constraint ("equality generating dependency"). + """ + DECLARE + v_ua unix_account; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; + v_u_login_hash bytea; + BEGIN + select * into v_ua from unix_account ua where ua.id = NEW.unix_account_id; + -- hash not generated yet, because we are a BEFORE trigger! + select digest(NEW.login, 'sha512') into v_u_login_hash; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on v_u_login_hash = ts.login_hash + where u.id = NEW.id; + + IF v_ua IS NULL THEN + IF v_login_ts IS NULL THEN + -- TODO check whether this was a _set_ or an _update_. + -- do we really want to automatically update this? + -- NOTE: when an update caused this, this might create an inconsistent state (different tombstones for uid and login), + -- however as soon as the check constraint fires the transaction will be aborted, anyway. + insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash) on conflict do nothing; + END IF; + -- ELSE: user tombstone exists, no need to do anything + ELSE + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + IF v_ua_ts.login_hash IS NULL THEN + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; + END IF; + END IF; + + RETURN NEW; + END; + """, + volatility="volatile", + strict=True, + language="plpgsql", +) + +manager.add_function(User.__table__, ensure_tombstone) + +manager.add_trigger( + User.__table__, + ddl.Trigger( + "user_ensure_tombstone_trigger", + User.__table__, + # TODO create different trigger on UPDATE which only fires if login or unix_account has changed + ("INSERT", "UPDATE OF unix_account_id, login"), + "user_ensure_tombstone()", + when="BEFORE", + ), +) + +check_tombstone_consistency = ddl.Function( + name="check_tombstone_consistency", + arguments=[], + rtype="trigger", + definition=""" + DECLARE + v_user "user"; + v_ua unix_account; + v_user_ts unix_tombstone; + v_ua_ts unix_tombstone; + BEGIN + IF TG_TABLE_NAME = 'user' THEN + v_user := NEW; + select * into v_ua from unix_account where unix_account.id = NEW.unix_account_id; + ELSIF TG_TABLE_NAME = 'unix_account' THEN + v_ua := NEW; + select * into v_user from "user" u where u.unix_account_id = NEW.id; + ELSE + RAISE EXCEPTION + 'trigger can only be invoked on user or unix_account tables, not %%', + TG_TABLE_NAME + USING ERRCODE = 'feature_not_supported'; + END IF; + + IF v_ua IS NULL OR v_user IS NULL THEN + RETURN NEW; -- no consistency to satisfy + END IF; + ASSERT NOT v_user IS NULL, 'v_user is null!'; + ASSERT NOT v_user.login IS NULL, format('user.login is null (%%s): %%s (type %%s)', v_user.login, v_user, pg_typeof(v_user)); + + select * into v_user_ts from unix_tombstone ts where ts.login_hash = v_user.login_hash; + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + + -- this should already be ensured by the `ensure_*_tombstone` triggers, + -- but we are defensive here to ensure consistency no matter what + IF v_ua_ts IS NULL THEN + ASSERT NOT v_ua IS NULL, 'unix_account is null'; + RAISE EXCEPTION + 'unix account with id=%% (uid=%%) has no tombstone.', v_ua.id, v_ua.uid + USING ERRCODE = 'foreign_key_violation'; + END IF; + IF v_user_ts IS NULL THEN + RAISE EXCEPTION + 'user %% with id=%% (login=%%) has no tombstone.', v_user, v_user.id, v_user.login + USING ERRCODE = 'foreign_key_violation'; + END IF; + + if v_user_ts <> v_ua_ts THEN + RAISE EXCEPTION + 'User tombstone (uid=%%, login_hash=%%) and unix account tombstone (uid=%%, login_hash=%%) differ!', + v_user_ts.uid, v_user_ts.login_hash, v_ua_ts.uid, v_ua_ts.login_hash + USING ERRCODE = 'check_violation'; + END IF; + + RETURN NEW; + END; + """, + strict=True, + language="plpgsql", +) +manager.add_function(User.__table__, check_tombstone_consistency) +manager.add_constraint_trigger( + User.__table__, + ddl.ConstraintTrigger( + name="user_check_tombstone_consistency_trigger", + table=User.__table__, + events=("INSERT", "UPDATE OF unix_account_id, login"), + function_call=f"{check_tombstone_consistency.name}()", + deferrable=True, + ), +) +manager.add_constraint_trigger( + # function needs user table + User.__table__, + ddl.ConstraintTrigger( + name="unix_account_check_tombstone_consistency_trigger", + table=UnixAccount.__table__, + events=("INSERT", "UPDATE OF uid"), + function_call=f"{check_tombstone_consistency.name}()", + deferrable=True, + ), +) +manager.register() diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 0475c332c..1ae3f72fe 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -27,14 +27,12 @@ join, null, select, - Sequence, func, UniqueConstraint, ForeignKeyConstraint, Index, text, event, - CheckConstraint, Column, Computed, ) @@ -60,7 +58,7 @@ from pycroft.helpers import utc from pycroft.model import session, ddl from pycroft.model.address import Address, address_remove_orphans -from pycroft.model.base import ModelBase, IntegerIdModel +from pycroft.model.base import IntegerIdModel from pycroft.model.exc import PycroftModelException from pycroft.model.facilities import Room from pycroft.model.types import TsTzRange @@ -72,6 +70,7 @@ # FKeys from .finance import Account from .property import CurrentProperty + from .unix_account import UnixAccount, UnixTombstone # Backrefs from .logging import LogEntry, UserLogEntry, TaskLogEntry @@ -648,284 +647,6 @@ class Property(IntegerIdModel): property_group: Mapped[PropertyGroup] = relationship(back_populates="properties") -unix_account_uid_seq = Sequence('unix_account_uid_seq', start=1000, - metadata=ModelBase.metadata) - - -class UnixAccount(IntegerIdModel): - uid: Mapped[int] = mapped_column( - ForeignKey("unix_tombstone.uid", deferrable=True), - unique=True, server_default=unix_account_uid_seq.next_value() - ) - tombstone: Mapped[UnixTombstone] = relationship(viewonly=True) - gid: Mapped[int] = mapped_column(default=100) - login_shell: Mapped[str] = mapped_column(default="/bin/bash") - home_directory: Mapped[str] = mapped_column(unique=True) - - -class UnixTombstone(ModelBase): - # mapped_column does not work yet for reference in `__mapper_args__`, unfortunately. - from sqlalchemy import Column, Integer, String - - uid: Mapped[int] = Column(Integer, unique=True) - login_hash: Mapped[bytes] = Column(LargeBinary(512), unique=True) - - # backrefs - unix_account: Mapped[UnixAccount] = relationship(viewonly=True, uselist=False) - # /backrefs - - __table_args__ = ( - UniqueConstraint("uid", "login_hash"), - Index( - "uid_only_unique", login_hash, unique=True, postgresql_where=uid.is_(None) - ), - Index( - "login_hash_only_unique", - uid, - unique=True, - postgresql_where=login_hash.is_(None), - ), - CheckConstraint("uid is not null or login_hash is not null"), - ) - __mapper_args__ = {"primary_key": (uid, login_hash)} # fake PKey for mapper - -check_unix_tombstone_lifecycle_func = ddl.Function( - name="check_unix_tombstone_lifecycle", - arguments=[], - rtype="trigger", - definition=""" - BEGIN - IF (NEW.login_hash IS NULL AND OLD.login_hash IS NOT NULL) THEN - RAISE EXCEPTION 'Removing login_hash from tombstone is invalid' - USING ERRCODE = 'check_violation'; - END IF; - IF (NEW.uid IS NULL AND OLD.uid IS NOT NULL) THEN - RAISE EXCEPTION 'Removing uid from tombstone is invalid' - USING ERRCODE = 'check_violation'; - END IF; - RETURN NEW; - END; - """, - volatility="stable", - language="plpgsql", -) -manager.add_function(UnixTombstone.__table__, check_unix_tombstone_lifecycle_func) -manager.add_trigger( - UnixTombstone.__table__, - ddl.Trigger( - name="check_unix_tombstone_lifecycle_trigger", - table=UnixTombstone.__table__, - events=("UPDATE",), - function_call=f"{check_unix_tombstone_lifecycle_func.name}()", - when="BEFORE", - ), -) - -# unix account creation -manager.add_function( - User.__table__, - ddl.Function( - "unix_account_ensure_tombstone", - [], - "trigger", - # IF unix_account has a corresponding user - # THEN use that tombstone. - # However, in the scenario where the user's tombstone exists and points to a different uid, - # we throw an error instead. - """ - DECLARE - v_user "user"; - v_login_ts unix_tombstone; - v_ua_ts unix_tombstone; - BEGIN - select * into v_user from "user" u where u.unix_account_id = NEW.id; - select * into v_ua_ts from unix_tombstone ts where ts.uid = NEW.uid; - - select ts.* into v_login_ts from "user" u - join unix_tombstone ts on u.login_hash = ts.login_hash - where u.unix_account_id = NEW.id; - - -- scenarios: - -- 1) no user, no tombstone - -- 2) no user, tombstone - -- 3) user, no tombstone -> create - -- 4) user + tombstone - - IF v_user IS NULL THEN - IF v_ua_ts IS NULL THEN - insert into unix_tombstone (uid) values (NEW.uid); - END IF; - RETURN NEW; - END IF; - -- else: user not null - IF v_ua_ts IS NULL THEN - insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); - END IF; - - RETURN NEW; - END; - """, - volatility="volatile", - strict=True, - language="plpgsql", - ), -) - -manager.add_trigger( - User.__table__, - ddl.Trigger( - "unix_account_ensure_tombstone_trigger", - UnixAccount.__table__, - ("INSERT",), - "unix_account_ensure_tombstone()", - when="BEFORE", - ), -) - -manager.add_function( - User.__table__, - ddl.Function( - "user_ensure_tombstone", - [], - "trigger", - # This function ensures satisfaction of the user → tombstone foreign key constraint - # (a "tuple generating dependency") which says ∀u: user ∃t: tombstone: t.login_hash = u.login_hash. - # it does _not_ enforce the consistency constraint ("equality generating dependency"). - """ - DECLARE - v_ua unix_account; - v_login_ts unix_tombstone; - v_ua_ts unix_tombstone; - v_u_login_hash bytea; - BEGIN - select * into v_ua from unix_account ua where ua.id = NEW.unix_account_id; - -- hash not generated yet, because we are a BEFORE trigger! - select digest(NEW.login, 'sha512') into v_u_login_hash; - - select ts.* into v_login_ts from "user" u - join unix_tombstone ts on v_u_login_hash = ts.login_hash - where u.id = NEW.id; - - IF v_ua IS NULL THEN - IF v_login_ts IS NULL THEN - -- TODO check whether this was a _set_ or an _update_. - -- do we really want to automatically update this? - -- NOTE: when an update caused this, this might create an inconsistent state (different tombstones for uid and login), - -- however as soon as the check constraint fires the transaction will be aborted, anyway. - insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash) on conflict do nothing; - END IF; - -- ELSE: user tombstone exists, no need to do anything - ELSE - select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; - IF v_ua_ts.login_hash IS NULL THEN - update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; - END IF; - END IF; - - RETURN NEW; - END; - """, - volatility="volatile", - strict=True, - language="plpgsql", - ), -) - -manager.add_trigger( - User.__table__, - ddl.Trigger( - "user_ensure_tombstone_trigger", - User.__table__, - # TODO create different trigger on UPDATE which only fires if login or unix_account has changed - ("INSERT", "UPDATE OF unix_account_id, login"), - "user_ensure_tombstone()", - when="BEFORE", - ), -) - -check_tombstone_consistency = ddl.Function( - name="check_tombstone_consistency", - arguments=[], - rtype="trigger", - definition=""" - DECLARE - v_user "user"; - v_ua unix_account; - v_user_ts unix_tombstone; - v_ua_ts unix_tombstone; - BEGIN - IF TG_TABLE_NAME = 'user' THEN - v_user := NEW; - select * into v_ua from unix_account where unix_account.id = NEW.unix_account_id; - ELSIF TG_TABLE_NAME = 'unix_account' THEN - v_ua := NEW; - select * into v_user from "user" u where u.unix_account_id = NEW.id; - ELSE - RAISE EXCEPTION - 'trigger can only be invoked on user or unix_account tables, not %%', - TG_TABLE_NAME - USING ERRCODE = 'feature_not_supported'; - END IF; - - IF v_ua IS NULL OR v_user IS NULL THEN - RETURN NEW; -- no consistency to satisfy - END IF; - ASSERT NOT v_user IS NULL, 'v_user is null!'; - ASSERT NOT v_user.login IS NULL, format('user.login is null (%%s): %%s (type %%s)', v_user.login, v_user, pg_typeof(v_user)); - - select * into v_user_ts from unix_tombstone ts where ts.login_hash = v_user.login_hash; - select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; - - -- this should already be ensured by the `ensure_*_tombstone` triggers, - -- but we are defensive here to ensure consistency no matter what - IF v_ua_ts IS NULL THEN - ASSERT NOT v_ua IS NULL, 'unix_account is null'; - RAISE EXCEPTION - 'unix account with id=%% (uid=%%) has no tombstone.', v_ua.id, v_ua.uid - USING ERRCODE = 'foreign_key_violation'; - END IF; - IF v_user_ts IS NULL THEN - RAISE EXCEPTION - 'user %% with id=%% (login=%%) has no tombstone.', v_user, v_user.id, v_user.login - USING ERRCODE = 'foreign_key_violation'; - END IF; - - if v_user_ts <> v_ua_ts THEN - RAISE EXCEPTION - 'User tombstone (uid=%%, login_hash=%%) and unix account tombstone (uid=%%, login_hash=%%) differ!', - v_user_ts.uid, v_user_ts.login_hash, v_ua_ts.uid, v_ua_ts.login_hash - USING ERRCODE = 'check_violation'; - END IF; - - RETURN NEW; - END; - """, - strict=True, - language="plpgsql", -) -manager.add_function(User.__table__, check_tombstone_consistency) -manager.add_constraint_trigger( - User.__table__, - ddl.ConstraintTrigger( - name="user_check_tombstone_consistency_trigger", - table=User.__table__, - events=("INSERT", "UPDATE OF unix_account_id, login"), - function_call=f"{check_tombstone_consistency.name}()", - deferrable=True, - ), -) -manager.add_constraint_trigger( - User.__table__, - ddl.ConstraintTrigger( - name="unix_account_check_tombstone_consistency_trigger", - table=UnixAccount.__table__, - events=("INSERT", "UPDATE OF uid"), - function_call=f"{check_tombstone_consistency.name}()", - deferrable=True, - ), -) - - class RoomHistoryEntry(IntegerIdModel): active_during: Mapped[Interval[utc.DateTimeTz]] = mapped_column(TsTzRange) diff --git a/tests/factories/user.py b/tests/factories/user.py index bdfffcc76..f81f7784a 100644 --- a/tests/factories/user.py +++ b/tests/factories/user.py @@ -6,7 +6,8 @@ from factory.faker import Faker from pycroft.helpers.interval import starting_from -from pycroft.model.user import User, RoomHistoryEntry, UnixAccount +from pycroft.model.user import User, RoomHistoryEntry +from pycroft.model.unix_account import UnixAccount from .base import BaseFactory from .facilities import RoomFactory from .finance import AccountFactory diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index 61e0f6814..514895fd8 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -10,7 +10,8 @@ from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session -from pycroft.model.user import UnixTombstone, User +from pycroft.model.user import User +from pycroft.model.unix_account import UnixTombstone from tests import factories as f diff --git a/tests/model/test_user.py b/tests/model/test_user.py index ba2b234f6..c526102d4 100644 --- a/tests/model/test_user.py +++ b/tests/model/test_user.py @@ -7,7 +7,8 @@ from pycroft.helpers.interval import single, starting_from from pycroft.helpers.user import generate_password, hash_password -from pycroft.model.user import IllegalLoginError, Membership, User, UnixAccount +from pycroft.model.user import IllegalLoginError, Membership, User +from pycroft.model.unix_account import UnixAccount from tests import factories From 1265363450ed6bd3beeabab087690ac5d24948b6 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 8 Jul 2024 18:40:20 +0200 Subject: [PATCH 12/49] model: Remove long obsoleted `DDL.on` field This has been deprecated in v0.7 because `execute_if` already subsumes this functionality; see https://github.com/sqlalchemy/sqlalchemy/blob/f6198d9abf453182f4b111e0579a7a4ef1614e79/lib/sqlalchemy/sql/ddl.py#L314-L316. We already use that on the event registration when `dialect` is set. --- pycroft/model/ddl.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/pycroft/model/ddl.py b/pycroft/model/ddl.py index bcae38d5a..c4d4d127d 100644 --- a/pycroft/model/ddl.py +++ b/pycroft/model/ddl.py @@ -70,7 +70,6 @@ def visit_drop_constraint(drop_constraint: DropConstraint, compiler: Compiled, * class Function(schema.DDLElement): - on = "postgresql" def __init__( self, @@ -148,8 +147,6 @@ class CreateFunction(schema.DDLElement): Represents a CREATE FUNCTION DDL statement """ - on = "postgresql" - def __init__(self, func: Function, or_replace: bool = False): self.function = func self.or_replace = or_replace @@ -160,8 +157,6 @@ class DropFunction(schema.DDLElement): Represents a DROP FUNCTION DDL statement """ - on = "postgresql" - def __init__(self, func: Function, if_exists: bool = False, cascade: bool = False): self.function = func self.if_exists = if_exists @@ -204,8 +199,6 @@ def visit_drop_function(element: DropFunction, compiler: Compiled, **kw: t.Any) class Rule(schema.DDLElement): - on = "postgresql" - def __init__( self, name: str, @@ -232,8 +225,6 @@ class CreateRule(schema.DDLElement): Represents a CREATE RULE DDL statement """ - on = "postgresql" - def __init__(self, rule: Rule, or_replace: bool = False) -> None: self.rule = rule self.or_replace = or_replace @@ -244,8 +235,6 @@ class DropRule(schema.DDLElement): Represents a DROP RULE DDL statement """ - on = "postgresql" - def __init__(self, rule: Rule, if_exists: bool = False, cascade: bool = False) -> None: """ :param rule: @@ -346,8 +335,6 @@ def __init__( class CreateTrigger(schema.DDLElement): - on = "postgresql" - def __init__(self, trigger: Trigger) -> None: self.trigger = trigger @@ -357,8 +344,6 @@ class CreateConstraintTrigger(schema.DDLElement): Represents a CREATE CONSTRAINT TRIGGER DDL statement """ - on = "postgresql" - def __init__(self, constraint_trigger: ConstraintTrigger) -> None: self.constraint_trigger = constraint_trigger @@ -368,8 +353,6 @@ class DropTrigger(schema.DDLElement): Represents a DROP TRIGGER DDL statement. """ - on = "postgresql" - def __init__(self, trigger: Trigger, if_exists: bool = False, cascade: bool = False) -> None: self.trigger = trigger self.if_exists = if_exists From a816e237accaceff1fa9b5d8a6ae45fb2ae298bf Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Tue, 9 Jul 2024 19:03:25 +0200 Subject: [PATCH 13/49] model: use dataclasses for custom DDL statements --- pycroft/model/ddl.py | 339 ++++++++++++++++++++----------------------- 1 file changed, 154 insertions(+), 185 deletions(-) diff --git a/pycroft/model/ddl.py b/pycroft/model/ddl.py index c4d4d127d..7ae4df8ef 100644 --- a/pycroft/model/ddl.py +++ b/pycroft/model/ddl.py @@ -9,7 +9,8 @@ import typing as t from collections import OrderedDict from collections.abc import Iterable -from functools import partial, cached_property +from dataclasses import dataclass, field +from functools import partial from sqlalchemy import event as sqla_event, schema, table, text, Constraint, Table from sqlalchemy.dialects import postgresql @@ -69,64 +70,57 @@ def visit_drop_constraint(drop_constraint: DropConstraint, compiler: Compiled, * constraint_name, opt_drop_behavior) -class Function(schema.DDLElement): +def _process(value: str | Selectable) -> str: + if isinstance(value, str): + return inspect.cleandoc(value) - def __init__( - self, - name: str, - arguments: t.Iterable[str], - rtype: str, - definition: str | Selectable, - volatility: t.Literal["volatile", "stable", "immutable"] = "volatile", - strict: bool = False, - leakproof: bool = False, - language: str = "sql", - quote_tag: str = "", - ): - """ - Represents PostgreSQL function - - :param name: Name of the function (excluding arguments). - :param arguments: Arguments of the function. A function - identifier of ``new_function(integer, integer)`` would - result in ``arguments=['integer', 'integer']``. - :param rtype: Return type - :param definition: Definition - :param volatility: Either 'volatile', 'stable', or - 'immutable' - :param strict: Function should be declared STRICT - :param leakproof: Function should be declared LEAKPROOF - :param str language: Language the function is defined in - :param str quote_tag: Dollar quote tag to enclose the function - definition - """ - if volatility not in ('volatile', 'stable', 'immutable'): - raise ValueError("volatility must be 'volatile', 'stable', or " - "'immutable'") - self.name = name - self.arguments = arguments - self._definition = definition - self.volatility = volatility - self.strict = strict - self.rtype = rtype - self.language = language - self.leakproof = leakproof - self.quote_tag = quote_tag - - @cached_property - def definition(self) -> str: - if isinstance(self._definition, str): - return inspect.cleandoc(self._definition) - - if isinstance(self._definition, Selectable): - return str( - self._definition.compile( - dialect=t.cast(type[Dialect], postgresql.dialect)(), - compile_kwargs={"literal_binds": True}, - ) + if isinstance(value, Selectable): + return str( + value.compile( + dialect=t.cast(type[Dialect], postgresql.dialect)(), + compile_kwargs={"literal_binds": True}, ) + ) + raise ValueError(f"Definition must be str or Selectable, not {type(value)}") + + +class LazilyComiledDefDescriptor: + def __set_name__(self, owner, name): + self._name = f"_{name}" - raise ValueError(f"definition must be str or Selectable, not {type(self._definition)}") + def __get__(self, obj, type) -> str: + # TODO cache this thing + if obj is None: + # this is interpreted as the default by the `dataclass` decorator + return None + value_unprocessed = getattr(obj, self._name) + return _process(value_unprocessed) + + def __set__(self, obj, value: str | Selectable): + setattr(obj, self._name, value) + + +@dataclass +class Function(schema.DDLElement): + #: Name of the function (excluding arguments). + name: str + #: Arguments of the function. A function + #: identifier of ``new_function(integer, integer)`` would + #: result in ``arguments=['integer', 'integer']``. + arguments: t.Iterable[str] + #: Return type + rtype: str + #: Definition + definition: LazilyComiledDefDescriptor = LazilyComiledDefDescriptor() + volatility: t.Literal["volatile", "stable", "immutable"] = "volatile" + #: Function should be declared ``STRICT`` + strict: bool = False + #: Function should be declared ``LEAKPROOF`` + leakproof: bool = False + #: Language the function is defined in (e.g. ``plpgsql`` for trigger functions) + language: str = "sql" + #: Dollar quote tag to enclose the function definition + quote_tag: str = "" def build_quoted_identifier(self, quoter: t.Callable[[str], str]) -> str: """Compile the function identifier from name and arguments. @@ -136,20 +130,27 @@ def build_quoted_identifier(self, quoter: t.Callable[[str], str]) -> str: :returns: The compiled string, like ``"my_function_name"(integer, account_type)`` """ - return "{name}({args})".format( - name=quoter(self.name), - args=", ".join(self.arguments), - ) + name = quoter(self.name) + args = ", ".join(self.arguments) + return f"{name}({args})" + + def __hash__(self): + return hash(self.name) +@dataclass(unsafe_hash=True) class CreateFunction(schema.DDLElement): """ Represents a CREATE FUNCTION DDL statement """ - def __init__(self, func: Function, or_replace: bool = False): - self.function = func - self.or_replace = or_replace + func: Function + + @property + def function(self) -> Function: + return self.func + + or_replace: bool = False class DropFunction(schema.DDLElement): @@ -198,52 +199,43 @@ def visit_drop_function(element: DropFunction, compiler: Compiled, **kw: t.Any) function_name, opt_drop_behavior) +@dataclass class Rule(schema.DDLElement): - def __init__( - self, - name: str, - table: Table, - event: str, - command_or_commands: str | t.Sequence[str], - condition: str | None = None, - do_instead: bool = False, - ) -> None: - self.name = name - self.table = table - self.event = event - self.condition = condition - self.do_instead = do_instead - self.commands: tuple[str, ...] - if isinstance(command_or_commands, Iterable) and not isinstance(command_or_commands, str): - self.commands = tuple(command_or_commands) + name: str + table: Table + event: str + command_or_commands: str | t.Sequence[str] + commands: tuple[str, ...] = field(init=False) + condition: str | None = None + do_instead: bool = False + + def __post_init__(self): + cs = self.command_or_commands + if isinstance(cs, Iterable) and not isinstance(cs, str): + self.commands = tuple(cs) else: - self.commands = (command_or_commands,) + self.commands = (cs,) +@dataclass(unsafe_hash=True) class CreateRule(schema.DDLElement): """ Represents a CREATE RULE DDL statement """ - def __init__(self, rule: Rule, or_replace: bool = False) -> None: - self.rule = rule - self.or_replace = or_replace + rule: Rule + or_replace: bool = False +@dataclass class DropRule(schema.DDLElement): """ Represents a DROP RULE DDL statement """ - def __init__(self, rule: Rule, if_exists: bool = False, cascade: bool = False) -> None: - """ - :param rule: - :param if_exists: - :param cascade: - """ - self.rule = rule - self.if_exists = if_exists - self.cascade = cascade + rule: Rule + if_exists: bool = False + cascade: bool = False # noinspection PyUnusedLocal @@ -286,77 +278,62 @@ def visit_drop_rule(element: DropRule, compiler: Compiled, **kw: t.Any) -> str: opt_drop_behavior) -# TODO add type hints +@dataclass class Trigger(schema.DDLElement): - def __init__( - self, - name: str, - table: Table, - events: t.Sequence[str], - function_call: str, - when: t.Literal["BEFORE", "AFTER", "INSTEAD OF"] = "AFTER", - ) -> None: - """Construct a trigger - - :param name: Name of the trigger - :param table: Table the trigger is for - :param events: list of events (INSERT, UPDATE, DELETE) - :param function_call: call of the trigger function - :param when: Mode of execution - """ - self.name = name - self.table = table - self.events = events - self.function_call = function_call - if when not in {"BEFORE", "AFTER", "INSTEAD OF"}: - raise ValueError("`when` must be one of BEFORE, AFTER, INSTEAD OF") - self.when = when - - + #: Name of the trigger + name: str + #: Table the trigger is for + table: Table + #: list of events (INSERT, UPDATE, DELETE) + events: t.Sequence[str] + #: call of the trigger function + function_call: str + #: Mode of execution + when: t.Literal["BEFORE", "AFTER", "INSTEAD OF"] = "AFTER" + + def __hash__(self): + return hash(self.name) + + +@dataclass class ConstraintTrigger(Trigger): - def __init__( - self, - *args: t.Any, - deferrable: bool = False, - initially_deferred: bool = False, - **kwargs: t.Any, - ) -> None: - """Construct a Constraint Trigger + #: Constraint can be deferred + deferrable: bool = False + #: Constrait is ste to deferred + initially_deferred: bool = False - :param deferrable: Constraint can be deferred - :param initially_deferred: Constraint is set to deferred - """ - super().__init__(*args, **kwargs) - self.deferrable = deferrable - if not deferrable and initially_deferred: + def __post_init__(self): + if not self.deferrable and self.initially_deferred: raise ValueError("Constraint declared INITIALLY DEFERRED must be " "DEFERRABLE.") - self.initially_deferred = initially_deferred + + def __hash__(self): + return super().__hash__() +@dataclass(unsafe_hash=True) class CreateTrigger(schema.DDLElement): - def __init__(self, trigger: Trigger) -> None: - self.trigger = trigger + trigger: Trigger +@dataclass(unsafe_hash=True) class CreateConstraintTrigger(schema.DDLElement): """ Represents a CREATE CONSTRAINT TRIGGER DDL statement """ - def __init__(self, constraint_trigger: ConstraintTrigger) -> None: - self.constraint_trigger = constraint_trigger + constraint_trigger: ConstraintTrigger +@dataclass(unsafe_hash=True) class DropTrigger(schema.DDLElement): """ Represents a DROP TRIGGER DDL statement. """ - def __init__(self, trigger: Trigger, if_exists: bool = False, cascade: bool = False) -> None: - self.trigger = trigger - self.if_exists = if_exists - self.cascade = cascade + trigger: Trigger + if_exists: bool = False + cascade: bool = False # noinspection PyUnusedLocal @@ -411,48 +388,37 @@ def visit_drop_trigger(element: DropTrigger, compiler: Compiled, **kw: t.Any) -> opt_drop_behavior) +@dataclass class View(schema.DDLElement): - def __init__( - self, - name: str, - query: SelectBase, - column_names: t.Sequence[str] = None, - temporary: bool = False, - view_options: t.Mapping[str, t.Any] = None, - check_option: t.Literal["local", "cascaded"] | None = None, - materialized: bool = False, - ) -> None: - """DDL Element representing a VIEW - - :param name: The name of the view - :param query: the query it represents - :param column_names: - :param temporary: - :param view_options: Must be something that can be passed to - OrderedDict, so a simple dict suffices. - :param check_option: Must be one of ``None``, ``'local'``, - ``'cascaded'``. - :param materialized: Is materialized view - """ - self.name = name - self.query = query - self.table = table(name) - self.temporary = temporary - self.column_names = column_names + #: The name of the view + name: str + #: the query it represents + query: SelectBase + column_names: t.Sequence[str] = None + temporary: bool = False + #: Must be something that can be passed to OrderedDict, so a simple dict suffices. + view_options: t.Mapping[str, t.Any] = None + #: Must be one of ``None``, ``'local'``, ``'cascaded'``. + check_option: t.Literal["local", "cascaded"] | None = None + #: Is materialized view + materialized: bool = False + + table: Table = field(init=False) + + def __post_init__(self) -> None: + self.table = table(self.name) self._init_table_columns() - if view_options is None: - view_options = OrderedDict() + if self.view_options is None: + self.view_options = OrderedDict() else: - view_options = OrderedDict(view_options) - self.view_options = view_options - if check_option not in (None, 'local', 'cascaded'): + self.view_options = OrderedDict(self.view_options) + + if self.check_option not in (None, "local", "cascaded"): raise ValueError("check_option must be either None, 'local', or " "'cascaded'") - if check_option is not None and 'check_option' in view_options: + if self.check_option is not None and "check_option" in self.view_options: raise ValueError('Parameter "check_option" specified more than ' 'once') - self.check_option = check_option - self.materialized = materialized def _init_table_columns(self): if self.column_names is not None: @@ -479,19 +445,22 @@ def refresh(self, concurrently=False): _con = "CONCURRENTLY " if concurrently else "" session.execute(text("REFRESH MATERIALIZED VIEW " + _con + self.name)) + def __hash__(self): + return hash(self.name) + +@dataclass(unsafe_hash=True) class CreateView(schema.DDLElement): - def __init__(self, view: View, or_replace: bool = False, if_not_exists: bool = False) -> None: - self.view = view - self.or_replace = or_replace - self.if_not_exists = if_not_exists + view: View + or_replace: bool = False + if_not_exists: bool = False +@dataclass(unsafe_hash=True) class DropView(schema.DDLElement): - def __init__(self, view: View, if_exists: bool = False, cascade: bool = False) -> None: - self.view = view - self.if_exists = if_exists - self.cascade = cascade + view: View + if_exists: bool = False + cascade: bool = False # noinspection PyUnusedLocal From 0984c1ebfb5a3f8178b7ed006736612e5299280c Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Tue, 9 Jul 2024 19:04:20 +0200 Subject: [PATCH 14/49] docs: fix some sphinx warnings Some mis-attribution of things as `hybrid_property` caused the sphinx lookup of the respective attributes on the class to fail. --- doc/guides/setup.rst | 1 + pycroft/model/finance.py | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/doc/guides/setup.rst b/doc/guides/setup.rst index ddfa52faf..da2b9b05d 100644 --- a/doc/guides/setup.rst +++ b/doc/guides/setup.rst @@ -40,6 +40,7 @@ you only need to do the following: #. Set up a virtual environment .. code:: shell + uv venv uv pip sync requirements.dev.txt && uv pip install -e deps/wtforms-widgets -e '.[dev]' diff --git a/pycroft/model/finance.py b/pycroft/model/finance.py index 8a26afb57..441dec273 100644 --- a/pycroft/model/finance.py +++ b/pycroft/model/finance.py @@ -145,7 +145,7 @@ def balance(cls) -> ColumnElement[int]: .where(Split.account_id == cls.id)\ .label("balance") - @hybrid_property + @property def in_default_days(self): first_overdue = False split_sum = 0 @@ -372,18 +372,23 @@ def _balance(self) -> Decimal: @_balance.expression def balance(cls) -> Select[tuple[Decimal]]: - return select( - [func.coalesce(func.sum(BankAccountActivity.amount), 0)] - ).where( - BankAccountActivity.bank_account_id == cls.id - ).label("balance") + return ( + select(func.coalesce(func.sum(BankAccountActivity.amount), 0)) + .where(BankAccountActivity.bank_account_id == cls.id) + .label("balance") + ) - @hybrid_property + @property def last_imported_at(self) -> DateTimeTz: - return object_session(self).execute( - select(func.max(BankAccountActivity.imported_at)) - .where(BankAccountActivity.bank_account_id == self.id) - ).fetchone()[0] + return ( + object_session(self) + .execute( + select(func.max(BankAccountActivity.imported_at)).where( + BankAccountActivity.bank_account_id == self.id + ) + ) + .fetchone()[0] + ) class BankAccountActivity(IntegerIdModel): From 65ef7c6d446cc2cb0bd12283144f4b3e224bf87e Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 10 Jul 2024 16:47:21 +0200 Subject: [PATCH 15/49] docs: update sphinx to v7 and add some helpful extensions --- doc/_templates/logo-text.html | 2 +- doc/conf.py | 3 + pyproject.toml | 4 +- requirements.dev.txt | 233 +++++++++++++++++++++++++++++++++- 4 files changed, 235 insertions(+), 7 deletions(-) diff --git a/doc/_templates/logo-text.html b/doc/_templates/logo-text.html index 242407e20..95dcc3068 100644 --- a/doc/_templates/logo-text.html +++ b/doc/_templates/logo-text.html @@ -1,4 +1,4 @@ diff --git a/doc/conf.py b/doc/conf.py index 0e27c587d..7cbf800c4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -30,6 +30,8 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ + "sphinx_toolbox.more_autodoc.augment_defaults", + "sphinx_toolbox.more_autodoc.regex", 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', @@ -40,6 +42,7 @@ "sphinx_paramlinks", "sphinxcontrib.fulltoc", "sphinxcontrib.autohttp.flask", + "sphinxcontrib.mermaid", ] # Add any paths that contain templates here, relative to this directory. diff --git a/pyproject.toml b/pyproject.toml index 8b6532eab..b745f107b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,10 +84,12 @@ dev = [ "pytest-timeout ~= 2.1.0", # required for pycharm „run with coverage“ reporting "ruff ~= 0.3.2", - "sphinx ~= 5.1.1", + "sphinx ~= 7.3.7", "sphinx-autobuild ~= 2021.3.14", + "sphinx-toolbox ~= 3.7.0", "sphinxcontrib-fulltoc ~= 1.2.0", "sphinxcontrib-httpdomain ~= 1.8.0", + "sphinxcontrib-mermaid ~= 0.9.2", "sphinx-paramlinks ~= 0.6.0", "types-jsonschema ~= 4.3.0", "types-netaddr ~= 1.3.0", diff --git a/requirements.dev.txt b/requirements.dev.txt index b733abf98..418a13258 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -105,6 +105,14 @@ annotated-types==0.6.0 \ --hash=sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43 \ --hash=sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d # via pydantic +apeye==1.4.1 \ + --hash=sha256:14ea542fad689e3bfdbda2189a354a4908e90aee4bf84c15ab75d68453d76a36 \ + --hash=sha256:44e58a9104ec189bf42e76b3a7fe91e2b2879d96d48e9a77e5e32ff699c9204e + # via sphinx-toolbox +apeye-core==1.1.5 \ + --hash=sha256:5de72ed3d00cc9b20fea55e54b7ab8f5ef8500eb33a5368bc162a5585e238a55 \ + --hash=sha256:dc27a93f8c9e246b3b238c5ea51edf6115ab2618ef029b9f2d9a190ec8228fbf + # via apeye attrs==23.2.0 \ --hash=sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30 \ --hash=sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1 @@ -112,12 +120,20 @@ attrs==23.2.0 \ # aiohttp # jsonschema # pytest +autodocsumm==0.2.12 \ + --hash=sha256:848fe8c38df433c6635489499b969cb47cc389ed3d7b6e75c8ccbc94d4b3bf9e \ + --hash=sha256:b842b53c686c07a4f174721ca4e729b027367703dbf42e2508863a3c6d6c049c + # via sphinx-toolbox babel==2.14.0 \ --hash=sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363 \ --hash=sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287 # via # flask-babel # sphinx +beautifulsoup4==4.12.3 \ + --hash=sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051 \ + --hash=sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed + # via sphinx-toolbox billiard==3.6.4.0 \ --hash=sha256:299de5a8da28a783d51b197d496bef4f1595dd023a93a4f59dde1886ae905547 \ --hash=sha256:87103ea78fa6ab4d5c751c4909bcff74617d985de7fa8b672cf8618afd5a875b @@ -132,6 +148,10 @@ blinker==1.7.0 \ # via # flask # sentry-sdk +cachecontrol==0.14.0 \ + --hash=sha256:7db1195b41c81f8274a7bbd97c956f44e8348265a1bc7641c37dfebc39f0c938 \ + --hash=sha256:f5bf3f0620c38db2e5122c0726bdebb0d16869de966ea6a2befe92470b740ea0 + # via sphinx-toolbox celery==5.2.7 \ --hash=sha256:138420c020cd58d6707e6257b6beda91fd39af7afde5d36c6334d175302c0e14 \ --hash=sha256:fafbd82934d30f8a004f81e8f7a062e31413a23d444be8ee3326553915958c6d @@ -313,6 +333,14 @@ coverage==6.5.0 \ --hash=sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84 \ --hash=sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987 # via pytest-cov +cssutils==2.11.1 \ + --hash=sha256:0563a76513b6af6eebbe788c3bf3d01c920e46b3f90c8416738c5cfc773ff8e2 \ + --hash=sha256:a67bfdfdff4f3867fab43698ec4897c1a828eca5973f4073321b3bccaf1199b1 + # via dict2css +dict2css==0.3.0.post1 \ + --hash=sha256:89c544c21c4ca7472c3fffb9d37d3d926f606329afdb751dc1de67a411b70719 \ + --hash=sha256:f006a6b774c3e31869015122ae82c491fd25e7de4a75607a62aa3e798f837e0d + # via sphinx-toolbox dnspython==2.6.1 \ --hash=sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50 \ --hash=sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc @@ -323,6 +351,17 @@ docutils==0.19 \ # via # sphinx # sphinx-paramlinks + # sphinx-prompt + # sphinx-tabs + # sphinx-toolbox +domdf-python-tools==3.9.0 \ + --hash=sha256:1f8a96971178333a55e083e35610d7688cd7620ad2b99790164e1fc1a3614c18 \ + --hash=sha256:4e1ef365cbc24627d6d1e90cf7d46d8ab8df967e1237f4a26885f6986c78872e + # via + # apeye + # apeye-core + # dict2css + # sphinx-toolbox elementpath==4.4.0 \ --hash=sha256:cda092281afe508ece1bf65373905b30196c9426f3730cfea46059e103a131bd \ --hash=sha256:dfc4b8ca3d87966dcb0df40b5b6d04a98f053683271930fad9e7fa000924dfb2 @@ -337,6 +376,12 @@ faker==24.7.1 \ --hash=sha256:39d34c63f0d62ed574161e23fe32008917b923d18098ce94c2650fe16463b7d5 \ --hash=sha256:73f2bd886e8ce751e660c7d37a6c0a128aab5e1551359335bb79cfea0f4fabfc # via factory-boy +filelock==3.15.4 \ + --hash=sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb \ + --hash=sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7 + # via + # cachecontrol + # sphinx-toolbox fints==3.1.0 \ --hash=sha256:426f6af1a79dce75ef9d475da926c8fc407c1bb3da13acf9fb52f5f0449b58d8 \ --hash=sha256:f4fb814f26d447257249c3af24f8abbb2bf2726dbbb0ee0e1ad832a9a010b487 @@ -514,10 +559,15 @@ greenlet==3.0.3 \ --hash=sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33 # via sqlalchemy guzzle-sphinx-theme @ git+https://github.com/agdsn/guzzle_sphinx_theme.git@977d49fcbdf2b3df9660d813d4b33369391923e1 +html5lib==1.1 \ + --hash=sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d \ + --hash=sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f + # via sphinx-toolbox idna==3.7 \ --hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \ --hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0 # via + # apeye-core # email-validator # requests # yarl @@ -542,6 +592,7 @@ jinja2==3.1.4 \ # flask # flask-babel # sphinx + # sphinx-jinja2-compat jsonschema==3.2.0 \ --hash=sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163 \ --hash=sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a @@ -628,6 +679,7 @@ markupsafe==2.1.5 \ # jinja2 # mako # sentry-sdk + # sphinx-jinja2-compat # werkzeug # wtforms # wtforms-widgets @@ -635,6 +687,68 @@ marshmallow==3.20.2 \ --hash=sha256:4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd \ --hash=sha256:c21d4b98fee747c130e6bc8f45c4b3199ea66bc00c12ee1f639f0aeca034d5e9 # via webargs +more-itertools==10.3.0 \ + --hash=sha256:e5d93ef411224fbcef366a6e8ddc4c5781bc6359d43412a65dd5964e46111463 \ + --hash=sha256:ea6a02e24a9161e51faad17a8782b92a0df82c12c1c8886fec7f0c3fa1a1b320 + # via cssutils +msgpack==1.0.8 \ + --hash=sha256:00e073efcba9ea99db5acef3959efa45b52bc67b61b00823d2a1a6944bf45982 \ + --hash=sha256:0726c282d188e204281ebd8de31724b7d749adebc086873a59efb8cf7ae27df3 \ + --hash=sha256:0ceea77719d45c839fd73abcb190b8390412a890df2f83fb8cf49b2a4b5c2f40 \ + --hash=sha256:114be227f5213ef8b215c22dde19532f5da9652e56e8ce969bf0a26d7c419fee \ + --hash=sha256:13577ec9e247f8741c84d06b9ece5f654920d8365a4b636ce0e44f15e07ec693 \ + --hash=sha256:1876b0b653a808fcd50123b953af170c535027bf1d053b59790eebb0aeb38950 \ + --hash=sha256:1ab0bbcd4d1f7b6991ee7c753655b481c50084294218de69365f8f1970d4c151 \ + --hash=sha256:1cce488457370ffd1f953846f82323cb6b2ad2190987cd4d70b2713e17268d24 \ + --hash=sha256:26ee97a8261e6e35885c2ecd2fd4a6d38252246f94a2aec23665a4e66d066305 \ + --hash=sha256:3528807cbbb7f315bb81959d5961855e7ba52aa60a3097151cb21956fbc7502b \ + --hash=sha256:374a8e88ddab84b9ada695d255679fb99c53513c0a51778796fcf0944d6c789c \ + --hash=sha256:376081f471a2ef24828b83a641a02c575d6103a3ad7fd7dade5486cad10ea659 \ + --hash=sha256:3923a1778f7e5ef31865893fdca12a8d7dc03a44b33e2a5f3295416314c09f5d \ + --hash=sha256:4916727e31c28be8beaf11cf117d6f6f188dcc36daae4e851fee88646f5b6b18 \ + --hash=sha256:493c5c5e44b06d6c9268ce21b302c9ca055c1fd3484c25ba41d34476c76ee746 \ + --hash=sha256:505fe3d03856ac7d215dbe005414bc28505d26f0c128906037e66d98c4e95868 \ + --hash=sha256:5845fdf5e5d5b78a49b826fcdc0eb2e2aa7191980e3d2cfd2a30303a74f212e2 \ + --hash=sha256:5c330eace3dd100bdb54b5653b966de7f51c26ec4a7d4e87132d9b4f738220ba \ + --hash=sha256:5dbf059fb4b7c240c873c1245ee112505be27497e90f7c6591261c7d3c3a8228 \ + --hash=sha256:5e390971d082dba073c05dbd56322427d3280b7cc8b53484c9377adfbae67dc2 \ + --hash=sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273 \ + --hash=sha256:64d0fcd436c5683fdd7c907eeae5e2cbb5eb872fafbc03a43609d7941840995c \ + --hash=sha256:69284049d07fce531c17404fcba2bb1df472bc2dcdac642ae71a2d079d950653 \ + --hash=sha256:6a0e76621f6e1f908ae52860bdcb58e1ca85231a9b0545e64509c931dd34275a \ + --hash=sha256:73ee792784d48aa338bba28063e19a27e8d989344f34aad14ea6e1b9bd83f596 \ + --hash=sha256:74398a4cf19de42e1498368c36eed45d9528f5fd0155241e82c4082b7e16cffd \ + --hash=sha256:7938111ed1358f536daf311be244f34df7bf3cdedb3ed883787aca97778b28d8 \ + --hash=sha256:82d92c773fbc6942a7a8b520d22c11cfc8fd83bba86116bfcf962c2f5c2ecdaa \ + --hash=sha256:83b5c044f3eff2a6534768ccfd50425939e7a8b5cf9a7261c385de1e20dcfc85 \ + --hash=sha256:8db8e423192303ed77cff4dce3a4b88dbfaf43979d280181558af5e2c3c71afc \ + --hash=sha256:9517004e21664f2b5a5fd6333b0731b9cf0817403a941b393d89a2f1dc2bd836 \ + --hash=sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3 \ + --hash=sha256:99881222f4a8c2f641f25703963a5cefb076adffd959e0558dc9f803a52d6a58 \ + --hash=sha256:9ee32dcb8e531adae1f1ca568822e9b3a738369b3b686d1477cbc643c4a9c128 \ + --hash=sha256:a22e47578b30a3e199ab067a4d43d790249b3c0587d9a771921f86250c8435db \ + --hash=sha256:b5505774ea2a73a86ea176e8a9a4a7c8bf5d521050f0f6f8426afe798689243f \ + --hash=sha256:bd739c9251d01e0279ce729e37b39d49a08c0420d3fee7f2a4968c0576678f77 \ + --hash=sha256:d16a786905034e7e34098634b184a7d81f91d4c3d246edc6bd7aefb2fd8ea6ad \ + --hash=sha256:d3420522057ebab1728b21ad473aa950026d07cb09da41103f8e597dfbfaeb13 \ + --hash=sha256:d56fd9f1f1cdc8227d7b7918f55091349741904d9520c65f0139a9755952c9e8 \ + --hash=sha256:d661dc4785affa9d0edfdd1e59ec056a58b3dbb9f196fa43587f3ddac654ac7b \ + --hash=sha256:dfe1f0f0ed5785c187144c46a292b8c34c1295c01da12e10ccddfc16def4448a \ + --hash=sha256:e1dd7839443592d00e96db831eddb4111a2a81a46b028f0facd60a09ebbdd543 \ + --hash=sha256:e2872993e209f7ed04d963e4b4fbae72d034844ec66bc4ca403329db2074377b \ + --hash=sha256:e2f879ab92ce502a1e65fce390eab619774dda6a6ff719718069ac94084098ce \ + --hash=sha256:e3aa7e51d738e0ec0afbed661261513b38b3014754c9459508399baf14ae0c9d \ + --hash=sha256:e532dbd6ddfe13946de050d7474e3f5fb6ec774fbb1a188aaf469b08cf04189a \ + --hash=sha256:e6b7842518a63a9f17107eb176320960ec095a8ee3b4420b5f688e24bf50c53c \ + --hash=sha256:e75753aeda0ddc4c28dce4c32ba2f6ec30b1b02f6c0b14e547841ba5b24f753f \ + --hash=sha256:eadb9f826c138e6cf3c49d6f8de88225a3c0ab181a9b4ba792e006e5292d150e \ + --hash=sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011 \ + --hash=sha256:ef254a06bcea461e65ff0373d8a0dd1ed3aa004af48839f002a0c994a6f72d04 \ + --hash=sha256:f3709997b228685fe53e8c433e2df9f0cdb5f4542bd5114ed17ac3c0129b0480 \ + --hash=sha256:f51bab98d52739c50c56658cc303f190785f9a2cd97b823357e7aeae54c8f68a \ + --hash=sha256:f9904e24646570539a8950400602d66d2b2c492b9010ea7e965025cb71d0c86d \ + --hash=sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d + # via cachecontrol mt-940==4.19.0 \ --hash=sha256:5d109e8dc4b490a4b92ec0153713710eb067b36b350ce1ff60c406afddc7d3cd \ --hash=sha256:cb0da41f6be6c6da1116d1e8284b2bf0eeee1d684e3a36b2e4add601d1fd7113 @@ -765,6 +879,10 @@ mypy-extensions==1.0.0 \ --hash=sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d \ --hash=sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782 # via mypy +natsort==8.4.0 \ + --hash=sha256:45312c4a0e5507593da193dedd04abb1469253b601ecaf63445ad80f0a1ea581 \ + --hash=sha256:4732914fb471f56b5cce04d7bae6f164a592c7712e1c85f9ef585e197299521c + # via domdf-python-tools netaddr==1.3.0 \ --hash=sha256:5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a \ --hash=sha256:c2c6a8ebe5554ce33b7d5b3a306b71bbb373e000bbbf2350dd5213cc56e3dbbe @@ -850,6 +968,10 @@ pillow==10.3.0 \ --hash=sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27 \ --hash=sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a # via reportlab +platformdirs==4.2.2 \ + --hash=sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee \ + --hash=sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3 + # via apeye pluggy==1.4.0 \ --hash=sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981 \ --hash=sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be @@ -1056,7 +1178,10 @@ pydot==1.4.2 \ pygments==2.17.2 \ --hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \ --hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367 - # via sphinx + # via + # sphinx + # sphinx-prompt + # sphinx-tabs pyinstrument==4.2.0 \ --hash=sha256:045f3cdbed3d6827567256ed3c8759ea3a2cb2e2d50036905df39727cf411354 \ --hash=sha256:062c7727aea1428ea4becab90d7aa49f8489cc29da57abaa09edef9bcfb8aafb \ @@ -1212,8 +1337,66 @@ requests==2.32.2 \ --hash=sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289 \ --hash=sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c # via + # apeye + # cachecontrol # fints # sphinx +ruamel-yaml==0.18.6 \ + --hash=sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636 \ + --hash=sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b + # via sphinx-toolbox +ruamel-yaml-clib==0.2.8 \ + --hash=sha256:024cfe1fc7c7f4e1aff4a81e718109e13409767e4f871443cbff3dba3578203d \ + --hash=sha256:03d1162b6d1df1caa3a4bd27aa51ce17c9afc2046c31b0ad60a0a96ec22f8001 \ + --hash=sha256:07238db9cbdf8fc1e9de2489a4f68474e70dffcb32232db7c08fa61ca0c7c462 \ + --hash=sha256:09b055c05697b38ecacb7ac50bdab2240bfca1a0c4872b0fd309bb07dc9aa3a9 \ + --hash=sha256:1707814f0d9791df063f8c19bb51b0d1278b8e9a2353abbb676c2f685dee6afe \ + --hash=sha256:1758ce7d8e1a29d23de54a16ae867abd370f01b5a69e1a3ba75223eaa3ca1a1b \ + --hash=sha256:184565012b60405d93838167f425713180b949e9d8dd0bbc7b49f074407c5a8b \ + --hash=sha256:1b617618914cb00bf5c34d4357c37aa15183fa229b24767259657746c9077615 \ + --hash=sha256:1dc67314e7e1086c9fdf2680b7b6c2be1c0d8e3a8279f2e993ca2a7545fecf62 \ + --hash=sha256:25ac8c08322002b06fa1d49d1646181f0b2c72f5cbc15a85e80b4c30a544bb15 \ + --hash=sha256:25c515e350e5b739842fc3228d662413ef28f295791af5e5110b543cf0b57d9b \ + --hash=sha256:305889baa4043a09e5b76f8e2a51d4ffba44259f6b4c72dec8ca56207d9c6fe1 \ + --hash=sha256:3213ece08ea033eb159ac52ae052a4899b56ecc124bb80020d9bbceeb50258e9 \ + --hash=sha256:3f215c5daf6a9d7bbed4a0a4f760f3113b10e82ff4c5c44bec20a68c8014f675 \ + --hash=sha256:46d378daaac94f454b3a0e3d8d78cafd78a026b1d71443f4966c696b48a6d899 \ + --hash=sha256:4ecbf9c3e19f9562c7fdd462e8d18dd902a47ca046a2e64dba80699f0b6c09b7 \ + --hash=sha256:53a300ed9cea38cf5a2a9b069058137c2ca1ce658a874b79baceb8f892f915a7 \ + --hash=sha256:56f4252222c067b4ce51ae12cbac231bce32aee1d33fbfc9d17e5b8d6966c312 \ + --hash=sha256:5c365d91c88390c8d0a8545df0b5857172824b1c604e867161e6b3d59a827eaa \ + --hash=sha256:700e4ebb569e59e16a976857c8798aee258dceac7c7d6b50cab63e080058df91 \ + --hash=sha256:75e1ed13e1f9de23c5607fe6bd1aeaae21e523b32d83bb33918245361e9cc51b \ + --hash=sha256:77159f5d5b5c14f7c34073862a6b7d34944075d9f93e681638f6d753606c6ce6 \ + --hash=sha256:7f67a1ee819dc4562d444bbafb135832b0b909f81cc90f7aa00260968c9ca1b3 \ + --hash=sha256:840f0c7f194986a63d2c2465ca63af8ccbbc90ab1c6001b1978f05119b5e7334 \ + --hash=sha256:84b554931e932c46f94ab306913ad7e11bba988104c5cff26d90d03f68258cd5 \ + --hash=sha256:87ea5ff66d8064301a154b3933ae406b0863402a799b16e4a1d24d9fbbcbe0d3 \ + --hash=sha256:955eae71ac26c1ab35924203fda6220f84dce57d6d7884f189743e2abe3a9fbe \ + --hash=sha256:a1a45e0bb052edf6a1d3a93baef85319733a888363938e1fc9924cb00c8df24c \ + --hash=sha256:a5aa27bad2bb83670b71683aae140a1f52b0857a2deff56ad3f6c13a017a26ed \ + --hash=sha256:a6a9ffd280b71ad062eae53ac1659ad86a17f59a0fdc7699fd9be40525153337 \ + --hash=sha256:a75879bacf2c987c003368cf14bed0ffe99e8e85acfa6c0bfffc21a090f16880 \ + --hash=sha256:aa2267c6a303eb483de8d02db2871afb5c5fc15618d894300b88958f729ad74f \ + --hash=sha256:aab7fd643f71d7946f2ee58cc88c9b7bfc97debd71dcc93e03e2d174628e7e2d \ + --hash=sha256:b16420e621d26fdfa949a8b4b47ade8810c56002f5389970db4ddda51dbff248 \ + --hash=sha256:b42169467c42b692c19cf539c38d4602069d8c1505e97b86387fcf7afb766e1d \ + --hash=sha256:bba64af9fa9cebe325a62fa398760f5c7206b215201b0ec825005f1b18b9bccf \ + --hash=sha256:beb2e0404003de9a4cab9753a8805a8fe9320ee6673136ed7f04255fe60bb512 \ + --hash=sha256:bef08cd86169d9eafb3ccb0a39edb11d8e25f3dae2b28f5c52fd997521133069 \ + --hash=sha256:c2a72e9109ea74e511e29032f3b670835f8a59bbdc9ce692c5b4ed91ccf1eedb \ + --hash=sha256:c58ecd827313af6864893e7af0a3bb85fd529f862b6adbefe14643947cfe2942 \ + --hash=sha256:c69212f63169ec1cfc9bb44723bf2917cbbd8f6191a00ef3410f5a7fe300722d \ + --hash=sha256:cabddb8d8ead485e255fe80429f833172b4cadf99274db39abc080e068cbcc31 \ + --hash=sha256:d176b57452ab5b7028ac47e7b3cf644bcfdc8cacfecf7e71759f7f51a59e5c92 \ + --hash=sha256:da09ad1c359a728e112d60116f626cc9f29730ff3e0e7db72b9a2dbc2e4beed5 \ + --hash=sha256:e2b4c44b60eadec492926a7270abb100ef9f72798e18743939bdbf037aab8c28 \ + --hash=sha256:e79e5db08739731b0ce4850bed599235d601701d5694c36570a99a0c5ca41a9d \ + --hash=sha256:ebc06178e8821efc9692ea7544aa5644217358490145629914d8020042c24aa1 \ + --hash=sha256:edaef1c1200c4b4cb914583150dcaa3bc30e592e907c01117c08b13a07255ec2 \ + --hash=sha256:f481f16baec5290e45aebdc2a5168ebc6d35189ae6fea7a58787613a25f6e875 \ + --hash=sha256:fff3573c2db359f091e1589c3d7c5fc2f86f5bdb6f24252c2d8e539d4e45f412 + # via ruamel-yaml ruff==0.3.5 \ --hash=sha256:122de171a147c76ada00f76df533b54676f6e321e61bd8656ae54be326c10296 \ --hash=sha256:3a05f3793ba25f194f395578579c546ca5d83e0195f992edc32e5907d142bfa3 \ @@ -1259,6 +1442,7 @@ six==1.16.0 \ # via # bleach # flask-restful + # html5lib # jsonschema # livereload # python-dateutil @@ -1271,19 +1455,47 @@ snowballstemmer==2.2.0 \ --hash=sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1 \ --hash=sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a # via sphinx -sphinx==5.1.1 \ - --hash=sha256:309a8da80cb6da9f4713438e5b55861877d5d7976b69d87e336733637ea12693 \ - --hash=sha256:ba3224a4e206e1fbdecf98a4fae4992ef9b24b85ebf7b584bb340156eaf08d89 +soupsieve==2.5 \ + --hash=sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690 \ + --hash=sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7 + # via beautifulsoup4 +sphinx==7.3.7 \ + --hash=sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3 \ + --hash=sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc # via + # autodocsumm # guzzle-sphinx-theme # sphinx-autobuild + # sphinx-autodoc-typehints # sphinx-paramlinks + # sphinx-prompt + # sphinx-tabs + # sphinx-toolbox # sphinxcontrib-httpdomain sphinx-autobuild==2021.3.14 \ --hash=sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac \ --hash=sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05 +sphinx-autodoc-typehints==2.2.2 \ + --hash=sha256:128e600eeef63b722f3d8dac6403594592c8cade3ba66fd11dcb997465ee259d \ + --hash=sha256:b98337a8530c95b73ba0c65465847a8ab0a13403bdc81294d5ef396bbd1f783e + # via sphinx-toolbox +sphinx-jinja2-compat==0.3.0 \ + --hash=sha256:b1e4006d8e1ea31013fa9946d1b075b0c8d2a42c6e3425e63542c1e9f8be9084 \ + --hash=sha256:f3c1590b275f42e7a654e081db5e3e5fb97f515608422bde94015ddf795dfe7c + # via sphinx-toolbox sphinx-paramlinks==0.6.0 \ --hash=sha256:746a0816860aa3fff5d8d746efcbec4deead421f152687411db1d613d29f915e +sphinx-prompt==1.8.0 \ + --hash=sha256:369ecc633f0711886f9b3a078c83264245be1adf46abeeb9b88b5519e4b51007 \ + --hash=sha256:47482f86fcec29662fdfd23e7c04ef03582714195d01f5d565403320084372ed + # via sphinx-toolbox +sphinx-tabs==3.4.5 \ + --hash=sha256:92cc9473e2ecf1828ca3f6617d0efc0aa8acb06b08c56ba29d1413f2f0f6cf09 \ + --hash=sha256:ba9d0c1e3e37aaadd4b5678449eb08176770e0fc227e769b6ce747df3ceea531 + # via sphinx-toolbox +sphinx-toolbox==3.7.0 \ + --hash=sha256:045db70e6d73241ff0b922f2e76597e2cc4904dbabef9fc6f3a46718b0e48d51 \ + --hash=sha256:9ea800fb6b2ecc5f382ab3547b415029fe9603b0b7eeb4c15c5da77c1eb5f21a sphinxcontrib-applehelp==1.0.8 \ --hash=sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619 \ --hash=sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4 @@ -1305,6 +1517,9 @@ sphinxcontrib-jsmath==1.0.1 \ --hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178 \ --hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8 # via sphinx +sphinxcontrib-mermaid==0.9.2 \ + --hash=sha256:252ef13dd23164b28f16d8b0205cf184b9d8e2b714a302274d9f59eb708e77af \ + --hash=sha256:6795a72037ca55e65663d2a2c1a043d636dc3d30d418e56dd6087d1459d98a5d sphinxcontrib-qthelp==1.0.7 \ --hash=sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6 \ --hash=sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182 @@ -1366,6 +1581,10 @@ sqlalchemy==2.0.29 \ # via # alembic # wtforms-sqlalchemy +tabulate==0.9.0 \ + --hash=sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c \ + --hash=sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f + # via sphinx-toolbox text-unidecode==1.3 \ --hash=sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8 \ --hash=sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93 @@ -1400,9 +1619,11 @@ typing-extensions==4.11.0 \ --hash=sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0 \ --hash=sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a # via + # domdf-python-tools # mypy # pydantic # pydantic-core + # sphinx-toolbox # sqlalchemy urllib3==2.2.2 \ --hash=sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472 \ @@ -1456,7 +1677,9 @@ webargs==8.3.0 \ webencodings==0.5.1 \ --hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \ --hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 - # via bleach + # via + # bleach + # html5lib werkzeug==3.0.3 \ --hash=sha256:097e5bfda9f0aba8da6b8545146def481d06aa7d3266e7448e2cccf67dd8bd18 \ --hash=sha256:fc9645dc43e03e4d630d23143a04a7f947a9a3b5727cd535fdfe155a17cc48c8 From 497ab62de8dbe3bb62963218efa57d3876e2e161 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 10 Jul 2024 16:49:01 +0200 Subject: [PATCH 16/49] Document tombstone model --- doc/api/pycroft.model.rst | 1 + pycroft/model/ddl.py | 2 +- pycroft/model/unix_account.py | 173 ++++++++++++++++++++++++---------- pycroft/model/user.py | 1 + 4 files changed, 127 insertions(+), 50 deletions(-) diff --git a/doc/api/pycroft.model.rst b/doc/api/pycroft.model.rst index 3bea48a37..d712b4dde 100644 --- a/doc/api/pycroft.model.rst +++ b/doc/api/pycroft.model.rst @@ -28,5 +28,6 @@ pycroft.model .. automodule:: pycroft.model.task_serialization .. automodule:: pycroft.model.traffic .. automodule:: pycroft.model.types +.. automodule:: pycroft.model.unix_account .. automodule:: pycroft.model.user .. automodule:: pycroft.model.webstorage diff --git a/pycroft/model/ddl.py b/pycroft/model/ddl.py index 7ae4df8ef..a439fbf6c 100644 --- a/pycroft/model/ddl.py +++ b/pycroft/model/ddl.py @@ -111,7 +111,7 @@ class Function(schema.DDLElement): #: Return type rtype: str #: Definition - definition: LazilyComiledDefDescriptor = LazilyComiledDefDescriptor() + definition: LazilyComiledDefDescriptor = field(default=LazilyComiledDefDescriptor(), repr=False) volatility: t.Literal["volatile", "stable", "immutable"] = "volatile" #: Function should be declared ``STRICT`` strict: bool = False diff --git a/pycroft/model/unix_account.py b/pycroft/model/unix_account.py index a94ac6975..f1a940e32 100644 --- a/pycroft/model/unix_account.py +++ b/pycroft/model/unix_account.py @@ -1,3 +1,12 @@ +""" + +pycroft.model.unix_account +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This module contains the :class:`UnixAccount` and :class:`UnixTombstone` classes. + + +""" from __future__ import annotations import typing as t from sqlalchemy import ( @@ -5,6 +14,7 @@ Column, ForeignKey, Index, + Integer, LargeBinary, Sequence, UniqueConstraint, @@ -46,9 +56,48 @@ class UnixAccount(IntegerIdModel): class UnixTombstone(ModelBase): - # mapped_column does not work yet for reference in `__mapper_args__`, unfortunately. - from sqlalchemy import Integer, String - + """A tombstone for uids and logins, preventing their re-use. + + A tombstone relates to a :class:`pycroft.model.user.User` and :class:`UnixAccount` + via three relationships, as depicted in the ER diagram below. + The hash is stored in the generated column + :attr:`User.login_hash `, + which has a foreign key on the :class:`Tombstone`. + Furthermore, the associated `UnixAccount` has a `uid`, + which also points to a :class:`Tombstone`. + + There is a trigger which checks that if both of these objects exist, + they point to the same tombstone. + + .. mermaid:: + + --- + title: Tombstone Consistency + config: + fontFamily: monospace + --- + erDiagram + User { + int unix_account_id + str login + str login_hash "generated always as digest(login, 'sha512')" + } + UnixAccount { + int id + int uid + } + UnixTombStone { + int uid + str login_hash + } + + User |o--o| UnixAccount: "user_unix_account_id_fkey" + User ||--o| UnixTombStone: "user_login_hash_fkey" + UnixAccount ||--o| UnixTombStone: "unix_account_uid_fkey" + + The lifecycle of a tombstone is restricted by + :attr:`check_unix_tombstone_lifecycle_func`. + """ uid: Mapped[int] = Column(Integer, unique=True) login_hash: Mapped[bytes] = Column(LargeBinary(512), unique=True) @@ -69,7 +118,6 @@ class UnixTombstone(ModelBase): ) __mapper_args__ = {"primary_key": (uid, login_hash)} # fake PKey for mapper - check_unix_tombstone_lifecycle_func = ddl.Function( name="check_unix_tombstone_lifecycle", arguments=[], @@ -90,6 +138,30 @@ class UnixTombstone(ModelBase): volatility="stable", language="plpgsql", ) +""" +Trigger function ensuring proper tombstone lifecycle (see :class:`UnixTombstone`). + +.. mermaid:: + + --- + title: Tombstone Lifecycle + config: + fontFamily: monospace + --- + stateDiagram-v2 + s0: ¬uid, ¬login_hash + s1: uid, ¬login_hash + s2: ¬uid, login_hash + s3: uid, login_hash + s0 --> s1: set uid + s0 --> s2: set login_hash + s1 --> s1 + s2 --> s2 + s1 --> s3: set login_hash + s2 --> s3: set uid + s3 --> s3 +""" + manager.add_function(UnixTombstone.__table__, check_unix_tombstone_lifecycle_func) manager.add_trigger( UnixTombstone.__table__, @@ -102,55 +174,49 @@ class UnixTombstone(ModelBase): ), ) -# unix account creation -manager.add_function( - User.__table__, - ddl.Function( - "unix_account_ensure_tombstone", - [], - "trigger", - # IF unix_account has a corresponding user - # THEN use that tombstone. - # However, in the scenario where the user's tombstone exists and points to a different uid, - # we throw an error instead. - """ - DECLARE - v_user "user"; - v_login_ts unix_tombstone; - v_ua_ts unix_tombstone; - BEGIN - select * into v_user from "user" u where u.unix_account_id = NEW.id; - select * into v_ua_ts from unix_tombstone ts where ts.uid = NEW.uid; - - select ts.* into v_login_ts from "user" u - join unix_tombstone ts on u.login_hash = ts.login_hash - where u.unix_account_id = NEW.id; - - -- scenarios: - -- 1) no user, no tombstone - -- 2) no user, tombstone - -- 3) user, no tombstone -> create - -- 4) user + tombstone - - IF v_user IS NULL THEN - IF v_ua_ts IS NULL THEN - insert into unix_tombstone (uid) values (NEW.uid); - END IF; - RETURN NEW; - END IF; - -- else: user not null +unix_account_ensure_tombstone_func = ddl.Function( + "unix_account_ensure_tombstone", + [], + "trigger", + """ + DECLARE + v_user "user"; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; + BEGIN + select * into v_user from "user" u where u.unix_account_id = NEW.id; + select * into v_ua_ts from unix_tombstone ts where ts.uid = NEW.uid; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on u.login_hash = ts.login_hash + where u.unix_account_id = NEW.id; + + IF v_user IS NULL THEN IF v_ua_ts IS NULL THEN - insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); + insert into unix_tombstone (uid) values (NEW.uid); END IF; - RETURN NEW; - END; - """, - volatility="volatile", - strict=True, - language="plpgsql", - ), + END IF; + + -- TODO we're missing: if we create a unix account, + -- but the user exists, then probably the tombstone _will already exist!_. + -- → missing test case: user not null, unix account null! + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); + END IF; + + RETURN NEW; + END; + """, + volatility="volatile", + strict=True, + language="plpgsql", ) +""" Trigger function ensuring automatic generation of a tombstone +on :class:`UnixAccount` inserts. +""" + +manager.add_function(User.__table__, unix_account_ensure_tombstone_func) manager.add_trigger( User.__table__, @@ -208,6 +274,9 @@ class UnixTombstone(ModelBase): strict=True, language="plpgsql", ) +""" Trigger function ensuring automatic generation of a tombstone +on :class:`User` updates. """ + manager.add_function(User.__table__, ensure_tombstone) @@ -283,6 +352,12 @@ class UnixTombstone(ModelBase): strict=True, language="plpgsql", ) +""" +Trigger function checking whether :class:`User` and associated :class:`UnixAccount` refer to the same :class:`Tombstone`. + +See :class:`Tombstone` for an illustration. +""" + manager.add_function(User.__table__, check_tombstone_consistency) manager.add_constraint_trigger( User.__table__, diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 1ae3f72fe..5c3ca9572 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -100,6 +100,7 @@ class BaseUser(IntegerIdModel): __abstract__ = True login: Mapped[str40] = mapped_column(unique=True) + #: Auto-generated sha512 hash of :attr:`login`. login_hash: Mapped[bytes] = Column(LargeBinary(512), Computed("digest(login, 'sha512')")) name: Mapped[str255] registered_at: Mapped[utc.DateTimeTz] From 81a05757c04f26961b71b32c7c7e41419ce811f2 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 10 Jul 2024 16:49:50 +0200 Subject: [PATCH 17/49] Add missing test cases --- tests/model/test_unix_tombstone.py | 34 +++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index 514895fd8..e39e3b598 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -11,7 +11,7 @@ from sqlalchemy.orm import Session from pycroft.model.user import User -from pycroft.model.unix_account import UnixTombstone +from pycroft.model.unix_account import UnixTombstone, UnixAccount from tests import factories as f @@ -182,6 +182,38 @@ def test_user_deletion(self, session, user): assert inspect(user).deleted, "user did not get deleted" assert inspect(ua).deleted, "unix_account did not get deleted" + def test_user_change_unix_account(self, session, user): + with pytest.raises(IntegrityError), session.begin_nested(): + ua = f.UnixAccountFactory() + user.unix_account = ua + session.add(user) + + +class TestUserNoUnixAccount: + @pytest.fixture(scope="class") + def user(self, class_session) -> User: + user = f.UserFactory() + class_session.flush() + return user + + def test_create_unix_account(self, session, user): + with session.begin_nested(): + ua = f.UnixAccountFactory() + user.unix_account = ua + session.add(user) + + +class TestUnixAccountNoUser: + @pytest.fixture(scope="class") + def unix_account(self, class_session) -> UnixAccount: + ua = f.UnixAccountFactory() + class_session.flush() + return ua + + def test_create_user(self, session, ua): + with pytest.raises(IntegrityError), session.begin_nested(): + session.add(f.UserFactory(unix_account=ua)) + class TestTombstoneLifeCycle: @pytest.fixture(scope="class") From 82c576aa4de38df19777f5e77a3f87b82a5212ff Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Thu, 11 Jul 2024 11:06:58 +0200 Subject: [PATCH 18/49] docs: remove nonexistent file `interval_base` Removed in 8d0028edf70c3740caa3d378bd726c07e7285131 --- doc/api/pycroft.model.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/api/pycroft.model.rst b/doc/api/pycroft.model.rst index d712b4dde..a0b8c00ff 100644 --- a/doc/api/pycroft.model.rst +++ b/doc/api/pycroft.model.rst @@ -17,7 +17,6 @@ pycroft.model .. automodule:: pycroft.model.functions .. automodule:: pycroft.model.hades .. automodule:: pycroft.model.host -.. automodule:: pycroft.model.interval_base .. automodule:: pycroft.model.logging .. automodule:: pycroft.model.net .. automodule:: pycroft.model.port From 8bb6f772070d5df126bb4d29845acbb7a34856de Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Thu, 11 Jul 2024 11:22:09 +0200 Subject: [PATCH 19/49] Fix some docs problems --- doc/guides/docker.rst | 1 + ldap_sync/sources/db.py | 5 +++-- pycroft/lib/user.py | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/guides/docker.rst b/doc/guides/docker.rst index f469d9180..6057d5898 100644 --- a/doc/guides/docker.rst +++ b/doc/guides/docker.rst @@ -7,6 +7,7 @@ Installing Docker and Docker Compose ------------------------------------ Prerequisites *nothing* + You need to install * `Docker-engine `__ ``≥19.03.0`` diff --git a/ldap_sync/sources/db.py b/ldap_sync/sources/db.py index 83f4a7819..405d9d68a 100644 --- a/ldap_sync/sources/db.py +++ b/ldap_sync/sources/db.py @@ -47,7 +47,7 @@ def _fetch_db_users( ) -> list[_UserProxyType]: """Fetch users to be synced, plus whether ``ldap_login_enabled`` is set. - If the `` ldap_login_enabled`` flag is not present, + If the ``ldap_login_enabled`` flag is not present, we interpret this as ``should_be_blocked``. :param session: The SQLAlchemy session to use @@ -199,7 +199,7 @@ class _PropertyProxyType(NamedTuple): def _fetch_db_properties(session: Session) -> list[_PropertyProxyType]: """Fetch the groups who should be synced. - Explicitly, this returns everything in :ref:`EXPORTED_PROPERTIES` together with + Explicitly, this returns everything in :data:`EXPORTED_PROPERTIES` together with the current users having the respective property as members. :param session: The SQLAlchemy session to use @@ -246,6 +246,7 @@ def fetch_db_properties( ) +#: The properties of a user we export to LDAP. EXPORTED_PROPERTIES = frozenset( [ "network_access", diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index ecbae27bf..71102fcf1 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -573,7 +573,7 @@ def edit_email( :param email_forwarded: Boolean if emails should be forwarded :param processor: User object of the processor, which issues the change :param is_confirmed: If the email address is already confirmed - :return:Changed user object + :return: Changed user object """ if not can_target(user, processor): @@ -623,8 +623,8 @@ def edit_birthdate(user: User, birthdate: date, processor: User) -> User: :param user: User object to change :param birthdate: New birthdate - :param processor:User object of the processor, which issues the change - :return:Changed user object + :param processor: User object of the processor, which issues the change + :return: Changed user object """ if not birthdate: From 7761b6598ea11feaeb5369e127aeef48ede9ec64 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Thu, 11 Jul 2024 11:22:20 +0200 Subject: [PATCH 20/49] docs: Use a different set of sphinx-toolbox tools regex and augment_defults produced broken rst output in some circumstances. autonamedtuple, while not rendering type hints very nicely, produces less verbose documentation for namedtuples, which is beneficial. --- doc/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 7cbf800c4..3c6cf492a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -30,8 +30,7 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - "sphinx_toolbox.more_autodoc.augment_defaults", - "sphinx_toolbox.more_autodoc.regex", + "sphinx_toolbox.more_autodoc.autonamedtuple", 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', From 664a2e6d5e71dbaa56fccce5332caef2257d3426 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 28 Aug 2024 11:44:48 +0200 Subject: [PATCH 21/49] Fix incorrecd docstring regarding `UnixAccount` creation in `move_in` --- pycroft/lib/user.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index 71102fcf1..cf4ecd27f 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -334,9 +334,14 @@ def move_in( ) -> User | UserTask: """Move in a user in a given room and do some initialization. - The user is given a new Host with an interface of the given mac, a - UnixAccount, a finance Account, and is made member of important - groups. Networking is set up. + The user is given a new Host with an interface of the given mac, + a finance Account, and is made member of important groups. + Networking is set up. + + Preconditions + ~~~~~~~~~~~~~ + + - User has a unix account. :param user: The user to move in :param building_id: @@ -344,7 +349,7 @@ def move_in( :param room_number: :param mac: The mac address of the users pc. :param processor: - :param birthdate: Date of birth` + :param birthdate: Date of birth :param host_annex: when true: if MAC already in use, annex host to new user :param begin_membership: Starts a membership if true From 2a6edb3b19a519f537520f1a23d34c739eb7b645 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 28 Aug 2024 11:50:08 +0200 Subject: [PATCH 22/49] Add missing cases to unix account consistency triggers --- pycroft/model/unix_account.py | 87 ++++++++++++++++++++++++------ pycroft/model/user.py | 7 ++- tests/model/test_unix_tombstone.py | 17 ++++-- 3 files changed, 91 insertions(+), 20 deletions(-) diff --git a/pycroft/model/unix_account.py b/pycroft/model/unix_account.py index f1a940e32..5b06de431 100644 --- a/pycroft/model/unix_account.py +++ b/pycroft/model/unix_account.py @@ -197,10 +197,9 @@ class UnixTombstone(ModelBase): END IF; RETURN NEW; END IF; + -- NOTE: v_user not null implies that we are in an UPDATE, not a CREATE, + -- because otherwise it would be impossible for an existing user to reference this UA. - -- TODO we're missing: if we create a unix account, - -- but the user exists, then probably the tombstone _will already exist!_. - -- → missing test case: user not null, unix account null! IF v_ua_ts IS NULL THEN insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); END IF; @@ -251,22 +250,81 @@ class UnixTombstone(ModelBase): join unix_tombstone ts on v_u_login_hash = ts.login_hash where u.id = NEW.id; - IF v_ua IS NULL THEN - IF v_login_ts IS NULL THEN - -- TODO check whether this was a _set_ or an _update_. - -- do we really want to automatically update this? - -- NOTE: when an update caused this, this might create an inconsistent state (different tombstones for uid and login), - -- however as soon as the check constraint fires the transaction will be aborted, anyway. - insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash) on conflict do nothing; + IF TG_OP = 'INSERT' THEN + IF not v_login_ts IS NULL THEN + RAISE EXCEPTION + 'User with login=%% already exists. Please choose a different login.', + NEW.login + USING ERRCODE = 'foreign_key_violation'; + END IF; + + IF v_ua IS NULL THEN + insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash); + -- on conflict: raise! want to prohibit re-use after all. + ELSE + IF v_ua_ts.login_hash IS NOT NULL AND v_ua_ts.login_hash != v_login_ts.login_hash THEN + RAISE EXCEPTION + 'Refusing to re-couple user (login=%%), which had a unix account in the past, ' + 'to a new unix-account (uid=%%). ' + 'Manually update the tombstones if you know what you are doing.', + NEW.login, v_ua.uid + USING ERRCODE = 'check_violation'; + END IF; + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua.uid; END IF; - -- ELSE: user tombstone exists, no need to do anything + RETURN NEW; + END IF; + + ------------ + -- UPDATE -- + ------------ + + IF NEW.unix_account_id = OLD.unix_account_id THEN + -- NOTE: this also means we _do nothing_ on a `login` update. + -- This is a conscious decision, because we want the SQL operator + -- to handle tombstones explicitly in this scenario. + RETURN NEW; + END IF; + + IF v_ua IS NULL THEN + -- this is an UPDATE user SET unix_account_id=null. Nothing to do. + RETURN NEW; + END IF; + + ----------------------- + -- User → UA exists; -- + ----------------------- + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + + IF NOT v_ua_ts.login_hash IS NULL AND v_ua_ts.login_hash <> v_u_login_hash THEN + RAISE EXCEPTION + 'Refusing to re-couple unix-account (uid=%%), which belonged to a user in the past, to another user (login=%%).' + 'Manually update the tombstones if you know what you are doing.', + v_ua.uid, NEW.login + USING ERRCODE = 'check_violation'; + END IF; + + ASSERT NOT v_login_ts IS NULL, 'existing user %% does not have a tombstone', NEW.login; + IF v_login_ts.uid IS NULL THEN + -- gonna update ua's tombstone, so let's throw away user's tombstone + set constraints user_login_hash_fkey deferred; + delete from unix_tombstone where login_hash = v_u_login_hash; + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; + set constraints user_login_hash_fkey immediate; ELSE - select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; - IF v_ua_ts.login_hash IS NULL THEN - update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; + -- this smells wrong: either they already share a tombstone, + -- or the user already _had_ a unix account! + IF NOT v_ua_ts.login_hash IS NULL AND v_ua_ts.login_hash != v_login_ts.login_hash THEN + RAISE EXCEPTION + 'Refusing to re-couple user (login=%%), which had a unix account in the past, ' + 'to a new unix-account (uid=%%). ' + 'Manually update the tombstones if you know what you are doing.', + NEW.login, v_ua.uid + USING ERRCODE = 'check_violation'; END IF; END IF; + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; RETURN NEW; END; """, @@ -285,7 +343,6 @@ class UnixTombstone(ModelBase): ddl.Trigger( "user_ensure_tombstone_trigger", User.__table__, - # TODO create different trigger on UPDATE which only fires if login or unix_account has changed ("INSERT", "UPDATE OF unix_account_id, login"), "user_ensure_tombstone()", when="BEFORE", diff --git a/pycroft/model/user.py b/pycroft/model/user.py index 5c3ca9572..dee3e70e9 100644 --- a/pycroft/model/user.py +++ b/pycroft/model/user.py @@ -474,7 +474,12 @@ def email_internal(self): __table_args__ = ( UniqueConstraint("swdd_person_id"), - ForeignKeyConstraint(("login_hash",), ("unix_tombstone.login_hash",), deferrable=True), + ForeignKeyConstraint( + ("login_hash",), + ("unix_tombstone.login_hash",), + name="user_login_hash_fkey", + deferrable=True, + ), ) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index e39e3b598..890adf9e5 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -196,7 +196,10 @@ def user(self, class_session) -> User: class_session.flush() return user - def test_create_unix_account(self, session, user): + def test_add_new_unix_account_to_user(self, session, user): + # should also not throw an error. + # not sure why we care about this use case, + # but this should be possible in principle (think external users). with session.begin_nested(): ua = f.UnixAccountFactory() user.unix_account = ua @@ -210,9 +213,15 @@ def unix_account(self, class_session) -> UnixAccount: class_session.flush() return ua - def test_create_user(self, session, ua): - with pytest.raises(IntegrityError), session.begin_nested(): - session.add(f.UserFactory(unix_account=ua)) + def test_create_user_with_existing_unix_account(self, session, unix_account): + # this should not throw an error, + # because "UA then User" is the usual order of operations when creating a new user. + ua = unix_account + try: + with session.begin_nested(): + session.add(f.UserFactory(unix_account=ua)) + except IntegrityError: + pytest.fail("Creating user raised IntegrityError.") class TestTombstoneLifeCycle: From f767883b79680c58ac86a66294a161bbb4438f0e Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 28 Aug 2024 11:53:03 +0200 Subject: [PATCH 23/49] model: darker fixes --- pycroft/model/unix_account.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pycroft/model/unix_account.py b/pycroft/model/unix_account.py index 5b06de431..a59267e05 100644 --- a/pycroft/model/unix_account.py +++ b/pycroft/model/unix_account.py @@ -7,6 +7,7 @@ """ + from __future__ import annotations import typing as t from sqlalchemy import ( @@ -98,6 +99,7 @@ class UnixTombstone(ModelBase): The lifecycle of a tombstone is restricted by :attr:`check_unix_tombstone_lifecycle_func`. """ + uid: Mapped[int] = Column(Integer, unique=True) login_hash: Mapped[bytes] = Column(LargeBinary(512), unique=True) @@ -118,6 +120,7 @@ class UnixTombstone(ModelBase): ) __mapper_args__ = {"primary_key": (uid, login_hash)} # fake PKey for mapper + check_unix_tombstone_lifecycle_func = ddl.Function( name="check_unix_tombstone_lifecycle", arguments=[], From 6ceb97817780ae484bb89301176938ffbcfa1c2e Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 28 Aug 2024 13:46:54 +0200 Subject: [PATCH 24/49] build: update `bun` to v1.1.26 That release fixes various things, including oven-sh/bun#5122, which occurred in the last CI run. --- .github/workflows/docker-image.yml | 2 +- docker/dev.Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index c393a4dde..60339a6b5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -105,7 +105,7 @@ jobs: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 with: - bun-version: 1.1.3 + bun-version: 1.1.26 - run: bun install --frozen-lockfile - run: bun run bundle --prod - name: Check for outdated NPM packages diff --git a/docker/dev.Dockerfile b/docker/dev.Dockerfile index 986d8e057..ca976f4d7 100644 --- a/docker/dev.Dockerfile +++ b/docker/dev.Dockerfile @@ -7,9 +7,9 @@ RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \ apk add unzip curl RUN < Date: Wed, 28 Aug 2024 14:03:47 +0200 Subject: [PATCH 25/49] Use `bun outdated` instead of `npm-check-updates` Fixes #721 --- .github/workflows/docker-image.yml | 2 +- bun.lockb | Bin 279164 -> 188012 bytes package.json | 1 - scripts/bun_outdated.sh | 8 ++++++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100755 scripts/bun_outdated.sh diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 60339a6b5..89a0a75ec 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -109,7 +109,7 @@ jobs: - run: bun install --frozen-lockfile - run: bun run bundle --prod - name: Check for outdated NPM packages - run: bun x npm-check-updates --root --format group >> "${GITHUB_STEP_SUMMARY}" + run: ./scripts/bun_outdated.sh | tee "${GITHUB_STEP_SUMMARY}" build: runs-on: ubuntu-latest steps: diff --git a/bun.lockb b/bun.lockb index 7e2925910ba2c764b2e53456b57b4bbff17a3791..2a7b8d445dd051883a7a56753db835e4a5895f67 100755 GIT binary patch delta 34490 zcmeHwcUV+c_wG4o7@e_ULqSFs;}`82=W@A=*5{*!rpXYKXwwb$Nz?Q+h{9NB+Os`hMO z#ko#RtDKxV=iGrgen;-}8*APAHmKL_s2N$`-L*eoDWvm`j>#)-+!Q!^o#E$&*6V3? zf|oS;tqR9w=YgmMxgD|sdet*bb8H)wD?G4V+e+=KdZxn{7VIccMm`=$ZPqyFr#kf4yXffuSUE+!F!!EsbN zJU*5CRpDzY4*oRAk$MVA4X@o;>3Lj2N_ezfj#k@g@RXmF7zuA2H!>wWIe9e4#U;j? zQsUB5;}WCev*Kc6(+XfnEsKs1PfIgJaW~+YB4A2QPm4nXOsVq9tk+bo$dsC#VuH() zu%jVZ44xVuj!A@=7W4a&PZ3h>zE*VAPv_={KNVDo6)>R57L^p4mJ*j}iZVr{$G~9% zCKSEqBcB>NGBz$U7J6K&X%uyBr=#59NltPkX;nK8GmVan4UZp&{NNVyki~|lI--*? z{?N%!RcD=CV6d||qe?yd=gxBd-$T}+dQhJ=WSlFG7v|Es%fcN4M}>`yBC4#?Wjmn-~qNb;Mm%ZrCbRN-JVfTiMZ6=(Jh&YsYa|z1eBX zN=d_J6@k1|Q^E*S3dcDG%l4zgFJ>{r>gkYxW@ zu}^@k27PZ&tbH2uO+Donw(cc|N}ZHtheq8SO4ja&L-f8I$JxQ(I8;D$WoW7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sSYzXX0f4N zB6V}DUjf?nd&4w{1Af%eNOk^_IP*J>$vZ6vbJ;`Xz6@nMlHsSQbDO~Ry-)^8+vC_ z%vJ|UB(WQ2o-9xL;ZQ`cihE|W2N-XAfJm)jjd=aJsM#Nf?0D8Z*0|#3xh%PQ#a|Dx zp$5)xW3d%aEnt@#R!mvLN)3Ep5o%%5Thdc}Mcz7=-H5-woqbhNw3DT4bIAODQ4`G4mSBNPAt diff --git a/package.json b/package.json index 7c1a87840..c3b0f0034 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "esbuild-plugin-clean": "^1.0.1", "esbuild-plugin-summary": "^0.0.2", "eslint": "^8.16.0", - "npm-check-updates": "^16.14.18", "typescript": "^4.1.3" }, "scripts": { diff --git a/scripts/bun_outdated.sh b/scripts/bun_outdated.sh new file mode 100755 index 000000000..7c280149e --- /dev/null +++ b/scripts/bun_outdated.sh @@ -0,0 +1,8 @@ +#!/bin/bash +FORCE_COLOR=1 bun outdated | \ + sed -E \ + -e 's/│/|/g' \ + -e 's/\x1b\[1m(\x1b\[[0-9;]+m)+([0-9.]+)\x1b\[0m/**\2**/g' \ + -e 's/\x1b\[[0-9;]+m//g' \ + -e '2a| --- | --- | --- | --- |' \ + -e '/─/d' From d613b43d2c1e00cbe6aafca57cd65f92cd7663b4 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 28 Aug 2024 14:04:56 +0200 Subject: [PATCH 26/49] tooling: add docstring to `just deps-compile` This causes it to appear in autocompletion --- justfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/justfile b/justfile index 6e74db076..416df8a8b 100644 --- a/justfile +++ b/justfile @@ -124,6 +124,8 @@ schema-status: (_up "dev-db") # upgrade the (imported or created) schema to the current revision schema-upgrade: (_up "dev-db") (alembic "upgrade" "head") + +# extract `requirements` lockfiles from `pyproject.toml` dependency spec deps-compile: uv pip compile pyproject.toml --generate-hashes -o requirements.txt uv pip compile pyproject.toml --generate-hashes --extra dev -o requirements.dev.txt From 90db0e181b21a184b20ab66bafe61f2e81aafbc9 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 28 Aug 2024 14:44:19 +0200 Subject: [PATCH 27/49] docs: vendor mermaid.js v11.0.2 upstream: - https://cdn.jsdelivr.net/npm/mermaid@11.0.2/dist/mermaid.min.js - https://cdn.jsdelivr.net/npm/mermaid@11.0.2/dist/mermaid.min.js.map --- doc/_static/js/.gitattributes | 2 + doc/_static/js/mermaid.min.js | 2151 +++++++++++++++++++++++++++++ doc/_static/js/mermaid.min.js.map | 7 + doc/conf.py | 5 + 4 files changed, 2165 insertions(+) create mode 100644 doc/_static/js/.gitattributes create mode 100644 doc/_static/js/mermaid.min.js create mode 100644 doc/_static/js/mermaid.min.js.map diff --git a/doc/_static/js/.gitattributes b/doc/_static/js/.gitattributes new file mode 100644 index 000000000..8b8855d66 --- /dev/null +++ b/doc/_static/js/.gitattributes @@ -0,0 +1,2 @@ +mermaid.min.js* linguist-vendored +mermaid.min.js -diff diff --git a/doc/_static/js/mermaid.min.js b/doc/_static/js/mermaid.min.js new file mode 100644 index 000000000..2195371d0 --- /dev/null +++ b/doc/_static/js/mermaid.min.js @@ -0,0 +1,2151 @@ +"use strict";var __esbuild_esm_mermaid=(()=>{var B1e=Object.create;var T1=Object.defineProperty;var F1e=Object.getOwnPropertyDescriptor;var z1e=Object.getOwnPropertyNames;var $1e=Object.getPrototypeOf,G1e=Object.prototype.hasOwnProperty;var s=(t,e)=>T1(t,"name",{value:e,configurable:!0});var _=(t,e)=>()=>(t&&(e=t(t=0)),e);var is=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ur=(t,e)=>{for(var r in e)T1(t,r,{get:e[r],enumerable:!0})},ob=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of z1e(e))!G1e.call(t,i)&&i!==r&&T1(t,i,{get:()=>e[i],enumerable:!(n=F1e(e,i))||n.enumerable});return t},lr=(t,e,r)=>(ob(t,e,"default"),r&&ob(r,e,"default")),ka=(t,e,r)=>(r=t!=null?B1e($1e(t)):{},ob(e||!t||!t.__esModule?T1(r,"default",{value:t,enumerable:!0}):r,t)),V1e=t=>ob(T1({},"__esModule",{value:!0}),t);function lb(t){for(var e=[],r=1;r{"use strict";s(lb,"dedent")});var cb=is((X7,j7)=>{"use strict";(function(t,e){typeof X7=="object"&&typeof j7<"u"?j7.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(X7,function(){"use strict";var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",l="day",u="week",h="month",f="quarter",d="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:s(function(L){var P=["th","st","nd","rd"],M=L%100;return"["+L+(P[(M-20)%10]||P[M]||P[0])+"]"},"ordinal")},x=s(function(L,P,M){var F=String(L);return!F||F.length>=P?L:""+Array(P+1-F.length).join(M)+L},"m"),b={s:x,z:s(function(L){var P=-L.utcOffset(),M=Math.abs(P),F=Math.floor(M/60),I=M%60;return(P<=0?"+":"-")+x(F,2,"0")+":"+x(I,2,"0")},"z"),m:s(function L(P,M){if(P.date()1)return L(z[0])}else{var N=P.name;A[N]=P,I=N}return!F&&I&&(k=I),I||!F&&k},"t"),E=s(function(L,P){if(T(L))return L.clone();var M=typeof P=="object"?P:{};return M.date=L,M.args=arguments,new R(M)},"O"),S=b;S.l=C,S.i=T,S.w=function(L,P){return E(L,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var R=function(){function L(M){this.$L=C(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[w]=!0}s(L,"M");var P=L.prototype;return P.parse=function(M){this.$d=function(F){var I=F.date,O=F.utc;if(I===null)return new Date(NaN);if(S.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var z=I.match(g);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return O?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(I)}(M),this.init()},P.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},P.$utils=function(){return S},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(M,F){var I=E(M);return this.startOf(F)<=I&&I<=this.endOf(F)},P.isAfter=function(M,F){return E(M){"use strict";LB=ka(cb(),1),Uc={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},V={trace:s((...t)=>{},"trace"),debug:s((...t)=>{},"debug"),info:s((...t)=>{},"info"),warn:s((...t)=>{},"warn"),error:s((...t)=>{},"error"),fatal:s((...t)=>{},"fatal")},E1=s(function(t="fatal"){let e=Uc.fatal;typeof t=="string"?t.toLowerCase()in Uc&&(e=Uc[t]):typeof t=="number"&&(e=t),V.trace=()=>{},V.debug=()=>{},V.info=()=>{},V.warn=()=>{},V.error=()=>{},V.fatal=()=>{},e<=Uc.fatal&&(V.fatal=console.error?console.error.bind(console,fo("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",fo("FATAL"))),e<=Uc.error&&(V.error=console.error?console.error.bind(console,fo("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",fo("ERROR"))),e<=Uc.warn&&(V.warn=console.warn?console.warn.bind(console,fo("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",fo("WARN"))),e<=Uc.info&&(V.info=console.info?console.info.bind(console,fo("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",fo("INFO"))),e<=Uc.debug&&(V.debug=console.debug?console.debug.bind(console,fo("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fo("DEBUG"))),e<=Uc.trace&&(V.trace=console.debug?console.debug.bind(console,fo("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",fo("TRACE")))},"setLogLevel"),fo=s(t=>`%c${(0,LB.default)().format("ss.SSS")} : ${t} : `,"format")});var ub,Df,DB,hb=_(()=>{"use strict";ub=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Df=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,DB=/\s*%%.*\n/gm});var W0,K7=_(()=>{"use strict";W0=class extends Error{static{s(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}});var Rf,H0,fb,Q7,RB,Mf=_(()=>{"use strict";it();hb();K7();Rf={},H0=s(function(t,e){t=t.replace(ub,"").replace(Df,"").replace(DB,` +`);for(let[r,{detector:n}]of Object.entries(Rf))if(n(t,e))return r;throw new W0(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),fb=s((...t)=>{for(let{id:e,detector:r,loader:n}of t)Q7(e,r,n)},"registerLazyLoadedDiagrams"),Q7=s((t,e,r)=>{Rf[t]&&V.warn(`Detector with key ${t} already exists. Overwriting.`),Rf[t]={detector:e,loader:r},V.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),RB=s(t=>Rf[t].loader,"getDiagramLoader")});var C1,MB,Z7=_(()=>{"use strict";C1=function(){var t=s(function(_e,he,q,se){for(q=q||{},se=_e.length;se--;q[_e[se]]=he);return q},"o"),e=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],f=[1,67],d=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],k=[1,35],A=[1,36],w=[1,37],T=[1,38],C=[1,39],E=[1,40],S=[1,41],R=[1,42],D=[1,43],L=[1,44],P=[1,45],M=[1,46],F=[1,47],I=[1,48],O=[1,50],z=[1,51],N=[1,52],U=[1,53],$=[1,54],W=[1,55],ee=[1,56],te=[1,57],ce=[1,58],Z=[1,59],fe=[1,60],ne=[14,42],H=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Q=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],re=[1,83],ie=[1,84],ye=[1,85],j=[12,14,42],De=[12,14,33,42],oe=[12,14,33,42,76,77,79,80],Re=[12,33],Pe=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Se={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:s(function(he,q,se,ue,X,ae,pe){var de=ae.length-1;switch(X){case 3:ue.setDirection("TB");break;case 4:ue.setDirection("BT");break;case 5:ue.setDirection("RL");break;case 6:ue.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ue.setC4Type(ae[de-3]);break;case 19:ue.setTitle(ae[de].substring(6)),this.$=ae[de].substring(6);break;case 20:ue.setAccDescription(ae[de].substring(15)),this.$=ae[de].substring(15);break;case 21:this.$=ae[de].trim(),ue.setTitle(this.$);break;case 22:case 23:this.$=ae[de].trim(),ue.setAccDescription(this.$);break;case 28:ae[de].splice(2,0,"ENTERPRISE"),ue.addPersonOrSystemBoundary(...ae[de]),this.$=ae[de];break;case 29:ae[de].splice(2,0,"SYSTEM"),ue.addPersonOrSystemBoundary(...ae[de]),this.$=ae[de];break;case 30:ue.addPersonOrSystemBoundary(...ae[de]),this.$=ae[de];break;case 31:ae[de].splice(2,0,"CONTAINER"),ue.addContainerBoundary(...ae[de]),this.$=ae[de];break;case 32:ue.addDeploymentNode("node",...ae[de]),this.$=ae[de];break;case 33:ue.addDeploymentNode("nodeL",...ae[de]),this.$=ae[de];break;case 34:ue.addDeploymentNode("nodeR",...ae[de]),this.$=ae[de];break;case 35:ue.popBoundaryParseStack();break;case 39:ue.addPersonOrSystem("person",...ae[de]),this.$=ae[de];break;case 40:ue.addPersonOrSystem("external_person",...ae[de]),this.$=ae[de];break;case 41:ue.addPersonOrSystem("system",...ae[de]),this.$=ae[de];break;case 42:ue.addPersonOrSystem("system_db",...ae[de]),this.$=ae[de];break;case 43:ue.addPersonOrSystem("system_queue",...ae[de]),this.$=ae[de];break;case 44:ue.addPersonOrSystem("external_system",...ae[de]),this.$=ae[de];break;case 45:ue.addPersonOrSystem("external_system_db",...ae[de]),this.$=ae[de];break;case 46:ue.addPersonOrSystem("external_system_queue",...ae[de]),this.$=ae[de];break;case 47:ue.addContainer("container",...ae[de]),this.$=ae[de];break;case 48:ue.addContainer("container_db",...ae[de]),this.$=ae[de];break;case 49:ue.addContainer("container_queue",...ae[de]),this.$=ae[de];break;case 50:ue.addContainer("external_container",...ae[de]),this.$=ae[de];break;case 51:ue.addContainer("external_container_db",...ae[de]),this.$=ae[de];break;case 52:ue.addContainer("external_container_queue",...ae[de]),this.$=ae[de];break;case 53:ue.addComponent("component",...ae[de]),this.$=ae[de];break;case 54:ue.addComponent("component_db",...ae[de]),this.$=ae[de];break;case 55:ue.addComponent("component_queue",...ae[de]),this.$=ae[de];break;case 56:ue.addComponent("external_component",...ae[de]),this.$=ae[de];break;case 57:ue.addComponent("external_component_db",...ae[de]),this.$=ae[de];break;case 58:ue.addComponent("external_component_queue",...ae[de]),this.$=ae[de];break;case 60:ue.addRel("rel",...ae[de]),this.$=ae[de];break;case 61:ue.addRel("birel",...ae[de]),this.$=ae[de];break;case 62:ue.addRel("rel_u",...ae[de]),this.$=ae[de];break;case 63:ue.addRel("rel_d",...ae[de]),this.$=ae[de];break;case 64:ue.addRel("rel_l",...ae[de]),this.$=ae[de];break;case 65:ue.addRel("rel_r",...ae[de]),this.$=ae[de];break;case 66:ue.addRel("rel_b",...ae[de]),this.$=ae[de];break;case 67:ae[de].splice(0,1),ue.addRel("rel",...ae[de]),this.$=ae[de];break;case 68:ue.updateElStyle("update_el_style",...ae[de]),this.$=ae[de];break;case 69:ue.updateRelStyle("update_rel_style",...ae[de]),this.$=ae[de];break;case 70:ue.updateLayoutConfig("update_layout_config",...ae[de]),this.$=ae[de];break;case 71:this.$=[ae[de]];break;case 72:ae[de].unshift(ae[de-1]),this.$=ae[de];break;case 73:case 75:this.$=ae[de].trim();break;case 74:let Ie={};Ie[ae[de-1].trim()]=ae[de].trim(),this.$=Ie;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{14:[1,74]},t(ne,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe}),t(ne,[2,14]),t(H,[2,16],{12:[1,76]}),t(ne,[2,36],{12:[1,77]}),t(Q,[2,19]),t(Q,[2,20]),{25:[1,78]},{27:[1,79]},t(Q,[2,23]),{35:80,75:81,76:K,77:re,79:ie,80:ye},{35:86,75:81,76:K,77:re,79:ie,80:ye},{35:87,75:81,76:K,77:re,79:ie,80:ye},{35:88,75:81,76:K,77:re,79:ie,80:ye},{35:89,75:81,76:K,77:re,79:ie,80:ye},{35:90,75:81,76:K,77:re,79:ie,80:ye},{35:91,75:81,76:K,77:re,79:ie,80:ye},{35:92,75:81,76:K,77:re,79:ie,80:ye},{35:93,75:81,76:K,77:re,79:ie,80:ye},{35:94,75:81,76:K,77:re,79:ie,80:ye},{35:95,75:81,76:K,77:re,79:ie,80:ye},{35:96,75:81,76:K,77:re,79:ie,80:ye},{35:97,75:81,76:K,77:re,79:ie,80:ye},{35:98,75:81,76:K,77:re,79:ie,80:ye},{35:99,75:81,76:K,77:re,79:ie,80:ye},{35:100,75:81,76:K,77:re,79:ie,80:ye},{35:101,75:81,76:K,77:re,79:ie,80:ye},{35:102,75:81,76:K,77:re,79:ie,80:ye},{35:103,75:81,76:K,77:re,79:ie,80:ye},{35:104,75:81,76:K,77:re,79:ie,80:ye},t(j,[2,59]),{35:105,75:81,76:K,77:re,79:ie,80:ye},{35:106,75:81,76:K,77:re,79:ie,80:ye},{35:107,75:81,76:K,77:re,79:ie,80:ye},{35:108,75:81,76:K,77:re,79:ie,80:ye},{35:109,75:81,76:K,77:re,79:ie,80:ye},{35:110,75:81,76:K,77:re,79:ie,80:ye},{35:111,75:81,76:K,77:re,79:ie,80:ye},{35:112,75:81,76:K,77:re,79:ie,80:ye},{35:113,75:81,76:K,77:re,79:ie,80:ye},{35:114,75:81,76:K,77:re,79:ie,80:ye},{35:115,75:81,76:K,77:re,79:ie,80:ye},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:f,40:d,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:re,79:ie,80:ye},{35:120,75:81,76:K,77:re,79:ie,80:ye},{35:121,75:81,76:K,77:re,79:ie,80:ye},{35:122,75:81,76:K,77:re,79:ie,80:ye},{35:123,75:81,76:K,77:re,79:ie,80:ye},{35:124,75:81,76:K,77:re,79:ie,80:ye},{35:125,75:81,76:K,77:re,79:ie,80:ye},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ne,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:r,24:n,26:i,28:a}),t(ne,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:i,28:a,34:o,36:l,37:u,38:h,39:f,40:d,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k,51:A,52:w,53:T,54:C,55:E,56:S,57:R,58:D,59:L,60:P,61:M,62:F,63:I,64:O,65:z,66:N,67:U,68:$,69:W,70:ee,71:te,72:ce,73:Z,74:fe}),t(Q,[2,21]),t(Q,[2,22]),t(j,[2,39]),t(De,[2,71],{75:81,35:132,76:K,77:re,79:ie,80:ye}),t(oe,[2,73]),{78:[1,133]},t(oe,[2,75]),t(oe,[2,76]),t(j,[2,40]),t(j,[2,41]),t(j,[2,42]),t(j,[2,43]),t(j,[2,44]),t(j,[2,45]),t(j,[2,46]),t(j,[2,47]),t(j,[2,48]),t(j,[2,49]),t(j,[2,50]),t(j,[2,51]),t(j,[2,52]),t(j,[2,53]),t(j,[2,54]),t(j,[2,55]),t(j,[2,56]),t(j,[2,57]),t(j,[2,58]),t(j,[2,60]),t(j,[2,61]),t(j,[2,62]),t(j,[2,63]),t(j,[2,64]),t(j,[2,65]),t(j,[2,66]),t(j,[2,67]),t(j,[2,68]),t(j,[2,69]),t(j,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Re,[2,28]),t(Re,[2,29]),t(Re,[2,30]),t(Re,[2,31]),t(Re,[2,32]),t(Re,[2,33]),t(Re,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t(ne,[2,38]),t(De,[2,72]),t(oe,[2,74]),t(j,[2,24]),t(j,[2,35]),t(Pe,[2,25]),t(Pe,[2,26],{12:[1,138]}),t(Pe,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:s(function(he,q){if(q.recoverable)this.trace(he);else{var se=new Error(he);throw se.hash=q,se}},"parseError"),parse:s(function(he){var q=this,se=[0],ue=[],X=[null],ae=[],pe=this.table,de="",Ie=0,Ne=0,Be=0,ze=2,qe=1,Fe=ae.slice.call(arguments,1),we=Object.create(this.lexer),Je={yy:{}};for(var We in this.yy)Object.prototype.hasOwnProperty.call(this.yy,We)&&(Je.yy[We]=this.yy[We]);we.setInput(he,Je.yy),Je.yy.lexer=we,Je.yy.parser=this,typeof we.yylloc>"u"&&(we.yylloc={});var or=we.yylloc;ae.push(or);var Cr=we.options&&we.options.ranges;typeof Je.yy.parseError=="function"?this.parseError=Je.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ut(Bt){se.length=se.length-2*Bt,X.length=X.length-Bt,ae.length=ae.length-Bt}s(Ut,"popStack");function ar(){var Bt;return Bt=ue.pop()||we.lex()||qe,typeof Bt!="number"&&(Bt instanceof Array&&(ue=Bt,Bt=ue.pop()),Bt=q.symbols_[Bt]||Bt),Bt}s(ar,"lex");for(var ut,Rt,Qe,Dt,qt,yt,Et={},pt,Wt,ot,fr;;){if(Qe=se[se.length-1],this.defaultActions[Qe]?Dt=this.defaultActions[Qe]:((ut===null||typeof ut>"u")&&(ut=ar()),Dt=pe[Qe]&&pe[Qe][ut]),typeof Dt>"u"||!Dt.length||!Dt[0]){var vt="";fr=[];for(pt in pe[Qe])this.terminals_[pt]&&pt>ze&&fr.push("'"+this.terminals_[pt]+"'");we.showPosition?vt="Parse error on line "+(Ie+1)+`: +`+we.showPosition()+` +Expecting `+fr.join(", ")+", got '"+(this.terminals_[ut]||ut)+"'":vt="Parse error on line "+(Ie+1)+": Unexpected "+(ut==qe?"end of input":"'"+(this.terminals_[ut]||ut)+"'"),this.parseError(vt,{text:we.match,token:this.terminals_[ut]||ut,line:we.yylineno,loc:or,expected:fr})}if(Dt[0]instanceof Array&&Dt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Qe+", token: "+ut);switch(Dt[0]){case 1:se.push(ut),X.push(we.yytext),ae.push(we.yylloc),se.push(Dt[1]),ut=null,Rt?(ut=Rt,Rt=null):(Ne=we.yyleng,de=we.yytext,Ie=we.yylineno,or=we.yylloc,Be>0&&Be--);break;case 2:if(Wt=this.productions_[Dt[1]][1],Et.$=X[X.length-Wt],Et._$={first_line:ae[ae.length-(Wt||1)].first_line,last_line:ae[ae.length-1].last_line,first_column:ae[ae.length-(Wt||1)].first_column,last_column:ae[ae.length-1].last_column},Cr&&(Et._$.range=[ae[ae.length-(Wt||1)].range[0],ae[ae.length-1].range[1]]),yt=this.performAction.apply(Et,[de,Ne,Ie,Je.yy,Dt[1],X,ae].concat(Fe)),typeof yt<"u")return yt;Wt&&(se=se.slice(0,-1*Wt*2),X=X.slice(0,-1*Wt),ae=ae.slice(0,-1*Wt)),se.push(this.productions_[Dt[1]][0]),X.push(Et.$),ae.push(Et._$),ot=pe[se[se.length-2]][se[se.length-1]],se.push(ot);break;case 3:return!0}}return!0},"parse")},Ue=function(){var _e={EOF:1,parseError:s(function(q,se){if(this.yy.parser)this.yy.parser.parseError(q,se);else throw new Error(q)},"parseError"),setInput:s(function(he,q){return this.yy=q||this.yy||{},this._input=he,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var he=this._input[0];this.yytext+=he,this.yyleng++,this.offset++,this.match+=he,this.matched+=he;var q=he.match(/(?:\r\n?|\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),he},"input"),unput:s(function(he){var q=he.length,se=he.split(/(?:\r\n?|\n)/g);this._input=he+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;var ue=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),se.length-1&&(this.yylineno-=se.length-1);var X=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:se?(se.length===ue.length?this.yylloc.first_column:0)+ue[ue.length-se.length].length-se[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[X[0],X[0]+this.yyleng-q]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(he){this.unput(this.match.slice(he))},"less"),pastInput:s(function(){var he=this.matched.substr(0,this.matched.length-this.match.length);return(he.length>20?"...":"")+he.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var he=this.match;return he.length<20&&(he+=this._input.substr(0,20-he.length)),(he.substr(0,20)+(he.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var he=this.pastInput(),q=new Array(he.length+1).join("-");return he+this.upcomingInput()+` +`+q+"^"},"showPosition"),test_match:s(function(he,q){var se,ue,X;if(this.options.backtrack_lexer&&(X={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(X.yylloc.range=this.yylloc.range.slice(0))),ue=he[0].match(/(?:\r\n?|\n).*/g),ue&&(this.yylineno+=ue.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ue?ue[ue.length-1].length-ue[ue.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+he[0].length},this.yytext+=he[0],this.match+=he[0],this.matches=he,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(he[0].length),this.matched+=he[0],se=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),se)return se;if(this._backtrack){for(var ae in X)this[ae]=X[ae];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var he,q,se,ue;this._more||(this.yytext="",this.match="");for(var X=this._currentRules(),ae=0;aeq[0].length)){if(q=se,ue=ae,this.options.backtrack_lexer){if(he=this.test_match(se,X[ae]),he!==!1)return he;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?(he=this.test_match(q,X[ue]),he!==!1?he:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var q=this.next();return q||this.lex()},"lex"),begin:s(function(q){this.conditionStack.push(q)},"begin"),popState:s(function(){var q=this.conditionStack.length-1;return q>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},"topState"),pushState:s(function(q){this.begin(q)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(q,se,ue,X){var ae=X;switch(ue){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _e}();Se.lexer=Ue;function Oe(){this.yy={}}return s(Oe,"Parser"),Oe.prototype=Se,Se.Parser=Oe,new Oe}();C1.parser=C1;MB=C1});var J7,An,Y0=_(()=>{"use strict";J7=s((t,e,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>J7(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=J7(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),An=J7});var db,IB,NB=_(()=>{"use strict";db={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:s(t=>t>=255?255:t<0?0:t,"r"),g:s(t=>t>=255?255:t<0?0:t,"g"),b:s(t=>t>=255?255:t<0?0:t,"b"),h:s(t=>t%360,"h"),s:s(t=>t>=100?100:t<0?0:t,"s"),l:s(t=>t>=100?100:t<0?0:t,"l"),a:s(t=>t>=1?1:t<0?0:t,"a")},toLinear:s(t=>{let e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:s((t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?t+(e-t)*6*r:r<.5?e:r<.6666666666666666?t+(e-t)*(.6666666666666666-r)*6:t),"hue2rgb"),hsl2rgb:s(({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;let i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return db.hue2rgb(a,i,t+.3333333333333333)*255;case"g":return db.hue2rgb(a,i,t)*255;case"b":return db.hue2rgb(a,i,t-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:s(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;let i=Math.max(t,e,r),a=Math.min(t,e,r),o=(i+a)/2;if(n==="l")return o*100;if(i===a)return 0;let l=i-a,u=o>.5?l/(2-i-a):l/(i+a);if(n==="s")return u*100;switch(i){case t:return((e-r)/l+(e{"use strict";U1e={clamp:s((t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:s(t=>Math.round(t*1e10)/1e10,"round")},OB=U1e});var q1e,BB,FB=_(()=>{"use strict";q1e={dec2hex:s(t=>{let e=Math.round(t).toString(16);return e.length>1?e:`0${e}`},"dec2hex")},BB=q1e});var W1e,Ct,Ol=_(()=>{"use strict";NB();PB();FB();W1e={channel:IB,lang:OB,unit:BB},Ct=W1e});var qc,ki,S1=_(()=>{"use strict";Ol();qc={};for(let t=0;t<=255;t++)qc[t]=Ct.unit.dec2hex(t);ki={ALL:0,RGB:1,HSL:2}});var eE,zB,$B=_(()=>{"use strict";S1();eE=class{static{s(this,"Type")}constructor(){this.type=ki.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ki.ALL}is(e){return this.type===e}},zB=eE});var tE,GB,VB=_(()=>{"use strict";Ol();$B();S1();tE=class{static{s(this,"Channels")}constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new zB}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=ki.ALL,this}_ensureHSL(){let e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Ct.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Ct.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Ct.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Ct.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Ct.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Ct.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,r=e.r;return!this.type.is(ki.HSL)&&r!==void 0?r:(this._ensureHSL(),Ct.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,r=e.g;return!this.type.is(ki.HSL)&&r!==void 0?r:(this._ensureHSL(),Ct.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,r=e.b;return!this.type.is(ki.HSL)&&r!==void 0?r:(this._ensureHSL(),Ct.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,r=e.h;return!this.type.is(ki.RGB)&&r!==void 0?r:(this._ensureRGB(),Ct.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,r=e.s;return!this.type.is(ki.RGB)&&r!==void 0?r:(this._ensureRGB(),Ct.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,r=e.l;return!this.type.is(ki.RGB)&&r!==void 0?r:(this._ensureRGB(),Ct.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ki.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ki.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ki.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ki.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ki.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ki.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},GB=tE});var H1e,th,_1=_(()=>{"use strict";VB();H1e=new GB({r:0,g:0,b:0,a:0},"transparent"),th=H1e});var UB,If,rE=_(()=>{"use strict";_1();S1();UB={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:s(t=>{if(t.charCodeAt(0)!==35)return;let e=t.match(UB.re);if(!e)return;let r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,o=i>4,l=o?1:17,u=o?8:4,h=a?0:-1,f=o?255:15;return th.set({r:(n>>u*(h+3)&f)*l,g:(n>>u*(h+2)&f)*l,b:(n>>u*(h+1)&f)*l,a:a?(n&f)*l/255:1},t)},"parse"),stringify:s(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`#${qc[Math.round(e)]}${qc[Math.round(r)]}${qc[Math.round(n)]}${qc[Math.round(i*255)]}`:`#${qc[Math.round(e)]}${qc[Math.round(r)]}${qc[Math.round(n)]}`},"stringify")},If=UB});var pb,A1,qB=_(()=>{"use strict";Ol();_1();pb={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:s(t=>{let e=t.match(pb.hueRe);if(e){let[,r,n]=e;switch(n){case"grad":return Ct.channel.clamp.h(parseFloat(r)*.9);case"rad":return Ct.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Ct.channel.clamp.h(parseFloat(r)*360)}}return Ct.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:s(t=>{let e=t.charCodeAt(0);if(e!==104&&e!==72)return;let r=t.match(pb.re);if(!r)return;let[,n,i,a,o,l]=r;return th.set({h:pb._hue2deg(n),s:Ct.channel.clamp.s(parseFloat(i)),l:Ct.channel.clamp.l(parseFloat(a)),a:o?Ct.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},t)},"parse"),stringify:s(t=>{let{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Ct.lang.round(e)}, ${Ct.lang.round(r)}%, ${Ct.lang.round(n)}%, ${i})`:`hsl(${Ct.lang.round(e)}, ${Ct.lang.round(r)}%, ${Ct.lang.round(n)}%)`},"stringify")},A1=pb});var mb,nE,WB=_(()=>{"use strict";rE();mb={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:s(t=>{t=t.toLowerCase();let e=mb.colors[t];if(e)return If.parse(e)},"parse"),stringify:s(t=>{let e=If.stringify(t);for(let r in mb.colors)if(mb.colors[r]===e)return r},"stringify")},nE=mb});var HB,L1,YB=_(()=>{"use strict";Ol();_1();HB={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:s(t=>{let e=t.charCodeAt(0);if(e!==114&&e!==82)return;let r=t.match(HB.re);if(!r)return;let[,n,i,a,o,l,u,h,f]=r;return th.set({r:Ct.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Ct.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Ct.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?Ct.channel.clamp.a(f?parseFloat(h)/100:parseFloat(h)):1},t)},"parse"),stringify:s(t=>{let{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Ct.lang.round(e)}, ${Ct.lang.round(r)}, ${Ct.lang.round(n)}, ${Ct.lang.round(i)})`:`rgb(${Ct.lang.round(e)}, ${Ct.lang.round(r)}, ${Ct.lang.round(n)})`},"stringify")},L1=HB});var Y1e,wi,Wc=_(()=>{"use strict";rE();qB();WB();YB();S1();Y1e={format:{keyword:nE,hex:If,rgb:L1,rgba:L1,hsl:A1,hsla:A1},parse:s(t=>{if(typeof t!="string")return t;let e=If.parse(t)||L1.parse(t)||A1.parse(t)||nE.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:s(t=>!t.changed&&t.color?t.color:t.type.is(ki.HSL)||t.data.r===void 0?A1.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?L1.stringify(t):If.stringify(t),"stringify")},wi=Y1e});var X1e,gb,iE=_(()=>{"use strict";Ol();Wc();X1e=s((t,e)=>{let r=wi.parse(t);for(let n in e)r[n]=Ct.channel.clamp[n](e[n]);return wi.stringify(r)},"change"),gb=X1e});var j1e,Fs,aE=_(()=>{"use strict";Ol();_1();Wc();iE();j1e=s((t,e,r=0,n=1)=>{if(typeof t!="number")return gb(t,{a:e});let i=th.set({r:Ct.channel.clamp.r(t),g:Ct.channel.clamp.g(e),b:Ct.channel.clamp.b(r),a:Ct.channel.clamp.a(n)});return wi.stringify(i)},"rgba"),Fs=j1e});var K1e,D1,XB=_(()=>{"use strict";Ol();Wc();K1e=s((t,e)=>Ct.lang.round(wi.parse(t)[e]),"channel"),D1=K1e});var Q1e,jB,KB=_(()=>{"use strict";Ol();Wc();Q1e=s(t=>{let{r:e,g:r,b:n}=wi.parse(t),i=.2126*Ct.channel.toLinear(e)+.7152*Ct.channel.toLinear(r)+.0722*Ct.channel.toLinear(n);return Ct.lang.round(i)},"luminance"),jB=Q1e});var Z1e,QB,ZB=_(()=>{"use strict";KB();Z1e=s(t=>jB(t)>=.5,"isLight"),QB=Z1e});var J1e,Fa,JB=_(()=>{"use strict";ZB();J1e=s(t=>!QB(t),"isDark"),Fa=J1e});var eye,yb,sE=_(()=>{"use strict";Ol();Wc();eye=s((t,e,r)=>{let n=wi.parse(t),i=n[e],a=Ct.channel.clamp[e](i+r);return i!==a&&(n[e]=a),wi.stringify(n)},"adjustChannel"),yb=eye});var tye,ht,eF=_(()=>{"use strict";sE();tye=s((t,e)=>yb(t,"l",e),"lighten"),ht=tye});var rye,mt,tF=_(()=>{"use strict";sE();rye=s((t,e)=>yb(t,"l",-e),"darken"),mt=rye});var nye,Ce,rF=_(()=>{"use strict";Wc();iE();nye=s((t,e)=>{let r=wi.parse(t),n={};for(let i in e)e[i]&&(n[i]=r[i]+e[i]);return gb(t,n)},"adjust"),Ce=nye});var iye,nF,iF=_(()=>{"use strict";Wc();aE();iye=s((t,e,r=50)=>{let{r:n,g:i,b:a,a:o}=wi.parse(t),{r:l,g:u,b:h,a:f}=wi.parse(e),d=r/100,p=d*2-1,m=o-f,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,v=1-y,x=n*y+l*v,b=i*y+u*v,k=a*y+h*v,A=o*d+f*(1-d);return Fs(x,b,k,A)},"mix"),nF=iye});var aye,et,aF=_(()=>{"use strict";Wc();iF();aye=s((t,e=100)=>{let r=wi.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,nF(r,t,e)},"invert"),et=aye});var sF=_(()=>{"use strict";aE();XB();JB();eF();tF();rF();aF()});var Ho=_(()=>{"use strict";sF()});var rh,nh,R1=_(()=>{"use strict";rh="#ffffff",nh="#f2f2f2"});var ui,X0=_(()=>{"use strict";Ho();ui=s((t,e)=>e?Ce(t,{s:-40,l:10}):Ce(t,{s:-40,l:-10}),"mkBorder")});var oE,lF,cF=_(()=>{"use strict";Ho();R1();X0();oE=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Ce(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Ce(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ui(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ui(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||et(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||et(this.tertiaryColor),this.lineColor=this.lineColor||et(this.background),this.arrowheadColor=this.arrowheadColor||et(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?mt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||mt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||et(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ht(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},lF=s(t=>{let e=new oE;return e.calculate(t),e},"getThemeVariables")});var lE,uF,hF=_(()=>{"use strict";Ho();X0();lE=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ht(this.primaryColor,16),this.tertiaryColor=Ce(this.primaryColor,{h:-160}),this.primaryBorderColor=et(this.background),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.tertiaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ht(et("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Fs(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=mt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=mt(this.sectionBkgColor,10),this.taskBorderColor=Fs(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Fs(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=ht(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=ht(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=ht(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Ce(this.primaryColor,{h:64}),this.fillType3=Ce(this.secondaryColor,{h:64}),this.fillType4=Ce(this.primaryColor,{h:-64}),this.fillType5=Ce(this.secondaryColor,{h:-64}),this.fillType6=Ce(this.primaryColor,{h:128}),this.fillType7=Ce(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330});for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},uF=s(t=>{let e=new lE;return e.calculate(t),e},"getThemeVariables")});var cE,j0,vb=_(()=>{"use strict";Ho();X0();R1();cE=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Ce(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Ce(this.primaryColor,{h:-160}),this.primaryBorderColor=ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.tertiaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Fs(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||mt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||mt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},j0=s(t=>{let e=new cE;return e.calculate(t),e},"getThemeVariables")});var uE,fF,dF=_(()=>{"use strict";Ho();R1();X0();uE=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=ht("#cde498",10),this.primaryBorderColor=ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.primaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=mt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Ce(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Ce(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Ce(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Ce(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Ce(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Ce(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Ce(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Ce(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Ce(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||mt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||mt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},fF=s(t=>{let e=new uE;return e.calculate(t),e},"getThemeVariables")});var hE,pF,mF=_(()=>{"use strict";Ho();X0();R1();hE=class{static{s(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ht(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Ce(this.primaryColor,{h:-160}),this.primaryBorderColor=ui(this.primaryColor,this.darkMode),this.secondaryBorderColor=ui(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ui(this.tertiaryColor,this.darkMode),this.primaryTextColor=et(this.primaryColor),this.secondaryTextColor=et(this.secondaryColor),this.tertiaryTextColor=et(this.tertiaryColor),this.lineColor=et(this.background),this.textColor=et(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=ht(this.contrast,55),this.border2=this.contrast,this.actorBorder=ht(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},pF=s(t=>{let e=new hE;return e.calculate(t),e},"getThemeVariables")});var po,xb=_(()=>{"use strict";cF();hF();vb();dF();mF();po={base:{getThemeVariables:lF},dark:{getThemeVariables:uF},default:{getThemeVariables:j0},forest:{getThemeVariables:fF},neutral:{getThemeVariables:pF}}});var Hc,gF=_(()=>{"use strict";Hc={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}});var yF,vF,xF,dr,Pl=_(()=>{"use strict";xb();gF();yF={...Hc,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:po.default.getThemeVariables(),sequence:{...Hc.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...Hc.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Hc.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Hc.pie,useWidth:984},xyChart:{...Hc.xyChart,useWidth:void 0},requirement:{...Hc.requirement,useWidth:void 0},packet:{...Hc.packet}},vF=s((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...vF(t[n],"")]:[...r,e+n],[]),"keyify"),xF=new Set(vF(yF,"")),dr=yF});var K0,sye,fE=_(()=>{"use strict";Pl();it();K0=s(t=>{if(V.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>K0(e));return}for(let e of Object.keys(t)){if(V.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!xF.has(e)||t[e]==null){V.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){V.debug("sanitizing object",e),K0(t[e]);continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)e.includes(n)&&(V.debug("sanitizing css option",e),t[e]=sye(t[e]))}if(t.themeVariables)for(let e of Object.keys(t.themeVariables)){let r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}V.debug("After sanitization",t)}},"sanitizeDirective"),sye=s(t=>{let e=0,r=0;for(let n of t){if(e{"use strict";Y0();it();xb();Pl();fE();ih=Object.freeze(dr),as=An({},ih),Q0=[],M1=An({},ih),bb=s((t,e)=>{let r=An({},t),n={};for(let i of e)EF(i),n=An(n,i);if(r=An(r,n),n.theme&&n.theme in po){let i=An({},kF),a=An(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in po&&(r.themeVariables=po[r.theme].getThemeVariables(a))}return M1=r,SF(M1),M1},"updateCurrentConfig"),dE=s(t=>(as=An({},ih),as=An(as,t),t.theme&&po[t.theme]&&(as.themeVariables=po[t.theme].getThemeVariables(t.themeVariables)),bb(as,Q0),as),"setSiteConfig"),wF=s(t=>{kF=An({},t)},"saveConfigFromInitialize"),TF=s(t=>(as=An(as,t),bb(as,Q0),as),"updateSiteConfig"),pE=s(()=>An({},as),"getSiteConfig"),kb=s(t=>(SF(t),An(M1,t),_r()),"setConfig"),_r=s(()=>An({},M1),"getConfig"),EF=s(t=>{t&&(["secure",...as.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(V.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&EF(t[e])}))},"sanitize"),CF=s(t=>{K0(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Q0.push(t),bb(as,Q0)},"addDirective"),I1=s((t=as)=>{Q0=[],bb(t,Q0)},"reset"),oye={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},bF={},lye=s(t=>{bF[t]||(V.warn(oye[t]),bF[t]=!0)},"issueWarning"),SF=s(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&lye("LAZY_LOAD_DEPRECATED")},"checkConfig")});var yE=is((mE,gE)=>{"use strict";(function(t,e){typeof mE=="object"&&typeof gE<"u"?gE.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.DOMPurify=e())})(mE,function(){"use strict";let{entries:t,setPrototypeOf:e,isFrozen:r,getPrototypeOf:n,getOwnPropertyDescriptor:i}=Object,{freeze:a,seal:o,create:l}=Object,{apply:u,construct:h}=typeof Reflect<"u"&&Reflect;a||(a=s(function(Se){return Se},"freeze")),o||(o=s(function(Se){return Se},"seal")),u||(u=s(function(Se,Ue,Oe){return Se.apply(Ue,Oe)},"apply")),h||(h=s(function(Se,Ue){return new Se(...Ue)},"construct"));let f=T(Array.prototype.forEach),d=T(Array.prototype.pop),p=T(Array.prototype.push),m=T(String.prototype.toLowerCase),g=T(String.prototype.toString),y=T(String.prototype.match),v=T(String.prototype.replace),x=T(String.prototype.indexOf),b=T(String.prototype.trim),k=T(Object.prototype.hasOwnProperty),A=T(RegExp.prototype.test),w=C(TypeError);function T(Pe){return function(Se){for(var Ue=arguments.length,Oe=new Array(Ue>1?Ue-1:0),_e=1;_e2&&arguments[2]!==void 0?arguments[2]:m;e&&e(Pe,null);let Oe=Se.length;for(;Oe--;){let _e=Se[Oe];if(typeof _e=="string"){let he=Ue(_e);he!==_e&&(r(Se)||(Se[Oe]=he),_e=he)}Pe[_e]=!0}return Pe}s(E,"addToSet");function S(Pe){for(let Se=0;Se/gm),ce=o(/\${[\w\W]*}/gm),Z=o(/^data-[\-\w.\u00B7-\uFFFF]/),fe=o(/^aria-[\-\w]+$/),ne=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),Q=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=o(/^html$/i),re=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var ie=Object.freeze({__proto__:null,MUSTACHE_EXPR:ee,ERB_EXPR:te,TMPLIT_EXPR:ce,DATA_ATTR:Z,ARIA_ATTR:fe,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:Q,DOCTYPE_NAME:K,CUSTOM_ELEMENT:re});let ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},j=s(function(){return typeof window>"u"?null:window},"getGlobal"),De=s(function(Se,Ue){if(typeof Se!="object"||typeof Se.createPolicy!="function")return null;let Oe=null,_e="data-tt-policy-suffix";Ue&&Ue.hasAttribute(_e)&&(Oe=Ue.getAttribute(_e));let he="dompurify"+(Oe?"#"+Oe:"");try{return Se.createPolicy(he,{createHTML(q){return q},createScriptURL(q){return q}})}catch{return console.warn("TrustedTypes policy "+he+" could not be created."),null}},"_createTrustedTypesPolicy");function oe(){let Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j(),Se=s(St=>oe(St),"DOMPurify");if(Se.version="3.1.6",Se.removed=[],!Pe||!Pe.document||Pe.document.nodeType!==ye.document)return Se.isSupported=!1,Se;let{document:Ue}=Pe,Oe=Ue,_e=Oe.currentScript,{DocumentFragment:he,HTMLTemplateElement:q,Node:se,Element:ue,NodeFilter:X,NamedNodeMap:ae=Pe.NamedNodeMap||Pe.MozNamedAttrMap,HTMLFormElement:pe,DOMParser:de,trustedTypes:Ie}=Pe,Ne=ue.prototype,Be=D(Ne,"cloneNode"),ze=D(Ne,"remove"),qe=D(Ne,"nextSibling"),Fe=D(Ne,"childNodes"),we=D(Ne,"parentNode");if(typeof q=="function"){let St=Ue.createElement("template");St.content&&St.content.ownerDocument&&(Ue=St.content.ownerDocument)}let Je,We="",{implementation:or,createNodeIterator:Cr,createDocumentFragment:Ut,getElementsByTagName:ar}=Ue,{importNode:ut}=Oe,Rt={};Se.isSupported=typeof t=="function"&&typeof we=="function"&&or&&or.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Qe,ERB_EXPR:Dt,TMPLIT_EXPR:qt,DATA_ATTR:yt,ARIA_ATTR:Et,IS_SCRIPT_OR_DATA:pt,ATTR_WHITESPACE:Wt,CUSTOM_ELEMENT:ot}=ie,{IS_ALLOWED_URI:fr}=ie,vt=null,Bt=E({},[...L,...P,...M,...I,...z]),Sr=null,zi=E({},[...N,...U,...$,...W]),rr=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Vn=null,Tn=null,Ki=!0,ci=!0,Pa=!1,En=!0,ti=!1,co=!0,uo=!1,Rl=!1,ts=!1,at=!1,xt=!1,Ft=!1,Ke=!0,Zt=!1,me="user-content-",Fc=!0,xe=!1,xi={},zc=null,g1=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ib=null,y1=E({},["audio","video","img","source","image","track"]),v1=null,ri=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ho="http://www.w3.org/1998/Math/MathML",Zu="http://www.w3.org/2000/svg",Ps="http://www.w3.org/1999/xhtml",Ju=Ps,ab=!1,x1=null,Qi=E({},[ho,Zu,Ps],g),$c=null,Gc=["application/xhtml+xml","text/html"],rs="text/html",bi=null,Ml=null,eh=Ue.createElement("form"),Af=s(function(Te){return Te instanceof RegExp||Te instanceof Function},"isRegexOrFunction"),Bs=s(function(){let Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ml&&Ml===Te)){if((!Te||typeof Te!="object")&&(Te={}),Te=R(Te),$c=Gc.indexOf(Te.PARSER_MEDIA_TYPE)===-1?rs:Te.PARSER_MEDIA_TYPE,bi=$c==="application/xhtml+xml"?g:m,vt=k(Te,"ALLOWED_TAGS")?E({},Te.ALLOWED_TAGS,bi):Bt,Sr=k(Te,"ALLOWED_ATTR")?E({},Te.ALLOWED_ATTR,bi):zi,x1=k(Te,"ALLOWED_NAMESPACES")?E({},Te.ALLOWED_NAMESPACES,g):Qi,v1=k(Te,"ADD_URI_SAFE_ATTR")?E(R(ri),Te.ADD_URI_SAFE_ATTR,bi):ri,ib=k(Te,"ADD_DATA_URI_TAGS")?E(R(y1),Te.ADD_DATA_URI_TAGS,bi):y1,zc=k(Te,"FORBID_CONTENTS")?E({},Te.FORBID_CONTENTS,bi):g1,Vn=k(Te,"FORBID_TAGS")?E({},Te.FORBID_TAGS,bi):{},Tn=k(Te,"FORBID_ATTR")?E({},Te.FORBID_ATTR,bi):{},xi=k(Te,"USE_PROFILES")?Te.USE_PROFILES:!1,Ki=Te.ALLOW_ARIA_ATTR!==!1,ci=Te.ALLOW_DATA_ATTR!==!1,Pa=Te.ALLOW_UNKNOWN_PROTOCOLS||!1,En=Te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ti=Te.SAFE_FOR_TEMPLATES||!1,co=Te.SAFE_FOR_XML!==!1,uo=Te.WHOLE_DOCUMENT||!1,at=Te.RETURN_DOM||!1,xt=Te.RETURN_DOM_FRAGMENT||!1,Ft=Te.RETURN_TRUSTED_TYPE||!1,ts=Te.FORCE_BODY||!1,Ke=Te.SANITIZE_DOM!==!1,Zt=Te.SANITIZE_NAMED_PROPS||!1,Fc=Te.KEEP_CONTENT!==!1,xe=Te.IN_PLACE||!1,fr=Te.ALLOWED_URI_REGEXP||ne,Ju=Te.NAMESPACE||Ps,rr=Te.CUSTOM_ELEMENT_HANDLING||{},Te.CUSTOM_ELEMENT_HANDLING&&Af(Te.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(rr.tagNameCheck=Te.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Te.CUSTOM_ELEMENT_HANDLING&&Af(Te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(rr.attributeNameCheck=Te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Te.CUSTOM_ELEMENT_HANDLING&&typeof Te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(rr.allowCustomizedBuiltInElements=Te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ti&&(ci=!1),xt&&(at=!0),xi&&(vt=E({},z),Sr=[],xi.html===!0&&(E(vt,L),E(Sr,N)),xi.svg===!0&&(E(vt,P),E(Sr,U),E(Sr,W)),xi.svgFilters===!0&&(E(vt,M),E(Sr,U),E(Sr,W)),xi.mathMl===!0&&(E(vt,I),E(Sr,$),E(Sr,W))),Te.ADD_TAGS&&(vt===Bt&&(vt=R(vt)),E(vt,Te.ADD_TAGS,bi)),Te.ADD_ATTR&&(Sr===zi&&(Sr=R(Sr)),E(Sr,Te.ADD_ATTR,bi)),Te.ADD_URI_SAFE_ATTR&&E(v1,Te.ADD_URI_SAFE_ATTR,bi),Te.FORBID_CONTENTS&&(zc===g1&&(zc=R(zc)),E(zc,Te.FORBID_CONTENTS,bi)),Fc&&(vt["#text"]=!0),uo&&E(vt,["html","head","body"]),vt.table&&(E(vt,["tbody"]),delete Vn.tbody),Te.TRUSTED_TYPES_POLICY){if(typeof Te.TRUSTED_TYPES_POLICY.createHTML!="function")throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Te.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Je=Te.TRUSTED_TYPES_POLICY,We=Je.createHTML("")}else Je===void 0&&(Je=De(Ie,_e)),Je!==null&&typeof We=="string"&&(We=Je.createHTML(""));a&&a(Te),Ml=Te}},"_parseConfig"),b1=E({},["mi","mo","mn","ms","mtext"]),Lf=E({},["foreignobject","annotation-xml"]),k1=E({},["title","style","font","a","script"]),xa=E({},[...P,...M,...F]),vB=E({},[...I,...O]),O1e=s(function(Te){let Ze=we(Te);(!Ze||!Ze.tagName)&&(Ze={namespaceURI:Ju,tagName:"template"});let bt=m(Te.tagName),fn=m(Ze.tagName);return x1[Te.namespaceURI]?Te.namespaceURI===Zu?Ze.namespaceURI===Ps?bt==="svg":Ze.namespaceURI===ho?bt==="svg"&&(fn==="annotation-xml"||b1[fn]):!!xa[bt]:Te.namespaceURI===ho?Ze.namespaceURI===Ps?bt==="math":Ze.namespaceURI===Zu?bt==="math"&&Lf[fn]:!!vB[bt]:Te.namespaceURI===Ps?Ze.namespaceURI===Zu&&!Lf[fn]||Ze.namespaceURI===ho&&!b1[fn]?!1:!vB[bt]&&(k1[bt]||!xa[bt]):!!($c==="application/xhtml+xml"&&x1[Te.namespaceURI]):!1},"_checkValidNamespace"),Il=s(function(Te){p(Se.removed,{element:Te});try{we(Te).removeChild(Te)}catch{ze(Te)}},"_forceRemove"),sb=s(function(Te,Ze){try{p(Se.removed,{attribute:Ze.getAttributeNode(Te),from:Ze})}catch{p(Se.removed,{attribute:null,from:Ze})}if(Ze.removeAttribute(Te),Te==="is"&&!Sr[Te])if(at||xt)try{Il(Ze)}catch{}else try{Ze.setAttribute(Te,"")}catch{}},"_removeAttribute"),xB=s(function(Te){let Ze=null,bt=null;if(ts)Te=""+Te;else{let Zi=y(Te,/^[\r\n\t ]+/);bt=Zi&&Zi[0]}$c==="application/xhtml+xml"&&Ju===Ps&&(Te=''+Te+"");let fn=Je?Je.createHTML(Te):Te;if(Ju===Ps)try{Ze=new de().parseFromString(fn,$c)}catch{}if(!Ze||!Ze.documentElement){Ze=or.createDocument(Ju,"template",null);try{Ze.documentElement.innerHTML=ab?We:fn}catch{}}let ba=Ze.body||Ze.documentElement;return Te&&bt&&ba.insertBefore(Ue.createTextNode(bt),ba.childNodes[0]||null),Ju===Ps?ar.call(Ze,uo?"html":"body")[0]:uo?Ze.documentElement:ba},"_initDocument"),bB=s(function(Te){return Cr.call(Te.ownerDocument||Te,Te,X.SHOW_ELEMENT|X.SHOW_COMMENT|X.SHOW_TEXT|X.SHOW_PROCESSING_INSTRUCTION|X.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),kB=s(function(Te){return Te instanceof pe&&(typeof Te.nodeName!="string"||typeof Te.textContent!="string"||typeof Te.removeChild!="function"||!(Te.attributes instanceof ae)||typeof Te.removeAttribute!="function"||typeof Te.setAttribute!="function"||typeof Te.namespaceURI!="string"||typeof Te.insertBefore!="function"||typeof Te.hasChildNodes!="function")},"_isClobbered"),wB=s(function(Te){return typeof se=="function"&&Te instanceof se},"_isNode"),Vc=s(function(Te,Ze,bt){Rt[Te]&&f(Rt[Te],fn=>{fn.call(Se,Ze,bt,Ml)})},"_executeHook"),TB=s(function(Te){let Ze=null;if(Vc("beforeSanitizeElements",Te,null),kB(Te))return Il(Te),!0;let bt=bi(Te.nodeName);if(Vc("uponSanitizeElement",Te,{tagName:bt,allowedTags:vt}),Te.hasChildNodes()&&!wB(Te.firstElementChild)&&A(/<[/\w]/g,Te.innerHTML)&&A(/<[/\w]/g,Te.textContent)||Te.nodeType===ye.progressingInstruction||co&&Te.nodeType===ye.comment&&A(/<[/\w]/g,Te.data))return Il(Te),!0;if(!vt[bt]||Vn[bt]){if(!Vn[bt]&&CB(bt)&&(rr.tagNameCheck instanceof RegExp&&A(rr.tagNameCheck,bt)||rr.tagNameCheck instanceof Function&&rr.tagNameCheck(bt)))return!1;if(Fc&&!zc[bt]){let fn=we(Te)||Te.parentNode,ba=Fe(Te)||Te.childNodes;if(ba&&fn){let Zi=ba.length;for(let ns=Zi-1;ns>=0;--ns){let Nl=Be(ba[ns],!0);Nl.__removalCount=(Te.__removalCount||0)+1,fn.insertBefore(Nl,qe(Te))}}}return Il(Te),!0}return Te instanceof ue&&!O1e(Te)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&A(/<\/no(script|embed|frames)/i,Te.innerHTML)?(Il(Te),!0):(ti&&Te.nodeType===ye.text&&(Ze=Te.textContent,f([Qe,Dt,qt],fn=>{Ze=v(Ze,fn," ")}),Te.textContent!==Ze&&(p(Se.removed,{element:Te.cloneNode()}),Te.textContent=Ze)),Vc("afterSanitizeElements",Te,null),!1)},"_sanitizeElements"),EB=s(function(Te,Ze,bt){if(Ke&&(Ze==="id"||Ze==="name")&&(bt in Ue||bt in eh))return!1;if(!(ci&&!Tn[Ze]&&A(yt,Ze))){if(!(Ki&&A(Et,Ze))){if(!Sr[Ze]||Tn[Ze]){if(!(CB(Te)&&(rr.tagNameCheck instanceof RegExp&&A(rr.tagNameCheck,Te)||rr.tagNameCheck instanceof Function&&rr.tagNameCheck(Te))&&(rr.attributeNameCheck instanceof RegExp&&A(rr.attributeNameCheck,Ze)||rr.attributeNameCheck instanceof Function&&rr.attributeNameCheck(Ze))||Ze==="is"&&rr.allowCustomizedBuiltInElements&&(rr.tagNameCheck instanceof RegExp&&A(rr.tagNameCheck,bt)||rr.tagNameCheck instanceof Function&&rr.tagNameCheck(bt))))return!1}else if(!v1[Ze]){if(!A(fr,v(bt,Wt,""))){if(!((Ze==="src"||Ze==="xlink:href"||Ze==="href")&&Te!=="script"&&x(bt,"data:")===0&&ib[Te])){if(!(Pa&&!A(pt,v(bt,Wt,"")))){if(bt)return!1}}}}}}return!0},"_isValidAttribute"),CB=s(function(Te){return Te!=="annotation-xml"&&y(Te,ot)},"_isBasicCustomElement"),SB=s(function(Te){Vc("beforeSanitizeAttributes",Te,null);let{attributes:Ze}=Te;if(!Ze)return;let bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Sr},fn=Ze.length;for(;fn--;){let ba=Ze[fn],{name:Zi,namespaceURI:ns,value:Nl}=ba,w1=bi(Zi),Ba=Zi==="value"?Nl:b(Nl);if(bt.attrName=w1,bt.attrValue=Ba,bt.keepAttr=!0,bt.forceKeepAttr=void 0,Vc("uponSanitizeAttribute",Te,bt),Ba=bt.attrValue,co&&A(/((--!?|])>)|<\/(style|title)/i,Ba)){sb(Zi,Te);continue}if(bt.forceKeepAttr||(sb(Zi,Te),!bt.keepAttr))continue;if(!En&&A(/\/>/i,Ba)){sb(Zi,Te);continue}ti&&f([Qe,Dt,qt],AB=>{Ba=v(Ba,AB," ")});let _B=bi(Te.nodeName);if(EB(_B,w1,Ba)){if(Zt&&(w1==="id"||w1==="name")&&(sb(Zi,Te),Ba=me+Ba),Je&&typeof Ie=="object"&&typeof Ie.getAttributeType=="function"&&!ns)switch(Ie.getAttributeType(_B,w1)){case"TrustedHTML":{Ba=Je.createHTML(Ba);break}case"TrustedScriptURL":{Ba=Je.createScriptURL(Ba);break}}try{ns?Te.setAttributeNS(ns,Zi,Ba):Te.setAttribute(Zi,Ba),kB(Te)?Il(Te):d(Se.removed)}catch{}}}Vc("afterSanitizeAttributes",Te,null)},"_sanitizeAttributes"),P1e=s(function St(Te){let Ze=null,bt=bB(Te);for(Vc("beforeSanitizeShadowDOM",Te,null);Ze=bt.nextNode();)Vc("uponSanitizeShadowNode",Ze,null),!TB(Ze)&&(Ze.content instanceof he&&St(Ze.content),SB(Ze));Vc("afterSanitizeShadowDOM",Te,null)},"_sanitizeShadowDOM");return Se.sanitize=function(St){let Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ze=null,bt=null,fn=null,ba=null;if(ab=!St,ab&&(St=""),typeof St!="string"&&!wB(St))if(typeof St.toString=="function"){if(St=St.toString(),typeof St!="string")throw w("dirty is not a string, aborting")}else throw w("toString is not a function");if(!Se.isSupported)return St;if(Rl||Bs(Te),Se.removed=[],typeof St=="string"&&(xe=!1),xe){if(St.nodeName){let Nl=bi(St.nodeName);if(!vt[Nl]||Vn[Nl])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(St instanceof se)Ze=xB(""),bt=Ze.ownerDocument.importNode(St,!0),bt.nodeType===ye.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?Ze=bt:Ze.appendChild(bt);else{if(!at&&!ti&&!uo&&St.indexOf("<")===-1)return Je&&Ft?Je.createHTML(St):St;if(Ze=xB(St),!Ze)return at?null:Ft?We:""}Ze&&ts&&Il(Ze.firstChild);let Zi=bB(xe?St:Ze);for(;fn=Zi.nextNode();)TB(fn)||(fn.content instanceof he&&P1e(fn.content),SB(fn));if(xe)return St;if(at){if(xt)for(ba=Ut.call(Ze.ownerDocument);Ze.firstChild;)ba.appendChild(Ze.firstChild);else ba=Ze;return(Sr.shadowroot||Sr.shadowrootmode)&&(ba=ut.call(Oe,ba,!0)),ba}let ns=uo?Ze.outerHTML:Ze.innerHTML;return uo&&vt["!doctype"]&&Ze.ownerDocument&&Ze.ownerDocument.doctype&&Ze.ownerDocument.doctype.name&&A(K,Ze.ownerDocument.doctype.name)&&(ns=" +`+ns),ti&&f([Qe,Dt,qt],Nl=>{ns=v(ns,Nl," ")}),Je&&Ft?Je.createHTML(ns):ns},Se.setConfig=function(){let St=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Bs(St),Rl=!0},Se.clearConfig=function(){Ml=null,Rl=!1},Se.isValidAttribute=function(St,Te,Ze){Ml||Bs({});let bt=bi(St),fn=bi(Te);return EB(bt,fn,Ze)},Se.addHook=function(St,Te){typeof Te=="function"&&(Rt[St]=Rt[St]||[],p(Rt[St],Te))},Se.removeHook=function(St){if(Rt[St])return d(Rt[St])},Se.removeHooks=function(St){Rt[St]&&(Rt[St]=[])},Se.removeAllHooks=function(){Rt={}},Se}s(oe,"createDOMPurify");var Re=oe();return Re})});var Jz={};ur(Jz,{default:()=>r2e});function mye(t){return String(t).replace(pye,e=>dye[e])}function xye(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Sye(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function az(t){for(var e=0;e=Nb[e]&&t<=Nb[e+1])return!0;return!1}function Bye(t,e){zl[t]=e}function UE(t,e,r){if(!zl[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=zl[e][n];if(!i&&t[0]in AF&&(n=AF[t[0]].charCodeAt(0),i=zl[e][n]),!i&&r==="text"&&az(n)&&(i=zl[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Fye(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!vE[e]){var r=vE[e]={cssEmPerMu:wb.quad[e]/18};for(var n in wb)wb.hasOwnProperty(n)&&(r[n]=wb[n][e])}return vE[e]}function RF(t){if(t instanceof ls)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Vye(t){if(t instanceof Bf)return t;throw new Error("Expected span but got "+String(t)+".")}function B(t,e,r,n,i,a){dn[t][i]={font:e,group:r,replace:n},a&&n&&(dn[t][n]=dn[t][i])}function st(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,l={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},u=0;u0&&(a.push(Lb(o,e)),o=[]),a.push(n[l]));o.length>0&&a.push(Lb(o,e));var h;r?(h=Lb(Ti(r,e,!0)),h.classes=["tag"],a.push(h)):i&&a.push(i);var f=Qc(["katex-html"],a);if(f.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=tt(f.height+f.depth),f.depth&&(d.style.verticalAlign=tt(-f.depth))}return f}function yz(t){return new Pf(t)}function PF(t,e,r,n,i){var a=cs(t,r),o;a.length===1&&a[0]instanceof os&&Mt.contains(["mrow","mtable"],a[0].type)?o=a[0]:o=new Xe.MathNode("mrow",a);var l=new Xe.MathNode("annotation",[new Xe.TextNode(e)]);l.setAttribute("encoding","application/x-tex");var u=new Xe.MathNode("semantics",[o,l]),h=new Xe.MathNode("math",[u]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var f=i?"katex":"katex-mathml";return Ae.makeSpan([f],[h])}function Jt(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function YE(t){var e=Wb(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function Wb(t){return t&&(t.type==="atom"||qye.hasOwnProperty(t.type))?t:null}function kz(t,e){var r=Ti(t.body,e,!0);return bve([t.mclass],r,e)}function wz(t,e){var r,n=cs(t.body,e);return t.mclass==="minner"?r=new Xe.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new Xe.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new Xe.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function Tve(t,e,r){var n=kve[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[a],[]),l=r.callFunction("\\\\cdright",[e[1]],[]),u={type:"ordgroup",mode:"math",body:[i,o,l]};return r.callFunction("\\\\cdparent",[u],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Eve(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new je("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(h)>-1)for(var d=0;d<2;d++){for(var p=!0,m=u+1;mAV=|." after @',o[u]);var g=Tve(h,f,t),y={type:"styling",body:[g],mode:"math",style:"display"};n.push(y),l=BF()}a%2===0?n.push(l):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var v=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function Yb(t,e){var r=Wb(t);if(r&&Mt.contains(Bve,r.text))return r;throw r?new je("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new je("Invalid delimiter type '"+t.type+"'",t)}function $F(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function Gl(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=t,l={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},u=0;u1||!f)&&y.pop(),x.length{"use strict";$s=class t{static{s(this,"SourceLocation")}constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new t(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},go=class t{static{s(this,"Token")}constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new t(r,$s.range(this,e))}},je=class t{static{s(this,"ParseError")}constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,o=r&&r.loc;if(o&&o.start<=o.end){var l=o.lexer.input;i=o.start,a=o.end,i===l.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var u=l.slice(i,a).replace(/[^]/g,"$&\u0332"),h;i>15?h="\u2026"+l.slice(i-15,i):h=l.slice(0,i);var f;a+15":">","<":"<",'"':""","'":"'"},pye=/[&><"']/g;s(mye,"escape");iz=s(function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},"getBaseElem"),gye=s(function(e){var r=iz(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},"isCharacterBox"),yye=s(function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},"assert"),vye=s(function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},"protocolFromUrl"),Mt={contains:cye,deflt:uye,escape:mye,hyphenate:fye,getBaseElem:iz,isCharacterBox:gye,protocolFromUrl:vye},Ib={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:s(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:s((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:s(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s(t=>Math.max(0,t),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:s(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand ",cliProcessor:s(t=>t==="Infinity"?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};s(xye,"getDefaultValue");F1=class{static{s(this,"Settings")}constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in Ib)if(Ib.hasOwnProperty(r)){var n=Ib[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:xye(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new je("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=Mt.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}},Bl=class{static{s(this,"Style")}constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return Fl[bye[this.id]]}sub(){return Fl[kye[this.id]]}fracNum(){return Fl[wye[this.id]]}fracDen(){return Fl[Tye[this.id]]}cramp(){return Fl[Eye[this.id]]}text(){return Fl[Cye[this.id]]}isTight(){return this.size>=2}},VE=0,Ob=1,ep=2,jc=3,z1=4,mo=5,tp=6,za=7,Fl=[new Bl(VE,0,!1),new Bl(Ob,0,!0),new Bl(ep,1,!1),new Bl(jc,1,!0),new Bl(z1,2,!1),new Bl(mo,2,!0),new Bl(tp,3,!1),new Bl(za,3,!0)],bye=[z1,mo,z1,mo,tp,za,tp,za],kye=[mo,mo,mo,mo,za,za,za,za],wye=[ep,jc,z1,mo,tp,za,tp,za],Tye=[jc,jc,mo,mo,za,za,za,za],Eye=[Ob,Ob,jc,jc,mo,mo,za,za],Cye=[VE,Ob,ep,jc,ep,jc,ep,jc],Nt={DISPLAY:Fl[VE],TEXT:Fl[ep],SCRIPT:Fl[z1],SCRIPTSCRIPT:Fl[tp]},DE=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];s(Sye,"scriptFromCodepoint");Nb=[];DE.forEach(t=>t.blocks.forEach(e=>Nb.push(...e)));s(az,"supportedCodepoint");J0=80,_ye=s(function(e,r){return"M95,"+(622+e+r)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),Aye=s(function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),Lye=s(function(e,r){return"M983 "+(10+e+r)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),Dye=s(function(e,r){return"M424,"+(2398+e+r)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+` +h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),Rye=s(function(e,r){return"M473,"+(2713+e+r)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),Mye=s(function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Iye=s(function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},"sqrtTall"),Nye=s(function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=_ye(r,J0);break;case"sqrtSize1":i=Aye(r,J0);break;case"sqrtSize2":i=Lye(r,J0);break;case"sqrtSize3":i=Dye(r,J0);break;case"sqrtSize4":i=Rye(r,J0);break;case"sqrtTall":i=Iye(r,J0,n)}return i},"sqrtPath"),Oye=s(function(e,r){switch(e){case"\u239C":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"\u2223":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"\u2225":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"\u239F":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"\u23A2":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"\u23A5":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"\u23AA":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"\u23D0":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"\u2016":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},"innerPath"),_F={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Pye=s(function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z +M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z +M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z +M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),Pf=class{static{s(this,"DocumentFragment")}constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Mt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),r=0;rr.toText(),"toText");return this.children.map(e).join("")}},zl={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},wb={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},AF={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};s(Bye,"setFontMetrics");s(UE,"getCharacterMetrics");vE={};s(Fye,"getGlobalMetrics");zye=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],LF=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],DF=s(function(e,r){return r.size<2?e:zye[e-1][r.size-1]},"sizeAtStyle"),Pb=class t{static{s(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||t.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=LF[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new t(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:DF(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:LF[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=DF(t.BASESIZE,e);return this.size===r&&this.textSize===t.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==t.BASESIZE?["sizing","reset-size"+this.size,"size"+t.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Fye(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Pb.BASESIZE=6;RE={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},$ye={ex:!0,em:!0,mu:!0},sz=s(function(e){return typeof e!="string"&&(e=e.unit),e in RE||e in $ye||e==="ex"},"validUnit"),Bn=s(function(e,r){var n;if(e.unit in RE)n=RE[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new je("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},"calculateSize"),tt=s(function(e){return+e.toFixed(4)+"em"},"makeEm"),oh=s(function(e){return e.filter(r=>r).join(" ")},"createClass"),oz=s(function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},"initNode"),lz=s(function(e){var r=document.createElement(e);r.className=oh(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a",r},"toMarkup"),Bf=class{static{s(this,"Span")}constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,oz.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Mt.contains(this.classes,e)}toNode(){return lz.call(this,"span")}toMarkup(){return cz.call(this,"span")}},$1=class{static{s(this,"Anchor")}constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,oz.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return Mt.contains(this.classes,e)}toNode(){return lz.call(this,"a")}toMarkup(){return cz.call(this,"a")}},ME=class{static{s(this,"Img")}constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Mt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e=''+Mt.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=tt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=oh(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Mt.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+Mt.escape(n)+'"');var a=Mt.escape(this.text);return e?(r+=">",r+=a,r+="",r):a}},Xo=class{static{s(this,"SvgNode")}constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}},G1=class{static{s(this,"LineNode")}constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="","\\gt",!0);B(G,Y,ve,"\u2208","\\in",!0);B(G,Y,ve,"\uE020","\\@not");B(G,Y,ve,"\u2282","\\subset",!0);B(G,Y,ve,"\u2283","\\supset",!0);B(G,Y,ve,"\u2286","\\subseteq",!0);B(G,Y,ve,"\u2287","\\supseteq",!0);B(G,ge,ve,"\u2288","\\nsubseteq",!0);B(G,ge,ve,"\u2289","\\nsupseteq",!0);B(G,Y,ve,"\u22A8","\\models");B(G,Y,ve,"\u2190","\\leftarrow",!0);B(G,Y,ve,"\u2264","\\le");B(G,Y,ve,"\u2264","\\leq",!0);B(G,Y,ve,"<","\\lt",!0);B(G,Y,ve,"\u2192","\\rightarrow",!0);B(G,Y,ve,"\u2192","\\to");B(G,ge,ve,"\u2271","\\ngeq",!0);B(G,ge,ve,"\u2270","\\nleq",!0);B(G,Y,Jc,"\xA0","\\ ");B(G,Y,Jc,"\xA0","\\space");B(G,Y,Jc,"\xA0","\\nobreakspace");B(Ye,Y,Jc,"\xA0","\\ ");B(Ye,Y,Jc,"\xA0"," ");B(Ye,Y,Jc,"\xA0","\\space");B(Ye,Y,Jc,"\xA0","\\nobreakspace");B(G,Y,Jc,null,"\\nobreak");B(G,Y,Jc,null,"\\allowbreak");B(G,Y,Ub,",",",");B(G,Y,Ub,";",";");B(G,ge,lt,"\u22BC","\\barwedge",!0);B(G,ge,lt,"\u22BB","\\veebar",!0);B(G,Y,lt,"\u2299","\\odot",!0);B(G,Y,lt,"\u2295","\\oplus",!0);B(G,Y,lt,"\u2297","\\otimes",!0);B(G,Y,ke,"\u2202","\\partial",!0);B(G,Y,lt,"\u2298","\\oslash",!0);B(G,ge,lt,"\u229A","\\circledcirc",!0);B(G,ge,lt,"\u22A1","\\boxdot",!0);B(G,Y,lt,"\u25B3","\\bigtriangleup");B(G,Y,lt,"\u25BD","\\bigtriangledown");B(G,Y,lt,"\u2020","\\dagger");B(G,Y,lt,"\u22C4","\\diamond");B(G,Y,lt,"\u22C6","\\star");B(G,Y,lt,"\u25C3","\\triangleleft");B(G,Y,lt,"\u25B9","\\triangleright");B(G,Y,Gs,"{","\\{");B(Ye,Y,ke,"{","\\{");B(Ye,Y,ke,"{","\\textbraceleft");B(G,Y,$a,"}","\\}");B(Ye,Y,ke,"}","\\}");B(Ye,Y,ke,"}","\\textbraceright");B(G,Y,Gs,"{","\\lbrace");B(G,Y,$a,"}","\\rbrace");B(G,Y,Gs,"[","\\lbrack",!0);B(Ye,Y,ke,"[","\\lbrack",!0);B(G,Y,$a,"]","\\rbrack",!0);B(Ye,Y,ke,"]","\\rbrack",!0);B(G,Y,Gs,"(","\\lparen",!0);B(G,Y,$a,")","\\rparen",!0);B(Ye,Y,ke,"<","\\textless",!0);B(Ye,Y,ke,">","\\textgreater",!0);B(G,Y,Gs,"\u230A","\\lfloor",!0);B(G,Y,$a,"\u230B","\\rfloor",!0);B(G,Y,Gs,"\u2308","\\lceil",!0);B(G,Y,$a,"\u2309","\\rceil",!0);B(G,Y,ke,"\\","\\backslash");B(G,Y,ke,"\u2223","|");B(G,Y,ke,"\u2223","\\vert");B(Ye,Y,ke,"|","\\textbar",!0);B(G,Y,ke,"\u2225","\\|");B(G,Y,ke,"\u2225","\\Vert");B(Ye,Y,ke,"\u2225","\\textbardbl");B(Ye,Y,ke,"~","\\textasciitilde");B(Ye,Y,ke,"\\","\\textbackslash");B(Ye,Y,ke,"^","\\textasciicircum");B(G,Y,ve,"\u2191","\\uparrow",!0);B(G,Y,ve,"\u21D1","\\Uparrow",!0);B(G,Y,ve,"\u2193","\\downarrow",!0);B(G,Y,ve,"\u21D3","\\Downarrow",!0);B(G,Y,ve,"\u2195","\\updownarrow",!0);B(G,Y,ve,"\u21D5","\\Updownarrow",!0);B(G,Y,hi,"\u2210","\\coprod");B(G,Y,hi,"\u22C1","\\bigvee");B(G,Y,hi,"\u22C0","\\bigwedge");B(G,Y,hi,"\u2A04","\\biguplus");B(G,Y,hi,"\u22C2","\\bigcap");B(G,Y,hi,"\u22C3","\\bigcup");B(G,Y,hi,"\u222B","\\int");B(G,Y,hi,"\u222B","\\intop");B(G,Y,hi,"\u222C","\\iint");B(G,Y,hi,"\u222D","\\iiint");B(G,Y,hi,"\u220F","\\prod");B(G,Y,hi,"\u2211","\\sum");B(G,Y,hi,"\u2A02","\\bigotimes");B(G,Y,hi,"\u2A01","\\bigoplus");B(G,Y,hi,"\u2A00","\\bigodot");B(G,Y,hi,"\u222E","\\oint");B(G,Y,hi,"\u222F","\\oiint");B(G,Y,hi,"\u2230","\\oiiint");B(G,Y,hi,"\u2A06","\\bigsqcup");B(G,Y,hi,"\u222B","\\smallint");B(Ye,Y,rp,"\u2026","\\textellipsis");B(G,Y,rp,"\u2026","\\mathellipsis");B(Ye,Y,rp,"\u2026","\\ldots",!0);B(G,Y,rp,"\u2026","\\ldots",!0);B(G,Y,rp,"\u22EF","\\@cdots",!0);B(G,Y,rp,"\u22F1","\\ddots",!0);B(G,Y,ke,"\u22EE","\\varvdots");B(G,Y,Ln,"\u02CA","\\acute");B(G,Y,Ln,"\u02CB","\\grave");B(G,Y,Ln,"\xA8","\\ddot");B(G,Y,Ln,"~","\\tilde");B(G,Y,Ln,"\u02C9","\\bar");B(G,Y,Ln,"\u02D8","\\breve");B(G,Y,Ln,"\u02C7","\\check");B(G,Y,Ln,"^","\\hat");B(G,Y,Ln,"\u20D7","\\vec");B(G,Y,Ln,"\u02D9","\\dot");B(G,Y,Ln,"\u02DA","\\mathring");B(G,Y,It,"\uE131","\\@imath");B(G,Y,It,"\uE237","\\@jmath");B(G,Y,ke,"\u0131","\u0131");B(G,Y,ke,"\u0237","\u0237");B(Ye,Y,ke,"\u0131","\\i",!0);B(Ye,Y,ke,"\u0237","\\j",!0);B(Ye,Y,ke,"\xDF","\\ss",!0);B(Ye,Y,ke,"\xE6","\\ae",!0);B(Ye,Y,ke,"\u0153","\\oe",!0);B(Ye,Y,ke,"\xF8","\\o",!0);B(Ye,Y,ke,"\xC6","\\AE",!0);B(Ye,Y,ke,"\u0152","\\OE",!0);B(Ye,Y,ke,"\xD8","\\O",!0);B(Ye,Y,Ln,"\u02CA","\\'");B(Ye,Y,Ln,"\u02CB","\\`");B(Ye,Y,Ln,"\u02C6","\\^");B(Ye,Y,Ln,"\u02DC","\\~");B(Ye,Y,Ln,"\u02C9","\\=");B(Ye,Y,Ln,"\u02D8","\\u");B(Ye,Y,Ln,"\u02D9","\\.");B(Ye,Y,Ln,"\xB8","\\c");B(Ye,Y,Ln,"\u02DA","\\r");B(Ye,Y,Ln,"\u02C7","\\v");B(Ye,Y,Ln,"\xA8",'\\"');B(Ye,Y,Ln,"\u02DD","\\H");B(Ye,Y,Ln,"\u25EF","\\textcircled");uz={"--":!0,"---":!0,"``":!0,"''":!0};B(Ye,Y,ke,"\u2013","--",!0);B(Ye,Y,ke,"\u2013","\\textendash");B(Ye,Y,ke,"\u2014","---",!0);B(Ye,Y,ke,"\u2014","\\textemdash");B(Ye,Y,ke,"\u2018","`",!0);B(Ye,Y,ke,"\u2018","\\textquoteleft");B(Ye,Y,ke,"\u2019","'",!0);B(Ye,Y,ke,"\u2019","\\textquoteright");B(Ye,Y,ke,"\u201C","``",!0);B(Ye,Y,ke,"\u201C","\\textquotedblleft");B(Ye,Y,ke,"\u201D","''",!0);B(Ye,Y,ke,"\u201D","\\textquotedblright");B(G,Y,ke,"\xB0","\\degree",!0);B(Ye,Y,ke,"\xB0","\\degree");B(Ye,Y,ke,"\xB0","\\textdegree",!0);B(G,Y,ke,"\xA3","\\pounds");B(G,Y,ke,"\xA3","\\mathsterling",!0);B(Ye,Y,ke,"\xA3","\\pounds");B(Ye,Y,ke,"\xA3","\\textsterling",!0);B(G,ge,ke,"\u2720","\\maltese");B(Ye,ge,ke,"\u2720","\\maltese");MF='0123456789/@."';for(Tb=0;Tb0)return Yo(a,h,i,r,o.concat(f));if(u){var d,p;if(u==="boldsymbol"){var m=Yye(a,i,r,o,n);d=m.fontName,p=[m.fontClass]}else l?(d=dz[u].fontName,p=[u]):(d=Ab(u,r.fontWeight,r.fontShape),p=[u,r.fontWeight,r.fontShape]);if(qb(a,d,i).metrics)return Yo(a,d,i,r,o.concat(p));if(uz.hasOwnProperty(a)&&d.slice(0,10)==="Typewriter"){for(var g=[],y=0;y{if(oh(t.classes)!==oh(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},"canCombine"),Kye=s(t=>{for(var e=0;er&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},"sizeElementFromChildren"),ss=s(function(e,r,n,i){var a=new Bf(e,r,n,i);return qE(a),a},"makeSpan"),hz=s((t,e,r,n)=>new Bf(t,e,r,n),"makeSvgSpan"),Qye=s(function(e,r,n){var i=ss([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=tt(i.height),i.maxFontSize=1,i},"makeLineSpan"),Zye=s(function(e,r,n,i){var a=new $1(e,r,n,i);return qE(a),a},"makeAnchor"),fz=s(function(e){var r=new Pf(e);return qE(r),r},"makeFragment"),Jye=s(function(e,r){return e instanceof Pf?ss([],[e],r):e},"wrapFragment"),eve=s(function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,o=1;o{var r=ss(["mspace"],[],e),n=Bn(t,e);return r.style.marginRight=tt(n),r},"makeGlue"),Ab=s(function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},"retrieveTextFontName"),dz={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},pz={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nve=s(function(e,r){var[n,i,a]=pz[e],o=new $l(n),l=new Xo([o],{width:tt(i),height:tt(a),style:"width:"+tt(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),u=hz(["overlay"],[l],r);return u.height=a,u.style.height=tt(a),u.style.width=tt(i),u},"staticSvg"),Ae={fontMap:dz,makeSymbol:Yo,mathsym:Hye,makeSpan:ss,makeSvgSpan:hz,makeLineSpan:Qye,makeAnchor:Zye,makeFragment:fz,wrapFragment:Jye,makeVList:tve,makeOrd:Xye,makeGlue:rve,staticSvg:nve,svgData:pz,tryCombineChars:Kye},Pn={number:3,unit:"mu"},Nf={number:4,unit:"mu"},Xc={number:5,unit:"mu"},ive={mord:{mop:Pn,mbin:Nf,mrel:Xc,minner:Pn},mop:{mord:Pn,mop:Pn,mrel:Xc,minner:Pn},mbin:{mord:Nf,mop:Nf,mopen:Nf,minner:Nf},mrel:{mord:Xc,mop:Xc,mopen:Xc,minner:Xc},mopen:{},mclose:{mop:Pn,mbin:Nf,mrel:Xc,minner:Pn},mpunct:{mord:Pn,mop:Pn,mrel:Xc,mopen:Pn,mclose:Pn,mpunct:Pn,minner:Pn},minner:{mord:Pn,mop:Pn,mbin:Nf,mrel:Xc,mopen:Pn,mpunct:Pn,minner:Pn}},ave={mord:{mop:Pn},mop:{mord:Pn,mop:Pn},mbin:{},mrel:{},mopen:{},mclose:{mop:Pn},mpunct:{},minner:{mop:Pn}},mz={},Fb={},zb={};s(st,"defineFunction");s(Ff,"defineFunctionBuilders");$b=s(function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},"normalizeArgument"),ni=s(function(e){return e.type==="ordgroup"?e.body:[e]},"ordargument"),Qc=Ae.makeSpan,sve=["leftmost","mbin","mopen","mrel","mop","mpunct"],ove=["rightmost","mrel","mclose","mpunct"],lve={display:Nt.DISPLAY,text:Nt.TEXT,script:Nt.SCRIPT,scriptscript:Nt.SCRIPTSCRIPT},cve={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ti=s(function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],o=0;o{var v=y.classes[0],x=g.classes[0];v==="mbin"&&Mt.contains(ove,x)?y.classes[0]="mord":x==="mbin"&&Mt.contains(sve,v)&&(g.classes[0]="mord")},{node:d},p,m),OF(a,(g,y)=>{var v=NE(y),x=NE(g),b=v&&x?g.hasClass("mtight")?ave[v][x]:ive[v][x]:null;if(b)return Ae.makeGlue(b,h)},{node:d},p,m),a},"buildExpression"),OF=s(function t(e,r,n,i,a){i&&e.push(i);for(var o=0;op=>{e.splice(d+1,0,p),o++})(o)}i&&e.pop()},"traverseNonSpaceNodes"),gz=s(function(e){return e instanceof Pf||e instanceof $1||e instanceof Bf&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),uve=s(function t(e,r){var n=gz(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},"getOutermostNode"),NE=s(function(e,r){return e?(r&&(e=uve(e,r)),cve[e.classes[0]]||null):null},"getTypeOfDomTree"),V1=s(function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Qc(r.concat(n))},"makeNullDelimiter"),vr=s(function(e,r,n){if(!e)return Qc();if(Fb[e.type]){var i=Fb[e.type](e,r);if(n&&r.size!==n.size){i=Qc(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new je("Got group of unknown type: '"+e.type+"'")},"buildGroup");s(Lb,"buildHTMLUnbreakable");s(OE,"buildHTML");s(yz,"newDocumentFragment");os=class{static{s(this,"MathNode")}constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=oh(this.classes));for(var n=0;n0&&(e+=' class ="'+Mt.escape(oh(this.classes))+'"'),e+=">";for(var n=0;n",e}toText(){return this.children.map(e=>e.toText()).join("")}},Of=class{static{s(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Mt.escape(this.toText())}toText(){return this.text}},PE=class{static{s(this,"SpaceNode")}constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",tt(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},Xe={MathNode:os,TextNode:Of,SpaceNode:PE,newDocumentFragment:yz},yo=s(function(e,r,n){return dn[r][e]&&dn[r][e].replace&&e.charCodeAt(0)!==55349&&!(uz.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=dn[r][e].replace),new Xe.TextNode(e)},"makeText"),WE=s(function(e){return e.length===1?e[0]:new Xe.MathNode("mrow",e)},"makeRow"),HE=s(function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(Mt.contains(["\\imath","\\jmath"],a))return null;dn[i][a]&&dn[i][a].replace&&(a=dn[i][a].replace);var o=Ae.fontMap[n].fontName;return UE(a,o,i)?Ae.fontMap[n].variant:null},"getVariant"),cs=s(function(e,r,n){if(e.length===1){var i=nn(e[0],r);return n&&i instanceof os&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o,l=0;l0&&(d.text=d.text.slice(0,1)+"\u0338"+d.text.slice(1),a.pop())}}}a.push(u),o=u}return a},"buildExpression"),lh=s(function(e,r,n){return WE(cs(e,r,n))},"buildExpressionRow"),nn=s(function(e,r){if(!e)return new Xe.MathNode("mrow");if(zb[e.type]){var n=zb[e.type](e,r);return n}else throw new je("Got group of unknown type: '"+e.type+"'")},"buildGroup");s(PF,"buildMathML");vz=s(function(e){return new Pb({style:e.displayMode?Nt.DISPLAY:Nt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),xz=s(function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=Ae.makeSpan(n,[e])}return e},"displayWrap"),hve=s(function(e,r,n){var i=vz(n),a;if(n.output==="mathml")return PF(e,r,i,n.displayMode,!0);if(n.output==="html"){var o=OE(e,i);a=Ae.makeSpan(["katex"],[o])}else{var l=PF(e,r,i,n.displayMode,!1),u=OE(e,i);a=Ae.makeSpan(["katex"],[l,u])}return xz(a,n)},"buildTree"),fve=s(function(e,r,n){var i=vz(n),a=OE(e,i),o=Ae.makeSpan(["katex"],[a]);return xz(o,n)},"buildHTMLTree"),dve={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},pve=s(function(e){var r=new Xe.MathNode("mo",[new Xe.TextNode(dve[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},"mathMLnode"),mve={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},gve=s(function(e){return e.type==="ordgroup"?e.body.length:1},"groupLength"),yve=s(function(e,r){function n(){var l=4e5,u=e.label.slice(1);if(Mt.contains(["widehat","widecheck","widetilde","utilde"],u)){var h=e,f=gve(h.base),d,p,m;if(f>5)u==="widehat"||u==="widecheck"?(d=420,l=2364,m=.42,p=u+"4"):(d=312,l=2340,m=.34,p="tilde4");else{var g=[1,1,2,2,3,3][f];u==="widehat"||u==="widecheck"?(l=[0,1062,2364,2364,2364][g],d=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],p=u+g):(l=[0,600,1033,2339,2340][g],d=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],p="tilde"+g)}var y=new $l(p),v=new Xo([y],{width:"100%",height:tt(m),viewBox:"0 0 "+l+" "+d,preserveAspectRatio:"none"});return{span:Ae.makeSvgSpan([],[v],r),minWidth:0,height:m}}else{var x=[],b=mve[u],[k,A,w]=b,T=w/1e3,C=k.length,E,S;if(C===1){var R=b[3];E=["hide-tail"],S=[R]}else if(C===2)E=["halfarrow-left","halfarrow-right"],S=["xMinYMin","xMaxYMin"];else if(C===3)E=["brace-left","brace-center","brace-right"],S=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+C+" children.");for(var D=0;D0&&(i.style.minWidth=tt(a)),i},"svgSpan"),vve=s(function(e,r,n,i,a){var o,l=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(o=Ae.makeSpan(["stretchy",r],[],a),r==="fbox"){var u=a.color&&a.getColor();u&&(o.style.borderColor=u)}}else{var h=[];/^[bx]cancel$/.test(r)&&h.push(new G1({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&h.push(new G1({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new Xo(h,{width:"100%",height:tt(l)});o=Ae.makeSvgSpan([],[f],a)}return o.height=l,o.style.height=tt(l),o},"encloseSpan"),Zc={encloseSpan:vve,mathMLnode:pve,svgSpan:yve};s(Jt,"assertNodeType");s(YE,"assertSymbolNodeType");s(Wb,"checkSymbolNodeType");XE=s((t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=Jt(t.base,"accent"),r=n.base,t.base=r,i=Vye(vr(t,e)),t.base=n):(n=Jt(t,"accent"),r=n.base);var a=vr(r,e.havingCrampedStyle()),o=n.isShifty&&Mt.isCharacterBox(r),l=0;if(o){var u=Mt.getBaseElem(r),h=vr(u,e.havingCrampedStyle());l=RF(h).skew}var f=n.label==="\\c",d=f?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=Zc.svgSpan(n,e),p=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+tt(2*l)+")",marginLeft:tt(2*l)}:void 0}]},e);else{var m,g;n.label==="\\vec"?(m=Ae.staticSvg("vec",e),g=Ae.svgData.vec[1]):(m=Ae.makeOrd({mode:n.mode,text:n.label},e,"textord"),m=RF(m),m.italic=0,g=m.width,f&&(d+=m.depth)),p=Ae.makeSpan(["accent-body"],[m]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),d=a.height);var v=l;y||(v-=g/2),p.style.left=tt(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-d},{type:"elem",elem:p}]},e)}var x=Ae.makeSpan(["mord","accent"],[p],e);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x},"htmlBuilder$a"),bz=s((t,e)=>{var r=t.isStretchy?Zc.mathMLnode(t.label):new Xe.MathNode("mo",[yo(t.label,t.mode)]),n=new Xe.MathNode("mover",[nn(t.base,e),r]);return n.setAttribute("accent","true"),n},"mathmlBuilder$9"),xve=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));st({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:s((t,e)=>{var r=$b(e[0]),n=!xve.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},"handler"),htmlBuilder:XE,mathmlBuilder:bz});st({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:s((t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},"handler"),htmlBuilder:XE,mathmlBuilder:bz});st({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},"handler"),htmlBuilder:s((t,e)=>{var r=vr(t.base,e),n=Zc.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=Ae.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return Ae.makeSpan(["mord","accentunder"],[a],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=Zc.mathMLnode(t.label),n=new Xe.MathNode("munder",[nn(t.base,e),r]);return n.setAttribute("accentunder","true"),n},"mathmlBuilder")});Db=s(t=>{var e=new Xe.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e},"paddedNode");st({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=Ae.wrapFragment(vr(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var o;t.below&&(n=e.havingStyle(r.sub()),o=Ae.wrapFragment(vr(t.below,n,e),e),o.classes.push(a+"-arrow-pad"));var l=Zc.svgSpan(t,e),u=-e.fontMetrics().axisHeight+.5*l.height,h=-e.fontMetrics().axisHeight-.5*l.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(h-=i.depth);var f;if(o){var d=-e.fontMetrics().axisHeight+o.height+.5*l.height+.111;f=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u},{type:"elem",elem:o,shift:d}]},e)}else f=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u}]},e);return f.children[0].children[0].children[1].classes.push("svg-align"),Ae.makeSpan(["mrel","x-arrow"],[f],e)},mathmlBuilder(t,e){var r=Zc.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=Db(nn(t.body,e));if(t.below){var a=Db(nn(t.below,e));n=new Xe.MathNode("munderover",[r,a,i])}else n=new Xe.MathNode("mover",[r,i])}else if(t.below){var o=Db(nn(t.below,e));n=new Xe.MathNode("munder",[r,o])}else n=Db(),n=new Xe.MathNode("mover",[r,n]);return n}});bve=Ae.makeSpan;s(kz,"htmlBuilder$9");s(wz,"mathmlBuilder$8");st({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:ni(i),isCharacterBox:Mt.isCharacterBox(i)}},htmlBuilder:kz,mathmlBuilder:wz});Hb=s(t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"},"binrelClass");st({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:Hb(e[0]),body:ni(e[1]),isCharacterBox:Mt.isCharacterBox(e[1])}}});st({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],o;n!=="\\stackrel"?o=Hb(i):o="mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:ni(i)},u={type:"supsub",mode:a.mode,base:l,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:o,body:[u],isCharacterBox:Mt.isCharacterBox(u)}},htmlBuilder:kz,mathmlBuilder:wz});st({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:Hb(e[0]),body:ni(e[0])}},htmlBuilder(t,e){var r=Ti(t.body,e,!0),n=Ae.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=cs(t.body,e),n=new Xe.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});kve={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},BF=s(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),FF=s(t=>t.type==="textord"&&t.text==="@","isStartOfArrow"),wve=s((t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e,"isLabelEnd");s(Tve,"cdArrow");s(Eve,"parseCD");st({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Ae.wrapFragment(vr(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=tt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new Xe.MathNode("mrow",[nn(t.label,e)]);return r=new Xe.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Xe.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});st({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=Ae.wrapFragment(vr(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new Xe.MathNode("mrow",[nn(t.fragment,e)])}});st({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=Jt(e[0],"ordgroup"),i=n.body,a="",o=0;o=1114111)throw new je("\\@char with invalid code point "+a);return u<=65535?h=String.fromCharCode(u):(u-=65536,h=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:h}}});Tz=s((t,e)=>{var r=Ti(t.body,e.withColor(t.color),!1);return Ae.makeFragment(r)},"htmlBuilder$8"),Ez=s((t,e)=>{var r=cs(t.body,e.withColor(t.color)),n=new Xe.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n},"mathmlBuilder$7");st({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=Jt(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:ni(i)}},htmlBuilder:Tz,mathmlBuilder:Ez});st({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=Jt(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:Tz,mathmlBuilder:Ez});st({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Jt(i,"size").value}},htmlBuilder(t,e){var r=Ae.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=tt(Bn(t.size,e)))),r},mathmlBuilder(t,e){var r=new Xe.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",tt(Bn(t.size,e)))),r}});BE={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Cz=s(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new je("Expected a control sequence",t);return e},"checkControlSequence"),Cve=s(t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},"getRHS"),Sz=s((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"letCommand");st({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(BE[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=BE[n.text]),Jt(e.parseFunction(),"internal");throw new je("Invalid token after macro prefix",n)}});st({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new je("Expected a control sequence",n);for(var a=0,o,l=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),l[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new je('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new je('Argument number "'+n.text+'" out of order');a++,l.push([])}else{if(n.text==="EOF")throw new je("Expected a macro definition");l[a].push(n.text)}var{tokens:u}=e.gullet.consumeArg();return o&&u.unshift(o),(r==="\\edef"||r==="\\xdef")&&(u=e.gullet.expandTokens(u),u.reverse()),e.gullet.macros.set(i,{tokens:u,numArgs:a,delimiters:l},r===BE[r]),{type:"internal",mode:e.mode}}});st({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Cz(e.gullet.popToken());e.gullet.consumeSpaces();var i=Cve(e);return Sz(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});st({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Cz(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return Sz(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});P1=s(function(e,r,n){var i=dn.math[e]&&dn.math[e].replace,a=UE(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},"getMetrics"),jE=s(function(e,r,n,i){var a=n.havingBaseStyle(r),o=Ae.makeSpan(i.concat(a.sizingClasses(n)),[e],n),l=a.sizeMultiplier/n.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},"styleWrap"),_z=s(function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=tt(a),e.height-=a,e.depth+=a},"centerSpan"),Sve=s(function(e,r,n,i,a,o){var l=Ae.makeSymbol(e,"Main-Regular",a,i),u=jE(l,r,i,o);return n&&_z(u,i,r),u},"makeSmallDelim"),_ve=s(function(e,r,n,i){return Ae.makeSymbol(e,"Size"+r+"-Regular",n,i)},"mathrmSize"),Az=s(function(e,r,n,i,a,o){var l=_ve(e,r,a,i),u=jE(Ae.makeSpan(["delimsizing","size"+r],[l],i),Nt.TEXT,i,o);return n&&_z(u,i,Nt.TEXT),u},"makeLargeDelim"),kE=s(function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Ae.makeSpan(["delimsizinginner",i],[Ae.makeSpan([],[Ae.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},"makeGlyphSpan"),wE=s(function(e,r,n){var i=zl["Size4-Regular"][e.charCodeAt(0)]?zl["Size4-Regular"][e.charCodeAt(0)][4]:zl["Size1-Regular"][e.charCodeAt(0)][4],a=new $l("inner",Oye(e,Math.round(1e3*r))),o=new Xo([a],{width:tt(i),height:tt(r),style:"width:"+tt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=Ae.makeSvgSpan([],[o],n);return l.height=r,l.style.height=tt(r),l.style.width=tt(i),{type:"elem",elem:l}},"makeInner"),FE=.008,Rb={type:"kern",size:-1*FE},Ave=["|","\\lvert","\\rvert","\\vert"],Lve=["\\|","\\lVert","\\rVert","\\Vert"],Lz=s(function(e,r,n,i,a,o){var l,u,h,f,d="",p=0;l=h=f=e,u=null;var m="Size1-Regular";e==="\\uparrow"?h=f="\u23D0":e==="\\Uparrow"?h=f="\u2016":e==="\\downarrow"?l=h="\u23D0":e==="\\Downarrow"?l=h="\u2016":e==="\\updownarrow"?(l="\\uparrow",h="\u23D0",f="\\downarrow"):e==="\\Updownarrow"?(l="\\Uparrow",h="\u2016",f="\\Downarrow"):Mt.contains(Ave,e)?(h="\u2223",d="vert",p=333):Mt.contains(Lve,e)?(h="\u2225",d="doublevert",p=556):e==="["||e==="\\lbrack"?(l="\u23A1",h="\u23A2",f="\u23A3",m="Size4-Regular",d="lbrack",p=667):e==="]"||e==="\\rbrack"?(l="\u23A4",h="\u23A5",f="\u23A6",m="Size4-Regular",d="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(h=l="\u23A2",f="\u23A3",m="Size4-Regular",d="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(l="\u23A1",h=f="\u23A2",m="Size4-Regular",d="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(h=l="\u23A5",f="\u23A6",m="Size4-Regular",d="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(l="\u23A4",h=f="\u23A5",m="Size4-Regular",d="rceil",p=667):e==="("||e==="\\lparen"?(l="\u239B",h="\u239C",f="\u239D",m="Size4-Regular",d="lparen",p=875):e===")"||e==="\\rparen"?(l="\u239E",h="\u239F",f="\u23A0",m="Size4-Regular",d="rparen",p=875):e==="\\{"||e==="\\lbrace"?(l="\u23A7",u="\u23A8",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(l="\u23AB",u="\u23AC",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(l="\u23A7",f="\u23A9",h="\u23AA",m="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(l="\u23AB",f="\u23AD",h="\u23AA",m="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(l="\u23A7",f="\u23AD",h="\u23AA",m="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(l="\u23AB",f="\u23A9",h="\u23AA",m="Size4-Regular");var g=P1(l,m,a),y=g.height+g.depth,v=P1(h,m,a),x=v.height+v.depth,b=P1(f,m,a),k=b.height+b.depth,A=0,w=1;if(u!==null){var T=P1(u,m,a);A=T.height+T.depth,w=2}var C=y+k+A,E=Math.max(0,Math.ceil((r-C)/(w*x))),S=C+E*w*x,R=i.fontMetrics().axisHeight;n&&(R*=i.sizeMultiplier);var D=S/2-R,L=[];if(d.length>0){var P=S-y-k,M=Math.round(S*1e3),F=Pye(d,Math.round(P*1e3)),I=new $l(d,F),O=(p/1e3).toFixed(3)+"em",z=(M/1e3).toFixed(3)+"em",N=new Xo([I],{width:O,height:z,viewBox:"0 0 "+p+" "+M}),U=Ae.makeSvgSpan([],[N],i);U.height=M/1e3,U.style.width=O,U.style.height=z,L.push({type:"elem",elem:U})}else{if(L.push(kE(f,m,a)),L.push(Rb),u===null){var $=S-y-k+2*FE;L.push(wE(h,$,i))}else{var W=(S-y-k-A)/2+2*FE;L.push(wE(h,W,i)),L.push(Rb),L.push(kE(u,m,a)),L.push(Rb),L.push(wE(h,W,i))}L.push(Rb),L.push(kE(l,m,a))}var ee=i.havingBaseStyle(Nt.TEXT),te=Ae.makeVList({positionType:"bottom",positionData:D,children:L},ee);return jE(Ae.makeSpan(["delimsizing","mult"],[te],ee),Nt.TEXT,i,o)},"makeStackedDelim"),TE=80,EE=.08,CE=s(function(e,r,n,i,a){var o=Nye(e,i,n),l=new $l(e,o),u=new Xo([l],{width:"400em",height:tt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ae.makeSvgSpan(["hide-tail"],[u],a)},"sqrtSvg"),Dve=s(function(e,r){var n=r.havingBaseSizing(),i=Iz("\\surd",e*n.sizeMultiplier,Mz,n),a=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,u=0,h=0,f=0,d;return i.type==="small"?(f=1e3+1e3*o+TE,e<1?a=1:e<1.4&&(a=.7),u=(1+o+EE)/a,h=(1+o)/a,l=CE("sqrtMain",u,f,o,r),l.style.minWidth="0.853em",d=.833/a):i.type==="large"?(f=(1e3+TE)*B1[i.size],h=(B1[i.size]+o)/a,u=(B1[i.size]+o+EE)/a,l=CE("sqrtSize"+i.size,u,f,o,r),l.style.minWidth="1.02em",d=1/a):(u=e+o+EE,h=e+o,f=Math.floor(1e3*e+o)+TE,l=CE("sqrtTall",u,f,o,r),l.style.minWidth="0.742em",d=1.056),l.height=h,l.style.height=tt(u),{span:l,advanceWidth:d,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*a}},"makeSqrtImage"),Dz=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Rve=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Rz=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],B1=[0,1.2,1.8,2.4,3],Mve=s(function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Mt.contains(Dz,e)||Mt.contains(Rz,e))return Az(e,r,!1,n,i,a);if(Mt.contains(Rve,e))return Lz(e,B1[r],!1,n,i,a);throw new je("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),Ive=[{type:"small",style:Nt.SCRIPTSCRIPT},{type:"small",style:Nt.SCRIPT},{type:"small",style:Nt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Nve=[{type:"small",style:Nt.SCRIPTSCRIPT},{type:"small",style:Nt.SCRIPT},{type:"small",style:Nt.TEXT},{type:"stack"}],Mz=[{type:"small",style:Nt.SCRIPTSCRIPT},{type:"small",style:Nt.SCRIPT},{type:"small",style:Nt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ove=s(function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),Iz=s(function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),o=a;or)return n[o]}return n[n.length-1]},"traverseSequence"),Nz=s(function(e,r,n,i,a,o){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var l;Mt.contains(Rz,e)?l=Ive:Mt.contains(Dz,e)?l=Mz:l=Nve;var u=Iz(e,r,l,i);return u.type==="small"?Sve(e,u.style,n,i,a,o):u.type==="large"?Az(e,u.size,n,i,a,o):Lz(e,r,n,i,a,o)},"makeCustomSizedDelim"),Pve=s(function(e,r,n,i,a,o){var l=i.fontMetrics().axisHeight*i.sizeMultiplier,u=901,h=5/i.fontMetrics().ptPerEm,f=Math.max(r-l,n+l),d=Math.max(f/500*u,2*f-h);return Nz(e,d,!0,i,a,o)},"makeLeftRightDelim"),Kc={sqrtImage:Dve,sizedDelim:Mve,sizeToMaxHeight:B1,customSizedDelim:Nz,leftRightDelim:Pve},zF={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Bve=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];s(Yb,"checkDelimiter");st({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:s((t,e)=>{var r=Yb(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:zF[t.funcName].size,mclass:zF[t.funcName].mclass,delim:r.text}},"handler"),htmlBuilder:s((t,e)=>t.delim==="."?Ae.makeSpan([t.mclass]):Kc.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:s(t=>{var e=[];t.delim!=="."&&e.push(yo(t.delim,t.mode));var r=new Xe.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=tt(Kc.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r},"mathmlBuilder")});s($F,"assertParsed");st({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Yb(e[0],t).text,color:r}},"handler")});st({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var r=Yb(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Jt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},"handler"),htmlBuilder:s((t,e)=>{$F(t);for(var r=Ti(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o{$F(t);var r=cs(t.body,e);if(t.left!=="."){var n=new Xe.MathNode("mo",[yo(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new Xe.MathNode("mo",[yo(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return WE(r)},"mathmlBuilder")});st({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var r=Yb(e[0],t);if(!t.parser.leftrightDepth)throw new je("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},"handler"),htmlBuilder:s((t,e)=>{var r;if(t.delim===".")r=V1(e,[]);else{r=Kc.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?yo("|","text"):yo(t.delim,t.mode),n=new Xe.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n},"mathmlBuilder")});KE=s((t,e)=>{var r=Ae.wrapFragment(vr(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,o=0,l=Mt.isCharacterBox(t.body);if(n==="sout")a=Ae.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,o=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var u=Bn({number:.6,unit:"pt"},e),h=Bn({number:.35,unit:"ex"},e),f=e.havingBaseSizing();i=i/f.sizeMultiplier;var d=r.height+r.depth+u+h;r.style.paddingLeft=tt(d/2+u);var p=Math.floor(1e3*d*i),m=Mye(p),g=new Xo([new $l("phase",m)],{width:"400em",height:tt(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});a=Ae.makeSvgSpan(["hide-tail"],[g],e),a.style.height=tt(d),o=r.depth+u+h}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,v=0,x=0;/box/.test(n)?(x=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:x),v=y):n==="angl"?(x=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*x,v=Math.max(0,.25-r.depth)):(y=l?.2:0,v=y),a=Zc.encloseSpan(r,n,y,v,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=tt(x)):n==="angl"&&x!==.049&&(a.style.borderTopWidth=tt(x),a.style.borderRightWidth=tt(x)),o=r.depth+v,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var b;if(t.backgroundColor)b=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:r,shift:0}]},e);else{var k=/cancel|phase/.test(n)?["svg-align"]:[];b=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:k}]},e)}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!l?Ae.makeSpan(["mord","cancel-lap"],[b],e):Ae.makeSpan(["mord"],[b],e)},"htmlBuilder$7"),QE=s((t,e)=>{var r=0,n=new Xe.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[nn(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n},"mathmlBuilder$6");st({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Jt(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:KE,mathmlBuilder:QE});st({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=Jt(e[0],"color-token").color,o=Jt(e[1],"color-token").color,l=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:KE,mathmlBuilder:QE});st({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});st({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:KE,mathmlBuilder:QE});st({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});Oz={};s(Gl,"defineEnvironment");Pz={};s(J,"defineMacro");s(GF,"getHLines");Xb=s(t=>{var e=t.parser.settings;if(!e.displayMode)throw new je("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext");s(ZE,"getAutoTag");s(ch,"parseArray");s(JE,"dCellStyle");Vl=s(function(e,r){var n,i,a=e.body.length,o=e.hLinesBeforeRow,l=0,u=new Array(a),h=[],f=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),d=1/r.fontMetrics().ptPerEm,p=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var m=r.havingStyle(Nt.SCRIPT).sizeMultiplier;p=.2778*(m/r.sizeMultiplier)}var g=e.colSeparationType==="CD"?Bn({number:3,unit:"ex"},r):12*d,y=3*d,v=e.arraystretch*g,x=.7*v,b=.3*v,k=0;function A(Re){for(var Pe=0;Pe0&&(k+=.25),h.push({pos:k,isDashed:Re[Pe]})}for(s(A,"setHLinePos"),A(o[0]),n=0;n0&&(D+=b,CRe))for(n=0;n=l)){var fe=void 0;(i>0||e.hskipBeforeAndAfter)&&(fe=Mt.deflt(W.pregap,p),fe!==0&&(F=Ae.makeSpan(["arraycolsep"],[]),F.style.width=tt(fe),M.push(F)));var ne=[];for(n=0;n0){for(var re=Ae.makeLineSpan("hline",r,f),ie=Ae.makeLineSpan("hdashline",r,f),ye=[{type:"elem",elem:u,shift:0}];h.length>0;){var j=h.pop(),De=j.pos-L;j.isDashed?ye.push({type:"elem",elem:ie,shift:De}):ye.push({type:"elem",elem:re,shift:De})}u=Ae.makeVList({positionType:"individualShift",children:ye},r)}if(O.length===0)return Ae.makeSpan(["mord"],[u],r);var oe=Ae.makeVList({positionType:"individualShift",children:O},r);return oe=Ae.makeSpan(["tag"],[oe],r),Ae.makeFragment([u,oe])},"htmlBuilder"),Fve={c:"center ",l:"left ",r:"right "},Ul=s(function(e,r){for(var n=[],i=new Xe.MathNode("mtd",[],["mtr-glue"]),a=new Xe.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var g=e.cols,y="",v=!1,x=0,b=g.length;g[0].type==="separator"&&(p+="top ",x=1),g[g.length-1].type==="separator"&&(p+="bottom ",b-=1);for(var k=x;k0?"left ":"",p+=E[E.length-1].length>0?"right ":"";for(var S=1;S-1?"alignat":"align",a=e.envName==="split",o=ch(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:ZE(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),l,u=0,h={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var f="",d=0;d0&&m&&(v=1),n[g]={type:"align",align:y,pregap:v,postgap:0}}return o.colSeparationType=m?"align":"alignat",o},"alignedHandler");Gl({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=Wb(e[0]),n=r?[e[0]]:Jt(e[0],"ordgroup").body,i=n.map(function(o){var l=YE(o),u=l.text;if("lcr".indexOf(u)!==-1)return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new je("Unknown column alignment: "+u,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return ch(t.parser,a,JE(t.envName))},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new je("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=ch(t.parser,n,JE(t.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=ch(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=Wb(e[0]),n=r?[e[0]]:Jt(e[0],"ordgroup").body,i=n.map(function(o){var l=YE(o),u=l.text;if("lc".indexOf(u)!==-1)return{type:"align",align:u};throw new je("Unknown column alignment: "+u,o)});if(i.length>1)throw new je("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=ch(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new je("{subarray} can contain only one column");return a},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=ch(t.parser,e,JE(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Bz,htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Mt.contains(["gather","gather*"],t.envName)&&Xb(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ZE(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return ch(t.parser,e,"display")},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Bz,htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Xb(t);var e={autoTag:ZE(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return ch(t.parser,e,"display")},htmlBuilder:Vl,mathmlBuilder:Ul});Gl({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Xb(t),Eve(t.parser)},htmlBuilder:Vl,mathmlBuilder:Ul});J("\\nonumber","\\gdef\\@eqnsw{0}");J("\\notag","\\nonumber");st({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new je(t.funcName+" valid only within array environment")}});VF=Oz;st({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new je("Invalid environment name",i);for(var a="",o=0;o{var r=t.font,n=e.withFont(r);return vr(t.body,n)},"htmlBuilder$5"),zz=s((t,e)=>{var r=t.font,n=e.withFont(r);return nn(t.body,n)},"mathmlBuilder$4"),UF={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};st({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=$b(e[0]),a=n;return a in UF&&(a=UF[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},"handler"),htmlBuilder:Fz,mathmlBuilder:zz});st({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:s((t,e)=>{var{parser:r}=t,n=e[0],i=Mt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Hb(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}},"handler")});st({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:s((t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,o=r.parseExpression(!0,i),l="math"+n.slice(1);return{type:"font",mode:a,font:l,body:{type:"ordgroup",mode:r.mode,body:o}}},"handler"),htmlBuilder:Fz,mathmlBuilder:zz});$z=s((t,e)=>{var r=e;return t==="display"?r=r.id>=Nt.SCRIPT.id?r.text():Nt.DISPLAY:t==="text"&&r.size===Nt.DISPLAY.size?r=Nt.TEXT:t==="script"?r=Nt.SCRIPT:t==="scriptscript"&&(r=Nt.SCRIPTSCRIPT),r},"adjustStyle"),eC=s((t,e)=>{var r=$z(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var o=vr(t.numer,a,e);if(t.continued){var l=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?g=3*p:g=7*p,y=e.fontMetrics().denom1):(d>0?(m=e.fontMetrics().num2,g=p):(m=e.fontMetrics().num3,g=3*p),y=e.fontMetrics().denom2);var v;if(f){var b=e.fontMetrics().axisHeight;m-o.depth-(b+.5*d){var r=new Xe.MathNode("mfrac",[nn(t.numer,e),nn(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Bn(t.barSize,e);r.setAttribute("linethickness",tt(n))}var i=$z(t.size,e.style);if(i.size!==e.style.size){r=new Xe.MathNode("mstyle",[r]);var a=i.size===Nt.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var o=[];if(t.leftDelim!=null){var l=new Xe.MathNode("mo",[new Xe.TextNode(t.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}if(o.push(r),t.rightDelim!=null){var u=new Xe.MathNode("mo",[new Xe.TextNode(t.rightDelim.replace("\\",""))]);u.setAttribute("fence","true"),o.push(u)}return WE(o)}return r},"mathmlBuilder$3");st({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],o,l=null,u=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",u=")";break;case"\\\\bracefrac":o=!1,l="\\{",u="\\}";break;case"\\\\brackfrac":o=!1,l="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:o,leftDelim:l,rightDelim:u,size:h,barSize:null}},"handler"),htmlBuilder:eC,mathmlBuilder:tC});st({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")});st({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});qF=["display","text","script","scriptscript"],WF=s(function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r},"delimFromValue");st({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=$b(e[0]),o=a.type==="atom"&&a.family==="open"?WF(a.text):null,l=$b(e[1]),u=l.type==="atom"&&l.family==="close"?WF(l.text):null,h=Jt(e[2],"size"),f,d=null;h.isBlank?f=!0:(d=h.value,f=d.number>0);var p="auto",m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=Jt(m.body[0],"textord");p=qF[Number(g.text)]}}else m=Jt(m,"textord"),p=qF[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:f,barSize:d,leftDelim:o,rightDelim:u,size:p}},htmlBuilder:eC,mathmlBuilder:tC});st({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Jt(e[0],"size").value,token:i}}});st({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=yye(Jt(e[1],"infix").size),o=e[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},"handler"),htmlBuilder:eC,mathmlBuilder:tC});Gz=s((t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?vr(t.sup,e.havingStyle(r.sup()),e):vr(t.sub,e.havingStyle(r.sub()),e),i=Jt(t.base,"horizBrace")):i=Jt(t,"horizBrace");var a=vr(i.base,e.havingBaseStyle(Nt.DISPLAY)),o=Zc.svgSpan(i,e),l;if(i.isOver?(l=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o}]},e),l.children[0].children[0].children[1].classes.push("svg-align")):(l=Ae.makeVList({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:a}]},e),l.children[0].children[0].children[0].classes.push("svg-align")),n){var u=Ae.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e);i.isOver?l=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]},e):l=Ae.makeVList({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]},e)}return Ae.makeSpan(["mord",i.isOver?"mover":"munder"],[l],e)},"htmlBuilder$3"),zve=s((t,e)=>{var r=Zc.mathMLnode(t.label);return new Xe.MathNode(t.isOver?"mover":"munder",[nn(t.base,e),r])},"mathmlBuilder$2");st({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:Gz,mathmlBuilder:zve});st({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[1],i=Jt(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:ni(n)}:r.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.body,e,!1);return Ae.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=lh(t.body,e);return r instanceof os||(r=new os("mrow",[r])),r.setAttribute("href",t.href),r},"mathmlBuilder")});st({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=Jt(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=t,a=Jt(e[0],"raw").string,o=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,u={};switch(n){case"\\htmlClass":u.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":u.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":u.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var h=a.split(","),f=0;f{var r=Ti(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Ae.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},"htmlBuilder"),mathmlBuilder:s((t,e)=>lh(t.body,e),"mathmlBuilder")});st({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:ni(e[0]),mathml:ni(e[1])}},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.html,e,!1);return Ae.makeFragment(r)},"htmlBuilder"),mathmlBuilder:s((t,e)=>lh(t.mathml,e),"mathmlBuilder")});SE=s(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new je("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!sz(n))throw new je("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n},"sizeData");st({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:s((t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var u=Jt(r[0],"raw").string,h=u.split(","),f=0;f{var r=Bn(t.height,e),n=0;t.totalheight.number>0&&(n=Bn(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Bn(t.width,e));var a={height:tt(r+n)};i>0&&(a.width=tt(i)),n>0&&(a.verticalAlign=tt(-n));var o=new ME(t.src,t.alt,a);return o.height=r,o.depth=n,o},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=new Xe.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Bn(t.height,e),i=0;if(t.totalheight.number>0&&(i=Bn(t.totalheight,e)-n,r.setAttribute("valign",tt(-i))),r.setAttribute("height",tt(n+i)),t.width.number>0){var a=Bn(t.width,e);r.setAttribute("width",tt(a))}return r.setAttribute("src",t.src),r},"mathmlBuilder")});st({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=Jt(e[0],"size");if(r.settings.strict){var a=n[1]==="m",o=i.value.unit==="mu";a?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return Ae.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Bn(t.dimension,e);return new Xe.SpaceNode(r)}});st({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},"handler"),htmlBuilder:s((t,e)=>{var r;t.alignment==="clap"?(r=Ae.makeSpan([],[vr(t.body,e)]),r=Ae.makeSpan(["inner"],[r],e)):r=Ae.makeSpan(["inner"],[vr(t.body,e)]);var n=Ae.makeSpan(["fix"],[]),i=Ae.makeSpan([t.alignment],[r,n],e),a=Ae.makeSpan(["strut"]);return a.style.height=tt(i.height+i.depth),i.depth&&(a.style.verticalAlign=tt(-i.depth)),i.children.unshift(a),i=Ae.makeSpan(["thinbox"],[i],e),Ae.makeSpan(["mord","vbox"],[i],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=new Xe.MathNode("mpadded",[nn(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r},"mathmlBuilder")});st({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:o}}});st({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new je("Mismatched "+t.funcName)}});HF=s((t,e)=>{switch(e.style.size){case Nt.DISPLAY.size:return t.display;case Nt.TEXT.size:return t.text;case Nt.SCRIPT.size:return t.script;case Nt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle");st({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:s((t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:ni(e[0]),text:ni(e[1]),script:ni(e[2]),scriptscript:ni(e[3])}},"handler"),htmlBuilder:s((t,e)=>{var r=HF(t,e),n=Ti(r,e,!1);return Ae.makeFragment(n)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=HF(t,e);return lh(r,e)},"mathmlBuilder")});Vz=s((t,e,r,n,i,a,o)=>{t=Ae.makeSpan([],[t]);var l=r&&Mt.isCharacterBox(r),u,h;if(e){var f=vr(e,n.havingStyle(i.sup()),n);h={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-f.depth)}}if(r){var d=vr(r,n.havingStyle(i.sub()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var p;if(h&&u){var m=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+t.depth+o;p=Ae.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:tt(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:tt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(u){var g=t.height-o;p=Ae.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:tt(-a)},{type:"kern",size:u.kern},{type:"elem",elem:t}]},n)}else if(h){var y=t.depth+o;p=Ae.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:tt(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var v=[p];if(u&&a!==0&&!l){var x=Ae.makeSpan(["mspace"],[],n);x.style.marginRight=tt(a),v.unshift(x)}return Ae.makeSpan(["mop","op-limits"],v,n)},"assembleSupSub"),Uz=["\\smallint"],np=s((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Jt(t.base,"op"),i=!0):a=Jt(t,"op");var o=e.style,l=!1;o.size===Nt.DISPLAY.size&&a.symbol&&!Mt.contains(Uz,a.name)&&(l=!0);var u;if(a.symbol){var h=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),u=Ae.makeSymbol(a.name,h,"math",e,["mop","op-symbol",l?"large-op":"small-op"]),f.length>0){var d=u.italic,p=Ae.staticSvg(f+"Size"+(l?"2":"1"),e);u=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:p,shift:l?.08:0}]},e),a.name="\\"+f,u.classes.unshift("mop"),u.italic=d}}else if(a.body){var m=Ti(a.body,e,!0);m.length===1&&m[0]instanceof ls?(u=m[0],u.classes[0]="mop"):u=Ae.makeSpan(["mop"],m,e)}else{for(var g=[],y=1;y{var r;if(t.symbol)r=new os("mo",[yo(t.name,t.mode)]),Mt.contains(Uz,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new os("mo",cs(t.body,e));else{r=new os("mi",[new Of(t.name.slice(1))]);var n=new os("mo",[yo("\u2061","text")]);t.parentIsSupSub?r=new os("mrow",[r,n]):r=yz([r,n])}return r},"mathmlBuilder$1"),$ve={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};st({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=$ve[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},"handler"),htmlBuilder:np,mathmlBuilder:U1});st({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ni(n)}},"handler"),htmlBuilder:np,mathmlBuilder:U1});Gve={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};st({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:np,mathmlBuilder:U1});st({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:np,mathmlBuilder:U1});st({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=Gve[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:np,mathmlBuilder:U1});qz=s((t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=Jt(t.base,"operatorname"),i=!0):a=Jt(t,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(d=>{var p=d.text;return typeof p=="string"?{type:"textord",mode:d.mode,text:p}:d}),u=Ti(l,e.withFont("mathrm"),!0),h=0;h{for(var r=cs(t.body,e.withFont("mathrm")),n=!0,i=0;if.toText()).join("");r=[new Xe.TextNode(l)]}var u=new Xe.MathNode("mi",r);u.setAttribute("mathvariant","normal");var h=new Xe.MathNode("mo",[yo("\u2061","text")]);return t.parentIsSupSub?new Xe.MathNode("mrow",[u,h]):Xe.newDocumentFragment([u,h])},"mathmlBuilder");st({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:s((t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:ni(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:qz,mathmlBuilder:Vve});J("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ff({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Ae.makeFragment(Ti(t.body,e,!1)):Ae.makeSpan(["mord"],Ti(t.body,e,!0),e)},mathmlBuilder(t,e){return lh(t.body,e,!0)}});st({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=vr(t.body,e.havingCrampedStyle()),n=Ae.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return Ae.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new Xe.MathNode("mover",[nn(t.body,e),r]);return n.setAttribute("accent","true"),n}});st({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:ni(n)}},"handler"),htmlBuilder:s((t,e)=>{var r=Ti(t.body,e.withPhantom(),!1);return Ae.makeFragment(r)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=cs(t.body,e);return new Xe.MathNode("mphantom",r)},"mathmlBuilder")});st({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:s((t,e)=>{var r=Ae.makeSpan([],[vr(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=cs(ni(t.body),e),n=new Xe.MathNode("mphantom",r),i=new Xe.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i},"mathmlBuilder")});st({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:s((t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:s((t,e)=>{var r=Ae.makeSpan(["inner"],[vr(t.body,e.withPhantom())]),n=Ae.makeSpan(["fix"],[]);return Ae.makeSpan(["mord","rlap"],[r,n],e)},"htmlBuilder"),mathmlBuilder:s((t,e)=>{var r=cs(ni(t.body),e),n=new Xe.MathNode("mphantom",r),i=new Xe.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i},"mathmlBuilder")});st({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=Jt(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=vr(t.body,e),n=Bn(t.dy,e);return Ae.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new Xe.MathNode("mpadded",[nn(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});st({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});st({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=Jt(e[0],"size"),o=Jt(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&Jt(i,"size").value,width:a.value,height:o.value}},htmlBuilder(t,e){var r=Ae.makeSpan(["mord","rule"],[],e),n=Bn(t.width,e),i=Bn(t.height,e),a=t.shift?Bn(t.shift,e):0;return r.style.borderRightWidth=tt(n),r.style.borderTopWidth=tt(i),r.style.bottom=tt(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Bn(t.width,e),n=Bn(t.height,e),i=t.shift?Bn(t.shift,e):0,a=e.color&&e.getColor()||"black",o=new Xe.MathNode("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",tt(r)),o.setAttribute("height",tt(n));var l=new Xe.MathNode("mpadded",[o]);return i>=0?l.setAttribute("height",tt(i)):(l.setAttribute("height",tt(i)),l.setAttribute("depth",tt(-i))),l.setAttribute("voffset",tt(i)),l}});s(Wz,"sizingGroup");YF=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Uve=s((t,e)=>{var r=e.havingSize(t.size);return Wz(t.body,r,e)},"htmlBuilder");st({type:"sizing",names:YF,props:{numArgs:0,allowedInText:!0},handler:s((t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:YF.indexOf(n)+1,body:a}},"handler"),htmlBuilder:Uve,mathmlBuilder:s((t,e)=>{var r=e.havingSize(t.size),n=cs(t.body,r),i=new Xe.MathNode("mstyle",n);return i.setAttribute("mathsize",tt(r.sizeMultiplier)),i},"mathmlBuilder")});st({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:s((t,e,r)=>{var{parser:n}=t,i=!1,a=!1,o=r[0]&&Jt(r[0],"ordgroup");if(o)for(var l="",u=0;u{var r=Ae.makeSpan([],[vr(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new Xe.MathNode("mpadded",[nn(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r},"mathmlBuilder")});st({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=vr(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=Ae.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.idr.height+r.depth+o&&(o=(o+d-r.height-r.depth)/2);var p=u.height-r.height-o-h;r.style.paddingLeft=tt(f);var m=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:u},{type:"kern",size:h}]},e);if(t.index){var g=e.havingStyle(Nt.SCRIPTSCRIPT),y=vr(t.index,g,e),v=.6*(m.height-m.depth),x=Ae.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:y}]},e),b=Ae.makeSpan(["root"],[x]);return Ae.makeSpan(["mord","sqrt"],[b,m],e)}else return Ae.makeSpan(["mord","sqrt"],[m],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new Xe.MathNode("mroot",[nn(r,e),nn(n,e)]):new Xe.MathNode("msqrt",[nn(r,e)])}});XF={display:Nt.DISPLAY,text:Nt.TEXT,script:Nt.SCRIPT,scriptscript:Nt.SCRIPTSCRIPT};st({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(t,e){var r=XF[t.style],n=e.havingStyle(r).withFont("");return Wz(t.body,n,e)},mathmlBuilder(t,e){var r=XF[t.style],n=e.havingStyle(r),i=cs(t.body,n),a=new Xe.MathNode("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[t.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});qve=s(function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Nt.DISPLAY.size||n.alwaysHandleSupSub);return i?np:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Nt.DISPLAY.size||n.limits);return a?qz:null}else{if(n.type==="accent")return Mt.isCharacterBox(n.base)?XE:null;if(n.type==="horizBrace"){var o=!e.sub;return o===n.isOver?Gz:null}else return null}else return null},"htmlBuilderDelegate");Ff({type:"supsub",htmlBuilder(t,e){var r=qve(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,o=vr(n,e),l,u,h=e.fontMetrics(),f=0,d=0,p=n&&Mt.isCharacterBox(n);if(i){var m=e.havingStyle(e.style.sup());l=vr(i,m,e),p||(f=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());u=vr(a,g,e),p||(d=o.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}var y;e.style===Nt.DISPLAY?y=h.sup1:e.style.cramped?y=h.sup3:y=h.sup2;var v=e.sizeMultiplier,x=tt(.5/h.ptPerEm/v),b=null;if(u){var k=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(o instanceof ls||k)&&(b=tt(-o.italic))}var A;if(l&&u){f=Math.max(f,y,l.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var w=h.defaultRuleThickness,T=4*w;if(f-l.depth-(u.height-d)0&&(f+=C,d-=C)}var E=[{type:"elem",elem:u,shift:d,marginRight:x,marginLeft:b},{type:"elem",elem:l,shift:-f,marginRight:x}];A=Ae.makeVList({positionType:"individualShift",children:E},e)}else if(u){d=Math.max(d,h.sub1,u.height-.8*h.xHeight);var S=[{type:"elem",elem:u,marginLeft:b,marginRight:x}];A=Ae.makeVList({positionType:"shift",positionData:d,children:S},e)}else if(l)f=Math.max(f,y,l.depth+.25*h.xHeight),A=Ae.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:l,marginRight:x}]},e);else throw new Error("supsub must have either sup or sub.");var R=NE(o,"right")||"mord";return Ae.makeSpan([R],[o,Ae.makeSpan(["msupsub"],[A])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[nn(t.base,e)];t.sub&&a.push(nn(t.sub,e)),t.sup&&a.push(nn(t.sup,e));var o;if(r)o=n?"mover":"munder";else if(t.sub)if(t.sup){var h=t.base;h&&h.type==="op"&&h.limits&&e.style===Nt.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===Nt.DISPLAY||h.limits)?o="munderover":o="msubsup"}else{var u=t.base;u&&u.type==="op"&&u.limits&&(e.style===Nt.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||e.style===Nt.DISPLAY)?o="munder":o="msub"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===Nt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Nt.DISPLAY)?o="mover":o="msup"}return new Xe.MathNode(o,a)}});Ff({type:"atom",htmlBuilder(t,e){return Ae.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new Xe.MathNode("mo",[yo(t.text,t.mode)]);if(t.family==="bin"){var n=HE(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});Hz={mi:"italic",mn:"normal",mtext:"normal"};Ff({type:"mathord",htmlBuilder(t,e){return Ae.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new Xe.MathNode("mi",[yo(t.text,t.mode,e)]),n=HE(t,e)||"italic";return n!==Hz[r.type]&&r.setAttribute("mathvariant",n),r}});Ff({type:"textord",htmlBuilder(t,e){return Ae.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=yo(t.text,t.mode,e),n=HE(t,e)||"normal",i;return t.mode==="text"?i=new Xe.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new Xe.MathNode("mn",[r]):t.text==="\\prime"?i=new Xe.MathNode("mo",[r]):i=new Xe.MathNode("mi",[r]),n!==Hz[i.type]&&i.setAttribute("mathvariant",n),i}});_E={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},AE={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ff({type:"spacing",htmlBuilder(t,e){if(AE.hasOwnProperty(t.text)){var r=AE[t.text].className||"";if(t.mode==="text"){var n=Ae.makeOrd(t,e,"textord");return n.classes.push(r),n}else return Ae.makeSpan(["mspace",r],[Ae.mathsym(t.text,t.mode,e)],e)}else{if(_E.hasOwnProperty(t.text))return Ae.makeSpan(["mspace",_E[t.text]],[],e);throw new je('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(AE.hasOwnProperty(t.text))r=new Xe.MathNode("mtext",[new Xe.TextNode("\xA0")]);else{if(_E.hasOwnProperty(t.text))return new Xe.MathNode("mspace");throw new je('Unknown type of space "'+t.text+'"')}return r}});jF=s(()=>{var t=new Xe.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad");Ff({type:"tag",mathmlBuilder(t,e){var r=new Xe.MathNode("mtable",[new Xe.MathNode("mtr",[jF(),new Xe.MathNode("mtd",[lh(t.body,e)]),jF(),new Xe.MathNode("mtd",[lh(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});KF={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},QF={"\\textbf":"textbf","\\textmd":"textmd"},Wve={"\\textit":"textit","\\textup":"textup"},ZF=s((t,e)=>{var r=t.font;if(r){if(KF[r])return e.withTextFontFamily(KF[r]);if(QF[r])return e.withTextFontWeight(QF[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Wve[r])},"optionsWithFont");st({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:ni(i),font:n}},htmlBuilder(t,e){var r=ZF(t,e),n=Ti(t.body,r,!0);return Ae.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=ZF(t,e);return lh(t.body,r)}});st({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=vr(t.body,e),n=Ae.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=Ae.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return Ae.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);r.setAttribute("stretchy","true");var n=new Xe.MathNode("munder",[nn(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});st({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=vr(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Ae.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new Xe.MathNode("mpadded",[nn(t.body,e)],["vcenter"])}});st({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=JF(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"\u2423":"\xA0"),"makeVerb"),sh=mz,Yz=`[ \r + ]`,Hve="\\\\[a-zA-Z@]+",Yve="\\\\[^\uD800-\uDFFF]",Xve="("+Hve+")"+Yz+"*",jve=`\\\\( +|[ \r ]+ +?)[ \r ]*`,zE="[\u0300-\u036F]",Kve=new RegExp(zE+"+$"),Qve="("+Yz+"+)|"+(jve+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(zE+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(zE+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Xve)+("|"+Yve+")"),Gb=class{static{s(this,"Lexer")}constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(Qve,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new go("EOF",new $s(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new je("Unexpected character: '"+e[r]+"'",new go(e[r],new $s(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new go(i,new $s(this,r,this.tokenRegex.lastIndex))}},$E=class{static{s(this,"Namespace")}constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new je("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}},Zve=Pz;J("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});J("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});J("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});J("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});J("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});J("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");J("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});ez={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};J("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new je("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=ez[e.text],n==null||n>=r)throw new je("Invalid base-"+r+" digit "+e.text);for(var i;(i=ez[t.future().text])!=null&&i{var n=t.consumeArg().tokens;if(n.length!==1)throw new je("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new je("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new je("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(n=t.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var l="",u=t.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new je("Invalid number of arguments: "+l);o=parseInt(l),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:o}),""},"newcommand");J("\\newcommand",t=>rC(t,!1,!0));J("\\renewcommand",t=>rC(t,!0,!1));J("\\providecommand",t=>rC(t,!0,!0));J("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});J("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});J("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),sh[r],dn.math[r],dn.text[r]),""});J("\\bgroup","{");J("\\egroup","}");J("~","\\nobreakspace");J("\\lq","`");J("\\rq","'");J("\\aa","\\r a");J("\\AA","\\r A");J("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");J("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");J("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");J("\u212C","\\mathscr{B}");J("\u2130","\\mathscr{E}");J("\u2131","\\mathscr{F}");J("\u210B","\\mathscr{H}");J("\u2110","\\mathscr{I}");J("\u2112","\\mathscr{L}");J("\u2133","\\mathscr{M}");J("\u211B","\\mathscr{R}");J("\u212D","\\mathfrak{C}");J("\u210C","\\mathfrak{H}");J("\u2128","\\mathfrak{Z}");J("\\Bbbk","\\Bbb{k}");J("\xB7","\\cdotp");J("\\llap","\\mathllap{\\textrm{#1}}");J("\\rlap","\\mathrlap{\\textrm{#1}}");J("\\clap","\\mathclap{\\textrm{#1}}");J("\\mathstrut","\\vphantom{(}");J("\\underbar","\\underline{\\text{#1}}");J("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');J("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");J("\\ne","\\neq");J("\u2260","\\neq");J("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");J("\u2209","\\notin");J("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");J("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");J("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");J("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");J("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");J("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");J("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");J("\u27C2","\\perp");J("\u203C","\\mathclose{!\\mkern-0.8mu!}");J("\u220C","\\notni");J("\u231C","\\ulcorner");J("\u231D","\\urcorner");J("\u231E","\\llcorner");J("\u231F","\\lrcorner");J("\xA9","\\copyright");J("\xAE","\\textregistered");J("\uFE0F","\\textregistered");J("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');J("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');J("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');J("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');J("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");J("\u22EE","\\vdots");J("\\varGamma","\\mathit{\\Gamma}");J("\\varDelta","\\mathit{\\Delta}");J("\\varTheta","\\mathit{\\Theta}");J("\\varLambda","\\mathit{\\Lambda}");J("\\varXi","\\mathit{\\Xi}");J("\\varPi","\\mathit{\\Pi}");J("\\varSigma","\\mathit{\\Sigma}");J("\\varUpsilon","\\mathit{\\Upsilon}");J("\\varPhi","\\mathit{\\Phi}");J("\\varPsi","\\mathit{\\Psi}");J("\\varOmega","\\mathit{\\Omega}");J("\\substack","\\begin{subarray}{c}#1\\end{subarray}");J("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");J("\\boxed","\\fbox{$\\displaystyle{#1}$}");J("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");J("\\implies","\\DOTSB\\;\\Longrightarrow\\;");J("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");tz={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};J("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in tz?e=tz[r]:(r.slice(0,4)==="\\not"||r in dn.math&&Mt.contains(["bin","rel"],dn.math[r].group))&&(e="\\dotsb"),e});nC={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};J("\\dotso",function(t){var e=t.future().text;return e in nC?"\\ldots\\,":"\\ldots"});J("\\dotsc",function(t){var e=t.future().text;return e in nC&&e!==","?"\\ldots\\,":"\\ldots"});J("\\cdots",function(t){var e=t.future().text;return e in nC?"\\@cdots\\,":"\\@cdots"});J("\\dotsb","\\cdots");J("\\dotsm","\\cdots");J("\\dotsi","\\!\\cdots");J("\\dotsx","\\ldots\\,");J("\\DOTSI","\\relax");J("\\DOTSB","\\relax");J("\\DOTSX","\\relax");J("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");J("\\,","\\tmspace+{3mu}{.1667em}");J("\\thinspace","\\,");J("\\>","\\mskip{4mu}");J("\\:","\\tmspace+{4mu}{.2222em}");J("\\medspace","\\:");J("\\;","\\tmspace+{5mu}{.2777em}");J("\\thickspace","\\;");J("\\!","\\tmspace-{3mu}{.1667em}");J("\\negthinspace","\\!");J("\\negmedspace","\\tmspace-{4mu}{.2222em}");J("\\negthickspace","\\tmspace-{5mu}{.277em}");J("\\enspace","\\kern.5em ");J("\\enskip","\\hskip.5em\\relax");J("\\quad","\\hskip1em\\relax");J("\\qquad","\\hskip2em\\relax");J("\\tag","\\@ifstar\\tag@literal\\tag@paren");J("\\tag@paren","\\tag@literal{({#1})}");J("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});J("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");J("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");J("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");J("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");J("\\newline","\\\\\\relax");J("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");Xz=tt(zl["Main-Regular"][84][1]-.7*zl["Main-Regular"][65][1]);J("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Xz+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");J("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Xz+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");J("\\hspace","\\@ifstar\\@hspacer\\@hspace");J("\\@hspace","\\hskip #1\\relax");J("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");J("\\ordinarycolon",":");J("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");J("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');J("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');J("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');J("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');J("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');J("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');J("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');J("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');J("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');J("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');J("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');J("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');J("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');J("\u2237","\\dblcolon");J("\u2239","\\eqcolon");J("\u2254","\\coloneqq");J("\u2255","\\eqqcolon");J("\u2A74","\\Coloneqq");J("\\ratio","\\vcentcolon");J("\\coloncolon","\\dblcolon");J("\\colonequals","\\coloneqq");J("\\coloncolonequals","\\Coloneqq");J("\\equalscolon","\\eqqcolon");J("\\equalscoloncolon","\\Eqqcolon");J("\\colonminus","\\coloneq");J("\\coloncolonminus","\\Coloneq");J("\\minuscolon","\\eqcolon");J("\\minuscoloncolon","\\Eqcolon");J("\\coloncolonapprox","\\Colonapprox");J("\\coloncolonsim","\\Colonsim");J("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");J("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");J("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");J("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");J("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");J("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");J("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");J("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");J("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");J("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");J("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");J("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");J("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");J("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");J("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");J("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");J("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");J("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");J("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");J("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");J("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");J("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");J("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");J("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");J("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");J("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");J("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");J("\\imath","\\html@mathml{\\@imath}{\u0131}");J("\\jmath","\\html@mathml{\\@jmath}{\u0237}");J("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");J("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");J("\u27E6","\\llbracket");J("\u27E7","\\rrbracket");J("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");J("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");J("\u2983","\\lBrace");J("\u2984","\\rBrace");J("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");J("\u29B5","\\minuso");J("\\darr","\\downarrow");J("\\dArr","\\Downarrow");J("\\Darr","\\Downarrow");J("\\lang","\\langle");J("\\rang","\\rangle");J("\\uarr","\\uparrow");J("\\uArr","\\Uparrow");J("\\Uarr","\\Uparrow");J("\\N","\\mathbb{N}");J("\\R","\\mathbb{R}");J("\\Z","\\mathbb{Z}");J("\\alef","\\aleph");J("\\alefsym","\\aleph");J("\\Alpha","\\mathrm{A}");J("\\Beta","\\mathrm{B}");J("\\bull","\\bullet");J("\\Chi","\\mathrm{X}");J("\\clubs","\\clubsuit");J("\\cnums","\\mathbb{C}");J("\\Complex","\\mathbb{C}");J("\\Dagger","\\ddagger");J("\\diamonds","\\diamondsuit");J("\\empty","\\emptyset");J("\\Epsilon","\\mathrm{E}");J("\\Eta","\\mathrm{H}");J("\\exist","\\exists");J("\\harr","\\leftrightarrow");J("\\hArr","\\Leftrightarrow");J("\\Harr","\\Leftrightarrow");J("\\hearts","\\heartsuit");J("\\image","\\Im");J("\\infin","\\infty");J("\\Iota","\\mathrm{I}");J("\\isin","\\in");J("\\Kappa","\\mathrm{K}");J("\\larr","\\leftarrow");J("\\lArr","\\Leftarrow");J("\\Larr","\\Leftarrow");J("\\lrarr","\\leftrightarrow");J("\\lrArr","\\Leftrightarrow");J("\\Lrarr","\\Leftrightarrow");J("\\Mu","\\mathrm{M}");J("\\natnums","\\mathbb{N}");J("\\Nu","\\mathrm{N}");J("\\Omicron","\\mathrm{O}");J("\\plusmn","\\pm");J("\\rarr","\\rightarrow");J("\\rArr","\\Rightarrow");J("\\Rarr","\\Rightarrow");J("\\real","\\Re");J("\\reals","\\mathbb{R}");J("\\Reals","\\mathbb{R}");J("\\Rho","\\mathrm{P}");J("\\sdot","\\cdot");J("\\sect","\\S");J("\\spades","\\spadesuit");J("\\sub","\\subset");J("\\sube","\\subseteq");J("\\supe","\\supseteq");J("\\Tau","\\mathrm{T}");J("\\thetasym","\\vartheta");J("\\weierp","\\wp");J("\\Zeta","\\mathrm{Z}");J("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");J("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");J("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");J("\\bra","\\mathinner{\\langle{#1}|}");J("\\ket","\\mathinner{|{#1}\\rangle}");J("\\braket","\\mathinner{\\langle{#1}\\rangle}");J("\\Bra","\\left\\langle#1\\right|");J("\\Ket","\\left|#1\\right\\rangle");jz=s(t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,o=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var u=s(d=>p=>{t&&(p.macros.set("|",o),i.length&&p.macros.set("\\|",l));var m=d;if(!d&&i.length){var g=p.future();g.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?i:n,numArgs:0}},"midMacro");e.macros.set("|",u(!1)),i.length&&e.macros.set("\\|",u(!0));var h=e.consumeArg().tokens,f=e.expandTokens([...a,...h,...r]);return e.macros.endGroup(),{tokens:f.reverse(),numArgs:0}},"braketHelper");J("\\bra@ket",jz(!1));J("\\bra@set",jz(!0));J("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");J("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");J("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");J("\\angln","{\\angl n}");J("\\blue","\\textcolor{##6495ed}{#1}");J("\\orange","\\textcolor{##ffa500}{#1}");J("\\pink","\\textcolor{##ff00af}{#1}");J("\\red","\\textcolor{##df0030}{#1}");J("\\green","\\textcolor{##28ae7b}{#1}");J("\\gray","\\textcolor{gray}{#1}");J("\\purple","\\textcolor{##9d38bd}{#1}");J("\\blueA","\\textcolor{##ccfaff}{#1}");J("\\blueB","\\textcolor{##80f6ff}{#1}");J("\\blueC","\\textcolor{##63d9ea}{#1}");J("\\blueD","\\textcolor{##11accd}{#1}");J("\\blueE","\\textcolor{##0c7f99}{#1}");J("\\tealA","\\textcolor{##94fff5}{#1}");J("\\tealB","\\textcolor{##26edd5}{#1}");J("\\tealC","\\textcolor{##01d1c1}{#1}");J("\\tealD","\\textcolor{##01a995}{#1}");J("\\tealE","\\textcolor{##208170}{#1}");J("\\greenA","\\textcolor{##b6ffb0}{#1}");J("\\greenB","\\textcolor{##8af281}{#1}");J("\\greenC","\\textcolor{##74cf70}{#1}");J("\\greenD","\\textcolor{##1fab54}{#1}");J("\\greenE","\\textcolor{##0d923f}{#1}");J("\\goldA","\\textcolor{##ffd0a9}{#1}");J("\\goldB","\\textcolor{##ffbb71}{#1}");J("\\goldC","\\textcolor{##ff9c39}{#1}");J("\\goldD","\\textcolor{##e07d10}{#1}");J("\\goldE","\\textcolor{##a75a05}{#1}");J("\\redA","\\textcolor{##fca9a9}{#1}");J("\\redB","\\textcolor{##ff8482}{#1}");J("\\redC","\\textcolor{##f9685d}{#1}");J("\\redD","\\textcolor{##e84d39}{#1}");J("\\redE","\\textcolor{##bc2612}{#1}");J("\\maroonA","\\textcolor{##ffbde0}{#1}");J("\\maroonB","\\textcolor{##ff92c6}{#1}");J("\\maroonC","\\textcolor{##ed5fa6}{#1}");J("\\maroonD","\\textcolor{##ca337c}{#1}");J("\\maroonE","\\textcolor{##9e034e}{#1}");J("\\purpleA","\\textcolor{##ddd7ff}{#1}");J("\\purpleB","\\textcolor{##c6b9fc}{#1}");J("\\purpleC","\\textcolor{##aa87ff}{#1}");J("\\purpleD","\\textcolor{##7854ab}{#1}");J("\\purpleE","\\textcolor{##543b78}{#1}");J("\\mintA","\\textcolor{##f5f9e8}{#1}");J("\\mintB","\\textcolor{##edf2df}{#1}");J("\\mintC","\\textcolor{##e0e5cc}{#1}");J("\\grayA","\\textcolor{##f6f7f7}{#1}");J("\\grayB","\\textcolor{##f0f1f2}{#1}");J("\\grayC","\\textcolor{##e3e5e6}{#1}");J("\\grayD","\\textcolor{##d6d8da}{#1}");J("\\grayE","\\textcolor{##babec2}{#1}");J("\\grayF","\\textcolor{##888d93}{#1}");J("\\grayG","\\textcolor{##626569}{#1}");J("\\grayH","\\textcolor{##3b3e40}{#1}");J("\\grayI","\\textcolor{##21242c}{#1}");J("\\kaBlue","\\textcolor{##314453}{#1}");J("\\kaGreen","\\textcolor{##71B307}{#1}");Kz={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},GE=class{static{s(this,"MacroExpander")}constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new $E(Zve,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Gb(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new go("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,o=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new je("Extra }",a)}else if(a.text==="EOF")throw new je("Unexpected end of input in a macro argument, expected '"+(e&&n?e[l]:"}")+"'",a);if(e&&n)if((o===0||o===1&&e[l]==="{")&&a.text===e[l]){if(++l,l===e.length){r.splice(-l,l);break}}else l=0}while(o!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new je("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new je("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new je("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new je("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...o[+u.text-1]);else throw new je("Not a valid argument number",u)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new go(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var o=i.replace(/##/g,"");o.indexOf("#"+(a+1))!==-1;)++a;for(var l=new Gb(i,this.settings),u=[],h=l.lex();h.text!=="EOF";)u.push(h),h=l.lex();u.reverse();var f={tokens:u,numArgs:a};return f}return i}isDefined(e){return this.macros.has(e)||sh.hasOwnProperty(e)||dn.math.hasOwnProperty(e)||dn.text.hasOwnProperty(e)||Kz.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:sh.hasOwnProperty(e)&&!sh[e].primitive}},rz=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Mb=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),LE={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},nz={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Vb=class t{static{s(this,"Parser")}constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new GE(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new je("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new go("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&sh[i.text]&&sh[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var l=dn[this.mode][r].group,u=$s.range(e),h;if(Uye.hasOwnProperty(l)){var f=l;h={type:"atom",mode:this.mode,family:f,loc:u,text:r}}else h={type:l,mode:this.mode,loc:u,text:r};o=h}else if(r.charCodeAt(0)>=128)this.settings.strict&&(az(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:$s.range(e),text:r};else return null;if(this.consume(),a)for(var d=0;d{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),ip.default.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}var ip,zf,n2e,i2e,n$,t$,$r,s2e,o2e,l2e,c2e,i$,u2e,hr,h2e,f2e,uh,sC,d2e,p2e,r$,oC,Ei,$f,hh,$e,Qt=_(()=>{"use strict";ip=ka(yE(),1),zf=//gi,n2e=s(t=>t?i$(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),i2e=(()=>{let t=!1;return()=>{t||(a2e(),t=!0)}})();s(a2e,"setupDompurifyHooks");n$=s(t=>(i2e(),ip.default.sanitize(t)),"removeScript"),t$=s((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=n$(t):r!=="loose"&&(t=i$(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=c2e(t))}return t},"sanitizeMore"),$r=s((t,e)=>t&&(e.dompurifyConfig?t=ip.default.sanitize(t$(t,e),e.dompurifyConfig).toString():t=ip.default.sanitize(t$(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),s2e=s((t,e)=>typeof t=="string"?$r(t,e):t.flat().map(r=>$r(r,e)),"sanitizeTextOrArray"),o2e=s(t=>zf.test(t),"hasBreaks"),l2e=s(t=>t.split(zf),"splitBreaks"),c2e=s(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),i$=s(t=>t.replace(zf,"#br#"),"breakToPlaceholder"),u2e=s(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),hr=s(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),h2e=s(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),f2e=s(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),uh=s(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),d2e=s((t,e)=>{let r=sC(t,"~"),n=sC(e,"~");return r===1&&n===1},"shouldCombineSets"),p2e=s(t=>{let e=sC(t,"~"),r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),r$=s(()=>window.MathMLElement!==void 0,"isMathMLSupported"),oC=/\$\$(.*)\$\$/g,Ei=s(t=>(t.match(oC)?.length??0)>0,"hasKatex"),$f=s(async(t,e)=>{t=await hh(t,e);let r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),hh=s(async(t,e)=>{if(!Ei(t))return t;if(!(r$()||e.legacyMathML||e.forceLegacyMathML))return t.replace(oC,"MathML is unsupported in this environment.");let{default:r}=await Promise.resolve().then(()=>(e$(),Jz)),n=e.forceLegacyMathML||!r$()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(zf).map(i=>Ei(i)?`
${i}
`:`
${i}
`).join("").replace(oC,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),$e={getRows:n2e,sanitizeText:$r,sanitizeTextOrArray:s2e,hasBreaks:o2e,splitBreaks:l2e,lineBreakRegex:zf,removeScript:n$,getUrl:u2e,evaluate:hr,getMax:h2e,getMin:f2e}});var m2e,g2e,xr,ql,Un=_(()=>{"use strict";it();m2e=s(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),g2e=s(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),xr=s(function(t,e,r,n){let i=g2e(e,r,n);m2e(t,i)},"configureSvgSize"),ql=s(function(t,e,r,n){let i=e.node().getBBox(),a=i.width,o=i.height;V.info(`SVG bounds: ${a}x${o}`,i);let l=0,u=0;V.info(`Graph bounds: ${l}x${u}`,t),l=a+r*2,u=o+r*2,V.info(`Calculated bounds: ${l}x${u}`),xr(e,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox")});var jb,y2e,a$,s$,lC=_(()=>{"use strict";it();jb={},y2e=s((t,e,r)=>{let n="";return t in jb&&jb[t]?n=jb[t](r):V.warn(`No theme found for ${t}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${n} + + ${e} +`},"getStyles"),a$=s((t,e)=>{e!==void 0&&(jb[t]=e)},"addStylesForDiagram"),s$=y2e});var q1={};ur(q1,{clear:()=>br,getAccDescription:()=>Ur,getAccTitle:()=>Gr,getDiagramTitle:()=>Qr,setAccDescription:()=>Vr,setAccTitle:()=>Ar,setDiagramTitle:()=>an});var cC,uC,hC,fC,br,Ar,Gr,Vr,Ur,an,Qr,Ci=_(()=>{"use strict";Qt();zs();cC="",uC="",hC="",fC=s(t=>$r(t,_r()),"sanitizeText"),br=s(()=>{cC="",hC="",uC=""},"clear"),Ar=s(t=>{cC=fC(t).replace(/^\s+/g,"")},"setAccTitle"),Gr=s(()=>cC,"getAccTitle"),Vr=s(t=>{hC=fC(t).replace(/\n\s+/g,` +`)},"setAccDescription"),Ur=s(()=>hC,"getAccDescription"),an=s(t=>{uC=fC(t)},"setDiagramTitle"),Qr=s(()=>uC,"getDiagramTitle")});var o$,v2e,le,pC,Qb,x2e,mC,b2e,Kb,Gf,W1,dC,gt=_(()=>{"use strict";Mf();it();zs();Qt();Un();lC();Ci();o$=V,v2e=E1,le=_r,pC=kb,Qb=ih,x2e=s(t=>$r(t,le()),"sanitizeText"),mC=ql,b2e=s(()=>q1,"getCommonDb"),Kb={},Gf=s((t,e,r)=>{Kb[t]&&o$.warn(`Diagram with id ${t} already registered. Overwriting.`),Kb[t]=e,r&&Q7(t,r),a$(t,e.styles),e.injectUtils?.(o$,v2e,le,x2e,mC,b2e(),()=>{})},"registerDiagram"),W1=s(t=>{if(t in Kb)return Kb[t];throw new dC(t)},"getDiagram"),dC=class extends Error{static{s(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}});var Ko,fh,Ga,jo,Wl,H1,gC,yC,Zb,Jb,l$,k2e,w2e,T2e,E2e,C2e,S2e,_2e,A2e,L2e,D2e,R2e,M2e,I2e,N2e,O2e,P2e,B2e,c$,F2e,z2e,u$,$2e,G2e,V2e,U2e,dh,q2e,W2e,H2e,Y2e,X2e,Y1,vC=_(()=>{"use strict";gt();Qt();Ci();Ko=[],fh=[""],Ga="global",jo="",Wl=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],H1=[],gC="",yC=!1,Zb=4,Jb=2,k2e=s(function(){return l$},"getC4Type"),w2e=s(function(t){l$=$r(t,le())},"setC4Type"),T2e=s(function(t,e,r,n,i,a,o,l,u){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let h={},f=H1.find(d=>d.from===e&&d.to===r);if(f?h=f:H1.push(h),h.type=t,h.from=e,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]={text:p}}else h.descr={text:a};if(typeof o=="object"){let[d,p]=Object.entries(o)[0];h[d]=p}else h.sprite=o;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.tags=l;if(typeof u=="object"){let[d,p]=Object.entries(u)[0];h[d]=p}else h.link=u;h.wrap=dh()},"addRel"),E2e=s(function(t,e,r,n,i,a,o){if(e===null||r===null)return;let l={},u=Ko.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Ko.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.tags=a;if(typeof o=="object"){let[h,f]=Object.entries(o)[0];l[h]=f}else l.link=o;l.typeC4Shape={text:t},l.parentBoundary=Ga,l.wrap=dh()},"addPersonOrSystem"),C2e=s(function(t,e,r,n,i,a,o,l){if(e===null||r===null)return;let u={},h=Ko.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Ko.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=dh(),u.typeC4Shape={text:t},u.parentBoundary=Ga},"addContainer"),S2e=s(function(t,e,r,n,i,a,o,l){if(e===null||r===null)return;let u={},h=Ko.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Ko.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=dh(),u.typeC4Shape={text:t},u.parentBoundary=Ga},"addComponent"),_2e=s(function(t,e,r,n,i){if(t===null||e===null)return;let a={},o=Wl.find(l=>l.alias===t);if(o&&t===o.alias?a=o:(a.alias=t,Wl.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=Ga,a.wrap=dh(),jo=Ga,Ga=t,fh.push(jo)},"addPersonOrSystemBoundary"),A2e=s(function(t,e,r,n,i){if(t===null||e===null)return;let a={},o=Wl.find(l=>l.alias===t);if(o&&t===o.alias?a=o:(a.alias=t,Wl.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=Ga,a.wrap=dh(),jo=Ga,Ga=t,fh.push(jo)},"addContainerBoundary"),L2e=s(function(t,e,r,n,i,a,o,l){if(e===null||r===null)return;let u={},h=Wl.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Wl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof o=="object"){let[f,d]=Object.entries(o)[0];u[f]=d}else u.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.nodeType=t,u.parentBoundary=Ga,u.wrap=dh(),jo=Ga,Ga=e,fh.push(jo)},"addDeploymentNode"),D2e=s(function(){Ga=jo,fh.pop(),jo=fh.pop(),fh.push(jo)},"popBoundaryParseStack"),R2e=s(function(t,e,r,n,i,a,o,l,u,h,f){let d=Ko.find(p=>p.alias===e);if(!(d===void 0&&(d=Wl.find(p=>p.alias===e),d===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];d[p]=m}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];d[p]=m}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];d[p]=m}else d.borderColor=i;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];d[p]=m}else d.shadowing=a;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];d[p]=m}else d.shape=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];d[p]=m}else d.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];d[p]=m}else d.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];d[p]=m}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];d[p]=m}else d.legendSprite=f}},"updateElStyle"),M2e=s(function(t,e,r,n,i,a,o){let l=H1.find(u=>u.from===e&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(o!=null)if(typeof o=="object"){let[u,h]=Object.entries(o)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(o)}},"updateRelStyle"),I2e=s(function(t,e,r){let n=Zb,i=Jb;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(Zb=n),i>=1&&(Jb=i)},"updateLayoutConfig"),N2e=s(function(){return Zb},"getC4ShapeInRow"),O2e=s(function(){return Jb},"getC4BoundaryInRow"),P2e=s(function(){return Ga},"getCurrentBoundaryParse"),B2e=s(function(){return jo},"getParentBoundaryParse"),c$=s(function(t){return t==null?Ko:Ko.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),F2e=s(function(t){return Ko.find(e=>e.alias===t)},"getC4Shape"),z2e=s(function(t){return Object.keys(c$(t))},"getC4ShapeKeys"),u$=s(function(t){return t==null?Wl:Wl.filter(e=>e.parentBoundary===t)},"getBoundaries"),$2e=u$,G2e=s(function(){return H1},"getRels"),V2e=s(function(){return gC},"getTitle"),U2e=s(function(t){yC=t},"setWrap"),dh=s(function(){return yC},"autoWrap"),q2e=s(function(){Ko=[],Wl=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],jo="",Ga="global",fh=[""],H1=[],fh=[""],gC="",yC=!1,Zb=4,Jb=2},"clear"),W2e={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},H2e={FILLED:0,OPEN:1},Y2e={LEFTOF:0,RIGHTOF:1,OVER:2},X2e=s(function(t){gC=$r(t,le())},"setTitle"),Y1={addPersonOrSystem:E2e,addPersonOrSystemBoundary:_2e,addContainer:C2e,addContainerBoundary:A2e,addComponent:S2e,addDeploymentNode:L2e,popBoundaryParseStack:D2e,addRel:T2e,updateElStyle:R2e,updateRelStyle:M2e,updateLayoutConfig:I2e,autoWrap:dh,setWrap:U2e,getC4ShapeArray:c$,getC4Shape:F2e,getC4ShapeKeys:z2e,getBoundaries:u$,getBoundarys:$2e,getCurrentBoundaryParse:P2e,getParentBoundaryParse:B2e,getRels:G2e,getTitle:V2e,getC4Type:k2e,getC4ShapeInRow:N2e,getC4BoundaryInRow:O2e,setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,setAccDescription:Vr,getConfig:s(()=>le().c4,"getConfig"),clear:q2e,LINETYPE:W2e,ARROWTYPE:H2e,PLACEMENT:Y2e,setTitle:X2e,setC4Type:w2e}});function Vf(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}var xC=_(()=>{"use strict";s(Vf,"ascending")});function bC(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}var h$=_(()=>{"use strict";s(bC,"descending")});function Uf(t){let e,r,n;t.length!==2?(e=Vf,r=s((l,u)=>Vf(t(l),u),"compare2"),n=s((l,u)=>t(l)-u,"delta")):(e=t===Vf||t===bC?t:j2e,r=t,n=t);function i(l,u,h=0,f=l.length){if(h>>1;r(l[d],u)<0?h=d+1:f=d}while(h>>1;r(l[d],u)<=0?h=d+1:f=d}while(hh&&n(l[d-1],u)>-n(l[d],u)?d-1:d}return s(o,"center"),{left:i,center:o,right:a}}function j2e(){return 0}var kC=_(()=>{"use strict";xC();h$();s(Uf,"bisector");s(j2e,"zero")});function wC(t){return t===null?NaN:+t}var f$=_(()=>{"use strict";s(wC,"number")});var d$,p$,K2e,Q2e,TC,m$=_(()=>{"use strict";xC();kC();f$();d$=Uf(Vf),p$=d$.right,K2e=d$.left,Q2e=Uf(wC).center,TC=p$});function g$({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):r}function Z2e({_intern:t,_key:e},r){let n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function J2e({_intern:t,_key:e},r){let n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function exe(t){return t!==null&&typeof t=="object"?t.valueOf():t}var ap,y$=_(()=>{"use strict";ap=class extends Map{static{s(this,"InternMap")}constructor(e,r=exe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(let[n,i]of e)this.set(n,i)}get(e){return super.get(g$(this,e))}has(e){return super.has(g$(this,e))}set(e,r){return super.set(Z2e(this,e),r)}delete(e){return super.delete(J2e(this,e))}};s(g$,"intern_get");s(Z2e,"intern_set");s(J2e,"intern_delete");s(exe,"keyof")});function e4(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=txe?10:a>=rxe?5:a>=nxe?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/o,l=Math.round(t*h),u=Math.round(e*h),l/he&&--u,h=-h):(h=Math.pow(10,i)*o,l=Math.round(t/h),u=Math.round(e/h),l*he&&--u),u0))return[];if(t===e)return[t];let n=e=i))return[];let l=a-i+1,u=new Array(l);if(n)if(o<0)for(let h=0;h{"use strict";txe=Math.sqrt(50),rxe=Math.sqrt(10),nxe=Math.sqrt(2);s(e4,"tickSpec");s(t4,"ticks");s(X1,"tickIncrement");s(sp,"tickStep")});function r4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var x$=_(()=>{"use strict";s(r4,"max")});function n4(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var b$=_(()=>{"use strict";s(n4,"min")});function i4(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n{"use strict";s(i4,"range")});var ph=_(()=>{"use strict";m$();kC();x$();b$();k$();v$();y$()});function EC(t){return t}var w$=_(()=>{"use strict";s(EC,"default")});function ixe(t){return"translate("+t+",0)"}function axe(t){return"translate(0,"+t+")"}function sxe(t){return e=>+t(e)}function oxe(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function lxe(){return!this.__axis}function E$(t,e){var r=[],n=null,i=null,a=6,o=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=t===s4||t===a4?-1:1,f=t===a4||t===CC?"x":"y",d=t===s4||t===SC?ixe:axe;function p(m){var g=n??(e.ticks?e.ticks.apply(e,r):e.domain()),y=i??(e.tickFormat?e.tickFormat.apply(e,r):EC),v=Math.max(a,0)+l,x=e.range(),b=+x[0]+u,k=+x[x.length-1]+u,A=(e.bandwidth?oxe:sxe)(e.copy(),u),w=m.selection?m.selection():m,T=w.selectAll(".domain").data([null]),C=w.selectAll(".tick").data(g,e).order(),E=C.exit(),S=C.enter().append("g").attr("class","tick"),R=C.select("line"),D=C.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(S),R=R.merge(S.append("line").attr("stroke","currentColor").attr(f+"2",h*a)),D=D.merge(S.append("text").attr("fill","currentColor").attr(f,h*v).attr("dy",t===s4?"0em":t===SC?"0.71em":"0.32em")),m!==w&&(T=T.transition(m),C=C.transition(m),R=R.transition(m),D=D.transition(m),E=E.transition(m).attr("opacity",T$).attr("transform",function(L){return isFinite(L=A(L))?d(L+u):this.getAttribute("transform")}),S.attr("opacity",T$).attr("transform",function(L){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(L))?P:A(L))+u)})),E.remove(),T.attr("d",t===a4||t===CC?o?"M"+h*o+","+b+"H"+u+"V"+k+"H"+h*o:"M"+u+","+b+"V"+k:o?"M"+b+","+h*o+"V"+u+"H"+k+"V"+h*o:"M"+b+","+u+"H"+k),C.attr("opacity",1).attr("transform",function(L){return d(A(L)+u)}),R.attr(f+"2",h*a),D.attr(f,h*v).text(y),w.filter(lxe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===CC?"start":t===a4?"end":"middle"),w.each(function(){this.__axis=A})}return s(p,"axis"),p.scale=function(m){return arguments.length?(e=m,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(a=o=+m,p):a},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a},p.tickSizeOuter=function(m){return arguments.length?(o=+m,p):o},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function _C(t){return E$(s4,t)}function AC(t){return E$(SC,t)}var s4,CC,SC,a4,T$,C$=_(()=>{"use strict";w$();s4=1,CC=2,SC=3,a4=4,T$=1e-6;s(ixe,"translateX");s(axe,"translateY");s(sxe,"number");s(oxe,"center");s(lxe,"entering");s(E$,"axis");s(_C,"axisTop");s(AC,"axisBottom")});var S$=_(()=>{"use strict";C$()});function A$(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function hxe(t,e){for(var r=0,n=t.length,i;r{"use strict";cxe={value:s(()=>{},"value")};s(A$,"dispatch");s(o4,"Dispatch");s(uxe,"parseTypenames");o4.prototype=A$.prototype={constructor:o4,on:s(function(t,e){var r=this._,n=uxe(t+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n{"use strict";L$()});var l4,RC,MC=_(()=>{"use strict";l4="http://www.w3.org/1999/xhtml",RC={svg:"http://www.w3.org/2000/svg",xhtml:l4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Hl(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),RC.hasOwnProperty(e)?{space:RC[e],local:t}:t}var c4=_(()=>{"use strict";MC();s(Hl,"default")});function fxe(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===l4&&e.documentElement.namespaceURI===l4?e.createElement(t):e.createElementNS(r,t)}}function dxe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function j1(t){var e=Hl(t);return(e.local?dxe:fxe)(e)}var IC=_(()=>{"use strict";c4();MC();s(fxe,"creatorInherit");s(dxe,"creatorFixed");s(j1,"default")});function pxe(){}function mh(t){return t==null?pxe:function(){return this.querySelector(t)}}var u4=_(()=>{"use strict";s(pxe,"none");s(mh,"default")});function NC(t){typeof t!="function"&&(t=mh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{"use strict";Qo();u4();s(NC,"default")});function OC(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}var R$=_(()=>{"use strict";s(OC,"array")});function mxe(){return[]}function op(t){return t==null?mxe:function(){return this.querySelectorAll(t)}}var PC=_(()=>{"use strict";s(mxe,"empty");s(op,"default")});function gxe(t){return function(){return OC(t.apply(this,arguments))}}function BC(t){typeof t=="function"?t=gxe(t):t=op(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{"use strict";Qo();R$();PC();s(gxe,"arrayAll");s(BC,"default")});function lp(t){return function(){return this.matches(t)}}function h4(t){return function(e){return e.matches(t)}}var K1=_(()=>{"use strict";s(lp,"default");s(h4,"childMatcher")});function vxe(t){return function(){return yxe.call(this.children,t)}}function xxe(){return this.firstElementChild}function FC(t){return this.select(t==null?xxe:vxe(typeof t=="function"?t:h4(t)))}var yxe,I$=_(()=>{"use strict";K1();yxe=Array.prototype.find;s(vxe,"childFind");s(xxe,"childFirst");s(FC,"default")});function kxe(){return Array.from(this.children)}function wxe(t){return function(){return bxe.call(this.children,t)}}function zC(t){return this.selectAll(t==null?kxe:wxe(typeof t=="function"?t:h4(t)))}var bxe,N$=_(()=>{"use strict";K1();bxe=Array.prototype.filter;s(kxe,"children");s(wxe,"childrenFilter");s(zC,"default")});function $C(t){typeof t!="function"&&(t=lp(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{"use strict";Qo();K1();s($C,"default")});function Q1(t){return new Array(t.length)}var GC=_(()=>{"use strict";s(Q1,"default")});function VC(){return new qn(this._enter||this._groups.map(Q1),this._parents)}function Z1(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var UC=_(()=>{"use strict";GC();Qo();s(VC,"default");s(Z1,"EnterNode");Z1.prototype={constructor:Z1,appendChild:s(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:s(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:s(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:s(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function qC(t){return function(){return t}}var P$=_(()=>{"use strict";s(qC,"default")});function Txe(t,e,r,n,i,a){for(var o=0,l,u=e.length,h=a.length;o=k&&(k=b+1);!(w=v[k])&&++k{"use strict";Qo();UC();P$();s(Txe,"bindIndex");s(Exe,"bindKey");s(Cxe,"datum");s(WC,"default");s(Sxe,"arraylike")});function HC(){return new qn(this._exit||this._groups.map(Q1),this._parents)}var F$=_(()=>{"use strict";GC();Qo();s(HC,"default")});function YC(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var z$=_(()=>{"use strict";s(YC,"default")});function XC(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,o=Math.min(i,a),l=new Array(i),u=0;u{"use strict";Qo();s(XC,"default")});function jC(){for(var t=this._groups,e=-1,r=t.length;++e=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}var G$=_(()=>{"use strict";s(jC,"default")});function KC(t){t||(t=_xe);function e(d,p){return d&&p?t(d.__data__,p.__data__):!d-!p}s(e,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}var V$=_(()=>{"use strict";Qo();s(KC,"default");s(_xe,"ascending")});function QC(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var U$=_(()=>{"use strict";s(QC,"default")});function ZC(){return Array.from(this)}var q$=_(()=>{"use strict";s(ZC,"default")});function JC(){for(var t=this._groups,e=0,r=t.length;e{"use strict";s(JC,"default")});function eS(){let t=0;for(let e of this)++t;return t}var H$=_(()=>{"use strict";s(eS,"default")});function tS(){return!this.node()}var Y$=_(()=>{"use strict";s(tS,"default")});function rS(t){for(var e=this._groups,r=0,n=e.length;r{"use strict";s(rS,"default")});function Axe(t){return function(){this.removeAttribute(t)}}function Lxe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dxe(t,e){return function(){this.setAttribute(t,e)}}function Rxe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mxe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function Ixe(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function nS(t,e){var r=Hl(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?Lxe:Axe:typeof e=="function"?r.local?Ixe:Mxe:r.local?Rxe:Dxe)(r,e))}var j$=_(()=>{"use strict";c4();s(Axe,"attrRemove");s(Lxe,"attrRemoveNS");s(Dxe,"attrConstant");s(Rxe,"attrConstantNS");s(Mxe,"attrFunction");s(Ixe,"attrFunctionNS");s(nS,"default")});function J1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var iS=_(()=>{"use strict";s(J1,"default")});function Nxe(t){return function(){this.style.removeProperty(t)}}function Oxe(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Pxe(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function aS(t,e,r){return arguments.length>1?this.each((e==null?Nxe:typeof e=="function"?Pxe:Oxe)(t,e,r??"")):gh(this.node(),t)}function gh(t,e){return t.style.getPropertyValue(e)||J1(t).getComputedStyle(t,null).getPropertyValue(e)}var sS=_(()=>{"use strict";iS();s(Nxe,"styleRemove");s(Oxe,"styleConstant");s(Pxe,"styleFunction");s(aS,"default");s(gh,"styleValue")});function Bxe(t){return function(){delete this[t]}}function Fxe(t,e){return function(){this[t]=e}}function zxe(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function oS(t,e){return arguments.length>1?this.each((e==null?Bxe:typeof e=="function"?zxe:Fxe)(t,e)):this.node()[t]}var K$=_(()=>{"use strict";s(Bxe,"propertyRemove");s(Fxe,"propertyConstant");s(zxe,"propertyFunction");s(oS,"default")});function Q$(t){return t.trim().split(/^|\s+/)}function lS(t){return t.classList||new Z$(t)}function Z$(t){this._node=t,this._names=Q$(t.getAttribute("class")||"")}function J$(t,e){for(var r=lS(t),n=-1,i=e.length;++n{"use strict";s(Q$,"classArray");s(lS,"classList");s(Z$,"ClassList");Z$.prototype={add:s(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:s(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:s(function(t){return this._names.indexOf(t)>=0},"contains")};s(J$,"classedAdd");s(eG,"classedRemove");s($xe,"classedTrue");s(Gxe,"classedFalse");s(Vxe,"classedFunction");s(cS,"default")});function Uxe(){this.textContent=""}function qxe(t){return function(){this.textContent=t}}function Wxe(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function uS(t){return arguments.length?this.each(t==null?Uxe:(typeof t=="function"?Wxe:qxe)(t)):this.node().textContent}var rG=_(()=>{"use strict";s(Uxe,"textRemove");s(qxe,"textConstant");s(Wxe,"textFunction");s(uS,"default")});function Hxe(){this.innerHTML=""}function Yxe(t){return function(){this.innerHTML=t}}function Xxe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function hS(t){return arguments.length?this.each(t==null?Hxe:(typeof t=="function"?Xxe:Yxe)(t)):this.node().innerHTML}var nG=_(()=>{"use strict";s(Hxe,"htmlRemove");s(Yxe,"htmlConstant");s(Xxe,"htmlFunction");s(hS,"default")});function jxe(){this.nextSibling&&this.parentNode.appendChild(this)}function fS(){return this.each(jxe)}var iG=_(()=>{"use strict";s(jxe,"raise");s(fS,"default")});function Kxe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dS(){return this.each(Kxe)}var aG=_(()=>{"use strict";s(Kxe,"lower");s(dS,"default")});function pS(t){var e=typeof t=="function"?t:j1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var sG=_(()=>{"use strict";IC();s(pS,"default")});function Qxe(){return null}function mS(t,e){var r=typeof t=="function"?t:j1(t),n=e==null?Qxe:typeof e=="function"?e:mh(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var oG=_(()=>{"use strict";IC();u4();s(Qxe,"constantNull");s(mS,"default")});function Zxe(){var t=this.parentNode;t&&t.removeChild(this)}function gS(){return this.each(Zxe)}var lG=_(()=>{"use strict";s(Zxe,"remove");s(gS,"default")});function Jxe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ebe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yS(t){return this.select(t?ebe:Jxe)}var cG=_(()=>{"use strict";s(Jxe,"selection_cloneShallow");s(ebe,"selection_cloneDeep");s(yS,"default")});function vS(t){return arguments.length?this.property("__data__",t):this.node().__data__}var uG=_(()=>{"use strict";s(vS,"default")});function tbe(t){return function(e){t.call(this,e,this.__data__)}}function rbe(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function nbe(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r{"use strict";s(tbe,"contextListener");s(rbe,"parseTypenames");s(nbe,"onRemove");s(ibe,"onAdd");s(xS,"default")});function fG(t,e,r){var n=J1(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function abe(t,e){return function(){return fG(this,t,e)}}function sbe(t,e){return function(){return fG(this,t,e.apply(this,arguments))}}function bS(t,e){return this.each((typeof e=="function"?sbe:abe)(t,e))}var dG=_(()=>{"use strict";iS();s(fG,"dispatchEvent");s(abe,"dispatchConstant");s(sbe,"dispatchFunction");s(bS,"default")});function*kS(){for(var t=this._groups,e=0,r=t.length;e{"use strict";s(kS,"default")});function qn(t,e){this._groups=t,this._parents=e}function mG(){return new qn([[document.documentElement]],wS)}function obe(){return this}var wS,eu,Qo=_(()=>{"use strict";D$();M$();I$();N$();O$();B$();UC();F$();z$();$$();G$();V$();U$();q$();W$();H$();Y$();X$();j$();sS();K$();tG();rG();nG();iG();aG();sG();oG();lG();cG();uG();hG();dG();pG();wS=[null];s(qn,"Selection");s(mG,"selection");s(obe,"selection_selection");qn.prototype=mG.prototype={constructor:qn,select:NC,selectAll:BC,selectChild:FC,selectChildren:zC,filter:$C,data:WC,enter:VC,exit:HC,join:YC,merge:XC,selection:obe,order:jC,sort:KC,call:QC,nodes:ZC,node:JC,size:eS,empty:tS,each:rS,attr:nS,style:aS,property:oS,classed:cS,text:uS,html:hS,raise:fS,lower:dS,append:pS,insert:mS,remove:gS,clone:yS,datum:vS,on:xS,dispatch:bS,[Symbol.iterator]:kS};eu=mG});function Me(t){return typeof t=="string"?new qn([[document.querySelector(t)]],[document.documentElement]):new qn([[t]],wS)}var gG=_(()=>{"use strict";Qo();s(Me,"default")});var Zo=_(()=>{"use strict";K1();c4();gG();Qo();u4();PC();sS()});var yG=_(()=>{"use strict"});function yh(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function cp(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}var TS=_(()=>{"use strict";s(yh,"default");s(cp,"extend")});function vh(){}function xG(){return this.rgb().formatHex()}function mbe(){return this.rgb().formatHex8()}function gbe(){return SG(this).formatHsl()}function bG(){return this.rgb().formatRgb()}function el(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=lbe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?kG(e):r===3?new Ji(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?f4(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?f4(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=cbe.exec(t))?new Ji(e[1],e[2],e[3],1):(e=ube.exec(t))?new Ji(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=hbe.exec(t))?f4(e[1],e[2],e[3],e[4]):(e=fbe.exec(t))?f4(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=dbe.exec(t))?EG(e[1],e[2]/100,e[3]/100,1):(e=pbe.exec(t))?EG(e[1],e[2]/100,e[3]/100,e[4]):vG.hasOwnProperty(t)?kG(vG[t]):t==="transparent"?new Ji(NaN,NaN,NaN,0):null}function kG(t){return new Ji(t>>16&255,t>>8&255,t&255,1)}function f4(t,e,r,n){return n<=0&&(t=e=r=NaN),new Ji(t,e,r,n)}function CS(t){return t instanceof vh||(t=el(t)),t?(t=t.rgb(),new Ji(t.r,t.g,t.b,t.opacity)):new Ji}function hp(t,e,r,n){return arguments.length===1?CS(t):new Ji(t,e,r,n??1)}function Ji(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function wG(){return`#${qf(this.r)}${qf(this.g)}${qf(this.b)}`}function ybe(){return`#${qf(this.r)}${qf(this.g)}${qf(this.b)}${qf((isNaN(this.opacity)?1:this.opacity)*255)}`}function TG(){let t=m4(this.opacity);return`${t===1?"rgb(":"rgba("}${Wf(this.r)}, ${Wf(this.g)}, ${Wf(this.b)}${t===1?")":`, ${t})`}`}function m4(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wf(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function qf(t){return t=Wf(t),(t<16?"0":"")+t.toString(16)}function EG(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Jo(t,e,r,n)}function SG(t){if(t instanceof Jo)return new Jo(t.h,t.s,t.l,t.opacity);if(t instanceof vh||(t=el(t)),!t)return new Jo;if(t instanceof Jo)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,l=a-i,u=(a+i)/2;return l?(e===a?o=(r-n)/l+(r0&&u<1?0:o,new Jo(o,l,u,t.opacity)}function _G(t,e,r,n){return arguments.length===1?SG(t):new Jo(t,e,r,n??1)}function Jo(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function CG(t){return t=(t||0)%360,t<0?t+360:t}function d4(t){return Math.max(0,Math.min(1,t||0))}function ES(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var ey,p4,up,ty,Yl,lbe,cbe,ube,hbe,fbe,dbe,pbe,vG,SS=_(()=>{"use strict";TS();s(vh,"Color");ey=.7,p4=1/ey,up="\\s*([+-]?\\d+)\\s*",ty="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lbe=/^#([0-9a-f]{3,8})$/,cbe=new RegExp(`^rgb\\(${up},${up},${up}\\)$`),ube=new RegExp(`^rgb\\(${Yl},${Yl},${Yl}\\)$`),hbe=new RegExp(`^rgba\\(${up},${up},${up},${ty}\\)$`),fbe=new RegExp(`^rgba\\(${Yl},${Yl},${Yl},${ty}\\)$`),dbe=new RegExp(`^hsl\\(${ty},${Yl},${Yl}\\)$`),pbe=new RegExp(`^hsla\\(${ty},${Yl},${Yl},${ty}\\)$`),vG={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};yh(vh,el,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xG,formatHex:xG,formatHex8:mbe,formatHsl:gbe,formatRgb:bG,toString:bG});s(xG,"color_formatHex");s(mbe,"color_formatHex8");s(gbe,"color_formatHsl");s(bG,"color_formatRgb");s(el,"color");s(kG,"rgbn");s(f4,"rgba");s(CS,"rgbConvert");s(hp,"rgb");s(Ji,"Rgb");yh(Ji,hp,cp(vh,{brighter(t){return t=t==null?p4:Math.pow(p4,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ey:Math.pow(ey,t),new Ji(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ji(Wf(this.r),Wf(this.g),Wf(this.b),m4(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:wG,formatHex:wG,formatHex8:ybe,formatRgb:TG,toString:TG}));s(wG,"rgb_formatHex");s(ybe,"rgb_formatHex8");s(TG,"rgb_formatRgb");s(m4,"clampa");s(Wf,"clampi");s(qf,"hex");s(EG,"hsla");s(SG,"hslConvert");s(_G,"hsl");s(Jo,"Hsl");yh(Jo,_G,cp(vh,{brighter(t){return t=t==null?p4:Math.pow(p4,t),new Jo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ey:Math.pow(ey,t),new Jo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Ji(ES(t>=240?t-240:t+120,i,n),ES(t,i,n),ES(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Jo(CG(this.h),d4(this.s),d4(this.l),m4(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(){let t=m4(this.opacity);return`${t===1?"hsl(":"hsla("}${CG(this.h)}, ${d4(this.s)*100}%, ${d4(this.l)*100}%${t===1?")":`, ${t})`}`}}));s(CG,"clamph");s(d4,"clampt");s(ES,"hsl2rgb")});var AG,LG,DG=_(()=>{"use strict";AG=Math.PI/180,LG=180/Math.PI});function PG(t){if(t instanceof Xl)return new Xl(t.l,t.a,t.b,t.opacity);if(t instanceof tu)return BG(t);t instanceof Ji||(t=CS(t));var e=DS(t.r),r=DS(t.g),n=DS(t.b),i=_S((.2225045*e+.7168786*r+.0606169*n)/MG),a,o;return e===r&&r===n?a=o=i:(a=_S((.4360747*e+.3850649*r+.1430804*n)/RG),o=_S((.0139322*e+.0971045*r+.7141733*n)/IG)),new Xl(116*i-16,500*(a-i),200*(i-o),t.opacity)}function RS(t,e,r,n){return arguments.length===1?PG(t):new Xl(t,e,r,n??1)}function Xl(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function _S(t){return t>vbe?Math.pow(t,1/3):t/OG+NG}function AS(t){return t>fp?t*t*t:OG*(t-NG)}function LS(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function DS(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xbe(t){if(t instanceof tu)return new tu(t.h,t.c,t.l,t.opacity);if(t instanceof Xl||(t=PG(t)),t.a===0&&t.b===0)return new tu(NaN,0{"use strict";TS();SS();DG();g4=18,RG=.96422,MG=1,IG=.82521,NG=4/29,fp=6/29,OG=3*fp*fp,vbe=fp*fp*fp;s(PG,"labConvert");s(RS,"lab");s(Xl,"Lab");yh(Xl,RS,cp(vh,{brighter(t){return new Xl(this.l+g4*(t??1),this.a,this.b,this.opacity)},darker(t){return new Xl(this.l-g4*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=RG*AS(e),t=MG*AS(t),r=IG*AS(r),new Ji(LS(3.1338561*e-1.6168667*t-.4906146*r),LS(-.9787684*e+1.9161415*t+.033454*r),LS(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));s(_S,"xyz2lab");s(AS,"lab2xyz");s(LS,"lrgb2rgb");s(DS,"rgb2lrgb");s(xbe,"hclConvert");s(ry,"hcl");s(tu,"Hcl");s(BG,"hcl2lab");yh(tu,ry,cp(vh,{brighter(t){return new tu(this.h,this.c,this.l+g4*(t??1),this.opacity)},darker(t){return new tu(this.h,this.c,this.l-g4*(t??1),this.opacity)},rgb(){return BG(this).rgb()}}))});var dp=_(()=>{"use strict";SS();FG()});function MS(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function IS(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],o=n>0?t[n-1]:2*i-a,l=n{"use strict";s(MS,"basis");s(IS,"default")});function OS(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],o=t[(n+1)%e],l=t[(n+2)%e];return MS((r-n/e)*e,i,a,o,l)}}var zG=_(()=>{"use strict";NS();s(OS,"default")});var pp,PS=_(()=>{"use strict";pp=s(t=>()=>t,"default")});function $G(t,e){return function(r){return t+r*e}}function bbe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function GG(t,e){var r=e-t;return r?$G(t,r>180||r<-180?r-360*Math.round(r/360):r):pp(isNaN(t)?e:t)}function VG(t){return(t=+t)==1?ru:function(e,r){return r-e?bbe(e,r,t):pp(isNaN(e)?r:e)}}function ru(t,e){var r=e-t;return r?$G(t,r):pp(isNaN(t)?e:t)}var BS=_(()=>{"use strict";PS();s($G,"linear");s(bbe,"exponential");s(GG,"hue");s(VG,"gamma");s(ru,"nogamma")});function UG(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),o,l;for(o=0;o{"use strict";dp();NS();zG();BS();Hf=s(function t(e){var r=VG(e);function n(i,a){var o=r((i=hp(i)).r,(a=hp(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),h=ru(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=u(f),i.opacity=h(f),i+""}}return s(n,"rgb"),n.gamma=t,n},"rgbGamma")(1);s(UG,"rgbSpline");kbe=UG(IS),wbe=UG(OS)});function zS(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i{"use strict";s(zS,"default");s(qG,"isNumberArray")});function HG(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o{"use strict";y4();s(HG,"genericArray")});function $S(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}var XG=_(()=>{"use strict";s($S,"default")});function $i(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ny=_(()=>{"use strict";s($i,"default")});function GS(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=xh(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var jG=_(()=>{"use strict";y4();s(GS,"default")});function Tbe(t){return function(){return t}}function Ebe(t){return function(e){return t(e)+""}}function mp(t,e){var r=US.lastIndex=VS.lastIndex=0,n,i,a,o=-1,l=[],u=[];for(t=t+"",e=e+"";(n=US.exec(t))&&(i=VS.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:$i(n,i)})),r=VS.lastIndex;return r{"use strict";ny();US=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,VS=new RegExp(US.source,"g");s(Tbe,"zero");s(Ebe,"one");s(mp,"default")});function xh(t,e){var r=typeof e,n;return e==null||r==="boolean"?pp(e):(r==="number"?$i:r==="string"?(n=el(e))?(e=n,Hf):mp:e instanceof el?Hf:e instanceof Date?$S:qG(e)?zS:Array.isArray(e)?HG:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?GS:$i)(t,e)}var y4=_(()=>{"use strict";dp();FS();YG();XG();ny();jG();qS();PS();WG();s(xh,"default")});function v4(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var KG=_(()=>{"use strict";s(v4,"default")});function b4(t,e,r,n,i,a){var o,l,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),t*n{"use strict";QG=180/Math.PI,x4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};s(b4,"default")});function JG(t){let e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?x4:b4(e.a,e.b,e.c,e.d,e.e,e.f)}function eV(t){return t==null?x4:(k4||(k4=document.createElementNS("http://www.w3.org/2000/svg","g")),k4.setAttribute("transform",t),(t=k4.transform.baseVal.consolidate())?(t=t.matrix,b4(t.a,t.b,t.c,t.d,t.e,t.f)):x4)}var k4,tV=_(()=>{"use strict";ZG();s(JG,"parseCss");s(eV,"parseSvg")});function rV(t,e,r,n){function i(h){return h.length?h.pop()+" ":""}s(i,"pop");function a(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push("translate(",null,e,null,r);g.push({i:y-4,x:$i(h,d)},{i:y-2,x:$i(f,p)})}else(d||p)&&m.push("translate("+d+e+p+r)}s(a,"translate");function o(h,f,d,p){h!==f?(h-f>180?f+=360:f-h>180&&(h+=360),p.push({i:d.push(i(d)+"rotate(",null,n)-2,x:$i(h,f)})):f&&d.push(i(d)+"rotate("+f+n)}s(o,"rotate");function l(h,f,d,p){h!==f?p.push({i:d.push(i(d)+"skewX(",null,n)-2,x:$i(h,f)}):f&&d.push(i(d)+"skewX("+f+n)}s(l,"skewX");function u(h,f,d,p,m,g){if(h!==d||f!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:$i(h,d)},{i:y-2,x:$i(f,p)})}else(d!==1||p!==1)&&m.push(i(m)+"scale("+d+","+p+")")}return s(u,"scale"),function(h,f){var d=[],p=[];return h=t(h),f=t(f),a(h.translateX,h.translateY,f.translateX,f.translateY,d,p),o(h.rotate,f.rotate,d,p),l(h.skewX,f.skewX,d,p),u(h.scaleX,h.scaleY,f.scaleX,f.scaleY,d,p),h=f=null,function(m){for(var g=-1,y=p.length,v;++g{"use strict";ny();tV();s(rV,"interpolateTransform");WS=rV(JG,"px, ","px)","deg)"),HS=rV(eV,", ",")",")")});function iV(t){return function(e,r){var n=t((e=ry(e)).h,(r=ry(r)).h),i=ru(e.c,r.c),a=ru(e.l,r.l),o=ru(e.opacity,r.opacity);return function(l){return e.h=n(l),e.c=i(l),e.l=a(l),e.opacity=o(l),e+""}}}var YS,Cbe,aV=_(()=>{"use strict";dp();BS();s(iV,"hcl");YS=iV(GG),Cbe=iV(ru)});var gp=_(()=>{"use strict";y4();ny();KG();qS();nV();FS();aV()});function cy(){return Yf||(lV(Sbe),Yf=oy.now()+E4)}function Sbe(){Yf=0}function ly(){this._call=this._time=this._next=null}function C4(t,e,r){var n=new ly;return n.restart(t,e,r),n}function cV(){cy(),++yp;for(var t=w4,e;t;)(e=Yf-t._time)>=0&&t._call.call(void 0,e),t=t._next;--yp}function sV(){Yf=(T4=oy.now())+E4,yp=ay=0;try{cV()}finally{yp=0,Abe(),Yf=0}}function _be(){var t=oy.now(),e=t-T4;e>oV&&(E4-=e,T4=t)}function Abe(){for(var t,e=w4,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:w4=r);sy=t,XS(n)}function XS(t){if(!yp){ay&&(ay=clearTimeout(ay));var e=t-Yf;e>24?(t<1/0&&(ay=setTimeout(sV,t-oy.now()-E4)),iy&&(iy=clearInterval(iy))):(iy||(T4=oy.now(),iy=setInterval(_be,oV)),yp=1,lV(sV))}}var yp,ay,iy,oV,w4,sy,T4,Yf,E4,oy,lV,jS=_(()=>{"use strict";yp=0,ay=0,iy=0,oV=1e3,T4=0,Yf=0,E4=0,oy=typeof performance=="object"&&performance.now?performance:Date,lV=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};s(cy,"now");s(Sbe,"clearNow");s(ly,"Timer");ly.prototype=C4.prototype={constructor:ly,restart:s(function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?cy():+r)+(e==null?0:+e),!this._next&&sy!==this&&(sy?sy._next=this:w4=this,sy=this),this._call=t,this._time=r,XS()},"restart"),stop:s(function(){this._call&&(this._call=null,this._time=1/0,XS())},"stop")};s(C4,"timer");s(cV,"timerFlush");s(sV,"wake");s(_be,"poke");s(Abe,"nap");s(XS,"sleep")});function uy(t,e,r){var n=new ly;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var uV=_(()=>{"use strict";jS();s(uy,"default")});var S4=_(()=>{"use strict";jS();uV()});function nu(t,e,r,n,i,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;Rbe(t,r,{name:e,index:n,group:i,on:Lbe,tween:Dbe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:dV})}function fy(t,e){var r=Si(t,e);if(r.state>dV)throw new Error("too late; already scheduled");return r}function ea(t,e){var r=Si(t,e);if(r.state>_4)throw new Error("too late; already running");return r}function Si(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Rbe(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=C4(a,0,r.time);function a(h){r.state=hV,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}s(a,"schedule");function o(h){var f,d,p,m;if(r.state!==hV)return u();for(f in n)if(m=n[f],m.name===r.name){if(m.state===_4)return uy(o);m.state===fV?(m.state=hy,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete n[f]):+f{"use strict";DC();S4();Lbe=LC("start","end","cancel","interrupt"),Dbe=[],dV=0,hV=1,A4=2,_4=3,fV=4,L4=5,hy=6;s(nu,"default");s(fy,"init");s(ea,"set");s(Si,"get");s(Rbe,"create")});function dy(t,e){var r=t.__transition,n,i,a=!0,o;if(r){e=e==null?null:e+"";for(o in r){if((n=r[o]).name!==e){a=!1;continue}i=n.state>A4&&n.state{"use strict";us();s(dy,"default")});function KS(t){return this.each(function(){dy(this,t)})}var mV=_(()=>{"use strict";pV();s(KS,"default")});function Mbe(t,e){var r,n;return function(){var i=ea(this,t),a=i.tween;if(a!==r){n=r=a;for(var o=0,l=n.length;o{"use strict";us();s(Mbe,"tweenRemove");s(Ibe,"tweenFunction");s(QS,"default");s(vp,"tweenValue")});function my(t,e){var r;return(typeof e=="number"?$i:e instanceof el?Hf:(r=el(e))?(e=r,Hf):mp)(t,e)}var ZS=_(()=>{"use strict";dp();gp();s(my,"default")});function Nbe(t){return function(){this.removeAttribute(t)}}function Obe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pbe(t,e,r){var n,i=r+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===n?a:a=e(n=o,r)}}function Bbe(t,e,r){var n,i=r+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===n?a:a=e(n=o,r)}}function Fbe(t,e,r){var n,i,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttribute(t):(o=this.getAttribute(t),u=l+"",o===u?null:o===n&&u===i?a:(i=u,a=e(n=o,l)))}}function zbe(t,e,r){var n,i,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),u=l+"",o===u?null:o===n&&u===i?a:(i=u,a=e(n=o,l)))}}function JS(t,e){var r=Hl(t),n=r==="transform"?HS:my;return this.attrTween(t,typeof e=="function"?(r.local?zbe:Fbe)(r,n,vp(this,"attr."+t,e)):e==null?(r.local?Obe:Nbe)(r):(r.local?Bbe:Pbe)(r,n,e))}var gV=_(()=>{"use strict";gp();Zo();py();ZS();s(Nbe,"attrRemove");s(Obe,"attrRemoveNS");s(Pbe,"attrConstant");s(Bbe,"attrConstantNS");s(Fbe,"attrFunction");s(zbe,"attrFunctionNS");s(JS,"default")});function $be(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function Gbe(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Vbe(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&Gbe(t,a)),r}return s(i,"tween"),i._value=e,i}function Ube(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&$be(t,a)),r}return s(i,"tween"),i._value=e,i}function e8(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Hl(t);return this.tween(r,(n.local?Vbe:Ube)(n,e))}var yV=_(()=>{"use strict";Zo();s($be,"attrInterpolate");s(Gbe,"attrInterpolateNS");s(Vbe,"attrTweenNS");s(Ube,"attrTween");s(e8,"default")});function qbe(t,e){return function(){fy(this,t).delay=+e.apply(this,arguments)}}function Wbe(t,e){return e=+e,function(){fy(this,t).delay=e}}function t8(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?qbe:Wbe)(e,t)):Si(this.node(),e).delay}var vV=_(()=>{"use strict";us();s(qbe,"delayFunction");s(Wbe,"delayConstant");s(t8,"default")});function Hbe(t,e){return function(){ea(this,t).duration=+e.apply(this,arguments)}}function Ybe(t,e){return e=+e,function(){ea(this,t).duration=e}}function r8(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Hbe:Ybe)(e,t)):Si(this.node(),e).duration}var xV=_(()=>{"use strict";us();s(Hbe,"durationFunction");s(Ybe,"durationConstant");s(r8,"default")});function Xbe(t,e){if(typeof e!="function")throw new Error;return function(){ea(this,t).ease=e}}function n8(t){var e=this._id;return arguments.length?this.each(Xbe(e,t)):Si(this.node(),e).ease}var bV=_(()=>{"use strict";us();s(Xbe,"easeConstant");s(n8,"default")});function jbe(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;ea(this,t).ease=r}}function i8(t){if(typeof t!="function")throw new Error;return this.each(jbe(this._id,t))}var kV=_(()=>{"use strict";us();s(jbe,"easeVarying");s(i8,"default")});function a8(t){typeof t!="function"&&(t=lp(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{"use strict";Zo();Xf();s(a8,"default")});function s8(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),o=new Array(n),l=0;l{"use strict";Xf();s(s8,"default")});function Kbe(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function Qbe(t,e,r){var n,i,a=Kbe(e)?fy:ea;return function(){var o=a(this,t),l=o.on;l!==n&&(i=(n=l).copy()).on(e,r),o.on=i}}function o8(t,e){var r=this._id;return arguments.length<2?Si(this.node(),r).on.on(t):this.each(Qbe(r,t,e))}var EV=_(()=>{"use strict";us();s(Kbe,"start");s(Qbe,"onFunction");s(o8,"default")});function Zbe(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function l8(){return this.on("end.remove",Zbe(this._id))}var CV=_(()=>{"use strict";s(Zbe,"removeFunction");s(l8,"default")});function c8(t){var e=this._name,r=this._id;typeof t!="function"&&(t=mh(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o{"use strict";Zo();Xf();us();s(c8,"default")});function u8(t){var e=this._name,r=this._id;typeof t!="function"&&(t=op(t));for(var n=this._groups,i=n.length,a=[],o=[],l=0;l{"use strict";Zo();Xf();us();s(u8,"default")});function h8(){return new Jbe(this._groups,this._parents)}var Jbe,AV=_(()=>{"use strict";Zo();Jbe=eu.prototype.constructor;s(h8,"default")});function e4e(t,e){var r,n,i;return function(){var a=gh(this,t),o=(this.style.removeProperty(t),gh(this,t));return a===o?null:a===r&&o===n?i:i=e(r=a,n=o)}}function LV(t){return function(){this.style.removeProperty(t)}}function t4e(t,e,r){var n,i=r+"",a;return function(){var o=gh(this,t);return o===i?null:o===n?a:a=e(n=o,r)}}function r4e(t,e,r){var n,i,a;return function(){var o=gh(this,t),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(t),gh(this,t))),o===u?null:o===n&&u===i?a:(i=u,a=e(n=o,l))}}function n4e(t,e){var r,n,i,a="style."+e,o="end."+a,l;return function(){var u=ea(this,t),h=u.on,f=u.value[a]==null?l||(l=LV(e)):void 0;(h!==r||i!==f)&&(n=(r=h).copy()).on(o,i=f),u.on=n}}function f8(t,e,r){var n=(t+="")=="transform"?WS:my;return e==null?this.styleTween(t,e4e(t,n)).on("end.style."+t,LV(t)):typeof e=="function"?this.styleTween(t,r4e(t,n,vp(this,"style."+t,e))).each(n4e(this._id,t)):this.styleTween(t,t4e(t,n,e),r).on("end.style."+t,null)}var DV=_(()=>{"use strict";gp();Zo();us();py();ZS();s(e4e,"styleNull");s(LV,"styleRemove");s(t4e,"styleConstant");s(r4e,"styleFunction");s(n4e,"styleMaybeRemove");s(f8,"default")});function i4e(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function a4e(t,e,r){var n,i;function a(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&i4e(t,o,r)),n}return s(a,"tween"),a._value=e,a}function d8(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,a4e(t,e,r??""))}var RV=_(()=>{"use strict";s(i4e,"styleInterpolate");s(a4e,"styleTween");s(d8,"default")});function s4e(t){return function(){this.textContent=t}}function o4e(t){return function(){var e=t(this);this.textContent=e??""}}function p8(t){return this.tween("text",typeof t=="function"?o4e(vp(this,"text",t)):s4e(t==null?"":t+""))}var MV=_(()=>{"use strict";py();s(s4e,"textConstant");s(o4e,"textFunction");s(p8,"default")});function l4e(t){return function(e){this.textContent=t.call(this,e)}}function c4e(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&l4e(i)),e}return s(n,"tween"),n._value=t,n}function m8(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,c4e(t))}var IV=_(()=>{"use strict";s(l4e,"textInterpolate");s(c4e,"textTween");s(m8,"default")});function g8(){for(var t=this._name,e=this._id,r=D4(),n=this._groups,i=n.length,a=0;a{"use strict";Xf();us();s(g8,"default")});function y8(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,o){var l={value:o},u={value:s(function(){--i===0&&a()},"value")};r.each(function(){var h=ea(this,n),f=h.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),h.on=e}),i===0&&a()})}var OV=_(()=>{"use strict";us();s(y8,"default")});function Va(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function PV(t){return eu().transition(t)}function D4(){return++u4e}var u4e,iu,Xf=_(()=>{"use strict";Zo();gV();yV();vV();xV();bV();kV();wV();TV();EV();CV();SV();_V();AV();DV();RV();MV();IV();NV();py();OV();u4e=0;s(Va,"Transition");s(PV,"transition");s(D4,"newId");iu=eu.prototype;Va.prototype=PV.prototype={constructor:Va,select:c8,selectAll:u8,selectChild:iu.selectChild,selectChildren:iu.selectChildren,filter:a8,merge:s8,selection:h8,transition:g8,call:iu.call,nodes:iu.nodes,node:iu.node,size:iu.size,empty:iu.empty,each:iu.each,on:o8,attr:JS,attrTween:e8,style:f8,styleTween:d8,text:p8,textTween:m8,remove:l8,tween:QS,delay:t8,duration:r8,ease:n8,easeVarying:i8,end:y8,[Symbol.iterator]:iu[Symbol.iterator]}});function R4(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var BV=_(()=>{"use strict";s(R4,"cubicInOut")});var v8=_(()=>{"use strict";BV()});function f4e(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function x8(t){var e,r;t instanceof Va?(e=t._id,t=t._name):(e=D4(),(r=h4e).time=cy(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a{"use strict";Xf();us();v8();S4();h4e={time:null,delay:0,duration:250,ease:R4};s(f4e,"inherit");s(x8,"default")});var zV=_(()=>{"use strict";Zo();mV();FV();eu.prototype.interrupt=KS;eu.prototype.transition=x8});var M4=_(()=>{"use strict";zV()});var $V=_(()=>{"use strict"});var GV=_(()=>{"use strict"});var VV=_(()=>{"use strict"});function UV(t){return[+t[0],+t[1]]}function d4e(t){return[UV(t[0]),UV(t[1])]}function b8(t){return{type:t}}var tft,rft,nft,ift,aft,sft,qV=_(()=>{"use strict";M4();$V();GV();VV();({abs:tft,max:rft,min:nft}=Math);s(UV,"number1");s(d4e,"number2");ift={name:"x",handles:["w","e"].map(b8),input:s(function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),output:s(function(t){return t&&[t[0][0],t[1][0]]},"output")},aft={name:"y",handles:["n","s"].map(b8),input:s(function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),output:s(function(t){return t&&[t[0][1],t[1][1]]},"output")},sft={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(b8),input:s(function(t){return t==null?null:d4e(t)},"input"),output:s(function(t){return t},"output")};s(b8,"type")});var WV=_(()=>{"use strict";qV()});function HV(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return HV;let r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i{"use strict";k8=Math.PI,w8=2*k8,jf=1e-6,p4e=w8-jf;s(HV,"append");s(m4e,"appendRound");Kf=class{static{s(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?HV:m4e(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,o){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=n-e,h=i-r,f=o-e,d=l-r,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>jf)if(!(Math.abs(d*u-h*f)>jf)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let m=n-o,g=i-l,y=u*u+h*h,v=m*m+g*g,x=Math.sqrt(y),b=Math.sqrt(p),k=a*Math.tan((k8-Math.acos((y+p-v)/(2*x*b)))/2),A=k/b,w=k/x;Math.abs(A-1)>jf&&this._append`L${e+A*f},${r+A*d}`,this._append`A${a},${a},0,0,${+(d*m>f*g)},${this._x1=e+w*u},${this._y1=r+w*h}`}}arc(e,r,n,i,a,o){if(e=+e,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=e+l,f=r+u,d=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${h},${f}`:(Math.abs(this._x1-h)>jf||Math.abs(this._y1-f)>jf)&&this._append`L${h},${f}`,n&&(p<0&&(p=p%w8+w8),p>p4e?this._append`A${n},${n},0,1,${d},${e-l},${r-u}A${n},${n},0,1,${d},${this._x1=h},${this._y1=f}`:p>jf&&this._append`A${n},${n},0,${+(p>=k8)},${d},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};s(YV,"path");YV.prototype=Kf.prototype});var T8=_(()=>{"use strict";XV()});var jV=_(()=>{"use strict"});var KV=_(()=>{"use strict"});var QV=_(()=>{"use strict"});var ZV=_(()=>{"use strict"});var JV=_(()=>{"use strict"});var eU=_(()=>{"use strict"});var tU=_(()=>{"use strict"});function E8(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Qf(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}var gy=_(()=>{"use strict";s(E8,"default");s(Qf,"formatDecimalParts")});function tl(t){return t=Qf(Math.abs(t)),t?t[1]:NaN}var yy=_(()=>{"use strict";gy();s(tl,"default")});function C8(t,e){return function(r,n){for(var i=r.length,a=[],o=0,l=t[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=t[o=(o+1)%t.length];return a.reverse().join(e)}}var rU=_(()=>{"use strict";s(C8,"default")});function S8(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var nU=_(()=>{"use strict";s(S8,"default")});function bh(t){if(!(e=g4e.exec(t)))throw new Error("invalid format: "+t);var e;return new I4({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function I4(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}var g4e,_8=_(()=>{"use strict";g4e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;s(bh,"formatSpecifier");bh.prototype=I4.prototype;s(I4,"FormatSpecifier");I4.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function A8(t){e:for(var e=t.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var iU=_(()=>{"use strict";s(A8,"default")});function D8(t,e){var r=Qf(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(L8=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Qf(t,Math.max(0,e+a-1))[0]}var L8,R8=_(()=>{"use strict";gy();s(D8,"default")});function N4(t,e){var r=Qf(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var aU=_(()=>{"use strict";gy();s(N4,"default")});var M8,sU=_(()=>{"use strict";gy();R8();aU();M8={"%":s((t,e)=>(t*100).toFixed(e),"%"),b:s(t=>Math.round(t).toString(2),"b"),c:s(t=>t+"","c"),d:E8,e:s((t,e)=>t.toExponential(e),"e"),f:s((t,e)=>t.toFixed(e),"f"),g:s((t,e)=>t.toPrecision(e),"g"),o:s(t=>Math.round(t).toString(8),"o"),p:s((t,e)=>N4(t*100,e),"p"),r:N4,s:D8,X:s(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:s(t=>Math.round(t).toString(16),"x")}});function O4(t){return t}var oU=_(()=>{"use strict";s(O4,"default")});function I8(t){var e=t.grouping===void 0||t.thousands===void 0?O4:C8(lU.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?O4:S8(lU.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function h(d){d=bh(d);var p=d.fill,m=d.align,g=d.sign,y=d.symbol,v=d.zero,x=d.width,b=d.comma,k=d.precision,A=d.trim,w=d.type;w==="n"?(b=!0,w="g"):M8[w]||(k===void 0&&(k=12),A=!0,w="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var T=y==="$"?r:y==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",C=y==="$"?n:/[%p]/.test(w)?o:"",E=M8[w],S=/[defgprs%]/.test(w);k=k===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function R(D){var L=T,P=C,M,F,I;if(w==="c")P=E(D)+P,D="";else{D=+D;var O=D<0||1/D<0;if(D=isNaN(D)?u:E(Math.abs(D),k),A&&(D=A8(D)),O&&+D==0&&g!=="+"&&(O=!1),L=(O?g==="("?g:l:g==="-"||g==="("?"":g)+L,P=(w==="s"?cU[8+L8/3]:"")+P+(O&&g==="("?")":""),S){for(M=-1,F=D.length;++MI||I>57){P=(I===46?i+D.slice(M+1):D.slice(M))+P,D=D.slice(0,M);break}}}b&&!v&&(D=e(D,1/0));var z=L.length+D.length+P.length,N=z>1)+L+D+P+N.slice(z);break;default:D=N+L+D+P;break}return a(D)}return s(R,"format"),R.toString=function(){return d+""},R}s(h,"newFormat");function f(d,p){var m=h((d=bh(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(tl(p)/3)))*3,y=Math.pow(10,-g),v=cU[8+g/3];return function(x){return m(y*x)+v}}return s(f,"formatPrefix"),{format:h,formatPrefix:f}}var lU,cU,uU=_(()=>{"use strict";yy();rU();nU();_8();iU();sU();R8();oU();lU=Array.prototype.map,cU=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];s(I8,"default")});function N8(t){return P4=I8(t),B4=P4.format,F4=P4.formatPrefix,P4}var P4,B4,F4,hU=_(()=>{"use strict";uU();N8({thousands:",",grouping:[3],currency:["$",""]});s(N8,"defaultLocale")});function z4(t){return Math.max(0,-tl(Math.abs(t)))}var fU=_(()=>{"use strict";yy();s(z4,"default")});function $4(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(tl(e)/3)))*3-tl(Math.abs(t)))}var dU=_(()=>{"use strict";yy();s($4,"default")});function G4(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,tl(e)-tl(t))+1}var pU=_(()=>{"use strict";yy();s(G4,"default")});var O8=_(()=>{"use strict";hU();_8();fU();dU();pU()});var mU=_(()=>{"use strict"});var gU=_(()=>{"use strict"});var yU=_(()=>{"use strict"});var vU=_(()=>{"use strict"});function kh(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var vy=_(()=>{"use strict";s(kh,"initRange")});function au(){var t=new ap,e=[],r=[],n=P8;function i(a){let o=t.get(a);if(o===void 0){if(n!==P8)return n;t.set(a,o=e.push(a)-1)}return r[o%r.length]}return s(i,"scale"),i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new ap;for(let o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return au(e,r).unknown(n)},kh.apply(i,arguments),i}var P8,B8=_(()=>{"use strict";ph();vy();P8=Symbol("implicit");s(au,"ordinal")});function xp(){var t=au().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,o,l=!1,u=0,h=0,f=.5;delete t.unknown;function d(){var p=e().length,m=i{"use strict";ph();vy();B8();s(xp,"band")});function F8(t){return function(){return t}}var bU=_(()=>{"use strict";s(F8,"constants")});function z8(t){return+t}var kU=_(()=>{"use strict";s(z8,"number")});function bp(t){return t}function $8(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:F8(isNaN(e)?NaN:.5)}function y4e(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function v4e(t,e,r){var n=t[0],i=t[1],a=e[0],o=e[1];return i2?x4e:v4e,u=h=null,d}s(f,"rescale");function d(p){return p==null||isNaN(p=+p)?a:(u||(u=l(t.map(n),e,r)))(n(o(p)))}return s(d,"scale"),d.invert=function(p){return o(i((h||(h=l(e,t.map(n),$i)))(p)))},d.domain=function(p){return arguments.length?(t=Array.from(p,z8),f()):t.slice()},d.range=function(p){return arguments.length?(e=Array.from(p),f()):e.slice()},d.rangeRound=function(p){return e=Array.from(p),r=v4,f()},d.clamp=function(p){return arguments.length?(o=p?!0:bp,f()):o!==bp},d.interpolate=function(p){return arguments.length?(r=p,f()):r},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,m){return n=p,i=m,f()}}function xy(){return b4e()(bp,bp)}var wU,G8=_(()=>{"use strict";ph();gp();bU();kU();wU=[0,1];s(bp,"identity");s($8,"normalize");s(y4e,"clamper");s(v4e,"bimap");s(x4e,"polymap");s(V4,"copy");s(b4e,"transformer");s(xy,"continuous")});function V8(t,e,r,n){var i=sp(t,e,r),a;switch(n=bh(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=$4(i,o))&&(n.precision=a),F4(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=G4(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=z4(i))&&(n.precision=a-(n.type==="%")*2);break}}return B4(n)}var TU=_(()=>{"use strict";ph();O8();s(V8,"tickFormat")});function k4e(t){var e=t.domain;return t.ticks=function(r){var n=e();return t4(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return V8(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,o=n[i],l=n[a],u,h,f=10;for(l0;){if(h=X1(o,l,r),h===u)return n[i]=o,n[a]=l,e(n);if(h>0)o=Math.floor(o/h)*h,l=Math.ceil(l/h)*h;else if(h<0)o=Math.ceil(o*h)/h,l=Math.floor(l*h)/h;else break;u=h}return t},t}function rl(){var t=xy();return t.copy=function(){return V4(t,rl())},kh.apply(t,arguments),k4e(t)}var EU=_(()=>{"use strict";ph();G8();vy();TU();s(k4e,"linearish");s(rl,"linear")});function U8(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],o;return a{"use strict";s(U8,"nice")});function sn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return s(i,"interval"),i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let o=i(a),l=i.ceil(a);return a-o(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{let u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let h;do u.push(h=new Date(+a)),e(a,l),t(a);while(hsn(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!a(o););else for(;--l>=0;)for(;e(o,1),!a(o););}),r&&(i.count=(a,o)=>(q8.setTime(+a),W8.setTime(+o),t(q8),t(W8),Math.floor(r(q8,W8))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}var q8,W8,su=_(()=>{"use strict";q8=new Date,W8=new Date;s(sn,"timeInterval")});var jl,SU,H8=_(()=>{"use strict";su();jl=sn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);jl.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?sn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):jl);SU=jl.range});var Vs,_U,Y8=_(()=>{"use strict";su();Vs=sn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),_U=Vs.range});var ou,w4e,U4,T4e,X8=_(()=>{"use strict";su();ou=sn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),w4e=ou.range,U4=sn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),T4e=U4.range});var lu,E4e,q4,C4e,j8=_(()=>{"use strict";su();lu=sn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),E4e=lu.range,q4=sn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),C4e=q4.range});var vo,S4e,ky,_4e,W4,A4e,K8=_(()=>{"use strict";su();vo=sn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),S4e=vo.range,ky=sn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),_4e=ky.range,W4=sn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),A4e=W4.range});function ed(t){return sn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function td(t){return sn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var nl,wh,H4,Y4,Ql,X4,j4,LU,L4e,D4e,R4e,M4e,I4e,N4e,rd,kp,DU,RU,Th,MU,IU,NU,O4e,P4e,B4e,F4e,z4e,$4e,Q8=_(()=>{"use strict";su();s(ed,"timeWeekday");nl=ed(0),wh=ed(1),H4=ed(2),Y4=ed(3),Ql=ed(4),X4=ed(5),j4=ed(6),LU=nl.range,L4e=wh.range,D4e=H4.range,R4e=Y4.range,M4e=Ql.range,I4e=X4.range,N4e=j4.range;s(td,"utcWeekday");rd=td(0),kp=td(1),DU=td(2),RU=td(3),Th=td(4),MU=td(5),IU=td(6),NU=rd.range,O4e=kp.range,P4e=DU.range,B4e=RU.range,F4e=Th.range,z4e=MU.range,$4e=IU.range});var cu,G4e,K4,V4e,Z8=_(()=>{"use strict";su();cu=sn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),G4e=cu.range,K4=sn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),V4e=K4.range});var Us,U4e,il,q4e,J8=_(()=>{"use strict";su();Us=sn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Us.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:sn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});U4e=Us.range,il=sn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());il.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:sn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});q4e=il.range});function PU(t,e,r,n,i,a){let o=[[Vs,1,1e3],[Vs,5,5*1e3],[Vs,15,15*1e3],[Vs,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function l(h,f,d){let p=fv).right(o,p);if(m===o.length)return t.every(sp(h/31536e6,f/31536e6,d));if(m===0)return jl.every(Math.max(sp(h,f,d),1));let[g,y]=o[p/o[m-1][2]{"use strict";ph();H8();Y8();X8();j8();K8();Q8();Z8();J8();s(PU,"ticker");[H4e,Y4e]=PU(il,K4,rd,W4,q4,U4),[e_,t_]=PU(Us,cu,nl,vo,lu,ou)});var Q4=_(()=>{"use strict";H8();Y8();X8();j8();K8();Q8();Z8();J8();BU()});function r_(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function n_(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function wy(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function i_(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,o=t.shortDays,l=t.months,u=t.shortMonths,h=Ty(i),f=Ey(i),d=Ty(a),p=Ey(a),m=Ty(o),g=Ey(o),y=Ty(l),v=Ey(l),x=Ty(u),b=Ey(u),k={a:O,A:z,b:N,B:U,c:null,d:UU,e:UU,f:g3e,g:S3e,G:A3e,H:d3e,I:p3e,j:m3e,L:XU,m:y3e,M:v3e,p:$,q:W,Q:HU,s:YU,S:x3e,u:b3e,U:k3e,V:w3e,w:T3e,W:E3e,x:null,X:null,y:C3e,Y:_3e,Z:L3e,"%":WU},A={a:ee,A:te,b:ce,B:Z,c:null,d:qU,e:qU,f:I3e,g:U3e,G:W3e,H:D3e,I:R3e,j:M3e,L:KU,m:N3e,M:O3e,p:fe,q:ne,Q:HU,s:YU,S:P3e,u:B3e,U:F3e,V:z3e,w:$3e,W:G3e,x:null,X:null,y:V3e,Y:q3e,Z:H3e,"%":WU},w={a:R,A:D,b:L,B:P,c:M,d:GU,e:GU,f:c3e,g:$U,G:zU,H:VU,I:VU,j:a3e,L:l3e,m:i3e,M:s3e,p:S,q:n3e,Q:h3e,s:f3e,S:o3e,u:Z4e,U:J4e,V:e3e,w:Q4e,W:t3e,x:F,X:I,y:$U,Y:zU,Z:r3e,"%":u3e};k.x=T(r,k),k.X=T(n,k),k.c=T(e,k),A.x=T(r,A),A.X=T(n,A),A.c=T(e,A);function T(H,Q){return function(K){var re=[],ie=-1,ye=0,j=H.length,De,oe,Re;for(K instanceof Date||(K=new Date(+K));++ie53)return null;"w"in re||(re.w=1),"Z"in re?(ye=n_(wy(re.y,0,1)),j=ye.getUTCDay(),ye=j>4||j===0?kp.ceil(ye):kp(ye),ye=ky.offset(ye,(re.V-1)*7),re.y=ye.getUTCFullYear(),re.m=ye.getUTCMonth(),re.d=ye.getUTCDate()+(re.w+6)%7):(ye=r_(wy(re.y,0,1)),j=ye.getDay(),ye=j>4||j===0?wh.ceil(ye):wh(ye),ye=vo.offset(ye,(re.V-1)*7),re.y=ye.getFullYear(),re.m=ye.getMonth(),re.d=ye.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),j="Z"in re?n_(wy(re.y,0,1)).getUTCDay():r_(wy(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(j+5)%7:re.w+re.U*7-(j+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,n_(re)):r_(re)}}s(C,"newParse");function E(H,Q,K,re){for(var ie=0,ye=Q.length,j=K.length,De,oe;ie=j)return-1;if(De=Q.charCodeAt(ie++),De===37){if(De=Q.charAt(ie++),oe=w[De in FU?Q.charAt(ie++):De],!oe||(re=oe(H,K,re))<0)return-1}else if(De!=K.charCodeAt(re++))return-1}return re}s(E,"parseSpecifier");function S(H,Q,K){var re=h.exec(Q.slice(K));return re?(H.p=f.get(re[0].toLowerCase()),K+re[0].length):-1}s(S,"parsePeriod");function R(H,Q,K){var re=m.exec(Q.slice(K));return re?(H.w=g.get(re[0].toLowerCase()),K+re[0].length):-1}s(R,"parseShortWeekday");function D(H,Q,K){var re=d.exec(Q.slice(K));return re?(H.w=p.get(re[0].toLowerCase()),K+re[0].length):-1}s(D,"parseWeekday");function L(H,Q,K){var re=x.exec(Q.slice(K));return re?(H.m=b.get(re[0].toLowerCase()),K+re[0].length):-1}s(L,"parseShortMonth");function P(H,Q,K){var re=y.exec(Q.slice(K));return re?(H.m=v.get(re[0].toLowerCase()),K+re[0].length):-1}s(P,"parseMonth");function M(H,Q,K){return E(H,e,Q,K)}s(M,"parseLocaleDateTime");function F(H,Q,K){return E(H,r,Q,K)}s(F,"parseLocaleDate");function I(H,Q,K){return E(H,n,Q,K)}s(I,"parseLocaleTime");function O(H){return o[H.getDay()]}s(O,"formatShortWeekday");function z(H){return a[H.getDay()]}s(z,"formatWeekday");function N(H){return u[H.getMonth()]}s(N,"formatShortMonth");function U(H){return l[H.getMonth()]}s(U,"formatMonth");function $(H){return i[+(H.getHours()>=12)]}s($,"formatPeriod");function W(H){return 1+~~(H.getMonth()/3)}s(W,"formatQuarter");function ee(H){return o[H.getUTCDay()]}s(ee,"formatUTCShortWeekday");function te(H){return a[H.getUTCDay()]}s(te,"formatUTCWeekday");function ce(H){return u[H.getUTCMonth()]}s(ce,"formatUTCShortMonth");function Z(H){return l[H.getUTCMonth()]}s(Z,"formatUTCMonth");function fe(H){return i[+(H.getUTCHours()>=12)]}s(fe,"formatUTCPeriod");function ne(H){return 1+~~(H.getUTCMonth()/3)}return s(ne,"formatUTCQuarter"),{format:s(function(H){var Q=T(H+="",k);return Q.toString=function(){return H},Q},"format"),parse:s(function(H){var Q=C(H+="",!1);return Q.toString=function(){return H},Q},"parse"),utcFormat:s(function(H){var Q=T(H+="",A);return Q.toString=function(){return H},Q},"utcFormat"),utcParse:s(function(H){var Q=C(H+="",!0);return Q.toString=function(){return H},Q},"utcParse")}}function Lr(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a[e.toLowerCase(),r]))}function Q4e(t,e,r){var n=Gi.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Z4e(t,e,r){var n=Gi.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function J4e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function e3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function t3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function zU(t,e,r){var n=Gi.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function $U(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function r3e(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function n3e(t,e,r){var n=Gi.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function i3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function GU(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function a3e(t,e,r){var n=Gi.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function VU(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function s3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function o3e(t,e,r){var n=Gi.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function l3e(t,e,r){var n=Gi.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function c3e(t,e,r){var n=Gi.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function u3e(t,e,r){var n=X4e.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function h3e(t,e,r){var n=Gi.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function f3e(t,e,r){var n=Gi.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function UU(t,e){return Lr(t.getDate(),e,2)}function d3e(t,e){return Lr(t.getHours(),e,2)}function p3e(t,e){return Lr(t.getHours()%12||12,e,2)}function m3e(t,e){return Lr(1+vo.count(Us(t),t),e,3)}function XU(t,e){return Lr(t.getMilliseconds(),e,3)}function g3e(t,e){return XU(t,e)+"000"}function y3e(t,e){return Lr(t.getMonth()+1,e,2)}function v3e(t,e){return Lr(t.getMinutes(),e,2)}function x3e(t,e){return Lr(t.getSeconds(),e,2)}function b3e(t){var e=t.getDay();return e===0?7:e}function k3e(t,e){return Lr(nl.count(Us(t)-1,t),e,2)}function jU(t){var e=t.getDay();return e>=4||e===0?Ql(t):Ql.ceil(t)}function w3e(t,e){return t=jU(t),Lr(Ql.count(Us(t),t)+(Us(t).getDay()===4),e,2)}function T3e(t){return t.getDay()}function E3e(t,e){return Lr(wh.count(Us(t)-1,t),e,2)}function C3e(t,e){return Lr(t.getFullYear()%100,e,2)}function S3e(t,e){return t=jU(t),Lr(t.getFullYear()%100,e,2)}function _3e(t,e){return Lr(t.getFullYear()%1e4,e,4)}function A3e(t,e){var r=t.getDay();return t=r>=4||r===0?Ql(t):Ql.ceil(t),Lr(t.getFullYear()%1e4,e,4)}function L3e(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Lr(e/60|0,"0",2)+Lr(e%60,"0",2)}function qU(t,e){return Lr(t.getUTCDate(),e,2)}function D3e(t,e){return Lr(t.getUTCHours(),e,2)}function R3e(t,e){return Lr(t.getUTCHours()%12||12,e,2)}function M3e(t,e){return Lr(1+ky.count(il(t),t),e,3)}function KU(t,e){return Lr(t.getUTCMilliseconds(),e,3)}function I3e(t,e){return KU(t,e)+"000"}function N3e(t,e){return Lr(t.getUTCMonth()+1,e,2)}function O3e(t,e){return Lr(t.getUTCMinutes(),e,2)}function P3e(t,e){return Lr(t.getUTCSeconds(),e,2)}function B3e(t){var e=t.getUTCDay();return e===0?7:e}function F3e(t,e){return Lr(rd.count(il(t)-1,t),e,2)}function QU(t){var e=t.getUTCDay();return e>=4||e===0?Th(t):Th.ceil(t)}function z3e(t,e){return t=QU(t),Lr(Th.count(il(t),t)+(il(t).getUTCDay()===4),e,2)}function $3e(t){return t.getUTCDay()}function G3e(t,e){return Lr(kp.count(il(t)-1,t),e,2)}function V3e(t,e){return Lr(t.getUTCFullYear()%100,e,2)}function U3e(t,e){return t=QU(t),Lr(t.getUTCFullYear()%100,e,2)}function q3e(t,e){return Lr(t.getUTCFullYear()%1e4,e,4)}function W3e(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Th(t):Th.ceil(t),Lr(t.getUTCFullYear()%1e4,e,4)}function H3e(){return"+0000"}function WU(){return"%"}function HU(t){return+t}function YU(t){return Math.floor(+t/1e3)}var FU,Gi,X4e,j4e,ZU=_(()=>{"use strict";Q4();s(r_,"localDate");s(n_,"utcDate");s(wy,"newDate");s(i_,"formatLocale");FU={"-":"",_:" ",0:"0"},Gi=/^\s*\d+/,X4e=/^%/,j4e=/[\\^$*+?|[\]().{}]/g;s(Lr,"pad");s(K4e,"requote");s(Ty,"formatRe");s(Ey,"formatLookup");s(Q4e,"parseWeekdayNumberSunday");s(Z4e,"parseWeekdayNumberMonday");s(J4e,"parseWeekNumberSunday");s(e3e,"parseWeekNumberISO");s(t3e,"parseWeekNumberMonday");s(zU,"parseFullYear");s($U,"parseYear");s(r3e,"parseZone");s(n3e,"parseQuarter");s(i3e,"parseMonthNumber");s(GU,"parseDayOfMonth");s(a3e,"parseDayOfYear");s(VU,"parseHour24");s(s3e,"parseMinutes");s(o3e,"parseSeconds");s(l3e,"parseMilliseconds");s(c3e,"parseMicroseconds");s(u3e,"parseLiteralPercent");s(h3e,"parseUnixTimestamp");s(f3e,"parseUnixTimestampSeconds");s(UU,"formatDayOfMonth");s(d3e,"formatHour24");s(p3e,"formatHour12");s(m3e,"formatDayOfYear");s(XU,"formatMilliseconds");s(g3e,"formatMicroseconds");s(y3e,"formatMonthNumber");s(v3e,"formatMinutes");s(x3e,"formatSeconds");s(b3e,"formatWeekdayNumberMonday");s(k3e,"formatWeekNumberSunday");s(jU,"dISO");s(w3e,"formatWeekNumberISO");s(T3e,"formatWeekdayNumberSunday");s(E3e,"formatWeekNumberMonday");s(C3e,"formatYear");s(S3e,"formatYearISO");s(_3e,"formatFullYear");s(A3e,"formatFullYearISO");s(L3e,"formatZone");s(qU,"formatUTCDayOfMonth");s(D3e,"formatUTCHour24");s(R3e,"formatUTCHour12");s(M3e,"formatUTCDayOfYear");s(KU,"formatUTCMilliseconds");s(I3e,"formatUTCMicroseconds");s(N3e,"formatUTCMonthNumber");s(O3e,"formatUTCMinutes");s(P3e,"formatUTCSeconds");s(B3e,"formatUTCWeekdayNumberMonday");s(F3e,"formatUTCWeekNumberSunday");s(QU,"UTCdISO");s(z3e,"formatUTCWeekNumberISO");s($3e,"formatUTCWeekdayNumberSunday");s(G3e,"formatUTCWeekNumberMonday");s(V3e,"formatUTCYear");s(U3e,"formatUTCYearISO");s(q3e,"formatUTCFullYear");s(W3e,"formatUTCFullYearISO");s(H3e,"formatUTCZone");s(WU,"formatLiteralPercent");s(HU,"formatUnixTimestamp");s(YU,"formatUnixTimestampSeconds")});function a_(t){return wp=i_(t),nd=wp.format,JU=wp.parse,eq=wp.utcFormat,tq=wp.utcParse,wp}var wp,nd,JU,eq,tq,rq=_(()=>{"use strict";ZU();a_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});s(a_,"defaultLocale")});var s_=_(()=>{"use strict";rq()});function Y3e(t){return new Date(t)}function X3e(t){return t instanceof Date?+t:+new Date(+t)}function nq(t,e,r,n,i,a,o,l,u,h){var f=xy(),d=f.invert,p=f.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),v=h("%I %p"),x=h("%a %d"),b=h("%b %d"),k=h("%B"),A=h("%Y");function w(T){return(u(T){"use strict";Q4();s_();G8();vy();CU();s(Y3e,"date");s(X3e,"number");s(nq,"calendar");s(Z4,"time")});var aq=_(()=>{"use strict";xU();EU();B8();iq()});function o_(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{"use strict";s(o_,"default")});var l_,oq=_(()=>{"use strict";sq();l_=o_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var lq=_(()=>{"use strict";oq()});function Cn(t){return s(function(){return t},"constant")}var J4=_(()=>{"use strict";s(Cn,"default")});function uq(t){return t>1?0:t<-1?Tp:Math.acos(t)}function u_(t){return t>=1?Cy:t<=-1?-Cy:Math.asin(t)}var c_,ta,Eh,cq,e3,al,id,Vi,Tp,Cy,Ep,t3=_(()=>{"use strict";c_=Math.abs,ta=Math.atan2,Eh=Math.cos,cq=Math.max,e3=Math.min,al=Math.sin,id=Math.sqrt,Vi=1e-12,Tp=Math.PI,Cy=Tp/2,Ep=2*Tp;s(uq,"acos");s(u_,"asin")});function r3(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Kf(e)}var h_=_(()=>{"use strict";T8();s(r3,"withPath")});function j3e(t){return t.innerRadius}function K3e(t){return t.outerRadius}function Q3e(t){return t.startAngle}function Z3e(t){return t.endAngle}function J3e(t){return t&&t.padAngle}function e5e(t,e,r,n,i,a,o,l){var u=r-t,h=n-e,f=o-i,d=l-a,p=d*u-f*h;if(!(p*pM*M+F*F&&(E=R,S=D),{cx:E,cy:S,x01:-f,y01:-d,x11:E*(i/w-1),y11:S*(i/w-1)}}function sl(){var t=j3e,e=K3e,r=Cn(0),n=null,i=Q3e,a=Z3e,o=J3e,l=null,u=r3(h);function h(){var f,d,p=+t.apply(this,arguments),m=+e.apply(this,arguments),g=i.apply(this,arguments)-Cy,y=a.apply(this,arguments)-Cy,v=c_(y-g),x=y>g;if(l||(l=f=u()),mVi))l.moveTo(0,0);else if(v>Ep-Vi)l.moveTo(m*Eh(g),m*al(g)),l.arc(0,0,m,g,y,!x),p>Vi&&(l.moveTo(p*Eh(y),p*al(y)),l.arc(0,0,p,y,g,x));else{var b=g,k=y,A=g,w=y,T=v,C=v,E=o.apply(this,arguments)/2,S=E>Vi&&(n?+n.apply(this,arguments):id(p*p+m*m)),R=e3(c_(m-p)/2,+r.apply(this,arguments)),D=R,L=R,P,M;if(S>Vi){var F=u_(S/p*al(E)),I=u_(S/m*al(E));(T-=F*2)>Vi?(F*=x?1:-1,A+=F,w-=F):(T=0,A=w=(g+y)/2),(C-=I*2)>Vi?(I*=x?1:-1,b+=I,k-=I):(C=0,b=k=(g+y)/2)}var O=m*Eh(b),z=m*al(b),N=p*Eh(w),U=p*al(w);if(R>Vi){var $=m*Eh(k),W=m*al(k),ee=p*Eh(A),te=p*al(A),ce;if(vVi?L>Vi?(P=n3(ee,te,O,z,m,L,x),M=n3($,W,N,U,m,L,x),l.moveTo(P.cx+P.x01,P.cy+P.y01),LVi)||!(T>Vi)?l.lineTo(N,U):D>Vi?(P=n3(N,U,$,W,p,-D,x),M=n3(O,z,ee,te,p,-D,x),l.lineTo(P.cx+P.x01,P.cy+P.y01),D{"use strict";J4();t3();h_();s(j3e,"arcInnerRadius");s(K3e,"arcOuterRadius");s(Q3e,"arcStartAngle");s(Z3e,"arcEndAngle");s(J3e,"arcPadAngle");s(e5e,"intersect");s(n3,"cornerTangents");s(sl,"default")});function Sy(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}var Opt,f_=_(()=>{"use strict";Opt=Array.prototype.slice;s(Sy,"default")});function fq(t){this._context=t}function uu(t){return new fq(t)}var d_=_(()=>{"use strict";s(fq,"Linear");fq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}},"point")};s(uu,"default")});function dq(t){return t[0]}function pq(t){return t[1]}var mq=_(()=>{"use strict";s(dq,"x");s(pq,"y")});function ra(t,e){var r=Cn(!0),n=null,i=uu,a=null,o=r3(l);t=typeof t=="function"?t:t===void 0?dq:Cn(t),e=typeof e=="function"?e:e===void 0?pq:Cn(e);function l(u){var h,f=(u=Sy(u)).length,d,p=!1,m;for(n==null&&(a=i(m=o())),h=0;h<=f;++h)!(h{"use strict";f_();J4();d_();h_();mq();s(ra,"default")});function p_(t,e){return et?1:e>=t?0:NaN}var yq=_(()=>{"use strict";s(p_,"default")});function m_(t){return t}var vq=_(()=>{"use strict";s(m_,"default")});function i3(){var t=m_,e=p_,r=null,n=Cn(0),i=Cn(Ep),a=Cn(0);function o(l){var u,h=(l=Sy(l)).length,f,d,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),v=Math.min(Ep,Math.max(-Ep,i.apply(this,arguments)-y)),x,b=Math.min(Math.abs(v)/h,a.apply(this,arguments)),k=b*(v<0?-1:1),A;for(u=0;u0&&(p+=A);for(e!=null?m.sort(function(w,T){return e(g[w],g[T])}):r!=null&&m.sort(function(w,T){return r(l[w],l[T])}),u=0,d=p?(v-h*k)/p:0;u0?A*d:0)+k,g[f]={data:l[f],index:u,value:A,startAngle:y,endAngle:x,padAngle:b};return g}return s(o,"pie"),o.value=function(l){return arguments.length?(t=typeof l=="function"?l:Cn(+l),o):t},o.sortValues=function(l){return arguments.length?(e=l,r=null,o):e},o.sort=function(l){return arguments.length?(r=l,e=null,o):r},o.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Cn(+l),o):n},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Cn(+l),o):i},o.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Cn(+l),o):a},o}var xq=_(()=>{"use strict";f_();J4();yq();vq();t3();s(i3,"default")});function g_(t){return new a3(t,!0)}function y_(t){return new a3(t,!1)}var a3,bq=_(()=>{"use strict";a3=class{static{s(this,"Bump")}constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}};s(g_,"bumpX");s(y_,"bumpY")});function qs(){}var _y=_(()=>{"use strict";s(qs,"default")});function Cp(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Ay(t){this._context=t}function hs(t){return new Ay(t)}var Ly=_(()=>{"use strict";s(Cp,"point");s(Ay,"Basis");Ay.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 3:Cp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Cp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};s(hs,"default")});function kq(t){this._context=t}function s3(t){return new kq(t)}var wq=_(()=>{"use strict";_y();Ly();s(kq,"BasisClosed");kq.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Cp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};s(s3,"default")});function Tq(t){this._context=t}function o3(t){return new Tq(t)}var Eq=_(()=>{"use strict";Ly();s(Tq,"BasisOpen");Tq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Cp(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};s(o3,"default")});function Cq(t,e){this._basis=new Ay(t),this._beta=e}var v_,Sq=_(()=>{"use strict";Ly();s(Cq,"Bundle");Cq.prototype={lineStart:s(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:s(function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,o=e[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+u*a),this._beta*e[l]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:s(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};v_=s(function t(e){function r(n){return e===1?new Ay(n):new Cq(n,e)}return s(r,"bundle"),r.beta=function(n){return t(+n)},r},"custom")(.85)});function Sp(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function l3(t,e){this._context=t,this._k=(1-e)/6}var x_,Dy=_(()=>{"use strict";s(Sp,"point");s(l3,"Cardinal");l3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Sp(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Sp(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};x_=s(function t(e){function r(n){return new l3(n,e)}return s(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function c3(t,e){this._context=t,this._k=(1-e)/6}var b_,k_=_(()=>{"use strict";_y();Dy();s(c3,"CardinalClosed");c3.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Sp(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};b_=s(function t(e){function r(n){return new c3(n,e)}return s(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function u3(t,e){this._context=t,this._k=(1-e)/6}var w_,T_=_(()=>{"use strict";Dy();s(u3,"CardinalOpen");u3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Sp(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};w_=s(function t(e){function r(n){return new u3(n,e)}return s(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0)});function Ry(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vi){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Vi){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*h+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*h+t._y1*t._l23_2a-r*t._l12_2a)/f}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function _q(t,e){this._context=t,this._alpha=e}var E_,h3=_(()=>{"use strict";t3();Dy();s(Ry,"point");s(_q,"CatmullRom");_q.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ry(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};E_=s(function t(e){function r(n){return e?new _q(n,e):new l3(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function Aq(t,e){this._context=t,this._alpha=e}var C_,Lq=_(()=>{"use strict";k_();_y();h3();s(Aq,"CatmullRomClosed");Aq.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:s(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ry(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};C_=s(function t(e){function r(n){return e?new Aq(n,e):new c3(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function Dq(t,e){this._context=t,this._alpha=e}var S_,Rq=_(()=>{"use strict";T_();h3();s(Dq,"CatmullRomOpen");Dq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ry(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};S_=s(function t(e){function r(n){return e?new Dq(n,e):new u3(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5)});function Mq(t){this._context=t}function f3(t){return new Mq(t)}var Iq=_(()=>{"use strict";_y();s(Mq,"LinearClosed");Mq.prototype={areaStart:qs,areaEnd:qs,lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){this._point&&this._context.closePath()},"lineEnd"),point:s(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};s(f3,"default")});function Nq(t){return t<0?-1:1}function Oq(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(Nq(a)+Nq(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Pq(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function __(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-n)/3;t._context.bezierCurveTo(n+l,i+l*e,a-l,o-l*r,a,o)}function d3(t){this._context=t}function Bq(t){this._context=new Fq(t)}function Fq(t){this._context=t}function A_(t){return new d3(t)}function L_(t){return new Bq(t)}var zq=_(()=>{"use strict";s(Nq,"sign");s(Oq,"slope3");s(Pq,"slope2");s(__,"point");s(d3,"MonotoneX");d3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:__(this,this._t0,Pq(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,__(this,Pq(this,r=Oq(this,t,e)),r);break;default:__(this,this._t0,r=Oq(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")};s(Bq,"MonotoneY");(Bq.prototype=Object.create(d3.prototype)).point=function(t,e){d3.prototype.point.call(this,e,t)};s(Fq,"ReflectContext");Fq.prototype={moveTo:s(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:s(function(){this._context.closePath()},"closePath"),lineTo:s(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:s(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")};s(A_,"monotoneX");s(L_,"monotoneY")});function Gq(t){this._context=t}function $q(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e{"use strict";s(Gq,"Natural");Gq.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:s(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=$q(t),i=$q(e),a=0,o=1;o{"use strict";s(m3,"Step");m3.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:s(function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:s(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e},"point")};s(g3,"default");s(D_,"stepBefore");s(R_,"stepAfter")});var qq=_(()=>{"use strict";hq();gq();xq();wq();Eq();Ly();bq();Sq();k_();T_();Dy();Lq();Rq();h3();Iq();d_();zq();Vq();Uq()});var Wq=_(()=>{"use strict"});var Hq=_(()=>{"use strict"});function Ch(t,e,r){this.k=t,this.x=e,this.y=r}function I_(t){for(;!t.__zoom;)if(!(t=t.parentNode))return M_;return t.__zoom}var M_,N_=_(()=>{"use strict";s(Ch,"Transform");Ch.prototype={constructor:Ch,scale:s(function(t){return t===1?this:new Ch(this.k*t,this.x,this.y)},"scale"),translate:s(function(t,e){return t===0&e===0?this:new Ch(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:s(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:s(function(t){return t*this.k+this.x},"applyX"),applyY:s(function(t){return t*this.k+this.y},"applyY"),invert:s(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:s(function(t){return(t-this.x)/this.k},"invertX"),invertY:s(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:s(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:s(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:s(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};M_=new Ch(1,0,0);I_.prototype=Ch.prototype;s(I_,"transform")});var Yq=_(()=>{"use strict"});var Xq=_(()=>{"use strict";M4();Wq();Hq();N_();Yq()});var jq=_(()=>{"use strict";Xq();N_()});var Xt=_(()=>{"use strict";ph();S$();WV();jV();dp();KV();QV();DC();yG();ZV();v8();JV();tU();O8();mU();gU();gp();T8();yU();eU();vU();aq();lq();Zo();qq();Q4();s_();S4();M4();jq()});var Kq=is(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.BLANK_URL=Ui.relativeFirstCharacters=Ui.whitespaceEscapeCharsRegex=Ui.urlSchemeRegex=Ui.ctrlCharactersRegex=Ui.htmlCtrlEntityRegex=Ui.htmlEntitiesRegex=Ui.invalidProtocolRegex=void 0;Ui.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Ui.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Ui.htmlCtrlEntityRegex=/&(newline|tab);/gi;Ui.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Ui.urlSchemeRegex=/^.+(:|:)/gim;Ui.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Ui.relativeFirstCharacters=[".","/"];Ui.BLANK_URL="about:blank"});var _p=is(y3=>{"use strict";Object.defineProperty(y3,"__esModule",{value:!0});y3.sanitizeUrl=void 0;var Ta=Kq();function t5e(t){return Ta.relativeFirstCharacters.indexOf(t[0])>-1}s(t5e,"isRelativeUrlWithoutProtocol");function r5e(t){var e=t.replace(Ta.ctrlCharactersRegex,"");return e.replace(Ta.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}s(r5e,"decodeHtmlCharacters");function n5e(t){return URL.canParse(t)}s(n5e,"isValidUrl");function Qq(t){try{return decodeURIComponent(t)}catch{return t}}s(Qq,"decodeURI");function i5e(t){if(!t)return Ta.BLANK_URL;var e,r=Qq(t.trim());do r=r5e(r).replace(Ta.htmlCtrlEntityRegex,"").replace(Ta.ctrlCharactersRegex,"").replace(Ta.whitespaceEscapeCharsRegex,"").trim(),r=Qq(r),e=r.match(Ta.ctrlCharactersRegex)||r.match(Ta.htmlEntitiesRegex)||r.match(Ta.htmlCtrlEntityRegex)||r.match(Ta.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Ta.BLANK_URL;if(t5e(n))return n;var i=n.trimStart(),a=i.match(Ta.urlSchemeRegex);if(!a)return n;var o=a[0].toLowerCase().trim();if(Ta.invalidProtocolRegex.test(o))return Ta.BLANK_URL;var l=i.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return l;if(o==="http:"||o==="https:"){if(!n5e(l))return Ta.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}s(i5e,"sanitizeUrl");y3.sanitizeUrl=i5e});var O_,ad,v3,Zq,Jq,eW,ol,My,Iy=_(()=>{"use strict";O_=ka(_p(),1);Qt();ad=s((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),v3=s((t,e)=>{let r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};ad(t,r).lower()},"drawBackgroundRect"),Zq=s((t,e)=>{let r=e.text.replace(zf," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),Jq=s((t,e,r,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",r);let a=(0,O_.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),eW=s((t,e,r,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",r);let a=(0,O_.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),ol=s(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),My=s(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")});var tW,P_,rW,a5e,s5e,o5e,l5e,c5e,u5e,h5e,f5e,d5e,p5e,m5e,g5e,hu,ll,nW=_(()=>{"use strict";Qt();Iy();tW=ka(_p(),1),P_=s(function(t,e){return ad(t,e)},"drawRect"),rW=s(function(t,e,r,n,i,a){let o=t.append("image");o.attr("width",e),o.attr("height",r),o.attr("x",n),o.attr("y",i);let l=a.startsWith("data:image/png;base64")?a:(0,tW.sanitizeUrl)(a);o.attr("xlink:href",l)},"drawImage"),a5e=s((t,e,r)=>{let n=t.append("g"),i=0;for(let a of e){let o=a.textColor?a.textColor:"#444444",l=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,f="";if(i===0){let p=n.append("line");p.attr("x1",a.startPoint.x),p.attr("y1",a.startPoint.y),p.attr("x2",a.endPoint.x),p.attr("y2",a.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",l),p.style("fill","none"),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)"),i=-1}else{let p=n.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&p.attr("marker-end","url("+f+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+f+"#arrowend)")}let d=r.messageFont();hu(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},d),a.techn&&a.techn.text!==""&&(d=r.messageFont(),hu(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},d))}},"drawRels"),s5e=s(function(t,e,r){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",o=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let u={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};P_(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=o,hu(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=o,hu(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=o,hu(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},"drawBoundary"),o5e=s(function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFM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CkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let l=t.append("g");l.attr("class","person-man");let u=ol();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=e.x,u.y=e.y,u.fill=n,u.width=e.width,u.height=e.height,u.stroke=i,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},P_(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let h=g5e(r,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":rW(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let f=r[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,hu(r)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=r[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&e.techn?.text!==""?hu(r)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&hu(r)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=r.personFont(),f.fontColor=a,hu(r)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},"drawC4Shape"),l5e=s(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),c5e=s(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),u5e=s(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),h5e=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),f5e=s(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),d5e=s(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),p5e=s(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),m5e=s(function(t){let r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),g5e=s((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),hu=function(){function t(i,a,o,l,u,h,f){let d=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(d,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d){let{fontSize:p,fontFamily:m,fontWeight:g}=d,y=i.split($e.lineBreakRegex);for(let v=0;v{"use strict";y5e=typeof global=="object"&&global&&global.Object===Object&&global,b3=y5e});var v5e,x5e,Wn,xo=_(()=>{"use strict";B_();v5e=typeof self=="object"&&self&&self.Object===Object&&self,x5e=b3||v5e||Function("return this")(),Wn=x5e});var b5e,qi,sd=_(()=>{"use strict";xo();b5e=Wn.Symbol,qi=b5e});function T5e(t){var e=k5e.call(t,Ny),r=t[Ny];try{t[Ny]=void 0;var n=!0}catch{}var i=w5e.call(t);return n&&(e?t[Ny]=r:delete t[Ny]),i}var iW,k5e,w5e,Ny,aW,sW=_(()=>{"use strict";sd();iW=Object.prototype,k5e=iW.hasOwnProperty,w5e=iW.toString,Ny=qi?qi.toStringTag:void 0;s(T5e,"getRawTag");aW=T5e});function S5e(t){return C5e.call(t)}var E5e,C5e,oW,lW=_(()=>{"use strict";E5e=Object.prototype,C5e=E5e.toString;s(S5e,"objectToString");oW=S5e});function L5e(t){return t==null?t===void 0?A5e:_5e:cW&&cW in Object(t)?aW(t):oW(t)}var _5e,A5e,cW,na,fu=_(()=>{"use strict";sd();sW();lW();_5e="[object Null]",A5e="[object Undefined]",cW=qi?qi.toStringTag:void 0;s(L5e,"baseGetTag");na=L5e});function D5e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var on,Ws=_(()=>{"use strict";s(D5e,"isObject");on=D5e});function O5e(t){if(!on(t))return!1;var e=na(t);return e==M5e||e==I5e||e==R5e||e==N5e}var R5e,M5e,I5e,N5e,fi,Oy=_(()=>{"use strict";fu();Ws();R5e="[object AsyncFunction]",M5e="[object Function]",I5e="[object GeneratorFunction]",N5e="[object Proxy]";s(O5e,"isFunction");fi=O5e});var P5e,k3,uW=_(()=>{"use strict";xo();P5e=Wn["__core-js_shared__"],k3=P5e});function B5e(t){return!!hW&&hW in t}var hW,fW,dW=_(()=>{"use strict";uW();hW=function(){var t=/[^.]+$/.exec(k3&&k3.keys&&k3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();s(B5e,"isMasked");fW=B5e});function $5e(t){if(t!=null){try{return z5e.call(t)}catch{}try{return t+""}catch{}}return""}var F5e,z5e,du,F_=_(()=>{"use strict";F5e=Function.prototype,z5e=F5e.toString;s($5e,"toSource");du=$5e});function X5e(t){if(!on(t)||fW(t))return!1;var e=fi(t)?Y5e:V5e;return e.test(du(t))}var G5e,V5e,U5e,q5e,W5e,H5e,Y5e,pW,mW=_(()=>{"use strict";Oy();dW();Ws();F_();G5e=/[\\^$.*+?()[\]{}|]/g,V5e=/^\[object .+?Constructor\]$/,U5e=Function.prototype,q5e=Object.prototype,W5e=U5e.toString,H5e=q5e.hasOwnProperty,Y5e=RegExp("^"+W5e.call(H5e).replace(G5e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(X5e,"baseIsNative");pW=X5e});function j5e(t,e){return t?.[e]}var gW,yW=_(()=>{"use strict";s(j5e,"getValue");gW=j5e});function K5e(t,e){var r=gW(t,e);return pW(r)?r:void 0}var fs,Sh=_(()=>{"use strict";mW();yW();s(K5e,"getNative");fs=K5e});var Q5e,pu,Py=_(()=>{"use strict";Sh();Q5e=fs(Object,"create"),pu=Q5e});function Z5e(){this.__data__=pu?pu(null):{},this.size=0}var vW,xW=_(()=>{"use strict";Py();s(Z5e,"hashClear");vW=Z5e});function J5e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var bW,kW=_(()=>{"use strict";s(J5e,"hashDelete");bW=J5e});function nke(t){var e=this.__data__;if(pu){var r=e[t];return r===eke?void 0:r}return rke.call(e,t)?e[t]:void 0}var eke,tke,rke,wW,TW=_(()=>{"use strict";Py();eke="__lodash_hash_undefined__",tke=Object.prototype,rke=tke.hasOwnProperty;s(nke,"hashGet");wW=nke});function ske(t){var e=this.__data__;return pu?e[t]!==void 0:ake.call(e,t)}var ike,ake,EW,CW=_(()=>{"use strict";Py();ike=Object.prototype,ake=ike.hasOwnProperty;s(ske,"hashHas");EW=ske});function lke(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=pu&&e===void 0?oke:e,this}var oke,SW,_W=_(()=>{"use strict";Py();oke="__lodash_hash_undefined__";s(lke,"hashSet");SW=lke});function Ap(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{"use strict";xW();kW();TW();CW();_W();s(Ap,"Hash");Ap.prototype.clear=vW;Ap.prototype.delete=bW;Ap.prototype.get=wW;Ap.prototype.has=EW;Ap.prototype.set=SW;z_=Ap});function cke(){this.__data__=[],this.size=0}var LW,DW=_(()=>{"use strict";s(cke,"listCacheClear");LW=cke});function uke(t,e){return t===e||t!==t&&e!==e}var bo,od=_(()=>{"use strict";s(uke,"eq");bo=uke});function hke(t,e){for(var r=t.length;r--;)if(bo(t[r][0],e))return r;return-1}var _h,By=_(()=>{"use strict";od();s(hke,"assocIndexOf");_h=hke});function pke(t){var e=this.__data__,r=_h(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():dke.call(e,r,1),--this.size,!0}var fke,dke,RW,MW=_(()=>{"use strict";By();fke=Array.prototype,dke=fke.splice;s(pke,"listCacheDelete");RW=pke});function mke(t){var e=this.__data__,r=_h(e,t);return r<0?void 0:e[r][1]}var IW,NW=_(()=>{"use strict";By();s(mke,"listCacheGet");IW=mke});function gke(t){return _h(this.__data__,t)>-1}var OW,PW=_(()=>{"use strict";By();s(gke,"listCacheHas");OW=gke});function yke(t,e){var r=this.__data__,n=_h(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var BW,FW=_(()=>{"use strict";By();s(yke,"listCacheSet");BW=yke});function Lp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{"use strict";DW();MW();NW();PW();FW();s(Lp,"ListCache");Lp.prototype.clear=LW;Lp.prototype.delete=RW;Lp.prototype.get=IW;Lp.prototype.has=OW;Lp.prototype.set=BW;Ah=Lp});var vke,Lh,w3=_(()=>{"use strict";Sh();xo();vke=fs(Wn,"Map"),Lh=vke});function xke(){this.size=0,this.__data__={hash:new z_,map:new(Lh||Ah),string:new z_}}var zW,$W=_(()=>{"use strict";AW();Fy();w3();s(xke,"mapCacheClear");zW=xke});function bke(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var GW,VW=_(()=>{"use strict";s(bke,"isKeyable");GW=bke});function kke(t,e){var r=t.__data__;return GW(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Dh,zy=_(()=>{"use strict";VW();s(kke,"getMapData");Dh=kke});function wke(t){var e=Dh(this,t).delete(t);return this.size-=e?1:0,e}var UW,qW=_(()=>{"use strict";zy();s(wke,"mapCacheDelete");UW=wke});function Tke(t){return Dh(this,t).get(t)}var WW,HW=_(()=>{"use strict";zy();s(Tke,"mapCacheGet");WW=Tke});function Eke(t){return Dh(this,t).has(t)}var YW,XW=_(()=>{"use strict";zy();s(Eke,"mapCacheHas");YW=Eke});function Cke(t,e){var r=Dh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var jW,KW=_(()=>{"use strict";zy();s(Cke,"mapCacheSet");jW=Cke});function Dp(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{"use strict";$W();qW();HW();XW();KW();s(Dp,"MapCache");Dp.prototype.clear=zW;Dp.prototype.delete=UW;Dp.prototype.get=WW;Dp.prototype.has=YW;Dp.prototype.set=jW;ld=Dp});function $_(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ske);var r=s(function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new($_.Cache||ld),r}var Ske,Rp,G_=_(()=>{"use strict";T3();Ske="Expected a function";s($_,"memoize");$_.Cache=ld;Rp=$_});function _ke(){this.__data__=new Ah,this.size=0}var QW,ZW=_(()=>{"use strict";Fy();s(_ke,"stackClear");QW=_ke});function Ake(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var JW,eH=_(()=>{"use strict";s(Ake,"stackDelete");JW=Ake});function Lke(t){return this.__data__.get(t)}var tH,rH=_(()=>{"use strict";s(Lke,"stackGet");tH=Lke});function Dke(t){return this.__data__.has(t)}var nH,iH=_(()=>{"use strict";s(Dke,"stackHas");nH=Dke});function Mke(t,e){var r=this.__data__;if(r instanceof Ah){var n=r.__data__;if(!Lh||n.length{"use strict";Fy();w3();T3();Rke=200;s(Mke,"stackSet");aH=Mke});function Mp(t){var e=this.__data__=new Ah(t);this.size=e.size}var Zl,$y=_(()=>{"use strict";Fy();ZW();eH();rH();iH();sH();s(Mp,"Stack");Mp.prototype.clear=QW;Mp.prototype.delete=JW;Mp.prototype.get=tH;Mp.prototype.has=nH;Mp.prototype.set=aH;Zl=Mp});var Ike,Ip,V_=_(()=>{"use strict";Sh();Ike=function(){try{var t=fs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ip=Ike});function Nke(t,e,r){e=="__proto__"&&Ip?Ip(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Jl,Np=_(()=>{"use strict";V_();s(Nke,"baseAssignValue");Jl=Nke});function Oke(t,e,r){(r!==void 0&&!bo(t[e],r)||r===void 0&&!(e in t))&&Jl(t,e,r)}var Gy,U_=_(()=>{"use strict";Np();od();s(Oke,"assignMergeValue");Gy=Oke});function Pke(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),l=o.length;l--;){var u=o[t?l:++i];if(r(a[u],u,a)===!1)break}return e}}var oH,lH=_(()=>{"use strict";s(Pke,"createBaseFor");oH=Pke});var Bke,Op,E3=_(()=>{"use strict";lH();Bke=oH(),Op=Bke});function zke(t,e){if(e)return t.slice();var r=t.length,n=hH?hH(r):new t.constructor(r);return t.copy(n),n}var fH,cH,Fke,uH,hH,C3,q_=_(()=>{"use strict";xo();fH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cH=fH&&typeof module=="object"&&module&&!module.nodeType&&module,Fke=cH&&cH.exports===fH,uH=Fke?Wn.Buffer:void 0,hH=uH?uH.allocUnsafe:void 0;s(zke,"cloneBuffer");C3=zke});var $ke,Pp,W_=_(()=>{"use strict";xo();$ke=Wn.Uint8Array,Pp=$ke});function Gke(t){var e=new t.constructor(t.byteLength);return new Pp(e).set(new Pp(t)),e}var Bp,S3=_(()=>{"use strict";W_();s(Gke,"cloneArrayBuffer");Bp=Gke});function Vke(t,e){var r=e?Bp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var _3,H_=_(()=>{"use strict";S3();s(Vke,"cloneTypedArray");_3=Vke});function Uke(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r{"use strict";s(Uke,"copyArray");A3=Uke});var dH,qke,pH,mH=_(()=>{"use strict";Ws();dH=Object.create,qke=function(){function t(){}return s(t,"object"),function(e){if(!on(e))return{};if(dH)return dH(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),pH=qke});function Wke(t,e){return function(r){return t(e(r))}}var L3,X_=_(()=>{"use strict";s(Wke,"overArg");L3=Wke});var Hke,Fp,D3=_(()=>{"use strict";X_();Hke=L3(Object.getPrototypeOf,Object),Fp=Hke});function Xke(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Yke;return t===r}var Yke,ec,zp=_(()=>{"use strict";Yke=Object.prototype;s(Xke,"isPrototype");ec=Xke});function jke(t){return typeof t.constructor=="function"&&!ec(t)?pH(Fp(t)):{}}var R3,j_=_(()=>{"use strict";mH();D3();zp();s(jke,"initCloneObject");R3=jke});function Kke(t){return t!=null&&typeof t=="object"}var Fn,ko=_(()=>{"use strict";s(Kke,"isObjectLike");Fn=Kke});function Zke(t){return Fn(t)&&na(t)==Qke}var Qke,K_,gH=_(()=>{"use strict";fu();ko();Qke="[object Arguments]";s(Zke,"baseIsArguments");K_=Zke});var yH,Jke,e6e,t6e,cl,$p=_(()=>{"use strict";gH();ko();yH=Object.prototype,Jke=yH.hasOwnProperty,e6e=yH.propertyIsEnumerable,t6e=K_(function(){return arguments}())?K_:function(t){return Fn(t)&&Jke.call(t,"callee")&&!e6e.call(t,"callee")},cl=t6e});var r6e,ct,Dn=_(()=>{"use strict";r6e=Array.isArray,ct=r6e});function i6e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n6e}var n6e,Gp,M3=_(()=>{"use strict";n6e=9007199254740991;s(i6e,"isLength");Gp=i6e});function a6e(t){return t!=null&&Gp(t.length)&&!fi(t)}var Hn,wo=_(()=>{"use strict";Oy();M3();s(a6e,"isArrayLike");Hn=a6e});function s6e(t){return Fn(t)&&Hn(t)}var cd,I3=_(()=>{"use strict";wo();ko();s(s6e,"isArrayLikeObject");cd=s6e});function o6e(){return!1}var vH,xH=_(()=>{"use strict";s(o6e,"stubFalse");vH=o6e});var wH,bH,l6e,kH,c6e,u6e,ul,Vp=_(()=>{"use strict";xo();xH();wH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bH=wH&&typeof module=="object"&&module&&!module.nodeType&&module,l6e=bH&&bH.exports===wH,kH=l6e?Wn.Buffer:void 0,c6e=kH?kH.isBuffer:void 0,u6e=c6e||vH,ul=u6e});function g6e(t){if(!Fn(t)||na(t)!=h6e)return!1;var e=Fp(t);if(e===null)return!0;var r=p6e.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&TH.call(r)==m6e}var h6e,f6e,d6e,TH,p6e,m6e,EH,CH=_(()=>{"use strict";fu();D3();ko();h6e="[object Object]",f6e=Function.prototype,d6e=Object.prototype,TH=f6e.toString,p6e=d6e.hasOwnProperty,m6e=TH.call(Object);s(g6e,"isPlainObject");EH=g6e});function G6e(t){return Fn(t)&&Gp(t.length)&&!!Sn[na(t)]}var y6e,v6e,x6e,b6e,k6e,w6e,T6e,E6e,C6e,S6e,_6e,A6e,L6e,D6e,R6e,M6e,I6e,N6e,O6e,P6e,B6e,F6e,z6e,$6e,Sn,SH,_H=_(()=>{"use strict";fu();M3();ko();y6e="[object Arguments]",v6e="[object Array]",x6e="[object Boolean]",b6e="[object Date]",k6e="[object Error]",w6e="[object Function]",T6e="[object Map]",E6e="[object Number]",C6e="[object Object]",S6e="[object RegExp]",_6e="[object Set]",A6e="[object String]",L6e="[object WeakMap]",D6e="[object ArrayBuffer]",R6e="[object DataView]",M6e="[object Float32Array]",I6e="[object Float64Array]",N6e="[object Int8Array]",O6e="[object Int16Array]",P6e="[object Int32Array]",B6e="[object Uint8Array]",F6e="[object Uint8ClampedArray]",z6e="[object Uint16Array]",$6e="[object Uint32Array]",Sn={};Sn[M6e]=Sn[I6e]=Sn[N6e]=Sn[O6e]=Sn[P6e]=Sn[B6e]=Sn[F6e]=Sn[z6e]=Sn[$6e]=!0;Sn[y6e]=Sn[v6e]=Sn[D6e]=Sn[x6e]=Sn[R6e]=Sn[b6e]=Sn[k6e]=Sn[w6e]=Sn[T6e]=Sn[E6e]=Sn[C6e]=Sn[S6e]=Sn[_6e]=Sn[A6e]=Sn[L6e]=!1;s(G6e,"baseIsTypedArray");SH=G6e});function V6e(t){return function(e){return t(e)}}var To,ud=_(()=>{"use strict";s(V6e,"baseUnary");To=V6e});var AH,Vy,U6e,Q_,q6e,Eo,Uy=_(()=>{"use strict";B_();AH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vy=AH&&typeof module=="object"&&module&&!module.nodeType&&module,U6e=Vy&&Vy.exports===AH,Q_=U6e&&b3.process,q6e=function(){try{var t=Vy&&Vy.require&&Vy.require("util").types;return t||Q_&&Q_.binding&&Q_.binding("util")}catch{}}(),Eo=q6e});var LH,W6e,Rh,qy=_(()=>{"use strict";_H();ud();Uy();LH=Eo&&Eo.isTypedArray,W6e=LH?To(LH):SH,Rh=W6e});function H6e(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Wy,Z_=_(()=>{"use strict";s(H6e,"safeGet");Wy=H6e});function j6e(t,e,r){var n=t[e];(!(X6e.call(t,e)&&bo(n,r))||r===void 0&&!(e in t))&&Jl(t,e,r)}var Y6e,X6e,tc,Up=_(()=>{"use strict";Np();od();Y6e=Object.prototype,X6e=Y6e.hasOwnProperty;s(j6e,"assignValue");tc=j6e});function K6e(t,e,r,n){var i=!r;r||(r={});for(var a=-1,o=e.length;++a{"use strict";Up();Np();s(K6e,"copyObject");Co=K6e});function Q6e(t,e){for(var r=-1,n=Array(t);++r{"use strict";s(Q6e,"baseTimes");DH=Q6e});function ewe(t,e){var r=typeof t;return e=e??Z6e,!!e&&(r=="number"||r!="symbol"&&J6e.test(t))&&t>-1&&t%1==0&&t{"use strict";Z6e=9007199254740991,J6e=/^(?:0|[1-9]\d*)$/;s(ewe,"isIndex");Mh=ewe});function nwe(t,e){var r=ct(t),n=!r&&cl(t),i=!r&&!n&&ul(t),a=!r&&!n&&!i&&Rh(t),o=r||n||i||a,l=o?DH(t.length,String):[],u=l.length;for(var h in t)(e||rwe.call(t,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Mh(h,u)))&&l.push(h);return l}var twe,rwe,N3,J_=_(()=>{"use strict";RH();$p();Dn();Vp();Hy();qy();twe=Object.prototype,rwe=twe.hasOwnProperty;s(nwe,"arrayLikeKeys");N3=nwe});function iwe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var MH,IH=_(()=>{"use strict";s(iwe,"nativeKeysIn");MH=iwe});function owe(t){if(!on(t))return MH(t);var e=ec(t),r=[];for(var n in t)n=="constructor"&&(e||!swe.call(t,n))||r.push(n);return r}var awe,swe,NH,OH=_(()=>{"use strict";Ws();zp();IH();awe=Object.prototype,swe=awe.hasOwnProperty;s(owe,"baseKeysIn");NH=owe});function lwe(t){return Hn(t)?N3(t,!0):NH(t)}var ds,Ih=_(()=>{"use strict";J_();OH();wo();s(lwe,"keysIn");ds=lwe});function cwe(t){return Co(t,ds(t))}var PH,BH=_(()=>{"use strict";hd();Ih();s(cwe,"toPlainObject");PH=cwe});function uwe(t,e,r,n,i,a,o){var l=Wy(t,r),u=Wy(e,r),h=o.get(u);if(h){Gy(t,r,h);return}var f=a?a(l,u,r+"",t,e,o):void 0,d=f===void 0;if(d){var p=ct(u),m=!p&&ul(u),g=!p&&!m&&Rh(u);f=u,p||m||g?ct(l)?f=l:cd(l)?f=A3(l):m?(d=!1,f=C3(u,!0)):g?(d=!1,f=_3(u,!0)):f=[]:EH(u)||cl(u)?(f=l,cl(l)?f=PH(l):(!on(l)||fi(l))&&(f=R3(u))):d=!1}d&&(o.set(u,f),i(f,u,n,a,o),o.delete(u)),Gy(t,r,f)}var FH,zH=_(()=>{"use strict";U_();q_();H_();Y_();j_();$p();Dn();I3();Vp();Oy();Ws();CH();qy();Z_();BH();s(uwe,"baseMergeDeep");FH=uwe});function $H(t,e,r,n,i){t!==e&&Op(e,function(a,o){if(i||(i=new Zl),on(a))FH(t,e,o,r,$H,n,i);else{var l=n?n(Wy(t,o),a,o+"",t,e,i):void 0;l===void 0&&(l=a),Gy(t,o,l)}},ds)}var GH,VH=_(()=>{"use strict";$y();U_();E3();zH();Ws();Ih();Z_();s($H,"baseMerge");GH=$H});function hwe(t){return t}var Wi,mu=_(()=>{"use strict";s(hwe,"identity");Wi=hwe});function fwe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var UH,qH=_(()=>{"use strict";s(fwe,"apply");UH=fwe});function dwe(t,e,r){return e=WH(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=WH(n.length-e,0),o=Array(a);++i{"use strict";qH();WH=Math.max;s(dwe,"overRest");O3=dwe});function pwe(t){return function(){return t}}var ps,tA=_(()=>{"use strict";s(pwe,"constant");ps=pwe});var mwe,HH,YH=_(()=>{"use strict";tA();V_();mu();mwe=Ip?function(t,e){return Ip(t,"toString",{configurable:!0,enumerable:!1,value:ps(e),writable:!0})}:Wi,HH=mwe});function xwe(t){var e=0,r=0;return function(){var n=vwe(),i=ywe-(n-r);if(r=n,i>0){if(++e>=gwe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var gwe,ywe,vwe,XH,jH=_(()=>{"use strict";gwe=800,ywe=16,vwe=Date.now;s(xwe,"shortOut");XH=xwe});var bwe,P3,rA=_(()=>{"use strict";YH();jH();bwe=XH(HH),P3=bwe});function kwe(t,e){return P3(O3(t,e,Wi),t+"")}var rc,qp=_(()=>{"use strict";mu();eA();rA();s(kwe,"baseRest");rc=kwe});function wwe(t,e,r){if(!on(r))return!1;var n=typeof e;return(n=="number"?Hn(r)&&Mh(e,r.length):n=="string"&&e in r)?bo(r[e],t):!1}var Hs,fd=_(()=>{"use strict";od();wo();Hy();Ws();s(wwe,"isIterateeCall");Hs=wwe});function Twe(t){return rc(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,o&&Hs(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{"use strict";qp();fd();s(Twe,"createAssigner");B3=Twe});var Ewe,Nh,iA=_(()=>{"use strict";VH();nA();Ewe=B3(function(t,e,r){GH(t,e,r)}),Nh=Ewe});function Wp(t,e){if(!t)return e;let r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Cwe[r]??e}function Lwe(t,e){let r=t.trim();if(r)return e.securityLevel!=="loose"?(0,ZH.sanitizeUrl)(r):r}function tY(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Rwe(t){let e,r=0;t.forEach(i=>{r+=tY(i,e),e=i});let n=r/2;return oA(t,n)}function Mwe(t){return t.length===1?t[0]:Rwe(t)}function Nwe(t,e,r){let n=structuredClone(r);V.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();let i=25+t,a=oA(n,i),o=10+t*.5,l=Math.atan2(n[0].y-a.y,n[0].x-a.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(l+Math.PI)*o+(n[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*o+(n[0].y+a.y)/2):e==="end_right"?(u.x=Math.sin(l-Math.PI)*o+(n[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*o+(n[0].y+a.y)/2-5):e==="end_left"?(u.x=Math.sin(l)*o+(n[0].x+a.x)/2-5,u.y=-Math.cos(l)*o+(n[0].y+a.y)/2-5):(u.x=Math.sin(l)*o+(n[0].x+a.x)/2,u.y=-Math.cos(l)*o+(n[0].y+a.y)/2),u}function Hp(t){let e="",r="";for(let n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function Owe(t){let e="",r="0123456789abcdef",n=r.length;for(let i=0;i{"use strict";ZH=ka(_p(),1);Xt();Qt();fE();it();Mf();Y0();G_();iA();hb();sA="\u200B",Cwe={curveBasis:hs,curveBasisClosed:s3,curveBasisOpen:o3,curveBumpX:g_,curveBumpY:y_,curveBundle:v_,curveCardinalClosed:b_,curveCardinalOpen:w_,curveCardinal:x_,curveCatmullRomClosed:C_,curveCatmullRomOpen:S_,curveCatmullRom:E_,curveLinear:uu,curveLinearClosed:f3,curveMonotoneX:A_,curveMonotoneY:L_,curveNatural:p3,curveStep:g3,curveStepAfter:R_,curveStepBefore:D_},Swe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_we=s(function(t,e){let r=JH(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let o=r.map(l=>l.args);K0(o),n=An(n,[...o])}else n=r.args;if(!n)return;let i=H0(t,e),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),JH=s(function(t,e=null){try{let r=new RegExp(`[%]{2}(?![{]${Swe.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),V.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n,i=[];for(;(n=Df.exec(t))!==null;)if(n.index===Df.lastIndex&&Df.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){let a=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:o})}return i.length===0?{type:t,args:null}:i.length===1?i[0]:i}catch(r){return V.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),eY=s(function(t){return t.replace(Df,"")},"removeDirectives"),Awe=s(function(t,e){for(let[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");s(Wp,"interpolateToCurve");s(Lwe,"formatUrl");Dwe=s((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let o=0;o{let r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),oA=s((t,e)=>{let r,n=e;for(let i of t){if(r){let a=tY(i,r);if(a=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:KH((1-o)*r.x+o*i.x,5),y:KH((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Iwe=s((t,e,r)=>{V.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let i=oA(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(o)*a+(e[0].x+i.x)/2,l.y=-Math.cos(o)*a+(e[0].y+i.y)/2,l},"calcCardinalityPosition");s(Nwe,"calcTerminalLabelPosition");s(Hp,"getStylesFromArray");QH=0,lA=s(()=>(QH++,"id-"+Math.random().toString(36).substr(2,12)+"-"+QH),"generateId");s(Owe,"makeRandomHex");cA=s(t=>Owe(t.length),"random"),Pwe=s(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Bwe=s(function(t,e){let r=e.text.replace($e.lineBreakRegex," "),[,n]=nc(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);let a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),uA=Rp((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),$e.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((o,l)=>{let u=hl(`${o} `,r),h=hl(a,r);if(u>e){let{hyphenatedStrings:p,remainingWord:m}=Fwe(o,e,"-",r);i.push(a,...p),a=m}else h+u>=e?(i.push(a),a=o):a=[a,o].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Fwe=Rp((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],o="";return i.forEach((l,u)=>{let h=`${o}${l}`;if(hl(h,n)>=e){let d=u+1,p=i.length===d,m=`${h}${r}`;a.push(p?h:m),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);s(z3,"calculateTextHeight");s(hl,"calculateTextWidth");hA=Rp((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=nc(r),o=["sans-serif",n],l=t.split($e.lineBreakRegex),u=[],h=Me("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of o){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=Pwe();v.text=y||sA;let x=Bwe(f,v).style("font-size",a).style("font-weight",i).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),aA=class{constructor(e=!1,r){this.count=0;this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{s(this,"InitIDGenerator")}},zwe=s(function(t){return F3=F3||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),F3.innerHTML=t,unescape(F3.textContent)},"entityDecode");s(fA,"isDetailedError");$we=s((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),nc=s(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");s(ms,"cleanAndMerge");dt={assignWithDepth:An,wrapLabel:uA,calculateTextHeight:z3,calculateTextWidth:hl,calculateTextDimensions:hA,cleanAndMerge:ms,detectInit:_we,detectDirective:JH,isSubstringInArray:Awe,interpolateToCurve:Wp,calcLabelPosition:Mwe,calcCardinalityPosition:Iwe,calcTerminalLabelPosition:Nwe,formatUrl:Lwe,getStylesFromArray:Hp,generateId:lA,random:cA,runFunc:Dwe,entityDecode:zwe,insertTitle:$we,parseFontSize:nc,InitIDGenerator:aA},rY=s(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),Ys=s(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),$3=s((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId")});function fl(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=uA(e[t].text,i,n),e[t].textLines=e[t].text.split($e.lineBreakRegex).length,e[t].width=i,e[t].height=z3(e[t].text,n);else{let a=e[t].text.split($e.lineBreakRegex);e[t].textLines=a.length;let o=0;e[t].height=0,e[t].width=0;for(let l of a)e[t].width=Math.max(hl(l,n),e[t].width),o=z3(l,n),e[t].height=e[t].height+o}}function oY(t,e,r,n,i){let a=new q3(i);a.data.widthLimit=r.data.widthLimit/Math.min(dA,n.length);for(let[o,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&kt.wrap,f=G3(kt);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",fl("label",l,h,f,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=G3(kt);fl("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=G3(kt);g.fontSize=g.fontSize-2,fl("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(o==0||o%dA===0){let g=r.data.startx+kt.diagramMarginX,y=r.data.stopy+kt.diagramMarginY+u;a.setData(g,g,y,y)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+kt.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y)}a.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&sY(a,t,d,p),e=l.alias;let m=i.db.getBoundarys(e);m.length>0&&oY(t,e,a,m,i),l.alias!=="global"&&aY(t,l,a),r.data.stopy=Math.max(a.data.stopy+kt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+kt.c4ShapeMargin,r.data.stopx),V3=Math.max(V3,r.data.stopx),U3=Math.max(U3,r.data.stopy)}}var V3,U3,iY,dA,kt,q3,pA,Yy,G3,Gwe,aY,sY,gs,nY,Vwe,Uwe,qwe,mA,lY=_(()=>{"use strict";Xt();nW();it();Z7();Qt();vC();gt();Y0();pr();Un();V3=0,U3=0,iY=4,dA=2;C1.yy=Y1;kt={},q3=class{static{s(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,pA(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>iY)&&(r=this.nextData.startx+e.margin+kt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},pA(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},pA=s(function(t){An(kt,t),t.fontFamily&&(kt.personFontFamily=kt.systemFontFamily=kt.messageFontFamily=t.fontFamily),t.fontSize&&(kt.personFontSize=kt.systemFontSize=kt.messageFontSize=t.fontSize),t.fontWeight&&(kt.personFontWeight=kt.systemFontWeight=kt.messageFontWeight=t.fontWeight)},"setConf"),Yy=s((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),G3=s(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),Gwe=s(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");s(fl,"calcC4ShapeTextWH");aY=s(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=kt.c4ShapeMargin-35;let n=e.wrap&&kt.wrap,i=G3(kt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=hl(e.label.text,i);fl("label",e,n,i,a),ll.drawBoundary(t,e,kt)},"drawBoundary"),sY=s(function(t,e,r,n){let i=0;for(let a of n){i=0;let o=r[a],l=Yy(kt,o.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,o.typeC4Shape.width=hl("\xAB"+o.typeC4Shape.text+"\xBB",l),o.typeC4Shape.height=l.fontSize+2,o.typeC4Shape.Y=kt.c4ShapePadding,i=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height;break}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let u=o.wrap&&kt.wrap,h=kt.width-kt.c4ShapePadding*2,f=Yy(kt,o.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",fl("label",o,u,f,h),o.label.Y=i+8,i=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=Yy(kt,o.typeC4Shape.text);fl("type",o,u,m,h),o.type.Y=i+5,i=o.type.Y+o.type.height}else if(o.techn&&o.techn.text!==""){o.techn.text="["+o.techn.text+"]";let m=Yy(kt,o.techn.text);fl("techn",o,u,m,h),o.techn.Y=i+5,i=o.techn.Y+o.techn.height}let d=i,p=o.label.width;if(o.descr&&o.descr.text!==""){let m=Yy(kt,o.typeC4Shape.text);fl("descr",o,u,m,h),o.descr.Y=i+20,i=o.descr.Y+o.descr.height,p=Math.max(o.label.width,o.descr.width),d=i-o.descr.textLines*5}p=p+kt.c4ShapePadding,o.width=Math.max(o.width||kt.width,p,kt.width),o.height=Math.max(o.height||kt.height,d,kt.height),o.margin=o.margin||kt.c4ShapeMargin,t.insert(o),ll.drawC4Shape(e,o,kt)}t.bumpLastMargin(kt.c4ShapeMargin)},"drawC4ShapeArray"),gs=class{static{s(this,"Point")}constructor(e,r){this.x=e,this.y=r}},nY=s(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,o=r+t.width/2,l=n+t.height/2,u=Math.abs(r-i),h=Math.abs(n-a),f=h/u,d=t.height/t.width,p=null;return n==a&&ri?p=new gs(r,l):r==i&&na&&(p=new gs(o,n)),r>i&&n=f?p=new gs(r,l+f*t.width/2):p=new gs(o-u/h*t.height/2,n+t.height):r=f?p=new gs(r+t.width,l+f*t.width/2):p=new gs(o+u/h*t.height/2,n+t.height):ra?d>=f?p=new gs(r+t.width,l-f*t.width/2):p=new gs(o+t.height/2*u/h,n):r>i&&n>a&&(d>=f?p=new gs(r,l-t.width/2*f):p=new gs(o-t.height/2*u/h,n)),p},"getIntersectPoint"),Vwe=s(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=nY(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=nY(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),Uwe=s(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let o=a.wrap&&kt.wrap,l=Gwe(kt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let h=hl(a.label.text,l);fl("label",a,o,l,h),a.techn&&a.techn.text!==""&&(h=hl(a.techn.text,l),fl("techn",a,o,l,h)),a.descr&&a.descr.text!==""&&(h=hl(a.descr.text,l),fl("descr",a,o,l,h));let f=r(a.from),d=r(a.to),p=Vwe(f,d);a.startPoint=p.startPoint,a.endPoint=p.endPoint}ll.drawRels(t,e,kt)},"drawRels");s(oY,"drawInsideBoundary");qwe=s(function(t,e,r,n){kt=le().c4;let i=le().securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let o=i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body"),l=n.db;n.db.setWrap(kt.wrap),iY=l.getC4ShapeInRow(),dA=l.getC4BoundaryInRow(),V.debug(`C:${JSON.stringify(kt,null,2)}`);let u=i==="sandbox"?o.select(`[id="${e}"]`):Me(`[id="${e}"]`);ll.insertComputerIcon(u),ll.insertDatabaseIcon(u),ll.insertClockIcon(u);let h=new q3(n);h.setData(kt.diagramMarginX,kt.diagramMarginX,kt.diagramMarginY,kt.diagramMarginY),h.data.widthLimit=screen.availWidth,V3=kt.diagramMarginX,U3=kt.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundarys("");oY(u,"",h,d,n),ll.insertArrowHead(u),ll.insertArrowEnd(u),ll.insertArrowCrossHead(u),ll.insertArrowFilledHead(u),Uwe(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=V3,h.data.stopy=U3;let p=h.data,g=p.stopy-p.starty+2*kt.diagramMarginY,v=p.stopx-p.startx+2*kt.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*kt.diagramMarginX).attr("y",p.starty+kt.diagramMarginY),xr(u,g,v,kt.useMaxWidth);let x=f?60:0;u.attr("viewBox",p.startx-kt.diagramMarginX+" -"+(kt.diagramMarginY+x)+" "+v+" "+(g+x)),V.debug("models:",p)},"draw"),mA={drawPersonOrSystemArray:sY,drawBoundary:aY,setConf:pA,draw:qwe}});var Wwe,cY,uY=_(()=>{"use strict";Wwe=s(t=>`.person { + stroke: ${t.personBorder}; + fill: ${t.personBkg}; + } +`,"getStyles"),cY=Wwe});var hY={};ur(hY,{diagram:()=>Hwe});var Hwe,fY=_(()=>{"use strict";Z7();vC();lY();uY();Hwe={parser:MB,db:Y1,renderer:mA,styles:cY,init:s(({c4:t,wrap:e})=>{mA.setConf(t),Y1.setWrap(e)},"init")}});function yA(t){let e=[];for(let r of t){let n=jy.get(r);n?.styles&&(e=[...e,...n.styles??[]].map(i=>i.trim())),n?.textStyles&&(e=[...e,...n.textStyles??[]].map(i=>i.trim()))}return e}var Kwe,mY,Yp,Oh,ys,jy,gu,vA,xA,W3,gA,So,H3,Y3,X3,j3,Qwe,Zwe,Jwe,eTe,tTe,rTe,nTe,bA,iTe,aTe,sTe,gY,oTe,lTe,kA,yY,vY,cTe,xY,uTe,hTe,fTe,dTe,pTe,Xy,bY,kY,mTe,gTe,wY,yTe,vTe,xTe,bTe,kTe,TY,EY,wTe,TTe,ETe,CTe,STe,_Te,K3,wA=_(()=>{"use strict";Xt();pr();gt();Qt();it();Ci();Kwe="flowchart-",mY=0,Yp=le(),Oh=new Map,ys=[],jy=new Map,gu=[],vA=new Map,xA=new Map,W3=0,gA=!0,Y3=[],X3=s(t=>$e.sanitizeText(t,Yp),"sanitizeText"),j3=s(function(t){for(let e of Oh.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),Qwe=s(function(t,e,r,n,i,a,o={}){if(!t||t.trim().length===0)return;let l,u=Oh.get(t);u===void 0&&(u={id:t,labelType:"text",domId:Kwe+t+"-"+mY,styles:[],classes:[]},Oh.set(t,u)),mY++,e!==void 0?(Yp=le(),l=X3(e.text.trim()),u.labelType=e.type,l.startsWith('"')&&l.endsWith('"')&&(l=l.substring(1,l.length-1)),u.text=l):u.text===void 0&&(u.text=t),r!==void 0&&(u.type=r),n?.forEach(function(h){u.styles.push(h)}),i?.forEach(function(h){u.classes.push(h)}),a!==void 0&&(u.dir=a),u.props===void 0?u.props=o:o!==void 0&&Object.assign(u.props,o)},"addVertex"),Zwe=s(function(t,e,r){let a={start:t,end:e,type:void 0,text:"",labelType:"text"};V.info("abc78 Got edge...",a);let o=r.text;if(o!==void 0&&(a.text=X3(o.text.trim()),a.text.startsWith('"')&&a.text.endsWith('"')&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=o.type),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),ys.length<(Yp.maxEdges??500))V.info("Pushing edge..."),ys.push(a);else throw new Error(`Edge limit exceeded. ${ys.length} edges found, but the limit is ${Yp.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)},"addSingleLink"),Jwe=s(function(t,e,r){V.info("addLink",t,e,r);for(let n of t)for(let i of e)Zwe(n,i,r)},"addLink"),eTe=s(function(t,e){t.forEach(function(r){r==="default"?ys.defaultInterpolate=e:ys[r].interpolate=e})},"updateLinkInterpolate"),tTe=s(function(t,e){t.forEach(function(r){if(typeof r=="number"&&r>=ys.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${ys.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?ys.defaultStyle=e:(ys[r].style=e,(ys[r]?.style?.length??0)>0&&!ys[r]?.style?.some(n=>n?.startsWith("fill"))&&ys[r]?.style?.push("fill:none"))})},"updateLink"),rTe=s(function(t,e){t.split(",").forEach(function(r){let n=jy.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},jy.set(r,n)),e?.forEach(function(i){if(/color/.exec(i)){let a=i.replace("fill","bgFill");n.textStyles.push(a)}n.styles.push(i)})})},"addClass"),nTe=s(function(t){So=t,/.*/.exec(So)&&(So="LR"),/.*v/.exec(So)&&(So="TB"),So==="TD"&&(So="TB")},"setDirection"),bA=s(function(t,e){for(let r of t.split(",")){let n=Oh.get(r);n&&n.classes.push(e);let i=vA.get(r);i&&i.classes.push(e)}},"setClass"),iTe=s(function(t,e){if(e!==void 0){e=X3(e);for(let r of t.split(","))xA.set(H3==="gen-1"?j3(r):r,e)}},"setTooltip"),aTe=s(function(t,e,r){let n=j3(t);if(le().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Me(this).classed("hover",!1)})},"setupToolTips");Y3.push(xY);uTe=s(function(t="gen-1"){Oh=new Map,jy=new Map,ys=[],Y3=[xY],gu=[],vA=new Map,W3=0,xA=new Map,gA=!0,H3=t,Yp=le(),br()},"clear"),hTe=s(t=>{H3=t||"gen-2"},"setGen"),fTe=s(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),dTe=s(function(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);function a(h){let f={boolean:{},number:{},string:{}},d=[],p;return{nodeList:h.filter(function(g){let y=typeof g;return g.stmt&&g.stmt==="dir"?(p=g.value,!1):g.trim()===""?!1:y in f?f[y].hasOwnProperty(g)?!1:f[y][g]=!0:d.includes(g)?!1:d.push(g)}),dir:p}}s(a,"uniq");let{nodeList:o,dir:l}=a(e.flat());if(H3==="gen-1")for(let h=0;h2e3)return{result:!1,count:0};if(bY[Xy]=e,gu[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n=0){let o=kY(t,a);if(o.result)return{result:!0,count:i+o.count};i=i+o.count}n=n+1}return{result:!1,count:i}},"indexNodes2"),mTe=s(function(t){return bY[t]},"getDepthFirstPos"),gTe=s(function(){Xy=-1,gu.length>0&&kY("none",gu.length-1)},"indexNodes"),wY=s(function(){return gu},"getSubGraphs"),yTe=s(()=>gA?(gA=!1,!0):!1,"firstGraph"),vTe=s(t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),xTe=s((t,e)=>{let r=e.length,n=0;for(let i=0;i{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible");let o=xTe(".",r);return o&&(i="dotted",a=o),{type:n,stroke:i,length:a}},"destructEndLink"),kTe=s((t,e)=>{let r=bTe(t),n;if(e){if(n=vTe(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},"destructLink"),TY=s((t,e)=>{for(let r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),EY=s((t,e)=>{let r=[];return t.nodes.forEach((n,i)=>{TY(e,n)||r.push(t.nodes[i])}),{nodes:r}},"makeUniq"),wTe={firstGraph:yTe},TTe=s(t=>t.type==="square"?"squareRect":t.type==="round"?"roundedRect":t.type??"squareRect","getTypeFromVertex"),ETe=s((t,e)=>t.find(r=>r.id===e),"findNode"),CTe=s(t=>{let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e;break}return{arrowTypeStart:e,arrowTypeEnd:r}},"destructEdgeType"),STe=s((t,e,r,n,i,a)=>{let o=r.get(t.id),l=n.get(t.id)??!1,u=ETe(e,t.id);u?(u.cssStyles=t.styles,u.cssCompiledStyles=yA(t.classes),u.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:o,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:yA(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:TTe(t),dir:t.dir,domId:t.domId,isGroup:l,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:gY(t.id)})},"addNodeFromVertex");s(yA,"getCompiledStyles");_Te=s(()=>{let t=le(),e=[],r=[],n=wY(),i=new Map,a=new Map;for(let u=n.length-1;u>=0;u--){let h=n[u];h.nodes.length>0&&a.set(h.id,!0);for(let f of h.nodes)i.set(f,h.id)}for(let u=n.length-1;u>=0;u--){let h=n[u];e.push({id:h.id,label:h.title,labelStyle:"",parentId:i.get(h.id),padding:8,cssCompiledStyles:yA(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir,isGroup:!0,look:t.look})}yY().forEach(u=>{STe(u,e,i,a,t,t.look||"classic")});let l=vY();return l.forEach((u,h)=>{let{arrowTypeStart:f,arrowTypeEnd:d}=CTe(u.type),p=[...l.defaultStyle??[]];u.style&&p.push(...u.style);let m={id:$3(u.start,u.end,{counter:h,prefix:"L"}),start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"?"none":f,arrowTypeEnd:u?.stroke==="invisible"?"none":d,arrowheadStyle:"fill: #333",labelStyle:p,style:p,pattern:u.stroke,look:t.look};r.push(m)}),{nodes:e,edges:r,other:{},config:t}},"getData"),K3={defaultConfig:s(()=>Qb.flowchart,"defaultConfig"),setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,getData:_Te,setAccDescription:Vr,addVertex:Qwe,lookUpDomId:j3,addLink:Jwe,updateLinkInterpolate:eTe,updateLink:tTe,addClass:rTe,setDirection:nTe,setClass:bA,setTooltip:iTe,getTooltip:gY,setClickEvent:oTe,setLink:sTe,bindFunctions:lTe,getDirection:kA,getVertices:yY,getEdges:vY,getClasses:cTe,clear:uTe,setGen:hTe,defaultStyle:fTe,addSubGraph:dTe,getDepthFirstPos:mTe,indexNodes:gTe,getSubGraphs:wY,destructLink:kTe,lex:wTe,exists:TY,makeUniq:EY,setDiagramTitle:an,getDiagramTitle:Qr}});var ATe,CY,SY=_(()=>{"use strict";ATe=s(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),CY=s((t,e,r)=>{let n=ATe(t),i=2,a=e.height+2*r.padding,o=a/i,l=e.width+2*o+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:o,y:0},{x:l/2,y:2*u},{x:l-o,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*u,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-o,y:-a},{x:l/2,y:-a-2*u},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*u,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:o,y:0},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:o,y:-a},{x:l-o,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-o},{x:l,y:-a+o},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u},{x:l,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-o},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-o},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:o,y:-u},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a+u}]:n.has("left")?[{x:o,y:0},{x:o,y:-u},{x:l-o,y:-u},{x:l-o,y:-a+u},{x:o,y:-a+u},{x:o,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:o,y:-u},{x:o,y:-a+u},{x:0,y:-a+u},{x:l/2,y:-a},{x:l,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:o,y:-u},{x:o,y:-a+u},{x:l-o,y:-a+u},{x:l-o,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints")});function CA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function MY(t){pd=t}function Xs(t,e){if(e){if(IY.test(t))return t.replace(LTe,_Y)}else if(NY.test(t))return t.replace(DTe,_Y);return t}function ITe(t){return t.replace(MTe,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}function en(t,e){let r=typeof t=="string"?t:t.source;e=e||"";let n={replace:s((i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(NTe,"$1"),r=r.replace(i,o),n},"replace"),getRegex:s(()=>new RegExp(r,e),"getRegex")};return n}function AY(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function LY(t,e){let r=t.replace(/\|/g,(a,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{let a=i.match(/^\s+/);if(a===null)return i;let[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(` +`)}function qr(t,e){return dd.parse(t,e)}var pd,IY,LTe,NY,DTe,RTe,_Y,MTe,NTe,Zy,jp,BTe,FTe,zTe,ev,$Te,OY,PY,SA,GTe,_A,VTe,UTe,J3,AA,qTe,BY,WTe,LA,RY,HTe,YTe,FY,XTe,zY,jTe,tv,KTe,QTe,ZTe,JTe,e7e,t7e,r7e,n7e,i7e,Z3,a7e,$Y,GY,s7e,DA,o7e,TA,l7e,Q3,Qy,yu,Kp,Jy,vu,Xp,EA,dd,b3t,k3t,w3t,T3t,E3t,C3t,S3t,VY=_(()=>{"use strict";s(CA,"_getDefaults");pd=CA();s(MY,"changeDefaults");IY=/[&<>"']/,LTe=new RegExp(IY.source,"g"),NY=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,DTe=new RegExp(NY.source,"g"),RTe={"&":"&","<":"<",">":">",'"':""","'":"'"},_Y=s(t=>RTe[t],"getEscapeReplacement");s(Xs,"escape$1");MTe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;s(ITe,"unescape");NTe=/(^|[^\[])\^/g;s(en,"edit");s(AY,"cleanUrl");Zy={exec:s(()=>null,"exec")};s(LY,"splitCells");s(Ky,"rtrim");s(OTe,"findClosingBracket");s(DY,"outputLink");s(PTe,"indentCodeCompensation");jp=class{static{s(this,"_Tokenizer")}options;rules;lexer;constructor(e){this.options=e||pd}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ky(n,` +`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=PTe(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=Ky(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Ky(r[0],` +`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Ky(r[0],` +`).split(` +`),i="",a="",o=[];for(;n.length>0;){let l=!1,u=[],h;for(h=0;h/.test(n[h]))u.push(n[h]),l=!0;else if(!l)u.push(n[h]);else break;n=n.slice(h);let f=u.join(` +`),d=f.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i} +${f}`:f,a=a?`${a} +${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,o,!0),this.lexer.state.top=p,n.length===0)break;let m=o[o.length-1];if(m?.type==="code")break;if(m?.type==="blockquote"){let g=m,y=g.raw+` +`+n.join(` +`),v=this.blockquote(y);o[o.length-1]=v,i=i.substring(0,i.length-g.raw.length)+v.raw,a=a.substring(0,a.length-g.text.length)+v.text;break}else if(m?.type==="list"){let g=m,y=g.raw+` +`+n.join(` +`),v=this.list(y);o[o.length-1]=v,i=i.substring(0,i.length-m.raw.length)+v.raw,a=a.substring(0,a.length-g.raw.length)+v.raw,n=y.substring(o[o.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:i,tokens:o,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),l=!1;for(;e;){let u=!1,h="",f="";if(!(r=o.exec(e))||this.rules.block.hr.test(e))break;h=r[0],e=e.substring(h.length);let d=r[2].split(` +`,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),p=e.split(` +`,1)[0],m=!d.trim(),g=0;if(this.options.pedantic?(g=2,f=d.trimStart()):m?g=r[1].length+1:(g=r[2].search(/[^ ]/),g=g>4?1:g,f=d.slice(g),g+=r[1].length),m&&/^ *$/.test(p)&&(h+=p+` +`,e=e.substring(p.length+1),u=!0),!u){let x=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),k=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;e;){let w=e.split(` +`,1)[0];if(p=w,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),k.test(p)||A.test(p)||x.test(p)||b.test(e))break;if(p.search(/[^ ]/)>=g||!p.trim())f+=` +`+p.slice(g);else{if(m||d.search(/[^ ]/)>=4||k.test(d)||A.test(d)||b.test(d))break;f+=` +`+p}!m&&!p.trim()&&(m=!0),h+=w+` +`,e=e.substring(w.length+1),d=p.slice(g)}}a.loose||(l?a.loose=!0:/\n *\n *$/.test(h)&&(l=!0));let y=null,v;this.options.gfm&&(y=/^\[[ xX]\] /.exec(f),y&&(v=y[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:v,loose:!1,text:f,tokens:[]}),a.raw+=h}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let u=0;ud.type==="space"),f=h.length>0&&h.some(d=>/\n.*\n/.test(d.raw));a.loose=f}if(a.loose)for(let u=0;u$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!/[:|]/.test(r[2]))return;let n=LY(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` +`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)/^ *-+: *$/.test(l)?o.align.push("right"):/^ *:-+: *$/.test(l)?o.align.push("center"):/^ *:-+ *$/.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[h]})));return o}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:Xs(r[1])}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&/^/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;let o=Ky(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=OTe(r[2],"()");if(o>-1){let u=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,u).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),DY(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return DY(n,a,n[0],this.lexer)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let o=[...i[0]].length-1,l,u,h=o,f=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+o);(i=d.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(u=[...l].length,i[3]||i[4]){h+=u;continue}else if((i[5]||i[6])&&o%3&&!((o+u)%3)){f+=u;continue}if(h-=u,h>0)continue;u=Math.min(u,u+h+f);let p=[...i[0]][0].length,m=e.slice(0,o+i.index+p+u);if(Math.min(o,u)%2){let y=m.slice(1,-1);return{type:"em",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=Xs(n,!0),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=Xs(r[1]),i="mailto:"+n):(n=Xs(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=Xs(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=Xs(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=Xs(r[0]),{type:"text",raw:r[0],text:n}}}},BTe=/^(?: *(?:\n|$))+/,FTe=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,zTe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ev=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$Te=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,OY=/(?:[*+-]|\d{1,9}[.)])/,PY=en(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,OY).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),SA=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,GTe=/^[^\n]+/,_A=/(?!\s*\])(?:\\.|[^\[\]\\])+/,VTe=en(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",_A).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),UTe=en(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,OY).getRegex(),J3="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",AA=/|$))/,qTe=en("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",AA).replace("tag",J3).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),BY=en(SA).replace("hr",ev).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J3).getRegex(),WTe=en(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",BY).getRegex(),LA={blockquote:WTe,code:FTe,def:VTe,fences:zTe,heading:$Te,hr:ev,html:qTe,lheading:PY,list:UTe,newline:BTe,paragraph:BY,table:Zy,text:GTe},RY=en("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ev).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J3).getRegex(),HTe={...LA,table:RY,paragraph:en(SA).replace("hr",ev).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",RY).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J3).getRegex()},YTe={...LA,html:en(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",AA).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Zy,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:en(SA).replace("hr",ev).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",PY).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},FY=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,XTe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zY=/^( {2,}|\\)\n(?!\s*$)/,jTe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,ZTe=en(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,tv).getRegex(),JTe=en("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,tv).getRegex(),e7e=en("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,tv).getRegex(),t7e=en(/\\([punct])/,"gu").replace(/punct/g,tv).getRegex(),r7e=en(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),n7e=en(AA).replace("(?:-->|$)","-->").getRegex(),i7e=en("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",n7e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z3=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,a7e=en(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z3).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$Y=en(/^!?\[(label)\]\[(ref)\]/).replace("label",Z3).replace("ref",_A).getRegex(),GY=en(/^!?\[(ref)\](?:\[\])?/).replace("ref",_A).getRegex(),s7e=en("reflink|nolink(?!\\()","g").replace("reflink",$Y).replace("nolink",GY).getRegex(),DA={_backpedal:Zy,anyPunctuation:t7e,autolink:r7e,blockSkip:QTe,br:zY,code:XTe,del:Zy,emStrongLDelim:ZTe,emStrongRDelimAst:JTe,emStrongRDelimUnd:e7e,escape:FY,link:a7e,nolink:GY,punctuation:KTe,reflink:$Y,reflinkSearch:s7e,tag:i7e,text:jTe,url:Zy},o7e={...DA,link:en(/^!?\[(label)\]\((.*?)\)/).replace("label",Z3).getRegex(),reflink:en(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z3).getRegex()},TA={...DA,escape:en(FY).replace("])","~|])").getRegex(),url:en(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\u+" ".repeat(h.length));let i,a,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(i=l.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&r.length>0?r[r.length-1].raw+=` +`:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` +`+i.raw,a.text+=` +`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` +`+i.raw,a.text+=` +`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,u=e.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},u),typeof h=="number"&&h>=0&&(l=Math.min(l,h))}),l<1/0&&l>=0&&(o=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){a=r[r.length-1],n&&a?.type==="paragraph"?(a.raw+=` +`+i.raw,a.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i),n=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=` +`+i.raw,a.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n,i,a,o=e,l,u,h;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)f.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(u||(h=""),u=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(n=f.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(e,o,h)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),r.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let f=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},d),typeof p=="number"&&p>=0&&(f=Math.min(f,p))}),f<1/0&&f>=0&&(a=e.substring(0,f+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(h=n.raw.slice(-1)),u=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(e){let f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return r}},Kp=class{static{s(this,"_Renderer")}options;parser;constructor(e){this.options=e||pd}space(e){return""}code({text:e,lang:r,escaped:n}){let i=(r||"").match(/^\S*/)?.[0],a=e.replace(/\n$/,"")+` +`;return i?'
'+(n?a:Xs(a,!0))+`
+`:"
"+(n?a:Xs(a,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:r}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let r=e.ordered,n=e.start,i="";for(let l=0;l +`+i+" +`}listitem(e){let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`
  • ${r}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let r="",n="";for(let a=0;a${i}`),` + +`+r+` +`+i+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=AY(e);if(a===null)return i;e=a;let o='
    ",o}image({href:e,title:r,text:n}){let i=AY(e);if(i===null)return n;e=i;let a=`${n}{let l=a[o].flat(1/0);n=n.concat(this.walkTokens(l,r))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=r.renderers[a.name];o?r.renderers[a.name]=function(...l){let u=a.renderer.apply(this,l);return u===!1&&(u=o.apply(this,l)),u}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Kp(this.defaults);for(let o in n.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let l=o,u=n.renderer[l];n.useNewRenderer||(u=this.#t(u,l,a));let h=a[l];a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new jp(this.defaults);for(let o in n.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let l=o,u=n.tokenizer[l],h=a[l];a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Xp;for(let o in n.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;let l=o,u=n.hooks[l],h=a[l];Xp.passThroughHooks.has(o)?a[l]=f=>{if(this.defaults.async)return Promise.resolve(u.call(a,f)).then(p=>h.call(a,p));let d=u.call(a,f);return h.call(a,d)}:a[l]=(...f)=>{let d=u.apply(a,f);return d===!1&&(d=h.apply(a,f)),d}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(l){let u=[];return u.push(o.call(this,l)),a&&(u=u.concat(a.call(this,l))),u}}this.defaults={...this.defaults,...i}}),this}#t(e,r,n){switch(r){case"heading":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,n.parser.parseInline(i.tokens),i.depth,ITe(n.parser.parseInline(i.tokens,n.parser.textRenderer)))};case"code":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.lang,!!i.escaped)};case"table":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a="",o="";for(let u=0;u0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=g+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=g+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:g+" "}):m+=g+" "}m+=this.parser.parse(f.tokens,l),u+=this.listitem({type:"list_item",raw:m,text:m,task:p,checked:!!d,loose:l,tokens:f.tokens})}return e.call(this,u,a,o)};case"html":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.block)};case"paragraph":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"escape":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"link":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,this.parser.parseInline(i.tokens))};case"image":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,i.text)};case"strong":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"em":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"codespan":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"del":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"text":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)}}return e}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return yu.lex(e,r??this.defaults)}parser(e,r){return vu.parse(e,r??this.defaults)}#e(e,r){return(n,i)=>{let a={...i},o={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);let l=this.#r(!!o.silent,!!o.async);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(u=>e(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>r(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let u=e(n,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let h=r(u,o);return o.hooks&&(h=o.hooks.postprocess(h)),h}catch(u){return l(u)}}}#r(e,r){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error occurred:

    "+Xs(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},dd=new EA;s(qr,"marked");qr.options=qr.setOptions=function(t){return dd.setOptions(t),qr.defaults=dd.defaults,MY(qr.defaults),qr};qr.getDefaults=CA;qr.defaults=pd;qr.use=function(...t){return dd.use(...t),qr.defaults=dd.defaults,MY(qr.defaults),qr};qr.walkTokens=function(t,e){return dd.walkTokens(t,e)};qr.parseInline=dd.parseInline;qr.Parser=vu;qr.parser=vu.parse;qr.Renderer=Kp;qr.TextRenderer=Jy;qr.Lexer=yu;qr.lexer=yu.lex;qr.Tokenizer=jp;qr.Hooks=Xp;qr.parse=qr;b3t=qr.options,k3t=qr.setOptions,w3t=qr.use,T3t=qr.walkTokens,E3t=qr.parseInline,C3t=vu.parse,S3t=yu.lex});function c7e(t,{markdownAutoWrap:e}){let n=t.replace(//g,` +`).replace(/\n{2,}/g,` +`),i=lb(n);return e===!1?i.replace(/ /g," "):i}function UY(t,e={}){let r=c7e(t,e),n=qr.lexer(r),i=[[]],a=0;function o(l,u="normal"){l.type==="text"?l.text.split(` +`).forEach((f,d)=>{d!==0&&(a++,i.push([])),f.split(" ").forEach(p=>{p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return s(o,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}),i}function qY(t,{markdownAutoWrap:e}={}){let r=qr.lexer(t);function n(i){return i.type==="text"?e===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

    ${i.tokens?.map(n).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:`Unsupported markdown: ${i.type}`}return s(n,"output"),r.map(n).join("")}var WY=_(()=>{"use strict";VY();Y7();s(c7e,"preprocessMarkdown");s(UY,"markdownToLines");s(qY,"markdownToHTML")});function u7e(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}function h7e(t,e){let r=u7e(e.content);return HY(t,[],r,e.type)}function HY(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];let[i,...a]=r,o=[...e,i];return t([{content:o.join(""),type:n}])?HY(t,o,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}function YY(t,e){if(t.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return RA(t,e)}function RA(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());let a=t.shift()??{content:" ",type:"normal"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(a),e(o))return RA(t,e,r,o);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){let[l,u]=h7e(e,a);r.push([l]),u.content&&t.unshift(u)}return RA(t,e,r)}var XY=_(()=>{"use strict";s(u7e,"splitTextToChars");s(h7e,"splitWordToFitWidth");s(HY,"splitWordToFitWidthRecursion");s(YY,"splitLineToFitWidth");s(RA,"splitLineToFitWidthRecursion")});function jY(t,e){e&&t.attr("style",e)}async function f7e(t,e,r,n,i=!1){let a=t.append("foreignObject"),o=a.append("xhtml:div"),l=e.label;e.label&&Ei(e.label)&&(l=await hh(e.label.replace($e.lineBreakRegex,` +`),le()));let u=e.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),jY(h,e.labelStyle),h.attr("class",`${u} ${n}`),jY(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let f=o.node().getBoundingClientRect();return f.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),f=o.node().getBoundingClientRect()),a.node()}function MA(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function d7e(t,e,r){let n=t.append("text"),i=MA(n,1,e);IA(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function KY(t,e,r){let n=t.append("text"),i=MA(n,1,e);IA(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function p7e(t,e,r,n=!1){let a=e.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1"),u=0;for(let h of r){let f=s(p=>d7e(a,1.1,p)<=t,"checkWidth"),d=f(h)?[h]:YY(h,f);for(let p of d){let m=MA(l,u,1.1);IA(m,p),u++}}if(n){let h=l.node().getBBox(),f=2;return o.attr("x",-f).attr("y",-f).attr("width",h.width+2*f).attr("height",h.height+2*f),a.node()}else return l.node()}function IA(t,e){t.text(""),e.forEach((r,n)=>{let i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}function NA(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>``)}var vs,ic=_(()=>{"use strict";gt();Qt();Xt();it();WY();pr();XY();s(jY,"applyStyle");s(f7e,"addHtmlSpan");s(MA,"createTspan");s(d7e,"computeWidthOfText");s(KY,"computeDimensionOfText");s(p7e,"createFormattedText");s(IA,"updateTextContentAndStyles");s(NA,"replaceIconSubstring");vs=s(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:o=!0,width:l=200,addSvgBackground:u=!1}={},h)=>{if(V.info("XYZ createText",e,r,n,i,a,o,"addSvgBackground: ",u),a){let f=qY(e,h),d=NA(Ys(f)),p=e.replace(/\\\\/g,"\\"),m={isNode:o,label:Ei(e)?p:d,labelStyle:r.replace("fill:","color:")};return await f7e(t,m,l,i,u)}else{let f=e.replace(//g,"
    "),d=UY(f.replace("
    ","
    "),h),p=p7e(l,t,d,e?u:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Me(p).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Me(p).select("rect").attr("style",m.replace(/background:/g,"fill:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Me(p).select("text").attr("style",g)}return p}},"createText")});function QY(t,e){e&&t.attr("style",e)}function m7e(t){let e=Me(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),QY(a,t.labelStyle),a.attr("class",i),QY(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var g7e,Hi,rv=_(()=>{"use strict";Xt();it();gt();Qt();pr();ic();s(QY,"applyStyle");s(m7e,"addHtmlLabel");g7e=s((t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),hr(le().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),V.debug("vertexText"+i);let a={isNode:n,label:NA(Ys(i)),labelStyle:e.replace("fill:","color:")};return m7e(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(let l of o){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),Hi=g7e});function y7e(t,e){return t.intersect(e)}var ZY,JY=_(()=>{"use strict";s(y7e,"intersectNode");ZY=y7e});function v7e(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*o*o),h=Math.abs(e*r*o/u);n.x{"use strict";s(v7e,"intersectEllipse");e5=v7e});function x7e(t,e,r){return e5(t,e,e,r)}var eX,tX=_(()=>{"use strict";OA();s(x7e,"intersectCircle");eX=x7e});function b7e(t,e,r,n){var i,a,o,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,o=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+o*r.y+u,m=i*n.x+o*n.y+u,!(p!==0&&m!==0&&rX(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&rX(f,d))&&(g=i*l-a*o,g!==0)))return y=Math.abs(g/2),v=o*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function rX(t,e){return t*e>0}var nX,iX=_(()=>{"use strict";s(b7e,"intersectLine");s(rX,"sameSign");nX=b7e});function k7e(t,e,r){var n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(g){o=Math.min(o,g.x),l=Math.min(l,g.y)}):(o=Math.min(o,e.x),l=Math.min(l,e.y));for(var u=n-t.width/2-o,h=i-t.height/2-l,f=0;f1&&a.sort(function(g,y){var v=g.x-r.x,x=g.y-r.y,b=Math.sqrt(v*v+x*x),k=y.x-r.x,A=y.y-r.y,w=Math.sqrt(k*k+A*A);return b{"use strict";iX();aX=k7e;s(k7e,"intersectPolygon")});var w7e,md,PA=_(()=>{"use strict";w7e=s((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,l=t.height/2,u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*a/i),{x:r+u,y:n+h}},"intersectRect"),md=w7e});var pn,BA=_(()=>{"use strict";JY();tX();OA();sX();PA();pn={node:ZY,circle:eX,ellipse:e5,polygon:aX,rect:md}});function dl(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var di,mn,t5=_(()=>{"use strict";rv();ic();gt();Xt();Qt();pr();di=s(async(t,e,r,n)=>{let i=le(),a,o=e.useHtmlLabels||hr(i.flowchart.htmlLabels);r?a=r:a="node default";let l=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=l.insert("g").attr("class","label").attr("style",e.labelStyle),h;e.labelText===void 0?h="":h=typeof e.labelText=="string"?e.labelText:e.labelText[0];let f=u.node(),d;e.labelType==="markdown"?d=vs(u,$r(Ys(h),i),{useHtmlLabels:o,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):d=f.appendChild(Hi($r(Ys(h),i),e.labelStyle,!1,n));let p=d.getBBox(),m=e.padding/2;if(hr(i.flowchart.htmlLabels)){let g=d.children[0],y=Me(d),v=g.getElementsByTagName("img");if(v){let x=h.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(b=>new Promise(k=>{function A(){if(b.style.display="flex",b.style.flexDirection="column",x){let w=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,C=parseInt(w,10)*5+"px";b.style.minWidth=C,b.style.maxWidth=C}else b.style.width="100%";k(b)}s(A,"setupImage"),setTimeout(()=>{b.complete&&A()}),b.addEventListener("error",A),b.addEventListener("load",A)})))}p=g.getBoundingClientRect(),y.attr("width",p.width),y.attr("height",p.height)}return o?u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):u.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:m,label:u}},"labelHelper"),mn=s((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");s(dl,"insertPolygonShape")});var T7e,oX,lX=_(()=>{"use strict";t5();it();gt();BA();T7e=s(async(t,e)=>{e.useHtmlLabels||le().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:n,bbox:i,halfPadding:a}=await di(t,e,"node "+e.classes,!0);V.info("Classes = ",e.classes);let o=n.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),mn(e,o),e.intersect=function(l){return pn.rect(e,l)},n},"note"),oX=T7e});function FA(t,e,r,n){let i=[],a=s(l=>{i.push(l,0)},"addBorder"),o=s(l=>{i.push(0,l)},"skipBorder");e.includes("t")?(V.debug("add top border"),a(r)):o(r),e.includes("r")?(V.debug("add right border"),a(n)):o(n),e.includes("b")?(V.debug("add bottom border"),a(r)):o(r),e.includes("l")?(V.debug("add left border"),a(n)):o(n),t.attr("stroke-dasharray",i.join(" "))}var cX,js,uX,E7e,C7e,S7e,_7e,A7e,L7e,D7e,R7e,M7e,I7e,N7e,O7e,P7e,B7e,F7e,z7e,$7e,G7e,V7e,hX,U7e,q7e,fX,Qp,Zp,dX,pX,nv,r5=_(()=>{"use strict";Xt();gt();Qt();it();SY();rv();BA();lX();t5();cX=s(t=>t?" "+t:"","formatClass"),js=s((t,e)=>`${e||"node default"}${cX(t.classes)} ${cX(t.class)}`,"getClassesFromNode"),uX=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=i+a,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}];V.info("Question main (Circle)");let u=dl(r,o,o,l);return u.attr("style",e.style),mn(e,u),e.intersect=function(h){return V.warn("Intersect called"),pn.polygon(e,l,h)},r},"question"),E7e=s((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(o){return o.x+","+o.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(o){return pn.circle(e,14,o)},r},"choice"),C7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=4,a=n.height+e.padding,o=a/i,l=n.width+2*o+e.padding,u=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-a/2},{x:l-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],h=dl(r,l,a,u);return h.attr("style",e.style),mn(e,h),e.intersect=function(f){return pn.polygon(e,u,f)},r},"hexagon"),S7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,void 0,!0),i=2,a=n.height+2*e.padding,o=a/i,l=n.width+2*o+e.padding,u=CY(e.directions,n,e),h=dl(r,l,a,u);return h.attr("style",e.style),mn(e,h),e.intersect=function(f){return pn.polygon(e,u,f)},r},"block_arrow"),_7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return dl(r,i,a,o).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(u){return pn.polygon(e,o,u)},r},"rect_left_inv_arrow"),A7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"lean_right"),L7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"lean_left"),D7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"trapezoid"),R7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"inv_trapezoid"),M7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"rect_right_inv_arrow"),I7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=i/2,o=a/(2.5+i/50),l=n.height+o+e.padding,u="M 0,"+o+" a "+a+","+o+" 0,0,0 "+i+" 0 a "+a+","+o+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+o+" 0,0,0 "+i+" 0 l 0,"+-l,h=r.attr("label-offset-y",o).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-i/2+","+-(l/2+o)+")");return mn(e,h),e.intersect=function(f){let d=pn.rect(e,f),p=d.x-e.x;if(a!=0&&(Math.abs(p)e.height/2-o)){let m=o*o*(1-p*p/(a*a));m!=0&&(m=Math.sqrt(m)),m=o-m,f.y-e.y>0&&(m=-m),d.y+=m}return d},r},"cylinder"),N7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,"node "+e.classes+" "+e.class,!0),a=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-o/2:-n.width/2-i,h=e.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",o).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(FA(a,e.props.borders,o,l),f.delete("borders")),f.forEach(d=>{V.warn(`Unknown node property ${d}`)})}return mn(e,a),e.intersect=function(f){return pn.rect(e,f)},r},"rect"),O7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,"node "+e.classes,!0),a=r.insert("rect",":first-child"),o=e.positioned?e.width:n.width+e.padding,l=e.positioned?e.height:n.height+e.padding,u=e.positioned?-o/2:-n.width/2-i,h=e.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",o).attr("height",l),e.props){let f=new Set(Object.keys(e.props));e.props.borders&&(FA(a,e.props.borders,o,l),f.delete("borders")),f.forEach(d=>{V.warn(`Unknown node property ${d}`)})}return mn(e,a),e.intersect=function(f){return pn.rect(e,f)},r},"composite"),P7e=s(async(t,e)=>{let{shapeSvg:r}=await di(t,e,"label",!0);V.trace("Classes = ",e.class);let n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){let o=new Set(Object.keys(e.props));e.props.borders&&(FA(n,e.props.borders,i,a),o.delete("borders")),o.forEach(l=>{V.warn(`Unknown node property ${l}`)})}return mn(e,n),e.intersect=function(o){return pn.rect(e,o)},r},"labelRect");s(FA,"applyNodePropertyBorders");B7e=s((t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,u="";typeof l=="object"?u=l[0]:u=l,V.info("Label text abc79",u,l,typeof l=="object");let h=o.node().appendChild(Hi(u,e.labelStyle,!0,!0)),f={width:0,height:0};if(hr(le().flowchart.htmlLabels)){let y=h.children[0],v=Me(h);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}V.info("Text 2",l);let d=l.slice(1,l.length),p=h.getBBox(),m=o.node().appendChild(Hi(d.join?d.join("
    "):d,e.labelStyle,!0,!0));if(hr(le().flowchart.htmlLabels)){let y=m.children[0],v=Me(m);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height)}let g=e.padding/2;return Me(m).attr("transform","translate( "+(f.width>p.width?0:(p.width-f.width)/2)+", "+(p.height+g+5)+")"),Me(h).attr("transform","translate( "+(f.width{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.height+e.padding,a=n.width+i/4+e.padding,o=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return mn(e,o),e.intersect=function(l){return pn.rect(e,l)},r},"stadium"),z7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,js(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),V.info("Circle main"),mn(e,a),e.intersect=function(o){return V.info("Circle intersect",e,n.width/2+i,o),pn.circle(e,n.width/2+i,o)},r},"circle"),$7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await di(t,e,js(e,void 0),!0),a=5,o=r.insert("g",":first-child"),l=o.insert("circle"),u=o.insert("circle");return o.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),V.info("DoubleCircle main"),mn(e,l),e.intersect=function(h){return V.info("DoubleCircle intersect",e,n.width/2+i+a,h),pn.circle(e,n.width/2+i+a,h)},r},"doublecircle"),G7e=s(async(t,e)=>{let{shapeSvg:r,bbox:n}=await di(t,e,js(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=dl(r,i,a,o);return l.attr("style",e.style),mn(e,l),e.intersect=function(u){return pn.polygon(e,o,u)},r},"subroutine"),V7e=s((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),mn(e,n),e.intersect=function(i){return pn.circle(e,7,i)},r},"start"),hX=s((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;r==="LR"&&(i=10,a=70);let o=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return mn(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(l){return pn.rect(e,l)},n},"forkJoin"),U7e=s((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),mn(e,i),e.intersect=function(a){return pn.circle(e,7,a)},r},"end"),q7e=s((t,e)=>{let r=e.padding/2,n=4,i=8,a;e.classes?a="node "+e.classes:a="node default";let o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=o.insert("rect",":first-child"),u=o.insert("line"),h=o.insert("line"),f=0,d=n,p=o.insert("g").attr("class","label"),m=0,g=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",v=p.node().appendChild(Hi(y,e.labelStyle,!0,!0)),x=v.getBBox();if(hr(le().flowchart.htmlLabels)){let E=v.children[0],S=Me(v);x=E.getBoundingClientRect(),S.attr("width",x.width),S.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+n,f+=x.width);let b=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(le().flowchart.htmlLabels?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");let k=p.node().appendChild(Hi(b,e.labelStyle,!0,!0));Me(k).attr("class","classTitle");let A=k.getBBox();if(hr(le().flowchart.htmlLabels)){let E=k.children[0],S=Me(k);A=E.getBoundingClientRect(),S.attr("width",A.width),S.attr("height",A.height)}d+=A.height+n,A.width>f&&(f=A.width);let w=[];e.classData.members.forEach(E=>{let S=E.getDisplayDetails(),R=S.displayText;le().flowchart.htmlLabels&&(R=R.replace(//g,">"));let D=p.node().appendChild(Hi(R,S.cssStyle?S.cssStyle:e.labelStyle,!0,!0)),L=D.getBBox();if(hr(le().flowchart.htmlLabels)){let P=D.children[0],M=Me(D);L=P.getBoundingClientRect(),M.attr("width",L.width),M.attr("height",L.height)}L.width>f&&(f=L.width),d+=L.height+n,w.push(D)}),d+=i;let T=[];if(e.classData.methods.forEach(E=>{let S=E.getDisplayDetails(),R=S.displayText;le().flowchart.htmlLabels&&(R=R.replace(//g,">"));let D=p.node().appendChild(Hi(R,S.cssStyle?S.cssStyle:e.labelStyle,!0,!0)),L=D.getBBox();if(hr(le().flowchart.htmlLabels)){let P=D.children[0],M=Me(D);L=P.getBoundingClientRect(),M.attr("width",L.width),M.attr("height",L.height)}L.width>f&&(f=L.width),d+=L.height+n,T.push(D)}),d+=i,g){let E=(f-x.width)/2;Me(v).attr("transform","translate( "+(-1*f/2+E)+", "+-1*d/2+")"),m=x.height+n}let C=(f-A.width)/2;return Me(k).attr("transform","translate( "+(-1*f/2+C)+", "+(-1*d/2+m)+")"),m+=A.height+n,u.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,w.forEach(E=>{Me(E).attr("transform","translate( "+-f/2+", "+(-1*d/2+m+i/2)+")");let S=E?.getBBox();m+=(S?.height??0)+n}),m+=i,h.attr("class","divider").attr("x1",-f/2-r).attr("x2",f/2+r).attr("y1",-d/2-r+i+m).attr("y2",-d/2-r+i+m),m+=i,T.forEach(E=>{Me(E).attr("transform","translate( "+-f/2+", "+(-1*d/2+m)+")");let S=E?.getBBox();m+=(S?.height??0)+n}),l.attr("style",e.style).attr("class","outer title-state").attr("x",-f/2-r).attr("y",-(d/2)-r).attr("width",f+e.padding).attr("height",d+e.padding),mn(e,l),e.intersect=function(E){return pn.rect(e,E)},o},"class_box"),fX={rhombus:uX,composite:O7e,question:uX,rect:N7e,labelRect:P7e,rectWithTitle:B7e,choice:E7e,circle:z7e,doublecircle:$7e,stadium:F7e,hexagon:C7e,block_arrow:S7e,rect_left_inv_arrow:_7e,lean_right:A7e,lean_left:L7e,trapezoid:D7e,inv_trapezoid:R7e,rect_right_inv_arrow:M7e,cylinder:I7e,start:V7e,end:U7e,note:oX,subroutine:G7e,fork:hX,join:hX,class_box:q7e},Qp={},Zp=s(async(t,e,r)=>{let n,i;if(e.link){let a;le().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await fX[e.shape](n,e,r)}else i=await fX[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),Qp[e.id]=n,e.haveCallback&&Qp[e.id].attr("class",Qp[e.id].attr("class")+" clickable"),n},"insertNode"),dX=s((t,e)=>{Qp[e.id]=t},"setNodeElem"),pX=s(()=>{Qp={}},"clear"),nv=s(t=>{let e=Qp[t.id];V.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});var n5,zA=_(()=>{"use strict";Xt();r5();n5=s((t,e)=>{let r;return e==="sandbox"&&(r=Me("#i"+t)),(e==="sandbox"?Me(r.nodes()[0].contentDocument.body):Me("body")).select(`[id="${t}"]`)},"getDiagramElement")});var Ks,gd=_(()=>{"use strict";Ks=s(({flowchart:t})=>{let e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});function $A(t,e,r){if(t&&t.length){let[n,i]=e,a=Math.PI/180*r,o=Math.cos(a),l=Math.sin(a);for(let u of t){let[h,f]=u;u[0]=(h-n)*o-(f-i)*l+n,u[1]=(h-n)*l+(f-i)*o+i}}}function W7e(t,e){return t[0]===e[0]&&t[1]===e[1]}function H7e(t,e,r,n=1){let i=r,a=Math.max(e,.1),o=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,l=[0,0];if(i)for(let h of o)$A(h,l,i);let u=function(h,f,d){let p=[];for(let b of h){let k=[...b];W7e(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}let m=[];f=Math.max(f,.1);let g=[];for(let b of p)for(let k=0;kb.ymink.ymin?1:b.xk.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let k=0;kv);k++)b=k;g.splice(0,b+1).forEach(k=>{y.push({s:v,edge:k})})}if(y=y.filter(b=>!(b.edge.ymax<=v)),y.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(d!==1||x%f==0)&&y.length>1)for(let b=0;b=y.length)break;let A=y[b].edge,w=y[k].edge;m.push([[Math.round(A.x),v],[Math.round(w.x),v]])}v+=d,y.forEach(b=>{b.edge.x=b.edge.x+d*b.edge.islope}),x++}return m}(o,a,n);if(i){for(let h of o)$A(h,l,-i);(function(h,f,d){let p=[];h.forEach(m=>p.push(...m)),$A(p,f,d)})(u,l,-i)}return u}function ov(t,e){var r;let n=e.hachureAngle+90,i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),H7e(t,i,n,a||1)}function f5(t){let e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}function VA(t,e){return t.type===e}function r9(t){let e=[],r=function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:Y7e,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:GA,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:mX,text:""},l}(t),n="BOD",i=0,a=r[i];for(;!VA(a,mX);){let o=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return r9("M0,0"+t);i++,o=i5[a.text],n=a.text}else VA(a,GA)?o=i5[n]:(i++,o=i5[a.text],n=a.text);if(!(i+of%2?h+r:h+e);a.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{let u=l.map((h,f)=>f%2?h+r:h+e);a.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function EX(t){let e=[],r="",n=0,i=0,a=0,o=0,l=0,u=0;for(let{key:h,data:f}of t){switch(h){case"M":e.push({key:"M",data:[...f]}),[n,i]=f,[a,o]=f;break;case"C":e.push({key:"C",data:[...f]}),n=f[4],i=f[5],l=f[2],u=f[3];break;case"L":e.push({key:"L",data:[...f]}),[n,i]=f;break;case"H":n=f[0],e.push({key:"L",data:[n,i]});break;case"V":i=f[0],e.push({key:"L",data:[n,i]});break;case"S":{let d=0,p=0;r==="C"||r==="S"?(d=n+(n-l),p=i+(i-u)):(d=n,p=i),e.push({key:"C",data:[d,p,...f]}),l=f[0],u=f[1],n=f[2],i=f[3];break}case"T":{let[d,p]=f,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=d+2*(m-d)/3,b=p+2*(g-p)/3;e.push({key:"C",data:[y,v,x,b,d,p]}),l=m,u=g,n=d,i=p;break}case"Q":{let[d,p,m,g]=f,y=n+2*(d-n)/3,v=i+2*(p-i)/3,x=m+2*(d-m)/3,b=g+2*(p-g)/3;e.push({key:"C",data:[y,v,x,b,m,g]}),l=d,u=p,n=m,i=g;break}case"A":{let d=Math.abs(f[0]),p=Math.abs(f[1]),m=f[2],g=f[3],y=f[4],v=f[5],x=f[6];d===0||p===0?(e.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(CX(n,i,v,x,d,p,m,g,y).forEach(function(b){e.push({key:"C",data:b})}),n=v,i=x);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=o}r=h}return e}function iv(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function CX(t,e,r,n,i,a,o,l,u,h){let f=(d=o,Math.PI*d/180);var d;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[t,e]=iv(t,e,-f),[r,n]=iv(r,n,-f);let P=(t-r)/2,M=(e-n)/2,F=P*P/(i*i)+M*M/(a*a);F>1&&(F=Math.sqrt(F),i*=F,a*=F);let I=i*i,O=a*a,z=I*O-I*M*M-O*P*P,N=I*M*M+O*P*P,U=(l===u?-1:1)*Math.sqrt(Math.abs(z/N));y=U*i*M/a+(t+r)/2,v=U*-a*P/i+(e+n)/2,m=Math.asin(parseFloat(((e-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),tg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let P=g,M=r,F=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=CX(r=y+i*Math.cos(g),n=v+a*Math.sin(g),M,F,i,a,o,0,u,[g,P,y,v])}x=g-m;let b=Math.cos(m),k=Math.sin(m),A=Math.cos(g),w=Math.sin(g),T=Math.tan(x/4),C=4/3*i*T,E=4/3*a*T,S=[t,e],R=[t+C*k,e-E*b],D=[r+C*w,n-E*A],L=[r,n];if(R[0]=2*S[0]-R[0],R[1]=2*S[1]-R[1],h)return[R,D,L].concat(p);{p=[R,D,L].concat(p);let P=[];for(let M=0;M2){let i=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=kX(v,h,f,d,p,m,g,1,u);if(!u.disableMultiStroke){let b=kX(v,h,f,d,p,m,g,1.5,u);x.push(...b)}return o&&(l?x.push(...Ph(h,f,h+d*Math.cos(m),f+p*Math.sin(m),u),...Ph(h,f,h+d*Math.cos(g),f+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,f]},{op:"lineTo",data:[h+d*Math.cos(m),f+p*Math.sin(m)]})),{type:"path",ops:x}}function vX(t,e){let r=EX(TX(r9(t))),n=[],i=[0,0],a=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...Ph(a[0],a[1],l[0],l[1],e)),a=[l[0],l[1]];break;case"C":{let[u,h,f,d,p,m]=l;n.push(...K7e(u,h,f,d,p,m,a,e)),a=[p,m];break}case"Z":n.push(...Ph(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function UA(t,e){let r=[];for(let n of t)if(n.length){let i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+Ot(i,e),n[0][1]+Ot(i,e)]});for(let o=1;o500?.4:-.0016668*u+1.233334;let f=i.maxRandomnessOffset||0;f*f*100>l&&(f=u/10);let d=f/2,p=.2+.2*AX(i),m=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;m=Ot(m,i,h),g=Ot(g,i,h);let y=[],v=s(()=>Ot(d,i,h),"M"),x=s(()=>Ot(f,i,h),"k"),b=i.preserveVertices;return a&&(o?y.push({op:"move",data:[t+(b?0:v()),e+(b?0:v())]}):y.push({op:"move",data:[t+(b?0:Ot(f,i,h)),e+(b?0:Ot(f,i,h))]})),o?y.push({op:"bcurveTo",data:[m+t+(r-t)*p+v(),g+e+(n-e)*p+v(),m+t+2*(r-t)*p+v(),g+e+2*(n-e)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+t+(r-t)*p+x(),g+e+(n-e)*p+x(),m+t+2*(r-t)*p+x(),g+e+2*(n-e)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function a5(t,e,r){if(!t.length)return[];let n=[];n.push([t[0][0]+Ot(e,r),t[0][1]+Ot(e,r)]),n.push([t[0][0]+Ot(e,r),t[0][1]+Ot(e,r)]);for(let i=1;i3){let a=[],o=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let l=1;l+21&&i.push(l)):i.push(l),i.push(t[e+3])}else{let u=t[e+0],h=t[e+1],f=t[e+2],d=t[e+3],p=yd(u,h,.5),m=yd(h,f,.5),g=yd(f,d,.5),y=yd(p,m,.5),v=yd(m,g,.5),x=yd(y,v,.5);JA([u,p,y,x],0,r,i),JA([x,v,g,d],0,r,i)}var a,o;return i}function Z7e(t,e){return h5(t,0,t.length,e)}function h5(t,e,r,n,i){let a=i||[],o=t[e],l=t[r-1],u=0,h=1;for(let f=e+1;fu&&(u=d,h=f)}return Math.sqrt(u)>n?(h5(t,e,h+1,n,a),h5(t,h,r,n,a)):(a.length||a.push(o),a.push(l)),a}function qA(t,e=.15,r){let n=[],i=(t.length-1)/3;for(let a=0;a0?h5(n,0,n.length,r):n}var sv,WA,HA,YA,XA,jA,xs,KA,Y7e,GA,mX,i5,X7e,Qs,em,e9,s5,t9,Ht,Yn=_(()=>{"use strict";s($A,"t");s(W7e,"e");s(H7e,"s");s(ov,"n");sv=class{static{s(this,"o")}constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){let n=ov(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){let n=[];for(let i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};s(f5,"a");WA=class extends sv{static{s(this,"h")}fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=ov(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,o=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,f]of i)f5([h,f])&&o.push([[h[0]-l,h[1]+u],[...f]],[[h[0]+l,h[1]-u],[...f]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},HA=class extends sv{static{s(this,"r")}fillPolygons(e,r){let n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}},YA=class{static{s(this,"i")}constructor(e){this.helper=e}fillPolygons(e,r){let n=ov(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let o=i/4;for(let l of e){let u=f5(l),h=u/i,f=Math.ceil(h)-1,d=u-f*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=f5(o),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,f=o[0],d=o[1];f[0]>d[0]&&(f=o[1],d=o[0]);let p=Math.atan((d[1]-f[1])/(d[0]-f[0]));for(let m=0;m{let o=f5(a),l=Math.round(o/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d2*Math.PI&&(C=0,E=2*Math.PI);let S=(E-C)/b.curveStepCount,R=[];for(let D=C;D<=E;D+=S)R.push([k+w*Math.cos(D),A+T*Math.sin(D)]);return R.push([k+w*Math.cos(E),A+T*Math.sin(E)]),R.push([k,A]),Jp([R],b)}(e,r,n,i,a,o,h));return h.stroke!==Qs&&f.push(d),this._d("arc",f,h)}curve(e,r){let n=this._o(r),i=[],a=gX(e,n);if(n.fill&&n.fill!==Qs)if(n.fillStyle==="solid"){let o=gX(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=e;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...qA(wX([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):o.push(...qA(wX(h),10,(1+n.roughness)/2))}o.length&&i.push(Jp([o],n))}return n.stroke!==Qs&&i.push(a),this._d("curve",i,n)}polygon(e,r){let n=this._o(r),i=[],a=o5(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(UA([e],n)):i.push(Jp([e],n))),n.stroke!==Qs&&i.push(a),this._d("polygon",i,n)}path(e,r){let n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==Qs,o=n.stroke!==Qs,l=!!(n.simplification&&n.simplification<1),u=function(f,d,p){let m=EX(TX(r9(f))),g=[],y=[],v=[0,0],x=[],b=s(()=>{x.length>=4&&y.push(...qA(x,d)),x=[]},"i"),k=s(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:w,data:T}of m)switch(w){case"M":k(),v=[T[0],T[1]],y.push(v);break;case"L":b(),y.push([T[0],T[1]]);break;case"C":if(!x.length){let C=y.length?y[y.length-1]:v;x.push([C[0],C[1]])}x.push([T[0],T[1]]),x.push([T[2],T[3]]),x.push([T[4],T[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(k(),!p)return g;let A=[];for(let w of g){let T=Z7e(w,p);T.length&&A.push(T)}return A}(e,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=vX(e,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let f=vX(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else i.push(UA(u,n));else i.push(Jp(u,n));return o&&(l?u.forEach(f=>{i.push(o5(f,!1,n))}):i.push(h)),this._d("path",i,n)}opsToPath(e,r){let n="";for(let i of e.ops){let a=typeof r=="number"&&r>=0?i.data.map(o=>+o.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){let r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(let a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Qs};break;case"fillPath":o={d:this.opsToPath(a),stroke:Qs,strokeWidth:0,fill:n.fill||Qs};break;case"fillSketch":o=this.fillSketch(a,n)}o&&i.push(o)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||Qs,strokeWidth:n,fill:Qs}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}},e9=class{static{s(this,"st")}constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new em(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,o,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,a,l),i.restore();break}case"fillSketch":this.fillSketch(i,o,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(let a of r.ops){let o=typeof n=="number"&&n>=0?a.data.map(l=>+l.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(o[0],o[1]);break;case"bcurveTo":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":e.lineTo(o[0],o[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){let o=this.gen.line(e,r,n,i,a);return this.draw(o),o}rectangle(e,r,n,i,a){let o=this.gen.rectangle(e,r,n,i,a);return this.draw(o),o}ellipse(e,r,n,i,a){let o=this.gen.ellipse(e,r,n,i,a);return this.draw(o),o}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,o,l=!1,u){let h=this.gen.arc(e,r,n,i,a,o,l,u);return this.draw(h),h}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){let n=this.gen.path(e,r);return this.draw(n),n}},s5="http://www.w3.org/2000/svg",t9=class{static{s(this,"ot")}constructor(e,r){this.svg=e,this.gen=new em(r)}draw(e){let r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(s5,"g"),o=e.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(s5,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(s5,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&a.appendChild(u)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=e.createElementNS(s5,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){let o=this.gen.line(e,r,n,i,a);return this.draw(o)}rectangle(e,r,n,i,a){let o=this.gen.rectangle(e,r,n,i,a);return this.draw(o)}ellipse(e,r,n,i,a){let o=this.gen.ellipse(e,r,n,i,a);return this.draw(o)}circle(e,r,n,i){let a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){let n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){let n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,o,l=!1,u){let h=this.gen.arc(e,r,n,i,a,o,l,u);return this.draw(h)}curve(e,r){let n=this.gen.curve(e,r);return this.draw(n)}path(e,r){let n=this.gen.path(e,r);return this.draw(n)}},Ht={canvas:s((t,e)=>new e9(t,e),"canvas"),svg:s((t,e)=>new t9(t,e),"svg"),generator:s(t=>new em(t),"generator"),newSeed:s(()=>em.newSeed(),"newSeed")}});var J7e,vd,n9=_(()=>{"use strict";J7e=s((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,l=t.height/2,u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*a/i),{x:r+u,y:n+h}},"intersectRect"),vd=J7e});function eEe(t,e){e&&t.attr("style",e)}async function tEe(t){let e=Me(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&Ei(t.label)&&(n=await hh(t.label.replace($e.lineBreakRegex,` +`),le()));let i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),eEe(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var rEe,ac,d5=_(()=>{"use strict";Xt();it();gt();Qt();pr();s(eEe,"applyStyle");s(tEe,"addHtmlLabel");rEe=s(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),hr(le().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),V.info("vertexText"+i);let a={isNode:n,label:Ys(i).replace(/fa[blrs]?:fa-[\w-]+/g,l=>``),labelStyle:e&&e.replace("fill:","color:")};return await tEe(a)}else{let a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let o=[];typeof i=="string"?o=i.split(/\\n|\n|/gi):Array.isArray(i)?o=i:o=[];for(let l of o){let u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),r?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=l.trim(),a.appendChild(u)}return a}},"createLabel"),ac=rEe});var xu,lv=_(()=>{"use strict";xu=s((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});var bu,LX,nEe,Dr,Rr,pi=_(()=>{"use strict";gt();bu=s(t=>{let{handDrawnSeed:e}=le();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),LX=s(t=>{let e=nEe([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),nEe=s(t=>{let e=new Map;return t.forEach(r=>{let[n,i]=r.split(":");e.set(n.trim(),i?.trim())}),e},"styles2Map"),Dr=s(t=>{let{stylesArray:e}=LX(t),r=[],n=[],i=[],a=[];return e.forEach(o=>{let l=o[0];l==="color"||l==="font-size"||l==="font-family"||l==="font-weight"||l==="font-style"||l==="text-decoration"||l==="text-align"||l==="text-transform"||l==="line-height"||l==="letter-spacing"||l==="word-spacing"||l==="text-shadow"||l==="text-overflow"||l==="white-space"||l==="word-wrap"||l==="word-break"||l==="overflow-wrap"||l==="hyphens"?r.push(o.join(":")+" !important"):(n.push(o.join(":")+" !important"),l.includes("stroke")&&i.push(o.join(":")+" !important"),l==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),Rr=s((t,e)=>{let{themeVariables:r,handDrawnSeed:n}=le(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:o}=LX(t);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,stroke:o.get("stroke")||i,seed:n,strokeWidth:1.3},e)},"userNodeOverrides")});var DX,iEe,aEe,sEe,oEe,lEe,RX,p5,MX,i9=_(()=>{"use strict";gt();Qt();it();gd();Xt();Yn();ic();n9();d5();lv();pi();DX=s(async(t,e)=>{V.info("Creating subgraph rect for ",e.id,e);let r=le(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:f}=Dr(e),d=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),p=hr(r.flowchart.htmlLabels),m=d.insert("g").attr("class","cluster-label "),g=await vs(m,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0}),y=g.getBBox();if(hr(r.flowchart.htmlLabels)){let C=g.children[0],E=Me(g);y=C.getBoundingClientRect(),E.attr("width",y.width),E.attr("height",y.height)}let v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let x=e.height,b=e.x-v/2,k=e.y-x/2;V.trace("Data ",e,JSON.stringify(e));let A;if(e.look==="handDrawn"){let C=Ht.svg(d),E=Rr(e,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),S=C.path(xu(b,k,v,x,0),E);A=d.insert(()=>(V.debug("Rough node insert CXC",S),S),":first-child"),A.select("path:nth-child(2)").attr("style",h.join(";")),A.select("path").attr("style",f.join(";").replace("fill","stroke"))}else A=d.insert("rect",":first-child"),A.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",k).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:w}=Ks(r);if(m.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+w})`),l){let C=m.select("span");C&&C.attr("style",l)}let T=A.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=y.height-e.padding/2,e.intersect=function(C){return vd(e,C)},{cluster:d,labelBBox:y}},"rect"),iEe=s((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(l){return vd(e,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),aEe=s(async(t,e)=>{let r=le(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=h.insert("g",":first-child"),d=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=d.node().appendChild(await ac(e.label,e.labelStyle,void 0,!0)),g=m.getBBox();if(hr(r.flowchart.htmlLabels)){let S=m.children[0],R=Me(m);g=S.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}let y=0*e.padding,v=y/2,x=(e.width<=g.width+e.padding?g.width+e.padding:e.width)+y;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+y,k=e.height+y-g.height-6,A=e.x-x/2,w=e.y-b/2;e.width=x;let T=e.y-e.height/2-v+g.height+2,C;if(e.look==="handDrawn"){let S=e.cssClasses.includes("statediagram-cluster-alt"),R=Ht.svg(h),D=e.rx||e.ry?R.path(xu(A,w,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):R.rectangle(A,w,x,b,{seed:i});C=h.insert(()=>D,":first-child");let L=R.rectangle(A,T,x,k,{fill:S?a:o,fillStyle:S?"hachure":"solid",stroke:u,seed:i});C=h.insert(()=>D,":first-child"),p=h.insert(()=>L)}else C=f.insert("rect",":first-child"),C.attr("class","outer").attr("x",A).attr("y",w).attr("width",x).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",A).attr("y",T).attr("width",x).attr("height",k);d.attr("transform",`translate(${e.x-g.width/2}, ${w+1-(hr(r.flowchart.htmlLabels)?0:3)})`);let E=C.node().getBBox();return e.height=E.height,e.offsetX=0,e.offsetY=g.height-e.padding/2,e.labelBBox=g,e.intersect=function(S){return vd(e,S)},{cluster:h,labelBBox:g}},"roundedWithTitle"),sEe=s((t,e)=>{let r=le(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;let f=e.height+u,d=e.x-h/2,p=e.y-f/2;e.width=h;let m;if(e.look==="handDrawn"){let v=Ht.svg(o).rectangle(d,p,h,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=o.insert(()=>v,":first-child")}else m=l.insert("rect",":first-child"),m.attr("class","divider").attr("x",d).attr("y",p).attr("width",h).attr("height",f).attr("data-look",e.look);let g=m.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return vd(e,y)},{cluster:o,labelBBox:{}}},"divider"),oEe=DX,lEe={rect:DX,squareRect:oEe,roundedWithTitle:aEe,noteGroup:iEe,divider:sEe},RX=new Map,p5=s(async(t,e)=>{let r=e.shape||"rect",n=await lEe[r](t,e);return RX.set(e.id,n),n},"insertCluster"),MX=s(()=>{RX=new Map},"clear")});function m5(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=g5(t),e=g5(e);let[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],o=i-r,l=a-n;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var Bh,g5,y5,a9=_(()=>{"use strict";Bh={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};s(m5,"calculateDeltaAndAngle");g5=s(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),y5=s(t=>({x:s(function(e,r,n){let i=0;if(r===0&&Object.hasOwn(Bh,t.arrowTypeStart)){let{angle:a,deltaX:o}=m5(n[0],n[1]);i=Bh[t.arrowTypeStart]*Math.cos(a)*(o>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Bh,t.arrowTypeEnd)){let{angle:a,deltaX:o}=m5(n[n.length-1],n[n.length-2]);i=Bh[t.arrowTypeEnd]*Math.cos(a)*(o>=0?1:-1)}return g5(e).x+i},"x"),y:s(function(e,r,n){let i=0;if(r===0&&Object.hasOwn(Bh,t.arrowTypeStart)){let{angle:a,deltaY:o}=m5(n[0],n[1]);i=Bh[t.arrowTypeStart]*Math.abs(Math.sin(a))*(o>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Bh,t.arrowTypeEnd)){let{angle:a,deltaY:o}=m5(n[n.length-1],n[n.length-2]);i=Bh[t.arrowTypeEnd]*Math.abs(Math.sin(a))*(o>=0?1:-1)}return g5(e).y+i},"y")}),"getLineFunctionsWithOffset")});var NX,cEe,IX,OX=_(()=>{"use strict";it();NX=s((t,e,r,n,i)=>{e.arrowTypeStart&&IX(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&IX(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),cEe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},IX=s((t,e,r,n,i,a)=>{let o=cEe[r];if(!o){V.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${l})`)},"addEdgeMarker")});function v5(t,e){le().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}function fEe(t){let e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}var x5,ia,FX,cv,b5,k5,uEe,hEe,PX,BX,dEe,w5,s9=_(()=>{"use strict";gt();Qt();it();ic();pr();a9();gd();Xt();Yn();d5();OX();x5=new Map,ia=new Map,FX=s(()=>{x5.clear(),ia.clear()},"clear"),cv=s(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),b5=s(async(t,e)=>{let r=hr(le().flowchart.htmlLabels),n=await vs(t,e.label,{style:cv(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});V.info("abc82",e,e.labelType);let i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let o=n.getBBox();if(r){let u=n.children[0],h=Me(n);o=u.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),x5.set(e.id,i),e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){let u=await ac(e.startLabelLeft,cv(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).startLeft=h,v5(l,e.startLabelLeft)}if(e.startLabelRight){let u=await ac(e.startLabelRight,cv(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=h.node().appendChild(u),f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).startRight=h,v5(l,e.startLabelRight)}if(e.endLabelLeft){let u=await ac(e.endLabelLeft,cv(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).endLeft=h,v5(l,e.endLabelLeft)}if(e.endLabelRight){let u=await ac(e.endLabelRight,cv(e.labelStyle)),h=t.insert("g").attr("class","edgeTerminals"),f=h.insert("g").attr("class","inner");l=f.node().appendChild(u);let d=u.getBBox();f.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.node().appendChild(u),ia.get(e.id)||ia.set(e.id,{}),ia.get(e.id).endRight=h,v5(l,e.endLabelRight)}return n},"insertEdgeLabel");s(v5,"setTerminalWidth");k5=s((t,e)=>{V.debug("Moving label abc88 ",t.id,t.label,x5.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=le(),{subGraphTitleTotalMargin:i}=Ks(n);if(t.label){let a=x5.get(t.id),o=t.x,l=t.y;if(r){let u=dt.calcLabelPosition(r);V.debug("Moving label "+t.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(t.startLabelLeft){let a=ia.get(t.id).startLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.startLabelRight){let a=ia.get(t.id).startRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelLeft){let a=ia.get(t.id).endLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelRight){let a=ia.get(t.id).endRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),uEe=s((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,l=t.height/2;return i>=o||a>=l},"outsideNode"),hEe=s((t,e,r)=>{V.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(e)} + insidePoint : ${JSON.stringify(r)} + node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),o=t.width/2,l=r.xMath.abs(n-e.x)*u){let d=r.y{V.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(V.info("abc88 checking point",a,e),!uEe(e,a)&&!i){let o=hEe(e,n,a);V.debug("abc88 inside",a,n,o),V.debug("abc88 intersection",o,e);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?V.warn("abc88 no intersect",o,r):r.push(o),i=!0}else V.warn("abc88 outside",a,n),n=a,i||r.push(a)}),V.debug("returning points",r),r},"cutPathAtIntersect");s(fEe,"extractCornerPoints");BX=s(function(t,e,r){let n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:e.x-o*n,y:e.y-o*i}},"findAdjacentPoint"),dEe=s(function(t){let{cornerPointPositions:e}=fEe(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){V.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+d:l.x+m-d,y:f<0?l.y-d:l.y+d}:p={x:h<0?l.x-d:l.x+d,y:f<0?l.y-m+d:l.y+m-d}}else V.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(t[n]);return r},"fixCorners"),w5=s(function(t,e,r,n,i,a,o){let{handDrawnSeed:l}=le(),u=e.points,h=!1,f=i;var d=a;d.intersect&&f.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(f.intersect(u[0])),V.debug("Last point APA12",e.start,"-->",e.end,u[u.length-1],d,d.intersect(u[u.length-1])),u.push(d.intersect(u[u.length-1]))),e.toCluster&&(V.info("to cluster abc88",r.get(e.toCluster)),u=PX(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(V.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=PX(u.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let p=u.filter(E=>!Number.isNaN(E.y));p=dEe(p);let m=p[p.length-1];if(p.length>1){m=p[p.length-1];let E=p[p.length-2],S=(m.x-E.x)/2,R=(m.y-E.y)/2,D={x:E.x+S,y:E.y+R};p.splice(-1,0,D)}let g=hs;e.curve&&(g=e.curve);let{x:y,y:v}=y5(e),x=ra().x(y).y(v).curve(g),b;switch(e.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-invisible";break;default:b="edge-thickness-normal"}switch(e.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break;default:b+=" edge-pattern-solid"}let k,A=x(p),w=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){let E=Ht.svg(t);Object.assign([],p);let S=E.path(A,{roughness:.3,seed:l});b+=" transition",k=Me(S).select("path").attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((D,L)=>D+";"+L,""):"");let R=k.attr("d");k.attr("d",R),t.node().appendChild(k.node())}else k=t.append("path").attr("d",A).attr("id",e.id).attr("class"," "+b+(e.classes?" "+e.classes:"")).attr("style",w?w.reduce((E,S)=>E+";"+S,""):"");let T="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),V.info("arrowTypeStart",e.arrowTypeStart),V.info("arrowTypeEnd",e.arrowTypeEnd),NX(k,e,T,o,n);let C={};return h&&(C.updatedPath=u),C.originalPath=e.points,C},"insertEdge")});var pEe,mEe,gEe,yEe,vEe,xEe,bEe,kEe,wEe,TEe,EEe,T5,o9=_(()=>{"use strict";it();pEe=s((t,e,r,n)=>{e.forEach(i=>{EEe[i](t,r,n)})},"insertMarkers"),mEe=s((t,e,r)=>{V.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),gEe=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),yEe=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),vEe=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),xEe=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),bEe=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),kEe=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),wEe=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),TEe=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),EEe={extension:mEe,composition:gEe,aggregation:yEe,dependency:vEe,lollipop:xEe,point:bEe,circle:kEe,cross:wEe,barb:TEe},T5=pEe});var Mr,er,gn,Xn=_(()=>{"use strict";ic();gt();Xt();Qt();pr();Mr=s(async(t,e,r)=>{let n,i=e.useHtmlLabels||hr(le().flowchart.htmlLabels);r?n=r:n="node default";let a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),l;e.label===void 0?l="":l=typeof e.label=="string"?e.label:e.label[0];let u;u=await vs(o,$r(Ys(l),le()),{useHtmlLabels:i,width:e.width||le().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle});let h=u.getBBox(),f=e.padding/2;if(hr(le().flowchart.htmlLabels)){let d=u.children[0],p=Me(u),m=d.getElementsByTagName("img");if(m){let g=l.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(v=>{function x(){if(y.style.display="flex",y.style.flexDirection="column",g){let b=le().fontSize?le().fontSize:window.getComputedStyle(document.body).fontSize,A=parseInt(b,10)*5+"px";y.style.minWidth=A,y.style.maxWidth=A}else y.style.width="100%";v(y)}s(x,"setupImage"),setTimeout(()=>{y.complete&&x()}),y.addEventListener("error",x),y.addEventListener("load",x)})))}h=d.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}return i?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:h,halfPadding:f,label:o}},"labelHelper"),er=s((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),gn=s((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses")});function CEe(t,e){return t.intersect(e)}var zX,$X=_(()=>{"use strict";s(CEe,"intersectNode");zX=CEe});function SEe(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,l=a-n.y,u=Math.sqrt(e*e*l*l+r*r*o*o),h=Math.abs(e*r*o/u);n.x{"use strict";s(SEe,"intersectEllipse");E5=SEe});function _Ee(t,e,r){return E5(t,e,e,r)}var GX,VX=_(()=>{"use strict";l9();s(_Ee,"intersectCircle");GX=_Ee});function AEe(t,e,r,n){var i,a,o,l,u,h,f,d,p,m,g,y,v,x,b;if(i=e.y-t.y,o=t.x-e.x,u=e.x*t.y-t.x*e.y,p=i*r.x+o*r.y+u,m=i*n.x+o*n.y+u,!(p!==0&&m!==0&&UX(p,m))&&(a=n.y-r.y,l=r.x-n.x,h=n.x*r.y-r.x*n.y,f=a*t.x+l*t.y+h,d=a*e.x+l*e.y+h,!(f!==0&&d!==0&&UX(f,d))&&(g=i*l-a*o,g!==0)))return y=Math.abs(g/2),v=o*h-l*u,x=v<0?(v-y)/g:(v+y)/g,v=a*u-i*h,b=v<0?(v-y)/g:(v+y)/g,{x,y:b}}function UX(t,e){return t*e>0}var qX,WX=_(()=>{"use strict";s(AEe,"intersectLine");s(UX,"sameSign");qX=AEe});function LEe(t,e,r){let n=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(f){o=Math.min(o,f.x),l=Math.min(l,f.y)}):(o=Math.min(o,e.x),l=Math.min(l,e.y));let u=n-t.width/2-o,h=i-t.height/2-l;for(let f=0;f1&&a.sort(function(f,d){let p=f.x-r.x,m=f.y-r.y,g=Math.sqrt(p*p+m*m),y=d.x-r.x,v=d.y-r.y,x=Math.sqrt(y*y+v*v);return g{"use strict";WX();s(LEe,"intersectPolygon");HX=LEe});var tr,ii=_(()=>{"use strict";$X();VX();l9();YX();n9();tr={node:zX,circle:GX,ellipse:E5,polygon:HX,rect:vd}});var xd,uv=_(()=>{"use strict";Xn();ii();lv();pi();Yn();xd=s(async(t,e,r)=>{let{labelStyles:n,nodeStyles:i}=Dr(e);e.labelStyle=n;let{shapeSvg:a,bbox:o}=await Mr(t,e,gn(e)),l=Math.max(o.width+r.labelPaddingX*2,e?.width||0),u=Math.max(o.height+r.labelPaddingY*2,e?.height||0),h=-l/2,f=-u/2,d,{rx:p,ry:m}=e,{cssStyles:g}=e;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),e.look==="handDrawn"){let y=Ht.svg(a),v=Rr(e,{}),x=p||m?y.path(xu(h,f,l,u,p||0),v):y.rectangle(h,f,l,u,v);d=a.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",g)}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",i).attr("rx",p).attr("data-id","abc").attr("data-et","node").attr("ry",m).attr("x",h).attr("y",f).attr("width",l).attr("height",u);return er(e,d),e.intersect=function(y){return tr.rect(e,y)},a},"drawRect")});var XX,jX=_(()=>{"use strict";uv();XX=s(async(t,e)=>xd(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state")});var KX,QX=_(()=>{"use strict";uv();KX=s(async(t,e)=>{let r={rx:5,ry:5,classes:"",labelPaddingX:(e?.padding||0)*1,labelPaddingY:(e?.padding||0)*1};return xd(t,e,r)},"roundedRect")});var ZX,JX=_(()=>{"use strict";uv();ZX=s(async(t,e)=>{let r={rx:0,ry:0,classes:"",labelPaddingX:(e?.padding||0)*2,labelPaddingY:(e?.padding||0)*1};return xd(t,e,r)},"squareRect")});var ej,tj=_(()=>{"use strict";Xn();ii();Yn();pi();gt();ej=s((t,e)=>{let{themeVariables:r}=le(),{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if(e.look==="handDrawn"){let l=Ht.svg(i).circle(0,0,14,bu(n));a=i.insert(()=>l)}else a=i.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),er(e,a),e.intersect=function(o){return tr.circle(e,7,o)},i},"stateStart")});var rj,nj=_(()=>{"use strict";Xn();ii();Yn();pi();gt();rj=s((t,e)=>{let{themeVariables:r}=le(),{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a,o;if(e.look==="handDrawn"){let l=Ht.svg(i),u=l.circle(0,0,14,{...bu(n),roughness:.5}),h=l.circle(0,0,5,{...bu(n),fillStyle:"solid"});a=i.insert(()=>u),o=i.insert(()=>h)}else o=i.insert("circle",":first-child"),a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),o.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return er(e,a),e.intersect=function(l){return tr.circle(e,7,l)},i},"stateEnd")});var c9,ij=_(()=>{"use strict";Xn();ii();Yn();pi();gt();c9=s((t,e,r)=>{let{themeVariables:n}=le(),{lineColor:i}=n,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=70,l=10;r==="LR"&&(o=10,l=70);let u=-1*o/2,h=-1*l/2,f;if(e.look==="handDrawn"){let y=Ht.svg(a).rectangle(u,h,o,l,bu(i));f=a.insert(()=>y)}else f=a.append("rect").attr("x",u).attr("y",h).attr("width",o).attr("height",l).attr("class","fork-join");er(e,f);let d=0,p=0,m=10;return e.height&&(d=e.height),e.width&&(p=e.width),e.padding&&(m=e.padding),e.height=d+m/2,e.width=p+m/2,e.intersect=function(g){return tr.rect(e,g)},a},"forkJoin")});var aj,sj=_(()=>{"use strict";ii();Yn();pi();gt();aj=s((t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{themeVariables:i}=le(),{lineColor:a}=i,o=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),l=28,u=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}],h;if(e.look==="handDrawn"){let f=Ht.svg(o),d=u.map(function(m){return[m.x,m.y]}),p=f.polygon(d,bu(a));h=o.insert(()=>p)}else h=o.insert("polygon",":first-child").attr("points",u.map(function(f){return f.x+","+f.y}).join(" "));return h.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",n),e.width=28,e.height=28,e.intersect=function(f){return tr.circle(e,14,f)},o},"choice")});var oj,lj=_(()=>{"use strict";it();Xn();ii();gt();Yn();oj=s(async(t,e)=>{let{themeVariables:r,handDrawnSeed:n}=le(),{noteBorderColor:i,noteBkgColor:a}=r;e.useHtmlLabels||(e.centerLabel=!0);let{shapeSvg:l,bbox:u}=await Mr(t,e,"node "+e.cssClasses);V.info("Classes = ",e.cssClasses);let{cssStyles:h}=e,f,d=u.width+e.padding,p=u.height+e.padding,m=-d/2,g=-p/2;if(e.look==="handDrawn"){let v=Ht.svg(l).rectangle(m,g,d,p,{roughness:.7,fill:a,fillWeight:3,seed:n,stroke:i});f=l.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",h)}else f=l.insert("rect",":first-child"),f.attr("rx",e.rx).attr("ry",e.ry).attr("x",m).attr("y",g).attr("width",d).attr("height",p);return er(e,f),e.intersect=function(y){return tr.rect(e,y)},l},"note")});var cj,uj=_(()=>{"use strict";Xn();ii();pi();Yn();lv();cj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.height+e.padding,l=a.width+o/4+e.padding,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Ht.svg(i),d=Rr(e,{}),p=xu(-l/2,-o/2,l,o,o/2),m=f.path(p,d);u=i.insert(()=>m,":first-child"),u.attr("class","basic label-container").attr("style",h)}else u=i.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",o/2).attr("ry",o/2).attr("x",-l/2).attr("y",-o/2).attr("width",l).attr("height",o);return er(e,u),e.intersect=function(f){return tr.rect(e,f)},i},"stadium")});var hj,fj=_(()=>{"use strict";Xt();Qt();Xn();d5();ii();pi();Yn();gt();lv();it();hj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";let a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,f=l.node().appendChild(await ac(h,e.labelStyle,!0,!0)),d={width:0,height:0};if(hr(le()?.flowchart?.htmlLabels)){let E=f.children[0],S=Me(f);d=E.getBoundingClientRect(),S.attr("width",d.width),S.attr("height",d.height)}V.info("Text 2",u);let p=u||[],m=f.getBBox(),g=l.node().appendChild(await ac(p.join?p.join("
    "):p,e.labelStyle,!0,!0)),y=g.children[0],v=Me(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height);let x=(e.padding||0)/2;Me(g).attr("transform","translate( "+(d.width>m.width?0:(m.width-d.width)/2)+", "+(m.height+x+5)+")"),Me(f).attr("transform","translate( "+(d.width(V.debug("Rough node insert CXC",R),D),":first-child"),T=a.insert(()=>(V.debug("Rough node insert CXC",R),R),":first-child")}else T=o.insert("rect",":first-child"),C=o.insert("line"),T.attr("class","outer title-state").attr("style",n).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(e.padding||0)).attr("height",d.height+(e.padding||0)),C.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+m.height+x).attr("y2",-d.height/2-x+m.height+x);return er(e,T),e.intersect=function(E){return tr.rect(e,E)},a},"rectWithTitle")});function Ea(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var ku=_(()=>{"use strict";s(Ea,"insertPolygonShape")});var dj,pj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();dj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=(e?.padding||0)/2,l=a.width+e.padding,u=a.height+e.padding,h=-a.width/2-o,f=-a.height/2-o,d=[{x:0,y:0},{x:l,y:0},{x:l,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(e.look==="handDrawn"){let p=Ht.svg(i),m=Rr(e,{}),g=p.rectangle(h-8,f,l+16,u,m),y=p.line(h,f,h,f+u,m),v=p.line(h+l,f,h+l,f+u,m);i.insert(()=>y,":first-child"),i.insert(()=>v,":first-child");let x=i.insert(()=>g,":first-child"),{cssStyles:b}=e;x.attr("class","basic label-container").attr("style",b),er(e,x)}else{let p=Ea(i,l,u,d);n&&p.attr("style",n),er(e,p)}return e.intersect=function(p){return tr.polygon(e,d,p)},i},"subroutine")});var DEe,REe,MEe,mj,gj=_(()=>{"use strict";Xn();ii();pi();Yn();DEe=s((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),REe=s((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),MEe=s((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=o/2,u=l/(2.5+o/50),h=a.height+u+e.padding,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ht.svg(i),m=REe(0,0,o,h,l,u),g=MEe(0,u,o,h,l,u),y=p.path(m,Rr(e,{})),v=p.path(g,Rr(e,{fill:"none"}));f=i.insert(()=>v,":first-child"),f=i.insert(()=>y,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{let p=DEe(0,0,o,h,l,u);f=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",d).attr("style",n)}return f.attr("label-offset-y",u),f.attr("transform",`translate(${-o/2}, ${-(h/2+u)})`),er(e,f),e.intersect=function(p){let m=tr.rect(e,p),g=m.x-(e.x??0);if(l!=0&&(Math.abs(g)<(e.width??0)/2||Math.abs(g)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-u)){let y=u*u*(1-g*g/(l*l));y>0&&(y=Math.sqrt(y)),y=u-y,p.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i},"cylinder")});var yj,vj=_(()=>{"use strict";it();Xn();ii();pi();Yn();yj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o}=await Mr(t,e,gn(e)),l=a.width/2+o,u,{cssStyles:h}=e;if(e.look==="handDrawn"){let f=Ht.svg(i),d=Rr(e,{}),p=f.circle(0,0,l*2,d);u=i.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",h)}else u=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0);return er(e,u),e.intersect=function(f){return V.info("Circle intersect",e,l,f),tr.circle(e,l,f)},i},"circle")});var xj,bj=_(()=>{"use strict";it();Xn();ii();pi();Yn();xj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o}=await Mr(t,e,gn(e)),u=a.width/2+o+5,h=a.width/2+o,f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ht.svg(i),m=Rr(e,{roughness:.2,strokeWidth:2.5}),g=Rr(e,{roughness:.2,strokeWidth:1.5}),y=p.circle(0,0,u*2,m),v=p.circle(0,0,h*2,g);f=i.insert("g",":first-child"),f.attr("class",e.cssClasses).attr("style",d),f.node()?.appendChild(y),f.node()?.appendChild(v)}else{f=i.insert("g",":first-child");let p=f.insert("circle",":first-child"),m=f.insert("circle");f.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0)}return er(e,f),e.intersect=function(p){return V.info("DoubleCircle intersect",e,u,p),tr.circle(e,u,p)},i},"doublecircle")});var IEe,kj,wj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();IEe=s((t,e,r,n)=>[`M${t-n/2},${e}`,`L${t+r},${e}`,`L${t+r},${e-n}`,`L${t-n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createPolygonPathD"),kj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:-l/2,y:0},{x:o,y:0},{x:o,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=IEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o+l,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"rect_left_inv_arrow")});var NEe,Tj,Ej=_(()=>{"use strict";it();Xn();ii();pi();Yn();ku();NEe=s((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD"),Tj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=o+l,h=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:d}=e;if(e.look==="handDrawn"){let p=Ht.svg(i),m=Rr(e,{}),g=NEe(0,0,u),y=p.path(g,m);f=i.insert(()=>y,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`),d&&f.attr("style",d)}else f=Ea(i,u,u,h);return n&&f.attr("style",n),er(e,f),e.intersect=function(p){return V.debug(`APA12 Intersect called SPLIT +point:`,p,` +node: +`,e,` +res:`,tr.polygon(e,h,p)),tr.polygon(e,h,p)},i},"question")});var OEe,Cj,Sj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();OEe=s((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD"),Cj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=4,l=a.height+e.padding,u=l/o,h=a.width+2*u+e.padding,f=[{x:u,y:0},{x:h-u,y:0},{x:h,y:-l/2},{x:h-u,y:-l},{x:u,y:-l},{x:0,y:-l/2}],d,{cssStyles:p}=e;if(e.look==="handDrawn"){let m=Ht.svg(i),g=Rr(e,{}),y=OEe(0,0,h,l,u),v=m.path(y,g);d=i.insert(()=>v,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),p&&d.attr("style",p)}else d=Ea(i,h,l,f);return n&&d.attr("style",n),e.width=h,e.height=l,er(e,d),e.intersect=function(m){return tr.polygon(e,f,m)},i},"hexagon")});var PEe,_j,Aj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();PEe=s((t,e,r,n)=>[`M${t-2*n/6},${e}`,`L${t+r-n/6},${e}`,`L${t+r+2*n/6},${e-n}`,`L${t+n/6},${e-n}`,"Z"].join(" "),"createLeanRightPathD"),_j=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:-2*l/6,y:0},{x:o-l/6,y:0},{x:o+2*l/6,y:-l},{x:l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=PEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"lean_right")});var BEe,Lj,Dj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();BEe=s((t,e,r,n)=>[`M${t+2*n/6},${e}`,`L${t+r+n/6},${e}`,`L${t+r-2*n/6},${e-n}`,`L${t-n/6},${e-n}`,"Z"].join(" "),"createLeanLeftPathD"),Lj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:2*l/6,y:0},{x:o+l/6,y:0},{x:o-2*l/6,y:-l},{x:-l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=BEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"lean_left")});var FEe,Rj,Mj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();FEe=s((t,e,r,n)=>[`M${t-2*n/6},${e}`,`L${t+r+2*n/6},${e}`,`L${t+r-n/6},${e-n}`,`L${t+n/6},${e-n}`,"Z"].join(" "),"createTrapezoidPathD"),Rj=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:-2*l/6,y:0},{x:o+2*l/6,y:0},{x:o-l/6,y:-l},{x:l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=FEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"trapezoid")});var zEe,Ij,Nj=_(()=>{"use strict";Xn();ii();pi();Yn();ku();zEe=s((t,e,r,n)=>[`M${t+n/6},${e}`,`L${t+r-n/6},${e}`,`L${t+r+2*n/6},${e-n}`,`L${t-2*n/6},${e-n}`,"Z"].join(" "),"createInvertedTrapezoidPathD"),Ij=s(async(t,e)=>{let{labelStyles:r,nodeStyles:n}=Dr(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await Mr(t,e,gn(e)),o=a.width+e.padding,l=a.height+e.padding,u=[{x:l/6,y:0},{x:o-l/6,y:0},{x:o+2*l/6,y:-l},{x:-2*l/6,y:-l}],h,{cssStyles:f}=e;if(e.look==="handDrawn"){let d=Ht.svg(i),p=Rr(e,{}),m=zEe(0,0,o,l),g=d.path(m,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${l/2})`),f&&h.attr("style",f)}else h=Ea(i,o,l,u);return n&&h.attr("style",n),e.width=o,e.height=l,er(e,h),e.intersect=function(d){return tr.polygon(e,u,d)},i},"inv_trapezoid")});var Oj,Pj=_(()=>{"use strict";uv();Xn();ii();Oj=s(async(t,e)=>{let{shapeSvg:r}=await Mr(t,e,"label"),n=r.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),er(e,n),e.intersect=function(o){return tr.rect(e,o)},r},"labelRect")});var Bj,tm,C5,Fj,zj,u9,h9=_(()=>{"use strict";it();jX();QX();JX();tj();nj();ij();sj();lj();uj();fj();gt();pj();gj();vj();bj();wj();Ej();Sj();Aj();Dj();Mj();Nj();Pj();Bj={state:XX,stateStart:ej,stateEnd:rj,fork:c9,join:c9,choice:aj,note:oj,roundedRect:KX,rectWithTitle:hj,squareRect:ZX,stadium:cj,subroutine:dj,cylinder:mj,circle:yj,doublecircle:xj,odd:kj,diamond:Tj,hexagon:Cj,lean_right:_j,lean_left:Lj,trapezoid:Rj,inv_trapezoid:Ij,labelRect:Oj},tm=new Map,C5=s(async(t,e,r)=>{let n,i;if(e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),e.link){let a;le().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=await Bj[e.shape](n,e,r)}else i=await Bj[e.shape](t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),tm.set(e.id,n),e.haveCallback&&tm.get(e.id).attr("class",tm.get(e.id).attr("class")+" clickable"),n},"insertNode"),Fj=s((t,e)=>{tm.set(e.id,t)},"setNodeElem"),zj=s(()=>{tm.clear()},"clear"),u9=s(t=>{let e=tm.get(t.id);V.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode")});var $j,Gj=_(()=>{"use strict";zs();Qt();it();i9();s9();o9();h9();Xn();pr();$j={common:$e,getConfig:_r,insertCluster:p5,insertEdge:w5,insertEdgeLabel:b5,insertMarkers:T5,insertNode:C5,interpolateToCurve:Wp,labelHelper:Mr,log:V,positionEdgeLabel:k5}});function GEe(t){return typeof t=="symbol"||Fn(t)&&na(t)==$Ee}var $Ee,Zs,bd=_(()=>{"use strict";fu();ko();$Ee="[object Symbol]";s(GEe,"isSymbol");Zs=GEe});function VEe(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r{"use strict";s(VEe,"arrayMap");bs=VEe});function qj(t){if(typeof t=="string")return t;if(ct(t))return bs(t,qj)+"";if(Zs(t))return Uj?Uj.call(t):"";var e=t+"";return e=="0"&&1/t==-UEe?"-0":e}var UEe,Vj,Uj,Wj,Hj=_(()=>{"use strict";sd();kd();Dn();bd();UEe=1/0,Vj=qi?qi.prototype:void 0,Uj=Vj?Vj.toString:void 0;s(qj,"baseToString");Wj=qj});function WEe(t){for(var e=t.length;e--&&qEe.test(t.charAt(e)););return e}var qEe,Yj,Xj=_(()=>{"use strict";qEe=/\s/;s(WEe,"trimmedEndIndex");Yj=WEe});function YEe(t){return t&&t.slice(0,Yj(t)+1).replace(HEe,"")}var HEe,jj,Kj=_(()=>{"use strict";Xj();HEe=/^\s+/;s(YEe,"baseTrim");jj=YEe});function ZEe(t){if(typeof t=="number")return t;if(Zs(t))return Qj;if(on(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=on(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=jj(t);var r=jEe.test(t);return r||KEe.test(t)?QEe(t.slice(2),r?2:8):XEe.test(t)?Qj:+t}var Qj,XEe,jEe,KEe,QEe,Zj,Jj=_(()=>{"use strict";Kj();Ws();bd();Qj=NaN,XEe=/^[-+]0x[0-9a-f]+$/i,jEe=/^0b[01]+$/i,KEe=/^0o[0-7]+$/i,QEe=parseInt;s(ZEe,"toNumber");Zj=ZEe});function eCe(t){if(!t)return t===0?t:0;if(t=Zj(t),t===eK||t===-eK){var e=t<0?-1:1;return e*JEe}return t===t?t:0}var eK,JEe,rm,f9=_(()=>{"use strict";Jj();eK=1/0,JEe=17976931348623157e292;s(eCe,"toFinite");rm=eCe});function tCe(t){var e=rm(t),r=e%1;return e===e?r?e-r:e:0}var sc,nm=_(()=>{"use strict";f9();s(tCe,"toInteger");sc=tCe});var rCe,S5,tK=_(()=>{"use strict";Sh();xo();rCe=fs(Wn,"WeakMap"),S5=rCe});function nCe(){}var zn,d9=_(()=>{"use strict";s(nCe,"noop");zn=nCe});function iCe(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";s(iCe,"arrayEach");_5=iCe});function aCe(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{"use strict";s(aCe,"baseFindIndex");A5=aCe});function sCe(t){return t!==t}var rK,nK=_(()=>{"use strict";s(sCe,"baseIsNaN");rK=sCe});function oCe(t,e,r){for(var n=r-1,i=t.length;++n{"use strict";s(oCe,"strictIndexOf");iK=oCe});function lCe(t,e,r){return e===e?iK(t,e,r):A5(t,rK,r)}var im,L5=_(()=>{"use strict";m9();nK();aK();s(lCe,"baseIndexOf");im=lCe});function cCe(t,e){var r=t==null?0:t.length;return!!r&&im(t,e,0)>-1}var D5,g9=_(()=>{"use strict";L5();s(cCe,"arrayIncludes");D5=cCe});var uCe,sK,oK=_(()=>{"use strict";X_();uCe=L3(Object.keys,Object),sK=uCe});function dCe(t){if(!ec(t))return sK(t);var e=[];for(var r in Object(t))fCe.call(t,r)&&r!="constructor"&&e.push(r);return e}var hCe,fCe,am,R5=_(()=>{"use strict";zp();oK();hCe=Object.prototype,fCe=hCe.hasOwnProperty;s(dCe,"baseKeys");am=dCe});function pCe(t){return Hn(t)?N3(t):am(t)}var kr,oc=_(()=>{"use strict";J_();R5();wo();s(pCe,"keys");kr=pCe});var mCe,gCe,yCe,aa,lK=_(()=>{"use strict";Up();hd();nA();wo();zp();oc();mCe=Object.prototype,gCe=mCe.hasOwnProperty,yCe=B3(function(t,e){if(ec(e)||Hn(e)){Co(e,kr(e),t);return}for(var r in e)gCe.call(e,r)&&tc(t,r,e[r])}),aa=yCe});function bCe(t,e){if(ct(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Zs(t)?!0:xCe.test(t)||!vCe.test(t)||e!=null&&t in Object(e)}var vCe,xCe,sm,M5=_(()=>{"use strict";Dn();bd();vCe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xCe=/^\w*$/;s(bCe,"isKey");sm=bCe});function wCe(t){var e=Rp(t,function(n){return r.size===kCe&&r.clear(),n}),r=e.cache;return e}var kCe,cK,uK=_(()=>{"use strict";G_();kCe=500;s(wCe,"memoizeCapped");cK=wCe});var TCe,ECe,CCe,hK,fK=_(()=>{"use strict";uK();TCe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ECe=/\\(\\)?/g,CCe=cK(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(TCe,function(r,n,i,a){e.push(i?a.replace(ECe,"$1"):n||r)}),e}),hK=CCe});function SCe(t){return t==null?"":Wj(t)}var I5,y9=_(()=>{"use strict";Hj();s(SCe,"toString");I5=SCe});function _Ce(t,e){return ct(t)?t:sm(t,e)?[t]:hK(I5(t))}var Fh,hv=_(()=>{"use strict";Dn();M5();fK();y9();s(_Ce,"castPath");Fh=_Ce});function LCe(t){if(typeof t=="string"||Zs(t))return t;var e=t+"";return e=="0"&&1/t==-ACe?"-0":e}var ACe,lc,om=_(()=>{"use strict";bd();ACe=1/0;s(LCe,"toKey");lc=LCe});function DCe(t,e){e=Fh(e,t);for(var r=0,n=e.length;t!=null&&r{"use strict";hv();om();s(DCe,"baseGet");zh=DCe});function RCe(t,e,r){var n=t==null?void 0:zh(t,e);return n===void 0?r:n}var dK,pK=_(()=>{"use strict";fv();s(RCe,"get");dK=RCe});function MCe(t,e){for(var r=-1,n=e.length,i=t.length;++r{"use strict";s(MCe,"arrayPush");lm=MCe});function ICe(t){return ct(t)||cl(t)||!!(mK&&t&&t[mK])}var mK,gK,yK=_(()=>{"use strict";sd();$p();Dn();mK=qi?qi.isConcatSpreadable:void 0;s(ICe,"isFlattenable");gK=ICe});function vK(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=gK),i||(i=[]);++a0&&r(l)?e>1?vK(l,e-1,r,n,i):lm(i,l):n||(i[i.length]=l)}return i}var cc,cm=_(()=>{"use strict";N5();yK();s(vK,"baseFlatten");cc=vK});function NCe(t){var e=t==null?0:t.length;return e?cc(t,1):[]}var Ir,O5=_(()=>{"use strict";cm();s(NCe,"flatten");Ir=NCe});function OCe(t){return P3(O3(t,void 0,Ir),t+"")}var xK,bK=_(()=>{"use strict";O5();eA();rA();s(OCe,"flatRest");xK=OCe});function PCe(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n{"use strict";s(PCe,"baseSlice");P5=PCe});function WCe(t){return qCe.test(t)}var BCe,FCe,zCe,$Ce,GCe,VCe,UCe,qCe,kK,wK=_(()=>{"use strict";BCe="\\ud800-\\udfff",FCe="\\u0300-\\u036f",zCe="\\ufe20-\\ufe2f",$Ce="\\u20d0-\\u20ff",GCe=FCe+zCe+$Ce,VCe="\\ufe0e\\ufe0f",UCe="\\u200d",qCe=RegExp("["+UCe+BCe+GCe+VCe+"]");s(WCe,"hasUnicode");kK=WCe});function HCe(t,e,r,n){var i=-1,a=t==null?0:t.length;for(n&&a&&(r=t[++i]);++i{"use strict";s(HCe,"arrayReduce");TK=HCe});function YCe(t,e){return t&&Co(e,kr(e),t)}var CK,SK=_(()=>{"use strict";hd();oc();s(YCe,"baseAssign");CK=YCe});function XCe(t,e){return t&&Co(e,ds(e),t)}var _K,AK=_(()=>{"use strict";hd();Ih();s(XCe,"baseAssignIn");_K=XCe});function jCe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r{"use strict";s(jCe,"arrayFilter");um=jCe});function KCe(){return[]}var F5,x9=_(()=>{"use strict";s(KCe,"stubArray");F5=KCe});var QCe,ZCe,LK,JCe,hm,z5=_(()=>{"use strict";B5();x9();QCe=Object.prototype,ZCe=QCe.propertyIsEnumerable,LK=Object.getOwnPropertySymbols,JCe=LK?function(t){return t==null?[]:(t=Object(t),um(LK(t),function(e){return ZCe.call(t,e)}))}:F5,hm=JCe});function eSe(t,e){return Co(t,hm(t),e)}var DK,RK=_(()=>{"use strict";hd();z5();s(eSe,"copySymbols");DK=eSe});var tSe,rSe,$5,b9=_(()=>{"use strict";N5();D3();z5();x9();tSe=Object.getOwnPropertySymbols,rSe=tSe?function(t){for(var e=[];t;)lm(e,hm(t)),t=Fp(t);return e}:F5,$5=rSe});function nSe(t,e){return Co(t,$5(t),e)}var MK,IK=_(()=>{"use strict";hd();b9();s(nSe,"copySymbolsIn");MK=nSe});function iSe(t,e,r){var n=e(t);return ct(t)?n:lm(n,r(t))}var G5,k9=_(()=>{"use strict";N5();Dn();s(iSe,"baseGetAllKeys");G5=iSe});function aSe(t){return G5(t,kr,hm)}var dv,w9=_(()=>{"use strict";k9();z5();oc();s(aSe,"getAllKeys");dv=aSe});function sSe(t){return G5(t,ds,$5)}var V5,T9=_(()=>{"use strict";k9();b9();Ih();s(sSe,"getAllKeysIn");V5=sSe});var oSe,U5,NK=_(()=>{"use strict";Sh();xo();oSe=fs(Wn,"DataView"),U5=oSe});var lSe,q5,OK=_(()=>{"use strict";Sh();xo();lSe=fs(Wn,"Promise"),q5=lSe});var cSe,$h,E9=_(()=>{"use strict";Sh();xo();cSe=fs(Wn,"Set"),$h=cSe});var PK,uSe,BK,FK,zK,$K,hSe,fSe,dSe,pSe,mSe,wd,Js,Td=_(()=>{"use strict";NK();w3();OK();E9();tK();fu();F_();PK="[object Map]",uSe="[object Object]",BK="[object Promise]",FK="[object Set]",zK="[object WeakMap]",$K="[object DataView]",hSe=du(U5),fSe=du(Lh),dSe=du(q5),pSe=du($h),mSe=du(S5),wd=na;(U5&&wd(new U5(new ArrayBuffer(1)))!=$K||Lh&&wd(new Lh)!=PK||q5&&wd(q5.resolve())!=BK||$h&&wd(new $h)!=FK||S5&&wd(new S5)!=zK)&&(wd=s(function(t){var e=na(t),r=e==uSe?t.constructor:void 0,n=r?du(r):"";if(n)switch(n){case hSe:return $K;case fSe:return PK;case dSe:return BK;case pSe:return FK;case mSe:return zK}return e},"getTag"));Js=wd});function vSe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&ySe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var gSe,ySe,GK,VK=_(()=>{"use strict";gSe=Object.prototype,ySe=gSe.hasOwnProperty;s(vSe,"initCloneArray");GK=vSe});function xSe(t,e){var r=e?Bp(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var UK,qK=_(()=>{"use strict";S3();s(xSe,"cloneDataView");UK=xSe});function kSe(t){var e=new t.constructor(t.source,bSe.exec(t));return e.lastIndex=t.lastIndex,e}var bSe,WK,HK=_(()=>{"use strict";bSe=/\w*$/;s(kSe,"cloneRegExp");WK=kSe});function wSe(t){return XK?Object(XK.call(t)):{}}var YK,XK,jK,KK=_(()=>{"use strict";sd();YK=qi?qi.prototype:void 0,XK=YK?YK.valueOf:void 0;s(wSe,"cloneSymbol");jK=wSe});function VSe(t,e,r){var n=t.constructor;switch(e){case RSe:return Bp(t);case TSe:case ESe:return new n(+t);case MSe:return UK(t,r);case ISe:case NSe:case OSe:case PSe:case BSe:case FSe:case zSe:case $Se:case GSe:return _3(t,r);case CSe:return new n;case SSe:case LSe:return new n(t);case _Se:return WK(t);case ASe:return new n;case DSe:return jK(t)}}var TSe,ESe,CSe,SSe,_Se,ASe,LSe,DSe,RSe,MSe,ISe,NSe,OSe,PSe,BSe,FSe,zSe,$Se,GSe,QK,ZK=_(()=>{"use strict";S3();qK();HK();KK();H_();TSe="[object Boolean]",ESe="[object Date]",CSe="[object Map]",SSe="[object Number]",_Se="[object RegExp]",ASe="[object Set]",LSe="[object String]",DSe="[object Symbol]",RSe="[object ArrayBuffer]",MSe="[object DataView]",ISe="[object Float32Array]",NSe="[object Float64Array]",OSe="[object Int8Array]",PSe="[object Int16Array]",BSe="[object Int32Array]",FSe="[object Uint8Array]",zSe="[object Uint8ClampedArray]",$Se="[object Uint16Array]",GSe="[object Uint32Array]";s(VSe,"initCloneByTag");QK=VSe});function qSe(t){return Fn(t)&&Js(t)==USe}var USe,JK,eQ=_(()=>{"use strict";Td();ko();USe="[object Map]";s(qSe,"baseIsMap");JK=qSe});var tQ,WSe,rQ,nQ=_(()=>{"use strict";eQ();ud();Uy();tQ=Eo&&Eo.isMap,WSe=tQ?To(tQ):JK,rQ=WSe});function YSe(t){return Fn(t)&&Js(t)==HSe}var HSe,iQ,aQ=_(()=>{"use strict";Td();ko();HSe="[object Set]";s(YSe,"baseIsSet");iQ=YSe});var sQ,XSe,oQ,lQ=_(()=>{"use strict";aQ();ud();Uy();sQ=Eo&&Eo.isSet,XSe=sQ?To(sQ):iQ,oQ=XSe});function W5(t,e,r,n,i,a){var o,l=e&jSe,u=e&KSe,h=e&QSe;if(r&&(o=i?r(t,n,i,a):r(t)),o!==void 0)return o;if(!on(t))return t;var f=ct(t);if(f){if(o=GK(t),!l)return A3(t,o)}else{var d=Js(t),p=d==uQ||d==r8e;if(ul(t))return C3(t,l);if(d==hQ||d==cQ||p&&!i){if(o=u||p?{}:R3(t),!l)return u?MK(t,_K(o,t)):DK(t,CK(o,t))}else{if(!yn[d])return i?t:{};o=QK(t,d,l)}}a||(a=new Zl);var m=a.get(t);if(m)return m;a.set(t,o),oQ(t)?t.forEach(function(v){o.add(W5(v,e,r,v,t,a))}):rQ(t)&&t.forEach(function(v,x){o.set(x,W5(v,e,r,x,t,a))});var g=h?u?V5:dv:u?ds:kr,y=f?void 0:g(t);return _5(y||t,function(v,x){y&&(x=v,v=t[x]),tc(o,x,W5(v,e,r,x,t,a))}),o}var jSe,KSe,QSe,cQ,ZSe,JSe,e8e,t8e,uQ,r8e,n8e,i8e,hQ,a8e,s8e,o8e,l8e,c8e,u8e,h8e,f8e,d8e,p8e,m8e,g8e,y8e,v8e,x8e,b8e,yn,H5,C9=_(()=>{"use strict";$y();p9();Up();SK();AK();q_();Y_();RK();IK();w9();T9();Td();VK();ZK();j_();Dn();Vp();nQ();Ws();lQ();oc();Ih();jSe=1,KSe=2,QSe=4,cQ="[object Arguments]",ZSe="[object Array]",JSe="[object Boolean]",e8e="[object Date]",t8e="[object Error]",uQ="[object Function]",r8e="[object GeneratorFunction]",n8e="[object Map]",i8e="[object Number]",hQ="[object Object]",a8e="[object RegExp]",s8e="[object Set]",o8e="[object String]",l8e="[object Symbol]",c8e="[object WeakMap]",u8e="[object ArrayBuffer]",h8e="[object DataView]",f8e="[object Float32Array]",d8e="[object Float64Array]",p8e="[object Int8Array]",m8e="[object Int16Array]",g8e="[object Int32Array]",y8e="[object Uint8Array]",v8e="[object Uint8ClampedArray]",x8e="[object Uint16Array]",b8e="[object Uint32Array]",yn={};yn[cQ]=yn[ZSe]=yn[u8e]=yn[h8e]=yn[JSe]=yn[e8e]=yn[f8e]=yn[d8e]=yn[p8e]=yn[m8e]=yn[g8e]=yn[n8e]=yn[i8e]=yn[hQ]=yn[a8e]=yn[s8e]=yn[o8e]=yn[l8e]=yn[y8e]=yn[v8e]=yn[x8e]=yn[b8e]=!0;yn[t8e]=yn[uQ]=yn[c8e]=!1;s(W5,"baseClone");H5=W5});function w8e(t){return H5(t,k8e)}var k8e,Hr,S9=_(()=>{"use strict";C9();k8e=4;s(w8e,"clone");Hr=w8e});function C8e(t){return H5(t,T8e|E8e)}var T8e,E8e,_9,fQ=_(()=>{"use strict";C9();T8e=1,E8e=4;s(C8e,"cloneDeep");_9=C8e});function S8e(t){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{"use strict";s(S8e,"compact");uc=S8e});function A8e(t){return this.__data__.set(t,_8e),this}var _8e,pQ,mQ=_(()=>{"use strict";_8e="__lodash_hash_undefined__";s(A8e,"setCacheAdd");pQ=A8e});function L8e(t){return this.__data__.has(t)}var gQ,yQ=_(()=>{"use strict";s(L8e,"setCacheHas");gQ=L8e});function Y5(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ld;++e{"use strict";T3();mQ();yQ();s(Y5,"SetCache");Y5.prototype.add=Y5.prototype.push=pQ;Y5.prototype.has=gQ;fm=Y5});function D8e(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";s(D8e,"arraySome");j5=D8e});function R8e(t,e){return t.has(e)}var dm,K5=_(()=>{"use strict";s(R8e,"cacheHas");dm=R8e});function N8e(t,e,r,n,i,a){var o=r&M8e,l=t.length,u=e.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(t),f=a.get(e);if(h&&f)return h==e&&f==t;var d=-1,p=!0,m=r&I8e?new fm:void 0;for(a.set(t,e),a.set(e,t);++d{"use strict";X5();A9();K5();M8e=1,I8e=2;s(N8e,"equalArrays");Q5=N8e});function O8e(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var vQ,xQ=_(()=>{"use strict";s(O8e,"mapToArray");vQ=O8e});function P8e(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var pm,Z5=_(()=>{"use strict";s(P8e,"setToArray");pm=P8e});function K8e(t,e,r,n,i,a,o){switch(r){case j8e:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case X8e:return!(t.byteLength!=e.byteLength||!a(new Pp(t),new Pp(e)));case z8e:case $8e:case U8e:return bo(+t,+e);case G8e:return t.name==e.name&&t.message==e.message;case q8e:case H8e:return t==e+"";case V8e:var l=vQ;case W8e:var u=n&B8e;if(l||(l=pm),t.size!=e.size&&!u)return!1;var h=o.get(t);if(h)return h==e;n|=F8e,o.set(t,e);var f=Q5(l(t),l(e),n,i,a,o);return o.delete(t),f;case Y8e:if(D9)return D9.call(t)==D9.call(e)}return!1}var B8e,F8e,z8e,$8e,G8e,V8e,U8e,q8e,W8e,H8e,Y8e,X8e,j8e,bQ,D9,kQ,wQ=_(()=>{"use strict";sd();W_();od();L9();xQ();Z5();B8e=1,F8e=2,z8e="[object Boolean]",$8e="[object Date]",G8e="[object Error]",V8e="[object Map]",U8e="[object Number]",q8e="[object RegExp]",W8e="[object Set]",H8e="[object String]",Y8e="[object Symbol]",X8e="[object ArrayBuffer]",j8e="[object DataView]",bQ=qi?qi.prototype:void 0,D9=bQ?bQ.valueOf:void 0;s(K8e,"equalByTag");kQ=K8e});function e_e(t,e,r,n,i,a){var o=r&Q8e,l=dv(t),u=l.length,h=dv(e),f=h.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var p=l[d];if(!(o?p in e:J8e.call(e,p)))return!1}var m=a.get(t),g=a.get(e);if(m&&g)return m==e&&g==t;var y=!0;a.set(t,e),a.set(e,t);for(var v=o;++d{"use strict";w9();Q8e=1,Z8e=Object.prototype,J8e=Z8e.hasOwnProperty;s(e_e,"equalObjects");TQ=e_e});function n_e(t,e,r,n,i,a){var o=ct(t),l=ct(e),u=o?SQ:Js(t),h=l?SQ:Js(e);u=u==CQ?J5:u,h=h==CQ?J5:h;var f=u==J5,d=h==J5,p=u==h;if(p&&ul(t)){if(!ul(e))return!1;o=!0,f=!1}if(p&&!f)return a||(a=new Zl),o||Rh(t)?Q5(t,e,r,n,i,a):kQ(t,e,u,r,n,i,a);if(!(r&t_e)){var m=f&&_Q.call(t,"__wrapped__"),g=d&&_Q.call(e,"__wrapped__");if(m||g){var y=m?t.value():t,v=g?e.value():e;return a||(a=new Zl),i(y,v,r,n,a)}}return p?(a||(a=new Zl),TQ(t,e,r,n,i,a)):!1}var t_e,CQ,SQ,J5,r_e,_Q,AQ,LQ=_(()=>{"use strict";$y();L9();wQ();EQ();Td();Dn();Vp();qy();t_e=1,CQ="[object Arguments]",SQ="[object Array]",J5="[object Object]",r_e=Object.prototype,_Q=r_e.hasOwnProperty;s(n_e,"baseIsEqualDeep");AQ=n_e});function DQ(t,e,r,n,i){return t===e?!0:t==null||e==null||!Fn(t)&&!Fn(e)?t!==t&&e!==e:AQ(t,e,r,n,DQ,i)}var ek,R9=_(()=>{"use strict";LQ();ko();s(DQ,"baseIsEqual");ek=DQ});function s_e(t,e,r,n){var i=r.length,a=i,o=!n;if(t==null)return!a;for(t=Object(t);i--;){var l=r[i];if(o&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i{"use strict";$y();R9();i_e=1,a_e=2;s(s_e,"baseIsMatch");RQ=s_e});function o_e(t){return t===t&&!on(t)}var tk,M9=_(()=>{"use strict";Ws();s(o_e,"isStrictComparable");tk=o_e});function l_e(t){for(var e=kr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,tk(i)]}return e}var IQ,NQ=_(()=>{"use strict";M9();oc();s(l_e,"getMatchData");IQ=l_e});function c_e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var rk,I9=_(()=>{"use strict";s(c_e,"matchesStrictComparable");rk=c_e});function u_e(t){var e=IQ(t);return e.length==1&&e[0][2]?rk(e[0][0],e[0][1]):function(r){return r===t||RQ(r,t,e)}}var OQ,PQ=_(()=>{"use strict";MQ();NQ();I9();s(u_e,"baseMatches");OQ=u_e});function h_e(t,e){return t!=null&&e in Object(t)}var BQ,FQ=_(()=>{"use strict";s(h_e,"baseHasIn");BQ=h_e});function f_e(t,e,r){e=Fh(e,t);for(var n=-1,i=e.length,a=!1;++n{"use strict";hv();$p();Dn();Hy();M3();om();s(f_e,"hasPath");nk=f_e});function d_e(t,e){return t!=null&&nk(t,e,BQ)}var ik,O9=_(()=>{"use strict";FQ();N9();s(d_e,"hasIn");ik=d_e});function g_e(t,e){return sm(t)&&tk(e)?rk(lc(t),e):function(r){var n=dK(r,t);return n===void 0&&n===e?ik(r,t):ek(e,n,p_e|m_e)}}var p_e,m_e,zQ,$Q=_(()=>{"use strict";R9();pK();O9();M5();M9();I9();om();p_e=1,m_e=2;s(g_e,"baseMatchesProperty");zQ=g_e});function y_e(t){return function(e){return e?.[t]}}var ak,P9=_(()=>{"use strict";s(y_e,"baseProperty");ak=y_e});function v_e(t){return function(e){return zh(e,t)}}var GQ,VQ=_(()=>{"use strict";fv();s(v_e,"basePropertyDeep");GQ=v_e});function x_e(t){return sm(t)?ak(lc(t)):GQ(t)}var UQ,qQ=_(()=>{"use strict";P9();VQ();M5();om();s(x_e,"property");UQ=x_e});function b_e(t){return typeof t=="function"?t:t==null?Wi:typeof t=="object"?ct(t)?zQ(t[0],t[1]):OQ(t):UQ(t)}var tn,Ua=_(()=>{"use strict";PQ();$Q();mu();Dn();qQ();s(b_e,"baseIteratee");tn=b_e});function k_e(t,e,r,n){for(var i=-1,a=t==null?0:t.length;++i{"use strict";s(k_e,"arrayAggregator");WQ=k_e});function w_e(t,e){return t&&Op(t,e,kr)}var mm,sk=_(()=>{"use strict";E3();oc();s(w_e,"baseForOwn");mm=w_e});function T_e(t,e){return function(r,n){if(r==null)return r;if(!Hn(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a{"use strict";wo();s(T_e,"createBaseEach");YQ=T_e});var E_e,ks,Gh=_(()=>{"use strict";sk();XQ();E_e=YQ(mm),ks=E_e});function C_e(t,e,r,n){return ks(t,function(i,a,o){e(n,i,r(i),o)}),n}var jQ,KQ=_(()=>{"use strict";Gh();s(C_e,"baseAggregator");jQ=C_e});function S_e(t,e){return function(r,n){var i=ct(r)?WQ:jQ,a=e?e():{};return i(r,t,tn(n,2),a)}}var QQ,ZQ=_(()=>{"use strict";HQ();KQ();Ua();Dn();s(S_e,"createAggregator");QQ=S_e});var __e,ok,JQ=_(()=>{"use strict";xo();__e=s(function(){return Wn.Date.now()},"now"),ok=__e});var eZ,A_e,L_e,Vh,tZ=_(()=>{"use strict";qp();od();fd();Ih();eZ=Object.prototype,A_e=eZ.hasOwnProperty,L_e=rc(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Hs(e[0],e[1],i)&&(n=1);++r{"use strict";s(D_e,"arrayIncludesWith");lk=D_e});function M_e(t,e,r,n){var i=-1,a=D5,o=!0,l=t.length,u=[],h=e.length;if(!l)return u;r&&(e=bs(e,To(r))),n?(a=lk,o=!1):e.length>=R_e&&(a=dm,o=!1,e=new fm(e));e:for(;++i{"use strict";X5();g9();B9();kd();ud();K5();R_e=200;s(M_e,"baseDifference");rZ=M_e});var I_e,Uh,iZ=_(()=>{"use strict";nZ();cm();qp();I3();I_e=rc(function(t,e){return cd(t)?rZ(t,cc(e,1,cd,!0)):[]}),Uh=I_e});function N_e(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var sa,aZ=_(()=>{"use strict";s(N_e,"last");sa=N_e});function O_e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:sc(e),P5(t,e<0?0:e,n)):[]}var ai,sZ=_(()=>{"use strict";v9();nm();s(O_e,"drop");ai=O_e});function P_e(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:sc(e),e=n-e,P5(t,0,e<0?0:e)):[]}var wu,oZ=_(()=>{"use strict";v9();nm();s(P_e,"dropRight");wu=P_e});function B_e(t){return typeof t=="function"?t:Wi}var gm,ck=_(()=>{"use strict";mu();s(B_e,"castFunction");gm=B_e});function F_e(t,e){var r=ct(t)?_5:ks;return r(t,gm(e))}var be,uk=_(()=>{"use strict";p9();Gh();ck();Dn();s(F_e,"forEach");be=F_e});var lZ=_(()=>{"use strict";uk()});function z_e(t,e){for(var r=-1,n=t==null?0:t.length;++r{"use strict";s(z_e,"arrayEvery");cZ=z_e});function $_e(t,e){var r=!0;return ks(t,function(n,i,a){return r=!!e(n,i,a),r}),r}var hZ,fZ=_(()=>{"use strict";Gh();s($_e,"baseEvery");hZ=$_e});function G_e(t,e,r){var n=ct(t)?cZ:hZ;return r&&Hs(t,e,r)&&(e=void 0),n(t,tn(e,3))}var Ca,dZ=_(()=>{"use strict";uZ();fZ();Ua();Dn();fd();s(G_e,"every");Ca=G_e});function V_e(t,e){var r=[];return ks(t,function(n,i,a){e(n,i,a)&&r.push(n)}),r}var hk,F9=_(()=>{"use strict";Gh();s(V_e,"baseFilter");hk=V_e});function U_e(t,e){var r=ct(t)?um:hk;return r(t,tn(e,3))}var Nr,z9=_(()=>{"use strict";B5();F9();Ua();Dn();s(U_e,"filter");Nr=U_e});function q_e(t){return function(e,r,n){var i=Object(e);if(!Hn(e)){var a=tn(r,3);e=kr(e),r=s(function(l){return a(i[l],l,i)},"predicate")}var o=t(e,r,n);return o>-1?i[a?e[o]:o]:void 0}}var pZ,mZ=_(()=>{"use strict";Ua();wo();oc();s(q_e,"createFind");pZ=q_e});function H_e(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:sc(r);return i<0&&(i=W_e(n+i,0)),A5(t,tn(e,3),i)}var W_e,gZ,yZ=_(()=>{"use strict";m9();Ua();nm();W_e=Math.max;s(H_e,"findIndex");gZ=H_e});var Y_e,qa,vZ=_(()=>{"use strict";mZ();yZ();Y_e=pZ(gZ),qa=Y_e});function X_e(t){return t&&t.length?t[0]:void 0}var Yi,xZ=_(()=>{"use strict";s(X_e,"head");Yi=X_e});var bZ=_(()=>{"use strict";xZ()});function j_e(t,e){var r=-1,n=Hn(t)?Array(t.length):[];return ks(t,function(i,a,o){n[++r]=e(i,a,o)}),n}var fk,$9=_(()=>{"use strict";Gh();wo();s(j_e,"baseMap");fk=j_e});function K_e(t,e){var r=ct(t)?bs:fk;return r(t,tn(e,3))}var Ge,ym=_(()=>{"use strict";kd();Ua();$9();Dn();s(K_e,"map");Ge=K_e});function Q_e(t,e){return cc(Ge(t,e),1)}var oa,G9=_(()=>{"use strict";cm();ym();s(Q_e,"flatMap");oa=Q_e});function Z_e(t,e){return t==null?t:Op(t,gm(e),ds)}var V9,kZ=_(()=>{"use strict";E3();ck();Ih();s(Z_e,"forIn");V9=Z_e});function J_e(t,e){return t&&mm(t,gm(e))}var U9,wZ=_(()=>{"use strict";sk();ck();s(J_e,"forOwn");U9=J_e});var eAe,tAe,rAe,q9,TZ=_(()=>{"use strict";Np();ZQ();eAe=Object.prototype,tAe=eAe.hasOwnProperty,rAe=QQ(function(t,e,r){tAe.call(t,r)?t[r].push(e):Jl(t,r,[e])}),q9=rAe});function nAe(t,e){return t>e}var EZ,CZ=_(()=>{"use strict";s(nAe,"baseGt");EZ=nAe});function sAe(t,e){return t!=null&&aAe.call(t,e)}var iAe,aAe,SZ,_Z=_(()=>{"use strict";iAe=Object.prototype,aAe=iAe.hasOwnProperty;s(sAe,"baseHas");SZ=sAe});function oAe(t,e){return t!=null&&nk(t,e,SZ)}var Ve,AZ=_(()=>{"use strict";_Z();N9();s(oAe,"has");Ve=oAe});function cAe(t){return typeof t=="string"||!ct(t)&&Fn(t)&&na(t)==lAe}var lAe,si,dk=_(()=>{"use strict";fu();Dn();ko();lAe="[object String]";s(cAe,"isString");si=cAe});function uAe(t,e){return bs(e,function(r){return t[r]})}var LZ,DZ=_(()=>{"use strict";kd();s(uAe,"baseValues");LZ=uAe});function hAe(t){return t==null?[]:LZ(t,kr(t))}var nr,W9=_(()=>{"use strict";DZ();oc();s(hAe,"values");nr=hAe});function dAe(t,e,r,n){t=Hn(t)?t:nr(t),r=r&&!n?sc(r):0;var i=t.length;return r<0&&(r=fAe(i+r,0)),si(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&im(t,e,r)>-1}var fAe,Rn,RZ=_(()=>{"use strict";L5();wo();dk();nm();W9();fAe=Math.max;s(dAe,"includes");Rn=dAe});function mAe(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:sc(r);return i<0&&(i=pAe(n+i,0)),im(t,e,i)}var pAe,pk,MZ=_(()=>{"use strict";L5();nm();pAe=Math.max;s(mAe,"indexOf");pk=mAe});function bAe(t){if(t==null)return!0;if(Hn(t)&&(ct(t)||typeof t=="string"||typeof t.splice=="function"||ul(t)||Rh(t)||cl(t)))return!t.length;var e=Js(t);if(e==gAe||e==yAe)return!t.size;if(ec(t))return!am(t).length;for(var r in t)if(xAe.call(t,r))return!1;return!0}var gAe,yAe,vAe,xAe,Vt,mk=_(()=>{"use strict";R5();Td();$p();Dn();wo();Vp();zp();qy();gAe="[object Map]",yAe="[object Set]",vAe=Object.prototype,xAe=vAe.hasOwnProperty;s(bAe,"isEmpty");Vt=bAe});function wAe(t){return Fn(t)&&na(t)==kAe}var kAe,IZ,NZ=_(()=>{"use strict";fu();ko();kAe="[object RegExp]";s(wAe,"baseIsRegExp");IZ=wAe});var OZ,TAe,_o,PZ=_(()=>{"use strict";NZ();ud();Uy();OZ=Eo&&Eo.isRegExp,TAe=OZ?To(OZ):IZ,_o=TAe});function EAe(t){return t===void 0}var jt,BZ=_(()=>{"use strict";s(EAe,"isUndefined");jt=EAe});function CAe(t,e){return t{"use strict";s(CAe,"baseLt");gk=CAe});function SAe(t,e){var r={};return e=tn(e,3),mm(t,function(n,i,a){Jl(r,i,e(n,i,a))}),r}var Ed,FZ=_(()=>{"use strict";Np();sk();Ua();s(SAe,"mapValues");Ed=SAe});function _Ae(t,e,r){for(var n=-1,i=t.length;++n{"use strict";bd();s(_Ae,"baseExtremum");vm=_Ae});function AAe(t){return t&&t.length?vm(t,Wi,EZ):void 0}var ws,zZ=_(()=>{"use strict";yk();CZ();mu();s(AAe,"max");ws=AAe});function LAe(t){return t&&t.length?vm(t,Wi,gk):void 0}var pl,Y9=_(()=>{"use strict";yk();H9();mu();s(LAe,"min");pl=LAe});function DAe(t,e){return t&&t.length?vm(t,tn(e,2),gk):void 0}var Cd,$Z=_(()=>{"use strict";yk();Ua();H9();s(DAe,"minBy");Cd=DAe});function MAe(t){if(typeof t!="function")throw new TypeError(RAe);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var RAe,GZ,VZ=_(()=>{"use strict";RAe="Expected a function";s(MAe,"negate");GZ=MAe});function IAe(t,e,r,n){if(!on(t))return t;e=Fh(e,t);for(var i=-1,a=e.length,o=a-1,l=t;l!=null&&++i{"use strict";Up();hv();Hy();Ws();om();s(IAe,"baseSet");UZ=IAe});function NAe(t,e,r){for(var n=-1,i=e.length,a={};++n{"use strict";fv();qZ();hv();s(NAe,"basePickBy");vk=NAe});function OAe(t,e){if(t==null)return{};var r=bs(V5(t),function(n){return[n]});return e=tn(e),vk(t,r,function(n,i){return e(n,i[0])})}var Ts,WZ=_(()=>{"use strict";kd();Ua();X9();T9();s(OAe,"pickBy");Ts=OAe});function PAe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var HZ,YZ=_(()=>{"use strict";s(PAe,"baseSortBy");HZ=PAe});function BAe(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,a=Zs(t),o=e!==void 0,l=e===null,u=e===e,h=Zs(e);if(!l&&!h&&!a&&t>e||a&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&t{"use strict";bd();s(BAe,"compareAscending");XZ=BAe});function FAe(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,l=r.length;++n=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return t.index-e.index}var KZ,QZ=_(()=>{"use strict";jZ();s(FAe,"compareMultiple");KZ=FAe});function zAe(t,e,r){e.length?e=bs(e,function(a){return ct(a)?function(o){return zh(o,a.length===1?a[0]:a)}:a}):e=[Wi];var n=-1;e=bs(e,To(tn));var i=fk(t,function(a,o,l){var u=bs(e,function(h){return h(a)});return{criteria:u,index:++n,value:a}});return HZ(i,function(a,o){return KZ(a,o,r)})}var ZZ,JZ=_(()=>{"use strict";kd();fv();Ua();$9();YZ();ud();QZ();mu();Dn();s(zAe,"baseOrderBy");ZZ=zAe});var $Ae,eJ,tJ=_(()=>{"use strict";P9();$Ae=ak("length"),eJ=$Ae});function ZAe(t){for(var e=rJ.lastIndex=0;rJ.test(t);)++e;return e}var nJ,GAe,VAe,UAe,qAe,WAe,HAe,j9,K9,YAe,iJ,aJ,sJ,XAe,oJ,lJ,jAe,KAe,QAe,rJ,cJ,uJ=_(()=>{"use strict";nJ="\\ud800-\\udfff",GAe="\\u0300-\\u036f",VAe="\\ufe20-\\ufe2f",UAe="\\u20d0-\\u20ff",qAe=GAe+VAe+UAe,WAe="\\ufe0e\\ufe0f",HAe="["+nJ+"]",j9="["+qAe+"]",K9="\\ud83c[\\udffb-\\udfff]",YAe="(?:"+j9+"|"+K9+")",iJ="[^"+nJ+"]",aJ="(?:\\ud83c[\\udde6-\\uddff]){2}",sJ="[\\ud800-\\udbff][\\udc00-\\udfff]",XAe="\\u200d",oJ=YAe+"?",lJ="["+WAe+"]?",jAe="(?:"+XAe+"(?:"+[iJ,aJ,sJ].join("|")+")"+lJ+oJ+")*",KAe=lJ+oJ+jAe,QAe="(?:"+[iJ+j9+"?",j9,aJ,sJ,HAe].join("|")+")",rJ=RegExp(K9+"(?="+K9+")|"+QAe+KAe,"g");s(ZAe,"unicodeSize");cJ=ZAe});function JAe(t){return kK(t)?cJ(t):eJ(t)}var hJ,fJ=_(()=>{"use strict";tJ();wK();uJ();s(JAe,"stringSize");hJ=JAe});function e9e(t,e){return vk(t,e,function(r,n){return ik(t,n)})}var dJ,pJ=_(()=>{"use strict";X9();O9();s(e9e,"basePick");dJ=e9e});var t9e,Sd,mJ=_(()=>{"use strict";pJ();bK();t9e=xK(function(t,e){return t==null?{}:dJ(t,e)}),Sd=t9e});function i9e(t,e,r,n){for(var i=-1,a=n9e(r9e((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}var r9e,n9e,gJ,yJ=_(()=>{"use strict";r9e=Math.ceil,n9e=Math.max;s(i9e,"baseRange");gJ=i9e});function a9e(t){return function(e,r,n){return n&&typeof n!="number"&&Hs(e,r,n)&&(r=n=void 0),e=rm(e),r===void 0?(r=e,e=0):r=rm(r),n=n===void 0?e{"use strict";yJ();fd();f9();s(a9e,"createRange");vJ=a9e});var s9e,Ao,bJ=_(()=>{"use strict";xJ();s9e=vJ(),Ao=s9e});function o9e(t,e,r,n,i){return i(t,function(a,o,l){r=n?(n=!1,a):e(r,a,o,l)}),r}var kJ,wJ=_(()=>{"use strict";s(o9e,"baseReduce");kJ=o9e});function l9e(t,e,r){var n=ct(t)?TK:kJ,i=arguments.length<3;return n(t,tn(e,4),r,i,ks)}var Or,Q9=_(()=>{"use strict";EK();Gh();Ua();wJ();Dn();s(l9e,"reduce");Or=l9e});function c9e(t,e){var r=ct(t)?um:hk;return r(t,GZ(tn(e,3)))}var qh,TJ=_(()=>{"use strict";B5();F9();Ua();Dn();VZ();s(c9e,"reject");qh=c9e});function f9e(t){if(t==null)return 0;if(Hn(t))return si(t)?hJ(t):t.length;var e=Js(t);return e==u9e||e==h9e?t.size:am(t).length}var u9e,h9e,Z9,EJ=_(()=>{"use strict";R5();Td();wo();dk();fJ();u9e="[object Map]",h9e="[object Set]";s(f9e,"size");Z9=f9e});function d9e(t,e){var r;return ks(t,function(n,i,a){return r=e(n,i,a),!r}),!!r}var CJ,SJ=_(()=>{"use strict";Gh();s(d9e,"baseSome");CJ=d9e});function p9e(t,e,r){var n=ct(t)?j5:CJ;return r&&Hs(t,e,r)&&(e=void 0),n(t,tn(e,3))}var pv,_J=_(()=>{"use strict";A9();Ua();SJ();Dn();fd();s(p9e,"some");pv=p9e});var m9e,hc,AJ=_(()=>{"use strict";cm();JZ();qp();fd();m9e=rc(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Hs(t,e[0],e[1])?e=[]:r>2&&Hs(e[0],e[1],e[2])&&(e=[e[0]]),ZZ(t,cc(e,1),[])}),hc=m9e});var g9e,y9e,LJ,DJ=_(()=>{"use strict";E9();d9();Z5();g9e=1/0,y9e=$h&&1/pm(new $h([,-0]))[1]==g9e?function(t){return new $h(t)}:zn,LJ=y9e});function x9e(t,e,r){var n=-1,i=D5,a=t.length,o=!0,l=[],u=l;if(r)o=!1,i=lk;else if(a>=v9e){var h=e?null:LJ(t);if(h)return pm(h);o=!1,i=dm,u=new fm}else u=e?[]:l;e:for(;++n{"use strict";X5();g9();B9();K5();DJ();Z5();v9e=200;s(x9e,"baseUniq");xm=x9e});var b9e,J9,RJ=_(()=>{"use strict";cm();qp();xk();I3();b9e=rc(function(t){return xm(cc(t,1,cd,!0))}),J9=b9e});function k9e(t){return t&&t.length?xm(t):[]}var bm,MJ=_(()=>{"use strict";xk();s(k9e,"uniq");bm=k9e});function w9e(t,e){return t&&t.length?xm(t,tn(e,2)):[]}var IJ,NJ=_(()=>{"use strict";Ua();xk();s(w9e,"uniqBy");IJ=w9e});function E9e(t){var e=++T9e;return I5(t)+e}var T9e,_d,OJ=_(()=>{"use strict";y9();T9e=0;s(E9e,"uniqueId");_d=E9e});function C9e(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n{"use strict";s(C9e,"baseZipObject");PJ=C9e});function S9e(t,e){return PJ(t||[],e||[],tc)}var bk,FJ=_(()=>{"use strict";Up();BJ();s(S9e,"zipObject");bk=S9e});var Tt=_(()=>{"use strict";lK();S9();fQ();dQ();tA();tZ();iZ();sZ();oZ();lZ();dZ();z9();vZ();bZ();G9();O5();uk();kZ();wZ();TZ();AZ();mu();RZ();MZ();Dn();mk();Oy();Ws();PZ();dk();BZ();oc();aZ();ym();FZ();zZ();iA();Y9();$Z();d9();JQ();mJ();WZ();bJ();Q9();TJ();EJ();_J();AJ();RJ();MJ();OJ();W9();FJ();});function $J(t,e){t[e]?t[e]++:t[e]=1}function GJ(t,e){--t[e]||delete t[e]}function mv(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}return i+zJ+a+zJ+(jt(n)?_9e:n)}function A9e(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var l={v:i,w:a};return n&&(l.name=n),l}function eL(t,e){return mv(t,e.v,e.w,e.name)}var _9e,Ad,zJ,ir,kk=_(()=>{"use strict";Tt();_9e="\0",Ad="\0",zJ="",ir=class{static{s(this,"Graph")}constructor(e={}){this._isDirected=Ve(e,"directed")?e.directed:!0,this._isMultigraph=Ve(e,"multigraph")?e.multigraph:!1,this._isCompound=Ve(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ps(void 0),this._defaultEdgeLabelFn=ps(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Ad]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return fi(e)||(e=ps(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return kr(this._nodes)}sources(){var e=this;return Nr(this.nodes(),function(r){return Vt(e._in[r])})}sinks(){var e=this;return Nr(this.nodes(),function(r){return Vt(e._out[r])})}setNodes(e,r){var n=arguments,i=this;return be(e,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(e,r){return Ve(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Ad,this._children[e]={},this._children[Ad][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Ve(this._nodes,e)}removeNode(e){var r=this;if(Ve(this._nodes,e)){var n=s(function(i){r.removeEdge(r._edgeObjs[i])},"removeEdge");delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],be(this.children(e),function(i){r.setParent(i)}),delete this._children[e]),be(kr(this._in[e]),n),delete this._in[e],delete this._preds[e],be(kr(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(jt(r))r=Ad;else{r+="";for(var n=r;!jt(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==Ad)return r}}children(e){if(jt(e)&&(e=Ad),this._isCompound){var r=this._children[e];if(r)return kr(r)}else{if(e===Ad)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return kr(r)}successors(e){var r=this._sucs[e];if(r)return kr(r)}neighbors(e){var r=this.predecessors(e);if(r)return J9(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;be(this._nodes,function(o,l){e(l)&&r.setNode(l,o)}),be(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:a(l)}return s(a,"findParent"),this._isCompound&&be(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(e){return fi(e)||(e=ps(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return nr(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return Or(e,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var e,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=""+e,r=""+r,jt(n)||(n=""+n);var l=mv(this._isDirected,e,r,n);if(Ve(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!jt(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(e,r,n);var u=A9e(this._isDirected,e,r,n);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,$J(this._preds[r],e),$J(this._sucs[e],r),this._in[r][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,r,n){var i=arguments.length===1?eL(this._isDirected,arguments[0]):mv(this._isDirected,e,r,n);return this._edgeLabels[i]}hasEdge(e,r,n){var i=arguments.length===1?eL(this._isDirected,arguments[0]):mv(this._isDirected,e,r,n);return Ve(this._edgeLabels,i)}removeEdge(e,r,n){var i=arguments.length===1?eL(this._isDirected,arguments[0]):mv(this._isDirected,e,r,n),a=this._edgeObjs[i];return a&&(e=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],GJ(this._preds[r],e),GJ(this._sucs[e],r),delete this._in[r][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var i=nr(n);return r?Nr(i,function(a){return a.v===r}):i}}outEdges(e,r){var n=this._out[e];if(n){var i=nr(n);return r?Nr(i,function(a){return a.w===r}):i}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};ir.prototype._nodeCount=0;ir.prototype._edgeCount=0;s($J,"incrementOrInitEntry");s(GJ,"decrementOrRemoveEntry");s(mv,"edgeArgsToId");s(A9e,"edgeArgsToObj");s(eL,"edgeObjToId")});var la=_(()=>{"use strict";kk()});function VJ(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function L9e(t,e){if(t!=="_next"&&t!=="_prev")return e}var wk,UJ=_(()=>{"use strict";wk=class{static{s(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return VJ(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&VJ(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,L9e)),n=n._prev;return"["+e.join(", ")+"]"}};s(VJ,"unlink");s(L9e,"filterOutLinks")});function qJ(t,e){if(t.nodeCount()<=1)return[];var r=M9e(t,e||D9e),n=R9e(r.graph,r.buckets,r.zeroIdx);return Ir(Ge(n,function(i){return t.outEdges(i.v,i.w)}))}function R9e(t,e,r){for(var n=[],i=e[e.length-1],a=e[0],o;t.nodeCount();){for(;o=a.dequeue();)tL(t,e,r,o);for(;o=i.dequeue();)tL(t,e,r,o);if(t.nodeCount()){for(var l=e.length-2;l>0;--l)if(o=e[l].dequeue(),o){n=n.concat(tL(t,e,r,o,!0));break}}}return n}function tL(t,e,r,n,i){var a=i?[]:void 0;return be(t.inEdges(n.v),function(o){var l=t.edge(o),u=t.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=l,rL(e,r,u)}),be(t.outEdges(n.v),function(o){var l=t.edge(o),u=o.w,h=t.node(u);h.in-=l,rL(e,r,h)}),t.removeNode(n.v),a}function M9e(t,e){var r=new ir,n=0,i=0;be(t.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),be(t.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=e(l),f=u+h;r.setEdge(l.v,l.w,f),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var a=Ao(i+n+3).map(function(){return new wk}),o=n+1;return be(r.nodes(),function(l){rL(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function rL(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var D9e,WJ=_(()=>{"use strict";Tt();la();UJ();D9e=ps(1);s(qJ,"greedyFAS");s(R9e,"doGreedyFAS");s(tL,"removeNode");s(M9e,"buildState");s(rL,"assignBucket")});function HJ(t){var e=t.graph().acyclicer==="greedy"?qJ(t,r(t)):I9e(t);be(e,function(n){var i=t.edge(n);t.removeEdge(n),i.forwardName=n.name,i.reversed=!0,t.setEdge(n.w,n.v,i,_d("rev"))});function r(n){return function(i){return n.edge(i).weight}}s(r,"weightFn")}function I9e(t){var e=[],r={},n={};function i(a){Ve(n,a)||(n[a]=!0,r[a]=!0,be(t.outEdges(a),function(o){Ve(r,o.w)?e.push(o):i(o.w)}),delete r[a])}return s(i,"dfs"),be(t.nodes(),i),e}function YJ(t){be(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var nL=_(()=>{"use strict";Tt();WJ();s(HJ,"run");s(I9e,"dfsFAS");s(YJ,"undo")});function fc(t,e,r,n){var i;do i=_d(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function jJ(t){var e=new ir().setGraph(t.graph());return be(t.nodes(),function(r){e.setNode(r,t.node(r))}),be(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function Tk(t){var e=new ir({multigraph:t.isMultigraph()}).setGraph(t.graph());return be(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),be(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function iL(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,l=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(o=-o),u=o,h=o*a/i),{x:r+u,y:n+h}}function Wh(t){var e=Ge(Ao(sL(t)+1),function(){return[]});return be(t.nodes(),function(r){var n=t.node(r),i=n.rank;jt(i)||(e[i][n.order]=r)}),e}function KJ(t){var e=pl(Ge(t.nodes(),function(r){return t.node(r).rank}));be(t.nodes(),function(r){var n=t.node(r);Ve(n,"rank")&&(n.rank-=e)})}function QJ(t){var e=pl(Ge(t.nodes(),function(a){return t.node(a).rank})),r=[];be(t.nodes(),function(a){var o=t.node(a).rank-e;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=t.graph().nodeRankFactor;be(r,function(a,o){jt(a)&&o%i!==0?--n:n&&be(a,function(l){t.node(l).rank+=n})})}function aL(t,e,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),fc(t,"border",i,e)}function sL(t){return ws(Ge(t.nodes(),function(e){var r=t.node(e).rank;if(!jt(r))return r}))}function ZJ(t,e){var r={lhs:[],rhs:[]};return be(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}function JJ(t,e){var r=ok();try{return e()}finally{console.log(t+" time: "+(ok()-r)+"ms")}}function eee(t,e){return e()}var dc=_(()=>{"use strict";Tt();la();s(fc,"addDummyNode");s(jJ,"simplify");s(Tk,"asNonCompoundGraph");s(iL,"intersectRect");s(Wh,"buildLayerMatrix");s(KJ,"normalizeRanks");s(QJ,"removeEmptyRanks");s(aL,"addBorderNode");s(sL,"maxRank");s(ZJ,"partition");s(JJ,"time");s(eee,"notime")});function ree(t){function e(r){var n=t.children(r),i=t.node(r);if(n.length&&be(n,e),Ve(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a{"use strict";Tt();dc();s(ree,"addBorderSegments");s(tee,"addBorderNode")});function aee(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&oee(t)}function see(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&N9e(t),(e==="lr"||e==="rl")&&(O9e(t),oee(t))}function oee(t){be(t.nodes(),function(e){iee(t.node(e))}),be(t.edges(),function(e){iee(t.edge(e))})}function iee(t){var e=t.width;t.width=t.height,t.height=e}function N9e(t){be(t.nodes(),function(e){oL(t.node(e))}),be(t.edges(),function(e){var r=t.edge(e);be(r.points,oL),Ve(r,"y")&&oL(r)})}function oL(t){t.y=-t.y}function O9e(t){be(t.nodes(),function(e){lL(t.node(e))}),be(t.edges(),function(e){var r=t.edge(e);be(r.points,lL),Ve(r,"x")&&lL(r)})}function lL(t){var e=t.x;t.x=t.y,t.y=e}var lee=_(()=>{"use strict";Tt();s(aee,"adjust");s(see,"undo");s(oee,"swapWidthHeight");s(iee,"swapWidthHeightOne");s(N9e,"reverseY");s(oL,"reverseYOne");s(O9e,"swapXY");s(lL,"swapXYOne")});function cee(t){t.graph().dummyChains=[],be(t.edges(),function(e){B9e(t,e)})}function B9e(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,o=e.name,l=t.edge(e),u=l.labelRank;if(a!==n+1){t.removeEdge(e);var h,f,d;for(d=0,++n;n{"use strict";Tt();dc();s(cee,"run");s(B9e,"normalizeEdge");s(uee,"undo")});function gv(t){var e={};function r(n){var i=t.node(n);if(Ve(e,n))return i.rank;e[n]=!0;var a=pl(Ge(t.outEdges(n),function(o){return r(o.w)-t.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}s(r,"dfs"),be(t.sources(),r)}function Ld(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var Ek=_(()=>{"use strict";Tt();s(gv,"longestPath");s(Ld,"slack")});function Ck(t){var e=new ir({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var i,a;F9e(e,t){"use strict";Tt();la();Ek();s(Ck,"feasibleTree");s(F9e,"tightTree");s(z9e,"findMinSlackEdge");s($9e,"shiftRanks")});var fee=_(()=>{"use strict"});var hL=_(()=>{"use strict"});var sPt,fL=_(()=>{"use strict";Tt();hL();sPt=ps(1)});var dee=_(()=>{"use strict";fL()});var dL=_(()=>{"use strict"});var pee=_(()=>{"use strict";dL()});var yPt,mee=_(()=>{"use strict";Tt();yPt=ps(1)});function pL(t){var e={},r={},n=[];function i(a){if(Ve(r,a))throw new yv;Ve(e,a)||(r[a]=!0,e[a]=!0,be(t.predecessors(a),i),delete r[a],n.push(a))}if(s(i,"visit"),be(t.sinks(),i),Z9(e)!==t.nodeCount())throw new yv;return n}function yv(){}var mL=_(()=>{"use strict";Tt();pL.CycleException=yv;s(pL,"topsort");s(yv,"CycleException");yv.prototype=new Error});var gee=_(()=>{"use strict";mL()});function Sk(t,e,r){ct(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return be(e,function(o){if(!t.hasNode(o))throw new Error("Graph does not have node: "+o);yee(t,o,r==="post",a,n,i)}),i}function yee(t,e,r,n,i,a){Ve(n,e)||(n[e]=!0,r||a.push(e),be(i(e),function(o){yee(t,o,r,n,i,a)}),r&&a.push(e))}var gL=_(()=>{"use strict";Tt();s(Sk,"dfs");s(yee,"doDfs")});function yL(t,e){return Sk(t,e,"post")}var vee=_(()=>{"use strict";gL();s(yL,"postorder")});function vL(t,e){return Sk(t,e,"pre")}var xee=_(()=>{"use strict";gL();s(vL,"preorder")});var bee=_(()=>{"use strict";hL();kk()});var kee=_(()=>{"use strict";fee();fL();dee();pee();mee();gee();vee();xee();bee();dL();mL()});function Yh(t){t=jJ(t),gv(t);var e=Ck(t);bL(e),xL(e,t);for(var r,n;r=Cee(e);)n=See(e,t,r),_ee(e,t,r,n)}function xL(t,e){var r=yL(t,t.nodes());r=r.slice(0,r.length-1),be(r,function(n){W9e(t,e,n)})}function W9e(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=Tee(t,e,r)}function Tee(t,e,r){var n=t.node(r),i=n.parent,a=!0,o=e.edge(r,i),l=0;return o||(a=!1,o=e.edge(i,r)),l=o.weight,be(e.nodeEdges(r),function(u){var h=u.v===r,f=h?u.w:u.v;if(f!==i){var d=h===a,p=e.edge(u).weight;if(l+=d?p:-p,Y9e(t,r,f)){var m=t.edge(r,f).cutvalue;l+=d?-m:m}}}),l}function bL(t,e){arguments.length<2&&(e=t.nodes()[0]),Eee(t,{},1,e)}function Eee(t,e,r,n,i){var a=r,o=t.node(n);return e[n]=!0,be(t.neighbors(n),function(l){Ve(e,l)||(r=Eee(t,e,r,l,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function Cee(t){return qa(t.edges(),function(e){return t.edge(e).cutvalue<0})}function See(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),o=t.node(i),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=Nr(e.edges(),function(f){return u===wee(t,t.node(f.v),l)&&u!==wee(t,t.node(f.w),l)});return Cd(h,function(f){return Ld(e,f)})}function _ee(t,e,r,n){var i=r.v,a=r.w;t.removeEdge(i,a),t.setEdge(n.v,n.w,{}),bL(t),xL(t,e),H9e(t,e)}function H9e(t,e){var r=qa(t.nodes(),function(i){return!e.node(i).parent}),n=vL(t,r);n=n.slice(1),be(n,function(i){var a=t.node(i).parent,o=e.edge(i,a),l=!1;o||(o=e.edge(a,i),l=!0),e.node(i).rank=e.node(a).rank+(l?o.minlen:-o.minlen)})}function Y9e(t,e,r){return t.hasEdge(e,r)}function wee(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var Aee=_(()=>{"use strict";Tt();kee();dc();uL();Ek();Yh.initLowLimValues=bL;Yh.initCutValues=xL;Yh.calcCutValue=Tee;Yh.leaveEdge=Cee;Yh.enterEdge=See;Yh.exchangeEdges=_ee;s(Yh,"networkSimplex");s(xL,"initCutValues");s(W9e,"assignCutValue");s(Tee,"calcCutValue");s(bL,"initLowLimValues");s(Eee,"dfsAssignLowLim");s(Cee,"leaveEdge");s(See,"enterEdge");s(_ee,"exchangeEdges");s(H9e,"updateRanks");s(Y9e,"isTreeEdge");s(wee,"isDescendant")});function kL(t){switch(t.graph().ranker){case"network-simplex":Lee(t);break;case"tight-tree":j9e(t);break;case"longest-path":X9e(t);break;default:Lee(t)}}function j9e(t){gv(t),Ck(t)}function Lee(t){Yh(t)}var X9e,wL=_(()=>{"use strict";uL();Aee();Ek();s(kL,"rank");X9e=gv;s(j9e,"tightTreeRanker");s(Lee,"networkSimplexRanker")});function Dee(t){var e=fc(t,"root",{},"_root"),r=K9e(t),n=ws(nr(r))-1,i=2*n+1;t.graph().nestingRoot=e,be(t.edges(),function(o){t.edge(o).minlen*=i});var a=Q9e(t)+1;be(t.children(),function(o){Ree(t,e,i,a,n,r,o)}),t.graph().nodeRankFactor=i}function Ree(t,e,r,n,i,a,o){var l=t.children(o);if(!l.length){o!==e&&t.setEdge(e,o,{weight:0,minlen:r});return}var u=aL(t,"_bt"),h=aL(t,"_bb"),f=t.node(o);t.setParent(u,o),f.borderTop=u,t.setParent(h,o),f.borderBottom=h,be(l,function(d){Ree(t,e,r,n,i,a,d);var p=t.node(d),m=p.borderTop?p.borderTop:d,g=p.borderBottom?p.borderBottom:d,y=p.borderTop?n:2*n,v=m!==g?1:i-a[o]+1;t.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0})}),t.parent(o)||t.setEdge(e,u,{weight:0,minlen:i+a[o]})}function K9e(t){var e={};function r(n,i){var a=t.children(n);a&&a.length&&be(a,function(o){r(o,i+1)}),e[n]=i}return s(r,"dfs"),be(t.children(),function(n){r(n,1)}),e}function Q9e(t){return Or(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function Mee(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,be(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}var Iee=_(()=>{"use strict";Tt();dc();s(Dee,"run");s(Ree,"dfs");s(K9e,"treeDepths");s(Q9e,"sumWeights");s(Mee,"cleanup")});function Nee(t,e,r){var n={},i;be(r,function(a){for(var o=t.parent(a),l,u;o;){if(l=t.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){e.setEdge(u,o);return}o=l}})}var Oee=_(()=>{"use strict";Tt();s(Nee,"addSubgraphConstraints")});function Pee(t,e,r){var n=J9e(t),i=new ir({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return t.node(a)});return be(t.nodes(),function(a){var o=t.node(a),l=t.parent(a);(o.rank===e||o.minRank<=e&&e<=o.maxRank)&&(i.setNode(a),i.setParent(a,l||n),be(t[r](a),function(u){var h=u.v===a?u.w:u.v,f=i.edge(h,a),d=jt(f)?0:f.weight;i.setEdge(h,a,{weight:t.edge(u).weight+d})}),Ve(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[e],borderRight:o.borderRight[e]}))}),i}function J9e(t){for(var e;t.hasNode(e=_d("_root")););return e}var Bee=_(()=>{"use strict";Tt();la();s(Pee,"buildLayerGraph");s(J9e,"createRootNode")});function Fee(t,e){for(var r=0,n=1;n0;)f%2&&(d+=l[f+1]),f=f-1>>1,l[f]+=h.weight;u+=h.weight*d})),u}var zee=_(()=>{"use strict";Tt();s(Fee,"crossCount");s(eLe,"twoLayerCrossCount")});function $ee(t){var e={},r=Nr(t.nodes(),function(l){return!t.children(l).length}),n=ws(Ge(r,function(l){return t.node(l).rank})),i=Ge(Ao(n+1),function(){return[]});function a(l){if(!Ve(e,l)){e[l]=!0;var u=t.node(l);i[u.rank].push(l),be(t.successors(l),a)}}s(a,"dfs");var o=hc(r,function(l){return t.node(l).rank});return be(o,a),i}var Gee=_(()=>{"use strict";Tt();s($ee,"initOrder")});function Vee(t,e){return Ge(e,function(r){var n=t.inEdges(r);if(n.length){var i=Or(n,function(a,o){var l=t.edge(o),u=t.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var Uee=_(()=>{"use strict";Tt();s(Vee,"barycenter")});function qee(t,e){var r={};be(t,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};jt(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),be(e.edges(),function(i){var a=r[i.v],o=r[i.w];!jt(a)&&!jt(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=Nr(r,function(i){return!i.indegree});return tLe(n)}function tLe(t){var e=[];function r(a){return function(o){o.merged||(jt(o.barycenter)||jt(a.barycenter)||o.barycenter>=a.barycenter)&&rLe(a,o)}}s(r,"handleIn");function n(a){return function(o){o.in.push(a),--o.indegree===0&&t.push(o)}}for(s(n,"handleOut");t.length;){var i=t.pop();e.push(i),be(i.in.reverse(),r(i)),be(i.out,n(i))}return Ge(Nr(e,function(a){return!a.merged}),function(a){return Sd(a,["vs","i","barycenter","weight"])})}function rLe(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var Wee=_(()=>{"use strict";Tt();s(qee,"resolveConflicts");s(tLe,"doResolveConflicts");s(rLe,"mergeEntries")});function Yee(t,e){var r=ZJ(t,function(f){return Ve(f,"barycenter")}),n=r.lhs,i=hc(r.rhs,function(f){return-f.i}),a=[],o=0,l=0,u=0;n.sort(nLe(!!e)),u=Hee(a,i,u),be(n,function(f){u+=f.vs.length,a.push(f.vs),o+=f.barycenter*f.weight,l+=f.weight,u=Hee(a,i,u)});var h={vs:Ir(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function Hee(t,e,r){for(var n;e.length&&(n=sa(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function nLe(t){return function(e,r){return e.barycenterr.barycenter?1:t?r.i-e.i:e.i-r.i}}var Xee=_(()=>{"use strict";Tt();dc();s(Yee,"sort");s(Hee,"consumeUnsortable");s(nLe,"compareWithBias")});function TL(t,e,r,n){var i=t.children(e),a=t.node(e),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(i=Nr(i,function(g){return g!==o&&g!==l}));var h=Vee(t,i);be(h,function(g){if(t.children(g.v).length){var y=TL(t,g.v,r,n);u[g.v]=y,Ve(y,"barycenter")&&aLe(g,y)}});var f=qee(h,r);iLe(f,u);var d=Yee(f,n);if(o&&(d.vs=Ir([o,d.vs,l]),t.predecessors(o).length)){var p=t.node(t.predecessors(o)[0]),m=t.node(t.predecessors(l)[0]);Ve(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+p.order+m.order)/(d.weight+2),d.weight+=2}return d}function iLe(t,e){be(t,function(r){r.vs=Ir(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}function aLe(t,e){jt(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var jee=_(()=>{"use strict";Tt();Uee();Wee();Xee();s(TL,"sortSubgraph");s(iLe,"expandSubgraphs");s(aLe,"mergeBarycenters")});function Zee(t){var e=sL(t),r=Kee(t,Ao(1,e+1),"inEdges"),n=Kee(t,Ao(e-1,-1,-1),"outEdges"),i=$ee(t);Qee(t,i);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){sLe(l%2?r:n,l%4>=2),i=Wh(t);var h=Fee(t,i);h{"use strict";Tt();la();dc();Oee();Bee();zee();Gee();jee();s(Zee,"order");s(Kee,"buildLayerGraphs");s(sLe,"sweepLayerGraphs");s(Qee,"assignOrder")});function ete(t){var e=lLe(t);be(t.graph().dummyChains,function(r){for(var n=t.node(r),i=n.edgeObj,a=oLe(t,e,i.v,i.w),o=a.path,l=a.lca,u=0,h=o[u],f=!0;r!==i.w;){if(n=t.node(r),f){for(;(h=o[u])!==l&&t.node(h).maxRanko||l>e[u].lim));for(h=u,u=n;(u=t.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h}}function lLe(t){var e={},r=0;function n(i){var a=r;be(t.children(i),n),e[i]={low:a,lim:r++}}return s(n,"dfs"),be(t.children(),n),e}var tte=_(()=>{"use strict";Tt();s(ete,"parentDummyChains");s(oLe,"findPath");s(lLe,"postorder")});function cLe(t,e){var r={};function n(i,a){var o=0,l=0,u=i.length,h=sa(a);return be(a,function(f,d){var p=hLe(t,f),m=p?t.node(p).order:u;(p||f===h)&&(be(a.slice(l,d+1),function(g){be(t.predecessors(g),function(y){var v=t.node(y),x=v.order;(xh)&&rte(r,p,f)})})}s(n,"scan");function i(a,o){var l=-1,u,h=0;return be(o,function(f,d){if(t.node(f).dummy==="border"){var p=t.predecessors(f);p.length&&(u=t.node(p[0]).order,n(o,h,d,l,u),h=d,l=u)}n(o,h,o.length,u,a.length)}),o}return s(i,"visitLayer"),Or(e,i),r}function hLe(t,e){if(t.node(e).dummy)return qa(t.predecessors(e),function(r){return t.node(r).dummy})}function rte(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function fLe(t,e,r){if(e>r){var n=e;e=r,r=n}return Ve(t[e],r)}function dLe(t,e,r,n){var i={},a={},o={};return be(e,function(l){be(l,function(u,h){i[u]=u,a[u]=u,o[u]=h})}),be(e,function(l){var u=-1;be(l,function(h){var f=n(h);if(f.length){f=hc(f,function(y){return o[y]});for(var d=(f.length-1)/2,p=Math.floor(d),m=Math.ceil(d);p<=m;++p){var g=f[p];a[h]===h&&u{"use strict";Tt();la();dc();s(cLe,"findType1Conflicts");s(uLe,"findType2Conflicts");s(hLe,"findOtherInnerSegmentNode");s(rte,"addConflict");s(fLe,"hasConflict");s(dLe,"verticalAlignment");s(pLe,"horizontalCompaction");s(mLe,"buildBlockGraph");s(gLe,"findSmallestWidthAlignment");s(yLe,"alignCoordinates");s(vLe,"balance");s(nte,"positionX");s(xLe,"sep");s(bLe,"width")});function ate(t){t=Tk(t),kLe(t),U9(nte(t),function(e,r){t.node(r).x=e})}function kLe(t){var e=Wh(t),r=t.graph().ranksep,n=0;be(e,function(i){var a=ws(Ge(i,function(o){return t.node(o).height}));be(i,function(o){t.node(o).y=n+a/2}),n+=a+r})}var ste=_(()=>{"use strict";Tt();dc();ite();s(ate,"position");s(kLe,"positionY")});function eo(t,e){var r=e&&e.debugTiming?JJ:eee;r("layout",function(){var n=r(" buildLayoutGraph",function(){return MLe(t)});r(" runLayout",function(){wLe(n,r)}),r(" updateInputGraph",function(){TLe(t,n)})})}function wLe(t,e){e(" makeSpaceForEdgeLabels",function(){ILe(t)}),e(" removeSelfEdges",function(){VLe(t)}),e(" acyclic",function(){HJ(t)}),e(" nestingGraph.run",function(){Dee(t)}),e(" rank",function(){kL(Tk(t))}),e(" injectEdgeLabelProxies",function(){NLe(t)}),e(" removeEmptyRanks",function(){QJ(t)}),e(" nestingGraph.cleanup",function(){Mee(t)}),e(" normalizeRanks",function(){KJ(t)}),e(" assignRankMinMax",function(){OLe(t)}),e(" removeEdgeLabelProxies",function(){PLe(t)}),e(" normalize.run",function(){cee(t)}),e(" parentDummyChains",function(){ete(t)}),e(" addBorderSegments",function(){ree(t)}),e(" order",function(){Zee(t)}),e(" insertSelfEdges",function(){ULe(t)}),e(" adjustCoordinateSystem",function(){aee(t)}),e(" position",function(){ate(t)}),e(" positionSelfEdges",function(){qLe(t)}),e(" removeBorderNodes",function(){GLe(t)}),e(" normalize.undo",function(){uee(t)}),e(" fixupEdgeLabelCoords",function(){zLe(t)}),e(" undoCoordinateSystem",function(){see(t)}),e(" translateGraph",function(){BLe(t)}),e(" assignNodeIntersects",function(){FLe(t)}),e(" reversePoints",function(){$Le(t)}),e(" acyclic.undo",function(){YJ(t)})}function TLe(t,e){be(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),be(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,Ve(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function MLe(t){var e=new ir({multigraph:!0,compound:!0}),r=CL(t.graph());return e.setGraph(Nh({},CLe,EL(r,ELe),Sd(r,SLe))),be(t.nodes(),function(n){var i=CL(t.node(n));e.setNode(n,Vh(EL(i,_Le),ALe)),e.setParent(n,t.parent(n))}),be(t.edges(),function(n){var i=CL(t.edge(n));e.setEdge(n,Nh({},DLe,EL(i,LLe),Sd(i,RLe)))}),e}function ILe(t){var e=t.graph();e.ranksep/=2,be(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function NLe(t){be(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e};fc(t,"edge-proxy",a,"_ep")}})}function OLe(t){var e=0;be(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=ws(e,n.maxRank))}),t.graph().maxRank=e}function PLe(t){be(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function BLe(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=t.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var f=h.x,d=h.y,p=h.width,m=h.height;e=Math.min(e,f-p/2),r=Math.max(r,f+p/2),n=Math.min(n,d-m/2),i=Math.max(i,d+m/2)}s(u,"getExtremes"),be(t.nodes(),function(h){u(t.node(h))}),be(t.edges(),function(h){var f=t.edge(h);Ve(f,"x")&&u(f)}),e-=o,n-=l,be(t.nodes(),function(h){var f=t.node(h);f.x-=e,f.y-=n}),be(t.edges(),function(h){var f=t.edge(h);be(f.points,function(d){d.x-=e,d.y-=n}),Ve(f,"x")&&(f.x-=e),Ve(f,"y")&&(f.y-=n)}),a.width=r-e+o,a.height=i-n+l}function FLe(t){be(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),i=t.node(e.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(iL(n,a)),r.points.push(iL(i,o))})}function zLe(t){be(t.edges(),function(e){var r=t.edge(e);if(Ve(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function $Le(t){be(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function GLe(t){be(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(sa(r.borderLeft)),o=t.node(sa(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),be(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function VLe(t){be(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function ULe(t){var e=Wh(t);be(e,function(r){var n=0;be(r,function(i,a){var o=t.node(i);o.order=a+n,be(o.selfEdges,function(l){fc(t,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function qLe(t){be(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,l=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:i+2*o/3,y:a-l},{x:i+5*o/6,y:a-l},{x:i+o,y:a},{x:i+5*o/6,y:a+l},{x:i+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function EL(t,e){return Ed(Sd(t,e),Number)}function CL(t){var e={};return be(t,function(r,n){e[n.toLowerCase()]=r}),e}var ELe,CLe,SLe,_Le,ALe,LLe,DLe,RLe,ote=_(()=>{"use strict";Tt();la();nee();lee();nL();cL();wL();Iee();Jee();tte();ste();dc();s(eo,"layout");s(wLe,"runLayout");s(TLe,"updateInputGraph");ELe=["nodesep","edgesep","ranksep","marginx","marginy"],CLe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},SLe=["acyclicer","ranker","rankdir","align"],_Le=["width","height"],ALe={width:0,height:0},LLe=["minlen","weight","width","height","labeloffset"],DLe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},RLe=["labelpos"];s(MLe,"buildLayoutGraph");s(ILe,"makeSpaceForEdgeLabels");s(NLe,"injectEdgeLabelProxies");s(OLe,"assignRankMinMax");s(PLe,"removeEdgeLabelProxies");s(BLe,"translateGraph");s(FLe,"assignNodeIntersects");s(zLe,"fixupEdgeLabelCoords");s($Le,"reversePointsForReversedEdges");s(GLe,"removeBorderNodes");s(VLe,"removeSelfEdges");s(ULe,"insertSelfEdges");s(qLe,"positionSelfEdges");s(EL,"selectNumberAttrs");s(CL,"canonicalize")});var Dd=_(()=>{"use strict";nL();ote();cL();wL()});function Mn(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:WLe(t),edges:HLe(t)};return jt(t.graph())||(e.value=Hr(t.graph())),e}function WLe(t){return Ge(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return jt(r)||(i.value=r),jt(n)||(i.parent=n),i})}function HLe(t){return Ge(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return jt(e.name)||(n.name=e.name),jt(r)||(n.value=r),n})}var vv=_(()=>{"use strict";Tt();kk();s(Mn,"write");s(WLe,"writeNodes");s(HLe,"writeEdges")});var Yt,Rd,lte,cte,Lk,YLe,ute,hte,XLe,km,Ak,fte,dte,pte,mte,gte=_(()=>{"use strict";it();la();vv();Yt=new Map,Rd=new Map,lte=new Map,cte=s(()=>{Rd.clear(),lte.clear(),Yt.clear()},"clear"),Lk=s((t,e)=>{let r=Rd.get(e)||[];return V.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),YLe=s((t,e)=>{let r=Rd.get(e)||[];return V.info("Descendants of ",e," is ",r),V.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||Lk(t.v,e)||Lk(t.w,e)||r.includes(t.w):(V.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),ute=s((t,e,r,n)=>{V.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),V.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)ute(a,e,r,n);else{let o=e.node(a);V.info("cp ",a," to ",n," with parent ",t),r.setNode(a,o),n!==e.parent(a)&&(V.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(V.debug("Setting parent",a,t),r.setParent(a,t)):(V.info("In copy ",t,"root",n,"data",e.node(t),n),V.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);V.debug("Copying Edges",l),l.forEach(u=>{V.info("Edge",u);let h=e.edge(u.v,u.w,u.name);V.info("Edge data",h,n);try{YLe(u,n)?(V.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),V.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):V.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(f){V.error(f)}})}V.debug("Removing node",a),e.removeNode(a)})},"copy"),hte=s((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)lte.set(i,t),n=[...n,...hte(i,e)];return n},"extractDescendants"),XLe=s((t,e,r)=>{let n=t.edges().filter(u=>u.v===e||u.w===e),i=t.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===e?r:u.v,w:u.w===e?e:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),km=s((t,e,r)=>{let n=e.children(t);if(V.trace("Searching children of id ",t,n),n.length<1)return t;let i;for(let a of n){let o=km(a,e,r),l=XLe(e,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),Ak=s(t=>!Yt.has(t)||!Yt.get(t).externalConnections?t:Yt.has(t)?Yt.get(t).id:t,"getAnchorId"),fte=s((t,e)=>{if(!t||e>10){V.debug("Opting out, no graph ");return}else V.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(V.warn("Cluster identified",r," Replacement id in edges: ",km(r,t,r)),Rd.set(r,hte(r,t)),Yt.set(r,{id:km(r,t,r),clusterData:t.node(r)}))}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(V.debug("Cluster identified",r,Rd),i.forEach(a=>{let o=Lk(a.v,r),l=Lk(a.w,r);o^l&&(V.warn("Edge: ",a," leaves cluster ",r),V.warn("Descendants of XXX ",r,": ",Rd.get(r)),Yt.get(r).externalConnections=!0)})):V.debug("Not a cluster ",r,Rd)});for(let r of Yt.keys()){let n=Yt.get(r).id,i=t.parent(n);i!==r&&Yt.has(i)&&!Yt.get(i).externalConnections&&(Yt.get(r).id=i)}t.edges().forEach(function(r){let n=t.edge(r);V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(V.warn("Fix XXX",Yt,"ids:",r.v,r.w,"Translating: ",Yt.get(r.v)," --- ",Yt.get(r.w)),Yt.get(r.v)&&Yt.get(r.w)&&Yt.get(r.v)===Yt.get(r.w)){V.warn("Fixing and trying link to self - removing XXX",r.v,r.w,r.name),V.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Ak(r.v),a=Ak(r.w),t.removeEdge(r.v,r.w,r.name);let o=r.w+"---"+r.v+"---1",l=r.w+"---"+r.v+"---2";t.setNode(o,{domId:o,id:o,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setNode(l,{domId:l,id:l,labelStyle:"",padding:0,shape:"labelRect",style:"",width:10,height:10});let u=structuredClone(n),h=structuredClone(n),f=structuredClone(n);u.label="",u.arrowTypeEnd="none",u.id=r.name+"-cyclic-special-1",h.arrowTypeEnd="none",h.id=r.name+"-cyclic-special-mid",f.label="",u.fromCluster=r.v,f.toCluster=r.v,f.id=r.name+"-cyclic-special-2",t.setEdge(i,o,u,r.name+"-cyclic-special-0"),t.setEdge(o,l,h,r.name+"-cyclic-special-1"),t.setEdge(l,a,f,r.name+"-cyclic-special-2")}else if(Yt.get(r.v)||Yt.get(r.w)){if(V.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Ak(r.v),a=Ak(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let o=t.parent(i);Yt.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=t.parent(a);Yt.get(o).externalConnections=!0,n.toCluster=r.w}V.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),V.warn("Adjusted Graph",Mn(t)),dte(t,0),V.trace(Yt)},"adjustClustersAndEdges"),dte=s((t,e)=>{if(V.warn("extractor - ",e,Mn(t),t.children("D")),e>10){V.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){V.debug("Done, no node has children",t.nodes());return}V.debug("Nodes = ",r,e);for(let i of r)if(V.debug("Extracting node",i,Yt,Yt.has(i)&&!Yt.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Yt.has(i))V.debug("Not a cluster",i,e);else if(!Yt.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){V.warn("Cluster without external connections, without a parent and with children",i,e);let o=t.graph().rankdir==="TB"?"LR":"TB";Yt.get(i)?.clusterData?.dir&&(o=Yt.get(i).clusterData.dir,V.warn("Fixing dir",Yt.get(i).clusterData.dir,o));let l=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});V.warn("Old graph before copy",Mn(t)),ute(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Yt.get(i).clusterData,label:Yt.get(i).label,graph:l}),V.warn("New graph after copy node: (",i,")",Mn(l)),V.debug("Old graph after copy",Mn(t))}else V.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Yt.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),V.debug(Yt);r=t.nodes(),V.warn("New list of nodes",r);for(let i of r){let a=t.node(i);V.warn(" Now next level",i,a),a.clusterNode&&dte(a.graph,e+1)}},"extractor"),pte=s((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{let i=t.children(n),a=pte(t,i);r=[...r,...a]}),r},"sorter"),mte=s(t=>pte(t,t.children()),"sortNodesByHierarchy")});var vte={};ur(vte,{render:()=>jLe});var yte,jLe,xte=_(()=>{"use strict";Dd();vv();la();o9();Xn();gte();h9();i9();s9();it();gd();gt();yte=s(async(t,e,r,n,i,a)=>{V.info("Graph in recursive render: XXX",Mn(e),i);let o=e.graph().rankdir;V.trace("Dir in recursive render - dir:",o);let l=t.insert("g").attr("class","root");e.nodes()?V.info("Recursive render XXX",e.nodes()):V.info("No nodes found for",e),e.edges().length>0&&V.info("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(y){let v=e.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));V.trace(`Setting data for parent cluster XXX + Node.id = `,y,` + data=`,x.height,` +Parent cluster`,i.height),e.setNode(i.id,x),e.parent(y)||(V.trace("Setting parent",y,i.id),e.setParent(y,i.id,x))}if(V.info("(Insert) Node XXX"+y+": "+JSON.stringify(e.node(y))),v?.clusterNode){V.info("Cluster identified XBX",y,v.width,e.node(y));let{ranksep:x,nodesep:b}=e.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let k=await yte(d,v.graph,r,n,e.node(y),a),A=k.elem;er(v,A),v.diff=k.diff||0,V.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),Fj(A,v)}else e.children(y).length>0?(V.info("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",e),V.info(km(v.id,e)),Yt.set(v.id,{id:km(v.id,e),node:v})):(V.trace("Node - the non recursive path XAX",y,v.id,v),await C5(d,e.node(y),o))})),await s(async()=>{let y=e.edges().map(async function(v){let x=e.edge(v.v,v.w,v.name);V.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),V.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(e.edge(v))),V.info("Fix",Yt,"ids:",v.v,v.w,"Translating: ",Yt.get(v.v),Yt.get(v.w)),await b5(f,x)});await Promise.all(y)},"processEdges")(),V.info("Graph before layout:",JSON.stringify(Mn(e))),V.info("############################################# XXX"),V.info("### Layout ### XXX"),V.info("############################################# XXX"),eo(e),V.info("Graph after layout:",JSON.stringify(Mn(e)));let m=0,{subGraphTitleTotalMargin:g}=Ks(a);return await Promise.all(mte(e).map(async function(y){let v=e.node(y);if(V.info("Position XBX => "+y+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=g,V.info("A tainted cluster node XBX1",y,v.id,v.width,v.height,v.x,v.y,e.parent(y)),Yt.get(v.id).node=v,u9(v);else if(e.children(y).length>0){V.info("A pure cluster node XBX1",y,v.id,v.x,v.y,v.width,v.height,e.parent(y)),v.height+=g,e.node(v.parentId);let x=v?.padding/2||0,b=v?.labelBBox?.height||0,k=b-x||0;V.debug("OffsetY",k,"labelHeight",b,"halfPadding",x),await p5(u,v),Yt.get(v.id).node=v}else{let x=e.node(v.parentId);v.y+=g/2,V.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",x,x?.offsetY,v),u9(v)}})),e.edges().forEach(function(y){let v=e.edge(y);V.info("Edge "+y.v+" -> "+y.w+": "+JSON.stringify(v),v),v.points.forEach(A=>A.y+=g/2);let x=e.node(y.v);var b=e.node(y.w);let k=w5(h,v,Yt,r,x,b,n);k5(v,k)}),e.nodes().forEach(function(y){let v=e.node(y);V.info(y,v.type,v.diff),v.isGroup&&(m=v.diff)}),V.warn("Returning from recursive render XAX",l,m),{elem:l,diff:m}},"recursiveRender"),jLe=s(async(t,e)=>{let r=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");T5(n,t.markers,t.type,t.diagramId),zj(),FX(),MX(),cte(),t.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),V.debug("Edges:",t.edges),t.edges.forEach(a=>{r.setEdge(a.start,a.end,{...a},a.id)}),V.warn("Graph at first:",JSON.stringify(Mn(r))),fte(r),V.warn("Graph after:",JSON.stringify(Mn(r)));let i=le();await yte(n,r,t.type,t.diagramId,void 0,i)},"render")});var xv,SL,KLe,Dk,bte,Rk=_(()=>{"use strict";Gj();it();xv={},SL=s(t=>{for(let e of t)xv[e.name]=e},"registerLayoutLoaders"),KLe=s(()=>{SL([{name:"dagre",loader:s(async()=>await Promise.resolve().then(()=>(xte(),vte)),"loader")}])},"registerDefaultLayoutLoaders");KLe();Dk=s(async(t,e)=>{if(!(t.layoutAlgorithm in xv))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);let r=xv[t.layoutAlgorithm];return(await r.loader()).render(t,e,$j,{algorithm:r.algorithm})},"render"),bte=s((t="",{fallback:e="dagre"}={})=>{if(t in xv)return t;if(e in xv)return V.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")});var Mk,QLe,ZLe,_L=_(()=>{"use strict";Un();it();Mk=s((t,e,r,n)=>{t.attr("class",r);let{width:i,height:a,x:o,y:l}=QLe(t,e);xr(t,a,i,n);let u=ZLe(o,l,i,a,e);t.attr("viewBox",u),V.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),QLe=s((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),ZLe=s((t,e,r,n,i)=>`${t-i} ${e-i} ${r} ${n}`,"createViewBox")});var JLe,eDe,kte,wte=_(()=>{"use strict";Xt();gt();it();zA();Rk();_L();pr();wA();JLe=s(function(t,e){return e.db.getClasses()},"getClasses"),eDe=s(async function(t,e,r,n){V.info("REF0:"),V.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:o}=le(),l;i==="sandbox"&&(l=Me("#i"+e));let u=i==="sandbox"?l.nodes()[0].contentDocument:document;V.debug("Before getData: ");let h=n.db.getData();V.debug("Data: ",h);let f=n5(e,i),d=kA();h.type=n.type,h.layoutAlgorithm=bte(o),h.layoutAlgorithm==="dagre"&&o==="elk"&&V.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=e,V.debug("REF1:",h),await Dk(h,f);let p=h.config.flowchart?.diagramPadding??8;dt.insertTitle(f,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Mk(f,p,"flowchart",a?.useMaxWidth||!1);for(let m of h.nodes){let g=Me(`#${e} [id="${m.id}"]`);if(!g||!m.link)continue;let y=u.createElementNS("http://www.w3.org/2000/svg","a");y.setAttributeNS("http://www.w3.org/2000/svg","class",m.cssClasses),y.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?y.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):m.linkTarget&&y.setAttributeNS("http://www.w3.org/2000/svg","target",m.linkTarget);let v=g.insert(function(){return y},":first-child"),x=g.select(".label-container");x&&v.append(function(){return x.node()});let b=g.select(".label");b&&v.append(function(){return b.node()})}},"draw"),kte={getClasses:JLe,draw:eDe}});var AL,Tte,Ete=_(()=>{"use strict";AL=function(){var t=s(function(ts,at,xt,Ft){for(xt=xt||{},Ft=ts.length;Ft--;xt[ts[Ft]]=at);return xt},"o"),e=[1,4],r=[1,3],n=[1,5],i=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],a=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],f=[1,23],d=[1,25],p=[1,26],m=[1,27],g=[1,49],y=[1,48],v=[1,29],x=[1,30],b=[1,31],k=[1,32],A=[1,33],w=[1,44],T=[1,46],C=[1,42],E=[1,47],S=[1,43],R=[1,50],D=[1,45],L=[1,51],P=[1,52],M=[1,34],F=[1,35],I=[1,36],O=[1,37],z=[1,57],N=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],U=[1,61],$=[1,60],W=[1,62],ee=[8,9,11,73,75],te=[1,88],ce=[1,93],Z=[1,92],fe=[1,89],ne=[1,85],H=[1,91],Q=[1,87],K=[1,94],re=[1,90],ie=[1,95],ye=[1,86],j=[8,9,10,11,73,75],De=[8,9,10,11,44,73,75],oe=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],Re=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],Pe=[42,58,86,99,102,103,106,108,111,112,113],Se=[1,121],Ue=[1,120],Oe=[1,128],_e=[1,142],he=[1,143],q=[1,144],se=[1,145],ue=[1,130],X=[1,132],ae=[1,136],pe=[1,137],de=[1,138],Ie=[1,139],Ne=[1,140],Be=[1,141],ze=[1,146],qe=[1,147],Fe=[1,126],we=[1,127],Je=[1,134],We=[1,129],or=[1,133],Cr=[1,131],Ut=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],ar=[1,149],ut=[8,9,11],Rt=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],Qe=[1,169],Dt=[1,165],qt=[1,166],yt=[1,170],Et=[1,167],pt=[1,168],Wt=[75,113,116],ot=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],fr=[10,103],vt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Bt=[1,235],Sr=[1,233],zi=[1,237],rr=[1,231],Vn=[1,232],Tn=[1,234],Ki=[1,236],ci=[1,238],Pa=[1,255],En=[8,9,11,103],ti=[8,9,10,11,58,81,102,103,106,107,108,109],co={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:s(function(at,xt,Ft,Ke,Zt,me,Fc){var xe=me.length-1;switch(Zt){case 2:this.$=[];break;case 3:(!Array.isArray(me[xe])||me[xe].length>0)&&me[xe-1].push(me[xe]),this.$=me[xe-1];break;case 4:case 176:this.$=me[xe];break;case 11:Ke.setDirection("TB"),this.$="TB";break;case 12:Ke.setDirection(me[xe-1]),this.$=me[xe-1];break;case 27:this.$=me[xe-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=Ke.addSubGraph(me[xe-6],me[xe-1],me[xe-4]);break;case 34:this.$=Ke.addSubGraph(me[xe-3],me[xe-1],me[xe-3]);break;case 35:this.$=Ke.addSubGraph(void 0,me[xe-1],void 0);break;case 37:this.$=me[xe].trim(),Ke.setAccTitle(this.$);break;case 38:case 39:this.$=me[xe].trim(),Ke.setAccDescription(this.$);break;case 43:Ke.addLink(me[xe-2].stmt,me[xe],me[xe-1]),this.$={stmt:me[xe],nodes:me[xe].concat(me[xe-2].nodes)};break;case 44:Ke.addLink(me[xe-3].stmt,me[xe-1],me[xe-2]),this.$={stmt:me[xe-1],nodes:me[xe-1].concat(me[xe-3].nodes)};break;case 45:this.$={stmt:me[xe-1],nodes:me[xe-1]};break;case 46:this.$={stmt:me[xe],nodes:me[xe]};break;case 47:this.$=[me[xe]];break;case 48:this.$=me[xe-4].concat(me[xe]);break;case 49:this.$=me[xe];break;case 50:this.$=me[xe-2],Ke.setClass(me[xe-2],me[xe]);break;case 51:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"square");break;case 52:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"doublecircle");break;case 53:this.$=me[xe-5],Ke.addVertex(me[xe-5],me[xe-2],"circle");break;case 54:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"ellipse");break;case 55:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"stadium");break;case 56:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"subroutine");break;case 57:this.$=me[xe-7],Ke.addVertex(me[xe-7],me[xe-1],"rect",void 0,void 0,void 0,Object.fromEntries([[me[xe-5],me[xe-3]]]));break;case 58:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"cylinder");break;case 59:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"round");break;case 60:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"diamond");break;case 61:this.$=me[xe-5],Ke.addVertex(me[xe-5],me[xe-2],"hexagon");break;case 62:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"odd");break;case 63:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"trapezoid");break;case 64:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"inv_trapezoid");break;case 65:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"lean_right");break;case 66:this.$=me[xe-3],Ke.addVertex(me[xe-3],me[xe-1],"lean_left");break;case 67:this.$=me[xe],Ke.addVertex(me[xe]);break;case 68:me[xe-1].text=me[xe],this.$=me[xe-1];break;case 69:case 70:me[xe-2].text=me[xe-1],this.$=me[xe-2];break;case 71:this.$=me[xe];break;case 72:var xi=Ke.destructLink(me[xe],me[xe-2]);this.$={type:xi.type,stroke:xi.stroke,length:xi.length,text:me[xe-1]};break;case 73:this.$={text:me[xe],type:"text"};break;case 74:this.$={text:me[xe-1].text+""+me[xe],type:me[xe-1].type};break;case 75:this.$={text:me[xe],type:"string"};break;case 76:this.$={text:me[xe],type:"markdown"};break;case 77:var xi=Ke.destructLink(me[xe]);this.$={type:xi.type,stroke:xi.stroke,length:xi.length};break;case 78:this.$=me[xe-1];break;case 79:this.$={text:me[xe],type:"text"};break;case 80:this.$={text:me[xe-1].text+""+me[xe],type:me[xe-1].type};break;case 81:this.$={text:me[xe],type:"string"};break;case 82:case 97:this.$={text:me[xe],type:"markdown"};break;case 94:this.$={text:me[xe],type:"text"};break;case 95:this.$={text:me[xe-1].text+""+me[xe],type:me[xe-1].type};break;case 96:this.$={text:me[xe],type:"text"};break;case 98:this.$=me[xe-4],Ke.addClass(me[xe-2],me[xe]);break;case 99:this.$=me[xe-4],Ke.setClass(me[xe-2],me[xe]);break;case 100:case 108:this.$=me[xe-1],Ke.setClickEvent(me[xe-1],me[xe]);break;case 101:case 109:this.$=me[xe-3],Ke.setClickEvent(me[xe-3],me[xe-2]),Ke.setTooltip(me[xe-3],me[xe]);break;case 102:this.$=me[xe-2],Ke.setClickEvent(me[xe-2],me[xe-1],me[xe]);break;case 103:this.$=me[xe-4],Ke.setClickEvent(me[xe-4],me[xe-3],me[xe-2]),Ke.setTooltip(me[xe-4],me[xe]);break;case 104:this.$=me[xe-2],Ke.setLink(me[xe-2],me[xe]);break;case 105:this.$=me[xe-4],Ke.setLink(me[xe-4],me[xe-2]),Ke.setTooltip(me[xe-4],me[xe]);break;case 106:this.$=me[xe-4],Ke.setLink(me[xe-4],me[xe-2],me[xe]);break;case 107:this.$=me[xe-6],Ke.setLink(me[xe-6],me[xe-4],me[xe]),Ke.setTooltip(me[xe-6],me[xe-2]);break;case 110:this.$=me[xe-1],Ke.setLink(me[xe-1],me[xe]);break;case 111:this.$=me[xe-3],Ke.setLink(me[xe-3],me[xe-2]),Ke.setTooltip(me[xe-3],me[xe]);break;case 112:this.$=me[xe-3],Ke.setLink(me[xe-3],me[xe-2],me[xe]);break;case 113:this.$=me[xe-5],Ke.setLink(me[xe-5],me[xe-4],me[xe]),Ke.setTooltip(me[xe-5],me[xe-2]);break;case 114:this.$=me[xe-4],Ke.addVertex(me[xe-2],void 0,void 0,me[xe]);break;case 115:this.$=me[xe-4],Ke.updateLink([me[xe-2]],me[xe]);break;case 116:this.$=me[xe-4],Ke.updateLink(me[xe-2],me[xe]);break;case 117:this.$=me[xe-8],Ke.updateLinkInterpolate([me[xe-6]],me[xe-2]),Ke.updateLink([me[xe-6]],me[xe]);break;case 118:this.$=me[xe-8],Ke.updateLinkInterpolate(me[xe-6],me[xe-2]),Ke.updateLink(me[xe-6],me[xe]);break;case 119:this.$=me[xe-6],Ke.updateLinkInterpolate([me[xe-4]],me[xe]);break;case 120:this.$=me[xe-6],Ke.updateLinkInterpolate(me[xe-4],me[xe]);break;case 121:case 123:this.$=[me[xe]];break;case 122:case 124:me[xe-2].push(me[xe]),this.$=me[xe-2];break;case 126:this.$=me[xe-1]+me[xe];break;case 174:this.$=me[xe];break;case 175:this.$=me[xe-1]+""+me[xe];break;case 177:this.$=me[xe-1]+""+me[xe];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),{8:[1,54],9:[1,55],10:z,15:53,18:56},t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),{8:U,9:$,11:W,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:U,9:$,11:W,21:66},{8:U,9:$,11:W,21:67},{8:U,9:$,11:W,21:68},{8:U,9:$,11:W,21:69},{8:U,9:$,11:W,21:70},{8:U,9:$,10:[1,71],11:W,21:72},t(N,[2,36]),{35:[1,73]},{37:[1,74]},t(N,[2,39]),t(ee,[2,46],{18:75,10:z}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:te,42:ce,58:Z,77:[1,83],86:fe,92:[1,80],94:[1,81],98:82,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye,117:84},t(N,[2,178]),t(N,[2,179]),t(N,[2,180]),t(N,[2,181]),t(j,[2,47]),t(j,[2,49],{44:[1,96]}),t(De,[2,67],{110:109,29:[1,97],42:g,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:y,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:w,99:T,102:C,103:E,106:S,108:R,111:D,112:L,113:P}),t(oe,[2,174]),t(oe,[2,135]),t(oe,[2,136]),t(oe,[2,137]),t(oe,[2,138]),t(oe,[2,139]),t(oe,[2,140]),t(oe,[2,141]),t(oe,[2,142]),t(oe,[2,143]),t(oe,[2,144]),t(oe,[2,145]),t(i,[2,12]),t(i,[2,18]),t(i,[2,19]),{9:[1,110]},t(Re,[2,26],{18:111,10:z}),t(N,[2,27]),{40:112,41:38,42:g,43:39,45:40,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(Pe,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:Se,116:Ue},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,32]),{10:Oe,12:_e,14:he,27:q,28:122,32:se,42:ue,58:X,73:ae,77:[1,124],78:[1,125],80:135,81:pe,82:de,83:Ie,84:Ne,85:Be,86:ze,87:qe,88:123,102:Fe,106:we,108:Je,111:We,112:or,113:Cr},t(Ut,a,{5:148}),t(N,[2,37]),t(N,[2,38]),t(ee,[2,45],{42:ar}),{42:g,45:150,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{99:[1,151],100:152,102:[1,153]},{42:g,45:154,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{42:g,45:155,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},t(ut,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(ut,[2,108],{117:160,10:[1,159],14:te,42:ce,58:Z,86:fe,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye}),t(ut,[2,110],{10:[1,161]}),t(Rt,[2,176]),t(Rt,[2,163]),t(Rt,[2,164]),t(Rt,[2,165]),t(Rt,[2,166]),t(Rt,[2,167]),t(Rt,[2,168]),t(Rt,[2,169]),t(Rt,[2,170]),t(Rt,[2,171]),t(Rt,[2,172]),t(Rt,[2,173]),{42:g,45:162,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{30:163,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:171,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:173,48:[1,172],65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:174,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:175,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:176,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{106:[1,177]},{30:178,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:179,63:[1,180],65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:181,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:182,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{30:183,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},t(oe,[2,175]),t(i,[2,20]),t(Re,[2,25]),t(ee,[2,43],{18:184,10:z}),t(Pe,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{75:[1,188],76:189,113:Se,116:Ue},t(Wt,[2,73]),t(Wt,[2,75]),t(Wt,[2,76]),t(Wt,[2,161]),t(Wt,[2,162]),{8:U,9:$,10:Oe,11:W,12:_e,14:he,21:191,27:q,29:[1,190],32:se,42:ue,58:X,73:ae,80:135,81:pe,82:de,83:Ie,84:Ne,85:Be,86:ze,87:qe,88:192,102:Fe,106:we,108:Je,111:We,112:or,113:Cr},t(ot,[2,94]),t(ot,[2,96]),t(ot,[2,97]),t(ot,[2,150]),t(ot,[2,151]),t(ot,[2,152]),t(ot,[2,153]),t(ot,[2,154]),t(ot,[2,155]),t(ot,[2,156]),t(ot,[2,157]),t(ot,[2,158]),t(ot,[2,159]),t(ot,[2,160]),t(ot,[2,83]),t(ot,[2,84]),t(ot,[2,85]),t(ot,[2,86]),t(ot,[2,87]),t(ot,[2,88]),t(ot,[2,89]),t(ot,[2,90]),t(ot,[2,91]),t(ot,[2,92]),t(ot,[2,93]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,193],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},{10:z,18:194},{10:[1,195],42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:109,111:D,112:L,113:P},{10:[1,196]},{10:[1,197],103:[1,198]},t(fr,[2,121]),{10:[1,199],42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:109,111:D,112:L,113:P},{10:[1,200],42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:109,111:D,112:L,113:P},{77:[1,201]},t(ut,[2,102],{10:[1,202]}),t(ut,[2,104],{10:[1,203]}),{77:[1,204]},t(Rt,[2,177]),{77:[1,205],95:[1,206]},t(j,[2,50],{110:109,42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,111:D,112:L,113:P}),{31:[1,207],65:Qe,79:208,113:yt,114:Et,115:pt},t(vt,[2,79]),t(vt,[2,81]),t(vt,[2,82]),t(vt,[2,146]),t(vt,[2,147]),t(vt,[2,148]),t(vt,[2,149]),{47:[1,209],65:Qe,79:208,113:yt,114:Et,115:pt},{30:210,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{49:[1,211],65:Qe,79:208,113:yt,114:Et,115:pt},{51:[1,212],65:Qe,79:208,113:yt,114:Et,115:pt},{53:[1,213],65:Qe,79:208,113:yt,114:Et,115:pt},{55:[1,214],65:Qe,79:208,113:yt,114:Et,115:pt},{58:[1,215]},{62:[1,216],65:Qe,79:208,113:yt,114:Et,115:pt},{64:[1,217],65:Qe,79:208,113:yt,114:Et,115:pt},{30:218,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},{31:[1,219],65:Qe,79:208,113:yt,114:Et,115:pt},{65:Qe,67:[1,220],69:[1,221],79:208,113:yt,114:Et,115:pt},{65:Qe,67:[1,223],69:[1,222],79:208,113:yt,114:Et,115:pt},t(ee,[2,44],{42:ar}),t(Pe,[2,70]),t(Pe,[2,69]),{60:[1,224],65:Qe,79:208,113:yt,114:Et,115:pt},t(Pe,[2,72]),t(Wt,[2,74]),{30:225,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},t(Ut,a,{5:226}),t(ot,[2,95]),t(N,[2,35]),{41:227,42:g,43:39,45:40,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},{10:Bt,58:Sr,81:zi,89:228,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{10:Bt,58:Sr,81:zi,89:239,101:[1,240],102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{10:Bt,58:Sr,81:zi,89:241,101:[1,242],102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{102:[1,243]},{10:Bt,58:Sr,81:zi,89:244,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{42:g,45:245,58:y,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P},t(ut,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(ut,[2,109]),t(ut,[2,111],{10:[1,249]}),t(ut,[2,112]),t(De,[2,51]),t(vt,[2,80]),t(De,[2,52]),{49:[1,250],65:Qe,79:208,113:yt,114:Et,115:pt},t(De,[2,59]),t(De,[2,54]),t(De,[2,55]),t(De,[2,56]),{106:[1,251]},t(De,[2,58]),t(De,[2,60]),{64:[1,252],65:Qe,79:208,113:yt,114:Et,115:pt},t(De,[2,62]),t(De,[2,63]),t(De,[2,65]),t(De,[2,64]),t(De,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:Qe,79:208,113:yt,114:Et,115:pt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,254],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},t(j,[2,48]),t(ut,[2,114],{103:Pa}),t(En,[2,123],{105:256,10:Bt,58:Sr,81:zi,102:rr,106:Vn,107:Tn,108:Ki,109:ci}),t(ti,[2,125]),t(ti,[2,127]),t(ti,[2,128]),t(ti,[2,129]),t(ti,[2,130]),t(ti,[2,131]),t(ti,[2,132]),t(ti,[2,133]),t(ti,[2,134]),t(ut,[2,115],{103:Pa}),{10:[1,257]},t(ut,[2,116],{103:Pa}),{10:[1,258]},t(fr,[2,122]),t(ut,[2,98],{103:Pa}),t(ut,[2,99],{110:109,42:g,58:y,86:w,99:T,102:C,103:E,106:S,108:R,111:D,112:L,113:P}),t(ut,[2,103]),t(ut,[2,105],{10:[1,259]}),t(ut,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:U,9:$,11:W,21:264},t(N,[2,34]),{10:Bt,58:Sr,81:zi,102:rr,104:265,105:230,106:Vn,107:Tn,108:Ki,109:ci},t(ti,[2,126]),{14:te,42:ce,58:Z,86:fe,98:266,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye,117:84},{14:te,42:ce,58:Z,86:fe,98:267,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye,117:84},{95:[1,268]},t(ut,[2,113]),t(De,[2,53]),{30:269,65:Qe,77:Dt,78:qt,79:164,113:yt,114:Et,115:pt},t(De,[2,61]),t(Ut,a,{5:270}),t(En,[2,124],{105:256,10:Bt,58:Sr,81:zi,102:rr,106:Vn,107:Tn,108:Ki,109:ci}),t(ut,[2,119],{117:160,10:[1,271],14:te,42:ce,58:Z,86:fe,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye}),t(ut,[2,120],{117:160,10:[1,272],14:te,42:ce,58:Z,86:fe,102:ne,103:H,106:Q,108:K,111:re,112:ie,113:ye}),t(ut,[2,107]),{31:[1,273],65:Qe,79:208,113:yt,114:Et,115:pt},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:f,32:[1,274],33:24,34:d,36:p,38:m,40:28,41:38,42:g,43:39,45:40,58:y,81:v,82:x,83:b,84:k,85:A,86:w,99:T,102:C,103:E,106:S,108:R,110:41,111:D,112:L,113:P,118:M,119:F,120:I,121:O},{10:Bt,58:Sr,81:zi,89:275,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},{10:Bt,58:Sr,81:zi,89:276,102:rr,104:229,105:230,106:Vn,107:Tn,108:Ki,109:ci},t(De,[2,57]),t(N,[2,33]),t(ut,[2,117],{103:Pa}),t(ut,[2,118],{103:Pa})],defaultActions:{},parseError:s(function(at,xt){if(xt.recoverable)this.trace(at);else{var Ft=new Error(at);throw Ft.hash=xt,Ft}},"parseError"),parse:s(function(at){var xt=this,Ft=[0],Ke=[],Zt=[null],me=[],Fc=this.table,xe="",xi=0,zc=0,g1=0,ib=2,y1=1,v1=me.slice.call(arguments,1),ri=Object.create(this.lexer),ho={yy:{}};for(var Zu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zu)&&(ho.yy[Zu]=this.yy[Zu]);ri.setInput(at,ho.yy),ho.yy.lexer=ri,ho.yy.parser=this,typeof ri.yylloc>"u"&&(ri.yylloc={});var Ps=ri.yylloc;me.push(Ps);var Ju=ri.options&&ri.options.ranges;typeof ho.yy.parseError=="function"?this.parseError=ho.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ab(xa){Ft.length=Ft.length-2*xa,Zt.length=Zt.length-xa,me.length=me.length-xa}s(ab,"popStack");function x1(){var xa;return xa=Ke.pop()||ri.lex()||y1,typeof xa!="number"&&(xa instanceof Array&&(Ke=xa,xa=Ke.pop()),xa=xt.symbols_[xa]||xa),xa}s(x1,"lex");for(var Qi,$c,Gc,rs,bi,Ml,eh={},Af,Bs,b1,Lf;;){if(Gc=Ft[Ft.length-1],this.defaultActions[Gc]?rs=this.defaultActions[Gc]:((Qi===null||typeof Qi>"u")&&(Qi=x1()),rs=Fc[Gc]&&Fc[Gc][Qi]),typeof rs>"u"||!rs.length||!rs[0]){var k1="";Lf=[];for(Af in Fc[Gc])this.terminals_[Af]&&Af>ib&&Lf.push("'"+this.terminals_[Af]+"'");ri.showPosition?k1="Parse error on line "+(xi+1)+`: +`+ri.showPosition()+` +Expecting `+Lf.join(", ")+", got '"+(this.terminals_[Qi]||Qi)+"'":k1="Parse error on line "+(xi+1)+": Unexpected "+(Qi==y1?"end of input":"'"+(this.terminals_[Qi]||Qi)+"'"),this.parseError(k1,{text:ri.match,token:this.terminals_[Qi]||Qi,line:ri.yylineno,loc:Ps,expected:Lf})}if(rs[0]instanceof Array&&rs.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Gc+", token: "+Qi);switch(rs[0]){case 1:Ft.push(Qi),Zt.push(ri.yytext),me.push(ri.yylloc),Ft.push(rs[1]),Qi=null,$c?(Qi=$c,$c=null):(zc=ri.yyleng,xe=ri.yytext,xi=ri.yylineno,Ps=ri.yylloc,g1>0&&g1--);break;case 2:if(Bs=this.productions_[rs[1]][1],eh.$=Zt[Zt.length-Bs],eh._$={first_line:me[me.length-(Bs||1)].first_line,last_line:me[me.length-1].last_line,first_column:me[me.length-(Bs||1)].first_column,last_column:me[me.length-1].last_column},Ju&&(eh._$.range=[me[me.length-(Bs||1)].range[0],me[me.length-1].range[1]]),Ml=this.performAction.apply(eh,[xe,zc,xi,ho.yy,rs[1],Zt,me].concat(v1)),typeof Ml<"u")return Ml;Bs&&(Ft=Ft.slice(0,-1*Bs*2),Zt=Zt.slice(0,-1*Bs),me=me.slice(0,-1*Bs)),Ft.push(this.productions_[rs[1]][0]),Zt.push(eh.$),me.push(eh._$),b1=Fc[Ft[Ft.length-2]][Ft[Ft.length-1]],Ft.push(b1);break;case 3:return!0}}return!0},"parse")},uo=function(){var ts={EOF:1,parseError:s(function(xt,Ft){if(this.yy.parser)this.yy.parser.parseError(xt,Ft);else throw new Error(xt)},"parseError"),setInput:s(function(at,xt){return this.yy=xt||this.yy||{},this._input=at,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var at=this._input[0];this.yytext+=at,this.yyleng++,this.offset++,this.match+=at,this.matched+=at;var xt=at.match(/(?:\r\n?|\n).*/g);return xt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),at},"input"),unput:s(function(at){var xt=at.length,Ft=at.split(/(?:\r\n?|\n)/g);this._input=at+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-xt),this.offset-=xt;var Ke=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ft.length-1&&(this.yylineno-=Ft.length-1);var Zt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ft?(Ft.length===Ke.length?this.yylloc.first_column:0)+Ke[Ke.length-Ft.length].length-Ft[0].length:this.yylloc.first_column-xt},this.options.ranges&&(this.yylloc.range=[Zt[0],Zt[0]+this.yyleng-xt]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(at){this.unput(this.match.slice(at))},"less"),pastInput:s(function(){var at=this.matched.substr(0,this.matched.length-this.match.length);return(at.length>20?"...":"")+at.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var at=this.match;return at.length<20&&(at+=this._input.substr(0,20-at.length)),(at.substr(0,20)+(at.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var at=this.pastInput(),xt=new Array(at.length+1).join("-");return at+this.upcomingInput()+` +`+xt+"^"},"showPosition"),test_match:s(function(at,xt){var Ft,Ke,Zt;if(this.options.backtrack_lexer&&(Zt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Zt.yylloc.range=this.yylloc.range.slice(0))),Ke=at[0].match(/(?:\r\n?|\n).*/g),Ke&&(this.yylineno+=Ke.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ke?Ke[Ke.length-1].length-Ke[Ke.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+at[0].length},this.yytext+=at[0],this.match+=at[0],this.matches=at,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(at[0].length),this.matched+=at[0],Ft=this.performAction.call(this,this.yy,this,xt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ft)return Ft;if(this._backtrack){for(var me in Zt)this[me]=Zt[me];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var at,xt,Ft,Ke;this._more||(this.yytext="",this.match="");for(var Zt=this._currentRules(),me=0;mext[0].length)){if(xt=Ft,Ke=me,this.options.backtrack_lexer){if(at=this.test_match(Ft,Zt[me]),at!==!1)return at;if(this._backtrack){xt=!1;continue}else return!1}else if(!this.options.flex)break}return xt?(at=this.test_match(xt,Zt[Ke]),at!==!1?at:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var xt=this.next();return xt||this.lex()},"lex"),begin:s(function(xt){this.conditionStack.push(xt)},"begin"),popState:s(function(){var xt=this.conditionStack.length-1;return xt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(xt){return xt=this.conditionStack.length-1-Math.abs(xt||0),xt>=0?this.conditionStack[xt]:"INITIAL"},"topState"),pushState:s(function(xt){this.begin(xt)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(xt,Ft,Ke,Zt){var me=Zt;switch(Ke){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 11:this.popState();break;case 12:return 93;case 13:return"MD_STR";case 14:this.popState();break;case 15:this.begin("md_string");break;case 16:return"STR";case 17:this.popState();break;case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 27:this.popState();break;case 28:return 85;case 29:return xt.lex.firstGraph()&&this.begin("dir"),12;break;case 30:return xt.lex.firstGraph()&&this.begin("dir"),12;break;case 31:return xt.lex.firstGraph()&&this.begin("dir"),12;break;case 32:return 27;case 33:return 32;case 34:return 95;case 35:return 95;case 36:return 95;case 37:return 95;case 38:return this.popState(),13;break;case 39:return this.popState(),14;break;case 40:return this.popState(),14;break;case 41:return this.popState(),14;break;case 42:return this.popState(),14;break;case 43:return this.popState(),14;break;case 44:return this.popState(),14;break;case 45:return this.popState(),14;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:return 108;case 55:return 44;case 56:return 58;case 57:return 42;case 58:return 8;case 59:return 103;case 60:return 112;case 61:return this.popState(),75;break;case 62:return this.pushState("edgeText"),73;break;case 63:return 116;case 64:return this.popState(),75;break;case 65:return this.pushState("thickEdgeText"),73;break;case 66:return 116;case 67:return this.popState(),75;break;case 68:return this.pushState("dottedEdgeText"),73;break;case 69:return 116;case 70:return 75;case 71:return this.popState(),51;break;case 72:return"TEXT";case 73:return this.pushState("ellipseText"),50;break;case 74:return this.popState(),53;break;case 75:return this.pushState("text"),52;break;case 76:return this.popState(),55;break;case 77:return this.pushState("text"),54;break;case 78:return 56;case 79:return this.pushState("text"),65;break;case 80:return this.popState(),62;break;case 81:return this.pushState("text"),61;break;case 82:return this.popState(),47;break;case 83:return this.pushState("text"),46;break;case 84:return this.popState(),67;break;case 85:return this.popState(),69;break;case 86:return 114;case 87:return this.pushState("trapText"),66;break;case 88:return this.pushState("trapText"),68;break;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 94:return 112;case 95:return 108;case 96:return 42;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;break;case 101:return this.pushState("text"),60;break;case 102:return this.popState(),49;break;case 103:return this.pushState("text"),48;break;case 104:return this.popState(),31;break;case 105:return this.pushState("text"),29;break;case 106:return this.popState(),64;break;case 107:return this.pushState("text"),63;break;case 108:return"TEXT";case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\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000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};return ts}();co.lexer=uo;function Rl(){this.yy={}}return s(Rl,"Parser"),Rl.prototype=co,co.Parser=Rl,new Rl}();AL.parser=AL;Tte=AL});var tDe,rDe,Cte,Ste=_(()=>{"use strict";Ho();tDe=s((t,e)=>{let r=D1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Fs(n,i,a,e)},"fade"),rDe=s(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span { + color: ${t.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${tDe(t.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${t.clusterBkg}; + stroke: ${t.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span { + color: ${t.titleColor}; + } + /* .cluster div { + color: ${t.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),Cte=rDe});var Ik={};ur(Ik,{diagram:()=>nDe});var nDe,Nk=_(()=>{"use strict";gt();wA();wte();Ete();Ste();nDe={parser:Tte,db:K3,renderer:kte,styles:Cte,init:s(t=>{t.flowchart||(t.flowchart={}),t.layout&&pC({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,pC({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),K3.clear(),K3.setGen("gen-2")},"init")}});var LL,Rte,Mte=_(()=>{"use strict";LL=function(){var t=s(function(E,S,R,D){for(R=R||{},D=E.length;D--;R[E[D]]=S);return R},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],n=[1,11],i=[1,12],a=[1,13],o=[1,14],l=[1,15],u=[1,21],h=[1,22],f=[1,23],d=[1,24],p=[1,25],m=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],g=[1,34],y=[27,28,46,47],v=[41,42,43,44,45],x=[17,34],b=[1,54],k=[1,53],A=[17,34,36,38],w={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:s(function(S,R,D,L,P,M,F){var I=M.length-1;switch(P){case 1:break;case 2:this.$=[];break;case 3:M[I-1].push(M[I]),this.$=M[I-1];break;case 4:case 5:this.$=M[I];break;case 6:case 7:this.$=[];break;case 8:L.addEntity(M[I-4]),L.addEntity(M[I-2]),L.addRelationship(M[I-4],M[I],M[I-2],M[I-3]);break;case 9:L.addEntity(M[I-3]),L.addAttributes(M[I-3],M[I-1]);break;case 10:L.addEntity(M[I-2]);break;case 11:L.addEntity(M[I]);break;case 12:L.addEntity(M[I-6],M[I-4]),L.addAttributes(M[I-6],M[I-1]);break;case 13:L.addEntity(M[I-5],M[I-3]);break;case 14:L.addEntity(M[I-3],M[I-1]);break;case 15:case 16:this.$=M[I].trim(),L.setAccTitle(this.$);break;case 17:case 18:this.$=M[I].trim(),L.setAccDescription(this.$);break;case 19:case 43:this.$=M[I];break;case 20:case 41:case 42:this.$=M[I].replace(/"/g,"");break;case 21:case 29:this.$=[M[I]];break;case 22:M[I].push(M[I-1]),this.$=M[I];break;case 23:this.$={attributeType:M[I-1],attributeName:M[I]};break;case 24:this.$={attributeType:M[I-2],attributeName:M[I-1],attributeKeyTypeList:M[I]};break;case 25:this.$={attributeType:M[I-2],attributeName:M[I-1],attributeComment:M[I]};break;case 26:this.$={attributeType:M[I-3],attributeName:M[I-2],attributeKeyTypeList:M[I-1],attributeComment:M[I]};break;case 27:case 28:case 31:this.$=M[I];break;case 30:M[I-2].push(M[I]),this.$=M[I-2];break;case 32:this.$=M[I].replace(/"/g,"");break;case 33:this.$={cardA:M[I],relType:M[I-1],cardB:M[I-2]};break;case 34:this.$=L.Cardinality.ZERO_OR_ONE;break;case 35:this.$=L.Cardinality.ZERO_OR_MORE;break;case 36:this.$=L.Cardinality.ONE_OR_MORE;break;case 37:this.$=L.Cardinality.ONLY_ONE;break;case 38:this.$=L.Cardinality.MD_PARENT;break;case 39:this.$=L.Identification.NON_IDENTIFYING;break;case 40:this.$=L.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:n,24:i,26:a,27:o,28:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:n,24:i,26:a,27:o,28:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:u,42:h,43:f,44:d,45:p}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(m,[2,19]),t(m,[2,20]),t(e,[2,4]),{11:29,27:o,28:l},{16:30,17:[1,31],29:32,30:33,34:g},{11:35,27:o,28:l},{40:36,46:[1,37],47:[1,38]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(y,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:g},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:u,42:h,43:f,44:d,45:p},t(v,[2,39]),t(v,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(x,[2,23],{32:50,33:51,35:52,37:b,38:k}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(x,[2,24],{33:56,36:[1,57],38:k}),t(x,[2,25]),t(A,[2,29]),t(x,[2,32]),t(A,[2,31]),{16:58,17:[1,59],29:32,30:33,34:g},t(x,[2,26]),{35:60,37:b},{17:[1,61]},t(e,[2,13]),t(A,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:s(function(S,R){if(R.recoverable)this.trace(S);else{var D=new Error(S);throw D.hash=R,D}},"parseError"),parse:s(function(S){var R=this,D=[0],L=[],P=[null],M=[],F=this.table,I="",O=0,z=0,N=0,U=2,$=1,W=M.slice.call(arguments,1),ee=Object.create(this.lexer),te={yy:{}};for(var ce in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ce)&&(te.yy[ce]=this.yy[ce]);ee.setInput(S,te.yy),te.yy.lexer=ee,te.yy.parser=this,typeof ee.yylloc>"u"&&(ee.yylloc={});var Z=ee.yylloc;M.push(Z);var fe=ee.options&&ee.options.ranges;typeof te.yy.parseError=="function"?this.parseError=te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(Oe){D.length=D.length-2*Oe,P.length=P.length-Oe,M.length=M.length-Oe}s(ne,"popStack");function H(){var Oe;return Oe=L.pop()||ee.lex()||$,typeof Oe!="number"&&(Oe instanceof Array&&(L=Oe,Oe=L.pop()),Oe=R.symbols_[Oe]||Oe),Oe}s(H,"lex");for(var Q,K,re,ie,ye,j,De={},oe,Re,Pe,Se;;){if(re=D[D.length-1],this.defaultActions[re]?ie=this.defaultActions[re]:((Q===null||typeof Q>"u")&&(Q=H()),ie=F[re]&&F[re][Q]),typeof ie>"u"||!ie.length||!ie[0]){var Ue="";Se=[];for(oe in F[re])this.terminals_[oe]&&oe>U&&Se.push("'"+this.terminals_[oe]+"'");ee.showPosition?Ue="Parse error on line "+(O+1)+`: +`+ee.showPosition()+` +Expecting `+Se.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":Ue="Parse error on line "+(O+1)+": Unexpected "+(Q==$?"end of input":"'"+(this.terminals_[Q]||Q)+"'"),this.parseError(Ue,{text:ee.match,token:this.terminals_[Q]||Q,line:ee.yylineno,loc:Z,expected:Se})}if(ie[0]instanceof Array&&ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+re+", token: "+Q);switch(ie[0]){case 1:D.push(Q),P.push(ee.yytext),M.push(ee.yylloc),D.push(ie[1]),Q=null,K?(Q=K,K=null):(z=ee.yyleng,I=ee.yytext,O=ee.yylineno,Z=ee.yylloc,N>0&&N--);break;case 2:if(Re=this.productions_[ie[1]][1],De.$=P[P.length-Re],De._$={first_line:M[M.length-(Re||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(Re||1)].first_column,last_column:M[M.length-1].last_column},fe&&(De._$.range=[M[M.length-(Re||1)].range[0],M[M.length-1].range[1]]),j=this.performAction.apply(De,[I,z,O,te.yy,ie[1],P,M].concat(W)),typeof j<"u")return j;Re&&(D=D.slice(0,-1*Re*2),P=P.slice(0,-1*Re),M=M.slice(0,-1*Re)),D.push(this.productions_[ie[1]][0]),P.push(De.$),M.push(De._$),Pe=F[D[D.length-2]][D[D.length-1]],D.push(Pe);break;case 3:return!0}}return!0},"parse")},T=function(){var E={EOF:1,parseError:s(function(R,D){if(this.yy.parser)this.yy.parser.parseError(R,D);else throw new Error(R)},"parseError"),setInput:s(function(S,R){return this.yy=R||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var R=S.match(/(?:\r\n?|\n).*/g);return R?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:s(function(S){var R=S.length,D=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),D.length-1&&(this.yylineno-=D.length-1);var P=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:D?(D.length===L.length?this.yylloc.first_column:0)+L[L.length-D.length].length-D[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[P[0],P[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(S){this.unput(this.match.slice(S))},"less"),pastInput:s(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var S=this.pastInput(),R=new Array(S.length+1).join("-");return S+this.upcomingInput()+` +`+R+"^"},"showPosition"),test_match:s(function(S,R){var D,L,P;if(this.options.backtrack_lexer&&(P={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(P.yylloc.range=this.yylloc.range.slice(0))),L=S[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],D=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),D)return D;if(this._backtrack){for(var M in P)this[M]=P[M];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,R,D,L;this._more||(this.yytext="",this.match="");for(var P=this._currentRules(),M=0;MR[0].length)){if(R=D,L=M,this.options.backtrack_lexer){if(S=this.test_match(D,P[M]),S!==!1)return S;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(S=this.test_match(R,P[L]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var R=this.next();return R||this.lex()},"lex"),begin:s(function(R){this.conditionStack.push(R)},"begin"),popState:s(function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},"topState"),pushState:s(function(R){this.begin(R)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(R,D,L,P){var M=P;switch(L){case 0:return this.begin("acc_title"),22;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),24;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;break;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;break;case 22:return D.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return D.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return E}();w.lexer=T;function C(){this.yy={}}return s(C,"Parser"),C.prototype=w,w.Parser=C,new C}();LL.parser=LL;Rte=LL});var Md,DL,uDe,hDe,Ite,fDe,dDe,pDe,mDe,gDe,Nte,Ote=_(()=>{"use strict";it();gt();Ci();Md=new Map,DL=[],uDe={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},hDe={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Ite=s(function(t,e=void 0){return Md.has(t)?!Md.get(t).alias&&e&&(Md.get(t).alias=e,V.info(`Add alias '${e}' to entity '${t}'`)):(Md.set(t,{attributes:[],alias:e}),V.info("Added new entity :",t)),Md.get(t)},"addEntity"),fDe=s(()=>Md,"getEntities"),dDe=s(function(t,e){let r=Ite(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),V.debug("Added attribute ",e[n].attributeName)},"addAttributes"),pDe=s(function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};DL.push(i),V.debug("Added new relationship :",i)},"addRelationship"),mDe=s(()=>DL,"getRelationships"),gDe=s(function(){Md=new Map,DL=[],br()},"clear"),Nte={Cardinality:uDe,Identification:hDe,getConfig:s(()=>le().er,"getConfig"),addEntity:Ite,addAttributes:dDe,getEntities:fDe,addRelationship:pDe,getRelationships:mDe,clear:gDe,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,setDiagramTitle:an,getDiagramTitle:Qr}});var ml,yDe,Lo,Pte=_(()=>{"use strict";ml={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},yDe=s(function(t,e){let r;t.append("defs").append("marker").attr("id",ml.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",ml.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",ml.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",ml.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",ml.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",ml.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",ml.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),Lo={ERMarkers:ml,insertMarkers:yDe}});var Bte,Fte=_(()=>{"use strict";Bte=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function vDe(t){return typeof t=="string"&&Bte.test(t)}var zte,$te=_(()=>{"use strict";Fte();s(vDe,"validate");zte=vDe});function Gte(t,e=0){return ca[t[e+0]]+ca[t[e+1]]+ca[t[e+2]]+ca[t[e+3]]+"-"+ca[t[e+4]]+ca[t[e+5]]+"-"+ca[t[e+6]]+ca[t[e+7]]+"-"+ca[t[e+8]]+ca[t[e+9]]+"-"+ca[t[e+10]]+ca[t[e+11]]+ca[t[e+12]]+ca[t[e+13]]+ca[t[e+14]]+ca[t[e+15]]}var ca,Vte=_(()=>{"use strict";ca=[];for(let t=0;t<256;++t)ca.push((t+256).toString(16).slice(1));s(Gte,"unsafeStringify")});function xDe(t){if(!zte(t))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var Ute,qte=_(()=>{"use strict";$te();s(xDe,"parse");Ute=xDe});function bDe(t){t=unescape(encodeURIComponent(t));let e=[];for(let r=0;r{"use strict";Vte();qte();s(bDe,"stringToBytes");kDe="6ba7b810-9dad-11d1-80b4-00c04fd430c8",wDe="6ba7b811-9dad-11d1-80b4-00c04fd430c8";s(RL,"v35")});function TDe(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function ML(t,e){return t<>>32-e}function EDe(t){let e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){let o=unescape(encodeURIComponent(t));t=[];for(let l=0;l>>0;p=d,d=f,f=ML(h,30)>>>0,h=u,u=y}r[0]=r[0]+u>>>0,r[1]=r[1]+h>>>0,r[2]=r[2]+f>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var Hte,Yte=_(()=>{"use strict";s(TDe,"f");s(ML,"ROTL");s(EDe,"sha1");Hte=EDe});var CDe,IL,Xte=_(()=>{"use strict";Wte();Yte();CDe=RL("v5",80,Hte),IL=CDe});var jte=_(()=>{"use strict";Xte()});function ODe(t="",e=""){let r=t.replace(SDe,"");return`${Qte(e)}${Qte(r)}${IL(t,NDe)}`}function Qte(t=""){return t.length>0?`${t}-`:""}var SDe,_i,bv,_De,ADe,LDe,DDe,Zte,RDe,Kte,MDe,IDe,NDe,Jte,ere=_(()=>{"use strict";la();Xt();Dd();gt();it();pr();Pte();Un();Qt();jte();SDe=/[^\dA-Za-z](\W)*/g,_i={},bv=new Map,_De=s(function(t){let e=Object.keys(t);for(let r of e)_i[r]=t[r]},"setConf"),ADe=s((t,e,r)=>{let n=_i.entityPadding/3,i=_i.entityPadding/3,a=_i.fontSize*.85,o=e.node().getBBox(),l=[],u=!1,h=!1,f=0,d=0,p=0,m=0,g=o.height+n*2,y=1;r.forEach(k=>{k.attributeKeyTypeList!==void 0&&k.attributeKeyTypeList.length>0&&(u=!0),k.attributeComment!==void 0&&(h=!0)}),r.forEach(k=>{let A=`${e.node().id}-attr-${y}`,w=0,T=uh(k.attributeType),C=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(T),E=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(k.attributeName),S={};S.tn=C,S.nn=E;let R=C.node().getBBox(),D=E.node().getBBox();if(f=Math.max(f,R.width),d=Math.max(d,D.width),w=Math.max(R.height,D.height),u){let L=k.attributeKeyTypeList!==void 0?k.attributeKeyTypeList.join(","):"",P=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(L);S.kn=P;let M=P.node().getBBox();p=Math.max(p,M.width),w=Math.max(w,M.height)}if(h){let L=t.append("text").classed("er entityLabel",!0).attr("id",`${A}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",le().fontFamily).style("font-size",a+"px").text(k.attributeComment||"");S.cn=L;let P=L.node().getBBox();m=Math.max(m,P.width),w=Math.max(w,P.height)}S.height=w,l.push(S),g+=w+n*2,y+=1});let v=4;u&&(v+=2),h&&(v+=2);let x=f+d+p+m,b={width:Math.max(_i.minEntityWidth,Math.max(o.width+_i.entityPadding*2,x+i*v)),height:r.length>0?g:Math.max(_i.minEntityHeight,o.height+_i.entityPadding*2)};if(r.length>0){let k=Math.max(0,(b.width-x-i*v)/(v/2));e.attr("transform","translate("+b.width/2+","+(n+o.height/2)+")");let A=o.height+n*2,w="attributeBoxOdd";l.forEach(T=>{let C=A+n+T.height/2;T.tn.attr("transform","translate("+i+","+C+")");let E=t.insert("rect","#"+T.tn.node().id).classed(`er ${w}`,!0).attr("x",0).attr("y",A).attr("width",f+i*2+k).attr("height",T.height+n*2),S=parseFloat(E.attr("x"))+parseFloat(E.attr("width"));T.nn.attr("transform","translate("+(S+i)+","+C+")");let R=t.insert("rect","#"+T.nn.node().id).classed(`er ${w}`,!0).attr("x",S).attr("y",A).attr("width",d+i*2+k).attr("height",T.height+n*2),D=parseFloat(R.attr("x"))+parseFloat(R.attr("width"));if(u){T.kn.attr("transform","translate("+(D+i)+","+C+")");let L=t.insert("rect","#"+T.kn.node().id).classed(`er ${w}`,!0).attr("x",D).attr("y",A).attr("width",p+i*2+k).attr("height",T.height+n*2);D=parseFloat(L.attr("x"))+parseFloat(L.attr("width"))}h&&(T.cn.attr("transform","translate("+(D+i)+","+C+")"),t.insert("rect","#"+T.cn.node().id).classed(`er ${w}`,"true").attr("x",D).attr("y",A).attr("width",m+i*2+k).attr("height",T.height+n*2)),A+=T.height+n*2,w=w==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else b.height=Math.max(_i.minEntityHeight,g),e.attr("transform","translate("+b.width/2+","+b.height/2+")");return b},"drawAttributes"),LDe=s(function(t,e,r){let n=[...e.keys()],i;return n.forEach(function(a){let o=ODe(a,"entity");bv.set(a,o);let l=t.append("g").attr("id",o);i=i===void 0?o:i;let u="text-"+o,h=l.append("text").classed("er entityLabel",!0).attr("id",u).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",le().fontFamily).style("font-size",_i.fontSize+"px").text(e.get(a).alias??a),{width:f,height:d}=ADe(l,h,e.get(a).attributes),m=l.insert("rect","#"+u).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",f).attr("height",d).node().getBBox();r.setNode(o,{width:m.width,height:m.height,shape:"rect",id:o})}),i},"drawEntities"),DDe=s(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),Zte=s(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),RDe=s(function(t,e){return t.forEach(function(r){e.setEdge(bv.get(r.entityA),bv.get(r.entityB),{relationship:r},Zte(r))}),t},"addRelationships"),Kte=0,MDe=s(function(t,e,r,n,i){Kte++;let a=r.edge(bv.get(e.entityA),bv.get(e.entityB),Zte(e)),o=ra().x(function(g){return g.x}).y(function(g){return g.y}).curve(hs),l=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",o(a.points)).style("stroke",_i.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let u="";switch(_i.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+u+"#"+Lo.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+u+"#"+Lo.ERMarkers.MD_PARENT_START+")");break}let h=l.node().getTotalLength(),f=l.node().getPointAtLength(h*.5),d="rel"+Kte,m=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",f.x).attr("y",f.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",le().fontFamily).style("font-size",_i.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",f.x-m.width/2).attr("y",f.y-m.height/2).attr("width",m.width).attr("height",m.height)},"drawRelationshipFromLayout"),IDe=s(function(t,e,r,n){_i=le().er,V.info("Drawing ER diagram");let i=le().securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let l=(i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body")).select(`[id='${e}']`);Lo.insertMarkers(l,_i);let u;u=new ir({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:_i.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=LDe(l,n.db.getEntities(),u),f=RDe(n.db.getRelationships(),u);eo(u),DDe(l,u),f.forEach(function(y){MDe(l,y,u,h,n)});let d=_i.diagramPadding;dt.insertTitle(l,"entityTitleText",_i.titleTopMargin,n.db.getDiagramTitle());let p=l.node().getBBox(),m=p.width+d*2,g=p.height+d*2;xr(l,g,m,_i.useMaxWidth),l.attr("viewBox",`${p.x-d} ${p.y-d} ${m} ${g}`)},"draw"),NDe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";s(ODe,"generateId");s(Qte,"strWithHyphen");Jte={setConf:_De,draw:IDe}});var PDe,tre,rre=_(()=>{"use strict";PDe=s(t=>` + .entityBox { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${t.attributeBackgroundColorOdd}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxEven { + fill: ${t.attributeBackgroundColorEven}; + stroke: ${t.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${t.tertiaryColor}; + opacity: 0.7; + background-color: ${t.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${t.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + +`,"getStyles"),tre=PDe});var nre={};ur(nre,{diagram:()=>BDe});var BDe,ire=_(()=>{"use strict";Mte();Ote();ere();rre();BDe={parser:Rte,db:Nte,renderer:Jte,styles:tre}});function $n(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ua(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function NL(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Nd(t){return typeof t=="object"&&t!==null&&$n(t.container)&&ua(t.reference)&&typeof t.message=="string"}function to(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Xh(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function kv(t){return to(t)&&typeof t.fullText=="string"}var Id,Do=_(()=>{"use strict";s($n,"isAstNode");s(ua,"isReference");s(NL,"isAstNodeDescription");s(Nd,"isLinkingError");Id=class{static{s(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,r){return $n(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});let i=n[r];if(i!==void 0)return i;{let a=this.computeIsSubtype(e,r);return n[r]=a,a}}getAllSubTypes(e){let r=this.allSubtypes[e];if(r)return r;{let n=this.getAllTypes(),i=[];for(let a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}};s(to,"isCompositeCstNode");s(Xh,"isLeafCstNode");s(kv,"isRootCstNode")});function GDe(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Ok(t){return!!t&&typeof t[Symbol.iterator]=="function"}function Wr(...t){if(t.length===1){let e=t[0];if(e instanceof ro)return e;if(Ok(e))return new ro(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new ro(()=>({index:0}),r=>r.index1?new ro(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){let r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex{"use strict";ro=class t{static{s(this,"StreamImpl")}constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){let e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){let e=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){let n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){let r=e[Symbol.iterator]();return new t(()=>({first:this.startFn(),firstDone:!1}),n=>{let i;if(!n.firstDone){do if(i=this.nextFn(n.first),!i.done)return i;while(!i.done);n.firstDone=!0}do if(i=r.next(),!i.done)return i;while(!i.done);return Wa})}join(e=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=GDe(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new t(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Wa:{done:!1,value:e(i)}})}filter(e){return new t(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Wa})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){let i=e.next();if(i.done)return n;let a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new t(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=e(i);if(Ok(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Wa})}flat(e){if(e===void 0&&(e=1),e<=0)return this;let r=e>1?this.flat(e-1):this;return new t(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(Ok(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Wa})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new t(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Wa:this.nextFn(r.state)))}distinct(e){let r=new Set;return this.filter(n=>{let i=e?e(n):n;return r.has(i)?!1:(r.add(i),!0)})}exclude(e,r){let n=new Set;for(let i of e){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};s(GDe,"toString");s(Ok,"isIterable");wv=new ro(()=>{},()=>Wa),Wa=Object.freeze({done:!0,value:void 0});s(Wr,"stream");pc=class extends ro{static{s(this,"TreeStreamImpl")}constructor(e,r,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let o=i.iterators[i.iterators.length-1].next();if(o.done)i.iterators.pop();else return i.iterators.push(r(o.value)[Symbol.iterator]()),o}return Wa})}iterator(){let e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),prune:s(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(t){function e(a){return a.reduce((o,l)=>o+l,0)}s(e,"sum"),t.sum=e;function r(a){return a.reduce((o,l)=>o*l,0)}s(r,"product"),t.product=r;function n(a){return a.reduce((o,l)=>Math.min(o,l))}s(n,"min"),t.min=n;function i(a){return a.reduce((o,l)=>Math.max(o,l))}s(i,"max"),t.max=i})(wm||(wm={}))});var Bk={};ur(Bk,{DefaultNameRegexp:()=>Pk,RangeComparison:()=>Eu,compareRange:()=>lre,findCommentNode:()=>FL,findDeclarationNodeAtOffset:()=>UDe,findLeafNodeAtOffset:()=>zL,findLeafNodeBeforeOffset:()=>cre,flattenCst:()=>VDe,getInteriorNodes:()=>HDe,getNextNode:()=>qDe,getPreviousNode:()=>hre,getStartlineNode:()=>WDe,inRange:()=>BL,isChildNode:()=>PL,isCommentNode:()=>OL,streamCst:()=>Od,toDocumentSegment:()=>Pd,tokenToRange:()=>Tm});function Od(t){return new pc(t,e=>to(e)?e.content:[],{includeRoot:!0})}function VDe(t){return Od(t).filter(Xh)}function PL(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Tm(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Pd(t){if(!t)return;let{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}function lre(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>e.end.character)return Eu.After;let r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.lineEu.After}function UDe(t,e,r=Pk){if(t){if(e>0){let n=e-t.offset,i=t.text.charAt(n);r.test(i)||e--}return zL(t,e)}}function FL(t,e){if(t){let r=hre(t,!0);if(r&&OL(r,e))return r;if(kv(t)){let n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=t.content[i];if(OL(a,e))return a}}}}function OL(t,e){return Xh(t)&&e.includes(t.tokenType.name)}function zL(t,e){if(Xh(t))return t;if(to(t)){let r=ure(t,e,!1);if(r)return zL(r,e)}}function cre(t,e){if(Xh(t))return t;if(to(t)){let r=ure(t,e,!0);if(r)return cre(r,e)}}function ure(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){let o=Math.floor((n+i)/2),l=t.content[o];if(l.offset<=e&&l.end>e)return l;l.end<=e?(a=r?l:void 0,n=o+1):i=o-1}return a}function hre(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t);for(;n>0;){n--;let i=r.content[n];if(e||!i.hidden)return i}t=r}}function qDe(t,e=!0){for(;t.container;){let r=t.container,n=r.content.indexOf(t),i=r.content.length-1;for(;n{"use strict";Do();Es();s(Od,"streamCst");s(VDe,"flattenCst");s(PL,"isChildNode");s(Tm,"tokenToRange");s(Pd,"toDocumentSegment");(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside"})(Eu||(Eu={}));s(lre,"compareRange");s(BL,"inRange");Pk=/^[\w\p{L}]$/u;s(UDe,"findDeclarationNodeAtOffset");s(FL,"findCommentNode");s(OL,"isCommentNode");s(zL,"findLeafNodeAtOffset");s(cre,"findLeafNodeBeforeOffset");s(ure,"binarySearch");s(hre,"getPreviousNode");s(qDe,"getNextNode");s(WDe,"getStartlineNode");s(HDe,"getInteriorNodes");s(YDe,"getCommonParent");s(ore,"getParentChain")});function jh(t){throw new Error("Error! The input value was not handled.")}var Bd,Fk=_(()=>{"use strict";Bd=class extends Error{static{s(this,"ErrorWithLocation")}constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}};s(jh,"assertUnreachable")});var _v={};ur(_v,{AbstractElement:()=>GL,AbstractRule:()=>Tv,AbstractType:()=>Ev,Action:()=>mD,Alternatives:()=>gD,ArrayLiteral:()=>VL,ArrayType:()=>UL,Assignment:()=>yD,BooleanLiteral:()=>WL,CharacterRange:()=>vD,Condition:()=>zk,Conjunction:()=>YL,CrossReference:()=>bD,Disjunction:()=>jL,EndOfFile:()=>kD,Grammar:()=>QL,GrammarImport:()=>dre,Group:()=>TD,InferredType:()=>ZL,Interface:()=>JL,Keyword:()=>ED,LangiumGrammarAstReflection:()=>Em,LangiumGrammarTerminals:()=>XDe,NamedArgument:()=>pre,NegatedToken:()=>CD,Negation:()=>eD,NumberLiteral:()=>rD,Parameter:()=>nD,ParameterReference:()=>iD,ParserRule:()=>sD,ReferenceType:()=>oD,RegexToken:()=>_D,ReturnType:()=>mre,RuleCall:()=>LD,SimpleType:()=>uD,StringLiteral:()=>hD,TerminalAlternatives:()=>DD,TerminalGroup:()=>MD,TerminalRule:()=>Gk,TerminalRuleCall:()=>ND,Type:()=>fD,TypeAttribute:()=>gre,TypeDefinition:()=>$L,UnionType:()=>dD,UnorderedGroup:()=>OD,UntilToken:()=>PD,ValueLiteral:()=>$k,Wildcard:()=>FD,isAbstractElement:()=>Cv,isAbstractRule:()=>jDe,isAbstractType:()=>KDe,isAction:()=>Cu,isAlternatives:()=>Wk,isArrayLiteral:()=>tRe,isArrayType:()=>qL,isAssignment:()=>yl,isBooleanLiteral:()=>HL,isCharacterRange:()=>xD,isCondition:()=>QDe,isConjunction:()=>XL,isCrossReference:()=>Fd,isDisjunction:()=>KL,isEndOfFile:()=>wD,isFeatureName:()=>ZDe,isGrammar:()=>rRe,isGrammarImport:()=>nRe,isGroup:()=>Kh,isInferredType:()=>Vk,isInterface:()=>Uk,isKeyword:()=>Mo,isNamedArgument:()=>iRe,isNegatedToken:()=>SD,isNegation:()=>tD,isNumberLiteral:()=>aRe,isParameter:()=>sRe,isParameterReference:()=>aD,isParserRule:()=>Sa,isPrimitiveType:()=>fre,isReferenceType:()=>lD,isRegexToken:()=>AD,isReturnType:()=>cD,isRuleCall:()=>vl,isSimpleType:()=>qk,isStringLiteral:()=>oRe,isTerminalAlternatives:()=>RD,isTerminalGroup:()=>ID,isTerminalRule:()=>Ro,isTerminalRuleCall:()=>Hk,isType:()=>Sv,isTypeAttribute:()=>lRe,isTypeDefinition:()=>JDe,isUnionType:()=>pD,isUnorderedGroup:()=>Yk,isUntilToken:()=>BD,isValueLiteral:()=>eRe,isWildcard:()=>zD,reflection:()=>Gt});function jDe(t){return Gt.isInstance(t,Tv)}function KDe(t){return Gt.isInstance(t,Ev)}function QDe(t){return Gt.isInstance(t,zk)}function ZDe(t){return fre(t)||t==="current"||t==="entry"||t==="extends"||t==="false"||t==="fragment"||t==="grammar"||t==="hidden"||t==="import"||t==="interface"||t==="returns"||t==="terminal"||t==="true"||t==="type"||t==="infer"||t==="infers"||t==="with"||typeof t=="string"&&/\^?[_a-zA-Z][\w_]*/.test(t)}function fre(t){return t==="string"||t==="number"||t==="boolean"||t==="Date"||t==="bigint"}function JDe(t){return Gt.isInstance(t,$L)}function eRe(t){return Gt.isInstance(t,$k)}function Cv(t){return Gt.isInstance(t,GL)}function tRe(t){return Gt.isInstance(t,VL)}function qL(t){return Gt.isInstance(t,UL)}function HL(t){return Gt.isInstance(t,WL)}function XL(t){return Gt.isInstance(t,YL)}function KL(t){return Gt.isInstance(t,jL)}function rRe(t){return Gt.isInstance(t,QL)}function nRe(t){return Gt.isInstance(t,dre)}function Vk(t){return Gt.isInstance(t,ZL)}function Uk(t){return Gt.isInstance(t,JL)}function iRe(t){return Gt.isInstance(t,pre)}function tD(t){return Gt.isInstance(t,eD)}function aRe(t){return Gt.isInstance(t,rD)}function sRe(t){return Gt.isInstance(t,nD)}function aD(t){return Gt.isInstance(t,iD)}function Sa(t){return Gt.isInstance(t,sD)}function lD(t){return Gt.isInstance(t,oD)}function cD(t){return Gt.isInstance(t,mre)}function qk(t){return Gt.isInstance(t,uD)}function oRe(t){return Gt.isInstance(t,hD)}function Ro(t){return Gt.isInstance(t,Gk)}function Sv(t){return Gt.isInstance(t,fD)}function lRe(t){return Gt.isInstance(t,gre)}function pD(t){return Gt.isInstance(t,dD)}function Cu(t){return Gt.isInstance(t,mD)}function Wk(t){return Gt.isInstance(t,gD)}function yl(t){return Gt.isInstance(t,yD)}function xD(t){return Gt.isInstance(t,vD)}function Fd(t){return Gt.isInstance(t,bD)}function wD(t){return Gt.isInstance(t,kD)}function Kh(t){return Gt.isInstance(t,TD)}function Mo(t){return Gt.isInstance(t,ED)}function SD(t){return Gt.isInstance(t,CD)}function AD(t){return Gt.isInstance(t,_D)}function vl(t){return Gt.isInstance(t,LD)}function RD(t){return Gt.isInstance(t,DD)}function ID(t){return Gt.isInstance(t,MD)}function Hk(t){return Gt.isInstance(t,ND)}function Yk(t){return Gt.isInstance(t,OD)}function BD(t){return Gt.isInstance(t,PD)}function zD(t){return Gt.isInstance(t,FD)}var XDe,Tv,Ev,zk,$L,$k,GL,VL,UL,WL,YL,jL,QL,dre,ZL,JL,pre,eD,rD,nD,iD,sD,oD,mre,uD,hD,Gk,fD,gre,dD,mD,gD,yD,vD,bD,kD,TD,ED,CD,_D,LD,DD,MD,ND,OD,PD,FD,Em,Gt,mc=_(()=>{"use strict";Do();XDe={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Tv="AbstractRule";s(jDe,"isAbstractRule");Ev="AbstractType";s(KDe,"isAbstractType");zk="Condition";s(QDe,"isCondition");s(ZDe,"isFeatureName");s(fre,"isPrimitiveType");$L="TypeDefinition";s(JDe,"isTypeDefinition");$k="ValueLiteral";s(eRe,"isValueLiteral");GL="AbstractElement";s(Cv,"isAbstractElement");VL="ArrayLiteral";s(tRe,"isArrayLiteral");UL="ArrayType";s(qL,"isArrayType");WL="BooleanLiteral";s(HL,"isBooleanLiteral");YL="Conjunction";s(XL,"isConjunction");jL="Disjunction";s(KL,"isDisjunction");QL="Grammar";s(rRe,"isGrammar");dre="GrammarImport";s(nRe,"isGrammarImport");ZL="InferredType";s(Vk,"isInferredType");JL="Interface";s(Uk,"isInterface");pre="NamedArgument";s(iRe,"isNamedArgument");eD="Negation";s(tD,"isNegation");rD="NumberLiteral";s(aRe,"isNumberLiteral");nD="Parameter";s(sRe,"isParameter");iD="ParameterReference";s(aD,"isParameterReference");sD="ParserRule";s(Sa,"isParserRule");oD="ReferenceType";s(lD,"isReferenceType");mre="ReturnType";s(cD,"isReturnType");uD="SimpleType";s(qk,"isSimpleType");hD="StringLiteral";s(oRe,"isStringLiteral");Gk="TerminalRule";s(Ro,"isTerminalRule");fD="Type";s(Sv,"isType");gre="TypeAttribute";s(lRe,"isTypeAttribute");dD="UnionType";s(pD,"isUnionType");mD="Action";s(Cu,"isAction");gD="Alternatives";s(Wk,"isAlternatives");yD="Assignment";s(yl,"isAssignment");vD="CharacterRange";s(xD,"isCharacterRange");bD="CrossReference";s(Fd,"isCrossReference");kD="EndOfFile";s(wD,"isEndOfFile");TD="Group";s(Kh,"isGroup");ED="Keyword";s(Mo,"isKeyword");CD="NegatedToken";s(SD,"isNegatedToken");_D="RegexToken";s(AD,"isRegexToken");LD="RuleCall";s(vl,"isRuleCall");DD="TerminalAlternatives";s(RD,"isTerminalAlternatives");MD="TerminalGroup";s(ID,"isTerminalGroup");ND="TerminalRuleCall";s(Hk,"isTerminalRuleCall");OD="UnorderedGroup";s(Yk,"isUnorderedGroup");PD="UntilToken";s(BD,"isUntilToken");FD="Wildcard";s(zD,"isWildcard");Em=class extends Id{static{s(this,"LangiumGrammarAstReflection")}getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,r){switch(e){case mD:case gD:case yD:case vD:case bD:case kD:case TD:case ED:case CD:case _D:case LD:case DD:case MD:case ND:case OD:case PD:case FD:return this.isSubtype(GL,r);case VL:case rD:case hD:return this.isSubtype($k,r);case UL:case oD:case uD:case dD:return this.isSubtype($L,r);case WL:return this.isSubtype(zk,r)||this.isSubtype($k,r);case YL:case jL:case eD:case iD:return this.isSubtype(zk,r);case ZL:case JL:case fD:return this.isSubtype(Ev,r);case sD:return this.isSubtype(Tv,r)||this.isSubtype(Ev,r);case Gk:return this.isSubtype(Tv,r);default:return!1}}getReferenceType(e){let r=`${e.container.$type}:${e.property}`;switch(r){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Ev;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Tv;case"Grammar:usedGrammars":return QL;case"NamedArgument:parameter":case"ParameterReference:parameter":return nD;case"TerminalRuleCall:rule":return Gk;default:throw new Error(`${r} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},Gt=new Em});var jk={};ur(jk,{assignMandatoryProperties:()=>VD,copyAstNode:()=>GD,findLocalReferences:()=>uRe,findRootNode:()=>yre,getContainerOfType:()=>zd,getDocument:()=>Ai,hasContainerOfType:()=>cRe,linkContentToContainer:()=>Xk,streamAllContents:()=>gc,streamAst:()=>Io,streamContents:()=>Av,streamReferences:()=>Cm});function Xk(t){for(let[e,r]of Object.entries(t))e.startsWith("$")||(Array.isArray(r)?r.forEach((n,i)=>{$n(n)&&(n.$container=t,n.$containerProperty=e,n.$containerIndex=i)}):$n(r)&&(r.$container=t,r.$containerProperty=e))}function zd(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function cRe(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function Ai(t){let r=yre(t).$document;if(!r)throw new Error("AST node has no document.");return r}function yre(t){for(;t.$container;)t=t.$container;return t}function Av(t,e){if(!t)throw new Error("Node must be an AstNode.");let r=e?.range;return new ro(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexAv(r,e))}function Io(t,e){if(t){if(e?.range&&!$D(t,e.range))return new pc(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new pc(t,r=>Av(r,e),{includeRoot:!0})}function $D(t,e){var r;if(!e)return!0;let n=(r=t.$cstNode)===null||r===void 0?void 0:r.range;return n?BL(n,e):!1}function Cm(t){return new ro(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex{Cm(n).forEach(i=>{i.reference.ref===t&&r.push(i.reference)})}),Wr(r)}function VD(t,e){let r=t.getTypeMetaData(e.$type),n=e;for(let i of r.properties)i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=vre(i.defaultValue))}function vre(t){return Array.isArray(t)?[...t.map(vre)]:t}function GD(t,e){let r={$type:t.$type};for(let[n,i]of Object.entries(t))if(!n.startsWith("$"))if($n(i))r[n]=GD(i,e);else if(ua(i))r[n]=e(r,n,i.$refNode,i.$refText);else if(Array.isArray(i)){let a=[];for(let o of i)$n(o)?a.push(GD(o,e)):ua(o)?a.push(e(r,n,o.$refNode,o.$refText)):a.push(o);r[n]=a}else r[n]=i;return Xk(r),r}var Ha=_(()=>{"use strict";Do();Es();gl();s(Xk,"linkContentToContainer");s(zd,"getContainerOfType");s(cRe,"hasContainerOfType");s(Ai,"getDocument");s(yre,"findRootNode");s(Av,"streamContents");s(gc,"streamAllContents");s(Io,"streamAst");s($D,"isAstNodeInRange");s(Cm,"streamReferences");s(uRe,"findLocalReferences");s(VD,"assignMandatoryProperties");s(vre,"copyDefaultValue");s(GD,"copyAstNode")});function zt(t){return t.charCodeAt(0)}function Kk(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function Sm(t,e){if(t[e]===!0)throw"duplicate flag "+e;let r=t[e];t[e]=!0}function $d(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Lv(){throw Error("Internal Error - Should never get here!")}function UD(t){return t.type==="Character"}var qD=_(()=>{"use strict";s(zt,"cc");s(Kk,"insertToSet");s(Sm,"addFlag");s($d,"ASSERT_EXISTS");s(Lv,"ASSERT_NEVER_REACH_HERE");s(UD,"isCharacter")});var Dv,Rv,WD,xre=_(()=>{"use strict";qD();Dv=[];for(let t=zt("0");t<=zt("9");t++)Dv.push(t);Rv=[zt("_")].concat(Dv);for(let t=zt("a");t<=zt("z");t++)Rv.push(t);for(let t=zt("A");t<=zt("Z");t++)Rv.push(t);WD=[zt(" "),zt("\f"),zt(` +`),zt("\r"),zt(" "),zt("\v"),zt(" "),zt("\xA0"),zt("\u1680"),zt("\u2000"),zt("\u2001"),zt("\u2002"),zt("\u2003"),zt("\u2004"),zt("\u2005"),zt("\u2006"),zt("\u2007"),zt("\u2008"),zt("\u2009"),zt("\u200A"),zt("\u2028"),zt("\u2029"),zt("\u202F"),zt("\u205F"),zt("\u3000"),zt("\uFEFF")]});var hRe,Qk,fRe,Gd,bre=_(()=>{"use strict";qD();xre();hRe=/[0-9a-fA-F]/,Qk=/[0-9]/,fRe=/[1-9]/,Gd=class{static{s(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Sm(n,"global");break;case"i":Sm(n,"ignoreCase");break;case"m":Sm(n,"multiLine");break;case"u":Sm(n,"unicode");break;case"y":Sm(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){let e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}$d(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return Lv()}quantifier(e=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;$d(r);break}if(!(e===!0&&r===void 0)&&$d(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e,r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),$d(e)?(e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Lv()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[zt(` +`),zt("\r"),zt("\u2028"),zt("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=Dv;break;case"D":e=Dv,r=!0;break;case"s":e=WD;break;case"S":e=WD,r=!0;break;case"w":e=Rv;break;case"W":e=Rv,r=!0;break}return $d(e)?{type:"Set",value:e,complement:r}:Lv()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=zt("\f");break;case"n":e=zt(` +`);break;case"r":e=zt("\r");break;case"t":e=zt(" ");break;case"v":e=zt("\v");break}return $d(e)?{type:"Character",value:e}:Lv()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:zt("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:zt(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:zt(e)}}}characterClass(){let e=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),i=n.type==="Character";if(UD(n)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),o=a.type==="Character";if(UD(a)){if(a.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}});var yc,kre=_(()=>{"use strict";yc=class{static{s(this,"BaseRegExpVisitor")}visitChildren(e){for(let r in e){let n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}});var Mv=_(()=>{"use strict";bre();kre()});var Jk={};ur(Jk,{NEWLINE_REGEXP:()=>YD,escapeRegExp:()=>Ud,getCaseInsensitivePattern:()=>jD,getTerminalParts:()=>dRe,isMultilineComment:()=>XD,isWhitespace:()=>Zk,partialMatches:()=>KD,partialRegExp:()=>Tre});function dRe(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;let e=wre.pattern(t),r=[];for(let n of e.value.value)Vd.reset(t),Vd.visit(n),r.push({start:Vd.startRegexp,end:Vd.endRegex});return r}catch{return[]}}function XD(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Vd.reset(t),Vd.visit(wre.pattern(t)),Vd.multiline}catch{return!1}}function Zk(t){return(typeof t=="string"?new RegExp(t):t).test(" ")}function Ud(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jD(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Ud(e)).join("")}function KD(t,e){let r=Tre(t),n=e.match(r);return!!n&&n[0].length>0}function Tre(t){typeof t=="string"&&(t=new RegExp(t));let e=t,r=t.source,n=0;function i(){let a="",o;function l(h){a+=r.substr(n,h),n+=h}s(l,"appendRaw");function u(h){a+="(?:"+r.substr(n,h)+"|$)",n+=h}for(s(u,"appendOptional");n",n)-n+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?l(o[0].length):u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":o=n,n+=3,i(),a+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,i(),a+=r.substr(o,n-o);break;default:l(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else l(1),a+=i()+"|$)";break;case")":return++n,a;default:u(1);break}return a}return s(i,"process"),new RegExp(i(),t.flags)}var YD,wre,HD,Vd,_m=_(()=>{"use strict";Mv();YD=/\r?\n/gm,wre=new Gd,HD=class extends yc{static{s(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let r=String.fromCharCode(e.value);if(!this.multiline&&r===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let n=Ud(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){let r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!` +`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},Vd=new HD;s(dRe,"getTerminalParts");s(XD,"isMultilineComment");s(Zk,"isWhitespace");s(Ud,"escapeRegExp");s(jD,"getCaseInsensitivePattern");s(KD,"partialMatches");s(Tre,"partialRegExp")});var t6={};ur(t6,{findAssignment:()=>aR,findNameAssignment:()=>e6,findNodeForKeyword:()=>nR,findNodeForProperty:()=>Nv,findNodesForKeyword:()=>pRe,findNodesForKeywordInternal:()=>iR,findNodesForProperty:()=>tR,getActionAtElement:()=>Are,getActionType:()=>Dre,getAllReachableRules:()=>Iv,getCrossReferenceTerminal:()=>JD,getEntryRule:()=>Ere,getExplicitRuleType:()=>sR,getHiddenRules:()=>Cre,getRuleType:()=>oR,getTypeName:()=>qd,isArrayCardinality:()=>gRe,isArrayOperator:()=>yRe,isCommentTerminal:()=>eR,isDataType:()=>vRe,isDataTypeRule:()=>Ov,isOptionalCardinality:()=>mRe,terminalRegex:()=>Am});function Ere(t){return t.rules.find(e=>Sa(e)&&e.entry)}function Cre(t){return t.rules.filter(e=>Ro(e)&&e.hidden)}function Iv(t,e){let r=new Set,n=Ere(t);if(!n)return new Set(t.rules);let i=[n].concat(Cre(t));for(let o of i)Sre(o,r,e);let a=new Set;for(let o of t.rules)(r.has(o.name)||Ro(o)&&o.hidden)&&a.add(o);return a}function Sre(t,e,r){e.add(t.name),gc(t).forEach(n=>{if(vl(n)||r&&Hk(n)){let i=n.rule.ref;i&&!e.has(i.name)&&Sre(i,e,r)}})}function JD(t){if(t.terminal)return t.terminal;if(t.type.ref){let e=e6(t.type.ref);return e?.terminal}}function eR(t){return t.hidden&&!Am(t).test(" ")}function tR(t,e){return!t||!e?[]:rR(t,e,t.astNode,!0)}function Nv(t,e,r){if(!t||!e)return;let n=rR(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function rR(t,e,r,n){if(!n){let i=zd(t.grammarSource,yl);if(i&&i.feature===e)return[t]}return to(t)&&t.astNode===r?t.content.flatMap(i=>rR(i,e,r,!1)):[]}function pRe(t,e){return t?iR(t,e,t?.astNode):[]}function nR(t,e,r){if(!t)return;let n=iR(t,e,t?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function iR(t,e,r){if(t.astNode!==r)return[];if(Mo(t.grammarSource)&&t.grammarSource.value===e)return[t];let n=Od(t).iterator(),i,a=[];do if(i=n.next(),!i.done){let o=i.value;o.astNode===r?Mo(o.grammarSource)&&o.grammarSource.value===e&&a.push(o):n.prune()}while(!i.done);return a}function aR(t){var e;let r=t.astNode;for(;r===((e=t.container)===null||e===void 0?void 0:e.astNode);){let n=zd(t.grammarSource,yl);if(n)return n;t=t.container}}function e6(t){let e=t;return Vk(e)&&(Cu(e.$container)?e=e.$container.$container:Sa(e.$container)?e=e.$container:jh(e.$container)),_re(t,e,new Map)}function _re(t,e,r){var n;function i(a,o){let l;return zd(a,yl)||(l=_re(o,o,r)),r.set(t,l),l}if(s(i,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(let a of gc(e)){if(yl(a)&&a.feature.toLowerCase()==="name")return r.set(t,a),a;if(vl(a)&&Sa(a.rule.ref))return i(a,a.rule.ref);if(qk(a)&&(!((n=a.typeRef)===null||n===void 0)&&n.ref))return i(a,a.typeRef.ref)}}function Are(t){let e=t.$container;if(Kh(e)){let r=e.elements,n=r.indexOf(t);for(let i=n-1;i>=0;i--){let a=r[i];if(Cu(a))return a;{let o=gc(r[i]).find(Cu);if(o)return o}}}if(Cv(e))return Are(e)}function mRe(t,e){return t==="?"||t==="*"||Kh(e)&&!!e.guardCondition}function gRe(t){return t==="*"||t==="+"}function yRe(t){return t==="+="}function Ov(t){return Lre(t,new Set)}function Lre(t,e){if(e.has(t))return!0;e.add(t);for(let r of gc(t))if(vl(r)){if(!r.rule.ref||Sa(r.rule.ref)&&!Lre(r.rule.ref,e))return!1}else{if(yl(r))return!1;if(Cu(r))return!1}return!!t.definition}function vRe(t){return ZD(t.type,new Set)}function ZD(t,e){if(e.has(t))return!0;if(e.add(t),qL(t))return!1;if(lD(t))return!1;if(pD(t))return t.types.every(r=>ZD(r,e));if(qk(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){let r=t.typeRef.ref;return Sv(r)?ZD(r.type,e):!1}else return!1}else return!1}function sR(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){let e=t.returnType.ref;if(e){if(Sa(e))return e.name;if(Uk(e)||Sv(e))return e.name}}}function qd(t){var e;if(Sa(t))return Ov(t)?t.name:(e=sR(t))!==null&&e!==void 0?e:t.name;if(Uk(t)||Sv(t)||cD(t))return t.name;if(Cu(t)){let r=Dre(t);if(r)return r}else if(Vk(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function Dre(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return qd(t.type.ref)}function oR(t){var e,r,n;return Ro(t)?(r=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&r!==void 0?r:"string":Ov(t)?t.name:(n=sR(t))!==null&&n!==void 0?n:t.name}function Am(t){let e={s:!1,i:!1,u:!1},r=Lm(t.definition,e),n=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function Lm(t,e){if(RD(t))return xRe(t);if(ID(t))return bRe(t);if(xD(t))return TRe(t);if(Hk(t)){let r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return Su(Lm(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(SD(t))return wRe(t);if(BD(t))return kRe(t);if(AD(t)){let r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),i=t.regex.substring(r+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Su(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(zD(t))return Su(lR,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function xRe(t){return Su(t.elements.map(e=>Lm(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function bRe(t){return Su(t.elements.map(e=>Lm(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function kRe(t){return Su(`${lR}*?${Lm(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function wRe(t){return Su(`(?!${Lm(t.terminal)})${lR}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function TRe(t){return t.right?Su(`[${QD(t.left)}-${QD(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):Su(QD(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function QD(t){return Ud(t.value)}function Su(t,e){var r;return(e.wrap!==!1||e.lookahead)&&(t=`(${(r=e.lookahead)!==null&&r!==void 0?r:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}var lR,xl=_(()=>{"use strict";Fk();mc();Do();Ha();gl();_m();s(Ere,"getEntryRule");s(Cre,"getHiddenRules");s(Iv,"getAllReachableRules");s(Sre,"ruleDfs");s(JD,"getCrossReferenceTerminal");s(eR,"isCommentTerminal");s(tR,"findNodesForProperty");s(Nv,"findNodeForProperty");s(rR,"findNodesForPropertyInternal");s(pRe,"findNodesForKeyword");s(nR,"findNodeForKeyword");s(iR,"findNodesForKeywordInternal");s(aR,"findAssignment");s(e6,"findNameAssignment");s(_re,"findNameAssignmentInternal");s(Are,"getActionAtElement");s(mRe,"isOptionalCardinality");s(gRe,"isArrayCardinality");s(yRe,"isArrayOperator");s(Ov,"isDataTypeRule");s(Lre,"isDataTypeRuleInternal");s(vRe,"isDataType");s(ZD,"isDataTypeInternal");s(sR,"getExplicitRuleType");s(qd,"getTypeName");s(Dre,"getActionType");s(oR,"getRuleType");s(Am,"terminalRegex");lR=/[\s\S]/.source;s(Lm,"abstractElementToRegex");s(xRe,"terminalAlternativesToRegex");s(bRe,"terminalGroupToRegex");s(kRe,"untilTokenToRegex");s(wRe,"negateTokenToRegex");s(TRe,"characterRangeToRegex");s(QD,"keywordToRegex");s(Su,"withCardinality")});function cR(t){let e=[],r=t.Grammar;for(let n of r.rules)Ro(n)&&eR(n)&&XD(Am(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:Pk}}var uR=_(()=>{"use strict";gl();xl();_m();mc();s(cR,"createGrammarConfig")});var hR=_(()=>{"use strict"});function Dm(t){console&&console.error&&console.error(`Error: ${t}`)}function Pv(t){console&&console.warn&&console.warn(`Warning: ${t}`)}var Rre=_(()=>{"use strict";s(Dm,"PRINT_ERROR");s(Pv,"PRINT_WARNING")});function Bv(t){let e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}var Mre=_(()=>{"use strict";s(Bv,"timer")});function Fv(t){function e(){}s(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return s(n,"fakeAccess"),n(),n(),t;(0,eval)(t)}var Ire=_(()=>{"use strict";s(Fv,"toFastProperties")});var Rm=_(()=>{"use strict";Rre();Mre();Ire()});function ERe(t){return CRe(t)?t.LABEL:t.name}function CRe(t){return si(t.LABEL)&&t.LABEL!==""}function r6(t){return Ge(t,Mm)}function Mm(t){function e(r){return Ge(r,Mm)}if(s(e,"convertDefinition"),t instanceof Yr){let r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return si(t.label)&&(r.label=t.label),r}else{if(t instanceof vn)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Xr)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof xn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof bn)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Mm(new sr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ln)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Mm(new sr({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof mr)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof cn)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof sr){let r={type:"Terminal",name:t.terminalType.name,label:ERe(t.terminalType),idx:t.idx};si(t.label)&&(r.terminalLabel=t.label);let n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=_o(n)?n.source:n),r}else{if(t instanceof Ya)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}var no,Yr,Ya,vn,Xr,xn,bn,mr,ln,cn,sr,n6=_(()=>{"use strict";Tt();s(ERe,"tokenLabel");s(CRe,"hasTokenLabel");no=class{static{s(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),be(this.definition,r=>{r.accept(e)})}},Yr=class extends no{static{s(this,"NonTerminal")}constructor(e){super([]),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Ya=class extends no{static{s(this,"Rule")}constructor(e){super(e.definition),this.orgText="",aa(this,Ts(e,r=>r!==void 0))}},vn=class extends no{static{s(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,aa(this,Ts(e,r=>r!==void 0))}},Xr=class extends no{static{s(this,"Option")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},xn=class extends no{static{s(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},bn=class extends no{static{s(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},mr=class extends no{static{s(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},ln=class extends no{static{s(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,aa(this,Ts(e,r=>r!==void 0))}},cn=class extends no{static{s(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,aa(this,Ts(e,r=>r!==void 0))}},sr=class{static{s(this,"Terminal")}constructor(e){this.idx=1,aa(this,Ts(e,r=>r!==void 0))}accept(e){e.visit(this)}};s(r6,"serializeGrammar");s(Mm,"serializeProduction")});var Xa,Nre=_(()=>{"use strict";n6();Xa=class{static{s(this,"GAstVisitor")}visit(e){let r=e;switch(r.constructor){case Yr:return this.visitNonTerminal(r);case vn:return this.visitAlternative(r);case Xr:return this.visitOption(r);case xn:return this.visitRepetitionMandatory(r);case bn:return this.visitRepetitionMandatoryWithSeparator(r);case ln:return this.visitRepetitionWithSeparator(r);case mr:return this.visitRepetition(r);case cn:return this.visitAlternation(r);case sr:return this.visitTerminal(r);case Ya:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function fR(t){return t instanceof vn||t instanceof Xr||t instanceof mr||t instanceof xn||t instanceof bn||t instanceof ln||t instanceof sr||t instanceof Ya}function Wd(t,e=[]){return t instanceof Xr||t instanceof mr||t instanceof ln?!0:t instanceof cn?pv(t.definition,n=>Wd(n,e)):t instanceof Yr&&Rn(e,t)?!1:t instanceof no?(t instanceof Yr&&e.push(t),Ca(t.definition,n=>Wd(n,e))):!1}function dR(t){return t instanceof cn}function Cs(t){if(t instanceof Yr)return"SUBRULE";if(t instanceof Xr)return"OPTION";if(t instanceof cn)return"OR";if(t instanceof xn)return"AT_LEAST_ONE";if(t instanceof bn)return"AT_LEAST_ONE_SEP";if(t instanceof ln)return"MANY_SEP";if(t instanceof mr)return"MANY";if(t instanceof sr)return"CONSUME";throw Error("non exhaustive match")}var Ore=_(()=>{"use strict";Tt();n6();s(fR,"isSequenceProd");s(Wd,"isOptionalProd");s(dR,"isBranchingProd");s(Cs,"getProductionDslName")});var ja=_(()=>{"use strict";n6();Nre();Ore()});function Pre(t,e,r){return[new Xr({definition:[new sr({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var _u,i6=_(()=>{"use strict";Tt();ja();_u=class{static{s(this,"RestWalker")}walk(e,r=[]){be(e.definition,(n,i)=>{let a=ai(e.definition,i+1);if(n instanceof Yr)this.walkProdRef(n,a,r);else if(n instanceof sr)this.walkTerminal(n,a,r);else if(n instanceof vn)this.walkFlat(n,a,r);else if(n instanceof Xr)this.walkOption(n,a,r);else if(n instanceof xn)this.walkAtLeastOne(n,a,r);else if(n instanceof bn)this.walkAtLeastOneSep(n,a,r);else if(n instanceof ln)this.walkManySep(n,a,r);else if(n instanceof mr)this.walkMany(n,a,r);else if(n instanceof cn)this.walkOr(n,a,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){let i=r.concat(n);this.walk(e,i)}walkOption(e,r,n){let i=r.concat(n);this.walk(e,i)}walkAtLeastOne(e,r,n){let i=[new Xr({definition:e.definition})].concat(r,n);this.walk(e,i)}walkAtLeastOneSep(e,r,n){let i=Pre(e,r,n);this.walk(e,i)}walkMany(e,r,n){let i=[new Xr({definition:e.definition})].concat(r,n);this.walk(e,i)}walkManySep(e,r,n){let i=Pre(e,r,n);this.walk(e,i)}walkOr(e,r,n){let i=r.concat(n);be(e.definition,a=>{let o=new vn({definition:[a]});this.walk(o,i)})}};s(Pre,"restForRepetitionWithSeparator")});function Hd(t){if(t instanceof Yr)return Hd(t.referencedRule);if(t instanceof sr)return ARe(t);if(fR(t))return SRe(t);if(dR(t))return _Re(t);throw Error("non exhaustive match")}function SRe(t){let e=[],r=t.definition,n=0,i=r.length>n,a,o=!0;for(;i&&o;)a=r[n],o=Wd(a),e=e.concat(Hd(a)),n=n+1,i=r.length>n;return bm(e)}function _Re(t){let e=Ge(t.definition,r=>Hd(r));return bm(Ir(e))}function ARe(t){return[t.terminalType]}var pR=_(()=>{"use strict";Tt();ja();s(Hd,"first");s(SRe,"firstForSequence");s(_Re,"firstForBranching");s(ARe,"firstForTerminal")});var a6,mR=_(()=>{"use strict";a6="_~IN~_"});function Bre(t){let e={};return be(t,r=>{let n=new gR(r).startWalking();aa(e,n)}),e}function LRe(t,e){return t.name+e+a6}var gR,Fre=_(()=>{"use strict";i6();pR();Tt();mR();ja();gR=class extends _u{static{s(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){let i=LRe(e.referencedRule,e.idx)+this.topProd.name,a=r.concat(n),o=new vn({definition:a}),l=Hd(o);this.follows[i]=l}};s(Bre,"computeAllProdsFollows");s(LRe,"buildBetweenProdsFollowPrefix")});function Im(t){let e=t.toString();if(s6.hasOwnProperty(e))return s6[e];{let r=DRe.pattern(e);return s6[e]=r,r}}function zre(){s6={}}var s6,DRe,o6=_(()=>{"use strict";Mv();s6={},DRe=new Gd;s(Im,"getRegExpAst");s(zre,"clearRegExpParserCache")});function Vre(t,e=!1){try{let r=Im(t);return yR(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Gre)e&&Pv(`${zv} Unable to optimize: < ${t.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Dm(`${zv} + Failed parsing: < ${t.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function yR(t,e,r){switch(t.type){case"Disjunction":for(let i=0;i{if(typeof u=="number")l6(u,e,r);else{let h=u;if(r===!0)for(let f=h.from;f<=h.to;f++)l6(f,e,r);else{for(let f=h.from;f<=h.to&&f=Nm){let f=h.from>=Nm?h.from:Nm,d=h.to,p=vc(f),m=vc(d);for(let g=p;g<=m;g++)e[g]=g}}}});break;case"Group":yR(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&vR(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return nr(e)}function l6(t,e,r){let n=vc(t);e[n]=n,r===!0&&RRe(t,e)}function RRe(t,e){let r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){let i=vc(n.charCodeAt(0));e[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=vc(i.charCodeAt(0));e[a]=a}}}function $re(t,e){return qa(t.value,r=>{if(typeof r=="number")return Rn(e,r);{let n=r;return qa(e,i=>n.from<=i&&i<=n.to)!==void 0}})}function vR(t){let e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ct(t.value)?Ca(t.value,vR):vR(t.value):!1}function c6(t,e){if(e instanceof RegExp){let r=Im(e),n=new xR(t);return n.visit(r),n.found}else return qa(e,r=>Rn(t,r.charCodeAt(0)))!==void 0}var Gre,zv,xR,Ure=_(()=>{"use strict";Mv();Tt();Rm();o6();bR();Gre="Complement Sets are not supported for first char optimization",zv=`Unable to use "first char" lexer optimizations: +`;s(Vre,"getOptimizedStartCodesIndices");s(yR,"firstCharOptimizedIndices");s(l6,"addOptimizedIdxToResult");s(RRe,"handleIgnoreCase");s($re,"findCode");s(vR,"isWholeOptional");xR=class extends yc{static{s(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){Rn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?$re(e,this.targetCharCodes)===void 0&&(this.found=!0):$re(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};s(c6,"canMatchCharCode")});function Hre(t,e){e=Vh(e,{useSticky:wR,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:s((b,k)=>k(),"tracer")});let r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{jRe()});let n;r("Reject Lexer.NA",()=>{n=qh(t,b=>b[Yd]===jn.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=Ge(n,b=>{let k=b[Yd];if(_o(k)){let A=k.source;return A.length===1&&A!=="^"&&A!=="$"&&A!=="."&&!k.ignoreCase?A:A.length===2&&A[0]==="\\"&&!Rn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],A[1])?A[1]:e.useSticky?Wre(k):qre(k)}else{if(fi(k))return i=!0,{exec:k};if(typeof k=="object")return i=!0,k;if(typeof k=="string"){if(k.length===1)return k;{let A=k.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),w=new RegExp(A);return e.useSticky?Wre(w):qre(w)}}else throw Error("non exhaustive match")}})});let o,l,u,h,f;r("misc mapping",()=>{o=Ge(n,b=>b.tokenTypeIdx),l=Ge(n,b=>{let k=b.GROUP;if(k!==jn.SKIPPED){if(si(k))return k;if(jt(k))return!1;throw Error("non exhaustive match")}}),u=Ge(n,b=>{let k=b.LONGER_ALT;if(k)return ct(k)?Ge(k,w=>pk(n,w)):[pk(n,k)]}),h=Ge(n,b=>b.PUSH_MODE),f=Ge(n,b=>Ve(b,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{let b=ene(e.lineTerminatorCharacters);d=Ge(n,k=>!1),e.positionTracking!=="onlyOffset"&&(d=Ge(n,k=>Ve(k,"LINE_BREAKS")?!!k.LINE_BREAKS:Jre(k,b)===!1&&c6(b,k.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=Ge(n,Qre),m=Ge(a,YRe),g=Or(n,(b,k)=>{let A=k.GROUP;return si(A)&&A!==jn.SKIPPED&&(b[A]=[]),b},{}),y=Ge(a,(b,k)=>({pattern:a[k],longerAlt:u[k],canLineTerminator:d[k],isCustom:p[k],short:m[k],group:l[k],push:h[k],pop:f[k],tokenTypeIdx:o[k],tokenType:n[k]}))});let v=!0,x=[];return e.safeMode||r("First Char Optimization",()=>{x=Or(n,(b,k,A)=>{if(typeof k.PATTERN=="string"){let w=k.PATTERN.charCodeAt(0),T=vc(w);kR(b,T,y[A])}else if(ct(k.START_CHARS_HINT)){let w;be(k.START_CHARS_HINT,T=>{let C=typeof T=="string"?T.charCodeAt(0):T,E=vc(C);w!==E&&(w=E,kR(b,E,y[A]))})}else if(_o(k.PATTERN))if(k.PATTERN.unicode)v=!1,e.ensureOptimizations&&Dm(`${zv} Unable to analyze < ${k.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let w=Vre(k.PATTERN,e.ensureOptimizations);Vt(w)&&(v=!1),be(w,T=>{kR(b,T,y[A])})}else e.ensureOptimizations&&Dm(`${zv} TokenType: <${k.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:v}}function Yre(t,e){let r=[],n=IRe(t);r=r.concat(n.errors);let i=NRe(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(MRe(a)),r=r.concat(VRe(a)),r=r.concat(URe(a,e)),r=r.concat(qRe(a)),r}function MRe(t){let e=[],r=Nr(t,n=>_o(n[Yd]));return e=e.concat(PRe(r)),e=e.concat(zRe(r)),e=e.concat($Re(r)),e=e.concat(GRe(r)),e=e.concat(BRe(r)),e}function IRe(t){let e=Nr(t,i=>!Ve(i,Yd)),r=Ge(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:In.MISSING_PATTERN,tokenTypes:[i]})),n=Uh(t,e);return{errors:r,valid:n}}function NRe(t){let e=Nr(t,i=>{let a=i[Yd];return!_o(a)&&!fi(a)&&!Ve(a,"exec")&&!si(a)}),r=Ge(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:In.INVALID_PATTERN,tokenTypes:[i]})),n=Uh(t,e);return{errors:r,valid:n}}function PRe(t){class e extends yc{static{s(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Nr(t,i=>{let a=i.PATTERN;try{let o=Im(a),l=new e;return l.visit(o),l.found}catch{return ORe.test(a.source)}});return Ge(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:In.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function BRe(t){let e=Nr(t,n=>n.PATTERN.test(""));return Ge(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:In.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function zRe(t){class e extends yc{static{s(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Nr(t,i=>{let a=i.PATTERN;try{let o=Im(a),l=new e;return l.visit(o),l.found}catch{return FRe.test(a.source)}});return Ge(r,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:In.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function $Re(t){let e=Nr(t,n=>{let i=n[Yd];return i instanceof RegExp&&(i.multiline||i.global)});return Ge(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:In.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function GRe(t){let e=[],r=Ge(t,a=>Or(t,(o,l)=>(a.PATTERN.source===l.PATTERN.source&&!Rn(e,l)&&l.PATTERN!==jn.NA&&(e.push(l),o.push(l)),o),[]));r=uc(r);let n=Nr(r,a=>a.length>1);return Ge(n,a=>{let o=Ge(a,u=>u.name);return{message:`The same RegExp pattern ->${Yi(a).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:In.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function VRe(t){let e=Nr(t,n=>{if(!Ve(n,"GROUP"))return!1;let i=n.GROUP;return i!==jn.SKIPPED&&i!==jn.NA&&!si(i)});return Ge(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:In.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function URe(t,e){let r=Nr(t,i=>i.PUSH_MODE!==void 0&&!Rn(e,i.PUSH_MODE));return Ge(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:In.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function qRe(t){let e=[],r=Or(t,(n,i,a)=>{let o=i.PATTERN;return o===jn.NA||(si(o)?n.push({str:o,idx:a,tokenType:i}):_o(o)&&HRe(o)&&n.push({str:o.source,idx:a,tokenType:i})),n},[]);return be(t,(n,i)=>{be(r,({str:a,idx:o,tokenType:l})=>{if(i${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:In.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),e}function WRe(t,e){if(_o(e)){let r=e.exec(t);return r!==null&&r.index===0}else{if(fi(e))return e(t,0,[],{});if(Ve(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function HRe(t){return qa([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}function qre(t){let e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Wre(t){let e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Xre(t,e,r){let n=[];return Ve(t,Om)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Om+`> property in its definition +`,type:In.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Ve(t,u6)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+u6+`> property in its definition +`,type:In.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Ve(t,u6)&&Ve(t,Om)&&!Ve(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Om}: <${t.defaultMode}>which does not exist +`,type:In.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Ve(t,u6)&&be(t.modes,(i,a)=>{be(i,(o,l)=>{if(jt(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${l}> +`,type:In.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Ve(o,"LONGER_ALT")){let u=ct(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];be(u,h=>{!jt(h)&&!Rn(i,h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${a}> +`,type:In.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function jre(t,e,r){let n=[],i=!1,a=uc(Ir(nr(t.modes))),o=qh(a,u=>u[Yd]===jn.NA),l=ene(r);return e&&be(o,u=>{let h=Jre(u,l);if(h!==!1){let d={message:XRe(u,h),type:h.issue,tokenType:u};n.push(d)}else Ve(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):c6(l,u.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:In.NO_LINE_BREAKS_FLAGS}),n}function Kre(t){let e={},r=kr(t);return be(r,n=>{let i=t[n];if(ct(i))e[n]=[];else throw Error("non exhaustive match")}),e}function Qre(t){let e=t.PATTERN;if(_o(e))return!1;if(fi(e))return!0;if(Ve(e,"exec"))return!0;if(si(e))return!1;throw Error("non exhaustive match")}function YRe(t){return si(t)&&t.length===1?t.charCodeAt(0):!1}function Jre(t,e){if(Ve(t,"LINE_BREAKS"))return!1;if(_o(t.PATTERN)){try{c6(e,t.PATTERN)}catch(r){return{issue:In.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(si(t.PATTERN))return!1;if(Qre(t))return{issue:In.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function XRe(t,e){if(e.issue===In.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${t.name}> Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===In.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${t.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function ene(t){return Ge(t,r=>si(r)?r.charCodeAt(0):r)}function kR(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function vc(t){return t255?255+~~(t/255):t}}var Yd,Om,u6,wR,ORe,FRe,Zre,Nm,h6,bR=_(()=>{"use strict";Mv();$v();Tt();Rm();Ure();o6();Yd="PATTERN",Om="defaultMode",u6="modes",wR=typeof new RegExp("(?:)").sticky=="boolean";s(Hre,"analyzeTokenTypes");s(Yre,"validatePatterns");s(MRe,"validateRegExpPattern");s(IRe,"findMissingPatterns");s(NRe,"findInvalidPatterns");ORe=/[^\\][$]/;s(PRe,"findEndOfInputAnchor");s(BRe,"findEmptyMatchRegExps");FRe=/[^\\[][\^]|^\^/;s(zRe,"findStartOfInputAnchor");s($Re,"findUnsupportedFlags");s(GRe,"findDuplicatePatterns");s(VRe,"findInvalidGroupType");s(URe,"findModesThatDoNotExist");s(qRe,"findUnreachablePatterns");s(WRe,"testTokenType");s(HRe,"noMetaChar");s(qre,"addStartOfInput");s(Wre,"addStickyFlag");s(Xre,"performRuntimeChecks");s(jre,"performWarningRuntimeChecks");s(Kre,"cloneEmptyGroups");s(Qre,"isCustomPattern");s(YRe,"isShortPattern");Zre={test:s(function(t){let e=t.length;for(let r=this.lastIndex;r{r.isParent=r.categoryMatches.length>0})}function KRe(t){let e=Hr(t),r=t,n=!0;for(;n;){r=uc(Ir(Ge(r,a=>a.CATEGORIES)));let i=Uh(r,e);e=e.concat(i),Vt(i)?n=!1:r=i}return e}function QRe(t){be(t,e=>{TR(e)||(nne[tne]=e,e.tokenTypeIdx=tne++),rne(e)&&!ct(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),rne(e)||(e.CATEGORIES=[]),eMe(e)||(e.categoryMatches=[]),tMe(e)||(e.categoryMatchesMap={})})}function ZRe(t){be(t,e=>{e.categoryMatches=[],be(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(nne[n].tokenTypeIdx)})})}function JRe(t){be(t,e=>{ine([],e)})}function ine(t,e){be(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),be(e.CATEGORIES,r=>{let n=t.concat(e);Rn(n,r)||ine(n,r)})}function TR(t){return Ve(t,"tokenTypeIdx")}function rne(t){return Ve(t,"CATEGORIES")}function eMe(t){return Ve(t,"categoryMatches")}function tMe(t){return Ve(t,"categoryMatchesMap")}function ane(t){return Ve(t,"tokenTypeIdx")}var tne,nne,Xd=_(()=>{"use strict";Tt();s(Au,"tokenStructuredMatcher");s(Pm,"tokenStructuredMatcherNoCategories");tne=1,nne={};s(Lu,"augmentTokenTypes");s(KRe,"expandCategories");s(QRe,"assignTokenDefaultProps");s(ZRe,"assignCategoriesTokensProp");s(JRe,"assignCategoriesMapProp");s(ine,"singleAssignCategoriesToksMap");s(TR,"hasShortKeyProperty");s(rne,"hasCategoriesProperty");s(eMe,"hasExtendingTokensTypesProperty");s(tMe,"hasExtendingTokensTypesMapProperty");s(ane,"isTokenType")});var ER,CR=_(()=>{"use strict";ER={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}});var In,Gv,jn,$v=_(()=>{"use strict";bR();Tt();Rm();Xd();CR();o6();(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(In||(In={}));Gv={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ER,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Gv);jn=class{static{s(this,"Lexer")}constructor(e,r=Gv){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:l,value:u}=Bv(a),h=l>10?console.warn:console.log;return this.traceInitIndent time: ${l}ms`),this.traceInitIndent--,u}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=aa({},Gv,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Gv.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Zre;else if(this.config.lineTerminatorCharacters===Gv.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),ct(e)?i={modes:{defaultMode:Hr(e)},defaultMode:Om}:(a=!1,i=Hr(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Xre(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(jre(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},be(i.modes,(l,u)=>{i.modes[u]=qh(l,h=>jt(h))});let o=kr(i.modes);if(be(i.modes,(l,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Yre(l,o))}),Vt(this.lexerDefinitionErrors)){Lu(l);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=Hre(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=h.charCodeToPatternIdxToConfig,this.emptyGroups=aa({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=h.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Vt(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let u=Ge(this.lexerDefinitionErrors,h=>h.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+u)}be(this.lexerDefinitionWarning,l=>{Pv(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(wR?(this.chopInput=Wi,this.match=this.matchWithTest):(this.updateLastIndex=zn,this.match=this.matchWithExec),a&&(this.handleModes=zn),this.trackStartLines===!1&&(this.computeNewColumn=Wi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=zn),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let l=Or(this.canModeBeOptimized,(u,h,f)=>(h===!1&&u.push(f),u),[]);if(r.ensureOptimizations&&!Vt(l))throw Error(`Lexer Modes: < ${l.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{zre()}),this.TRACE_INIT("toFastProperties",()=>{Fv(this)})})}tokenize(e,r=this.defaultMode){if(!Vt(this.lexerDefinitionErrors)){let i=Ge(this.lexerDefinitionErrors,a=>a.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,i,a,o,l,u,h,f,d,p,m,g,y,v,x,b,k=e,A=k.length,w=0,T=0,C=this.hasCustom?0:Math.floor(e.length/10),E=new Array(C),S=[],R=this.trackStartLines?1:void 0,D=this.trackStartLines?1:void 0,L=Kre(this.emptyGroups),P=this.trackStartLines,M=this.config.lineTerminatorsPattern,F=0,I=[],O=[],z=[],N=[];Object.freeze(N);let U;function $(){return I}s($,"getPossiblePatternsSlow");function W(fe){let ne=vc(fe),H=O[ne];return H===void 0?N:H}s(W,"getPossiblePatternsOptimized");let ee=s(fe=>{if(z.length===1&&fe.tokenType.PUSH_MODE===void 0){let ne=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(fe);S.push({offset:fe.startOffset,line:fe.startLine,column:fe.startColumn,length:fe.image.length,message:ne})}else{z.pop();let ne=sa(z);I=this.patternIdxToConfig[ne],O=this.charCodeToPatternIdxToConfig[ne],F=I.length;let H=this.canModeBeOptimized[ne]&&this.config.safeMode===!1;O&&H?U=W:U=$}},"pop_mode");function te(fe){z.push(fe),O=this.charCodeToPatternIdxToConfig[fe],I=this.patternIdxToConfig[fe],F=I.length,F=I.length;let ne=this.canModeBeOptimized[fe]&&this.config.safeMode===!1;O&&ne?U=W:U=$}s(te,"push_mode"),te.call(this,r);let ce,Z=this.config.recoveryEnabled;for(;wu.length){u=o,h=f,ce=ie;break}}}break}}if(u!==null){if(d=u.length,p=ce.group,p!==void 0&&(m=ce.tokenTypeIdx,g=this.createTokenInstance(u,w,m,ce.tokenType,R,D,d),this.handlePayload(g,h),p===!1?T=this.addToken(E,T,g):L[p].push(g)),e=this.chopInput(e,d),w=w+d,D=this.computeNewColumn(D,d),P===!0&&ce.canLineTerminator===!0){let Q=0,K,re;M.lastIndex=0;do K=M.test(u),K===!0&&(re=M.lastIndex-1,Q++);while(K===!0);Q!==0&&(R=R+Q,D=d-re,this.updateTokenEndLineColumnLocation(g,p,re,Q,R,D,d))}this.handleModes(ce,ee,te,g)}else{let Q=w,K=R,re=D,ie=Z===!1;for(;ie===!1&&w{"use strict";Tt();$v();Xd();s(Du,"tokenLabel");s(SR,"hasTokenLabel");rMe="parent",sne="categories",one="label",lne="group",cne="push_mode",une="pop_mode",hne="longer_alt",fne="line_breaks",dne="start_chars_hint";s(f6,"createToken");s(nMe,"createTokenInternal");io=f6({name:"EOF",pattern:jn.NA});Lu([io]);s(jd,"createTokenInstance");s(Vv,"tokenMatcher")});var Ru,pne,bl,Bm=_(()=>{"use strict";Kd();Tt();ja();Ru={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${SR(t)?`--> ${Du(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",l=` +but found: '`+Yi(e).image+"'";if(n)return a+n+l;{let u=Or(t,(p,m)=>p.concat(m),[]),h=Ge(u,p=>`[${Ge(p,m=>Du(m)).join(", ")}]`),d=`one of these possible Token sequences: +${Ge(h,(p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return a+d+l}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){let i="Expecting: ",o=` +but found: '`+Yi(e).image+"'";if(r)return i+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${Ge(t,h=>`[${Ge(h,f=>Du(f)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(Ru);pne={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},bl={buildDuplicateFoundError(t,e){function r(f){return f instanceof sr?f.terminalType.name:f instanceof Yr?f.nonTerminalName:""}s(r,"getExtraProductionArgument");let n=t.name,i=Yi(e),a=i.idx,o=Cs(i),l=r(i),u=a>0,h=`->${o}${u?a:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,` +`),h},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){let e=Ge(t.prefixPath,i=>Du(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(t){let e=Ge(t.prefixPath,i=>Du(i)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(t){let e=Cs(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: + inside <${t.topLevelRule.name}> Rule. + has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){let e=t.topLevelRule.name,r=Ge(t.leftRecursionPath,a=>a.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${n} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Ya?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function mne(t,e){let r=new _R(t,e);return r.resolveRefs(),r.errors}var _R,gne=_(()=>{"use strict";Ss();Tt();ja();s(mne,"resolveGrammar");_R=class extends Xa{static{s(this,"GastRefResolverVisitor")}constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){be(nr(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Li.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}});function g6(t,e,r=[]){r=Hr(r);let n=[],i=0;function a(l){return l.concat(ai(t,i+1))}s(a,"remainingPathWith");function o(l){let u=g6(a(l),e,r);return n.concat(u)}for(s(o,"getAlternativesForProd");r.length{Vt(u.definition)===!1&&(n=o(u.definition))}),n;if(l instanceof sr)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:ai(t,i)}),n}function y6(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE",l=!1,u=e.length,h=u-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Vt(d);){let p=d.pop();if(p===o){l&&sa(d).idx<=h&&d.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,v=p.occurrenceStack;if(Vt(m))continue;let x=m[0];if(x===i){let b={idx:g,def:ai(m),ruleStack:wu(y),occurrenceStack:wu(v)};d.push(b)}else if(x instanceof sr)if(g=0;b--){let k=x.definition[b],A={idx:g,def:k.definition.concat(ai(m)),ruleStack:y,occurrenceStack:v};d.push(A),d.push(o)}else if(x instanceof vn)d.push({idx:g,def:x.definition.concat(ai(m)),ruleStack:y,occurrenceStack:v});else if(x instanceof Ya)d.push(iMe(x,g,y,v));else throw Error("non exhaustive match")}return f}function iMe(t,e,r,n){let i=Hr(r);i.push(t.name);let a=Hr(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}var AR,d6,Fm,p6,Uv,m6,qv,Wv=_(()=>{"use strict";Tt();pR();i6();ja();AR=class extends _u{static{s(this,"AbstractNextPossibleTokensWalker")}constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Hr(this.path.ruleStack).reverse(),this.occurrenceStack=Hr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let i=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Vt(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},d6=class extends AR{static{s(this,"NextAfterTokenWalker")}constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(n),a=new vn({definition:i});this.possibleTokTypes=Hd(a),this.found=!0}}},Fm=class extends _u{static{s(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},p6=class extends Fm{static{s(this,"NextTerminalAfterManyWalker")}walkMany(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,r,n)}},Uv=class extends Fm{static{s(this,"NextTerminalAfterManySepWalker")}walkManySep(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,r,n)}},m6=class extends Fm{static{s(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,r,n)}},qv=class extends Fm{static{s(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){let i=Yi(r.concat(n));this.result.isEndOfRule=i===void 0,i instanceof sr&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,r,n)}};s(g6,"possiblePathsFrom");s(y6,"nextPossibleTokensAfter");s(iMe,"expandTopLevelRule")});function Hv(t){if(t instanceof Xr||t==="Option")return Nn.OPTION;if(t instanceof mr||t==="Repetition")return Nn.REPETITION;if(t instanceof xn||t==="RepetitionMandatory")return Nn.REPETITION_MANDATORY;if(t instanceof bn||t==="RepetitionMandatoryWithSeparator")return Nn.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof ln||t==="RepetitionWithSeparator")return Nn.REPETITION_WITH_SEPARATOR;if(t instanceof cn||t==="Alternation")return Nn.ALTERNATION;throw Error("non exhaustive match")}function x6(t){let{occurrence:e,rule:r,prodType:n,maxLookahead:i}=t,a=Hv(n);return a===Nn.ALTERNATION?zm(e,r,i):$m(e,r,a,i)}function vne(t,e,r,n,i,a){let o=zm(t,e,r),l=Ene(o)?Pm:Au;return a(o,n,l,i)}function xne(t,e,r,n,i,a){let o=$m(t,e,i,r),l=Ene(o)?Pm:Au;return a(o[0],l,n)}function bne(t,e,r,n){let i=t.length,a=Ca(t,o=>Ca(o,l=>l.length===1));if(e)return function(o){let l=Ge(o,u=>u.GATE);for(let u=0;uIr(u)),l=Or(o,(u,h,f)=>(be(h,d=>{Ve(u,d.tokenTypeIdx)||(u[d.tokenTypeIdx]=f),be(d.categoryMatches,p=>{Ve(u,p)||(u[p]=f)})}),u),{});return function(){let u=this.LA(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;oa.length===1),i=t.length;if(n&&!r){let a=Ir(t);if(a.length===1&&Vt(a[0].categoryMatches)){let l=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{let o=Or(a,(l,u,h)=>(l[u.tokenTypeIdx]=!0,be(u.categoryMatches,f=>{l[f]=!0}),l),[]);return function(){let l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;ag6([o],1)),n=yne(r.length),i=Ge(r,o=>{let l={};return be(o,u=>{let h=LR(u.partialPath);be(h,f=>{l[f]=!0})}),l}),a=r;for(let o=1;o<=e;o++){let l=a;a=yne(l.length);for(let u=0;u{let x=LR(v.partialPath);be(x,b=>{i[u][b]=!0})})}}}}return n}function zm(t,e,r,n){let i=new v6(t,Nn.ALTERNATION,n);return e.accept(i),wne(i.result,r)}function $m(t,e,r,n){let i=new v6(t,r);e.accept(i);let a=i.result,l=new DR(e,t,r).startWalking(),u=new vn({definition:a}),h=new vn({definition:l});return wne([u,h],n)}function b6(t,e){e:for(let r=0;r{let i=e[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function Ene(t){return Ca(t,e=>Ca(e,r=>Ca(r,n=>Vt(n.categoryMatches))))}var Nn,DR,v6,Gm=_(()=>{"use strict";Tt();Wv();i6();Xd();ja();(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(Nn||(Nn={}));s(Hv,"getProdType");s(x6,"getLookaheadPaths");s(vne,"buildLookaheadFuncForOr");s(xne,"buildLookaheadFuncForOptionalProd");s(bne,"buildAlternativesLookAheadFunc");s(kne,"buildSingleAlternativeLookaheadFunction");DR=class extends _u{static{s(this,"RestDefinitionFinderWalker")}constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,i){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(i),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,Nn.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,Nn.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,Nn.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,Nn.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,Nn.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},v6=class extends Xa{static{s(this,"InsideDefinitionFinderVisitor")}constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Nn.OPTION)}visitRepetition(e){this.checkIsTarget(e,Nn.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Nn.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Nn.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Nn.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Nn.ALTERNATION)}};s(yne,"initializeArrayOfArrays");s(LR,"pathToHashKeys");s(aMe,"isUniquePrefixHash");s(wne,"lookAheadSequenceFromAlternatives");s(zm,"getLookaheadPathsForOr");s($m,"getLookaheadPathsForOptionalProd");s(b6,"containsPath");s(Tne,"isStrictPrefixOfPath");s(Ene,"areTokenCategoriesNotUsed")});function Cne(t){let e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Ge(e,r=>Object.assign({type:Li.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Sne(t,e,r,n){let i=oa(t,u=>sMe(u,r)),a=fMe(t,e,r),o=oa(t,u=>cMe(u,r)),l=oa(t,u=>lMe(u,t,n,r));return i.concat(a,o,l)}function sMe(t,e){let r=new RR;t.accept(r);let n=r.allProductions,i=q9(n,oMe),a=Ts(i,l=>l.length>1);return Ge(nr(a),l=>{let u=Yi(l),h=e.buildDuplicateFoundError(t,l),f=Cs(u),d={message:h,type:Li.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:u.idx},p=_ne(u);return p&&(d.parameter=p),d})}function oMe(t){return`${Cs(t)}_#_${t.idx}_#_${_ne(t)}`}function _ne(t){return t instanceof sr?t.terminalType.name:t instanceof Yr?t.nonTerminalName:""}function lMe(t,e,r,n){let i=[];if(Or(e,(o,l)=>l.name===t.name?o+1:o,0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:o,type:Li.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function Ane(t,e,r){let n=[],i;return Rn(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Li.INVALID_RULE_OVERRIDE,ruleName:t})),n}function IR(t,e,r,n=[]){let i=[],a=k6(e.definition);if(Vt(a))return[];{let o=t.name;Rn(a,t)&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Li.LEFT_RECURSION,ruleName:o});let u=Uh(a,n.concat([t])),h=oa(u,f=>{let d=Hr(n);return d.push(f),IR(t,f,r,d)});return i.concat(h)}}function k6(t){let e=[];if(Vt(t))return e;let r=Yi(t);if(r instanceof Yr)e.push(r.referencedRule);else if(r instanceof vn||r instanceof Xr||r instanceof xn||r instanceof bn||r instanceof ln||r instanceof mr)e=e.concat(k6(r.definition));else if(r instanceof cn)e=Ir(Ge(r.definition,a=>k6(a.definition)));else if(!(r instanceof sr))throw Error("non exhaustive match");let n=Wd(r),i=t.length>1;if(n&&i){let a=ai(t);return e.concat(k6(a))}else return e}function Lne(t,e){let r=new Yv;t.accept(r);let n=r.alternations;return oa(n,a=>{let o=wu(a.definition);return oa(o,(l,u)=>{let h=y6([l],[],Au,1);return Vt(h)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:a,emptyChoiceIdx:u}),type:Li.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:a.idx,alternative:u+1}]:[]})})}function Dne(t,e,r){let n=new Yv;t.accept(n);let i=n.alternations;return i=qh(i,o=>o.ignoreAmbiguities===!0),oa(i,o=>{let l=o.idx,u=o.maxLookahead||e,h=zm(l,t,u,o),f=uMe(h,o,t,r),d=hMe(h,o,t,r);return f.concat(d)})}function cMe(t,e){let r=new Yv;t.accept(r);let n=r.alternations;return oa(n,a=>a.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:a}),type:Li.TOO_MANY_ALTS,ruleName:t.name,occurrence:a.idx}]:[])}function Rne(t,e,r){let n=[];return be(t,i=>{let a=new MR;i.accept(a);let o=a.allProductions;be(o,l=>{let u=Hv(l),h=l.maxLookahead||e,f=l.idx,p=$m(f,i,u,h)[0];if(Vt(Ir(p))){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:Li.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function uMe(t,e,r,n){let i=[],a=Or(t,(l,u,h)=>(e.definition[h].ignoreAmbiguities===!0||be(u,f=>{let d=[h];be(t,(p,m)=>{h!==m&&b6(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!b6(i,f)&&(i.push(f),l.push({alts:d,path:f}))}),l),[]);return Ge(a,l=>{let u=Ge(l.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:l.path}),type:Li.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:l.alts}})}function hMe(t,e,r,n){let i=Or(t,(o,l,u)=>{let h=Ge(l,f=>({idx:u,path:f}));return o.concat(h)},[]);return uc(oa(i,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path,f=Nr(i,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{let m=[p.idx+1,u+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:m,prefixPath:p.path}),type:Li.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}function fMe(t,e,r){let n=[],i=Ge(e,a=>a.name);return be(t,a=>{let o=a.name;if(Rn(i,o)){let l=r.buildNamespaceConflictError(a);n.push({message:l,type:Li.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}var RR,Yv,MR,Xv=_(()=>{"use strict";Tt();Ss();ja();Gm();Wv();Xd();s(Cne,"validateLookahead");s(Sne,"validateGrammar");s(sMe,"validateDuplicateProductions");s(oMe,"identifyProductionForDuplicates");s(_ne,"getExtraProductionArgument");RR=class extends Xa{static{s(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};s(lMe,"validateRuleDoesNotAlreadyExist");s(Ane,"validateRuleIsOverridden");s(IR,"validateNoLeftRecursion");s(k6,"getFirstNoneTerminal");Yv=class extends Xa{static{s(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};s(Lne,"validateEmptyOrAlternative");s(Dne,"validateAmbiguousAlternationAlternatives");MR=class extends Xa{static{s(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};s(cMe,"validateTooManyAlts");s(Rne,"validateSomeNonEmptyLookaheadPath");s(uMe,"checkAlternativesAmbiguities");s(hMe,"checkPrefixAlternativesAmbiguities");s(fMe,"checkTerminalAndNoneTerminalsNameSpace")});function Mne(t){let e=Vh(t,{errMsgProvider:pne}),r={};return be(t.rules,n=>{r[n.name]=n}),mne(r,e.errMsgProvider)}function Ine(t){return t=Vh(t,{errMsgProvider:bl}),Sne(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Nne=_(()=>{"use strict";Tt();gne();Xv();Bm();s(Mne,"resolveGrammar");s(Ine,"validateGrammar")});function Qh(t){return Rn(zne,t.name)}var One,Pne,Bne,Fne,zne,Vm,Qd,jv,Kv,Qv,Um=_(()=>{"use strict";Tt();One="MismatchedTokenException",Pne="NoViableAltException",Bne="EarlyExitException",Fne="NotAllInputParsedException",zne=[One,Pne,Bne,Fne];Object.freeze(zne);s(Qh,"isRecognitionException");Vm=class extends Error{static{s(this,"RecognitionException")}constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Qd=class extends Vm{static{s(this,"MismatchedTokenException")}constructor(e,r,n){super(e,r),this.previousToken=n,this.name=One}},jv=class extends Vm{static{s(this,"NoViableAltException")}constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Pne}},Kv=class extends Vm{static{s(this,"NotAllInputParsedException")}constructor(e,r){super(e,r),this.name=Fne}},Qv=class extends Vm{static{s(this,"EarlyExitException")}constructor(e,r,n){super(e,r),this.previousToken=n,this.name=Bne}}});function dMe(t,e,r,n,i,a,o){let l=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[l];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new a(m,i).startWalking(),this.firstAfterRepMap[l]=u}let h=u.token,f=u.occurrence,d=u.isEndOfRule;this.RULE_STACK.length===1&&d&&h===void 0&&(h=io,f=1),!(h===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,f,o)&&this.tryInRepetitionRecovery(t,e,r,h)}var NR,PR,OR,w6,BR=_(()=>{"use strict";Kd();Tt();Um();mR();Ss();NR={},PR="InRuleRecoveryException",OR=class extends Error{static{s(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=PR}},w6=class{static{s(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Ve(e,"recoveryEnabled")?e.recoveryEnabled:Ka.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=dMe)}getTokenToInsert(e){let r=jd(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,i){let a=this.findReSyncTokenType(),o=this.exportLexerState(),l=[],u=!1,h=this.LA(1),f=this.LA(1),d=s(()=>{let p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new Qd(m,h,this.LA(0));g.resyncedTokens=wu(l),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(f,i)){d();return}else if(n.call(this)){d(),e.apply(this,r);return}else this.tokenMatcher(f,a)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){let n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new OR("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Vt(r))return!1;let n=this.LA(1);return qa(r,a=>this.tokenMatcher(n,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return Rn(n,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let i=qa(e,a=>Vv(r,a));if(i!==void 0)return i;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return NR;let e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Ge(e,(n,i)=>i===0?NR:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=Ge(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return Ir(e)}getFollowSetFromFollowKey(e){if(e===NR)return[io];let r=e.ruleName+e.idxInCallingRule+a6+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,io)||r.push(e),r}reSyncTo(e){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return wu(r)}attemptInRepetitionRecovery(e,r,n,i,a,o,l){}getCurrentGrammarPath(e,r){let n=this.getHumanReadableRuleStack(),i=Hr(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Ge(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};s(dMe,"attemptInRepetitionRecovery")});function T6(t,e,r){return r|e|t}var E6=_(()=>{"use strict";s(T6,"getKeyForAutomaticLookahead")});var Mu,FR=_(()=>{"use strict";Tt();Bm();Ss();Xv();Gm();Mu=class{static{s(this,"LLkLookaheadStrategy")}constructor(e){var r;this.maxLookahead=(r=e?.maxLookahead)!==null&&r!==void 0?r:Ka.maxLookahead}validate(e){let r=this.validateNoLeftRecursion(e.rules);if(Vt(r)){let n=this.validateEmptyOrAlternatives(e.rules),i=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...i,...a]}return r}validateNoLeftRecursion(e){return oa(e,r=>IR(r,r,bl))}validateEmptyOrAlternatives(e){return oa(e,r=>Lne(r,bl))}validateAmbiguousAlternationAlternatives(e,r){return oa(e,n=>Dne(n,r,bl))}validateSomeNonEmptyLookaheadPath(e,r){return Rne(e,r,bl)}buildLookaheadForAlternation(e){return vne(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,bne)}buildLookaheadForOptional(e){return xne(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Hv(e.prodType),kne)}}});function pMe(t){C6.reset(),t.accept(C6);let e=C6.dslMethods;return C6.reset(),e}var S6,zR,C6,$ne=_(()=>{"use strict";Tt();Ss();E6();ja();FR();S6=class{static{s(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=Ve(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ka.dynamicTokensEnabled,this.maxLookahead=Ve(e,"maxLookahead")?e.maxLookahead:Ka.maxLookahead,this.lookaheadStrategy=Ve(e,"lookaheadStrategy")?e.lookaheadStrategy:new Mu({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){be(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:i,option:a,repetitionMandatory:o,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:u}=pMe(r);be(n,h=>{let f=h.idx===0?"":h.idx;this.TRACE_INIT(`${Cs(h)}${f}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=T6(this.fullRuleNameToShort[r.name],256,h.idx);this.setLaFuncCache(p,d)})}),be(i,h=>{this.computeLookaheadFunc(r,h.idx,768,"Repetition",h.maxLookahead,Cs(h))}),be(a,h=>{this.computeLookaheadFunc(r,h.idx,512,"Option",h.maxLookahead,Cs(h))}),be(o,h=>{this.computeLookaheadFunc(r,h.idx,1024,"RepetitionMandatory",h.maxLookahead,Cs(h))}),be(l,h=>{this.computeLookaheadFunc(r,h.idx,1536,"RepetitionMandatoryWithSeparator",h.maxLookahead,Cs(h))}),be(u,h=>{this.computeLookaheadFunc(r,h.idx,1280,"RepetitionWithSeparator",h.maxLookahead,Cs(h))})})})}computeLookaheadFunc(e,r,n,i,a,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),u=T6(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,l)})}getKeyForAutomaticLookahead(e,r){let n=this.getLastExplicitRuleShortName();return T6(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},zR=class extends Xa{static{s(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},C6=new zR;s(pMe,"collectMethods")});function VR(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{"use strict";s(VR,"setNodeLocationOnlyOffset");s(UR,"setNodeLocationFull");s(Gne,"addTerminalToCst");s(Vne,"addNoneTerminalToCst")});function qR(t,e){Object.defineProperty(t,mMe,{enumerable:!1,configurable:!0,writable:!1,value:e})}var mMe,qne=_(()=>{"use strict";mMe="name";s(qR,"defineNameProp")});function gMe(t,e){let r=kr(t),n=r.length;for(let i=0;io.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${a.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}function Hne(t,e,r){let n=s(function(){},"derivedConstructor");qR(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return be(e,a=>{i[a]=gMe}),n.prototype=i,n.prototype.constructor=n,n}function yMe(t,e){return vMe(t,e)}function vMe(t,e){let r=Nr(e,i=>fi(t[i])===!1),n=Ge(r,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:WR.MISSING_METHOD,methodName:i}));return uc(n)}var WR,Yne=_(()=>{"use strict";Tt();qne();s(gMe,"defaultVisit");s(Wne,"createBaseSemanticVisitorConstructor");s(Hne,"createBaseVisitorConstructorWithDefaults");(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(WR||(WR={}));s(yMe,"validateVisitor");s(vMe,"validateMissingCstMethods")});var D6,Xne=_(()=>{"use strict";Une();Tt();Yne();Ss();D6=class{static{s(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Ve(e,"nodeLocationTracking")?e.nodeLocationTracking:Ka.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=zn,this.cstFinallyStateUpdate=zn,this.cstPostTerminal=zn,this.cstPostNonTerminal=zn,this.cstPostRule=zn;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=UR,this.setNodeLocationFromNode=UR,this.cstPostRule=zn,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=zn,this.setNodeLocationFromNode=zn,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=VR,this.setNodeLocationFromNode=VR,this.cstPostRule=zn,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=zn,this.setNodeLocationFromNode=zn,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=zn,this.setNodeLocationFromNode=zn,this.cstPostRule=zn,this.setInitialNodeLocation=zn;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];Gne(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){let n=this.CST_STACK[this.CST_STACK.length-1];Vne(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(jt(this.baseCstVisitorConstructor)){let e=Wne(this.className,kr(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(jt(this.baseCstVisitorWithDefaultsConstructor)){let e=Hne(this.className,kr(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}});var R6,jne=_(()=>{"use strict";Ss();R6=class{static{s(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):qm}LA(e){let r=this.currIdx+e;return r<0||this.tokVectorLength<=r?qm:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}});var M6,Kne=_(()=>{"use strict";Tt();Um();Ss();Bm();Xv();ja();M6=class{static{s(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Wm){if(Rn(this.definedRulesNames,e)){let o={message:bl.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Li.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);let i=this.defineRule(e,r,n);return this[e]=i,i}OVERRIDE_RULE(e,r,n=Wm){let i=Ane(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(e,r,n);return this[e]=a,a}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(Qh(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return r6(nr(this.gastProductionsCache))}}});var I6,Qne=_(()=>{"use strict";Tt();E6();Um();Gm();Wv();Ss();BR();Kd();Xd();I6=class{static{s(this,"RecognizerEngine")}initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Pm,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Ve(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(ct(e)){if(Vt(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(ct(e))this.tokensMap=Or(e,(a,o)=>(a[o.name]=o,a),{});else if(Ve(e,"modes")&&Ca(Ir(nr(e.modes)),ane)){let a=Ir(nr(e.modes)),o=bm(a);this.tokensMap=Or(o,(l,u)=>(l[u.name]=u,l),{})}else if(on(e))this.tokensMap=Hr(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=io;let n=Ve(e,"modes")?Ir(nr(e.modes)):nr(e),i=Ca(n,a=>Vt(a.categoryMatches));this.tokenMatcher=i?Pm:Au,Lu(nr(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=Ve(n,"resyncEnabled")?n.resyncEnabled:Wm.resyncEnabled,a=Ve(n,"recoveryValueFunc")?n.recoveryValueFunc:Wm.recoveryValueFunc,o=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let l;return this.outputCst===!0?l=s(function(...f){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f);let d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):l=s(function(...f){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f)}catch(d){return this.invokeRuleCatch(d,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(l,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(Qh(e)){let o=e;if(a){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l))if(o.resyncedTokens=this.reSyncTo(l),this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(e);else{if(this.outputCst){let u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,o.partialCstResult=u}throw o}}else{if(i)return this.moveToTerminatedState(),n(e);throw o}}else throw e}optionInternal(e,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof e!="function"){a=e.DEF;let o=e.GATE;if(o!==void 0){let l=i;i=s(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else a=e;if(i.call(this)===!0)return a.call(this)}atLeastOneInternal(e,r){let n=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let o=r.GATE;if(o!==void 0){let l=i;i=s(()=>o.call(this)&&l.call(this),"lookAheadFunc")}}else a=r;if(i.call(this)===!0){let o=this.doSingleRepetition(a);for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Nn.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,m6)}atLeastOneSepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let l=s(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,i,qv],l,1536,e,qv)}else throw this.raiseEarlyExitException(e,Nn.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let i=this.getLaFuncFromCache(n),a;if(typeof r!="function"){a=r.DEF;let l=r.GATE;if(l!==void 0){let u=i;i=s(()=>l.call(this)&&u.call(this),"lookaheadFunction")}}else a=r;let o=!0;for(;i.call(this)===!0&&o===!0;)o=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,p6,o)}manySepFirstInternal(e,r){let n=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){i.call(this);let l=s(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,l,i,Uv],l,1280,e,Uv)}}repetitionSepSecondInternal(e,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,i,a],n,1536,e,a)}doSingleRepetition(e){let r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){let n=this.getKeyForAutomaticLookahead(256,r),i=ct(e)?e:e.DEF,o=this.getLaFuncFromCache(n).call(this,i);if(o!==void 0)return i[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Kv(r,e))}}subruleInternal(e,r,n){let i;try{let a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=e.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(a){throw this.subruleInternalError(a,n,e.ruleName)}}subruleInternalError(e,r,n){throw Qh(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let i;try{let a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n)}catch(a){i=this.consumeInternalRecovery(e,r,a)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i}consumeInternalError(e,r,n){let i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Qd(i,r,a))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(a){throw a.name===PR?n:a}}else throw n}saveRecogState(){let e=this.errors,r=Hr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),io)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}});var N6,Zne=_(()=>{"use strict";Um();Tt();Gm();Ss();N6=class{static{s(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=Ve(e,"errorMessageProvider")?e.errorMessageProvider:Ka.errorMessageProvider}SAVE_ERROR(e){if(Qh(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Hr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Hr(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],l=$m(e,a,r,this.maxLookahead)[0],u=[];for(let f=1;f<=this.maxLookahead;f++)u.push(this.LA(f));let h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new Qv(h,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=zm(e,i,this.maxLookahead),o=[];for(let h=1;h<=this.maxLookahead;h++)o.push(this.LA(h));let l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:o,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new jv(u,this.LA(1),l))}}});var O6,Jne=_(()=>{"use strict";Wv();Tt();O6=class{static{s(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,r){let n=this.gastProductionsCache[e];if(jt(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return y6([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let r=Yi(e.ruleStack),i=this.getGAstProductions()[r];return new d6(i,e).startWalking()}}});function Jv(t,e,r,n=!1){B6(r);let i=sa(this.recordingProdStack),a=fi(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),Ve(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),F6}function kMe(t,e){B6(e);let r=sa(this.recordingProdStack),n=ct(t)===!1,i=n===!1?t:t.DEF,a=new cn({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Ve(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD);let o=pv(i,l=>fi(l.GATE));return a.hasPredicates=o,r.definition.push(a),be(i,l=>{let u=new vn({definition:[]});a.definition.push(u),Ve(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Ve(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),F6}function rie(t){return t===0?"":`${t}`}function B6(t){if(t<0||t>tie){let e=new Error(`Invalid DSL Method idx value: <${t}> + Idx value must be a none negative value smaller than ${tie+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}var F6,eie,tie,nie,iie,bMe,P6,aie=_(()=>{"use strict";Tt();ja();$v();Xd();Kd();Ss();E6();F6={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(F6);eie=!0,tie=Math.pow(2,8)-1,nie=f6({name:"RECORDING_PHASE_TOKEN",pattern:jn.NA});Lu([nie]);iie=jd(nie,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(iie);bMe={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},P6=class{static{s(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let r=e>0?e:"";this[`CONSUME${r}`]=function(n,i){return this.consumeInternalRecord(n,e,i)},this[`SUBRULE${r}`]=function(n,i){return this.subruleInternalRecord(n,e,i)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return qm}topLevelRuleRecord(e,r){try{let n=new Ya({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Jv.call(this,Xr,e,r)}atLeastOneInternalRecord(e,r){Jv.call(this,xn,r,e)}atLeastOneSepFirstInternalRecord(e,r){Jv.call(this,bn,r,e,eie)}manyInternalRecord(e,r){Jv.call(this,mr,r,e)}manySepFirstInternalRecord(e,r){Jv.call(this,ln,r,e,eie)}orInternalRecord(e,r){return kMe.call(this,e,r)}subruleInternalRecord(e,r,n){if(B6(r),!e||Ve(e,"ruleName")===!1){let l=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let i=sa(this.recordingProdStack),a=e.ruleName,o=new Yr({idx:r,nonTerminalName:a,label:n?.LABEL,referencedRule:void 0});return i.definition.push(o),this.outputCst?bMe:F6}consumeInternalRecord(e,r,n){if(B6(r),!TR(e)){let o=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let i=sa(this.recordingProdStack),a=new sr({idx:r,terminalType:e,label:n?.LABEL});return i.definition.push(a),iie}};s(Jv,"recordProd");s(kMe,"recordOrProd");s(rie,"getIdxSuffix");s(B6,"assertMethodIdxIsValid")});var z6,sie=_(()=>{"use strict";Tt();Rm();Ss();z6=class{static{s(this,"PerformanceTracer")}initPerformanceTracer(e){if(Ve(e,"traceInitPerf")){let r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Ka.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:i,value:a}=Bv(r),o=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,a}else return r()}}});function oie(t,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]})})}var lie=_(()=>{"use strict";s(oie,"applyMixins")});function $6(t=void 0){return function(){return t}}var qm,Ka,Wm,Li,e2,t2,Ss=_(()=>{"use strict";Tt();Rm();Fre();Kd();Bm();Nne();BR();$ne();Xne();jne();Kne();Qne();Zne();Jne();aie();sie();lie();Xv();qm=jd(io,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(qm);Ka=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ru,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Wm=Object.freeze({recoveryValueFunc:s(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Li||(Li={}));s($6,"EMPTY_ALT");e2=class t{static{s(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{Fv(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),be(this.definedRulesNames,i=>{let o=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Mne({rules:nr(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Vt(n)&&this.skipValidations===!1){let i=Ine({rules:nr(this.gastProductionsCache),tokenTypes:nr(this.tokensMap),errMsgProvider:bl,grammarName:r}),a=Cne({lookaheadStrategy:this.lookaheadStrategy,rules:nr(this.gastProductionsCache),tokenTypes:nr(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),Vt(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=Bre(nr(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:nr(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(nr(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!Vt(this.definitionErrors))throw e=Ge(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: + ${e.join(` +------------------------------- +`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Ve(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=Ve(r,"skipValidations")?r.skipValidations:Ka.skipValidations}};e2.DEFER_DEFINITION_ERRORS_HANDLING=!1;oie(e2,[w6,S6,D6,R6,I6,M6,N6,O6,P6,z6]);t2=class extends e2{static{s(this,"EmbeddedActionsParser")}constructor(e,r=Ka){let n=Hr(r);n.outputCst=!1,super(e,n)}}});var cie=_(()=>{"use strict";ja()});var uie=_(()=>{"use strict"});var hie=_(()=>{"use strict";cie();uie()});var fie=_(()=>{"use strict";hR()});var Zd=_(()=>{"use strict";hR();Ss();$v();Kd();Gm();FR();Bm();Um();CR();ja();ja();hie();fie()});function Jd(t,e,r){return`${t.name}_${e}_${r}`}function gie(t){let e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};AMe(e,t);let r=t.length;for(let n=0;nyie(t,e,o));return jm(t,e,n,r,...i)}function NMe(t,e,r){let n=Xi(t,e,r,{type:Zh});Jh(t,n);let i=jm(t,e,n,r,e0(t,e,r));return OMe(t,e,r,i)}function e0(t,e,r){let n=Nr(Ge(r.definition,i=>yie(t,e,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:BMe(t,n)}function vie(t,e,r,n,i){let a=n.left,o=n.right,l=Xi(t,e,r,{type:_Me});Jh(t,l);let u=Xi(t,e,r,{type:mie});return a.loopback=l,u.loopback=l,t.decisionMap[Jd(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,mi(o,l),i===void 0?(mi(l,a),mi(l,u)):(mi(l,u),mi(l,i.left),mi(i.right,a)),{left:a,right:u}}function xie(t,e,r,n,i){let a=n.left,o=n.right,l=Xi(t,e,r,{type:SMe});Jh(t,l);let u=Xi(t,e,r,{type:mie}),h=Xi(t,e,r,{type:CMe});return l.loopback=h,u.loopback=h,mi(l,a),mi(l,u),mi(o,h),i!==void 0?(mi(h,u),mi(h,i.left),mi(i.right,a)):mi(h,l),t.decisionMap[Jd(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}function OMe(t,e,r,n){let i=n.left,a=n.right;return mi(i,a),t.decisionMap[Jd(e,"Option",r.idx)]=i,n}function Jh(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function jm(t,e,r,n,...i){let a=Xi(t,e,n,{type:EMe,start:r});r.end=a;for(let l of i)l!==void 0?(mi(r,l.left),mi(l.right,a)):mi(r,a);let o={left:r,right:a};return t.decisionMap[Jd(e,PMe(n),n.idx)]=r,o}function PMe(t){if(t instanceof cn)return"Alternation";if(t instanceof Xr)return"Option";if(t instanceof mr)return"Repetition";if(t instanceof ln)return"RepetitionWithSeparator";if(t instanceof xn)return"RepetitionMandatory";if(t instanceof bn)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function BMe(t,e){let r=e.length;for(let a=0;a{"use strict";ym();z9();Zd();s(Jd,"buildATNKey");Zh=1,TMe=2,die=4,pie=5,Xm=7,EMe=8,CMe=9,SMe=10,_Me=11,mie=12,r2=class{static{s(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Hm=class extends r2{static{s(this,"AtomTransition")}constructor(e,r){super(e),this.tokenType=r}},n2=class extends r2{static{s(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Ym=class extends r2{static{s(this,"RuleTransition")}constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}};s(gie,"createATN");s(AMe,"createRuleStartAndStopATNStates");s(yie,"atom");s(LMe,"repetition");s(DMe,"repetitionSep");s(RMe,"repetitionMandatory");s(MMe,"repetitionMandatorySep");s(IMe,"alternation");s(NMe,"option");s(e0,"block");s(vie,"plus");s(xie,"star");s(OMe,"optional");s(Jh,"defineDecisionState");s(jm,"makeAlts");s(PMe,"getProdType");s(BMe,"makeBlock");s(YR,"tokenRef");s(FMe,"ruleRef");s(zMe,"buildRuleHandle");s(mi,"epsilon");s(Xi,"newState");s(XR,"addTransition");s($Me,"removeState")});function jR(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}var i2,Km,kie=_(()=>{"use strict";ym();i2={},Km=class{static{s(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let r=jR(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Ge(this.configs,e=>e.alt)}get key(){let e="";for(let r in this.map)e+=r+":";return e}};s(jR,"getATNConfigKey")});function GMe(t,e){let r={};return n=>{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:t,decision:e,states:{}},r[i]=a),a}}function Tie(t,e=!0){let r=new Set;for(let n of t){let i=new Set;for(let a of n){if(a===void 0){if(e)break;return!1}let o=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of o)if(r.has(l)){if(!i.has(l))return!1}else r.add(l),i.add(l)}}return!0}function VMe(t){let e=t.decisionStates.length,r=Array(e);for(let n=0;nDu(i)).join(", "),r=t.production.idx===0?"":t.production.idx,n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${YMe(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n}function YMe(t){if(t instanceof Yr)return"SUBRULE";if(t instanceof Xr)return"OPTION";if(t instanceof cn)return"OR";if(t instanceof xn)return"AT_LEAST_ONE";if(t instanceof bn)return"AT_LEAST_ONE_SEP";if(t instanceof ln)return"MANY_SEP";if(t instanceof mr)return"MANY";if(t instanceof sr)return"CONSUME";throw Error("non exhaustive match")}function XMe(t,e,r){let n=oa(e.configs.elements,a=>a.state.transitions),i=IJ(n.filter(a=>a instanceof Hm).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:t}}function jMe(t,e){return t.edges[e.tokenTypeIdx]}function KMe(t,e,r){let n=new Km,i=[];for(let o of t.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Xm){i.push(o);continue}let l=o.state.transitions.length;for(let u=0;u0&&!tIe(a))for(let o of i)a.add(o);return a}function QMe(t,e){if(t instanceof Hm&&Vv(e,t.tokenType))return t.target}function ZMe(t,e){let r;for(let n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function Cie(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function Eie(t,e,r,n){return n=Sie(t,n),e.edges[r.tokenTypeIdx]=n,n}function Sie(t,e){if(e===i2)return e;let r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}function JMe(t){let e=new Km,r=t.transitions.length;for(let n=0;n0){let i=[...t.stack],o={state:i.pop(),alt:t.alt,stack:i};V6(o,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function sIe(t){for(let e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var G6,wie,a2,_ie=_(()=>{"use strict";Zd();bie();kie();Y9();G9();NJ();ym();O5();uk();mk();Q9();s(GMe,"createDFACache");G6=class{static{s(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="",r=this.predicates.length;for(let n=0;nconsole.log(n)}initialize(e){this.atn=gie(e.rules),this.dfas=VMe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:r,rule:n,hasPredicates:i,dynamicTokensEnabled:a}=e,o=this.dfas,l=this.logging,u=Jd(n,"Alternation",r),f=this.atn.decisionMap[u].decision,d=Ge(x6({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>Ge(p,m=>m[0]));if(Tie(d,!1)&&!a){let p=Or(d,(m,g,y)=>(be(g,v=>{v&&(m[v.tokenTypeIdx]=y,be(v.categoryMatches,x=>{m[x]=y}))}),m),{});return i?function(m){var g;let y=this.LA(1),v=p[y.tokenTypeIdx];if(m!==void 0&&v!==void 0){let x=(g=m[v])===null||g===void 0?void 0:g.GATE;if(x!==void 0&&x.call(this)===!1)return}return v}:function(){let m=this.LA(1);return p[m.tokenTypeIdx]}}else return i?function(p){let m=new G6,g=p===void 0?0:p.length;for(let v=0;vGe(p,m=>m[0]));if(Tie(d)&&d[0][0]&&!a){let p=d[0],m=Ir(p);if(m.length===1&&Vt(m[0].categoryMatches)){let y=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{let g=Or(m,(y,v)=>(v!==void 0&&(y[v.tokenTypeIdx]=!0,be(v.categoryMatches,x=>{y[x]=!0})),y),{});return function(){let y=this.LA(1);return g[y.tokenTypeIdx]===!0}}}return function(){let p=KR.call(this,o,f,wie,l);return typeof p=="object"?!1:p===0}}};s(Tie,"isLL1Sequence");s(VMe,"initATNSimulator");s(KR,"adaptivePredict");s(UMe,"performLookahead");s(qMe,"computeLookaheadTarget");s(WMe,"reportLookaheadAmbiguity");s(HMe,"buildAmbiguityError");s(YMe,"getProductionDslName");s(XMe,"buildAdaptivePredictError");s(jMe,"getExistingTargetState");s(KMe,"computeReachSet");s(QMe,"getReachableTarget");s(ZMe,"getUniqueAlt");s(Cie,"newDFAState");s(Eie,"addDFAEdge");s(Sie,"addDFAState");s(JMe,"computeStartState");s(V6,"closure");s(eIe,"getEpsilonTarget");s(tIe,"hasConfigInRuleStopState");s(rIe,"allConfigsInRuleStopStates");s(nIe,"hasConflictTerminatingPrediction");s(iIe,"getConflictingAltSets");s(aIe,"hasConflictingAltSet");s(sIe,"hasStateAssociatedWithOneAlt")});var Aie=_(()=>{"use strict";_ie()});var Lie,QR,Die,U6,Pr,gr,q6,Rie,ZR,Mie,Iie,Nie,Oie,JR,Pie,Bie,Fie,W6,Qm,Zm,eM,Jm,zie,tM,rM,nM,iM,aM,$ie,Gie,sM,Vie,oM,s2,Uie,qie,Wie,Hie,Yie,Xie,jie,Kie,H6,Qie,Zie,Jie,eae,tae,rae,nae,iae,aae,sae,oae,Y6,lae,cae,uae,hae,fae,dae,pae,mae,gae,yae,vae,xae,bae,lM,cM,kae,wae,Tae,Eae,Cae,Sae,_ae,Aae,Lae,uM,Le,hM=_(()=>{"use strict";(function(t){function e(r){return typeof r=="string"}s(e,"is"),t.is=e})(Lie||(Lie={}));(function(t){function e(r){return typeof r=="string"}s(e,"is"),t.is=e})(QR||(QR={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}s(e,"is"),t.is=e})(Die||(Die={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}s(e,"is"),t.is=e})(U6||(U6={}));(function(t){function e(n,i){return n===Number.MAX_VALUE&&(n=U6.MAX_VALUE),i===Number.MAX_VALUE&&(i=U6.MAX_VALUE),{line:n,character:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.uinteger(i.line)&&Le.uinteger(i.character)}s(r,"is"),t.is=r})(Pr||(Pr={}));(function(t){function e(n,i,a,o){if(Le.uinteger(n)&&Le.uinteger(i)&&Le.uinteger(a)&&Le.uinteger(o))return{start:Pr.create(n,i),end:Pr.create(a,o)};if(Pr.is(n)&&Pr.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${o}]`)}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Pr.is(i.start)&&Pr.is(i.end)}s(r,"is"),t.is=r})(gr||(gr={}));(function(t){function e(n,i){return{uri:n,range:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.range)&&(Le.string(i.uri)||Le.undefined(i.uri))}s(r,"is"),t.is=r})(q6||(q6={}));(function(t){function e(n,i,a,o){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:o}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.targetRange)&&Le.string(i.targetUri)&&gr.is(i.targetSelectionRange)&&(gr.is(i.originSelectionRange)||Le.undefined(i.originSelectionRange))}s(r,"is"),t.is=r})(Rie||(Rie={}));(function(t){function e(n,i,a,o){return{red:n,green:i,blue:a,alpha:o}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.numberRange(i.red,0,1)&&Le.numberRange(i.green,0,1)&&Le.numberRange(i.blue,0,1)&&Le.numberRange(i.alpha,0,1)}s(r,"is"),t.is=r})(ZR||(ZR={}));(function(t){function e(n,i){return{range:n,color:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.range)&&ZR.is(i.color)}s(r,"is"),t.is=r})(Mie||(Mie={}));(function(t){function e(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.string(i.label)&&(Le.undefined(i.textEdit)||Zm.is(i))&&(Le.undefined(i.additionalTextEdits)||Le.typedArray(i.additionalTextEdits,Zm.is))}s(r,"is"),t.is=r})(Iie||(Iie={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Nie||(Nie={}));(function(t){function e(n,i,a,o,l,u){let h={startLine:n,endLine:i};return Le.defined(a)&&(h.startCharacter=a),Le.defined(o)&&(h.endCharacter=o),Le.defined(l)&&(h.kind=l),Le.defined(u)&&(h.collapsedText=u),h}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.uinteger(i.startLine)&&Le.uinteger(i.startLine)&&(Le.undefined(i.startCharacter)||Le.uinteger(i.startCharacter))&&(Le.undefined(i.endCharacter)||Le.uinteger(i.endCharacter))&&(Le.undefined(i.kind)||Le.string(i.kind))}s(r,"is"),t.is=r})(Oie||(Oie={}));(function(t){function e(n,i){return{location:n,message:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&q6.is(i.location)&&Le.string(i.message)}s(r,"is"),t.is=r})(JR||(JR={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Pie||(Pie={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(Bie||(Bie={}));(function(t){function e(r){let n=r;return Le.objectLiteral(n)&&Le.string(n.href)}s(e,"is"),t.is=e})(Fie||(Fie={}));(function(t){function e(n,i,a,o,l,u){let h={range:n,message:i};return Le.defined(a)&&(h.severity=a),Le.defined(o)&&(h.code=o),Le.defined(l)&&(h.source=l),Le.defined(u)&&(h.relatedInformation=u),h}s(e,"create"),t.create=e;function r(n){var i;let a=n;return Le.defined(a)&&gr.is(a.range)&&Le.string(a.message)&&(Le.number(a.severity)||Le.undefined(a.severity))&&(Le.integer(a.code)||Le.string(a.code)||Le.undefined(a.code))&&(Le.undefined(a.codeDescription)||Le.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(Le.string(a.source)||Le.undefined(a.source))&&(Le.undefined(a.relatedInformation)||Le.typedArray(a.relatedInformation,JR.is))}s(r,"is"),t.is=r})(W6||(W6={}));(function(t){function e(n,i,...a){let o={title:n,command:i};return Le.defined(a)&&a.length>0&&(o.arguments=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.title)&&Le.string(i.command)}s(r,"is"),t.is=r})(Qm||(Qm={}));(function(t){function e(a,o){return{range:a,newText:o}}s(e,"replace"),t.replace=e;function r(a,o){return{range:{start:a,end:a},newText:o}}s(r,"insert"),t.insert=r;function n(a){return{range:a,newText:""}}s(n,"del"),t.del=n;function i(a){let o=a;return Le.objectLiteral(o)&&Le.string(o.newText)&&gr.is(o.range)}s(i,"is"),t.is=i})(Zm||(Zm={}));(function(t){function e(n,i,a){let o={label:n};return i!==void 0&&(o.needsConfirmation=i),a!==void 0&&(o.description=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Le.string(i.label)&&(Le.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Le.string(i.description)||i.description===void 0)}s(r,"is"),t.is=r})(eM||(eM={}));(function(t){function e(r){let n=r;return Le.string(n)}s(e,"is"),t.is=e})(Jm||(Jm={}));(function(t){function e(a,o,l){return{range:a,newText:o,annotationId:l}}s(e,"replace"),t.replace=e;function r(a,o,l){return{range:{start:a,end:a},newText:o,annotationId:l}}s(r,"insert"),t.insert=r;function n(a,o){return{range:a,newText:"",annotationId:o}}s(n,"del"),t.del=n;function i(a){let o=a;return Zm.is(o)&&(eM.is(o.annotationId)||Jm.is(o.annotationId))}s(i,"is"),t.is=i})(zie||(zie={}));(function(t){function e(n,i){return{textDocument:n,edits:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&sM.is(i.textDocument)&&Array.isArray(i.edits)}s(r,"is"),t.is=r})(tM||(tM={}));(function(t){function e(n,i,a){let o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="create"&&Le.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Le.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Le.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Jm.is(i.annotationId))}s(r,"is"),t.is=r})(rM||(rM={}));(function(t){function e(n,i,a,o){let l={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),o!==void 0&&(l.annotationId=o),l}s(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="rename"&&Le.string(i.oldUri)&&Le.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Le.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Le.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Jm.is(i.annotationId))}s(r,"is"),t.is=r})(nM||(nM={}));(function(t){function e(n,i,a){let o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return i&&i.kind==="delete"&&Le.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Le.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Le.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Jm.is(i.annotationId))}s(r,"is"),t.is=r})(iM||(iM={}));(function(t){function e(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>Le.string(i.kind)?rM.is(i)||nM.is(i)||iM.is(i):tM.is(i)))}s(e,"is"),t.is=e})(aM||(aM={}));(function(t){function e(n){return{uri:n}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)}s(r,"is"),t.is=r})($ie||($ie={}));(function(t){function e(n,i){return{uri:n,version:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)&&Le.integer(i.version)}s(r,"is"),t.is=r})(Gie||(Gie={}));(function(t){function e(n,i){return{uri:n,version:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)&&(i.version===null||Le.integer(i.version))}s(r,"is"),t.is=r})(sM||(sM={}));(function(t){function e(n,i,a,o){return{uri:n,languageId:i,version:a,text:o}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.string(i.uri)&&Le.string(i.languageId)&&Le.integer(i.version)&&Le.string(i.text)}s(r,"is"),t.is=r})(Vie||(Vie={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let n=r;return n===t.PlainText||n===t.Markdown}s(e,"is"),t.is=e})(oM||(oM={}));(function(t){function e(r){let n=r;return Le.objectLiteral(r)&&oM.is(n.kind)&&Le.string(n.value)}s(e,"is"),t.is=e})(s2||(s2={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Uie||(Uie={}));(function(t){t.PlainText=1,t.Snippet=2})(qie||(qie={}));(function(t){t.Deprecated=1})(Wie||(Wie={}));(function(t){function e(n,i,a){return{newText:n,insert:i,replace:a}}s(e,"create"),t.create=e;function r(n){let i=n;return i&&Le.string(i.newText)&&gr.is(i.insert)&&gr.is(i.replace)}s(r,"is"),t.is=r})(Hie||(Hie={}));(function(t){t.asIs=1,t.adjustIndentation=2})(Yie||(Yie={}));(function(t){function e(r){let n=r;return n&&(Le.string(n.detail)||n.detail===void 0)&&(Le.string(n.description)||n.description===void 0)}s(e,"is"),t.is=e})(Xie||(Xie={}));(function(t){function e(r){return{label:r}}s(e,"create"),t.create=e})(jie||(jie={}));(function(t){function e(r,n){return{items:r||[],isIncomplete:!!n}}s(e,"create"),t.create=e})(Kie||(Kie={}));(function(t){function e(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(e,"fromPlainText"),t.fromPlainText=e;function r(n){let i=n;return Le.string(i)||Le.objectLiteral(i)&&Le.string(i.language)&&Le.string(i.value)}s(r,"is"),t.is=r})(H6||(H6={}));(function(t){function e(r){let n=r;return!!n&&Le.objectLiteral(n)&&(s2.is(n.contents)||H6.is(n.contents)||Le.typedArray(n.contents,H6.is))&&(r.range===void 0||gr.is(r.range))}s(e,"is"),t.is=e})(Qie||(Qie={}));(function(t){function e(r,n){return n?{label:r,documentation:n}:{label:r}}s(e,"create"),t.create=e})(Zie||(Zie={}));(function(t){function e(r,n,...i){let a={label:r};return Le.defined(n)&&(a.documentation=n),Le.defined(i)?a.parameters=i:a.parameters=[],a}s(e,"create"),t.create=e})(Jie||(Jie={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(eae||(eae={}));(function(t){function e(r,n){let i={range:r};return Le.number(n)&&(i.kind=n),i}s(e,"create"),t.create=e})(tae||(tae={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(rae||(rae={}));(function(t){t.Deprecated=1})(nae||(nae={}));(function(t){function e(r,n,i,a,o){let l={name:r,kind:n,location:{uri:a,range:i}};return o&&(l.containerName=o),l}s(e,"create"),t.create=e})(iae||(iae={}));(function(t){function e(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}s(e,"create"),t.create=e})(aae||(aae={}));(function(t){function e(n,i,a,o,l,u){let h={name:n,detail:i,kind:a,range:o,selectionRange:l};return u!==void 0&&(h.children=u),h}s(e,"create"),t.create=e;function r(n){let i=n;return i&&Le.string(i.name)&&Le.number(i.kind)&&gr.is(i.range)&&gr.is(i.selectionRange)&&(i.detail===void 0||Le.string(i.detail))&&(i.deprecated===void 0||Le.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}s(r,"is"),t.is=r})(sae||(sae={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(oae||(oae={}));(function(t){t.Invoked=1,t.Automatic=2})(Y6||(Y6={}));(function(t){function e(n,i,a){let o={diagnostics:n};return i!=null&&(o.only=i),a!=null&&(o.triggerKind=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.typedArray(i.diagnostics,W6.is)&&(i.only===void 0||Le.typedArray(i.only,Le.string))&&(i.triggerKind===void 0||i.triggerKind===Y6.Invoked||i.triggerKind===Y6.Automatic)}s(r,"is"),t.is=r})(lae||(lae={}));(function(t){function e(n,i,a){let o={title:n},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Qm.is(i)?o.command=i:o.edit=i,l&&a!==void 0&&(o.kind=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return i&&Le.string(i.title)&&(i.diagnostics===void 0||Le.typedArray(i.diagnostics,W6.is))&&(i.kind===void 0||Le.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Qm.is(i.command))&&(i.isPreferred===void 0||Le.boolean(i.isPreferred))&&(i.edit===void 0||aM.is(i.edit))}s(r,"is"),t.is=r})(cae||(cae={}));(function(t){function e(n,i){let a={range:n};return Le.defined(i)&&(a.data=i),a}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&gr.is(i.range)&&(Le.undefined(i.command)||Qm.is(i.command))}s(r,"is"),t.is=r})(uae||(uae={}));(function(t){function e(n,i){return{tabSize:n,insertSpaces:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&Le.uinteger(i.tabSize)&&Le.boolean(i.insertSpaces)}s(r,"is"),t.is=r})(hae||(hae={}));(function(t){function e(n,i,a){return{range:n,target:i,data:a}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&gr.is(i.range)&&(Le.undefined(i.target)||Le.string(i.target))}s(r,"is"),t.is=r})(fae||(fae={}));(function(t){function e(n,i){return{range:n,parent:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&gr.is(i.range)&&(i.parent===void 0||t.is(i.parent))}s(r,"is"),t.is=r})(dae||(dae={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(pae||(pae={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(mae||(mae={}));(function(t){function e(r){let n=r;return Le.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}s(e,"is"),t.is=e})(gae||(gae={}));(function(t){function e(n,i){return{range:n,text:i}}s(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&gr.is(i.range)&&Le.string(i.text)}s(r,"is"),t.is=r})(yae||(yae={}));(function(t){function e(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}s(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&gr.is(i.range)&&Le.boolean(i.caseSensitiveLookup)&&(Le.string(i.variableName)||i.variableName===void 0)}s(r,"is"),t.is=r})(vae||(vae={}));(function(t){function e(n,i){return{range:n,expression:i}}s(e,"create"),t.create=e;function r(n){let i=n;return i!=null&&gr.is(i.range)&&(Le.string(i.expression)||i.expression===void 0)}s(r,"is"),t.is=r})(xae||(xae={}));(function(t){function e(n,i){return{frameId:n,stoppedLocation:i}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.defined(i)&&gr.is(n.stoppedLocation)}s(r,"is"),t.is=r})(bae||(bae={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}s(e,"is"),t.is=e})(lM||(lM={}));(function(t){function e(n){return{value:n}}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&(i.tooltip===void 0||Le.string(i.tooltip)||s2.is(i.tooltip))&&(i.location===void 0||q6.is(i.location))&&(i.command===void 0||Qm.is(i.command))}s(r,"is"),t.is=r})(cM||(cM={}));(function(t){function e(n,i,a){let o={position:n,label:i};return a!==void 0&&(o.kind=a),o}s(e,"create"),t.create=e;function r(n){let i=n;return Le.objectLiteral(i)&&Pr.is(i.position)&&(Le.string(i.label)||Le.typedArray(i.label,cM.is))&&(i.kind===void 0||lM.is(i.kind))&&i.textEdits===void 0||Le.typedArray(i.textEdits,Zm.is)&&(i.tooltip===void 0||Le.string(i.tooltip)||s2.is(i.tooltip))&&(i.paddingLeft===void 0||Le.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Le.boolean(i.paddingRight))}s(r,"is"),t.is=r})(kae||(kae={}));(function(t){function e(r){return{kind:"snippet",value:r}}s(e,"createSnippet"),t.createSnippet=e})(wae||(wae={}));(function(t){function e(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}s(e,"create"),t.create=e})(Tae||(Tae={}));(function(t){function e(r){return{items:r}}s(e,"create"),t.create=e})(Eae||(Eae={}));(function(t){t.Invoked=0,t.Automatic=1})(Cae||(Cae={}));(function(t){function e(r,n){return{range:r,text:n}}s(e,"create"),t.create=e})(Sae||(Sae={}));(function(t){function e(r,n){return{triggerKind:r,selectedCompletionInfo:n}}s(e,"create"),t.create=e})(_ae||(_ae={}));(function(t){function e(r){let n=r;return Le.objectLiteral(n)&&QR.is(n.uri)&&Le.string(n.name)}s(e,"is"),t.is=e})(Aae||(Aae={}));(function(t){function e(a,o,l,u){return new uM(a,o,l,u)}s(e,"create"),t.create=e;function r(a){let o=a;return!!(Le.defined(o)&&Le.string(o.uri)&&(Le.undefined(o.languageId)||Le.string(o.languageId))&&Le.uinteger(o.lineCount)&&Le.func(o.getText)&&Le.func(o.positionAt)&&Le.func(o.offsetAt))}s(r,"is"),t.is=r;function n(a,o){let l=a.getText(),u=i(o,(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p}),h=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],p=a.offsetAt(d.range.start),m=a.offsetAt(d.range.end);if(m<=h)l=l.substring(0,p)+d.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p}return l}s(n,"applyEdits"),t.applyEdits=n;function i(a,o){if(a.length<=1)return a;let l=a.length/2|0,u=a.slice(0,l),h=a.slice(l);i(u,o),i(h,o);let f=0,d=0,p=0;for(;f0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return Pr.create(0,e);for(;ne?i=o:n=o+1}let a=n-1;return Pr.create(a,e-r[a])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line],i=e.line+1"u"}s(n,"undefined"),t.undefined=n;function i(m){return m===!0||m===!1}s(i,"boolean"),t.boolean=i;function a(m){return e.call(m)==="[object String]"}s(a,"string"),t.string=a;function o(m){return e.call(m)==="[object Number]"}s(o,"number"),t.number=o;function l(m,g,y){return e.call(m)==="[object Number]"&&g<=m&&m<=y}s(l,"numberRange"),t.numberRange=l;function u(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}s(u,"integer"),t.integer=u;function h(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}s(h,"uinteger"),t.uinteger=h;function f(m){return e.call(m)==="[object Function]"}s(f,"func"),t.func=f;function d(m){return m!==null&&typeof m=="object"}s(d,"objectLiteral"),t.objectLiteral=d;function p(m,g){return Array.isArray(m)&&m.every(g)}s(p,"typedArray"),t.typedArray=p})(Le||(Le={}))});var o2,l2,t0,r0,fM,eg,X6=_(()=>{"use strict";hM();Do();gl();o2=class{static{s(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new eg(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let r=new r0;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){let n=new t0(e.startOffset,e.image.length,Tm(e),e.tokenType,!1);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let r=e.container;if(r){let n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}construct(e){let r=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=r;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}addHiddenTokens(e){for(let r of e){let n=new t0(r.startOffset,r.image.length,Tm(r),r.tokenType,!0);n.root=this.rootNode,this.addHiddenToken(this.rootNode,n)}}addHiddenToken(e,r){let{offset:n,end:i}=r;for(let a=0;al&&i=0;e--){let r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},fM=class t extends Array{static{s(this,"CstNodeContainer")}constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,t.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(let r of e)r.container=this.parent}},eg=class extends r0{static{s(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}});function dM(t){return t.$type===j6}var j6,Dae,Rae,c2,u2,K6,tg,h2,oIe,pM,f2=_(()=>{"use strict";Zd();Aie();mc();xl();Ha();X6();j6=Symbol("Datatype");s(dM,"isDataTypeNode");Dae="\u200B",Rae=s(t=>t.endsWith(Dae)?t:t+Dae,"withRuleSuffix"),c2=class{static{s(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition;this.wrapper=new pM(r,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},u2=class extends c2{static{s(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new o2,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){let n=e.fragment?void 0:Ov(e)?j6:qd(e),i=this.wrapper.DEFINE_RULE(Rae(e.name),this.startImplementation(n,r).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);let r=this.lexer.tokenize(e);this.wrapper.input=r.tokens;let n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(r.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:r.errors,parserErrors:this.wrapper.errors}}startImplementation(e,r){return n=>{if(!this.isRecording()){let a={$type:e};this.stack.push(a),e===j6&&(a.value="")}let i;try{i=r(n)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,r,n){let i=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(i)){let a=this.nodeBuilder.buildLeafNode(i,n),{assignment:o,isCrossRef:l}=this.getAssignment(n),u=this.current;if(o){let h=Mo(n)?i.image:this.converter.convert(i.image,a);this.assign(o.operator,o.feature,h,a,l)}else if(dM(u)){let h=i.image;Mo(n)||(h=this.converter.convert(h,a).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,i){let a;this.isRecording()||(a=this.nodeBuilder.buildCompositeNode(n));let o=this.wrapper.wrapSubrule(e,r,i);!this.isRecording()&&a&&a.length>0&&this.performSubruleAssignment(o,n,a)}performSubruleAssignment(e,r,n){let{assignment:i,isCrossRef:a}=this.getAssignment(r);if(i)this.assign(i.operator,i.feature,e,n,a);else if(!i){let o=this.current;if(dM(o))o.value+=e.toString();else if(typeof e=="object"&&e){let l=e.$type,u=this.assignWithoutOverride(e,o);l&&(u.$type=l);let h=u;this.stack.pop(),this.stack.push(h)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&r.feature&&r.operator){n=this.construct(!1);let a=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(a)}let i={$type:e};this.stack.pop(),this.stack.push(i),r.feature&&r.operator&&this.assign(r.operator,r.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;let r=this.current;return Xk(r),this.nodeBuilder.construct(r),e&&this.stack.pop(),dM(r)?this.converter.convert(r.value,r.$cstNode):(VD(this.astReflection,r),r)}getAssignment(e){if(!this.assignmentMap.has(e)){let r=zd(e,yl);this.assignmentMap.set(e,{assignment:r,isCrossRef:r?Fd(r.terminal):!1})}return this.assignmentMap.get(e)}assign(e,r,n,i,a){let o=this.current,l;switch(a&&typeof n=="string"?l=this.linker.buildReference(o,r,i,n):l=n,e){case"=":{o[r]=l;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(l)}}assignWithoutOverride(e,r){for(let[n,i]of Object.entries(r)){let a=e[n];a===void 0?e[n]=i:Array.isArray(a)&&Array.isArray(i)&&(i.push(...a),e[n]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}},K6=class{static{s(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Ru.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Ru.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Ru.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Ru.buildEarlyExitMessage(e)}},tg=class extends K6{static{s(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},h2=class extends c2{static{s(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let r=this.lexer.tokenize(e);return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){let n=this.wrapper.DEFINE_RULE(Rae(e.name),this.startImplementation(r).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{let n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,i){this.before(n),this.wrapper.wrapSubrule(e,r,i),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},oIe={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new tg},pM=class extends t2{static{s(this,"ChevrotainWrapper")}constructor(e,r){let n=r&&"maxLookahead"in r;super(e,Object.assign(Object.assign(Object.assign({},oIe),{lookaheadStrategy:n?new Mu({maxLookahead:r.maxLookahead}):new a2}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r){return this.RULE(e,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}}});function Z6(t,e,r){return lIe({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function lIe(t,e){let r=Iv(e,!1),n=Wr(e.rules).filter(Sa).filter(i=>r.has(i));for(let i of n){let a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});a.rules.set(i.name,t.parser.rule(i,n0(a,i.definition)))}}function n0(t,e,r=!1){let n;if(Mo(e))n=mIe(t,e);else if(Cu(e))n=cIe(t,e);else if(yl(e))n=n0(t,e.terminal);else if(Fd(e))n=Mae(t,e);else if(vl(e))n=uIe(t,e);else if(Wk(e))n=fIe(t,e);else if(Yk(e))n=dIe(t,e);else if(Kh(e))n=pIe(t,e);else if(wD(e)){let i=t.consume++;n=s(()=>t.parser.consume(i,io,e),"method")}else throw new Bd(e.$cstNode,`Unexpected element type: ${e.$type}`);return Iae(t,r?void 0:Q6(e),n,e.cardinality)}function cIe(t,e){let r=qd(e);return()=>t.parser.action(r,e)}function uIe(t,e){let r=e.rule.ref;if(Sa(r)){let n=t.subrule++,i=e.arguments.length>0?hIe(r,e.arguments):()=>({});return a=>t.parser.subrule(n,Nae(t,r),e,i(a))}else if(Ro(r)){let n=t.consume++,i=mM(t,r.name);return()=>t.parser.consume(n,i,e)}else if(r)jh(r);else throw new Bd(e.$cstNode,`Undefined rule type: ${e.$type}`)}function hIe(t,e){let r=e.map(n=>Iu(n.value));return n=>{let i={};for(let a=0;ae(n)||r(n)}else if(XL(t)){let e=Iu(t.left),r=Iu(t.right);return n=>e(n)&&r(n)}else if(tD(t)){let e=Iu(t.value);return r=>!e(r)}else if(aD(t)){let e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(HL(t)){let e=!!t.true;return()=>e}jh(t)}function fIe(t,e){if(e.elements.length===1)return n0(t,e.elements[0]);{let r=[];for(let i of e.elements){let a={ALT:n0(t,i,!0)},o=Q6(i);o&&(a.GATE=Iu(o)),r.push(a)}let n=t.or++;return i=>t.parser.alternatives(n,r.map(a=>{let o={ALT:s(()=>a.ALT(i),"ALT")},l=a.GATE;return l&&(o.GATE=()=>l(i)),o}))}}function dIe(t,e){if(e.elements.length===1)return n0(t,e.elements[0]);let r=[];for(let l of e.elements){let u={ALT:n0(t,l,!0)},h=Q6(l);h&&(u.GATE=Iu(h)),r.push(u)}let n=t.or++,i=s((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`},"idFunc"),a=s(l=>t.parser.alternatives(n,r.map((u,h)=>{let f={ALT:s(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(u.ALT(l),!d.isRecording()){let m=i(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);let g=d.unorderedGroups.get(m);typeof g?.[h]>"u"&&(g[h]=!0)}};let p=u.GATE;return p?f.GATE=()=>p(l):f.GATE=()=>{let m=d.unorderedGroups.get(i(n,d));return!m?.[h]},f})),"alternatives"),o=Iae(t,Q6(e),a,"*");return l=>{o(l),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(n,t.parser))}}function pIe(t,e){let r=e.elements.map(n=>n0(t,n));return n=>r.forEach(i=>i(n))}function Q6(t){if(Kh(t))return t.guardCondition}function Mae(t,e,r=e.terminal){if(r)if(vl(r)&&Sa(r.rule.ref)){let n=t.subrule++;return i=>t.parser.subrule(n,Nae(t,r.rule.ref),e,i)}else if(vl(r)&&Ro(r.rule.ref)){let n=t.consume++,i=mM(t,r.rule.ref.name);return()=>t.parser.consume(n,i,e)}else if(Mo(r)){let n=t.consume++,i=mM(t,r.value);return()=>t.parser.consume(n,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);let n=e6(e.type.ref),i=n?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+qd(e.type.ref));return Mae(t,e,i)}}function mIe(t,e){let r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}function Iae(t,e,r,n){let i=e&&Iu(e);if(!n)if(i){let a=t.or++;return o=>t.parser.alternatives(a,[{ALT:s(()=>r(o),"ALT"),GATE:s(()=>i(o),"GATE")},{ALT:$6(),GATE:s(()=>!i(o),"GATE")}])}else return r;if(n==="*"){let a=t.many++;return o=>t.parser.many(a,{DEF:s(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else if(n==="+"){let a=t.many++;if(i){let o=t.or++;return l=>t.parser.alternatives(o,[{ALT:s(()=>t.parser.atLeastOne(a,{DEF:s(()=>r(l),"DEF")}),"ALT"),GATE:s(()=>i(l),"GATE")},{ALT:$6(),GATE:s(()=>!i(l),"GATE")}])}else return o=>t.parser.atLeastOne(a,{DEF:s(()=>r(o),"DEF")})}else if(n==="?"){let a=t.optional++;return o=>t.parser.optional(a,{DEF:s(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else jh(n)}function Nae(t,e){let r=gIe(t,e),n=t.rules.get(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function gIe(t,e){if(Sa(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,i=e.$type;for(;!Sa(n);)(Kh(n)||Wk(n)||Yk(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,t.ruleNames.set(e,i),i}}function mM(t,e){let r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}var gM=_(()=>{"use strict";Zd();mc();Fk();Es();xl();s(Z6,"createParser");s(lIe,"buildRules");s(n0,"buildElement");s(cIe,"buildAction");s(uIe,"buildRuleCall");s(hIe,"buildRuleCallPredicate");s(Iu,"buildPredicate");s(fIe,"buildAlternatives");s(dIe,"buildUnorderedGroup");s(pIe,"buildGroup");s(Q6,"getGuardCondition");s(Mae,"buildCrossReference");s(mIe,"buildKeyword");s(Iae,"wrap");s(Nae,"getRule");s(gIe,"getRuleName");s(mM,"getToken")});function yM(t){let e=t.Grammar,r=t.parser.Lexer,n=new h2(t);return Z6(e,n,r.definition),n.finalize(),n}var vM=_(()=>{"use strict";f2();gM();s(yM,"createCompletionParser")});function xM(t){let e=Oae(t);return e.finalize(),e}function Oae(t){let e=t.Grammar,r=t.parser.Lexer,n=new u2(t);return Z6(e,n,r.definition)}var bM=_(()=>{"use strict";f2();gM();s(xM,"createLangiumParser");s(Oae,"prepareLangiumParser")});var i0,kM=_(()=>{"use strict";Zd();mc();Ha();xl();_m();Es();i0=class{static{s(this,"DefaultTokenBuilder")}buildTokens(e,r){let n=Wr(Iv(e,!1)),i=this.buildTerminalTokens(n),a=this.buildKeywordTokens(n,i,r);return i.forEach(o=>{let l=o.PATTERN;typeof l=="object"&&l&&"test"in l&&Zk(l)?a.unshift(o):a.push(o)}),a}buildTerminalTokens(e){return e.filter(Ro).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){let r=Am(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,i={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=Zk(r)?jn.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?(r.lastIndex=i,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Sa).flatMap(i=>gc(i).filter(Mo)).distinct(i=>i.value).toArray().sort((i,a)=>a.value.length-i.value.length).map(i=>this.buildKeywordToken(i,r,!!n?.caseInsensitive))}buildKeywordToken(e,r,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,r)}}buildKeywordPattern(e,r){return r?new RegExp(jD(e.value)):e.value}findLongerAlt(e,r){return r.reduce((n,i)=>{let a=i?.PATTERN;return a?.source&&KD("^"+a.source+"$",e.value)&&n.push(i),n},[])}}});var a0,xc,wM=_(()=>{"use strict";mc();xl();a0=class{static{s(this,"DefaultValueConverter")}convert(e,r){let n=r.grammarSource;if(Fd(n)&&(n=JD(n)),vl(n)){let i=n.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,r)}return e}runConverter(e,r,n){var i;switch(e.name.toUpperCase()){case"INT":return xc.convertInt(r);case"STRING":return xc.convertString(r);case"ID":return xc.convertID(r)}switch((i=oR(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return xc.convertNumber(r);case"boolean":return xc.convertBoolean(r);case"bigint":return xc.convertBigint(r);case"date":return xc.convertDate(r);default:return r}}};(function(t){function e(h){let f="";for(let d=1;d{"use strict";Object.defineProperty(CM,"__esModule",{value:!0});var TM;function EM(){if(TM===void 0)throw new Error("No runtime abstraction layer installed");return TM}s(EM,"RAL");(function(t){function e(r){if(r===void 0)throw new Error("No runtime abstraction layer provided");TM=r}s(e,"install"),t.install=e})(EM||(EM={}));CM.default=EM});var Fae=is(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.stringArray=_a.array=_a.func=_a.error=_a.number=_a.string=_a.boolean=void 0;function yIe(t){return t===!0||t===!1}s(yIe,"boolean");_a.boolean=yIe;function Pae(t){return typeof t=="string"||t instanceof String}s(Pae,"string");_a.string=Pae;function vIe(t){return typeof t=="number"||t instanceof Number}s(vIe,"number");_a.number=vIe;function xIe(t){return t instanceof Error}s(xIe,"error");_a.error=xIe;function bIe(t){return typeof t=="function"}s(bIe,"func");_a.func=bIe;function Bae(t){return Array.isArray(t)}s(Bae,"array");_a.array=Bae;function kIe(t){return Bae(t)&&t.every(e=>Pae(e))}s(kIe,"stringArray");_a.stringArray=kIe});var AM=is(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});rg.Emitter=rg.Event=void 0;var wIe=SM(),zae;(function(t){let e={dispose(){}};t.None=function(){return e}})(zae||(rg.Event=zae={}));var _M=class{static{s(this,"CallbackList")}add(e,r=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(r),Array.isArray(n)&&n.push({dispose:s(()=>this.remove(e,r),"dispose")})}remove(e,r=null){if(!this._callbacks)return;let n=!1;for(let i=0,a=this._callbacks.length;i{this._callbacks||(this._callbacks=new _M),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,r);let i={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(e,r),i.dispose=t._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};rg.Emitter=J6;J6._noop=function(){}});var $ae=is(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});ng.CancellationTokenSource=ng.CancellationToken=void 0;var TIe=SM(),EIe=Fae(),LM=AM(),ew;(function(t){t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:LM.Event.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:LM.Event.None});function e(r){let n=r;return n&&(n===t.None||n===t.Cancelled||EIe.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}s(e,"is"),t.is=e})(ew||(ng.CancellationToken=ew={}));var CIe=Object.freeze(function(t,e){let r=(0,TIe.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),tw=class{static{s(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?CIe:(this._emitter||(this._emitter=new LM.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},DM=class{static{s(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new tw),this._token}cancel(){this._token?this._token.cancel():this._token=ew.Cancelled}dispose(){this._token?this._token instanceof tw&&this._token.dispose():this._token=ew.None}};ng.CancellationTokenSource=DM});var cr={};var No=_(()=>{"use strict";lr(cr,ka($ae(),1))});function MM(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}function Vae(){return RM=Date.now(),new cr.CancellationTokenSource}function Uae(t){Gae=t}function ef(t){return t===bc}async function Di(t){if(t===cr.CancellationToken.None)return;let e=Date.now();if(e-RM>=Gae&&(RM=e,await MM()),t.isCancellationRequested)throw bc}var RM,Gae,bc,Qa,Oo=_(()=>{"use strict";No();s(MM,"delayNextTick");RM=0,Gae=10;s(Vae,"startCancelableOperation");s(Uae,"setInterruptionPeriod");bc=Symbol("OperationCancelled");s(ef,"isOperationCancelled");s(Di,"interruptAndCheck");Qa=class{static{s(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}}});function IM(t,e){if(t.length<=1)return t;let r=t.length/2|0,n=t.slice(0,r),i=t.slice(r);IM(n,e),IM(i,e);let a=0,o=0,l=0;for(;ar.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function SIe(t){let e=Hae(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var rw,ig,Yae=_(()=>{"use strict";rw=class t{static{s(this,"FullTextDocument")}constructor(e,r,n,i){this._uri=e,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(let n of e)if(t.isIncremental(n)){let i=Hae(n.range),a=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),h=this._lineOffsets,f=qae(n.text,!1,a);if(u-l===f.length)for(let p=0,m=f.length;pe?i=o:n=o+1}let a=n-1;return e=this.ensureBeforeEOL(e,r[a]),{line:a,character:e-r[a]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let n=r[e.line];if(e.character<=0)return n;let i=e.line+1r&&Wae(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(i,a,o,l){return new rw(i,a,o,l)}s(e,"create"),t.create=e;function r(i,a,o){if(i instanceof rw)return i.update(a,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),t.update=r;function n(i,a){let o=i.getText(),l=IM(a.map(SIe),(f,d)=>{let p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p}),u=0,h=[];for(let f of l){let d=i.offsetAt(f.range.start);if(du&&h.push(o.substring(u,d)),f.newText.length&&h.push(f.newText),u=i.offsetAt(f.range.end)}return h.push(o.substr(u)),h.join("")}s(n,"applyEdits"),t.applyEdits=n})(ig||(ig={}));s(IM,"mergeSort");s(qae,"computeLineOffsets");s(Wae,"isEOL");s(Hae,"getWellformedRange");s(SIe,"getWellformedEdit")});var Xae,_s,ag,NM=_(()=>{"use strict";(()=>{"use strict";var t={470:i=>{function a(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}s(a,"e");function o(u,h){for(var f,d="",p=0,m=-1,g=0,y=0;y<=u.length;++y){if(y2){var v=d.lastIndexOf("/");if(v!==d.length-1){v===-1?(d="",p=0):p=(d=d.slice(0,v)).length-1-d.lastIndexOf("/"),m=y,g=0;continue}}else if(d.length===2||d.length===1){d="",p=0,m=y,g=0;continue}}h&&(d.length>0?d+="/..":d="..",p=2)}else d.length>0?d+="/"+u.slice(m+1,y):d=u.slice(m+1,y),p=y-m-1;m=y,g=0}else f===46&&g!==-1?++g:g=-1}return d}s(o,"r");var l={resolve:s(function(){for(var u,h="",f=!1,d=arguments.length-1;d>=-1&&!f;d--){var p;d>=0?p=arguments[d]:(u===void 0&&(u=process.cwd()),p=u),a(p),p.length!==0&&(h=p+"/"+h,f=p.charCodeAt(0)===47)}return h=o(h,!f),f?h.length>0?"/"+h:"/":h.length>0?h:"."},"resolve"),normalize:s(function(u){if(a(u),u.length===0)return".";var h=u.charCodeAt(0)===47,f=u.charCodeAt(u.length-1)===47;return(u=o(u,!h)).length!==0||h||(u="."),u.length>0&&f&&(u+="/"),h?"/"+u:u},"normalize"),isAbsolute:s(function(u){return a(u),u.length>0&&u.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var u,h=0;h0&&(u===void 0?u=f:u+="/"+f)}return u===void 0?".":l.normalize(u)},"join"),relative:s(function(u,h){if(a(u),a(h),u===h||(u=l.resolve(u))===(h=l.resolve(h)))return"";for(var f=1;fy){if(h.charCodeAt(m+x)===47)return h.slice(m+x+1);if(x===0)return h.slice(m+x)}else p>y&&(u.charCodeAt(f+x)===47?v=x:x===0&&(v=0));break}var b=u.charCodeAt(f+x);if(b!==h.charCodeAt(m+x))break;b===47&&(v=x)}var k="";for(x=f+v+1;x<=d;++x)x!==d&&u.charCodeAt(x)!==47||(k.length===0?k+="..":k+="/..");return k.length>0?k+h.slice(m+v):(m+=v,h.charCodeAt(m)===47&&++m,h.slice(m))},"relative"),_makeLong:s(function(u){return u},"_makeLong"),dirname:s(function(u){if(a(u),u.length===0)return".";for(var h=u.charCodeAt(0),f=h===47,d=-1,p=!0,m=u.length-1;m>=1;--m)if((h=u.charCodeAt(m))===47){if(!p){d=m;break}}else p=!1;return d===-1?f?"/":".":f&&d===1?"//":u.slice(0,d)},"dirname"),basename:s(function(u,h){if(h!==void 0&&typeof h!="string")throw new TypeError('"ext" argument must be a string');a(u);var f,d=0,p=-1,m=!0;if(h!==void 0&&h.length>0&&h.length<=u.length){if(h.length===u.length&&h===u)return"";var g=h.length-1,y=-1;for(f=u.length-1;f>=0;--f){var v=u.charCodeAt(f);if(v===47){if(!m){d=f+1;break}}else y===-1&&(m=!1,y=f+1),g>=0&&(v===h.charCodeAt(g)?--g==-1&&(p=f):(g=-1,p=y))}return d===p?p=y:p===-1&&(p=u.length),u.slice(d,p)}for(f=u.length-1;f>=0;--f)if(u.charCodeAt(f)===47){if(!m){d=f+1;break}}else p===-1&&(m=!1,p=f+1);return p===-1?"":u.slice(d,p)},"basename"),extname:s(function(u){a(u);for(var h=-1,f=0,d=-1,p=!0,m=0,g=u.length-1;g>=0;--g){var y=u.charCodeAt(g);if(y!==47)d===-1&&(p=!1,d=g+1),y===46?h===-1?h=g:m!==1&&(m=1):h!==-1&&(m=-1);else if(!p){f=g+1;break}}return h===-1||d===-1||m===0||m===1&&h===d-1&&h===f+1?"":u.slice(h,d)},"extname"),format:s(function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(h,f){var d=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return d?d===f.root?d+p:d+"/"+p:p}(0,u)},"format"),parse:s(function(u){a(u);var h={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return h;var f,d=u.charCodeAt(0),p=d===47;p?(h.root="/",f=1):f=0;for(var m=-1,g=0,y=-1,v=!0,x=u.length-1,b=0;x>=f;--x)if((d=u.charCodeAt(x))!==47)y===-1&&(v=!1,y=x+1),d===46?m===-1?m=x:b!==1&&(b=1):m!==-1&&(b=-1);else if(!v){g=x+1;break}return m===-1||y===-1||b===0||b===1&&m===y-1&&m===g+1?y!==-1&&(h.base=h.name=g===0&&p?u.slice(1,y):u.slice(g,y)):(g===0&&p?(h.name=u.slice(1,m),h.base=u.slice(1,y)):(h.name=u.slice(g,m),h.base=u.slice(g,y)),h.ext=u.slice(m,y)),g>0?h.dir=u.slice(0,g-1):p&&(h.dir="/"),h},"parse"),sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,i.exports=l}},e={};function r(i){var a=e[i];if(a!==void 0)return a.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,r),o.exports}s(r,"r"),r.d=(i,a)=>{for(var o in a)r.o(a,o)&&!r.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:a[o]})},r.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{let i;r.r(n),r.d(n,{URI:s(()=>p,"URI"),Utils:s(()=>R,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(D,L){if(!D.scheme&&L)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${D.authority}", path: "${D.path}", query: "${D.query}", fragment: "${D.fragment}"}`);if(D.scheme&&!a.test(D.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(D.path){if(D.authority){if(!o.test(D.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(D.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(u,"s");let h="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{s(this,"f")}static isUri(L){return L instanceof p||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="string"&&typeof L.with=="function"&&typeof L.toString=="function"}scheme;authority;path;query;fragment;constructor(L,P,M,F,I,O=!1){typeof L=="object"?(this.scheme=L.scheme||h,this.authority=L.authority||h,this.path=L.path||h,this.query=L.query||h,this.fragment=L.fragment||h):(this.scheme=function(z,N){return z||N?z:"file"}(L,O),this.authority=P||h,this.path=function(z,N){switch(z){case"https":case"http":case"file":N?N[0]!==f&&(N=f+N):N=f}return N}(this.scheme,M||h),this.query=F||h,this.fragment=I||h,u(this,O))}get fsPath(){return b(this,!1)}with(L){if(!L)return this;let{scheme:P,authority:M,path:F,query:I,fragment:O}=L;return P===void 0?P=this.scheme:P===null&&(P=h),M===void 0?M=this.authority:M===null&&(M=h),F===void 0?F=this.path:F===null&&(F=h),I===void 0?I=this.query:I===null&&(I=h),O===void 0?O=this.fragment:O===null&&(O=h),P===this.scheme&&M===this.authority&&F===this.path&&I===this.query&&O===this.fragment?this:new g(P,M,F,I,O)}static parse(L,P=!1){let M=d.exec(L);return M?new g(M[2]||h,T(M[4]||h),T(M[5]||h),T(M[7]||h),T(M[9]||h),P):new g(h,h,h,h,h)}static file(L){let P=h;if(i&&(L=L.replace(/\\/g,f)),L[0]===f&&L[1]===f){let M=L.indexOf(f,2);M===-1?(P=L.substring(2),L=f):(P=L.substring(2,M),L=L.substring(M)||f)}return new g("file",P,L,h,h)}static from(L){let P=new g(L.scheme,L.authority,L.path,L.query,L.fragment);return u(P,!0),P}toString(L=!1){return k(this,L)}toJSON(){return this}static revive(L){if(L){if(L instanceof p)return L;{let P=new g(L);return P._formatted=L.external,P._fsPath=L._sep===m?L.fsPath:null,P}}return L}}let m=i?1:void 0;class g extends p{static{s(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(L=!1){return L?k(this,!0):(this._formatted||(this._formatted=k(this,!1)),this._formatted)}toJSON(){let L={$mid:1};return this._fsPath&&(L.fsPath=this._fsPath,L._sep=m),this._formatted&&(L.external=this._formatted),this.path&&(L.path=this.path),this.scheme&&(L.scheme=this.scheme),this.authority&&(L.authority=this.authority),this.query&&(L.query=this.query),this.fragment&&(L.fragment=this.fragment),L}}let y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(D,L,P){let M,F=-1;for(let I=0;I=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||L&&O===47||P&&O===91||P&&O===93||P&&O===58)F!==-1&&(M+=encodeURIComponent(D.substring(F,I)),F=-1),M!==void 0&&(M+=D.charAt(I));else{M===void 0&&(M=D.substr(0,I));let z=y[O];z!==void 0?(F!==-1&&(M+=encodeURIComponent(D.substring(F,I)),F=-1),M+=z):F===-1&&(F=I)}}return F!==-1&&(M+=encodeURIComponent(D.substring(F))),M!==void 0?M:D}s(v,"d");function x(D){let L;for(let P=0;P1&&D.scheme==="file"?`//${D.authority}${D.path}`:D.path.charCodeAt(0)===47&&(D.path.charCodeAt(1)>=65&&D.path.charCodeAt(1)<=90||D.path.charCodeAt(1)>=97&&D.path.charCodeAt(1)<=122)&&D.path.charCodeAt(2)===58?L?D.path.substr(1):D.path[1].toLowerCase()+D.path.substr(2):D.path,i&&(P=P.replace(/\//g,"\\")),P}s(b,"m");function k(D,L){let P=L?x:v,M="",{scheme:F,authority:I,path:O,query:z,fragment:N}=D;if(F&&(M+=F,M+=":"),(I||F==="file")&&(M+=f,M+=f),I){let U=I.indexOf("@");if(U!==-1){let $=I.substr(0,U);I=I.substr(U+1),U=$.lastIndexOf(":"),U===-1?M+=P($,!1,!1):(M+=P($.substr(0,U),!1,!1),M+=":",M+=P($.substr(U+1),!1,!0)),M+="@"}I=I.toLowerCase(),U=I.lastIndexOf(":"),U===-1?M+=P(I,!1,!0):(M+=P(I.substr(0,U),!1,!0),M+=I.substr(U))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58){let U=O.charCodeAt(1);U>=65&&U<=90&&(O=`/${String.fromCharCode(U+32)}:${O.substr(3)}`)}else if(O.length>=2&&O.charCodeAt(1)===58){let U=O.charCodeAt(0);U>=65&&U<=90&&(O=`${String.fromCharCode(U+32)}:${O.substr(2)}`)}M+=P(O,!0,!1)}return z&&(M+="?",M+=P(z,!1,!1)),N&&(M+="#",M+=L?N:v(N,!1,!1)),M}s(k,"y");function A(D){try{return decodeURIComponent(D)}catch{return D.length>3?D.substr(0,3)+A(D.substr(3)):D}}s(A,"v");let w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(D){return D.match(w)?D.replace(w,L=>A(L)):D}s(T,"C");var C=r(470);let E=C.posix||C,S="/";var R;(function(D){D.joinPath=function(L,...P){return L.with({path:E.join(L.path,...P)})},D.resolvePath=function(L,...P){let M=L.path,F=!1;M[0]!==S&&(M=S+M,F=!0);let I=E.resolve(M,...P);return F&&I[0]===S&&!L.authority&&(I=I.substring(1)),L.with({path:I})},D.dirname=function(L){if(L.path.length===0||L.path===S)return L;let P=E.dirname(L.path);return P.length===1&&P.charCodeAt(0)===46&&(P=""),L.with({path:P})},D.basename=function(L){return E.basename(L.path)},D.extname=function(L){return E.extname(L.path)}})(R||(R={}))})(),Xae=n})();({URI:_s,Utils:ag}=Xae)});var Za,kc=_(()=>{"use strict";NM();(function(t){t.basename=ag.basename,t.dirname=ag.dirname,t.extname=ag.extname,t.joinPath=ag.joinPath,t.resolvePath=ag.resolvePath;function e(n,i){return n?.toString()===i?.toString()}s(e,"equals"),t.equals=e;function r(n,i){let a=typeof n=="string"?n:n.path,o=typeof i=="string"?i:i.path,l=a.split("/").filter(p=>p.length>0),u=o.split("/").filter(p=>p.length>0),h=0;for(;h{"use strict";Yae();sg();No();Es();kc();(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(un||(un={}));d2=class{static{s(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=cr.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??_s.parse(e.uri),n?this.createAsync(r,e,n):this.create(r,e)}fromString(e,r,n){return n?this.createAsync(r,e,n):this.create(r,e)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r){if(typeof r=="string"){let n=this.parse(e,r);return this.createLangiumDocument(n,e,void 0,r)}else if("$model"in r){let n={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,r.getText());return this.createLangiumDocument(n,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){let i=await this.parseAsync(e,r,n);return this.createLangiumDocument(i,e,void 0,r)}else{let i=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(i,e,r)}}createLangiumDocument(e,r,n,i){let a;if(n)a={parseResult:e,uri:r,state:un.Parsed,references:[],textDocument:n};else{let o=this.createTextDocumentGetter(r,i);a={parseResult:e,uri:r,state:un.Parsed,references:[],get textDocument(){return o()}}}return e.value.$document=a,a}async update(e,r){var n,i;let a=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText,o=(i=this.textDocuments)===null||i===void 0?void 0:i.get(e.uri.toString()),l=o?o.getText():await this.fileSystemProvider.readFile(e.uri);if(o)Object.defineProperty(e,"textDocument",{value:o});else{let u=this.createTextDocumentGetter(e.uri,l);Object.defineProperty(e,"textDocument",{get:u})}return a!==l&&(e.parseResult=await this.parseAsync(e.uri,l,r),e.parseResult.value.$document=e),e.state=un.Parsed,e}parse(e,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){let n=this.serviceRegistry,i;return()=>i??(i=ig.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},p2=class{static{s(this,"DefaultLangiumDocuments")}constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Wr(this.documentMap.values())}addDocument(e){let r=e.uri.toString();if(this.documentMap.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentMap.set(r,e)}getDocument(e){let r=e.toString();return this.documentMap.get(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=un.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){let r=e.toString(),n=this.documentMap.get(r);return n&&(n.state=un.Changed,this.documentMap.delete(r)),n}}});var m2,OM=_(()=>{"use strict";No();Do();Ha();Oo();sg();m2=class{static{s(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,r=cr.CancellationToken.None){for(let n of Io(e.parseResult.value))await Di(r),Cm(n).forEach(i=>this.doLink(i,e))}doLink(e,r){let n=e.reference;if(n._ref===void 0)try{let i=this.getCandidate(e);if(Nd(i))n._ref=i;else if(n._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){let a=this.loadAstNode(i);n._ref=a??this.createLinkingError(e,i)}}catch(i){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${i}`})}r.references.push(n)}unlink(e){for(let r of e.references)delete r._ref,delete r._nodeDescription;e.references=[]}getCandidate(e){let n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n??this.createLinkingError(e)}buildReference(e,r,n,i){let a=this,o={$refNode:n,$refText:i,get ref(){var l;if($n(this._ref))return this._ref;if(NL(this._nodeDescription)){let u=a.loadAstNode(this._nodeDescription);this._ref=u??a.createLinkingError({reference:o,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){let u=a.getLinkedNode({reference:o,container:e,property:r});if(u.error&&Ai(e).state{"use strict";xl();s(jae,"isNamed");g2=class{static{s(this,"DefaultNameProvider")}getName(e){if(jae(e))return e.name}getNameNode(e){return Nv(e.$cstNode,"name")}}});var y2,BM=_(()=>{"use strict";xl();Do();Ha();gl();Es();kc();y2=class{static{s(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){let r=aR(e),n=e.astNode;if(r&&n){let i=n[r.feature];if(ua(i))return i.ref;if(Array.isArray(i)){for(let a of i)if(ua(a)&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return a.ref}}if(n){let i=this.nameProvider.getNameNode(n);if(i&&(i===e||PL(e,i)))return n}}}findDeclarationNode(e){let r=this.findDeclaration(e);if(r?.$cstNode){let n=this.nameProvider.getNameNode(r);return n??r.$cstNode}}findReferences(e,r){let n=[];if(r.includeDeclaration){let a=this.getReferenceToSelf(e);a&&n.push(a)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(i=i.filter(a=>Za.equals(a.sourceUri,r.documentUri))),n.push(...i),Wr(n)}getReferenceToSelf(e){let r=this.nameProvider.getNameNode(e);if(r){let n=Ai(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:i,targetUri:n.uri,targetPath:i,segment:Pd(r),local:!0}}}}});var wc,s0,og=_(()=>{"use strict";Es();wc=class{static{s(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[r,n]of e)this.add(r,n)}get size(){return wm.sum(Wr(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let i=n.indexOf(r);if(i>=0)return n.length===1?this.map.delete(e):n.splice(i,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!==null&&r!==void 0?r:[]}has(e,r){if(r===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(i=>e(i,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Wr(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return Wr(this.map.keys())}values(){return Wr(this.map.values()).flat()}entriesGroupedByKey(){return Wr(this.map.entries())}},s0=class{static{s(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}}});var v2,FM=_(()=>{"use strict";No();Ha();og();Oo();v2=class{static{s(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,r=cr.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,r)}async computeExportsForNode(e,r,n=Av,i=cr.CancellationToken.None){let a=[];this.exportNode(e,a,r);for(let o of n(e))await Di(i),this.exportNode(o,a,r);return a}exportNode(e,r,n){let i=this.nameProvider.getName(e);i&&r.push(this.descriptions.createDescription(e,i,n))}async computeLocalScopes(e,r=cr.CancellationToken.None){let n=e.parseResult.value,i=new wc;for(let a of gc(n))await Di(r),this.processNode(a,e,i);return i}processNode(e,r,n){let i=e.$container;if(i){let a=this.nameProvider.getName(e);a&&n.add(i,this.descriptions.createDescription(e,a,r))}}}});var lg,x2,_Ie,zM=_(()=>{"use strict";Es();lg=class{static{s(this,"StreamScope")}constructor(e,r,n){var i;this.elements=e,this.outerScope=r,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===e.toLowerCase()):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}},x2=class{static{s(this,"MapScope")}constructor(e,r,n){var i;this.elements=new Map,this.caseInsensitive=(i=n?.caseInsensitive)!==null&&i!==void 0?i:!1;for(let a of e){let o=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(o,a)}this.outerScope=r}getElement(e){let r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Wr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},_Ie={getElement(){},getAllElements(){return wv}}});var cg,b2,o0,nw,ug,iw=_(()=>{"use strict";cg=class{static{s(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},b2=class extends cg{static{s(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){let n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},o0=class extends cg{static{s(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();let i=this.cacheForContext(e);if(i.has(r))return i.get(r);if(n){let a=n();return i.set(r,a),a}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){let r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){let r=this.converter(e),n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},nw=class extends o0{static{s(this,"DocumentCache")}constructor(e){super(r=>r.toString()),this.onDispose(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let i=r.concat(n);for(let a of i)this.clear(a)}))}},ug=class extends b2{static{s(this,"WorkspaceCache")}constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}});var k2,$M=_(()=>{"use strict";zM();Ha();Es();iw();k2=class{static{s(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ug(e.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=Ai(e.container).precomputedScopes;if(i){let o=e.container;do{let l=i.get(o);l.length>0&&r.push(Wr(l).filter(u=>this.reflection.isSubtype(u.type,n))),o=o.$container}while(o)}let a=this.getGlobalScope(n,e);for(let o=r.length-1;o>=0;o--)a=this.createScope(r[o],a);return a}createScope(e,r,n){return new lg(Wr(e),r,n)}createScopeForNodes(e,r,n){let i=Wr(e).map(a=>{let o=this.nameProvider.getName(a);if(o)return this.descriptions.createDescription(a,o)}).nonNullable();return new lg(i,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new x2(this.indexManager.allElements(e)))}}});function GM(t){return typeof t.$comment=="string"}function Kae(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}var w2,aw=_(()=>{"use strict";NM();Do();Ha();xl();s(GM,"isAstNodeWithComment");s(Kae,"isIntermediateReference");w2=class{static{s(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r={}){let n=r?.replacer,i=s((o,l)=>this.replacer(o,l,r),"defaultReplacer"),a=n?(o,l)=>n(o,l,i):i;try{return this.currentDocument=Ai(e),JSON.stringify(e,a,r?.space)}finally{this.currentDocument=void 0}}deserialize(e,r={}){let n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:o,uriConverter:l}){var u,h,f,d;if(!this.ignoreProperties.has(e))if(ua(r)){let p=r.ref,m=n?r.$refText:void 0;if(p){let g=Ai(p),y="";this.currentDocument&&this.currentDocument!==g&&(l?y=l(g.uri,r):y=g.uri.toString());let v=this.astNodeLocator.getAstNodePath(p);return{$ref:`${y}#${v}`,$refText:m}}else return{$error:(h=(u=r.error)===null||u===void 0?void 0:u.message)!==null&&h!==void 0?h:"Could not resolve reference",$refText:m}}else if($n(r)){let p;if(a&&(p=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),(!e||r.$document)&&p?.$textRegion&&(p.$textRegion.documentURI=(f=this.currentDocument)===null||f===void 0?void 0:f.uri.toString())),i&&!e&&(p??(p=Object.assign({},r)),p.$sourceText=(d=r.$cstNode)===null||d===void 0?void 0:d.text),o){p??(p=Object.assign({},r));let m=this.commentProvider.getComment(r);m&&(p.$comment=m.replace(/\r/g,""))}return p??r}else return r}addAstNodeRegionWithAssignmentsTo(e){let r=s(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){let n=e.$textRegion=r(e.$cstNode),i=n.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{let o=tR(e.$cstNode,a).map(r);o.length!==0&&(i[a]=o)}),e}}linkNode(e,r,n,i,a,o){for(let[u,h]of Object.entries(e))if(Array.isArray(h))for(let f=0;f{"use strict";kc();T2=class{static{s(this,"DefaultServiceRegistry")}register(e){if(!this.singleton&&!this.map){this.singleton=e;return}if(!this.map&&(this.map={},this.singleton)){for(let r of this.singleton.LanguageMetaData.fileExtensions)this.map[r]=this.singleton;this.singleton=void 0}for(let r of e.LanguageMetaData.fileExtensions)this.map[r]!==void 0&&this.map[r]!==e&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${e.LanguageMetaData.languageId}'.`),this.map[r]=e}getServices(e){if(this.singleton!==void 0)return this.singleton;if(this.map===void 0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");let r=Za.extname(e),n=this.map[r];if(!n)throw new Error(`The service registry contains no services for the extension '${r}'.`);return n}get all(){return this.singleton!==void 0?[this.singleton]:this.map!==void 0?Object.values(this.map):[]}}});function sw(t){return{code:t}}var hg,E2,C2=_(()=>{"use strict";og();Oo();Es();s(sw,"diagnosticData");(function(t){t.all=["fast","slow","built-in"]})(hg||(hg={}));E2=class{static{s(this,"ValidationRegistry")}constructor(e){this.entries=new wc,this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(let[i,a]of Object.entries(e)){let o=a;if(Array.isArray(o))for(let l of o){let u={check:this.wrapValidationException(l,r),category:n};this.addEntry(i,u)}else if(typeof o=="function"){let l={check:this.wrapValidationException(o,r),category:n};this.addEntry(i,l)}}}wrapValidationException(e,r){return async(n,i,a)=>{try{await e.call(r,n,i,a)}catch(o){if(ef(o))throw o;console.error("An error occurred during validation:",o);let l=o instanceof Error?o.message:String(o);o instanceof Error&&o.stack&&console.error(o.stack),i("error","An error occurred during validation: "+l,{node:n})}}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=Wr(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(i=>r.includes(i.category))),n.map(i=>i.check)}}});function Qae(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=Nv(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=nR(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function ow(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}var S2,Nu,UM=_(()=>{"use strict";No();xl();Ha();gl();Oo();C2();S2=class{static{s(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,r={},n=cr.CancellationToken.None){let i=e.parseResult,a=[];if(await Di(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,a,r),r.stopAfterLexingErrors&&a.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===Nu.LexingError})||(this.processParsingErrors(i,a,r),r.stopAfterParsingErrors&&a.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===Nu.ParsingError}))||(this.processLinkingErrors(e,a,r),r.stopAfterLinkingErrors&&a.some(o=>{var l;return((l=o.data)===null||l===void 0?void 0:l.code)===Nu.LinkingError}))))return a;try{a.push(...await this.validateAst(i.value,r,n))}catch(o){if(ef(o))throw o;console.error("An error occurred during validation:",o)}return await Di(n),a}processLexingErrors(e,r,n){for(let i of e.lexerErrors){let a={severity:ow("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:sw(Nu.LexingError),source:this.getSource()};r.push(a)}}processParsingErrors(e,r,n){for(let i of e.parserErrors){let a;if(isNaN(i.token.startOffset)){if("previousToken"in i){let o=i.previousToken;if(isNaN(o.startOffset)){let l={line:0,character:0};a={start:l,end:l}}else{let l={line:o.endLine-1,character:o.endColumn};a={start:l,end:l}}}}else a=Tm(i.token);if(a){let o={severity:ow("error"),range:a,message:i.message,data:sw(Nu.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(e,r,n){for(let i of e.references){let a=i.error;if(a){let o={node:a.container,property:a.property,index:a.index,data:{code:Nu.LinkingError,containerType:a.container.$type,property:a.property,refText:a.reference.$refText}};r.push(this.toDiagnostic("error",a.message,o))}}}async validateAst(e,r,n=cr.CancellationToken.None){let i=[],a=s((o,l,u)=>{i.push(this.toDiagnostic(o,l,u))},"acceptor");return await Promise.all(Io(e).map(async o=>{await Di(n);let l=this.validationRegistry.getChecks(o.$type,r.categories);for(let u of l)await u(o,a,n)})),i}toDiagnostic(e,r,n){return{message:r,range:Qae(n),severity:ow(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};s(Qae,"getDiagnosticRange");s(ow,"toDiagnosticSeverity");(function(t){t.LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Nu||(Nu={}))});var _2,A2,qM=_(()=>{"use strict";No();Do();Ha();gl();Oo();kc();_2=class{static{s(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n=Ai(e)){r??(r=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let a,o=s(()=>{var l;return a??(a=Pd((l=this.nameProvider.getNameNode(e))!==null&&l!==void 0?l:e.$cstNode))},"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return o()},selectionSegment:Pd(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},A2=class{static{s(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=cr.CancellationToken.None){let n=[],i=e.parseResult.value;for(let a of Io(i))await Di(r),Cm(a).filter(o=>!Nd(o)).forEach(o=>{let l=this.createDescription(o);l&&n.push(l)});return n}createDescription(e){let r=e.reference.$nodeDescription,n=e.reference.$refNode;if(!r||!n)return;let i=Ai(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:Pd(n),local:Za.equals(r.documentUri,i)}}}});var L2,WM=_(()=>{"use strict";L2=class{static{s(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((i,a)=>{if(!i||a.length===0)return i;let o=a.indexOf(this.indexSeparator);if(o>0){let l=a.substring(0,o),u=parseInt(a.substring(o+1)),h=i[l];return h?.[u]}return i[a]},e)}}});var D2,HM=_(()=>{"use strict";Oo();D2=class{static{s(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Qa,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)===null||r===void 0?void 0:r.configuration)!==null&&n!==void 0?n:!1}async initialized(e){if(this.workspaceConfig){if(e.register){let r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let r=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((i,a)=>{this.updateSectionConfiguration(i.section,n[a])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(r=>{this.updateSectionConfiguration(r,e.settings[r])})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}}});var l0,YM=_(()=>{"use strict";(function(t){function e(r){return{dispose:s(async()=>await r(),"dispose")}}s(e,"create"),t.create=e})(l0||(l0={}))});var R2,XM=_(()=>{"use strict";No();YM();og();Oo();Es();C2();sg();R2=class{static{s(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new wc,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=un.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=cr.CancellationToken.None){var i,a;for(let o of e){let l=o.uri.toString();if(o.state===un.Validated){if(typeof r.validation=="boolean"&&r.validation)o.state=un.IndexedReferences,o.diagnostics=void 0,this.buildState.delete(l);else if(typeof r.validation=="object"){let u=this.buildState.get(l),h=(i=u?.result)===null||i===void 0?void 0:i.validationChecks;if(h){let d=((a=r.validation.categories)!==null&&a!==void 0?a:hg.all).filter(p=>!h.includes(p));d.length>0&&(this.buildState.set(l,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:d})},result:u.result}),o.state=un.IndexedReferences)}}}else this.buildState.delete(l)}this.currentState=un.Changed,await this.emitUpdate(e.map(o=>o.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=cr.CancellationToken.None){this.currentState=un.Changed;for(let o of r)this.langiumDocuments.deleteDocument(o),this.buildState.delete(o.toString()),this.indexManager.remove(o);for(let o of e){if(!this.langiumDocuments.invalidateDocument(o)){let u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o);u.state=un.Changed,this.langiumDocuments.addDocument(u)}this.buildState.delete(o.toString())}let i=Wr(e).concat(r).map(o=>o.toString()).toSet();this.langiumDocuments.all.filter(o=>!i.has(o.uri.toString())&&this.shouldRelink(o,i)).forEach(o=>{this.serviceRegistry.getServices(o.uri).references.Linker.unlink(o),o.state=Math.min(o.state,un.ComputedScopes),o.diagnostics=void 0}),await this.emitUpdate(e,r),await Di(n);let a=this.langiumDocuments.all.filter(o=>{var l;return o.staten(e,r)))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),l0.create(()=>{let r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,un.Parsed,n,a=>this.langiumDocumentFactory.update(a,n)),await this.runCancelable(e,un.IndexedContent,n,a=>this.indexManager.updateContent(a,n)),await this.runCancelable(e,un.ComputedScopes,n,async a=>{let o=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.precomputedScopes=await o.computeLocalScopes(a,n)}),await this.runCancelable(e,un.Linked,n,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,n)),await this.runCancelable(e,un.IndexedReferences,n,a=>this.indexManager.updateReferences(a,n));let i=e.filter(a=>this.shouldValidate(a));await this.runCancelable(i,un.Validated,n,a=>this.validate(a,n));for(let a of e){let o=this.buildState.get(a.uri.toString());o&&(o.completed=!0)}}prepareBuild(e,r){for(let n of e){let i=n.uri.toString(),a=this.buildState.get(i);(!a||a.completed)&&this.buildState.set(i,{completed:!1,options:r,result:a?.result})}}async runCancelable(e,r,n,i){let a=e.filter(o=>o.state{this.buildPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let i;if(r&&"path"in r?i=r:n=r,n??(n=cr.CancellationToken.None),i){let a=this.langiumDocuments.getDocument(i);if(a&&a.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(bc):new Promise((a,o)=>{let l=this.onBuildPhase(e,()=>{if(l.dispose(),u.dispose(),i){let h=this.langiumDocuments.getDocument(i);a(h?.uri)}else a(void 0)}),u=n.onCancellationRequested(()=>{l.dispose(),u.dispose(),o(bc)})})}async notifyBuildPhase(e,r,n){if(e.length===0)return;let i=this.buildPhaseListeners.get(r);for(let a of i)await Di(n),await a(e,n)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){var n,i;let a=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,o=this.getBuildOptions(e).validation,l=typeof o=="object"?o:void 0,u=await a.validateDocument(e,l,r);e.diagnostics?e.diagnostics.push(...u):e.diagnostics=u;let h=this.buildState.get(e.uri.toString());if(h){(n=h.result)!==null&&n!==void 0||(h.result={});let f=(i=l?.categories)!==null&&i!==void 0?i:hg.all;h.result.validationChecks?h.result.validationChecks.push(...f):h.result.validationChecks=[...f]}}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))===null||r===void 0?void 0:r.options)!==null&&n!==void 0?n:{}}}});var M2,jM=_(()=>{"use strict";Ha();iw();No();Es();kc();M2=class{static{s(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new o0,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){let n=Ai(e).uri,i=[];return this.referenceIndex.forEach(a=>{a.forEach(o=>{Za.equals(o.targetUri,n)&&o.targetPath===r&&i.push(o)})}),Wr(i)}allElements(e,r){let n=Wr(this.symbolIndex.keys());return r&&(n=n.filter(i=>!r||r.has(i))),n.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,r){var n;return r?this.symbolByTypeIndex.get(e,r,()=>{var a;return((a=this.symbolIndex.get(e))!==null&&a!==void 0?a:[]).filter(l=>this.astReflection.isSubtype(l.type,r))}):(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}remove(e){let r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r),this.referenceIndex.delete(r)}async updateContent(e,r=cr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,r),a=e.uri.toString();this.symbolIndex.set(a,i),this.symbolByTypeIndex.clear(a)}async updateReferences(e,r=cr.CancellationToken.None){let i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,r){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(i=>!i.local&&r.has(i.targetUri.toString())):!1}}});var I2,KM=_(()=>{"use strict";No();Oo();kc();I2=class{static{s(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Qa,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var r;this.folders=(r=e.workspaceFolders)!==null&&r!==void 0?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!==null&&n!==void 0?n:[],r)})}async initializeWorkspace(e,r=cr.CancellationToken.None){let n=await this.performStartup(e);await Di(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){let r=this.serviceRegistry.all.flatMap(a=>a.LanguageMetaData.fileExtensions),n=[],i=s(a=>{n.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)},"collector");return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(a=>[a,this.getRootFolder(a)]).map(async a=>this.traverseFolder(...a,r,i))),this._ready.resolve(),n}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return _s.parse(e.uri)}async traverseFolder(e,r,n,i){let a=await this.fileSystemProvider.readDirectory(r);await Promise.all(a.map(async o=>{if(this.includeEntry(e,o,n)){if(o.isDirectory)await this.traverseFolder(e,o.uri,n,i);else if(o.isFile){let l=await this.langiumDocuments.getOrCreateDocument(o.uri);i(l)}}}))}includeEntry(e,r,n){let i=Za.basename(r.uri);if(i.startsWith("."))return!1;if(r.isDirectory)return i!=="node_modules"&&i!=="out";if(r.isFile){let a=Za.extname(r.uri);return n.includes(a)}return!1}}});function Zae(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function ZM(t){return t&&"modes"in t&&"defaultMode"in t}function QM(t){return!Zae(t)&&!ZM(t)}var N2,JM=_(()=>{"use strict";Zd();N2=class{static{s(this,"DefaultLexer")}constructor(e){let r=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);let n=QM(r)?Object.values(r):r;this.chevrotainLexer=new jn(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var r;let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(r=n.groups.hidden)!==null&&r!==void 0?r:[]}}toTokenTypeDictionary(e){if(QM(e))return e;let r=ZM(e)?Object.values(e.modes).flat():e,n={};return r.forEach(i=>n[i.name]=i),n}};s(Zae,"isTokenTypeArray");s(ZM,"isIMultiModeLexerDefinition");s(QM,"isTokenTypeDictionary")});function rI(t,e,r){let n,i;typeof t=="string"?(i=e,n=r):(i=t.range.start,n=e),i||(i=Pr.create(0,0));let a=tse(t),o=iI(n),l=LIe({lines:a,position:i,options:o});return NIe({index:0,tokens:l,position:i})}function nI(t,e){let r=iI(e),n=tse(t);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],o=r.start,l=r.end;return!!o?.exec(i)&&!!l?.exec(a)}function tse(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(YD)}function LIe(t){var e,r,n;let i=[],a=t.position.line,o=t.position.character;for(let l=0;l=f.length){if(i.length>0){let m=Pr.create(a,o);i.push({type:"break",content:"",range:gr.create(m,m)})}}else{Jae.lastIndex=d;let m=Jae.exec(f);if(m){let g=m[0],y=m[1],v=Pr.create(a,o+d),x=Pr.create(a,o+d+g.length);i.push({type:"tag",content:y,range:gr.create(v,x)}),d+=g.length,d=tI(f,d)}if(d0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function DIe(t,e,r,n){let i=[];if(t.length===0){let a=Pr.create(r,n),o=Pr.create(r,n+e.length);i.push({type:"text",content:e,range:gr.create(a,o)})}else{let a=0;for(let l of t){let u=l.index,h=e.substring(a,u);h.length>0&&i.push({type:"text",content:e.substring(a,u),range:gr.create(Pr.create(r,a+n),Pr.create(r,u+n))});let f=h.length+1,d=l[1];if(i.push({type:"inline-tag",content:d,range:gr.create(Pr.create(r,a+f+n),Pr.create(r,a+f+d.length+n))}),f+=d.length,l.length===4){f+=l[2].length;let p=l[3];i.push({type:"text",content:p,range:gr.create(Pr.create(r,a+f+n),Pr.create(r,a+f+p.length+n))})}else i.push({type:"text",content:"",range:gr.create(Pr.create(r,a+f+n),Pr.create(r,a+f+n))});a=u+l[0].length}let o=e.substring(a);o.length>0&&i.push({type:"text",content:o,range:gr.create(Pr.create(r,a+n),Pr.create(r,a+n+o.length))})}return i}function tI(t,e){let r=t.substring(e).match(RIe);return r?e+r.index:t.length}function IIe(t){let e=t.match(MIe);if(e&&typeof e.index=="number")return e.index}function NIe(t){var e,r,n,i;let a=Pr.create(t.position.line,t.position.character);if(t.tokens.length===0)return new lw([],gr.create(a,a));let o=[];for(;t.index0){let u=tI(e,a);o=e.substring(u),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(o=`\`${o}\``),(i=(n=r.renderLink)===null||n===void 0?void 0:n.call(r,e,o))!==null&&i!==void 0?i:zIe(e,o)}}function zIe(t,e){try{return _s.parse(t,!0),`[${e}](${t})`}catch{return t}}function ese(t){return t.endsWith(` +`)?` +`:` + +`}var Jae,AIe,RIe,MIe,lw,O2,P2,cw,aI=_(()=>{"use strict";hM();_m();kc();s(rI,"parseJSDoc");s(nI,"isJSDoc");s(tse,"getLines");Jae=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,AIe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;s(LIe,"tokenize");s(DIe,"buildInlineTokens");RIe=/\S/,MIe=/\s*$/;s(tI,"skipWhitespace");s(IIe,"lastCharacter");s(NIe,"parseJSDocComment");s(OIe,"parseJSDocElement");s(PIe,"appendEmptyLine");s(rse,"parseJSDocText");s(BIe,"parseJSDocInline");s(nse,"parseJSDocTag");s(ise,"parseJSDocLine");s(iI,"normalizeOptions");s(eI,"normalizeOption");lw=class{static{s(this,"JSDocCommentImpl")}constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let r of this.elements)if(e.length===0)e=r.toString();else{let n=r.toString();e+=ese(e)+n}return e.trim()}toMarkdown(e){let r="";for(let n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{let i=n.toMarkdown(e);r+=ese(r)+i}return r.trim()}},O2=class{static{s(this,"JSDocTagImpl")}constructor(e,r,n,i){this.name=e,this.content=r,this.inline=n,this.range=i}toString(){let e=`@${this.name}`,r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e} +${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e?.renderTag)===null||r===void 0?void 0:r.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){let r=this.content.toMarkdown(e);if(this.inline){let a=FIe(this.name,r,e??{});if(typeof a=="string")return a}let n="";e?.tag==="italic"||e?.tag===void 0?n="*":e?.tag==="bold"?n="**":e?.tag==="bold-italic"&&(n="***");let i=`${n}@${this.name}${n}`;return this.content.inlines.length===1?i=`${i} \u2014 ${r}`:this.content.inlines.length>1&&(i=`${i} +${r}`),this.inline?`{${i}}`:i}};s(FIe,"renderInlineTag");s(zIe,"renderLinkDefault");P2=class{static{s(this,"JSDocTextImpl")}constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;rn.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let r="";for(let n=0;ni.range.start.line&&(r+=` +`)}return r}},cw=class{static{s(this,"JSDocLineImpl")}constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}};s(ese,"fillNewlines")});var B2,sI=_(()=>{"use strict";Ha();aI();B2=class{static{s(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let r=this.commentProvider.getComment(e);if(r&&nI(r))return rI(r).toMarkdown({renderLink:s((i,a)=>this.documentationLinkRenderer(e,i,a),"renderLink"),renderTag:s(i=>this.documentationTagRenderer(e,i),"renderTag")})}documentationLinkRenderer(e,r,n){var i;let a=(i=this.findNameInPrecomputedScopes(e,r))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){let o=a.nameSegment.range.start.line+1,l=a.nameSegment.range.start.character+1,u=a.documentUri.with({fragment:`L${o},${l}`});return`[${n}](${u.toString()})`}else return}documentationTagRenderer(e,r){}findNameInPrecomputedScopes(e,r){let i=Ai(e).precomputedScopes;if(!i)return;let a=e;do{let l=i.get(a).find(u=>u.name===r);if(l)return l;a=a.$container}while(a)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(i=>i.name===r)}}});var F2,oI=_(()=>{"use strict";aw();gl();F2=class{static{s(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return GM(e)?e.$comment:(r=FL(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||r===void 0?void 0:r.text}}});var Kn={};var lI=_(()=>{"use strict";lr(Kn,ka(AM(),1))});var z2,cI,uI,hI=_(()=>{"use strict";Oo();lI();z2=class{static{s(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}},cI=class{static{s(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){let n=await this.acquireParserWorker(r),i=new Qa,a,o=r.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(l=>{let u=this.hydrator.hydrate(l);i.resolve(u)}).catch(l=>{i.reject(l)}).finally(()=>{o.dispose(),clearTimeout(a)}),i.promise}terminateWorker(e){e.terminate();let r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(let n of this.workerPool)if(n.ready)return n.lock(),n;let r=new Qa;return e.onCancellationRequested(()=>{let n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(bc)}),this.queue.push(r),r.promise}},uI=class{static{s(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,i){this.onReadyEmitter=new Kn.Emitter,this.deferred=new Qa,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,r(a=>{let o=a;this.deferred.resolve(o),this.unlock()}),n(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(bc),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Qa,this.sendMessage(e),this.deferred.promise}}});var $2,fI=_(()=>{"use strict";No();Oo();$2=class{static{s(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new cr.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let r=new cr.CancellationTokenSource;return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n){let i=new Qa,a={action:r,deferred:i,cancellationToken:n??cr.CancellationToken.None};return e.push(a),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:i})=>{try{let a=await Promise.resolve().then(()=>r(i));n.resolve(a)}catch(a){ef(a)?n.resolve(void 0):n.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}});var G2,dI=_(()=>{"use strict";X6();mc();Do();Ha();og();gl();G2=class{static{s(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new s0,this.tokenTypeIdMap=new s0,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(r=>Object.assign({},r)),parserErrors:e.parserErrors.map(r=>Object.assign({},r)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){let r=new Map,n=new Map;for(let i of Io(e))r.set(i,{});if(e.$cstNode)for(let i of Od(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let o=[];n[i]=o;for(let l of a)$n(l)?o.push(this.dehydrateAstNode(l,r)):ua(l)?o.push(this.dehydrateReference(l,r)):o.push(l)}else $n(a)?n[i]=this.dehydrateAstNode(a,r):ua(a)?n[i]=this.dehydrateReference(a,r):a!==void 0&&(n[i]=a);return n}dehydrateReference(e,r){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){let n=r.cstNodes.get(e);return kv(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),to(e)?n.content=e.content.map(i=>this.dehydrateCstNode(i,r)):Xh(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){let r=new Map,n=new Map;for(let a of Io(e))r.set(a,{});let i;if(e.$cstNode)for(let a of Od(e.$cstNode)){let o;"fullText"in a?(o=new eg(a.fullText),i=o):"content"in a?o=new r0:"tokenType"in a&&(o=this.hydrateCstLeafNode(a)),o&&(n.set(a,o),o.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){let n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(let[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(a)){let o=[];n[i]=o;for(let l of a)$n(l)?o.push(this.setParent(this.hydrateAstNode(l,r),n)):ua(l)?o.push(this.hydrateReference(l,n,i,r)):o.push(l)}else $n(a)?n[i]=this.setParent(this.hydrateAstNode(a,r),n):ua(a)?n[i]=this.hydrateReference(a,n,i,r):a!==void 0&&(n[i]=a);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,i){return this.linker.buildReference(r,n,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){let i=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=r.astNodes.get(e.astNode),to(i))for(let a of e.content){let o=this.hydrateCstNode(a,r,n++);i.content.push(o)}return i}hydrateCstLeafNode(e){let r=this.getTokenType(e.tokenType),n=e.offset,i=e.length,a=e.startLine,o=e.startColumn,l=e.endLine,u=e.endColumn,h=e.hidden;return new t0(n,i,{start:{line:a,character:o},end:{line:l,character:u}},r,h)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();let r=this.grammarElementIdMap.getKey(e);if(r)return r;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(let r of Io(this.grammar))Cv(r)&&this.grammarElementIdMap.set(r,e++)}}});function kl(t){return{documentation:{CommentProvider:s(e=>new F2(e),"CommentProvider"),DocumentationProvider:s(e=>new B2(e),"DocumentationProvider")},parser:{AsyncParser:s(e=>new z2(e),"AsyncParser"),GrammarConfig:s(e=>cR(e),"GrammarConfig"),LangiumParser:s(e=>xM(e),"LangiumParser"),CompletionParser:s(e=>yM(e),"CompletionParser"),ValueConverter:s(()=>new a0,"ValueConverter"),TokenBuilder:s(()=>new i0,"TokenBuilder"),Lexer:s(e=>new N2(e),"Lexer"),ParserErrorMessageProvider:s(()=>new tg,"ParserErrorMessageProvider")},workspace:{AstNodeLocator:s(()=>new L2,"AstNodeLocator"),AstNodeDescriptionProvider:s(e=>new _2(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:s(e=>new A2(e),"ReferenceDescriptionProvider")},references:{Linker:s(e=>new m2(e),"Linker"),NameProvider:s(()=>new g2,"NameProvider"),ScopeProvider:s(e=>new k2(e),"ScopeProvider"),ScopeComputation:s(e=>new v2(e),"ScopeComputation"),References:s(e=>new y2(e),"References")},serializer:{Hydrator:s(e=>new G2(e),"Hydrator"),JsonSerializer:s(e=>new w2(e),"JsonSerializer")},validation:{DocumentValidator:s(e=>new S2(e),"DocumentValidator"),ValidationRegistry:s(e=>new E2(e),"ValidationRegistry")},shared:s(()=>t.shared,"shared")}}function wl(t){return{ServiceRegistry:s(()=>new T2,"ServiceRegistry"),workspace:{LangiumDocuments:s(e=>new p2(e),"LangiumDocuments"),LangiumDocumentFactory:s(e=>new d2(e),"LangiumDocumentFactory"),DocumentBuilder:s(e=>new R2(e),"DocumentBuilder"),IndexManager:s(e=>new M2(e),"IndexManager"),WorkspaceManager:s(e=>new I2(e),"WorkspaceManager"),FileSystemProvider:s(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:s(()=>new $2,"WorkspaceLock"),ConfigurationProvider:s(e=>new D2(e),"ConfigurationProvider")}}}var pI=_(()=>{"use strict";uR();vM();bM();kM();wM();OM();PM();BM();FM();$M();aw();VM();UM();C2();qM();WM();HM();XM();sg();jM();KM();JM();sI();oI();f2();hI();fI();dI();s(kl,"createDefaultCoreModule");s(wl,"createDefaultSharedCoreModule")});function Aa(t,e,r,n,i,a,o,l,u){let h=[t,e,r,n,i,a,o,l,u].reduce(uw,{});return lse(h)}function ose(t){if(t&&t[gI])for(let e of Object.values(t))ose(e);return t}function lse(t,e){let r=new Proxy({},{deleteProperty:s(()=>!1,"deleteProperty"),get:s((n,i)=>sse(n,i,t,e||r),"get"),getOwnPropertyDescriptor:s((n,i)=>(sse(n,i,t,e||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:s((n,i)=>i in t,"has"),ownKeys:s(()=>[...Reflect.ownKeys(t),gI],"ownKeys")});return r[gI]=!0,r}function sse(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===ase)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){let i=r[e];t[e]=ase;try{t[e]=typeof i=="function"?i(n):lse(i,n)}catch(a){throw t[e]=a instanceof Error?a:void 0,a}return t[e]}else return}function uw(t,e){if(e){for(let[r,n]of Object.entries(e))if(n!==void 0){let i=t[r];i!==null&&n!==null&&typeof i=="object"&&typeof n=="object"?t[r]=uw(i,n):t[r]=n}}return t}var mI,gI,ase,yI=_(()=>{"use strict";(function(t){t.merge=(e,r)=>uw(uw({},e),r)})(mI||(mI={}));s(Aa,"inject");gI=Symbol("isProxy");s(ose,"eagerLoad");s(lse,"_inject");ase=Symbol();s(sse,"_resolve");s(uw,"_merge")});var cse=_(()=>{"use strict"});var use=_(()=>{"use strict";oI();sI();aI()});var hse=_(()=>{"use strict"});var fse=_(()=>{"use strict";uR();hse()});var dse=_(()=>{"use strict"});var pse=_(()=>{"use strict";hI();vM();X6();bM();f2();JM();dse();kM();wM()});var mse=_(()=>{"use strict";OM();PM();BM();zM();FM();$M()});var gse=_(()=>{"use strict";dI();aw()});var hw,Tl,vI=_(()=>{"use strict";hw=class{static{s(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Tl={fileSystemProvider:s(()=>new hw,"fileSystemProvider")}});function VIe(){let t=Aa(wl(Tl),GIe),e=Aa(kl({shared:t}),$Ie);return t.ServiceRegistry.register(e),e}function c0(t){var e;let r=VIe(),n=r.serializer.JsonSerializer.deserialize(t);return r.shared.workspace.LangiumDocumentFactory.fromModel(n,_s.parse(`memory://${(e=n.name)!==null&&e!==void 0?e:"grammar"}.langium`)),n}var $Ie,GIe,yse=_(()=>{"use strict";pI();yI();mc();vI();kc();$Ie={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},GIe={AstReflection:s(()=>new Em,"AstReflection")};s(VIe,"createMinimalGrammarServices");s(c0,"loadGrammarFromJson")});var wr={};ur(wr,{AstUtils:()=>jk,BiMap:()=>s0,Cancellation:()=>cr,ContextCache:()=>o0,CstUtils:()=>Bk,DONE_RESULT:()=>Wa,Deferred:()=>Qa,Disposable:()=>l0,DisposableCache:()=>cg,DocumentCache:()=>nw,EMPTY_STREAM:()=>wv,ErrorWithLocation:()=>Bd,GrammarUtils:()=>t6,MultiMap:()=>wc,OperationCancelled:()=>bc,Reduction:()=>wm,RegExpUtils:()=>Jk,SimpleCache:()=>b2,StreamImpl:()=>ro,TreeStreamImpl:()=>pc,URI:()=>_s,UriUtils:()=>Za,WorkspaceCache:()=>ug,assertUnreachable:()=>jh,delayNextTick:()=>MM,interruptAndCheck:()=>Di,isOperationCancelled:()=>ef,loadGrammarFromJson:()=>c0,setInterruptionPeriod:()=>Uae,startCancelableOperation:()=>Vae,stream:()=>Wr});var vse=_(()=>{"use strict";iw();lI();lr(wr,Kn);og();YM();Fk();yse();Oo();Es();kc();Ha();No();gl();xl();_m()});var xse=_(()=>{"use strict";UM();C2()});var bse=_(()=>{"use strict";qM();WM();HM();XM();sg();vI();jM();fI();KM()});var ha={};ur(ha,{AbstractAstReflection:()=>Id,AbstractCstNode:()=>l2,AbstractLangiumParser:()=>c2,AbstractParserErrorMessageProvider:()=>K6,AbstractThreadedAsyncParser:()=>cI,AstUtils:()=>jk,BiMap:()=>s0,Cancellation:()=>cr,CompositeCstNodeImpl:()=>r0,ContextCache:()=>o0,CstNodeBuilder:()=>o2,CstUtils:()=>Bk,DONE_RESULT:()=>Wa,DatatypeSymbol:()=>j6,DefaultAstNodeDescriptionProvider:()=>_2,DefaultAstNodeLocator:()=>L2,DefaultAsyncParser:()=>z2,DefaultCommentProvider:()=>F2,DefaultConfigurationProvider:()=>D2,DefaultDocumentBuilder:()=>R2,DefaultDocumentValidator:()=>S2,DefaultHydrator:()=>G2,DefaultIndexManager:()=>M2,DefaultJsonSerializer:()=>w2,DefaultLangiumDocumentFactory:()=>d2,DefaultLangiumDocuments:()=>p2,DefaultLexer:()=>N2,DefaultLinker:()=>m2,DefaultNameProvider:()=>g2,DefaultReferenceDescriptionProvider:()=>A2,DefaultReferences:()=>y2,DefaultScopeComputation:()=>v2,DefaultScopeProvider:()=>k2,DefaultServiceRegistry:()=>T2,DefaultTokenBuilder:()=>i0,DefaultValueConverter:()=>a0,DefaultWorkspaceLock:()=>$2,DefaultWorkspaceManager:()=>I2,Deferred:()=>Qa,Disposable:()=>l0,DisposableCache:()=>cg,DocumentCache:()=>nw,DocumentState:()=>un,DocumentValidator:()=>Nu,EMPTY_SCOPE:()=>_Ie,EMPTY_STREAM:()=>wv,EmptyFileSystem:()=>Tl,EmptyFileSystemProvider:()=>hw,ErrorWithLocation:()=>Bd,GrammarAST:()=>_v,GrammarUtils:()=>t6,JSDocDocumentationProvider:()=>B2,LangiumCompletionParser:()=>h2,LangiumParser:()=>u2,LangiumParserErrorMessageProvider:()=>tg,LeafCstNodeImpl:()=>t0,MapScope:()=>x2,Module:()=>mI,MultiMap:()=>wc,OperationCancelled:()=>bc,ParserWorker:()=>uI,Reduction:()=>wm,RegExpUtils:()=>Jk,RootCstNodeImpl:()=>eg,SimpleCache:()=>b2,StreamImpl:()=>ro,StreamScope:()=>lg,TextDocument:()=>ig,TreeStreamImpl:()=>pc,URI:()=>_s,UriUtils:()=>Za,ValidationCategory:()=>hg,ValidationRegistry:()=>E2,ValueConverter:()=>xc,WorkspaceCache:()=>ug,assertUnreachable:()=>jh,createCompletionParser:()=>yM,createDefaultCoreModule:()=>kl,createDefaultSharedCoreModule:()=>wl,createGrammarConfig:()=>cR,createLangiumParser:()=>xM,delayNextTick:()=>MM,diagnosticData:()=>sw,eagerLoad:()=>ose,getDiagnosticRange:()=>Qae,inject:()=>Aa,interruptAndCheck:()=>Di,isAstNode:()=>$n,isAstNodeDescription:()=>NL,isAstNodeWithComment:()=>GM,isCompositeCstNode:()=>to,isIMultiModeLexerDefinition:()=>ZM,isJSDoc:()=>nI,isLeafCstNode:()=>Xh,isLinkingError:()=>Nd,isNamed:()=>jae,isOperationCancelled:()=>ef,isReference:()=>ua,isRootCstNode:()=>kv,isTokenTypeArray:()=>Zae,isTokenTypeDictionary:()=>QM,loadGrammarFromJson:()=>c0,parseJSDoc:()=>rI,prepareLangiumParser:()=>Oae,setInterruptionPeriod:()=>Uae,startCancelableOperation:()=>Vae,stream:()=>Wr,toDiagnosticSeverity:()=>ow});var Ou=_(()=>{"use strict";pI();yI();VM();cse();Do();use();fse();pse();mse();gse();vse();lr(ha,wr);xse();bse();mc()});function Sse(t){return Tc.isInstance(t,xI)}function _se(t){return Tc.isInstance(t,bI)}function Ase(t){return Tc.isInstance(t,HIe)}function Lse(t){return Tc.isInstance(t,kI)}function Rse(t){return Tc.isInstance(t,Dse)}function Mse(t){return Tc.isInstance(t,wI)}function Nse(t){return Tc.isInstance(t,Ise)}function Pse(t){return Tc.isInstance(t,Ose)}function Fse(t){return Tc.isInstance(t,Bse)}function $se(t){return Tc.isInstance(t,zse)}var UIe,_t,Cse,xI,qIe,WIe,bI,HIe,kI,Dse,wI,Ise,Ose,Bse,zse,YIe,Gse,Tc,kse,XIe,wse,jIe,Tse,KIe,Ese,QIe,ZIe,JIe,eNe,tNe,Pu,TI,EI,CI,SI,rNe,nNe,iNe,aNe,fw,u0,Ec,sNe,Cc=_(()=>{"use strict";Ou();Ou();Ou();Ou();UIe=Object.defineProperty,_t=s((t,e)=>UIe(t,"name",{value:e,configurable:!0}),"__name"),Cse="Statement",xI="Branch";s(Sse,"isBranch");_t(Sse,"isBranch");qIe="Checkout",WIe="CherryPicking",bI="Commit";s(_se,"isCommit");_t(_se,"isCommit");HIe="Common";s(Ase,"isCommon");_t(Ase,"isCommon");kI="GitGraph";s(Lse,"isGitGraph");_t(Lse,"isGitGraph");Dse="Info";s(Rse,"isInfo");_t(Rse,"isInfo");wI="Merge";s(Mse,"isMerge");_t(Mse,"isMerge");Ise="Packet";s(Nse,"isPacket");_t(Nse,"isPacket");Ose="PacketBlock";s(Pse,"isPacketBlock");_t(Pse,"isPacketBlock");Bse="Pie";s(Fse,"isPie");_t(Fse,"isPie");zse="PieSection";s($se,"isPieSection");_t($se,"isPieSection");YIe="Direction",Gse=class extends Id{static{s(this,"MermaidAstReflection")}static{_t(this,"MermaidAstReflection")}getAllTypes(){return["Branch","Checkout","CherryPicking","Commit","Common","Direction","GitGraph","Info","Merge","Packet","PacketBlock","Pie","PieSection","Statement"]}computeIsSubtype(t,e){switch(t){case xI:case qIe:case WIe:case bI:case wI:return this.isSubtype(Cse,e);case YIe:return this.isSubtype(kI,e);default:return!1}}getReferenceType(t){let e=`${t.container.$type}:${t.property}`;switch(e){default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},Tc=new Gse,XIe=_t(()=>kse??(kse=c0('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),jIe=_t(()=>wse??(wse=c0(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),KIe=_t(()=>Tse??(Tse=c0('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),QIe=_t(()=>Ese??(Ese=c0(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),ZIe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},JIe={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},eNe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},tNe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Pu={AstReflection:_t(()=>new Gse,"AstReflection")},TI={Grammar:_t(()=>XIe(),"Grammar"),LanguageMetaData:_t(()=>ZIe,"LanguageMetaData"),parser:{}},EI={Grammar:_t(()=>jIe(),"Grammar"),LanguageMetaData:_t(()=>JIe,"LanguageMetaData"),parser:{}},CI={Grammar:_t(()=>KIe(),"Grammar"),LanguageMetaData:_t(()=>eNe,"LanguageMetaData"),parser:{}},SI={Grammar:_t(()=>QIe(),"Grammar"),LanguageMetaData:_t(()=>tNe,"LanguageMetaData"),parser:{}},rNe=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,nNe=/accTitle[\t ]*:([^\n\r]*)/,iNe=/title([\t ][^\n\r]*|)/,aNe={ACC_DESCR:rNe,ACC_TITLE:nNe,TITLE:iNe},fw=class extends a0{static{s(this,"AbstractMermaidValueConverter")}static{_t(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){let n=this.runCommonConverter(t,e,r);return n===void 0&&(n=this.runCustomConverter(t,e,r)),n===void 0?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){let n=aNe[t.name];if(n===void 0)return;let i=n.exec(e);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},u0=class extends fw{static{s(this,"CommonValueConverter")}static{_t(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},Ec=class extends i0{static{s(this,"AbstractMermaidTokenBuilder")}static{_t(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){let n=super.buildKeywordTokens(t,e,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},sNe=class extends Ec{static{s(this,"CommonTokenBuilder")}static{_t(this,"CommonTokenBuilder")}}});function pw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),SI,dw);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}var oNe,dw,_I=_(()=>{"use strict";Cc();Ou();oNe=class extends Ec{static{s(this,"GitGraphTokenBuilder")}static{_t(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},dw={parser:{TokenBuilder:_t(()=>new oNe,"TokenBuilder"),ValueConverter:_t(()=>new u0,"ValueConverter")}};s(pw,"createGitGraphServices");_t(pw,"createGitGraphServices")});function gw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),TI,mw);return e.ServiceRegistry.register(r),{shared:e,Info:r}}var lNe,mw,AI=_(()=>{"use strict";Cc();Ou();lNe=class extends Ec{static{s(this,"InfoTokenBuilder")}static{_t(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},mw={parser:{TokenBuilder:_t(()=>new lNe,"TokenBuilder"),ValueConverter:_t(()=>new u0,"ValueConverter")}};s(gw,"createInfoServices");_t(gw,"createInfoServices")});function vw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),EI,yw);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}var cNe,yw,LI=_(()=>{"use strict";Cc();Ou();cNe=class extends Ec{static{s(this,"PacketTokenBuilder")}static{_t(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},yw={parser:{TokenBuilder:_t(()=>new cNe,"TokenBuilder"),ValueConverter:_t(()=>new u0,"ValueConverter")}};s(vw,"createPacketServices");_t(vw,"createPacketServices")});function bw(t=Tl){let e=Aa(wl(t),Pu),r=Aa(kl({shared:e}),CI,xw);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}var uNe,hNe,xw,DI=_(()=>{"use strict";Cc();Ou();uNe=class extends Ec{static{s(this,"PieTokenBuilder")}static{_t(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},hNe=class extends fw{static{s(this,"PieValueConverter")}static{_t(this,"PieValueConverter")}runCustomConverter(t,e,r){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},xw={parser:{TokenBuilder:_t(()=>new uNe,"TokenBuilder"),ValueConverter:_t(()=>new hNe,"ValueConverter")}};s(bw,"createPieServices");_t(bw,"createPieServices")});var Vse={};ur(Vse,{InfoModule:()=>mw,createInfoServices:()=>gw});var Use=_(()=>{"use strict";AI();Cc()});var qse={};ur(qse,{PacketModule:()=>yw,createPacketServices:()=>vw});var Wse=_(()=>{"use strict";LI();Cc()});var Hse={};ur(Hse,{PieModule:()=>xw,createPieServices:()=>bw});var Yse=_(()=>{"use strict";DI();Cc()});var Xse={};ur(Xse,{GitGraphModule:()=>dw,createGitGraphServices:()=>pw});var jse=_(()=>{"use strict";_I();Cc()});async function Bu(t,e){let r=fNe[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);fg[t]||await r();let i=fg[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new dNe(i);return i.value}var fg,fNe,dNe,V2=_(()=>{"use strict";_I();AI();LI();DI();Cc();fg={},fNe={info:_t(async()=>{let{createInfoServices:t}=await Promise.resolve().then(()=>(Use(),Vse)),e=t().Info.parser.LangiumParser;fg.info=e},"info"),packet:_t(async()=>{let{createPacketServices:t}=await Promise.resolve().then(()=>(Wse(),qse)),e=t().Packet.parser.LangiumParser;fg.packet=e},"packet"),pie:_t(async()=>{let{createPieServices:t}=await Promise.resolve().then(()=>(Yse(),Hse)),e=t().Pie.parser.LangiumParser;fg.pie=e},"pie"),gitGraph:_t(async()=>{let{createGitGraphServices:t}=await Promise.resolve().then(()=>(jse(),Xse)),e=t().GitGraph.parser.LangiumParser;fg.gitGraph=e},"gitGraph")};s(Bu,"parse");_t(Bu,"parse");dNe=class extends Error{static{s(this,"MermaidParseError")}constructor(t){let e=t.lexerErrors.map(n=>n.message).join(` +`),r=t.parserErrors.map(n=>n.message).join(` +`);super(`Parsing failed: ${e} ${r}`),this.result=t}static{_t(this,"MermaidParseError")}}});function dg(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var kw=_(()=>{"use strict";s(dg,"populateCommonDb")});var Br,ww=_(()=>{"use strict";Br={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var pg,RI=_(()=>{"use strict";pg=class{constructor(e){this.init=e;this.records=this.init()}static{s(this,"ImperativeState")}reset(){this.records=this.init()}}});function MI(){return cA({length:7})}function mNe(t,e){let r=Object.create(null);return t.reduce((n,i)=>{let a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function Kse(t,e,r){let n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function Zse(t){let e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]),r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});let n=[r,e.id,e.seq];for(let i in nt.records.branches)nt.records.branches.get(i)===e.id&&n.push(i);if(V.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){let i=nt.records.commits.get(e.parents[0]);Kse(t,e,i),e.parents[1]&&t.push(nt.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){let i=nt.records.commits.get(e.parents[0]);Kse(t,e,i)}}t=mNe(t,i=>i.id),Zse(t)}var pNe,h0,nt,gNe,yNe,vNe,xNe,bNe,kNe,wNe,Qse,TNe,ENe,CNe,SNe,_Ne,Jse,ANe,LNe,DNe,Tw,II=_(()=>{"use strict";it();pr();zs();Qt();Ci();ww();RI();Pl();pNe=dr.gitGraph,h0=s(()=>ms({...pNe,..._r().gitGraph}),"getConfig"),nt=new pg(()=>{let t=h0(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});s(MI,"getID");s(mNe,"uniqBy");gNe=s(function(t){nt.records.direction=t},"setDirection"),yNe=s(function(t){V.debug("options str",t),t=t?.trim(),t=t||"{}";try{nt.records.options=JSON.parse(t)}catch(e){V.error("error while parsing gitGraph options",e.message)}},"setOptions"),vNe=s(function(){return nt.records.options},"getOptions"),xNe=s(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags;V.info("commit",e,r,n,i),V.debug("Entering commit:",e,r,n,i);let a=h0();r=$e.sanitizeText(r,a),e=$e.sanitizeText(e,a),i=i?.map(l=>$e.sanitizeText(l,a));let o={id:r||nt.records.seq+"-"+MI(),message:e,seq:nt.records.seq++,type:n??Br.NORMAL,tags:i??[],parents:nt.records.head==null?[]:[nt.records.head.id],branch:nt.records.currBranch};nt.records.head=o,V.info("main branch",a.mainBranchName),nt.records.commits.set(o.id,o),nt.records.branches.set(nt.records.currBranch,o.id),V.debug("in pushCommit "+o.id)},"commit"),bNe=s(function(t){let e=t.name,r=t.order;if(e=$e.sanitizeText(e,h0()),nt.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);nt.records.branches.set(e,nt.records.head!=null?nt.records.head.id:null),nt.records.branchConfig.set(e,{name:e,order:r}),Qse(e),V.debug("in createBranch")},"branch"),kNe=s(t=>{let e=t.branch,r=t.id,n=t.type,i=t.tags,a=h0();e=$e.sanitizeText(e,a),r&&(r=$e.sanitizeText(r,a));let o=nt.records.branches.get(nt.records.currBranch),l=nt.records.branches.get(e),u=o?nt.records.commits.get(o):void 0,h=l?nt.records.commits.get(l):void 0;if(u&&h&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(nt.records.currBranch===e){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${nt.records.currBranch})has no commits`);throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},p}if(!nt.records.branches.has(e)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(r&&nt.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id");throw p.hash={text:`merge ${e} ${r} ${n} ${i?.join(" ")}`,token:`merge ${e} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},p}let f=l||"",d={id:r||`${nt.records.seq}-${MI()}`,message:`merged branch ${e} into ${nt.records.currBranch}`,seq:nt.records.seq++,parents:nt.records.head==null?[]:[nt.records.head.id,f],branch:nt.records.currBranch,type:Br.MERGE,customType:n,customId:!!r,tags:i??[]};nt.records.head=d,nt.records.commits.set(d.id,d),nt.records.branches.set(nt.records.currBranch,d.id),V.debug(nt.records.branches),V.debug("in mergeBranch")},"merge"),wNe=s(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent;V.debug("Entering cherryPick:",e,r,n);let a=h0();if(e=$e.sanitizeText(e,a),r=$e.sanitizeText(r,a),n=n?.map(u=>$e.sanitizeText(u,a)),i=$e.sanitizeText(i,a),!e||!nt.records.commits.has(e)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},u}let o=nt.records.commits.get(e);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=o.branch;if(o.type===Br.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!nt.records.commits.has(r)){if(l===nt.records.currBranch){let d=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let u=nt.records.branches.get(nt.records.currBranch);if(u===void 0||!u){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${nt.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let h=nt.records.commits.get(u);if(h===void 0||!h){let d=new Error(`Incorrect usage of "cherry-pick". Current branch (${nt.records.currBranch})has no commits`);throw d.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},d}let f={id:nt.records.seq+"-"+MI(),message:`cherry-picked ${o?.message} into ${nt.records.currBranch}`,seq:nt.records.seq++,parents:nt.records.head==null?[]:[nt.records.head.id,o.id],branch:nt.records.currBranch,type:Br.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===Br.MERGE?`|parent:${i}`:""}`]};nt.records.head=f,nt.records.commits.set(f.id,f),nt.records.branches.set(nt.records.currBranch,f.id),V.debug(nt.records.branches),V.debug("in cherryPick")}},"cherryPick"),Qse=s(function(t){if(t=$e.sanitizeText(t,h0()),nt.records.branches.has(t)){nt.records.currBranch=t;let e=nt.records.branches.get(nt.records.currBranch);e===void 0||!e?nt.records.head=null:nt.records.head=nt.records.commits.get(e)??null}else{let e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");s(Kse,"upsert");s(Zse,"prettyPrintCommitHistory");TNe=s(function(){V.debug(nt.records.commits);let t=Jse()[0];Zse([t])},"prettyPrint"),ENe=s(function(){nt.reset(),br()},"clear"),CNe=s(function(){return[...nt.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${r}`)}).sort((e,r)=>(e.order??0)-(r.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),SNe=s(function(){return nt.records.branches},"getBranches"),_Ne=s(function(){return nt.records.commits},"getCommits"),Jse=s(function(){let t=[...nt.records.commits.values()];return t.forEach(function(e){V.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),ANe=s(function(){return nt.records.currBranch},"getCurrentBranch"),LNe=s(function(){return nt.records.direction},"getDirection"),DNe=s(function(){return nt.records.head},"getHead"),Tw={commitType:Br,getConfig:h0,setDirection:gNe,setOptions:yNe,getOptions:vNe,commit:xNe,branch:bNe,merge:kNe,cherryPick:wNe,checkout:Qse,prettyPrint:TNe,clear:ENe,getBranchesAsObjArray:CNe,getBranches:SNe,getCommits:_Ne,getCommitsArray:Jse,getCurrentBranch:ANe,getDirection:LNe,getHead:DNe,setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,setAccDescription:Vr,setDiagramTitle:an,getDiagramTitle:Qr}});var RNe,MNe,INe,NNe,ONe,PNe,BNe,eoe,toe=_(()=>{"use strict";V2();it();kw();II();ww();RNe=s((t,e)=>{dg(t,e),t.dir&&e.setDirection(t.dir);for(let r of t.statements)MNe(r,e)},"populate"),MNe=s((t,e)=>{let n={Commit:s(i=>e.commit(INe(i)),"Commit"),Branch:s(i=>e.branch(NNe(i)),"Branch"),Merge:s(i=>e.merge(ONe(i)),"Merge"),Checkout:s(i=>e.checkout(PNe(i)),"Checkout"),CherryPicking:s(i=>e.cherryPick(BNe(i)),"CherryPicking")}[t.$type];n?n(t):V.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),INe=s(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?Br[t.type]:Br.NORMAL,tags:t.tags??void 0}),"parseCommit"),NNe=s(t=>({name:t.name,order:t.order??0}),"parseBranch"),ONe=s(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?Br[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),PNe=s(t=>t.branch,"parseCheckout"),BNe=s(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),eoe={parse:s(async t=>{let e=await Bu("gitGraph",t);V.debug(e),RNe(e,Tw)},"parse")}});var FNe,Po,rf,nf,Sc,Fu,f0,As,Ls,Ew,U2,Cw,tf,yr,zNe,noe,ioe,$Ne,GNe,VNe,UNe,qNe,WNe,HNe,YNe,XNe,jNe,KNe,QNe,roe,ZNe,q2,JNe,eOe,tOe,rOe,nOe,aoe,soe=_(()=>{"use strict";Xt();gt();it();pr();ww();FNe=le(),Po=FNe?.gitGraph,rf=10,nf=40,Sc=4,Fu=2,f0=8,As=new Map,Ls=new Map,Ew=30,U2=new Map,Cw=[],tf=0,yr="LR",zNe=s(()=>{As.clear(),Ls.clear(),U2.clear(),tf=0,Cw=[],yr="LR"},"clear"),noe=s(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),e.appendChild(i)}),e},"drawText"),ioe=s(t=>{let e,r,n;return yr==="BT"?(r=s((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=s((i,a)=>i>=a,"comparisonFunc"),n=0),t.forEach(i=>{let a=yr==="TB"||yr=="BT"?Ls.get(i)?.y:Ls.get(i)?.x;a!==void 0&&r(a,n)&&(e=i,n=a)}),e},"findClosestParent"),$Ne=s(t=>{let e="",r=1/0;return t.forEach(n=>{let i=Ls.get(n).y;i<=r&&(e=n,r=i)}),e||void 0},"findClosestParentBT"),GNe=s((t,e,r)=>{let n=r,i=r,a=[];t.forEach(o=>{let l=e.get(o);if(!l)throw new Error(`Commit not found for key ${o}`);l.parents.length?(n=UNe(l),i=Math.max(n,i)):a.push(l),qNe(l,n)}),n=i,a.forEach(o=>{WNe(o,n,r)}),t.forEach(o=>{let l=e.get(o);if(l?.parents.length){let u=$Ne(l.parents);n=Ls.get(u).y-nf,n<=i&&(i=n);let h=As.get(l.branch).pos,f=n-rf;Ls.set(l.id,{x:h,y:f})}})},"setParallelBTPos"),VNe=s(t=>{let e=ioe(t.parents.filter(n=>n!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);let r=Ls.get(e)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),UNe=s(t=>VNe(t)+nf,"calculateCommitPosition"),qNe=s((t,e)=>{let r=As.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);let n=r.pos,i=e+rf;return Ls.set(t.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),WNe=s((t,e,r)=>{let n=As.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);let i=e+r,a=n.pos;Ls.set(t.id,{x:a,y:i})},"setRootPosition"),HNe=s((t,e,r,n,i,a)=>{if(a===Br.HIGHLIGHT)t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%f0} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%f0} ${n}-inner`);else if(a===Br.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${n}`);else{let o=t.append("circle");if(o.attr("cx",r.x),o.attr("cy",r.y),o.attr("r",e.type===Br.MERGE?9:10),o.attr("class",`commit ${e.id} commit${i%f0}`),a===Br.MERGE){let l=t.append("circle");l.attr("cx",r.x),l.attr("cy",r.y),l.attr("r",6),l.attr("class",`commit ${n} ${e.id} commit${i%f0}`)}a===Br.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},${r.y-5}`).attr("class",`commit ${n} ${e.id} commit${i%f0}`)}},"drawCommitBullet"),YNe=s((t,e,r,n)=>{if(e.type!==Br.CHERRY_PICK&&(e.customId&&e.type===Br.MERGE||e.type!==Br.MERGE)&&Po?.showCommitLabel){let i=t.append("g"),a=i.insert("rect").attr("class","commit-label-bkg"),o=i.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),l=o.node()?.getBBox();if(l&&(a.attr("x",r.posWithOffset-l.width/2-Fu).attr("y",r.y+13.5).attr("width",l.width+2*Fu).attr("height",l.height+2*Fu),yr==="TB"||yr==="BT"?(a.attr("x",r.x-(l.width+4*Sc+5)).attr("y",r.y-12),o.attr("x",r.x-(l.width+4*Sc)).attr("y",r.y+l.height-12)):o.attr("x",r.posWithOffset-l.width/2),Po.rotateCommitLabel))if(yr==="TB"||yr==="BT")o.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(l.width+10)/25*9.5,h=10+l.width/25*8.5;i.attr("transform","translate("+u+", "+h+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),XNe=s((t,e,r,n)=>{if(e.tags.length>0){let i=0,a=0,o=0,l=[];for(let u of e.tags.reverse()){let h=t.insert("polygon"),f=t.append("circle"),d=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=d.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");a=Math.max(a,p.width),o=Math.max(o,p.height),d.attr("x",r.posWithOffset-p.width/2),l.push({tag:d,hole:f,rect:h,yOffset:i}),i+=20}for(let{tag:u,hole:h,rect:f,yOffset:d}of l){let p=o/2,m=r.y-19.2-d;if(f.attr("class","tag-label-bkg").attr("points",` + ${n-a/2-Sc/2},${m+Fu} + ${n-a/2-Sc/2},${m-Fu} + ${r.posWithOffset-a/2-Sc},${m-p-Fu} + ${r.posWithOffset+a/2+Sc},${m-p-Fu} + ${r.posWithOffset+a/2+Sc},${m+p+Fu} + ${r.posWithOffset-a/2-Sc},${m+p+Fu}`),h.attr("cy",m).attr("cx",n-a/2+Sc/2).attr("r",1.5).attr("class","tag-hole"),yr==="TB"||yr==="BT"){let g=n+d;f.attr("class","tag-label-bkg").attr("points",` + ${r.x},${g+2} + ${r.x},${g-2} + ${r.x+rf},${g-p-2} + ${r.x+rf+a+4},${g-p-2} + ${r.x+rf+a+4},${g+p+2} + ${r.x+rf},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+Sc/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),jNe=s(t=>{switch(t.customType??t.type){case Br.NORMAL:return"commit-normal";case Br.REVERSE:return"commit-reverse";case Br.HIGHLIGHT:return"commit-highlight";case Br.MERGE:return"commit-merge";case Br.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),KNe=s((t,e,r,n)=>{let i={x:0,y:0};if(t.parents.length>0){let a=ioe(t.parents);if(a){let o=n.get(a)??i;return e==="TB"?o.y+nf:e==="BT"?(n.get(t.id)??i).y-nf:o.x+nf}}else return e==="TB"?Ew:e==="BT"?(n.get(t.id)??i).y-nf:0;return 0},"calculatePosition"),QNe=s((t,e,r)=>{let n=yr==="BT"&&r?e:e+rf,i=yr==="TB"||yr==="BT"?n:As.get(t.branch)?.pos,a=yr==="TB"||yr==="BT"?As.get(t.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:i,posWithOffset:n}},"getCommitPosition"),roe=s((t,e,r)=>{if(!Po)throw new Error("GitGraph config not found");let n=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels"),a=yr==="TB"||yr==="BT"?Ew:0,o=[...e.keys()],l=Po?.parallelCommits??!1,u=s((f,d)=>{let p=e.get(f)?.seq,m=e.get(d)?.seq;return p!==void 0&&m!==void 0?p-m:0},"sortKeys"),h=o.sort(u);yr==="BT"&&(l&&GNe(h,e,a),h=h.reverse()),h.forEach(f=>{let d=e.get(f);if(!d)throw new Error(`Commit not found for key ${f}`);l&&(a=KNe(d,yr,a,Ls));let p=QNe(d,a,l);if(r){let m=jNe(d),g=d.customType??d.type,y=As.get(d.branch)?.index??0;HNe(n,d,p,m,y,g),YNe(i,d,p,a),XNe(i,d,p,a)}yr==="TB"||yr==="BT"?Ls.set(d.id,{x:p.x,y:p.posWithOffset}):Ls.set(d.id,{x:p.posWithOffset,y:p.y}),a=yr==="BT"&&l?a+nf:a+nf+rf,a>tf&&(tf=a)})},"drawCommits"),ZNe=s((t,e,r,n,i)=>{let o=(yr==="TB"||yr==="BT"?r.xh.branch===o,"isOnBranchToGetCurve"),u=s(h=>h.seq>t.seq&&h.sequ(h)&&l(h))},"shouldRerouteArrow"),q2=s((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;if(r>5)return n;if(Cw.every(o=>Math.abs(o-n)>=10))return Cw.push(n),n;let a=Math.abs(t-e);return q2(t,e-a/5,r+1)},"findLane"),JNe=s((t,e,r,n)=>{let i=Ls.get(e.id),a=Ls.get(r.id);if(i===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);let o=ZNe(e,r,i,a,n),l="",u="",h=0,f=0,d=As.get(r.branch)?.index;r.type===Br.MERGE&&e.id!==r.parents[0]&&(d=As.get(e.branch)?.index);let p;if(o){l="A 10 10, 0, 0, 0,",u="A 10 10, 0, 0, 1,",h=10,f=10;let m=i.ya.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y-h} ${u} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x+h} ${i.y} ${l} ${a.x} ${i.y+f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):yr==="BT"?(i.xa.x&&(l="A 20 20, 0, 0, 0,",u="A 20 20, 0, 0, 1,",h=20,f=20,r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${l} ${i.x-f} ${a.y} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`),i.x===a.x&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.ya.y&&(r.type===Br.MERGE&&e.id!==r.parents[0]?p=`M ${i.x} ${i.y} L ${a.x-h} ${i.y} ${l} ${a.x} ${i.y-f} L ${a.x} ${a.y}`:p=`M ${i.x} ${i.y} L ${i.x} ${a.y+h} ${u} ${i.x+f} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(p=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(p===void 0)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%f0)},"drawArrow"),eOe=s((t,e)=>{let r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{let i=e.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{JNe(r,e.get(a),i,e)})})},"drawArrows"),tOe=s((t,e)=>{let r=t.append("g");e.forEach((n,i)=>{let a=i%f0,o=As.get(n.name)?.pos;if(o===void 0)throw new Error(`Position not found for branch ${n.name}`);let l=r.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",tf),l.attr("y2",o),l.attr("class","branch branch"+a),yr==="TB"?(l.attr("y1",Ew),l.attr("x1",o),l.attr("y2",tf),l.attr("x2",o)):yr==="BT"&&(l.attr("y1",tf),l.attr("x1",o),l.attr("y2",Ew),l.attr("x2",o)),Cw.push(o);let u=n.name,h=noe(u),f=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(h);let m=h.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(Po?.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(Po?.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),yr==="TB"?(f.attr("x",o-m.width/2-10).attr("y",0),p.attr("transform","translate("+(o-m.width/2-5)+", 0)")):yr==="BT"?(f.attr("x",o-m.width/2-10).attr("y",tf),p.attr("transform","translate("+(o-m.width/2-5)+", "+tf+")")):f.attr("transform","translate(-19, "+(o-m.height/2)+")")})},"drawBranches"),rOe=s(function(t,e,r,n,i){return As.set(t,{pos:e,index:r}),e+=50+(i?40:0)+(yr==="TB"||yr==="BT"?n.width/2:0),e},"setBranchPosition"),nOe=s(function(t,e,r,n){if(zNe(),V.debug("in gitgraph renderer",t+` +`,"id:",e,r),!Po)throw new Error("GitGraph config not found");let i=Po.rotateCommitLabel??!1,a=n.db;U2=a.getCommits();let o=a.getBranchesAsObjArray();yr=a.getDirection();let l=Me(`[id="${e}"]`),u=0;o.forEach((h,f)=>{let d=noe(h.name),p=l.append("g"),m=p.insert("g").attr("class","branchLabel"),g=m.insert("g").attr("class","label branch-label");g.node()?.appendChild(d);let y=d.getBBox();u=rOe(h.name,u,f,y,i),g.remove(),m.remove(),p.remove()}),roe(l,U2,!1),Po.showBranches&&tOe(l,o),eOe(l,U2),roe(l,U2,!0),dt.insertTitle(l,"gitTitleText",Po.titleTopMargin??0,a.getDiagramTitle()),mC(void 0,l,Po.diagramPadding,Po.useMaxWidth)},"draw"),aoe={draw:nOe}});var iOe,ooe,loe=_(()=>{"use strict";iOe=s(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(e=>` + .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } + .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } + .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } + .label${e} { fill: ${t["git"+e]}; } + .arrow${e} { stroke: ${t["git"+e]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),ooe=iOe});var coe={};ur(coe,{diagram:()=>aOe});var aOe,uoe=_(()=>{"use strict";toe();II();soe();loe();aOe={parser:eoe,db:Tw,renderer:aoe,styles:ooe}});var NI,doe,poe=_(()=>{"use strict";NI=function(){var t=s(function(P,M,F,I){for(F=F||{},I=P.length;I--;F[P[I]]=M);return F},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],i=[1,28],a=[1,29],o=[1,30],l=[1,31],u=[1,32],h=[1,33],f=[1,34],d=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],v=[1,14],x=[1,15],b=[1,16],k=[1,19],A=[1,20],w=[1,21],T=[1,22],C=[1,23],E=[1,25],S=[1,35],R={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:s(function(M,F,I,O,z,N,U){var $=N.length-1;switch(z){case 1:return N[$-1];case 2:this.$=[];break;case 3:N[$-1].push(N[$]),this.$=N[$-1];break;case 4:case 5:this.$=N[$];break;case 6:case 7:this.$=[];break;case 8:O.setWeekday("monday");break;case 9:O.setWeekday("tuesday");break;case 10:O.setWeekday("wednesday");break;case 11:O.setWeekday("thursday");break;case 12:O.setWeekday("friday");break;case 13:O.setWeekday("saturday");break;case 14:O.setWeekday("sunday");break;case 15:O.setWeekend("friday");break;case 16:O.setWeekend("saturday");break;case 17:O.setDateFormat(N[$].substr(11)),this.$=N[$].substr(11);break;case 18:O.enableInclusiveEndDates(),this.$=N[$].substr(18);break;case 19:O.TopAxis(),this.$=N[$].substr(8);break;case 20:O.setAxisFormat(N[$].substr(11)),this.$=N[$].substr(11);break;case 21:O.setTickInterval(N[$].substr(13)),this.$=N[$].substr(13);break;case 22:O.setExcludes(N[$].substr(9)),this.$=N[$].substr(9);break;case 23:O.setIncludes(N[$].substr(9)),this.$=N[$].substr(9);break;case 24:O.setTodayMarker(N[$].substr(12)),this.$=N[$].substr(12);break;case 27:O.setDiagramTitle(N[$].substr(6)),this.$=N[$].substr(6);break;case 28:this.$=N[$].trim(),O.setAccTitle(this.$);break;case 29:case 30:this.$=N[$].trim(),O.setAccDescription(this.$);break;case 31:O.addSection(N[$].substr(8)),this.$=N[$].substr(8);break;case 33:O.addTask(N[$-1],N[$]),this.$="task";break;case 34:this.$=N[$-1],O.setClickEvent(N[$-1],N[$],null);break;case 35:this.$=N[$-2],O.setClickEvent(N[$-2],N[$-1],N[$]);break;case 36:this.$=N[$-2],O.setClickEvent(N[$-2],N[$-1],null),O.setLink(N[$-2],N[$]);break;case 37:this.$=N[$-3],O.setClickEvent(N[$-3],N[$-2],N[$-1]),O.setLink(N[$-3],N[$]);break;case 38:this.$=N[$-2],O.setClickEvent(N[$-2],N[$],null),O.setLink(N[$-2],N[$-1]);break;case 39:this.$=N[$-3],O.setClickEvent(N[$-3],N[$-1],N[$]),O.setLink(N[$-3],N[$-2]);break;case 40:this.$=N[$-1],O.setLink(N[$-1],N[$]);break;case 41:case 47:this.$=N[$-1]+" "+N[$];break;case 42:case 43:case 45:this.$=N[$-2]+" "+N[$-1]+" "+N[$];break;case 44:case 46:this.$=N[$-3]+" "+N[$-2]+" "+N[$-1]+" "+N[$];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:o,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:k,31:A,33:w,35:T,36:C,37:24,38:E,40:S},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:o,17:l,18:u,19:18,20:h,21:f,22:d,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:k,31:A,33:w,35:T,36:C,37:24,38:E,40:S},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:s(function(M,F){if(F.recoverable)this.trace(M);else{var I=new Error(M);throw I.hash=F,I}},"parseError"),parse:s(function(M){var F=this,I=[0],O=[],z=[null],N=[],U=this.table,$="",W=0,ee=0,te=0,ce=2,Z=1,fe=N.slice.call(arguments,1),ne=Object.create(this.lexer),H={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(H.yy[Q]=this.yy[Q]);ne.setInput(M,H.yy),H.yy.lexer=ne,H.yy.parser=this,typeof ne.yylloc>"u"&&(ne.yylloc={});var K=ne.yylloc;N.push(K);var re=ne.options&&ne.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ie(ue){I.length=I.length-2*ue,z.length=z.length-ue,N.length=N.length-ue}s(ie,"popStack");function ye(){var ue;return ue=O.pop()||ne.lex()||Z,typeof ue!="number"&&(ue instanceof Array&&(O=ue,ue=O.pop()),ue=F.symbols_[ue]||ue),ue}s(ye,"lex");for(var j,De,oe,Re,Pe,Se,Ue={},Oe,_e,he,q;;){if(oe=I[I.length-1],this.defaultActions[oe]?Re=this.defaultActions[oe]:((j===null||typeof j>"u")&&(j=ye()),Re=U[oe]&&U[oe][j]),typeof Re>"u"||!Re.length||!Re[0]){var se="";q=[];for(Oe in U[oe])this.terminals_[Oe]&&Oe>ce&&q.push("'"+this.terminals_[Oe]+"'");ne.showPosition?se="Parse error on line "+(W+1)+`: +`+ne.showPosition()+` +Expecting `+q.join(", ")+", got '"+(this.terminals_[j]||j)+"'":se="Parse error on line "+(W+1)+": Unexpected "+(j==Z?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(se,{text:ne.match,token:this.terminals_[j]||j,line:ne.yylineno,loc:K,expected:q})}if(Re[0]instanceof Array&&Re.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+j);switch(Re[0]){case 1:I.push(j),z.push(ne.yytext),N.push(ne.yylloc),I.push(Re[1]),j=null,De?(j=De,De=null):(ee=ne.yyleng,$=ne.yytext,W=ne.yylineno,K=ne.yylloc,te>0&&te--);break;case 2:if(_e=this.productions_[Re[1]][1],Ue.$=z[z.length-_e],Ue._$={first_line:N[N.length-(_e||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(_e||1)].first_column,last_column:N[N.length-1].last_column},re&&(Ue._$.range=[N[N.length-(_e||1)].range[0],N[N.length-1].range[1]]),Se=this.performAction.apply(Ue,[$,ee,W,H.yy,Re[1],z,N].concat(fe)),typeof Se<"u")return Se;_e&&(I=I.slice(0,-1*_e*2),z=z.slice(0,-1*_e),N=N.slice(0,-1*_e)),I.push(this.productions_[Re[1]][0]),z.push(Ue.$),N.push(Ue._$),he=U[I[I.length-2]][I[I.length-1]],I.push(he);break;case 3:return!0}}return!0},"parse")},D=function(){var P={EOF:1,parseError:s(function(F,I){if(this.yy.parser)this.yy.parser.parseError(F,I);else throw new Error(F)},"parseError"),setInput:s(function(M,F){return this.yy=F||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var F=M.match(/(?:\r\n?|\n).*/g);return F?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},"input"),unput:s(function(M){var F=M.length,I=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1&&(this.yylineno-=I.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===O.length?this.yylloc.first_column:0)+O[O.length-I.length].length-I[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(M){this.unput(this.match.slice(M))},"less"),pastInput:s(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var M=this.pastInput(),F=new Array(M.length+1).join("-");return M+this.upcomingInput()+` +`+F+"^"},"showPosition"),test_match:s(function(M,F){var I,O,z;if(this.options.backtrack_lexer&&(z={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(z.yylloc.range=this.yylloc.range.slice(0))),O=M[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],I=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),I)return I;if(this._backtrack){for(var N in z)this[N]=z[N];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,F,I,O;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),N=0;NF[0].length)){if(F=I,O=N,this.options.backtrack_lexer){if(M=this.test_match(I,z[N]),M!==!1)return M;if(this._backtrack){F=!1;continue}else return!1}else if(!this.options.flex)break}return F?(M=this.test_match(F,z[O]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var F=this.next();return F||this.lex()},"lex"),begin:s(function(F){this.conditionStack.push(F)},"begin"),popState:s(function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},"topState"),pushState:s(function(F){this.begin(F)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(F,I,O,z){var N=z;switch(O){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return P}();R.lexer=D;function L(){this.yy={}}return s(L,"Parser"),L.prototype=R,R.Parser=L,new L}();NI.parser=NI;doe=NI});var moe=is((OI,PI)=>{"use strict";(function(t,e){typeof OI=="object"&&typeof PI<"u"?PI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(OI,function(){"use strict";var t="day";return function(e,r,n){var i=s(function(l){return l.add(4-l.isoWeekday(),t)},"a"),a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),t);var u,h,f,d,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,f=(h?n.utc:n)().year(u).startOf("year"),d=4-f.isoWeekday(),f.isoWeekday()>4&&(d+=7),f.add(d,t));return p.diff(m,"week")+1},a.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var o=a.startOf;a.startOf=function(l,u){var h=this.$utils(),f=!!h.u(u)||u;return h.p(l)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(l,u)}}})});var goe=is((BI,FI)=>{"use strict";(function(t,e){typeof BI=="object"&&typeof FI<"u"?FI.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(BI,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,n=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},o=s(function(m){return(m=+m)+(m>68?1900:2e3)},"s"),l=s(function(m){return function(g){this[m]=+g}},"a"),u=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var y=g.match(/([+-]|\d\d)/g),v=60*y[1]+(+y[2]||0);return v===0?0:y[0]==="+"?-v:v}(m)}],h=s(function(m){var g=a[m];return g&&(g.indexOf?g:g.s.concat(g.f))},"h"),f=s(function(m,g){var y,v=a.meridiem;if(v){for(var x=1;x<=24;x+=1)if(m.indexOf(v(x,0,g))>-1){y=x>12;break}}else y=m===(g?"pm":"PM");return y},"u"),d={A:[i,function(m){this.afternoon=f(m,!1)}],a:[i,function(m){this.afternoon=f(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[r,l("day")],Do:[i,function(m){var g=a.ordinal,y=m.match(/\d+/);if(this.day=y[0],g)for(var v=1;v<=31;v+=1)g(v).replace(/\[|\]/g,"")===m&&(this.day=v)}],M:[n,l("month")],MM:[r,l("month")],MMM:[i,function(m){var g=h("months"),y=(h("monthsShort")||g.map(function(v){return v.slice(0,3)})).indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[i,function(m){var g=h("months").indexOf(m)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,l("year")],YY:[r,function(m){this.year=o(m)}],YYYY:[/\d{4}/,l("year")],Z:u,ZZ:u};function p(m){var g,y;g=m,y=a&&a.formats;for(var v=(m=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,E,S){var R=S&&S.toUpperCase();return E||y[S]||t[S]||y[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,L,P){return L||P.slice(1)})})).match(e),x=v.length,b=0;b-1)return new Date((F==="X"?1e3:1)*M);var O=p(F)(M),z=O.year,N=O.month,U=O.day,$=O.hours,W=O.minutes,ee=O.seconds,te=O.milliseconds,ce=O.zone,Z=new Date,fe=U||(z||N?1:Z.getDate()),ne=z||Z.getFullYear(),H=0;z&&!N||(H=N>0?N-1:Z.getMonth());var Q=$||0,K=W||0,re=ee||0,ie=te||0;return ce?new Date(Date.UTC(ne,H,fe,Q,K,re,ie+60*ce.offset*1e3)):I?new Date(Date.UTC(ne,H,fe,Q,K,re,ie)):new Date(ne,H,fe,Q,K,re,ie)}catch{return new Date("")}}(k,T,A),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),S&&k!=this.format(T)&&(this.$d=new Date("")),a={}}else if(T instanceof Array)for(var D=T.length,L=1;L<=D;L+=1){w[1]=T[L-1];var P=y.apply(this,w);if(P.isValid()){this.$d=P.$d,this.$L=P.$L,this.init();break}L===D&&(this.$d=new Date(""))}else x.call(this,b)}}})});var yoe=is((zI,$I)=>{"use strict";(function(t,e){typeof zI=="object"&&typeof $I<"u"?$I.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(zI,function(){"use strict";return function(t,e){var r=e.prototype,n=r.format;r.format=function(i){var a=this,o=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return o.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return o.ordinal(a.week(),"W");case"w":case"ww":return l.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}});return n.bind(this)(u)}}})});function Ioe(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",o=new RegExp(a);t[0].match(o)&&(e[i]=!0,t.shift(1),n=!0)})}var boe,ao,koe,woe,Toe,voe,_c,qI,WI,HI,W2,H2,YI,XI,Aw,gg,jI,Eoe,KI,Y2,QI,ZI,Lw,GI,cOe,uOe,hOe,fOe,dOe,pOe,mOe,gOe,yOe,vOe,xOe,bOe,kOe,wOe,TOe,EOe,COe,SOe,_Oe,AOe,LOe,DOe,ROe,Coe,MOe,IOe,NOe,Soe,OOe,VI,_oe,Aoe,Sw,mg,POe,BOe,UI,_w,Ri,Loe,FOe,d0,zOe,xoe,$Oe,Doe,GOe,Roe,VOe,UOe,Moe,Noe=_(()=>{"use strict";boe=ka(_p(),1),ao=ka(cb(),1),koe=ka(moe(),1),woe=ka(goe(),1),Toe=ka(yoe(),1);it();gt();pr();Ci();ao.default.extend(koe.default);ao.default.extend(woe.default);ao.default.extend(Toe.default);voe={friday:5,saturday:6},_c="",qI="",HI="",W2=[],H2=[],YI=new Map,XI=[],Aw=[],gg="",jI="",Eoe=["active","done","crit","milestone"],KI=[],Y2=!1,QI=!1,ZI="sunday",Lw="saturday",GI=0,cOe=s(function(){XI=[],Aw=[],gg="",KI=[],Sw=0,UI=void 0,_w=void 0,Ri=[],_c="",qI="",jI="",WI=void 0,HI="",W2=[],H2=[],Y2=!1,QI=!1,GI=0,YI=new Map,br(),ZI="sunday",Lw="saturday"},"clear"),uOe=s(function(t){qI=t},"setAxisFormat"),hOe=s(function(){return qI},"getAxisFormat"),fOe=s(function(t){WI=t},"setTickInterval"),dOe=s(function(){return WI},"getTickInterval"),pOe=s(function(t){HI=t},"setTodayMarker"),mOe=s(function(){return HI},"getTodayMarker"),gOe=s(function(t){_c=t},"setDateFormat"),yOe=s(function(){Y2=!0},"enableInclusiveEndDates"),vOe=s(function(){return Y2},"endDatesAreInclusive"),xOe=s(function(){QI=!0},"enableTopAxis"),bOe=s(function(){return QI},"topAxisEnabled"),kOe=s(function(t){jI=t},"setDisplayMode"),wOe=s(function(){return jI},"getDisplayMode"),TOe=s(function(){return _c},"getDateFormat"),EOe=s(function(t){W2=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),COe=s(function(){return W2},"getIncludes"),SOe=s(function(t){H2=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),_Oe=s(function(){return H2},"getExcludes"),AOe=s(function(){return YI},"getLinks"),LOe=s(function(t){gg=t,XI.push(t)},"addSection"),DOe=s(function(){return XI},"getSections"),ROe=s(function(){let t=xoe(),e=10,r=0;for(;!t&&r[\d\w- ]+)/.exec(r);if(i!==null){let o=null;for(let u of i.groups.ids.split(" ")){let h=d0(u);h!==void 0&&(!o||h.endTime>o.endTime)&&(o=h)}if(o)return o.endTime;let l=new Date;return l.setHours(0,0,0,0),l}let a=(0,ao.default)(r,e.trim(),!0);if(a.isValid())return a.toDate();{V.debug("Invalid date:"+r),V.debug("With date format:"+e.trim());let o=new Date(r);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+r);return o}},"getStartDate"),_oe=s(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Aoe=s(function(t,e,r,n=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let f=null;for(let p of a.groups.ids.split(" ")){let m=d0(p);m!==void 0&&(!f||m.startTime{window.open(r,"_self")}),YI.set(n,r))}),Doe(t,"clickable")},"setLink"),Doe=s(function(t,e){t.split(",").forEach(function(r){let n=d0(r);n!==void 0&&n.classes.push(e)})},"setClass"),GOe=s(function(t,e,r){if(le().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{dt.runFunc(e,...n)})},"setClickFun"),Roe=s(function(t,e){KI.push(function(){let r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){let r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),VOe=s(function(t,e,r){t.split(",").forEach(function(n){GOe(n,e,r)}),Doe(t,"clickable")},"setClickEvent"),UOe=s(function(t){KI.forEach(function(e){e(t)})},"bindFunctions"),Moe={getConfig:s(()=>le().gantt,"getConfig"),clear:cOe,setDateFormat:gOe,getDateFormat:TOe,enableInclusiveEndDates:yOe,endDatesAreInclusive:vOe,enableTopAxis:xOe,topAxisEnabled:bOe,setAxisFormat:uOe,getAxisFormat:hOe,setTickInterval:fOe,getTickInterval:dOe,setTodayMarker:pOe,getTodayMarker:mOe,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,setDisplayMode:kOe,getDisplayMode:wOe,setAccDescription:Vr,getAccDescription:Ur,addSection:LOe,getSections:DOe,getTasks:ROe,addTask:FOe,findTaskById:d0,addTaskOrg:zOe,setIncludes:EOe,getIncludes:COe,setExcludes:SOe,getExcludes:_Oe,setClickEvent:VOe,setLink:$Oe,getLinks:AOe,bindFunctions:UOe,parseDuration:_oe,isInvalidDate:Coe,setWeekday:MOe,getWeekday:IOe,setWeekend:NOe};s(Ioe,"getTaskTags")});var Dw,qOe,Ooe,WOe,zu,HOe,Poe,Boe=_(()=>{"use strict";Dw=ka(cb(),1);it();Xt();Qt();gt();Un();qOe=s(function(){V.debug("Something is calling, setConf, remove the call")},"setConf"),Ooe={monday:wh,tuesday:H4,wednesday:Y4,thursday:Ql,friday:X4,saturday:j4,sunday:nl},WOe=s((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((a,o)=>a.startTime-o.startTime||a.order-o.order),i=0;for(let a of n)for(let o=0;o=r[o]){r[o]=a.endTime,a.order=o+e,o>i&&(i=o);break}return i},"getMaxIntersections"),HOe=s(function(t,e,r,n){let i=le().gantt,a=le().securityLevel,o;a==="sandbox"&&(o=Me("#i"+e));let l=a==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body"),u=a==="sandbox"?o.nodes()[0].contentDocument:document,h=u.getElementById(e);zu=h.parentElement.offsetWidth,zu===void 0&&(zu=1200),i.useWidth!==void 0&&(zu=i.useWidth);let f=n.db.getTasks(),d=[];for(let E of f)d.push(E.type);d=C(d);let p={},m=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let E={};for(let R of f)E[R.section]===void 0?E[R.section]=[R]:E[R.section].push(R);let S=0;for(let R of Object.keys(E)){let D=WOe(E[R],S)+1;S+=D,m+=D*(i.barHeight+i.barGap),p[R]=D}}else{m+=f.length*(i.barHeight+i.barGap);for(let E of d)p[E]=f.filter(S=>S.type===E).length}h.setAttribute("viewBox","0 0 "+zu+" "+m);let g=l.select(`[id="${e}"]`),y=Z4().domain([n4(f,function(E){return E.startTime}),r4(f,function(E){return E.endTime})]).rangeRound([0,zu-i.leftPadding-i.rightPadding]);function v(E,S){let R=E.startTime,D=S.startTime,L=0;return R>D?L=1:RU.order))].map(U=>E.find($=>$.order===U));g.append("g").selectAll("rect").data(I).enter().append("rect").attr("x",0).attr("y",function(U,$){return $=U.order,$*S+R-2}).attr("width",function(){return M-i.rightPadding/2}).attr("height",S).attr("class",function(U){for(let[$,W]of d.entries())if(U.type===W)return"section section"+$%i.numberSectionStyles;return"section section0"});let O=g.append("g").selectAll("rect").data(E).enter(),z=n.db.getLinks();if(O.append("rect").attr("id",function(U){return U.id}).attr("rx",3).attr("ry",3).attr("x",function(U){return U.milestone?y(U.startTime)+D+.5*(y(U.endTime)-y(U.startTime))-.5*L:y(U.startTime)+D}).attr("y",function(U,$){return $=U.order,$*S+R}).attr("width",function(U){return U.milestone?L:y(U.renderEndTime||U.endTime)-y(U.startTime)}).attr("height",L).attr("transform-origin",function(U,$){return $=U.order,(y(U.startTime)+D+.5*(y(U.endTime)-y(U.startTime))).toString()+"px "+($*S+R+.5*L).toString()+"px"}).attr("class",function(U){let $="task",W="";U.classes.length>0&&(W=U.classes.join(" "));let ee=0;for(let[ce,Z]of d.entries())U.type===Z&&(ee=ce%i.numberSectionStyles);let te="";return U.active?U.crit?te+=" activeCrit":te=" active":U.done?U.crit?te=" doneCrit":te=" done":U.crit&&(te+=" crit"),te.length===0&&(te=" task"),U.milestone&&(te=" milestone "+te),te+=ee,te+=" "+W,$+te}),O.append("text").attr("id",function(U){return U.id+"-text"}).text(function(U){return U.task}).attr("font-size",i.fontSize).attr("x",function(U){let $=y(U.startTime),W=y(U.renderEndTime||U.endTime);U.milestone&&($+=.5*(y(U.endTime)-y(U.startTime))-.5*L),U.milestone&&(W=$+L);let ee=this.getBBox().width;return ee>W-$?W+ee+1.5*i.leftPadding>M?$+D-5:W+D+5:(W-$)/2+$+D}).attr("y",function(U,$){return $=U.order,$*S+i.barHeight/2+(i.fontSize/2-2)+R}).attr("text-height",L).attr("class",function(U){let $=y(U.startTime),W=y(U.endTime);U.milestone&&(W=$+L);let ee=this.getBBox().width,te="";U.classes.length>0&&(te=U.classes.join(" "));let ce=0;for(let[fe,ne]of d.entries())U.type===ne&&(ce=fe%i.numberSectionStyles);let Z="";return U.active&&(U.crit?Z="activeCritText"+ce:Z="activeText"+ce),U.done?U.crit?Z=Z+" doneCritText"+ce:Z=Z+" doneText"+ce:U.crit&&(Z=Z+" critText"+ce),U.milestone&&(Z+=" milestoneText"),ee>W-$?W+ee+1.5*i.leftPadding>M?te+" taskTextOutsideLeft taskTextOutside"+ce+" "+Z:te+" taskTextOutsideRight taskTextOutside"+ce+" "+Z+" width-"+ee:te+" taskText taskText"+ce+" "+Z+" width-"+ee}),le().securityLevel==="sandbox"){let U;U=Me("#i"+e);let $=U.nodes()[0].contentDocument;O.filter(function(W){return z.has(W.id)}).each(function(W){var ee=$.querySelector("#"+W.id),te=$.querySelector("#"+W.id+"-text");let ce=ee.parentNode;var Z=$.createElement("a");Z.setAttribute("xlink:href",z.get(W.id)),Z.setAttribute("target","_top"),ce.appendChild(Z),Z.appendChild(ee),Z.appendChild(te)})}}s(b,"drawRects");function k(E,S,R,D,L,P,M,F){if(M.length===0&&F.length===0)return;let I,O;for(let{startTime:ee,endTime:te}of P)(I===void 0||eeO)&&(O=te);if(!I||!O)return;if((0,Dw.default)(O).diff((0,Dw.default)(I),"year")>5){V.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let z=n.db.getDateFormat(),N=[],U=null,$=(0,Dw.default)(I);for(;$.valueOf()<=O;)n.db.isInvalidDate($,z,M,F)?U?U.end=$:U={start:$,end:$}:U&&(N.push(U),U=null),$=$.add(1,"d");g.append("g").selectAll("rect").data(N).enter().append("rect").attr("id",function(ee){return"exclude-"+ee.start.format("YYYY-MM-DD")}).attr("x",function(ee){return y(ee.start)+R}).attr("y",i.gridLineStartPadding).attr("width",function(ee){let te=ee.end.add(1,"day");return y(te)-y(ee.start)}).attr("height",L-S-i.gridLineStartPadding).attr("transform-origin",function(ee,te){return(y(ee.start)+R+.5*(y(ee.end)-y(ee.start))).toString()+"px "+(te*E+.5*L).toString()+"px"}).attr("class","exclude-range")}s(k,"drawExcludeDays");function A(E,S,R,D){let L=AC(y).tickSize(-D+S+i.gridLineStartPadding).tickFormat(nd(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d")),M=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if(M!==null){let F=M[1],I=M[2],O=n.db.getWeekday()||i.weekday;switch(I){case"millisecond":L.ticks(jl.every(F));break;case"second":L.ticks(Vs.every(F));break;case"minute":L.ticks(ou.every(F));break;case"hour":L.ticks(lu.every(F));break;case"day":L.ticks(vo.every(F));break;case"week":L.ticks(Ooe[O].every(F));break;case"month":L.ticks(cu.every(F));break}}if(g.append("g").attr("class","grid").attr("transform","translate("+E+", "+(D-50)+")").call(L).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let F=_C(y).tickSize(-D+S+i.gridLineStartPadding).tickFormat(nd(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(M!==null){let I=M[1],O=M[2],z=n.db.getWeekday()||i.weekday;switch(O){case"millisecond":F.ticks(jl.every(I));break;case"second":F.ticks(Vs.every(I));break;case"minute":F.ticks(ou.every(I));break;case"hour":F.ticks(lu.every(I));break;case"day":F.ticks(vo.every(I));break;case"week":F.ticks(Ooe[z].every(I));break;case"month":F.ticks(cu.every(I));break}}g.append("g").attr("class","grid").attr("transform","translate("+E+", "+S+")").call(F).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}s(A,"makeGrid");function w(E,S){let R=0,D=Object.keys(p).map(L=>[L,p[L]]);g.append("g").selectAll("text").data(D).enter().append(function(L){let P=L[0].split($e.lineBreakRegex),M=-(P.length-1)/2,F=u.createElementNS("http://www.w3.org/2000/svg","text");F.setAttribute("dy",M+"em");for(let[I,O]of P.entries()){let z=u.createElementNS("http://www.w3.org/2000/svg","tspan");z.setAttribute("alignment-baseline","central"),z.setAttribute("x","10"),I>0&&z.setAttribute("dy","1em"),z.textContent=O,F.appendChild(z)}return F}).attr("x",10).attr("y",function(L,P){if(P>0)for(let M=0;M{"use strict";YOe=s(t=>` + .mermaid-main-font { + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } +`,"getStyles"),Foe=YOe});var $oe={};ur($oe,{diagram:()=>XOe});var XOe,Goe=_(()=>{"use strict";poe();Noe();Boe();zoe();XOe={parser:doe,db:Moe,renderer:Poe,styles:Foe}});var qoe,Woe=_(()=>{"use strict";V2();it();qoe={parse:s(async t=>{let e=await Bu("info",t);V.debug(e)},"parse")}});var X2,JI=_(()=>{X2="11.0.2"});var JOe,ePe,Hoe,Yoe=_(()=>{"use strict";JI();JOe={version:X2},ePe=s(()=>JOe.version,"getVersion"),Hoe={getVersion:ePe}});var Bo,p0=_(()=>{"use strict";Xt();gt();Bo=s(t=>{let{securityLevel:e}=le(),r=Me("body");if(e==="sandbox"){let a=Me(`#i${t}`).node()?.contentDocument??document;r=Me(a.body)}return r.select(`#${t}`)},"selectSvgElement")});var tPe,Xoe,joe=_(()=>{"use strict";it();p0();Un();tPe=s((t,e,r)=>{V.debug(`rendering info diagram +`+t);let n=Bo(e);xr(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),Xoe={draw:tPe}});var Koe={};ur(Koe,{diagram:()=>rPe});var rPe,Qoe=_(()=>{"use strict";Woe();Yoe();joe();rPe={parser:qoe,db:Hoe,renderer:Xoe}});var ele,eN,Rw,tN,aPe,sPe,oPe,lPe,cPe,uPe,hPe,Mw,rN=_(()=>{"use strict";it();Ci();Pl();ele=dr.pie,eN={sections:new Map,showData:!1,config:ele},Rw=eN.sections,tN=eN.showData,aPe=structuredClone(ele),sPe=s(()=>structuredClone(aPe),"getConfig"),oPe=s(()=>{Rw=new Map,tN=eN.showData,br()},"clear"),lPe=s(({label:t,value:e})=>{Rw.has(t)||(Rw.set(t,e),V.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),cPe=s(()=>Rw,"getSections"),uPe=s(t=>{tN=t},"setShowData"),hPe=s(()=>tN,"getShowData"),Mw={getConfig:sPe,clear:oPe,setDiagramTitle:an,getDiagramTitle:Qr,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,addSection:lPe,getSections:cPe,setShowData:uPe,getShowData:hPe}});var fPe,tle,rle=_(()=>{"use strict";V2();it();kw();rN();fPe=s((t,e)=>{dg(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),tle={parse:s(async t=>{let e=await Bu("pie",t);V.debug(e),fPe(e,Mw)},"parse")}});var dPe,nle,ile=_(()=>{"use strict";dPe=s(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),nle=dPe});var pPe,mPe,ale,sle=_(()=>{"use strict";Xt();gt();it();p0();Un();pr();pPe=s(t=>{let e=[...t.entries()].map(n=>({label:n[0],value:n[1]})).sort((n,i)=>i.value-n.value);return i3().value(n=>n.value)(e)},"createPieArcs"),mPe=s((t,e,r,n)=>{V.debug(`rendering pie chart +`+t);let i=n.db,a=le(),o=ms(i.getConfig(),a.pie),l=40,u=18,h=4,f=450,d=f,p=Bo(e),m=p.append("g");m.attr("transform","translate("+d/2+","+f/2+")");let{themeVariables:g}=a,[y]=nc(g.pieOuterStrokeWidth);y??=2;let v=o.textPosition,x=Math.min(d,f)/2-l,b=sl().innerRadius(0).outerRadius(x),k=sl().innerRadius(x*v).outerRadius(x*v);m.append("circle").attr("cx",0).attr("cy",0).attr("r",x+y/2).attr("class","pieOuterCircle");let A=i.getSections(),w=pPe(A),T=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],C=au(T);m.selectAll("mySlices").data(w).enter().append("path").attr("d",b).attr("fill",L=>C(L.data.label)).attr("class","pieCircle");let E=0;A.forEach(L=>{E+=L}),m.selectAll("mySlices").data(w).enter().append("text").text(L=>(L.data.value/E*100).toFixed(0)+"%").attr("transform",L=>"translate("+k.centroid(L)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(f-50)/2).attr("class","pieTitleText");let S=m.selectAll(".legend").data(C.domain()).enter().append("g").attr("class","legend").attr("transform",(L,P)=>{let M=u+h,F=M*C.domain().length/2,I=12*u,O=P*M-F;return"translate("+I+","+O+")"});S.append("rect").attr("width",u).attr("height",u).style("fill",C).style("stroke",C),S.data(w).append("text").attr("x",u+h).attr("y",u-h).text(L=>{let{label:P,value:M}=L.data;return i.getShowData()?`${P} [${M}]`:P});let R=Math.max(...S.selectAll("text").nodes().map(L=>L?.getBoundingClientRect().width??0)),D=d+l+u+h+R;p.attr("viewBox",`0 0 ${D} ${f}`),xr(p,f,D,o.useMaxWidth)},"draw"),ale={draw:mPe}});var ole={};ur(ole,{diagram:()=>gPe});var gPe,lle=_(()=>{"use strict";rle();rN();ile();sle();gPe={parser:tle,db:Mw,renderer:ale,styles:nle}});var nN,hle,fle=_(()=>{"use strict";nN=function(){var t=s(function(Ie,Ne,Be,ze){for(Be=Be||{},ze=Ie.length;ze--;Be[Ie[ze]]=Ne);return Be},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],h=[2,36],f=[1,37],d=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],v=[1,14],x=[1,23],b=[1,18],k=[1,19],A=[1,20],w=[1,21],T=[1,22],C=[1,24],E=[1,25],S=[1,26],R=[1,27],D=[1,28],L=[1,29],P=[1,32],M=[1,33],F=[1,34],I=[1,39],O=[1,40],z=[1,42],N=[1,44],U=[1,62],$=[1,61],W=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,65],te=[1,66],ce=[1,67],Z=[1,68],fe=[1,69],ne=[1,70],H=[1,71],Q=[1,72],K=[1,73],re=[1,74],ie=[1,75],ye=[1,76],j=[4,5,6,7,8,9,10,11,12,13,14,15,18],De=[1,90],oe=[1,91],Re=[1,92],Pe=[1,99],Se=[1,93],Ue=[1,96],Oe=[1,94],_e=[1,95],he=[1,97],q=[1,98],se=[1,102],ue=[10,55,56,57],X=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ae={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:s(function(Ne,Be,ze,qe,Fe,we,Je){var We=we.length-1;switch(Fe){case 23:this.$=we[We];break;case 24:this.$=we[We-1]+""+we[We];break;case 26:this.$=we[We-1]+we[We];break;case 27:this.$=[we[We].trim()];break;case 28:we[We-2].push(we[We].trim()),this.$=we[We-2];break;case 29:this.$=we[We-4],qe.addClass(we[We-2],we[We]);break;case 37:this.$=[];break;case 42:this.$=we[We].trim(),qe.setDiagramTitle(this.$);break;case 43:this.$=we[We].trim(),qe.setAccTitle(this.$);break;case 44:case 45:this.$=we[We].trim(),qe.setAccDescription(this.$);break;case 46:qe.addSection(we[We].substr(8)),this.$=we[We].substr(8);break;case 47:qe.addPoint(we[We-3],"",we[We-1],we[We],[]);break;case 48:qe.addPoint(we[We-4],we[We-3],we[We-1],we[We],[]);break;case 49:qe.addPoint(we[We-4],"",we[We-2],we[We-1],we[We]);break;case 50:qe.addPoint(we[We-5],we[We-4],we[We-2],we[We-1],we[We]);break;case 51:qe.setXAxisLeftText(we[We-2]),qe.setXAxisRightText(we[We]);break;case 52:we[We-1].text+=" \u27F6 ",qe.setXAxisLeftText(we[We-1]);break;case 53:qe.setXAxisLeftText(we[We]);break;case 54:qe.setYAxisBottomText(we[We-2]),qe.setYAxisTopText(we[We]);break;case 55:we[We-1].text+=" \u27F6 ",qe.setYAxisBottomText(we[We-1]);break;case 56:qe.setYAxisBottomText(we[We]);break;case 57:qe.setQuadrant1Text(we[We]);break;case 58:qe.setQuadrant2Text(we[We]);break;case 59:qe.setQuadrant3Text(we[We]);break;case 60:qe.setQuadrant4Text(we[We]);break;case 64:this.$={text:we[We],type:"text"};break;case 65:this.$={text:we[We-1].text+""+we[We],type:we[We-1].type};break;case 66:this.$={text:we[We],type:"text"};break;case 67:this.$={text:we[We],type:"markdown"};break;case 68:this.$=we[We];break;case 69:this.$=we[We-1]+""+we[We];break}},"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:i,57:a},{18:e,26:9,27:2,28:r,55:n,56:i,57:a},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:f,5:d,10:p,12:m,13:g,14:y,18:v,25:x,35:b,37:k,39:A,41:w,42:T,48:C,50:E,51:S,52:R,53:D,54:L,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),t(o,[2,34]),{27:45,55:n,56:i,57:a},t(u,[2,37]),t(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:f,5:d,10:p,12:m,13:g,14:y,18:v,25:x,35:b,37:k,39:A,41:w,42:T,48:C,50:E,51:S,52:R,53:D,54:L,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),t(u,[2,39]),t(u,[2,40]),t(u,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(u,[2,45]),t(u,[2,46]),{18:[1,50]},{4:f,5:d,10:p,12:m,13:g,14:y,43:51,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:52,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:53,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:54,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:55,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,10:p,12:m,13:g,14:y,43:56,58:31,60:P,61:M,63:F,64:I,65:O,66:z,67:N},{4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,44:[1,57],47:[1,58],58:60,59:59,63:F,64:I,65:O,66:z,67:N},t(W,[2,64]),t(W,[2,66]),t(W,[2,67]),t(W,[2,70]),t(W,[2,71]),t(W,[2,72]),t(W,[2,73]),t(W,[2,74]),t(W,[2,75]),t(W,[2,76]),t(W,[2,77]),t(W,[2,78]),t(W,[2,79]),t(W,[2,80]),t(o,[2,35]),t(u,[2,38]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),{3:64,4:ee,5:te,6:ce,7:Z,8:fe,9:ne,10:H,11:Q,12:K,13:re,14:ie,15:ye,21:63},t(u,[2,53],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,49:[1,77],63:F,64:I,65:O,66:z,67:N}),t(u,[2,56],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,49:[1,78],63:F,64:I,65:O,66:z,67:N}),t(u,[2,57],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,58],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,59],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,60],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),{45:[1,79]},{44:[1,80]},t(W,[2,65]),t(W,[2,81]),t(W,[2,82]),t(W,[2,83]),{3:82,4:ee,5:te,6:ce,7:Z,8:fe,9:ne,10:H,11:Q,12:K,13:re,14:ie,15:ye,18:[1,81]},t(j,[2,23]),t(j,[2,1]),t(j,[2,2]),t(j,[2,3]),t(j,[2,4]),t(j,[2,5]),t(j,[2,6]),t(j,[2,7]),t(j,[2,8]),t(j,[2,9]),t(j,[2,10]),t(j,[2,11]),t(j,[2,12]),t(u,[2,52],{58:31,43:83,4:f,5:d,10:p,12:m,13:g,14:y,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),t(u,[2,55],{58:31,43:84,4:f,5:d,10:p,12:m,13:g,14:y,60:P,61:M,63:F,64:I,65:O,66:z,67:N}),{46:[1,85]},{45:[1,86]},{4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,16:89,17:Oe,18:_e,19:he,20:q,22:88,23:87},t(j,[2,24]),t(u,[2,51],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,54],{59:59,58:60,4:f,5:d,8:U,10:p,12:m,13:g,14:y,18:$,63:F,64:I,65:O,66:z,67:N}),t(u,[2,47],{22:88,16:89,23:100,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q}),{46:[1,101]},t(u,[2,29],{10:se}),t(ue,[2,27],{16:103,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q}),t(X,[2,25]),t(X,[2,13]),t(X,[2,14]),t(X,[2,15]),t(X,[2,16]),t(X,[2,17]),t(X,[2,18]),t(X,[2,19]),t(X,[2,20]),t(X,[2,21]),t(X,[2,22]),t(u,[2,49],{10:se}),t(u,[2,48],{22:88,16:89,23:104,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q}),{4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,16:89,17:Oe,18:_e,19:he,20:q,22:105},t(X,[2,26]),t(u,[2,50],{10:se}),t(ue,[2,28],{16:103,4:De,5:oe,6:Re,8:Pe,11:Se,13:Ue,17:Oe,18:_e,19:he,20:q})],defaultActions:{8:[2,30],9:[2,31]},parseError:s(function(Ne,Be){if(Be.recoverable)this.trace(Ne);else{var ze=new Error(Ne);throw ze.hash=Be,ze}},"parseError"),parse:s(function(Ne){var Be=this,ze=[0],qe=[],Fe=[null],we=[],Je=this.table,We="",or=0,Cr=0,Ut=0,ar=2,ut=1,Rt=we.slice.call(arguments,1),Qe=Object.create(this.lexer),Dt={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Dt.yy[qt]=this.yy[qt]);Qe.setInput(Ne,Dt.yy),Dt.yy.lexer=Qe,Dt.yy.parser=this,typeof Qe.yylloc>"u"&&(Qe.yylloc={});var yt=Qe.yylloc;we.push(yt);var Et=Qe.options&&Qe.options.ranges;typeof Dt.yy.parseError=="function"?this.parseError=Dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(En){ze.length=ze.length-2*En,Fe.length=Fe.length-En,we.length=we.length-En}s(pt,"popStack");function Wt(){var En;return En=qe.pop()||Qe.lex()||ut,typeof En!="number"&&(En instanceof Array&&(qe=En,En=qe.pop()),En=Be.symbols_[En]||En),En}s(Wt,"lex");for(var ot,fr,vt,Bt,Sr,zi,rr={},Vn,Tn,Ki,ci;;){if(vt=ze[ze.length-1],this.defaultActions[vt]?Bt=this.defaultActions[vt]:((ot===null||typeof ot>"u")&&(ot=Wt()),Bt=Je[vt]&&Je[vt][ot]),typeof Bt>"u"||!Bt.length||!Bt[0]){var Pa="";ci=[];for(Vn in Je[vt])this.terminals_[Vn]&&Vn>ar&&ci.push("'"+this.terminals_[Vn]+"'");Qe.showPosition?Pa="Parse error on line "+(or+1)+`: +`+Qe.showPosition()+` +Expecting `+ci.join(", ")+", got '"+(this.terminals_[ot]||ot)+"'":Pa="Parse error on line "+(or+1)+": Unexpected "+(ot==ut?"end of input":"'"+(this.terminals_[ot]||ot)+"'"),this.parseError(Pa,{text:Qe.match,token:this.terminals_[ot]||ot,line:Qe.yylineno,loc:yt,expected:ci})}if(Bt[0]instanceof Array&&Bt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+vt+", token: "+ot);switch(Bt[0]){case 1:ze.push(ot),Fe.push(Qe.yytext),we.push(Qe.yylloc),ze.push(Bt[1]),ot=null,fr?(ot=fr,fr=null):(Cr=Qe.yyleng,We=Qe.yytext,or=Qe.yylineno,yt=Qe.yylloc,Ut>0&&Ut--);break;case 2:if(Tn=this.productions_[Bt[1]][1],rr.$=Fe[Fe.length-Tn],rr._$={first_line:we[we.length-(Tn||1)].first_line,last_line:we[we.length-1].last_line,first_column:we[we.length-(Tn||1)].first_column,last_column:we[we.length-1].last_column},Et&&(rr._$.range=[we[we.length-(Tn||1)].range[0],we[we.length-1].range[1]]),zi=this.performAction.apply(rr,[We,Cr,or,Dt.yy,Bt[1],Fe,we].concat(Rt)),typeof zi<"u")return zi;Tn&&(ze=ze.slice(0,-1*Tn*2),Fe=Fe.slice(0,-1*Tn),we=we.slice(0,-1*Tn)),ze.push(this.productions_[Bt[1]][0]),Fe.push(rr.$),we.push(rr._$),Ki=Je[ze[ze.length-2]][ze[ze.length-1]],ze.push(Ki);break;case 3:return!0}}return!0},"parse")},pe=function(){var Ie={EOF:1,parseError:s(function(Be,ze){if(this.yy.parser)this.yy.parser.parseError(Be,ze);else throw new Error(Be)},"parseError"),setInput:s(function(Ne,Be){return this.yy=Be||this.yy||{},this._input=Ne,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Ne=this._input[0];this.yytext+=Ne,this.yyleng++,this.offset++,this.match+=Ne,this.matched+=Ne;var Be=Ne.match(/(?:\r\n?|\n).*/g);return Be?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ne},"input"),unput:s(function(Ne){var Be=Ne.length,ze=Ne.split(/(?:\r\n?|\n)/g);this._input=Ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Be),this.offset-=Be;var qe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ze.length-1&&(this.yylineno-=ze.length-1);var Fe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ze?(ze.length===qe.length?this.yylloc.first_column:0)+qe[qe.length-ze.length].length-ze[0].length:this.yylloc.first_column-Be},this.options.ranges&&(this.yylloc.range=[Fe[0],Fe[0]+this.yyleng-Be]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Ne){this.unput(this.match.slice(Ne))},"less"),pastInput:s(function(){var Ne=this.matched.substr(0,this.matched.length-this.match.length);return(Ne.length>20?"...":"")+Ne.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Ne=this.match;return Ne.length<20&&(Ne+=this._input.substr(0,20-Ne.length)),(Ne.substr(0,20)+(Ne.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Ne=this.pastInput(),Be=new Array(Ne.length+1).join("-");return Ne+this.upcomingInput()+` +`+Be+"^"},"showPosition"),test_match:s(function(Ne,Be){var ze,qe,Fe;if(this.options.backtrack_lexer&&(Fe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Fe.yylloc.range=this.yylloc.range.slice(0))),qe=Ne[0].match(/(?:\r\n?|\n).*/g),qe&&(this.yylineno+=qe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:qe?qe[qe.length-1].length-qe[qe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ne[0].length},this.yytext+=Ne[0],this.match+=Ne[0],this.matches=Ne,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ne[0].length),this.matched+=Ne[0],ze=this.performAction.call(this,this.yy,this,Be,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ze)return ze;if(this._backtrack){for(var we in Fe)this[we]=Fe[we];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ne,Be,ze,qe;this._more||(this.yytext="",this.match="");for(var Fe=this._currentRules(),we=0;weBe[0].length)){if(Be=ze,qe=we,this.options.backtrack_lexer){if(Ne=this.test_match(ze,Fe[we]),Ne!==!1)return Ne;if(this._backtrack){Be=!1;continue}else return!1}else if(!this.options.flex)break}return Be?(Ne=this.test_match(Be,Fe[qe]),Ne!==!1?Ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var Be=this.next();return Be||this.lex()},"lex"),begin:s(function(Be){this.conditionStack.push(Be)},"begin"),popState:s(function(){var Be=this.conditionStack.length-1;return Be>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(Be){return Be=this.conditionStack.length-1-Math.abs(Be||0),Be>=0?this.conditionStack[Be]:"INITIAL"},"topState"),pushState:s(function(Be){this.begin(Be)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(Be,ze,qe,Fe){var we=Fe;switch(qe){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return Ie}();ae.lexer=pe;function de(){this.yy={}}return s(de,"Parser"),de.prototype=ae,ae.Parser=de,new de}();nN.parser=nN;hle=nN});var Ja,Iw,dle=_(()=>{"use strict";Xt();Pl();it();vb();Ja=j0(),Iw=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{s(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:dr.quadrantChart?.chartWidth||500,chartWidth:dr.quadrantChart?.chartHeight||500,titlePadding:dr.quadrantChart?.titlePadding||10,titleFontSize:dr.quadrantChart?.titleFontSize||20,quadrantPadding:dr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:dr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:dr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:dr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:dr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:dr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:dr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:dr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:dr.quadrantChart?.pointLabelFontSize||12,pointRadius:dr.quadrantChart?.pointRadius||5,xAxisPosition:dr.quadrantChart?.xAxisPosition||"top",yAxisPosition:dr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:dr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:dr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Ja.quadrant1Fill,quadrant2Fill:Ja.quadrant2Fill,quadrant3Fill:Ja.quadrant3Fill,quadrant4Fill:Ja.quadrant4Fill,quadrant1TextFill:Ja.quadrant1TextFill,quadrant2TextFill:Ja.quadrant2TextFill,quadrant3TextFill:Ja.quadrant3TextFill,quadrant4TextFill:Ja.quadrant4TextFill,quadrantPointFill:Ja.quadrantPointFill,quadrantPointTextFill:Ja.quadrantPointTextFill,quadrantXAxisTextFill:Ja.quadrantXAxisTextFill,quadrantYAxisTextFill:Ja.quadrantYAxisTextFill,quadrantTitleFill:Ja.quadrantTitleFill,quadrantInternalBorderStrokeFill:Ja.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Ja.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,V.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,r){this.classes.set(e,r)}setConfig(e){V.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){V.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,r,n,i){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,o={top:e==="top"&&r?a:0,bottom:e==="bottom"&&r?a:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,f={top:i?h:0},d=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+o.top+f.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-o.top-o.bottom-f.top,y=m/2,v=g/2;return{xAxisSpace:o,yAxisSpace:u,titleSpace:f,quadrantSpace:{quadrantLeft:d,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:v}}}getAxisLabels(e,r,n,i){let{quadrantSpace:a,titleSpace:o}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:f,quadrantTop:d,quadrantWidth:p}=a,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+f+(m?f/2:0),y:e==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+d+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:d+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(e){let{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:a,quadrantTop:o}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:o,width:a,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:o,width:a,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i,y:o+n,width:a,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:o+n,width:a,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(e){let{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:o}=r,l=rl().domain([0,1]).range([i,o+i]),u=rl().domain([0,1]).range([n+a,a]);return this.data.points.map(f=>{let d=this.classes.get(f.className);return d&&(f={...d,...f}),{x:l(f.x),y:u(f.y),fill:f.color??this.themeConfig.quadrantPointFill,radius:f.radius??this.config.pointRadius,text:{text:f.text,fill:this.themeConfig.quadrantPointTextFill,x:l(f.x),y:u(f.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:f.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:f.strokeWidth??"0px"}})}getBorders(e){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u,x2:o+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o+h,y1:u+r,x2:o+h,y2:u+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u+a,x2:o+h+r,y2:u+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o,y1:u+r,x2:o,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+l,y1:u+r,x2:o+l,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+r,y1:u+i,x2:o+h-r,y2:u+i}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(i,e,r,n);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(i,e,r,a),borderLines:this.getBorders(a),title:this.getTitle(n)}}}});function iN(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function ple(t){return!/^\d+$/.test(t)}function mle(t){return!/^\d+px$/.test(t)}var m0,gle=_(()=>{"use strict";m0=class extends Error{static{s(this,"InvalidStyleError")}constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};s(iN,"validateHexCode");s(ple,"validateNumber");s(mle,"validateSizeInPixels")});function $u(t){return $r(t.trim(),xPe)}function bPe(t){fa.setData({quadrant1Text:$u(t.text)})}function kPe(t){fa.setData({quadrant2Text:$u(t.text)})}function wPe(t){fa.setData({quadrant3Text:$u(t.text)})}function TPe(t){fa.setData({quadrant4Text:$u(t.text)})}function EPe(t){fa.setData({xAxisLeftText:$u(t.text)})}function CPe(t){fa.setData({xAxisRightText:$u(t.text)})}function SPe(t){fa.setData({yAxisTopText:$u(t.text)})}function _Pe(t){fa.setData({yAxisBottomText:$u(t.text)})}function aN(t){let e={};for(let r of t){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(ple(i))throw new m0(n,i,"number");e.radius=parseInt(i)}else if(n==="color"){if(iN(i))throw new m0(n,i,"hex code");e.color=i}else if(n==="stroke-color"){if(iN(i))throw new m0(n,i,"hex code");e.strokeColor=i}else if(n==="stroke-width"){if(mle(i))throw new m0(n,i,"number of pixels (eg. 10px)");e.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return e}function APe(t,e,r,n,i){let a=aN(i);fa.addPoints([{x:r,y:n,text:$u(t.text),className:e,...a}])}function LPe(t,e){fa.addClass(t,aN(e))}function DPe(t){fa.setConfig({chartWidth:t})}function RPe(t){fa.setConfig({chartHeight:t})}function MPe(){let t=le(),{themeVariables:e,quadrantChart:r}=t;return r&&fa.setConfig(r),fa.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),fa.setData({titleText:Qr()}),fa.build()}var xPe,fa,IPe,yle,vle=_(()=>{"use strict";gt();Qt();Ci();dle();gle();xPe=le();s($u,"textSanitizer");fa=new Iw;s(bPe,"setQuadrant1Text");s(kPe,"setQuadrant2Text");s(wPe,"setQuadrant3Text");s(TPe,"setQuadrant4Text");s(EPe,"setXAxisLeftText");s(CPe,"setXAxisRightText");s(SPe,"setYAxisTopText");s(_Pe,"setYAxisBottomText");s(aN,"parseStyles");s(APe,"addPoint");s(LPe,"addClass");s(DPe,"setWidth");s(RPe,"setHeight");s(MPe,"getQuadrantData");IPe=s(function(){fa.clear(),br()},"clear"),yle={setWidth:DPe,setHeight:RPe,setQuadrant1Text:bPe,setQuadrant2Text:kPe,setQuadrant3Text:wPe,setQuadrant4Text:TPe,setXAxisLeftText:EPe,setXAxisRightText:CPe,setYAxisTopText:SPe,setYAxisBottomText:_Pe,parseStyles:aN,addPoint:APe,addClass:LPe,getQuadrantData:MPe,clear:IPe,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,getAccDescription:Ur,setAccDescription:Vr}});var NPe,xle,ble=_(()=>{"use strict";Xt();gt();it();Un();NPe=s((t,e,r,n)=>{function i(E){return E==="top"?"hanging":"middle"}s(i,"getDominantBaseLine");function a(E){return E==="left"?"start":"middle"}s(a,"getTextAnchor");function o(E){return`translate(${E.x}, ${E.y}) rotate(${E.rotation||0})`}s(o,"getTransformation");let l=le();V.debug(`Rendering quadrant chart +`+t);let u=l.securityLevel,h;u==="sandbox"&&(h=Me("#i"+e));let d=(u==="sandbox"?Me(h.nodes()[0].contentDocument.body):Me("body")).select(`[id="${e}"]`),p=d.append("g").attr("class","main"),m=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;xr(d,g,m,l.quadrantChart?.useMaxWidth??!0),d.attr("viewBox","0 0 "+m+" "+g),n.db.setHeight(g),n.db.setWidth(m);let y=n.db.getQuadrantData(),v=p.append("g").attr("class","quadrants"),x=p.append("g").attr("class","border"),b=p.append("g").attr("class","data-points"),k=p.append("g").attr("class","labels"),A=p.append("g").attr("class","title");y.title&&A.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",i(y.title.horizontalPos)).attr("text-anchor",a(y.title.verticalPos)).attr("transform",o(y.title)).text(y.title.text),y.borderLines&&x.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",E=>E.x1).attr("y1",E=>E.y1).attr("x2",E=>E.x2).attr("y2",E=>E.y2).style("stroke",E=>E.strokeFill).style("stroke-width",E=>E.strokeWidth);let w=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");w.append("rect").attr("x",E=>E.x).attr("y",E=>E.y).attr("width",E=>E.width).attr("height",E=>E.height).attr("fill",E=>E.fill),w.append("text").attr("x",0).attr("y",0).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>i(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>o(E.text)).text(E=>E.text.text),k.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(E=>E.text).attr("fill",E=>E.fill).attr("font-size",E=>E.fontSize).attr("dominant-baseline",E=>i(E.horizontalPos)).attr("text-anchor",E=>a(E.verticalPos)).attr("transform",E=>o(E));let C=b.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");C.append("circle").attr("cx",E=>E.x).attr("cy",E=>E.y).attr("r",E=>E.radius).attr("fill",E=>E.fill).attr("stroke",E=>E.strokeColor).attr("stroke-width",E=>E.strokeWidth),C.append("text").attr("x",0).attr("y",0).text(E=>E.text.text).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>i(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>o(E.text))},"draw"),xle={draw:NPe}});var kle={};ur(kle,{diagram:()=>OPe});var OPe,wle=_(()=>{"use strict";fle();vle();ble();OPe={parser:hle,db:yle,renderer:xle,styles:s(()=>"","styles")}});var sN,Cle,Sle=_(()=>{"use strict";sN=function(){var t=s(function(F,I,O,z){for(O=O||{},z=F.length;z--;O[F[z]]=I);return O},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],u=[1,25],h=[1,26],f=[1,28],d=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],v=[1,34],x=[1,35],b=[1,36],k=[1,37],A=[1,43],w=[1,42],T=[1,47],C=[1,50],E=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:s(function(I,O,z,N,U,$,W){var ee=$.length-1;switch(U){case 5:N.setOrientation($[ee]);break;case 9:N.setDiagramTitle($[ee].text.trim());break;case 12:N.setLineData({text:"",type:"text"},$[ee]);break;case 13:N.setLineData($[ee-1],$[ee]);break;case 14:N.setBarData({text:"",type:"text"},$[ee]);break;case 15:N.setBarData($[ee-1],$[ee]);break;case 16:this.$=$[ee].trim(),N.setAccTitle(this.$);break;case 17:case 18:this.$=$[ee].trim(),N.setAccDescription(this.$);break;case 19:this.$=$[ee-1];break;case 20:this.$=[Number($[ee-2]),...$[ee]];break;case 21:this.$=[Number($[ee])];break;case 22:N.setXAxisTitle($[ee]);break;case 23:N.setXAxisTitle($[ee-1]);break;case 24:N.setXAxisTitle({type:"text",text:""});break;case 25:N.setXAxisBand($[ee]);break;case 26:N.setXAxisRangeData(Number($[ee-2]),Number($[ee]));break;case 27:this.$=$[ee-1];break;case 28:this.$=[$[ee-2],...$[ee]];break;case 29:this.$=[$[ee]];break;case 30:N.setYAxisTitle($[ee]);break;case 31:N.setYAxisTitle($[ee-1]);break;case 32:N.setYAxisTitle({type:"text",text:""});break;case 33:N.setYAxisRangeData(Number($[ee-2]),Number($[ee]));break;case 37:this.$={text:$[ee],type:"text"};break;case 38:this.$={text:$[ee],type:"text"};break;case 39:this.$={text:$[ee],type:"markdown"};break;case 40:this.$=$[ee];break;case 41:this.$=$[ee-1]+""+$[ee];break}},"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,34:i,35:a,36:o}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,34:i,35:a,36:o}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:i,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,34:i,35:a,36:o}),{1:[2,3]},t(l,[2,5]),t(e,[2,7],{4:22,34:i,35:a,36:o}),{11:23,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:39,13:38,24:A,27:w,29:40,30:41,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:45,15:44,27:T,33:46,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:49,17:48,24:C,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{11:52,17:51,24:C,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},{20:[1,53]},{22:[1,54]},t(E,[2,18]),{1:[2,2]},t(E,[2,8]),t(E,[2,9]),t(S,[2,37],{40:55,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k}),t(S,[2,38]),t(S,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(E,[2,10]),t(E,[2,22],{30:41,29:56,24:A,27:w}),t(E,[2,24]),t(E,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},t(E,[2,11]),t(E,[2,30],{33:60,27:T}),t(E,[2,32]),{31:[1,61]},t(E,[2,12]),{17:62,24:C},{25:63,27:D},t(E,[2,14]),{17:65,24:C},t(E,[2,16]),t(E,[2,17]),t(R,[2,41]),t(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(E,[2,31]),{27:[1,69]},t(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(E,[2,15]),t(E,[2,26]),t(E,[2,27]),{11:59,32:72,37:24,38:u,39:h,40:27,41:f,42:d,43:p,44:m,45:g,46:y,47:v,48:x,49:b,50:k},t(E,[2,33]),t(E,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:s(function(I,O){if(O.recoverable)this.trace(I);else{var z=new Error(I);throw z.hash=O,z}},"parseError"),parse:s(function(I){var O=this,z=[0],N=[],U=[null],$=[],W=this.table,ee="",te=0,ce=0,Z=0,fe=2,ne=1,H=$.slice.call(arguments,1),Q=Object.create(this.lexer),K={yy:{}};for(var re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,re)&&(K.yy[re]=this.yy[re]);Q.setInput(I,K.yy),K.yy.lexer=Q,K.yy.parser=this,typeof Q.yylloc>"u"&&(Q.yylloc={});var ie=Q.yylloc;$.push(ie);var ye=Q.options&&Q.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(ae){z.length=z.length-2*ae,U.length=U.length-ae,$.length=$.length-ae}s(j,"popStack");function De(){var ae;return ae=N.pop()||Q.lex()||ne,typeof ae!="number"&&(ae instanceof Array&&(N=ae,ae=N.pop()),ae=O.symbols_[ae]||ae),ae}s(De,"lex");for(var oe,Re,Pe,Se,Ue,Oe,_e={},he,q,se,ue;;){if(Pe=z[z.length-1],this.defaultActions[Pe]?Se=this.defaultActions[Pe]:((oe===null||typeof oe>"u")&&(oe=De()),Se=W[Pe]&&W[Pe][oe]),typeof Se>"u"||!Se.length||!Se[0]){var X="";ue=[];for(he in W[Pe])this.terminals_[he]&&he>fe&&ue.push("'"+this.terminals_[he]+"'");Q.showPosition?X="Parse error on line "+(te+1)+`: +`+Q.showPosition()+` +Expecting `+ue.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'":X="Parse error on line "+(te+1)+": Unexpected "+(oe==ne?"end of input":"'"+(this.terminals_[oe]||oe)+"'"),this.parseError(X,{text:Q.match,token:this.terminals_[oe]||oe,line:Q.yylineno,loc:ie,expected:ue})}if(Se[0]instanceof Array&&Se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Pe+", token: "+oe);switch(Se[0]){case 1:z.push(oe),U.push(Q.yytext),$.push(Q.yylloc),z.push(Se[1]),oe=null,Re?(oe=Re,Re=null):(ce=Q.yyleng,ee=Q.yytext,te=Q.yylineno,ie=Q.yylloc,Z>0&&Z--);break;case 2:if(q=this.productions_[Se[1]][1],_e.$=U[U.length-q],_e._$={first_line:$[$.length-(q||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(q||1)].first_column,last_column:$[$.length-1].last_column},ye&&(_e._$.range=[$[$.length-(q||1)].range[0],$[$.length-1].range[1]]),Oe=this.performAction.apply(_e,[ee,ce,te,K.yy,Se[1],U,$].concat(H)),typeof Oe<"u")return Oe;q&&(z=z.slice(0,-1*q*2),U=U.slice(0,-1*q),$=$.slice(0,-1*q)),z.push(this.productions_[Se[1]][0]),U.push(_e.$),$.push(_e._$),se=W[z[z.length-2]][z[z.length-1]],z.push(se);break;case 3:return!0}}return!0},"parse")},P=function(){var F={EOF:1,parseError:s(function(O,z){if(this.yy.parser)this.yy.parser.parseError(O,z);else throw new Error(O)},"parseError"),setInput:s(function(I,O){return this.yy=O||this.yy||{},this._input=I,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var O=I.match(/(?:\r\n?|\n).*/g);return O?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:s(function(I){var O=I.length,z=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var N=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var U=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===N.length?this.yylloc.first_column:0)+N[N.length-z.length].length-z[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(I){this.unput(this.match.slice(I))},"less"),pastInput:s(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var I=this.pastInput(),O=new Array(I.length+1).join("-");return I+this.upcomingInput()+` +`+O+"^"},"showPosition"),test_match:s(function(I,O){var z,N,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),N=I[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(I[0].length),this.matched+=I[0],z=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var $ in U)this[$]=U[$];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,O,z,N;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),$=0;$O[0].length)){if(O=z,N=$,this.options.backtrack_lexer){if(I=this.test_match(z,U[$]),I!==!1)return I;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(I=this.test_match(O,U[N]),I!==!1?I:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var O=this.next();return O||this.lex()},"lex"),begin:s(function(O){this.conditionStack.push(O)},"begin"),popState:s(function(){var O=this.conditionStack.length-1;return O>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:s(function(O){this.begin(O)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(O,z,N,U){var $=U;switch(N){case 0:break;case 1:break;case 2:return this.popState(),34;break;case 3:return this.popState(),34;break;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";break;case 17:return this.pushState("axis_data"),"Y_AXIS";break;case 18:return this.pushState("axis_band_data"),24;break;case 19:return 31;case 20:return this.pushState("data"),16;break;case 21:return this.pushState("data"),18;break;case 22:return this.pushState("data_inner"),24;break;case 23:return 27;case 24:return this.popState(),26;break;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return F}();L.lexer=P;function M(){this.yy={}}return s(M,"Parser"),M.prototype=L,L.Parser=M,new M}();sN.parser=sN;Cle=sN});function oN(t){return t.type==="bar"}function Nw(t){return t.type==="band"}function yg(t){return t.type==="linear"}var Ow=_(()=>{"use strict";s(oN,"isBarPlot");s(Nw,"isBandAxisData");s(yg,"isLinearAxisData")});var vg,lN=_(()=>{"use strict";ic();vg=class{constructor(e){this.parentGroup=e}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((a,o)=>Math.max(o.length,a),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of e){let o=KY(i,1,a),l=o?o.width:a.length*r,u=o?o.height:r;n.width=Math.max(n.width,l),n.height=Math.max(n.height,u)}return i.remove(),n}}});var xg,cN=_(()=>{"use strict";xg=class{constructor(e,r,n,i){this.axisConfig=e;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.axisPosition="left";this.showTitle=!1;this.showLabel=!1;this.showTick=!1;this.showAxisLine=!1;this.outerPadding=0;this.titleTextHeight=0;this.labelTextHeight=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{s(this,"BaseAxis")}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.width;this.outerPadding=Math.min(n.width/2,i);let a=n.height+this.axisConfig.labelPadding*2;this.labelTextHeight=n.height,a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*e.height;this.outerPadding=Math.min(n.height/2,i);let a=n.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}}});var Pw,_le=_(()=>{"use strict";Xt();it();cN();Pw=class extends xg{static{s(this,"BandAxis")}constructor(e,r,n,i,a){super(e,i,a,r),this.categories=n,this.scale=xp().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=xp().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),V.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}});var Bw,Ale=_(()=>{"use strict";Xt();cN();Bw=class extends xg{static{s(this,"LinearAxis")}constructor(e,r,n,i,a){super(e,i,a,r),this.domain=n,this.scale=rl().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=rl().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function uN(t,e,r,n){let i=new vg(n);return Nw(t)?new Pw(e,r,t.categories,t.title,i):new Bw(e,r,[t.min,t.max],t.title,i)}var Lle=_(()=>{"use strict";Ow();lN();_le();Ale();s(uN,"getAxis")});function Dle(t,e,r,n){let i=new vg(n);return new hN(i,t,e,r)}var hN,Rle=_(()=>{"use strict";lN();hN=class{constructor(e,r,n,i){this.textDimensionCalculator=e;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};s(Dle,"getChartTitleComponent")});var Fw,Mle=_(()=>{"use strict";Xt();Fw=class{constructor(e,r,n,i,a){this.plotData=e;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=a}static{s(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),r;return this.orientation==="horizontal"?r=ra().y(n=>n[0]).x(n=>n[1])(e):r=ra().x(n=>n[0]).y(n=>n[1])(e),r?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}});var zw,Ile=_(()=>{"use strict";zw=class{constructor(e,r,n,i,a,o){this.barData=e;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=a;this.plotIndex=o}static{s(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:this.boundingRect.x,y:a[0]-i,height:n,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(a=>({x:a[0]-i,y:a[1],width:n,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Nle(t,e,r){return new fN(t,e,r)}var fN,Ole=_(()=>{"use strict";Mle();Ile();fN=class{constructor(e,r,n){this.chartConfig=e;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}setAxes(e,r){this.xAxis=e,this.yAxis=r}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new Fw(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break;case"bar":{let i=new zw(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...i.getDrawableElement())}break}return e}};s(Nle,"getPlotComponent")});var $w,Ple=_(()=>{"use strict";Lle();Rle();Ole();Ow();$w=class{constructor(e,r,n,i){this.chartConfig=e;this.chartData=r;this.componentStore={title:Dle(e,r,n,i),plot:Nle(e,r,n),xAxis:uN(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:uN(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:o});e-=l.width,r-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=l.height,r-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=l.width,e-=l.width,e>0&&(a+=e,e=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+o}),this.componentStore.yAxis.setRange([i,i+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(u=>oN(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=0,o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:o,height:l});e-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=u.width,i=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=u.height,a=n+u.height,e>0&&(o+=e,e=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:o,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.yAxis.setRange([i,i+o]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([a,a+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(h=>oN(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e}}});var Gw,Ble=_(()=>{"use strict";Ple();Gw=class{static{s(this,"XYChartBuilder")}static build(e,r,n,i){return new $w(e,r,n,i).getDrawableElement()}}});function zle(){let t=j0(),e=_r();return ms(t.xyChart,e.themeVariables.xyChart)}function $le(){let t=_r();return ms(dr.xyChart,t.xyChart)}function Gle(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function mN(t){let e=_r();return $r(t.trim(),e)}function zPe(t){Fle=t}function $Pe(t){t==="horizontal"?K2.chartOrientation="horizontal":K2.chartOrientation="vertical"}function GPe(t){Jr.xAxis.title=mN(t.text)}function Vle(t,e){Jr.xAxis={type:"linear",title:Jr.xAxis.title,min:t,max:e},Vw=!0}function VPe(t){Jr.xAxis={type:"band",title:Jr.xAxis.title,categories:t.map(e=>mN(e.text))},Vw=!0}function UPe(t){Jr.yAxis.title=mN(t.text)}function qPe(t,e){Jr.yAxis={type:"linear",title:Jr.yAxis.title,min:t,max:e},pN=!0}function WPe(t){let e=Math.min(...t),r=Math.max(...t),n=yg(Jr.yAxis)?Jr.yAxis.min:1/0,i=yg(Jr.yAxis)?Jr.yAxis.max:-1/0;Jr.yAxis={type:"linear",title:Jr.yAxis.title,min:Math.min(n,e),max:Math.max(i,r)}}function Ule(t){let e=[];if(t.length===0)return e;if(!Vw){let r=yg(Jr.xAxis)?Jr.xAxis.min:1/0,n=yg(Jr.xAxis)?Jr.xAxis.max:-1/0;Vle(Math.min(r,1),Math.max(n,t.length))}if(pN||WPe(t),Nw(Jr.xAxis)&&(e=Jr.xAxis.categories.map((r,n)=>[r,t[n]])),yg(Jr.xAxis)){let r=Jr.xAxis.min,n=Jr.xAxis.max,i=(n-r)/(t.length-1),a=[];for(let o=r;o<=n;o+=i)a.push(`${o}`);e=a.map((o,l)=>[o,t[l]])}return e}function qle(t){return dN[t===0?0:t%dN.length]}function HPe(t,e){let r=Ule(e);Jr.plots.push({type:"line",strokeFill:qle(j2),strokeWidth:2,data:r}),j2++}function YPe(t,e){let r=Ule(e);Jr.plots.push({type:"bar",fill:qle(j2),data:r}),j2++}function XPe(){if(Jr.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Jr.title=Qr(),Gw.build(K2,Jr,Q2,Fle)}function jPe(){return Q2}function KPe(){return K2}var j2,Fle,K2,Q2,Jr,dN,Vw,pN,QPe,Wle,Hle=_(()=>{"use strict";zs();Pl();vb();pr();Qt();Ci();Ble();Ow();j2=0,K2=$le(),Q2=zle(),Jr=Gle(),dN=Q2.plotColorPalette.split(",").map(t=>t.trim()),Vw=!1,pN=!1;s(zle,"getChartDefaultThemeConfig");s($le,"getChartDefaultConfig");s(Gle,"getChartDefaultData");s(mN,"textSanitizer");s(zPe,"setTmpSVGG");s($Pe,"setOrientation");s(GPe,"setXAxisTitle");s(Vle,"setXAxisRangeData");s(VPe,"setXAxisBand");s(UPe,"setYAxisTitle");s(qPe,"setYAxisRangeData");s(WPe,"setYAxisRangeFromPlotData");s(Ule,"transformDataWithoutCategory");s(qle,"getPlotColorFromPalette");s(HPe,"setLineData");s(YPe,"setBarData");s(XPe,"getDrawableElem");s(jPe,"getChartThemeConfig");s(KPe,"getChartConfig");QPe=s(function(){br(),j2=0,K2=$le(),Jr=Gle(),Q2=zle(),dN=Q2.plotColorPalette.split(",").map(t=>t.trim()),Vw=!1,pN=!1},"clear"),Wle={getDrawableElem:XPe,clear:QPe,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,getAccDescription:Ur,setAccDescription:Vr,setOrientation:$Pe,setXAxisTitle:GPe,setXAxisRangeData:Vle,setXAxisBand:VPe,setYAxisTitle:UPe,setYAxisRangeData:qPe,setLineData:HPe,setBarData:YPe,setTmpSVGG:zPe,getChartThemeConfig:jPe,getChartConfig:KPe}});var ZPe,Yle,Xle=_(()=>{"use strict";it();p0();Un();ZPe=s((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),o=i.getChartConfig();function l(v){return v==="top"?"text-before-edge":"middle"}s(l,"getDominantBaseLine");function u(v){return v==="left"?"start":v==="right"?"end":"middle"}s(u,"getTextAnchor");function h(v){return`translate(${v.x}, ${v.y}) rotate(${v.rotation||0})`}s(h,"getTextTransformation"),V.debug(`Rendering xychart chart +`+t);let f=Bo(e),d=f.append("g").attr("class","main"),p=d.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");xr(f,o.height,o.width,!0),f.attr("viewBox",`0 0 ${o.width} ${o.height}`),p.attr("fill",a.backgroundColor),i.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let m=i.getDrawableElem(),g={};function y(v){let x=d,b="";for(let[k]of v.entries()){let A=d;k>0&&g[b]&&(A=g[b]),b+=v[k],x=g[b],x||(x=g[b]=A.append("g").attr("class",v[k]))}return x}s(y,"getGroup");for(let v of m){if(v.data.length===0)continue;let x=y(v.groupTexts);switch(v.type){case"rect":x.selectAll("rect").data(v.data).enter().append("rect").attr("x",b=>b.x).attr("y",b=>b.y).attr("width",b=>b.width).attr("height",b=>b.height).attr("fill",b=>b.fill).attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break;case"text":x.selectAll("text").data(v.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",b=>b.fill).attr("font-size",b=>b.fontSize).attr("dominant-baseline",b=>l(b.verticalPos)).attr("text-anchor",b=>u(b.horizontalPos)).attr("transform",b=>h(b)).text(b=>b.text);break;case"path":x.selectAll("path").data(v.data).enter().append("path").attr("d",b=>b.path).attr("fill",b=>b.fill?b.fill:"none").attr("stroke",b=>b.strokeFill).attr("stroke-width",b=>b.strokeWidth);break}}},"draw"),Yle={draw:ZPe}});var jle={};ur(jle,{diagram:()=>JPe});var JPe,Kle=_(()=>{"use strict";Sle();Hle();Xle();JPe={parser:Cle,db:Wle,renderer:Yle}});var gN,Jle,ece=_(()=>{"use strict";gN=function(){var t=s(function(ce,Z,fe,ne){for(fe=fe||{},ne=ce.length;ne--;fe[ce[ne]]=Z);return fe},"o"),e=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],o=[1,18],l=[2,7],u=[1,22],h=[1,23],f=[1,24],d=[1,25],p=[1,26],m=[1,27],g=[1,20],y=[1,28],v=[1,29],x=[62,63],b=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],k=[1,47],A=[1,48],w=[1,49],T=[1,50],C=[1,51],E=[1,52],S=[1,53],R=[53,54],D=[1,64],L=[1,60],P=[1,61],M=[1,62],F=[1,63],I=[1,65],O=[1,69],z=[1,70],N=[1,67],U=[1,68],$=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],W={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:s(function(Z,fe,ne,H,Q,K,re){var ie=K.length-1;switch(Q){case 4:this.$=K[ie].trim(),H.setAccTitle(this.$);break;case 5:case 6:this.$=K[ie].trim(),H.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:H.addRequirement(K[ie-3],K[ie-4]);break;case 14:H.setNewReqId(K[ie-2]);break;case 15:H.setNewReqText(K[ie-2]);break;case 16:H.setNewReqRisk(K[ie-2]);break;case 17:H.setNewReqVerifyMethod(K[ie-2]);break;case 20:this.$=H.RequirementType.REQUIREMENT;break;case 21:this.$=H.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=H.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=H.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=H.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=H.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=H.RiskLevel.LOW_RISK;break;case 27:this.$=H.RiskLevel.MED_RISK;break;case 28:this.$=H.RiskLevel.HIGH_RISK;break;case 29:this.$=H.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=H.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=H.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=H.VerifyType.VERIFY_TEST;break;case 33:H.addElement(K[ie-3]);break;case 34:H.setNewElementType(K[ie-2]);break;case 35:H.setNewElementDocRef(K[ie-2]);break;case 38:H.addRelationship(K[ie-2],K[ie],K[ie-4]);break;case 39:H.addRelationship(K[ie-2],K[ie-4],K[ie]);break;case 40:this.$=H.Relationships.CONTAINS;break;case 41:this.$=H.Relationships.COPIES;break;case 42:this.$=H.Relationships.DERIVES;break;case 43:this.$=H.Relationships.SATISFIES;break;case 44:this.$=H.Relationships.VERIFIES;break;case 45:this.$=H.Relationships.REFINES;break;case 46:this.$=H.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:o,7:13,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:o,7:31,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:32,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:33,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:34,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{4:17,5:o,7:35,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:19,23:21,31:u,32:h,33:f,34:d,35:p,36:m,44:g,62:y,63:v},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},t(x,[2,20]),t(x,[2,21]),t(x,[2,22]),t(x,[2,23]),t(x,[2,24]),t(x,[2,25]),t(b,[2,49]),t(b,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:k,56:A,57:w,58:T,59:C,60:E,61:S},{52:54,55:k,56:A,57:w,58:T,59:C,60:E,61:S},{5:[1,55]},{5:[1,56]},{53:[1,57]},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),{54:[1,58]},{5:D,20:59,21:L,24:P,26:M,28:F,30:I},{5:O,30:z,46:66,47:N,49:U},{23:71,62:y,63:v},{23:72,62:y,63:v},t($,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:L,24:P,26:M,28:F,30:I},t($,[2,19]),t($,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:z,46:80,47:N,49:U},t($,[2,37]),t($,[2,38]),t($,[2,39]),{23:81,62:y,63:v},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},t($,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},t($,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:L,24:P,26:M,28:F,30:I},{5:D,20:107,21:L,24:P,26:M,28:F,30:I},{5:D,20:108,21:L,24:P,26:M,28:F,30:I},{5:D,20:109,21:L,24:P,26:M,28:F,30:I},{5:O,30:z,46:110,47:N,49:U},{5:O,30:z,46:111,47:N,49:U},t($,[2,14]),t($,[2,15]),t($,[2,16]),t($,[2,17]),t($,[2,34]),t($,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:s(function(Z,fe){if(fe.recoverable)this.trace(Z);else{var ne=new Error(Z);throw ne.hash=fe,ne}},"parseError"),parse:s(function(Z){var fe=this,ne=[0],H=[],Q=[null],K=[],re=this.table,ie="",ye=0,j=0,De=0,oe=2,Re=1,Pe=K.slice.call(arguments,1),Se=Object.create(this.lexer),Ue={yy:{}};for(var Oe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Oe)&&(Ue.yy[Oe]=this.yy[Oe]);Se.setInput(Z,Ue.yy),Ue.yy.lexer=Se,Ue.yy.parser=this,typeof Se.yylloc>"u"&&(Se.yylloc={});var _e=Se.yylloc;K.push(_e);var he=Se.options&&Se.options.ranges;typeof Ue.yy.parseError=="function"?this.parseError=Ue.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(Je){ne.length=ne.length-2*Je,Q.length=Q.length-Je,K.length=K.length-Je}s(q,"popStack");function se(){var Je;return Je=H.pop()||Se.lex()||Re,typeof Je!="number"&&(Je instanceof Array&&(H=Je,Je=H.pop()),Je=fe.symbols_[Je]||Je),Je}s(se,"lex");for(var ue,X,ae,pe,de,Ie,Ne={},Be,ze,qe,Fe;;){if(ae=ne[ne.length-1],this.defaultActions[ae]?pe=this.defaultActions[ae]:((ue===null||typeof ue>"u")&&(ue=se()),pe=re[ae]&&re[ae][ue]),typeof pe>"u"||!pe.length||!pe[0]){var we="";Fe=[];for(Be in re[ae])this.terminals_[Be]&&Be>oe&&Fe.push("'"+this.terminals_[Be]+"'");Se.showPosition?we="Parse error on line "+(ye+1)+`: +`+Se.showPosition()+` +Expecting `+Fe.join(", ")+", got '"+(this.terminals_[ue]||ue)+"'":we="Parse error on line "+(ye+1)+": Unexpected "+(ue==Re?"end of input":"'"+(this.terminals_[ue]||ue)+"'"),this.parseError(we,{text:Se.match,token:this.terminals_[ue]||ue,line:Se.yylineno,loc:_e,expected:Fe})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+ue);switch(pe[0]){case 1:ne.push(ue),Q.push(Se.yytext),K.push(Se.yylloc),ne.push(pe[1]),ue=null,X?(ue=X,X=null):(j=Se.yyleng,ie=Se.yytext,ye=Se.yylineno,_e=Se.yylloc,De>0&&De--);break;case 2:if(ze=this.productions_[pe[1]][1],Ne.$=Q[Q.length-ze],Ne._$={first_line:K[K.length-(ze||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(ze||1)].first_column,last_column:K[K.length-1].last_column},he&&(Ne._$.range=[K[K.length-(ze||1)].range[0],K[K.length-1].range[1]]),Ie=this.performAction.apply(Ne,[ie,j,ye,Ue.yy,pe[1],Q,K].concat(Pe)),typeof Ie<"u")return Ie;ze&&(ne=ne.slice(0,-1*ze*2),Q=Q.slice(0,-1*ze),K=K.slice(0,-1*ze)),ne.push(this.productions_[pe[1]][0]),Q.push(Ne.$),K.push(Ne._$),qe=re[ne[ne.length-2]][ne[ne.length-1]],ne.push(qe);break;case 3:return!0}}return!0},"parse")},ee=function(){var ce={EOF:1,parseError:s(function(fe,ne){if(this.yy.parser)this.yy.parser.parseError(fe,ne);else throw new Error(fe)},"parseError"),setInput:s(function(Z,fe){return this.yy=fe||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var fe=Z.match(/(?:\r\n?|\n).*/g);return fe?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},"input"),unput:s(function(Z){var fe=Z.length,ne=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-fe),this.offset-=fe;var H=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ne.length-1&&(this.yylineno-=ne.length-1);var Q=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ne?(ne.length===H.length?this.yylloc.first_column:0)+H[H.length-ne.length].length-ne[0].length:this.yylloc.first_column-fe},this.options.ranges&&(this.yylloc.range=[Q[0],Q[0]+this.yyleng-fe]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Z){this.unput(this.match.slice(Z))},"less"),pastInput:s(function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Z=this.pastInput(),fe=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+` +`+fe+"^"},"showPosition"),test_match:s(function(Z,fe){var ne,H,Q;if(this.options.backtrack_lexer&&(Q={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Q.yylloc.range=this.yylloc.range.slice(0))),H=Z[0].match(/(?:\r\n?|\n).*/g),H&&(this.yylineno+=H.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:H?H[H.length-1].length-H[H.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],ne=this.performAction.call(this,this.yy,this,fe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ne)return ne;if(this._backtrack){for(var K in Q)this[K]=Q[K];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,fe,ne,H;this._more||(this.yytext="",this.match="");for(var Q=this._currentRules(),K=0;Kfe[0].length)){if(fe=ne,H=K,this.options.backtrack_lexer){if(Z=this.test_match(ne,Q[K]),Z!==!1)return Z;if(this._backtrack){fe=!1;continue}else return!1}else if(!this.options.flex)break}return fe?(Z=this.test_match(fe,Q[H]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var fe=this.next();return fe||this.lex()},"lex"),begin:s(function(fe){this.conditionStack.push(fe)},"begin"),popState:s(function(){var fe=this.conditionStack.length-1;return fe>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(fe){return fe=this.conditionStack.length-1-Math.abs(fe||0),fe>=0?this.conditionStack[fe]:"INITIAL"},"topState"),pushState:s(function(fe){this.begin(fe)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(fe,ne,H,Q){var K=Q;switch(H){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return ne.yytext=ne.yytext.trim(),62;break}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return ce}();W.lexer=ee;function te(){this.yy={}}return s(te,"Parser"),te.prototype=W,W.Parser=te,new te}();gN.parser=gN;Jle=gN});var yN,Ds,Z2,af,J2,nBe,iBe,aBe,sBe,oBe,lBe,cBe,uBe,hBe,fBe,dBe,pBe,mBe,gBe,yBe,vBe,xBe,tce,rce=_(()=>{"use strict";gt();it();Ci();yN=[],Ds={},Z2=new Map,af={},J2=new Map,nBe={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},iBe={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},aBe={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},sBe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},oBe=s((t,e)=>(Z2.has(t)||Z2.set(t,{name:t,type:e,id:Ds.id,text:Ds.text,risk:Ds.risk,verifyMethod:Ds.verifyMethod}),Ds={},Z2.get(t)),"addRequirement"),lBe=s(()=>Z2,"getRequirements"),cBe=s(t=>{Ds!==void 0&&(Ds.id=t)},"setNewReqId"),uBe=s(t=>{Ds!==void 0&&(Ds.text=t)},"setNewReqText"),hBe=s(t=>{Ds!==void 0&&(Ds.risk=t)},"setNewReqRisk"),fBe=s(t=>{Ds!==void 0&&(Ds.verifyMethod=t)},"setNewReqVerifyMethod"),dBe=s(t=>(J2.has(t)||(J2.set(t,{name:t,type:af.type,docRef:af.docRef}),V.info("Added new requirement: ",t)),af={},J2.get(t)),"addElement"),pBe=s(()=>J2,"getElements"),mBe=s(t=>{af!==void 0&&(af.type=t)},"setNewElementType"),gBe=s(t=>{af!==void 0&&(af.docRef=t)},"setNewElementDocRef"),yBe=s((t,e,r)=>{yN.push({type:t,src:e,dst:r})},"addRelationship"),vBe=s(()=>yN,"getRelationships"),xBe=s(()=>{yN=[],Ds={},Z2=new Map,af={},J2=new Map,br()},"clear"),tce={RequirementType:nBe,RiskLevel:iBe,VerifyType:aBe,Relationships:sBe,getConfig:s(()=>le().req,"getConfig"),addRequirement:oBe,getRequirements:lBe,setNewReqId:cBe,setNewReqText:uBe,setNewReqRisk:hBe,setNewReqVerifyMethod:fBe,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,addElement:dBe,getElements:pBe,setNewElementType:mBe,setNewElementDocRef:gBe,addRelationship:yBe,getRelationships:vBe,clear:xBe}});var bBe,nce,ice=_(()=>{"use strict";bBe=s(t=>` + + marker { + fill: ${t.relationColor}; + stroke: ${t.relationColor}; + } + + marker.cross { + stroke: ${t.lineColor}; + } + + svg { + font-family: ${t.fontFamily}; + font-size: ${t.fontSize}; + } + + .reqBox { + fill: ${t.requirementBackground}; + fill-opacity: 1.0; + stroke: ${t.requirementBorderColor}; + stroke-width: ${t.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${t.requirementTextColor}; + } + .reqLabelBox { + fill: ${t.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${t.requirementBorderColor}; + stroke-width: ${t.requirementBorderSize}; + } + .relationshipLine { + stroke: ${t.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${t.relationLabelColor}; + } + +`,"getStyles"),nce=bBe});var vN,kBe,xN,ace=_(()=>{"use strict";vN={CONTAINS:"contains",ARROW:"arrow"},kBe=s((t,e)=>{let r=t.append("defs").append("marker").attr("id",vN.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",vN.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0 + L${e.line_height},${e.line_height/2} + M${e.line_height},${e.line_height/2} + L0,${e.line_height}`).attr("stroke-width",1)},"insertLineEndings"),xN={ReqMarkers:vN,insertLineEndings:kBe}});var Qn,sce,oce,lce,cce,wBe,TBe,EBe,CBe,SBe,_Be,bg,ABe,uce,hce=_(()=>{"use strict";Xt();Dd();la();gt();it();Un();Qt();ace();Qn={},sce=0,oce=s((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Qn.rect_min_width+"px").attr("height",Qn.rect_min_height+"px"),"newRectNode"),lce=s((t,e,r)=>{let n=Qn.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",Qn.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(h=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",Qn.rect_min_width/2).attr("dy",0).text(h):i.append("tspan").attr("text-anchor","middle").attr("x",Qn.rect_min_width/2).attr("dy",Qn.line_height*.75).text(h),a++});let o=1.5*Qn.rect_padding,l=a*Qn.line_height*.75,u=o+l;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Qn.rect_min_width).attr("y1",u).attr("y2",u),{titleNode:i,y:u}},"newTitleNode"),cce=s((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Qn.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,o=30,l=[];return r.forEach(u=>{let h=u.length;for(;h>o&&a<3;){let f=u.substring(0,o);u=u.substring(o,u.length),h=u.length,l[l.length]=f,a++}if(a==3){let f=l[l.length-1];l[l.length-1]=f.substring(0,f.length-4)+"..."}else l[l.length]=u;a=0}),l.forEach(u=>{i.append("tspan").attr("x",Qn.rect_padding).attr("dy",Qn.line_height).text(u)}),i},"newBodyNode"),wBe=s((t,e,r,n)=>{let i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),o="rel"+sce;sce++;let u=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-u.width/2).attr("y",a.y-u.height/2).attr("width",u.width).attr("height",u.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),TBe=s(function(t,e,r,n,i){let a=r.edge(bg(e.src),bg(e.dst)),o=ra().x(function(u){return u.x}).y(function(u){return u.y}),l=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",o(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?l.attr("marker-start","url("+$e.getUrl(Qn.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(l.attr("stroke-dasharray","10,7"),l.attr("marker-end","url("+$e.getUrl(Qn.arrowMarkerAbsolute)+"#"+xN.ReqMarkers.ARROW+"_line_ending)")),wBe(t,l,Qn,`<<${e.type}>>`)},"drawRelationshipFromLayout"),EBe=s((t,e,r)=>{t.forEach((n,i)=>{i=bg(i),V.info("Added new requirement: ",i);let a=r.append("g").attr("id",i),o="req-"+i,l=oce(a,o),u=[],h=lce(a,i+"_title",[`<<${n.type}>>`,`${n.name}`]);u.push(h.titleNode);let f=cce(a,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],h.y);u.push(f);let d=l.node().getBBox();e.setNode(i,{width:d.width,height:d.height,shape:"rect",id:i})})},"drawReqs"),CBe=s((t,e,r)=>{t.forEach((n,i)=>{let a=bg(i),o=r.append("g").attr("id",a),l="element-"+a,u=oce(o,l),h=[],f=lce(o,l+"_title",["<>",`${i}`]);h.push(f.titleNode);let d=cce(o,l+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],f.y);h.push(d);let p=u.node().getBBox();e.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})})},"drawElements"),SBe=s((t,e)=>(t.forEach(function(r){let n=bg(r.src),i=bg(r.dst);e.setEdge(n,i,{relationship:r})}),t),"addRelationships"),_Be=s(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},"adjustEntities"),bg=s(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),ABe=s((t,e,r,n)=>{Qn=le().requirement;let i=Qn.securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let l=(i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body")).select(`[id='${e}']`);xN.insertLineEndings(l,Qn);let u=new ir({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Qn.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),h=n.db.getRequirements(),f=n.db.getElements(),d=n.db.getRelationships();EBe(h,u,l),CBe(f,u,l),SBe(d,u),eo(u),_Be(l,u),d.forEach(function(v){TBe(l,v,u,e,n)});let p=Qn.rect_padding,m=l.node().getBBox(),g=m.width+p*2,y=m.height+p*2;xr(l,y,g,Qn.useMaxWidth),l.attr("viewBox",`${m.x-p} ${m.y-p} ${g} ${y}`)},"draw"),uce={draw:ABe}});var fce={};ur(fce,{diagram:()=>LBe});var LBe,dce=_(()=>{"use strict";ece();rce();ice();hce();LBe={parser:Jle,db:tce,renderer:uce,styles:nce}});var bN,gce,yce=_(()=>{"use strict";bN=function(){var t=s(function(H,Q,K,re){for(K=K||{},re=H.length;re--;K[H[re]]=Q);return K},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],l=[1,13],u=[1,14],h=[1,16],f=[1,17],d=[1,18],p=[1,24],m=[1,25],g=[1,26],y=[1,27],v=[1,28],x=[1,29],b=[1,30],k=[1,31],A=[1,32],w=[1,33],T=[1,34],C=[1,35],E=[1,36],S=[1,37],R=[1,38],D=[1,39],L=[1,41],P=[1,42],M=[1,43],F=[1,44],I=[1,45],O=[1,46],z=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],N=[4,5,16,50,52,53],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],W=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],ee=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],te=[68,69,70],ce=[1,122],Z={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:s(function(Q,K,re,ie,ye,j,De){var oe=j.length-1;switch(ye){case 3:return ie.apply(j[oe]),j[oe];break;case 4:case 9:this.$=[];break;case 5:case 10:j[oe-1].push(j[oe]),this.$=j[oe-1];break;case 6:case 7:case 11:case 12:this.$=j[oe];break;case 8:case 13:this.$=[];break;case 15:j[oe].type="createParticipant",this.$=j[oe];break;case 16:j[oe-1].unshift({type:"boxStart",boxData:ie.parseBoxData(j[oe-2])}),j[oe-1].push({type:"boxEnd",boxText:j[oe-2]}),this.$=j[oe-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(j[oe-2]),sequenceIndexStep:Number(j[oe-1]),sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(j[oe-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ie.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ie.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:ie.LINETYPE.ACTIVE_START,actor:j[oe-1].actor};break;case 23:this.$={type:"activeEnd",signalType:ie.LINETYPE.ACTIVE_END,actor:j[oe-1].actor};break;case 29:ie.setDiagramTitle(j[oe].substring(6)),this.$=j[oe].substring(6);break;case 30:ie.setDiagramTitle(j[oe].substring(7)),this.$=j[oe].substring(7);break;case 31:this.$=j[oe].trim(),ie.setAccTitle(this.$);break;case 32:case 33:this.$=j[oe].trim(),ie.setAccDescription(this.$);break;case 34:j[oe-1].unshift({type:"loopStart",loopText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.LOOP_START}),j[oe-1].push({type:"loopEnd",loopText:j[oe-2],signalType:ie.LINETYPE.LOOP_END}),this.$=j[oe-1];break;case 35:j[oe-1].unshift({type:"rectStart",color:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.RECT_START}),j[oe-1].push({type:"rectEnd",color:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.RECT_END}),this.$=j[oe-1];break;case 36:j[oe-1].unshift({type:"optStart",optText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.OPT_START}),j[oe-1].push({type:"optEnd",optText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.OPT_END}),this.$=j[oe-1];break;case 37:j[oe-1].unshift({type:"altStart",altText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.ALT_START}),j[oe-1].push({type:"altEnd",signalType:ie.LINETYPE.ALT_END}),this.$=j[oe-1];break;case 38:j[oe-1].unshift({type:"parStart",parText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.PAR_START}),j[oe-1].push({type:"parEnd",signalType:ie.LINETYPE.PAR_END}),this.$=j[oe-1];break;case 39:j[oe-1].unshift({type:"parStart",parText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.PAR_OVER_START}),j[oe-1].push({type:"parEnd",signalType:ie.LINETYPE.PAR_END}),this.$=j[oe-1];break;case 40:j[oe-1].unshift({type:"criticalStart",criticalText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.CRITICAL_START}),j[oe-1].push({type:"criticalEnd",signalType:ie.LINETYPE.CRITICAL_END}),this.$=j[oe-1];break;case 41:j[oe-1].unshift({type:"breakStart",breakText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.BREAK_START}),j[oe-1].push({type:"breakEnd",optText:ie.parseMessage(j[oe-2]),signalType:ie.LINETYPE.BREAK_END}),this.$=j[oe-1];break;case 43:this.$=j[oe-3].concat([{type:"option",optionText:ie.parseMessage(j[oe-1]),signalType:ie.LINETYPE.CRITICAL_OPTION},j[oe]]);break;case 45:this.$=j[oe-3].concat([{type:"and",parText:ie.parseMessage(j[oe-1]),signalType:ie.LINETYPE.PAR_AND},j[oe]]);break;case 47:this.$=j[oe-3].concat([{type:"else",altText:ie.parseMessage(j[oe-1]),signalType:ie.LINETYPE.ALT_ELSE},j[oe]]);break;case 48:j[oe-3].draw="participant",j[oe-3].type="addParticipant",j[oe-3].description=ie.parseMessage(j[oe-1]),this.$=j[oe-3];break;case 49:j[oe-1].draw="participant",j[oe-1].type="addParticipant",this.$=j[oe-1];break;case 50:j[oe-3].draw="actor",j[oe-3].type="addParticipant",j[oe-3].description=ie.parseMessage(j[oe-1]),this.$=j[oe-3];break;case 51:j[oe-1].draw="actor",j[oe-1].type="addParticipant",this.$=j[oe-1];break;case 52:j[oe-1].type="destroyParticipant",this.$=j[oe-1];break;case 53:this.$=[j[oe-1],{type:"addNote",placement:j[oe-2],actor:j[oe-1].actor,text:j[oe]}];break;case 54:j[oe-2]=[].concat(j[oe-1],j[oe-1]).slice(0,2),j[oe-2][0]=j[oe-2][0].actor,j[oe-2][1]=j[oe-2][1].actor,this.$=[j[oe-1],{type:"addNote",placement:ie.PLACEMENT.OVER,actor:j[oe-2].slice(0,2),text:j[oe]}];break;case 55:this.$=[j[oe-1],{type:"addLinks",actor:j[oe-1].actor,text:j[oe]}];break;case 56:this.$=[j[oe-1],{type:"addALink",actor:j[oe-1].actor,text:j[oe]}];break;case 57:this.$=[j[oe-1],{type:"addProperties",actor:j[oe-1].actor,text:j[oe]}];break;case 58:this.$=[j[oe-1],{type:"addDetails",actor:j[oe-1].actor,text:j[oe]}];break;case 61:this.$=[j[oe-2],j[oe]];break;case 62:this.$=j[oe];break;case 63:this.$=ie.PLACEMENT.LEFTOF;break;case 64:this.$=ie.PLACEMENT.RIGHTOF;break;case 65:this.$=[j[oe-4],j[oe-1],{type:"addMessage",from:j[oe-4].actor,to:j[oe-1].actor,signalType:j[oe-3],msg:j[oe],activate:!0},{type:"activeStart",signalType:ie.LINETYPE.ACTIVE_START,actor:j[oe-1].actor}];break;case 66:this.$=[j[oe-4],j[oe-1],{type:"addMessage",from:j[oe-4].actor,to:j[oe-1].actor,signalType:j[oe-3],msg:j[oe]},{type:"activeEnd",signalType:ie.LINETYPE.ACTIVE_END,actor:j[oe-4].actor}];break;case 67:this.$=[j[oe-3],j[oe-1],{type:"addMessage",from:j[oe-3].actor,to:j[oe-1].actor,signalType:j[oe-2],msg:j[oe]}];break;case 68:this.$={type:"addParticipant",actor:j[oe]};break;case 69:this.$=ie.LINETYPE.SOLID_OPEN;break;case 70:this.$=ie.LINETYPE.DOTTED_OPEN;break;case 71:this.$=ie.LINETYPE.SOLID;break;case 72:this.$=ie.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=ie.LINETYPE.DOTTED;break;case 74:this.$=ie.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=ie.LINETYPE.SOLID_CROSS;break;case 76:this.$=ie.LINETYPE.DOTTED_CROSS;break;case 77:this.$=ie.LINETYPE.SOLID_POINT;break;case 78:this.$=ie.LINETYPE.DOTTED_POINT;break;case 79:this.$=ie.parseMessage(j[oe].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},t(z,[2,5]),{9:47,12:12,13:l,14:u,17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},t(z,[2,7]),t(z,[2,8]),t(z,[2,14]),{12:48,50:S,52:R,53:D},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:O},{22:55,70:O},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(z,[2,29]),t(z,[2,30]),{32:[1,61]},{34:[1,62]},t(z,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:O},{22:72,70:O},{22:73,70:O},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:O},{22:90,70:O},{22:91,70:O},{22:92,70:O},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(z,[2,6]),t(z,[2,15]),t(N,[2,9],{10:93}),t(z,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(z,[2,21]),{5:[1,97]},{5:[1,98]},t(z,[2,24]),t(z,[2,25]),t(z,[2,26]),t(z,[2,27]),t(z,[2,28]),t(z,[2,31]),t(z,[2,32]),t(U,i,{7:99}),t(U,i,{7:100}),t(U,i,{7:101}),t($,i,{40:102,7:103}),t(W,i,{42:104,7:105}),t(W,i,{7:105,42:106}),t(ee,i,{45:107,7:108}),t(U,i,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:O},t(te,[2,69]),t(te,[2,70]),t(te,[2,71]),t(te,[2,72]),t(te,[2,73]),t(te,[2,74]),t(te,[2,75]),t(te,[2,76]),t(te,[2,77]),t(te,[2,78]),{22:118,70:O},{22:120,58:119,70:O},{70:[2,63]},{70:[2,64]},{56:121,81:ce},{56:123,81:ce},{56:124,81:ce},{56:125,81:ce},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:S,52:R,53:D},{5:[1,131]},t(z,[2,19]),t(z,[2,20]),t(z,[2,22]),t(z,[2,23]),{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,132],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,133],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,134],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{16:[1,135]},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,46],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,49:[1,136],50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{16:[1,137]},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,44],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,48:[1,138],50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{16:[1,139]},{16:[1,140]},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[2,42],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,47:[1,141],50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{4:a,5:o,8:8,9:10,12:12,13:l,14:u,16:[1,142],17:15,18:h,21:f,22:40,23:d,24:19,25:20,26:21,27:22,28:23,29:p,30:m,31:g,33:y,35:v,36:x,37:b,38:k,39:A,41:w,43:T,44:C,46:E,50:S,52:R,53:D,54:L,59:P,60:M,61:F,62:I,70:O},{15:[1,143]},t(z,[2,49]),{15:[1,144]},t(z,[2,51]),t(z,[2,52]),{22:145,70:O},{22:146,70:O},{56:147,81:ce},{56:148,81:ce},{56:149,81:ce},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(z,[2,16]),t(N,[2,10]),{12:151,50:S,52:R,53:D},t(N,[2,12]),t(N,[2,13]),t(z,[2,18]),t(z,[2,34]),t(z,[2,35]),t(z,[2,36]),t(z,[2,37]),{15:[1,152]},t(z,[2,38]),{15:[1,153]},t(z,[2,39]),t(z,[2,40]),{15:[1,154]},t(z,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ce},{56:158,81:ce},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:O},t(N,[2,11]),t($,i,{7:103,40:160}),t(W,i,{7:105,42:161}),t(ee,i,{7:108,45:162}),t(z,[2,48]),t(z,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:s(function(Q,K){if(K.recoverable)this.trace(Q);else{var re=new Error(Q);throw re.hash=K,re}},"parseError"),parse:s(function(Q){var K=this,re=[0],ie=[],ye=[null],j=[],De=this.table,oe="",Re=0,Pe=0,Se=0,Ue=2,Oe=1,_e=j.slice.call(arguments,1),he=Object.create(this.lexer),q={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(q.yy[se]=this.yy[se]);he.setInput(Q,q.yy),q.yy.lexer=he,q.yy.parser=this,typeof he.yylloc>"u"&&(he.yylloc={});var ue=he.yylloc;j.push(ue);var X=he.options&&he.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(Ut){re.length=re.length-2*Ut,ye.length=ye.length-Ut,j.length=j.length-Ut}s(ae,"popStack");function pe(){var Ut;return Ut=ie.pop()||he.lex()||Oe,typeof Ut!="number"&&(Ut instanceof Array&&(ie=Ut,Ut=ie.pop()),Ut=K.symbols_[Ut]||Ut),Ut}s(pe,"lex");for(var de,Ie,Ne,Be,ze,qe,Fe={},we,Je,We,or;;){if(Ne=re[re.length-1],this.defaultActions[Ne]?Be=this.defaultActions[Ne]:((de===null||typeof de>"u")&&(de=pe()),Be=De[Ne]&&De[Ne][de]),typeof Be>"u"||!Be.length||!Be[0]){var Cr="";or=[];for(we in De[Ne])this.terminals_[we]&&we>Ue&&or.push("'"+this.terminals_[we]+"'");he.showPosition?Cr="Parse error on line "+(Re+1)+`: +`+he.showPosition()+` +Expecting `+or.join(", ")+", got '"+(this.terminals_[de]||de)+"'":Cr="Parse error on line "+(Re+1)+": Unexpected "+(de==Oe?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(Cr,{text:he.match,token:this.terminals_[de]||de,line:he.yylineno,loc:ue,expected:or})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ne+", token: "+de);switch(Be[0]){case 1:re.push(de),ye.push(he.yytext),j.push(he.yylloc),re.push(Be[1]),de=null,Ie?(de=Ie,Ie=null):(Pe=he.yyleng,oe=he.yytext,Re=he.yylineno,ue=he.yylloc,Se>0&&Se--);break;case 2:if(Je=this.productions_[Be[1]][1],Fe.$=ye[ye.length-Je],Fe._$={first_line:j[j.length-(Je||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(Je||1)].first_column,last_column:j[j.length-1].last_column},X&&(Fe._$.range=[j[j.length-(Je||1)].range[0],j[j.length-1].range[1]]),qe=this.performAction.apply(Fe,[oe,Pe,Re,q.yy,Be[1],ye,j].concat(_e)),typeof qe<"u")return qe;Je&&(re=re.slice(0,-1*Je*2),ye=ye.slice(0,-1*Je),j=j.slice(0,-1*Je)),re.push(this.productions_[Be[1]][0]),ye.push(Fe.$),j.push(Fe._$),We=De[re[re.length-2]][re[re.length-1]],re.push(We);break;case 3:return!0}}return!0},"parse")},fe=function(){var H={EOF:1,parseError:s(function(K,re){if(this.yy.parser)this.yy.parser.parseError(K,re);else throw new Error(K)},"parseError"),setInput:s(function(Q,K){return this.yy=K||this.yy||{},this._input=Q,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var Q=this._input[0];this.yytext+=Q,this.yyleng++,this.offset++,this.match+=Q,this.matched+=Q;var K=Q.match(/(?:\r\n?|\n).*/g);return K?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Q},"input"),unput:s(function(Q){var K=Q.length,re=Q.split(/(?:\r\n?|\n)/g);this._input=Q+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var ie=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),re.length-1&&(this.yylineno-=re.length-1);var ye=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:re?(re.length===ie.length?this.yylloc.first_column:0)+ie[ie.length-re.length].length-re[0].length:this.yylloc.first_column-K},this.options.ranges&&(this.yylloc.range=[ye[0],ye[0]+this.yyleng-K]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(Q){this.unput(this.match.slice(Q))},"less"),pastInput:s(function(){var Q=this.matched.substr(0,this.matched.length-this.match.length);return(Q.length>20?"...":"")+Q.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Q=this.match;return Q.length<20&&(Q+=this._input.substr(0,20-Q.length)),(Q.substr(0,20)+(Q.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Q=this.pastInput(),K=new Array(Q.length+1).join("-");return Q+this.upcomingInput()+` +`+K+"^"},"showPosition"),test_match:s(function(Q,K){var re,ie,ye;if(this.options.backtrack_lexer&&(ye={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ye.yylloc.range=this.yylloc.range.slice(0))),ie=Q[0].match(/(?:\r\n?|\n).*/g),ie&&(this.yylineno+=ie.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ie?ie[ie.length-1].length-ie[ie.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Q[0].length},this.yytext+=Q[0],this.match+=Q[0],this.matches=Q,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Q[0].length),this.matched+=Q[0],re=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),re)return re;if(this._backtrack){for(var j in ye)this[j]=ye[j];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Q,K,re,ie;this._more||(this.yytext="",this.match="");for(var ye=this._currentRules(),j=0;jK[0].length)){if(K=re,ie=j,this.options.backtrack_lexer){if(Q=this.test_match(re,ye[j]),Q!==!1)return Q;if(this._backtrack){K=!1;continue}else return!1}else if(!this.options.flex)break}return K?(Q=this.test_match(K,ye[ie]),Q!==!1?Q:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var K=this.next();return K||this.lex()},"lex"),begin:s(function(K){this.conditionStack.push(K)},"begin"),popState:s(function(){var K=this.conditionStack.length-1;return K>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},"topState"),pushState:s(function(K){this.begin(K)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(K,re,ie,ye){var j=ye;switch(ie){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;break;case 8:return this.begin("ID"),50;break;case 9:return this.begin("ID"),52;break;case 10:return 13;case 11:return this.begin("ID"),53;break;case 12:return re.yytext=re.yytext.trim(),this.begin("ALIAS"),70;break;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;break;case 14:return this.popState(),this.popState(),5;break;case 15:return this.begin("LINE"),36;break;case 16:return this.begin("LINE"),37;break;case 17:return this.begin("LINE"),38;break;case 18:return this.begin("LINE"),39;break;case 19:return this.begin("LINE"),49;break;case 20:return this.begin("LINE"),41;break;case 21:return this.begin("LINE"),43;break;case 22:return this.begin("LINE"),48;break;case 23:return this.begin("LINE"),44;break;case 24:return this.begin("LINE"),47;break;case 25:return this.begin("LINE"),46;break;case 26:return this.popState(),15;break;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;break;case 37:return this.begin("ID"),23;break;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;break;case 41:return this.popState(),"acc_title_value";break;case 42:return this.begin("acc_descr"),33;break;case 43:return this.popState(),"acc_descr_value";break;case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return re.yytext=re.yytext.trim(),70;break;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return H}();Z.lexer=fe;function ne(){this.yy={}}return s(ne,"Parser"),ne.prototype=Z,Z.Parser=ne,new ne}();bN.parser=bN;gce=bN});function wN(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}function wce(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}function eFe(){wt.records.currentBox=void 0}var wt,IBe,kN,NBe,OBe,oi,PBe,BBe,FBe,zBe,$Be,GBe,VBe,tx,UBe,qBe,WBe,HBe,YBe,vce,g0,XBe,jBe,KBe,ex,QBe,ZBe,xce,bce,JBe,kce,Tce,tFe,Ece,TN,Cce=_(()=>{"use strict";gt();it();RI();Qt();Ci();wt=new pg(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),IBe=s(function(t){wt.records.boxes.push({name:t.text,wrap:t.wrap??g0(),fill:t.color,actorKeys:[]}),wt.records.currentBox=wt.records.boxes.slice(-1)[0]},"addBox"),kN=s(function(t,e,r,n){let i=wt.records.currentBox,a=wt.records.actors.get(t);if(a){if(wt.records.currentBox&&a.box&&wt.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${wt.records.currentBox.name}' at the same time.`);if(i=a.box?a.box:wt.records.currentBox,a.box=i,a&&e===a.name&&r==null)return}if(r?.text==null&&(r={text:e,type:n}),(n==null||r.text==null)&&(r={text:e,type:n}),wt.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??g0(),prevActor:wt.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),wt.records.prevActor){let o=wt.records.actors.get(wt.records.prevActor);o&&(o.nextActor=t)}wt.records.currentBox&&wt.records.currentBox.actorKeys.push(t),wt.records.prevActor=t},"addActor"),NBe=s(t=>{let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}return wt.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??g0(),type:n,activate:i}),!0},"addSignal"),PBe=s(function(){return wt.records.boxes.length>0},"hasAtLeastOneBox"),BBe=s(function(){return wt.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),FBe=s(function(){return wt.records.messages},"getMessages"),zBe=s(function(){return wt.records.boxes},"getBoxes"),$Be=s(function(){return wt.records.actors},"getActors"),GBe=s(function(){return wt.records.createdActors},"getCreatedActors"),VBe=s(function(){return wt.records.destroyedActors},"getDestroyedActors"),tx=s(function(t){return wt.records.actors.get(t)},"getActor"),UBe=s(function(){return[...wt.records.actors.keys()]},"getActorKeys"),qBe=s(function(){wt.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),WBe=s(function(){wt.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),HBe=s(()=>wt.records.sequenceNumbersEnabled,"showSequenceNumbers"),YBe=s(function(t){wt.records.wrapEnabled=t},"setWrap"),vce=s(t=>{if(t===void 0)return{};t=t.trim();let e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),g0=s(()=>wt.records.wrapEnabled!==void 0?wt.records.wrapEnabled:le().sequence?.wrap??!1,"autoWrap"),XBe=s(function(){wt.reset(),br()},"clear"),jBe=s(function(t){let e=t.trim(),{wrap:r,cleanedText:n}=vce(e),i={text:n,wrap:r};return V.debug(`parseMessage: ${JSON.stringify(i)}`),i},"parseMessage"),KBe=s(function(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",n=t.trim());else{let o=new Option().style;o.color=r,o.color!==r&&(r="transparent",n=t.trim())}let{wrap:i,cleanedText:a}=vce(n);return{text:a?$r(a,le()):void 0,color:r,wrap:i}},"parseBoxData"),ex={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},QBe={FILLED:0,OPEN:1},ZBe={LEFTOF:0,RIGHTOF:1,OVER:2},xce=s(function(t,e,r){let n={actor:t,placement:e,message:r.text,wrap:r.wrap??g0()},i=[].concat(t,t);wt.records.notes.push(n),wt.records.messages.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap??g0(),type:ex.NOTE,placement:e})},"addNote"),bce=s(function(t,e){let r=tx(t);try{let n=$r(e.text,le());n=n.replace(/&/g,"&"),n=n.replace(/=/g,"=");let i=JSON.parse(n);wN(r,i)}catch(n){V.error("error while parsing actor link text",n)}},"addLinks"),JBe=s(function(t,e){let r=tx(t);try{let n={},i=$r(e.text,le()),a=i.indexOf("@");i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");let o=i.slice(0,a-1).trim(),l=i.slice(a+1).trim();n[o]=l,wN(r,n)}catch(n){V.error("error while parsing actor link text",n)}},"addALink");s(wN,"insertLinks");kce=s(function(t,e){let r=tx(t);try{let n=$r(e.text,le()),i=JSON.parse(n);wce(r,i)}catch(n){V.error("error while parsing actor properties text",n)}},"addProperties");s(wce,"insertProperties");s(eFe,"boxEnd");Tce=s(function(t,e){let r=tx(t),n=document.getElementById(e.text);try{let i=n.innerHTML,a=JSON.parse(i);a.properties&&wce(r,a.properties),a.links&&wN(r,a.links)}catch(i){V.error("error while parsing actor details text",i)}},"addDetails"),tFe=s(function(t,e){if(t?.properties!==void 0)return t.properties[e]},"getActorProperty"),Ece=s(function(t){if(Array.isArray(t))t.forEach(function(e){Ece(e)});else switch(t.type){case"sequenceIndex":wt.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":kN(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(wt.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");wt.records.lastCreated=t.actor,kN(t.actor,t.actor,t.description,t.draw),wt.records.createdActors.set(t.actor,wt.records.messages.length);break;case"destroyParticipant":wt.records.lastDestroyed=t.actor,wt.records.destroyedActors.set(t.actor,wt.records.messages.length);break;case"activeStart":oi(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":oi(t.actor,void 0,void 0,t.signalType);break;case"addNote":xce(t.actor,t.placement,t.text);break;case"addLinks":bce(t.actor,t.text);break;case"addALink":JBe(t.actor,t.text);break;case"addProperties":kce(t.actor,t.text);break;case"addDetails":Tce(t.actor,t.text);break;case"addMessage":if(wt.records.lastCreated){if(t.to!==wt.records.lastCreated)throw new Error("The created participant "+wt.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");wt.records.lastCreated=void 0}else if(wt.records.lastDestroyed){if(t.to!==wt.records.lastDestroyed&&t.from!==wt.records.lastDestroyed)throw new Error("The destroyed participant "+wt.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");wt.records.lastDestroyed=void 0}oi(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":IBe(t.boxData);break;case"boxEnd":eFe();break;case"loopStart":oi(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":oi(void 0,void 0,void 0,t.signalType);break;case"rectStart":oi(void 0,void 0,t.color,t.signalType);break;case"rectEnd":oi(void 0,void 0,void 0,t.signalType);break;case"optStart":oi(void 0,void 0,t.optText,t.signalType);break;case"optEnd":oi(void 0,void 0,void 0,t.signalType);break;case"altStart":oi(void 0,void 0,t.altText,t.signalType);break;case"else":oi(void 0,void 0,t.altText,t.signalType);break;case"altEnd":oi(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Ar(t.text);break;case"parStart":oi(void 0,void 0,t.parText,t.signalType);break;case"and":oi(void 0,void 0,t.parText,t.signalType);break;case"parEnd":oi(void 0,void 0,void 0,t.signalType);break;case"criticalStart":oi(void 0,void 0,t.criticalText,t.signalType);break;case"option":oi(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":oi(void 0,void 0,void 0,t.signalType);break;case"breakStart":oi(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":oi(void 0,void 0,void 0,t.signalType);break}},"apply"),TN={addActor:kN,addMessage:OBe,addSignal:oi,addLinks:bce,addDetails:Tce,addProperties:kce,autoWrap:g0,setWrap:YBe,enableSequenceNumbers:qBe,disableSequenceNumbers:WBe,showSequenceNumbers:HBe,getMessages:FBe,getActors:$Be,getCreatedActors:GBe,getDestroyedActors:VBe,getActor:tx,getActorKeys:UBe,getActorProperty:tFe,getAccTitle:Gr,getBoxes:zBe,getDiagramTitle:Qr,setDiagramTitle:an,getConfig:s(()=>le().sequence,"getConfig"),clear:XBe,parseMessage:jBe,parseBoxData:KBe,LINETYPE:ex,ARROWTYPE:QBe,PLACEMENT:ZBe,addNote:xce,setAccTitle:Ar,apply:Ece,setAccDescription:Vr,getAccDescription:Ur,hasAtLeastOneBox:PBe,hasAtLeastOneBoxWithTitle:BBe}});var rFe,Sce,_ce=_(()=>{"use strict";rFe=s(t=>`.actor { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + + text.actor > tspan { + fill: ${t.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${t.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${t.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${t.signalColor}; + } + + #arrowhead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .sequenceNumber { + fill: ${t.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${t.signalColor}; + } + + #crosshead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .messageText { + fill: ${t.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${t.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${t.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${t.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation1 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation2 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${t.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + .actor-man circle, line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + stroke-width: 2px; + } +`,"getStyles"),Sce=rFe});var EN,sf,Lce,Dce,nFe,Ace,CN,iFe,aFe,rx,y0,Rce,Ac,SN,sFe,oFe,lFe,cFe,uFe,hFe,fFe,Mce,dFe,pFe,mFe,gFe,yFe,vFe,xFe,Ice,bFe,_N,kFe,Zn,Nce=_(()=>{"use strict";Qt();Iy();pr();EN=ka(_p(),1);zs();sf=18*2,Lce="actor-top",Dce="actor-bottom",nFe="actor-box",Ace="actor-man",CN=s(function(t,e){return ad(t,e)},"drawRect"),iFe=s(function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};let a=e.links,o=e.actorCnt,l=e.rectData;var u="none";i&&(u="block !important");let h=t.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var f="";l.class!==void 0&&(f=" "+l.class);let d=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+f),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",d),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),a!=null){var m=20;for(let v in a){var g=h.append("a"),y=(0,EN.sanitizeUrl)(a[v]);g.attr("xlink:href",y),g.attr("target","_blank"),kFe(n)(v,g,l.x+10,l.height+m,d,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:d}},"drawPopup"),aFe=s(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),rx=s(async function(t,e,r=null){let n=t.append("foreignObject"),i=await hh(e.text,_r()),o=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),e.class==="noteText"){let l=t.node().firstChild;l.setAttribute("height",o.height+2*e.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let f=l;l=u,u=f}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),e.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),y0=s(function(t,e){let r=0,n=0,i=e.text.split($e.lineBreakRegex),[a,o]=nc(e.fontSize),l=[],u=0,h=s(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=s(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":h=s(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":h=s(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[f,d]of i.entries()){e.textMargin!==void 0&&e.textMargin===0&&a!==void 0&&(u=f*a);let p=t.append("text");p.attr("x",e.x),p.attr("y",h()),e.anchor!==void 0&&p.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&p.style("font-family",e.fontFamily),o!==void 0&&p.style("font-size",o),e.fontWeight!==void 0&&p.style("font-weight",e.fontWeight),e.fill!==void 0&&p.attr("fill",e.fill),e.class!==void 0&&p.attr("class",e.class),e.dy!==void 0?p.attr("dy",e.dy):u!==0&&p.attr("dy",u);let m=d||sA;if(e.tspan){let g=p.append("tspan");g.attr("x",e.x),e.fill!==void 0&&g.attr("fill",e.fill),g.text(m)}else p.text(m);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),Rce=s(function(t,e){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(r,"genPoints");let n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,y0(t,e),n},"drawLabel"),Ac=-1,SN=s((t,e,r,n)=>{t.select&&r.forEach(i=>{let a=e.get(i),o=t.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?o.attr("y2",a.stopy+a.height/2):n.mirrorActors&&o.attr("y2",a.stopy)})},"fixLifeLineHeights"),sFe=s(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,o=i+5,l=t.append("g").lower();var u=l;n||(Ac++,Object.keys(e.links||{}).length&&!r.forceMenus&&u.attr("onclick",aFe(`actor${Ac}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+Ac).attr("x1",a).attr("y1",o).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),u=l.append("g"),e.actorCnt=Ac,e.links!=null&&u.attr("id","root-"+Ac));let h=ol();var f="actor";e.properties?.class?f=e.properties.class:h.fill="#eaeaea",n?f+=` ${Dce}`:f+=` ${Lce}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=f,h.rx=3,h.ry=3,h.name=e.name;let d=CN(u,h);if(e.rectData=h,e.properties?.icon){let m=e.properties.icon.trim();m.charAt(0)==="@"?eW(u,h.x+h.width-20,h.y+10,m.substr(1)):Jq(u,h.x+h.width-20,h.y+10,m)}_N(r,Ei(e.description))(e.description,u,h.x,h.y,h.width,h.height,{class:`actor ${nFe}`},r);let p=e.height;if(d.node){let m=d.node().getBBox();e.height=m.height,p=m.height}return p},"drawActorTypeParticipant"),oFe=s(function(t,e,r,n){let i=n?e.stopy:e.starty,a=e.x+e.width/2,o=i+80,l=t.append("g").lower();n||(Ac++,l.append("line").attr("id","actor"+Ac).attr("x1",a).attr("y1",o).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Ac);let u=t.append("g"),h=Ace;n?h+=` ${Dce}`:h+=` ${Lce}`,u.attr("class",h),u.attr("name",e.name);let f=ol();f.x=e.x,f.y=i,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,u.append("line").attr("id","actor-man-torso"+Ac).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),u.append("line").attr("id","actor-man-arms"+Ac).attr("x1",a-sf/2).attr("y1",i+33).attr("x2",a+sf/2).attr("y2",i+33),u.append("line").attr("x1",a-sf/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),u.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+sf/2-2).attr("y2",i+60);let d=u.append("circle");d.attr("cx",e.x+e.width/2),d.attr("cy",i+10),d.attr("r",15),d.attr("width",e.width),d.attr("height",e.height);let p=u.node().getBBox();return e.height=p.height,_N(r,Ei(e.description))(e.description,u,f.x,f.y+35,f.width,f.height,{class:`actor ${Ace}`},r),e.height},"drawActorTypeActor"),lFe=s(async function(t,e,r,n){switch(e.type){case"actor":return await oFe(t,e,r,n);case"participant":return await sFe(t,e,r,n)}},"drawActor"),cFe=s(function(t,e,r){let i=t.append("g");Mce(i,e),e.name&&_N(r)(e.name,i,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),i.lower()},"drawBox"),uFe=s(function(t){return t.append("g")},"anchorElement"),hFe=s(function(t,e,r,n,i){let a=ol(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,CN(o,a)},"drawActivation"),fFe=s(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:o,labelBoxWidth:l,messageFontFamily:u,messageFontSize:h,messageFontWeight:f}=n,d=t.append("g"),p=s(function(y,v,x,b){return d.append("line").attr("x1",y).attr("y1",v).attr("x2",x).attr("y2",b).attr("class","loopLine")},"drawLoopLine");p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(y){p(e.startx,y.y,e.stopx,y.y).style("stroke-dasharray","3, 3")});let m=My();m.text=r,m.x=e.startx,m.y=e.starty,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=l||50,m.height=o||20,m.textMargin=a,m.class="labelText",Rce(d,m),m=Ice(),m.text=e.title,m.x=e.startx+l/2+(e.stopx-e.startx)/2,m.y=e.starty+i+a,m.anchor="middle",m.valign="middle",m.textMargin=a,m.class="loopText",m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=!0;let g=Ei(m.text)?await rx(d,m,e):y0(d,m);if(e.sectionTitles!==void 0){for(let[y,v]of Object.entries(e.sectionTitles))if(v.message){m.text=v.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[y].y+i+a,m.class="loopText",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=h,m.fontWeight=f,m.wrap=e.wrap,Ei(m.text)?(e.starty=e.sections[y].y,await rx(d,m,e)):y0(d,m);let x=Math.round(g.map(b=>(b._groups||b)[0][0].getBBox().height).reduce((b,k)=>b+k));e.sections[y].height+=x-(i+a)}}return e.height=Math.round(e.stopy-e.starty),d},"drawLoop"),Mce=s(function(t,e){v3(t,e)},"drawBackgroundRect"),dFe=s(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),pFe=s(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),mFe=s(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),gFe=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),yFe=s(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),vFe=s(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),xFe=s(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Ice=s(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),bFe=s(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),_N=function(){function t(a,o,l,u,h,f,d){let p=o.append("text").attr("x",l+h/2).attr("y",u+f/2+5).style("text-anchor","middle").text(a);i(p,d)}s(t,"byText");function e(a,o,l,u,h,f,d,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[v,x]=nc(m),b=a.split($e.lineBreakRegex);for(let k=0;k{let o=v0(Ee),l=a.actorKeys.reduce((f,d)=>f+=t.get(d).width+(t.get(d).margin||0),0);l-=2*Ee.boxTextMargin,a.wrap&&(a.name=dt.wrapLabel(a.name,l-2*Ee.wrapPadding,o));let u=dt.calculateTextDimensions(a.name,o);i=$e.getMax(u.height,i);let h=$e.getMax(l,u.width+2*Ee.wrapPadding);if(a.margin=Ee.boxTextMargin,la.textMaxHeight=i),$e.getMax(n,Ee.height)}var Ee,He,wFe,v0,kg,AN,EFe,CFe,LN,Pce,Bce,Uw,Oce,_Fe,LFe,RFe,MFe,IFe,Fce,zce=_(()=>{"use strict";Xt();Nce();it();Qt();Iy();gt();Y0();pr();Un();Ee={},He={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:s(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:s(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:s(function(t){this.boxes.push(t)},"addBox"),addActor:s(function(t){this.actors.push(t)},"addActor"),addLoop:s(function(t){this.loops.push(t)},"addLoop"),addMessage:s(function(t){this.messages.push(t)},"addMessage"),addNote:s(function(t){this.notes.push(t)},"addNote"),lastActor:s(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:s(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:s(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:s(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:s(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Bce(le())},"init"),updateVal:s(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,n){let i=this,a=0;function o(l){return s(function(h){a++;let f=i.sequenceItems.length-a+1;i.updateVal(h,"starty",e-f*Ee.boxMargin,Math.min),i.updateVal(h,"stopy",n+f*Ee.boxMargin,Math.max),i.updateVal(He.data,"startx",t-f*Ee.boxMargin,Math.min),i.updateVal(He.data,"stopx",r+f*Ee.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",t-f*Ee.boxMargin,Math.min),i.updateVal(h,"stopx",r+f*Ee.boxMargin,Math.max),i.updateVal(He.data,"starty",e-f*Ee.boxMargin,Math.min),i.updateVal(He.data,"stopy",n+f*Ee.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:s(function(t,e,r,n){let i=$e.getMin(t,r),a=$e.getMax(t,r),o=$e.getMin(e,n),l=$e.getMax(e,n);this.updateVal(He.data,"startx",i,Math.min),this.updateVal(He.data,"starty",o,Math.min),this.updateVal(He.data,"stopx",a,Math.max),this.updateVal(He.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),newActivation:s(function(t,e,r){let n=r.get(t.from),i=Uw(t.from).length||0,a=n.x+n.width/2+(i-1)*Ee.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ee.activationWidth,stopy:void 0,actor:t.from,anchored:Zn.anchorElement(e)})},"newActivation"),endActivation:s(function(t){let e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:s(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:s(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:s(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:s(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:s(function(t){let e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:He.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:s(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:s(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=$e.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return{bounds:this.data,models:this.models}},"getBounds")},wFe=s(async function(t,e){He.bumpVerticalPos(Ee.boxMargin),e.height=Ee.boxMargin,e.starty=He.getVerticalPos();let r=ol();r.x=e.startx,r.y=e.starty,r.width=e.width||Ee.width,r.class="note";let n=t.append("g"),i=Zn.drawRect(n,r),a=My();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ee.noteFontFamily,a.fontSize=Ee.noteFontSize,a.fontWeight=Ee.noteFontWeight,a.anchor=Ee.noteAlign,a.textMargin=Ee.noteMargin,a.valign="center";let o=Ei(a.text)?await rx(n,a):y0(n,a),l=Math.round(o.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,h)=>u+h));i.attr("height",l+2*Ee.noteMargin),e.height+=l+2*Ee.noteMargin,He.bumpVerticalPos(l+2*Ee.noteMargin),e.stopy=e.starty+l+2*Ee.noteMargin,e.stopx=e.startx+r.width,He.insert(e.startx,e.starty,e.stopx,e.stopy),He.models.addNote(e)},"drawNote"),v0=s(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),kg=s(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),AN=s(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");s(TFe,"boundMessage");EFe=s(async function(t,e,r,n){let{startx:i,stopx:a,starty:o,message:l,type:u,sequenceIndex:h,sequenceVisible:f}=e,d=dt.calculateTextDimensions(l,v0(Ee)),p=My();p.x=i,p.y=o+10,p.width=a-i,p.class="messageText",p.dy="1em",p.text=l,p.fontFamily=Ee.messageFontFamily,p.fontSize=Ee.messageFontSize,p.fontWeight=Ee.messageFontWeight,p.anchor=Ee.messageAlign,p.valign="center",p.textMargin=Ee.wrapPadding,p.tspan=!1,Ei(p.text)?await rx(t,p,{startx:i,stopx:a,starty:r}):y0(t,p);let m=d.width,g;i===a?Ee.rightAngles?g=t.append("path").attr("d",`M ${i},${r} H ${i+$e.getMax(Ee.width/2,m/2)} V ${r+25} H ${i}`):g=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(g=t.append("line"),g.attr("x1",i),g.attr("y1",r),g.attr("x2",a),g.attr("y2",r)),u===n.db.LINETYPE.DOTTED||u===n.db.LINETYPE.DOTTED_CROSS||u===n.db.LINETYPE.DOTTED_POINT||u===n.db.LINETYPE.DOTTED_OPEN||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(g.style("stroke-dasharray","3, 3"),g.attr("class","messageLine1")):g.attr("class","messageLine0");let y="";Ee.arrowMarkerAbsolute&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),g.attr("stroke-width",2),g.attr("stroke","none"),g.style("fill","none"),(u===n.db.LINETYPE.SOLID||u===n.db.LINETYPE.DOTTED)&&g.attr("marker-end","url("+y+"#arrowhead)"),(u===n.db.LINETYPE.BIDIRECTIONAL_SOLID||u===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(g.attr("marker-start","url("+y+"#arrowhead)"),g.attr("marker-end","url("+y+"#arrowhead)")),(u===n.db.LINETYPE.SOLID_POINT||u===n.db.LINETYPE.DOTTED_POINT)&&g.attr("marker-end","url("+y+"#filled-head)"),(u===n.db.LINETYPE.SOLID_CROSS||u===n.db.LINETYPE.DOTTED_CROSS)&&g.attr("marker-end","url("+y+"#crosshead)"),(f||Ee.showSequenceNumbers)&&(g.attr("marker-start","url("+y+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},"drawMessage"),CFe=s(function(t,e,r,n,i,a,o){let l=0,u=0,h,f=0;for(let d of n){let p=e.get(d),m=p.box;h&&h!=m&&(o||He.models.addBox(h),u+=Ee.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=p.width||Ee.width,p.height=$e.getMax(p.height||Ee.height,Ee.height),p.margin=p.margin||Ee.actorMargin,f=$e.getMax(f,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=He.getVerticalPos(),He.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,He.models.addActor(p)}h&&!o&&He.models.addBox(h),He.bumpVerticalPos(f)},"addActorRenderingData"),LN=s(async function(t,e,r,n){if(n){let i=0;He.bumpVerticalPos(Ee.boxMargin*2);for(let a of r){let o=e.get(a);o.stopy||(o.stopy=He.getVerticalPos());let l=await Zn.drawActor(t,o,Ee,!0);i=$e.getMax(i,l)}He.bumpVerticalPos(i+Ee.boxMargin)}else for(let i of r){let a=e.get(i);await Zn.drawActor(t,a,Ee,!1)}},"drawActors"),Pce=s(function(t,e,r,n){let i=0,a=0;for(let o of r){let l=e.get(o),u=LFe(l),h=Zn.drawPopup(t,l,u,Ee,Ee.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>a&&(a=h.width+l.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Bce=s(function(t){An(Ee,t),t.fontFamily&&(Ee.actorFontFamily=Ee.noteFontFamily=Ee.messageFontFamily=t.fontFamily),t.fontSize&&(Ee.actorFontSize=Ee.noteFontSize=Ee.messageFontSize=t.fontSize),t.fontWeight&&(Ee.actorFontWeight=Ee.noteFontWeight=Ee.messageFontWeight=t.fontWeight)},"setConf"),Uw=s(function(t){return He.activations.filter(function(e){return e.actor===t})},"actorActivations"),Oce=s(function(t,e){let r=e.get(t),n=Uw(t),i=n.reduce(function(o,l){return $e.getMin(o,l.startx)},r.x+r.width/2-1),a=n.reduce(function(o,l){return $e.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");s(Lc,"adjustLoopHeightForWrap");s(SFe,"adjustCreatedDestroyedData");_Fe=s(async function(t,e,r,n){let{securityLevel:i,sequence:a}=le();Ee=a;let o;i==="sandbox"&&(o=Me("#i"+e));let l=i==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body"),u=i==="sandbox"?o.nodes()[0].contentDocument:document;He.init(),V.debug(n.db);let h=i==="sandbox"?l.select(`[id="${e}"]`):Me(`[id="${e}"]`),f=n.db.getActors(),d=n.db.getCreatedActors(),p=n.db.getDestroyedActors(),m=n.db.getBoxes(),g=n.db.getActorKeys(),y=n.db.getMessages(),v=n.db.getDiagramTitle(),x=n.db.hasAtLeastOneBox(),b=n.db.hasAtLeastOneBoxWithTitle(),k=await AFe(f,y,n);if(Ee.height=await DFe(f,k,m),Zn.insertComputerIcon(h),Zn.insertDatabaseIcon(h),Zn.insertClockIcon(h),x&&(He.bumpVerticalPos(Ee.boxMargin),b&&He.bumpVerticalPos(m[0].textMaxHeight)),Ee.hideUnusedParticipants===!0){let z=new Set;y.forEach(N=>{z.add(N.from),z.add(N.to)}),g=g.filter(N=>z.has(N))}CFe(h,f,d,g,0,y,!1);let A=await IFe(y,f,k,n);Zn.insertArrowHead(h),Zn.insertArrowCrossHead(h),Zn.insertArrowFilledHead(h),Zn.insertSequenceNumber(h);function w(z,N){let U=He.endActivation(z);U.starty+18>N&&(U.starty=N-6,N+=12),Zn.drawActivation(h,U,N,Ee,Uw(z.from).length),He.insert(U.startx,N-10,U.stopx,N)}s(w,"activeEnd");let T=1,C=1,E=[],S=[],R=0;for(let z of y){let N,U,$;switch(z.type){case n.db.LINETYPE.NOTE:He.resetVerticalPos(),U=z.noteModel,await wFe(h,U);break;case n.db.LINETYPE.ACTIVE_START:He.newActivation(z,h,f);break;case n.db.LINETYPE.ACTIVE_END:w(z,He.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.LOOP_END:N=He.endLoop(),await Zn.drawLoop(h,N,"loop",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.RECT_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin,W=>He.newLoop(void 0,W.message));break;case n.db.LINETYPE.RECT_END:N=He.endLoop(),S.push(N),He.models.addLoop(N),He.bumpVerticalPos(N.stopy-He.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.OPT_END:N=He.endLoop(),await Zn.drawLoop(h,N,"opt",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.ALT_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.ALT_ELSE:Lc(A,z,Ee.boxMargin+Ee.boxTextMargin,Ee.boxMargin,W=>He.addSectionToLoop(W));break;case n.db.LINETYPE.ALT_END:N=He.endLoop(),await Zn.drawLoop(h,N,"alt",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W)),He.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:Lc(A,z,Ee.boxMargin+Ee.boxTextMargin,Ee.boxMargin,W=>He.addSectionToLoop(W));break;case n.db.LINETYPE.PAR_END:N=He.endLoop(),await Zn.drawLoop(h,N,"par",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.AUTONUMBER:T=z.message.start||T,C=z.message.step||C,z.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.CRITICAL_OPTION:Lc(A,z,Ee.boxMargin+Ee.boxTextMargin,Ee.boxMargin,W=>He.addSectionToLoop(W));break;case n.db.LINETYPE.CRITICAL_END:N=He.endLoop(),await Zn.drawLoop(h,N,"critical",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;case n.db.LINETYPE.BREAK_START:Lc(A,z,Ee.boxMargin,Ee.boxMargin+Ee.boxTextMargin,W=>He.newLoop(W));break;case n.db.LINETYPE.BREAK_END:N=He.endLoop(),await Zn.drawLoop(h,N,"break",Ee),He.bumpVerticalPos(N.stopy-He.getVerticalPos()),He.models.addLoop(N);break;default:try{$=z.msgModel,$.starty=He.getVerticalPos(),$.sequenceIndex=T,$.sequenceVisible=n.db.showSequenceNumbers();let W=await TFe(h,$);SFe(z,$,W,R,f,d,p),E.push({messageModel:$,lineStartY:W}),He.models.addMessage($)}catch(W){V.error("error while drawing message",W)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(z.type)&&(T=T+C),R++}V.debug("createdActors",d),V.debug("destroyedActors",p),await LN(h,f,g,!1);for(let z of E)await EFe(h,z.messageModel,z.lineStartY,n);Ee.mirrorActors&&await LN(h,f,g,!0),S.forEach(z=>Zn.drawBackgroundRect(h,z)),SN(h,f,g,Ee);for(let z of He.models.boxes)z.height=He.getVerticalPos()-z.y,He.insert(z.x,z.y,z.x+z.width,z.height),z.startx=z.x,z.starty=z.y,z.stopx=z.startx+z.width,z.stopy=z.starty+z.height,z.stroke="rgb(0,0,0, 0.5)",Zn.drawBox(h,z,Ee);x&&He.bumpVerticalPos(Ee.boxMargin);let D=Pce(h,f,g,u),{bounds:L}=He.getBounds();L.startx===void 0&&(L.startx=0),L.starty===void 0&&(L.starty=0),L.stopx===void 0&&(L.stopx=0),L.stopy===void 0&&(L.stopy=0);let P=L.stopy-L.starty;P2,d=s(y=>l?-y:y,"adjustValue");t.from===t.to?h=u:(t.activate&&!f&&(h+=d(Ee.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=d(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(u-=d(3)));let p=[n,i,a,o],m=Math.abs(u-h);t.wrap&&t.message&&(t.message=dt.wrapLabel(t.message,$e.getMax(m+2*Ee.wrapPadding,Ee.width),v0(Ee)));let g=dt.calculateTextDimensions(t.message,v0(Ee));return{width:$e.getMax(t.wrap?0:g.width+2*Ee.wrapPadding,m+2*Ee.wrapPadding,Ee.width),height:0,startx:u,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,p),toBounds:Math.max.apply(null,p)}},"buildMessageModel"),IFe=s(async function(t,e,r,n){let i={},a=[],o,l,u;for(let h of t){switch(h.id=dt.random({length:10}),h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(o=a.pop(),i[o.id]=o,i[h.id]=o,a.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let d=e.get(h.from?h.from:h.to.actor),p=Uw(h.from?h.from:h.to.actor).length,m=d.x+d.width/2+(p-1)*Ee.activationWidth/2,g={startx:m,stopx:m+Ee.activationWidth,actor:h.from,enabled:!0};He.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let d=He.activations.map(p=>p.actor).lastIndexOf(h.from);He.activations.splice(d,1).splice(0,1)}break}h.placement!==void 0?(l=await RFe(h,e,n),h.noteModel=l,a.forEach(d=>{o=d,o.from=$e.getMin(o.from,l.startx),o.to=$e.getMax(o.to,l.startx+l.width),o.width=$e.getMax(o.width,Math.abs(o.from-o.to))-Ee.labelBoxWidth})):(u=MFe(h,e,n),h.msgModel=u,u.startx&&u.stopx&&a.length>0&&a.forEach(d=>{if(o=d,u.startx===u.stopx){let p=e.get(h.from),m=e.get(h.to);o.from=$e.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=$e.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=$e.getMax(o.width,Math.abs(o.to-o.from))-Ee.labelBoxWidth}else o.from=$e.getMin(u.startx,o.from),o.to=$e.getMax(u.stopx,o.to),o.width=$e.getMax(o.width,u.width)-Ee.labelBoxWidth}))}return He.activations=[],V.debug("Loop type widths:",i),i},"calculateLoopBounds"),Fce={bounds:He,drawActors:LN,drawActorsPopup:Pce,setConf:Bce,draw:_Fe}});var $ce={};ur($ce,{diagram:()=>NFe});var NFe,Gce=_(()=>{"use strict";yce();Cce();_ce();zce();NFe={parser:gce,db:TN,renderer:Fce,styles:Sce,init:s(({wrap:t})=>{TN.setWrap(t)},"init")}});var DN,qw,RN=_(()=>{"use strict";DN=function(){var t=s(function(Oe,_e,he,q){for(he=he||{},q=Oe.length;q--;he[Oe[q]]=_e);return he},"o"),e=[1,17],r=[1,18],n=[1,19],i=[1,39],a=[1,40],o=[1,25],l=[1,23],u=[1,24],h=[1,31],f=[1,32],d=[1,33],p=[1,34],m=[1,35],g=[1,36],y=[1,26],v=[1,27],x=[1,28],b=[1,29],k=[1,43],A=[1,30],w=[1,42],T=[1,44],C=[1,41],E=[1,45],S=[1,9],R=[1,8,9],D=[1,56],L=[1,57],P=[1,58],M=[1,59],F=[1,60],I=[1,61],O=[1,62],z=[1,8,9,39],N=[1,74],U=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],$=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],W=[13,74,80,95,97,98],ee=[13,64,65,74,80,95,97,98],te=[13,59,60,61,62,63,74,80,95,97,98],ce=[1,93],Z=[1,110],fe=[1,108],ne=[1,102],H=[1,103],Q=[1,104],K=[1,105],re=[1,106],ie=[1,107],ye=[1,109],j=[1,8,9,37,39,42],De=[1,8,9,21],oe=[1,8,9,78],Re=[1,8,9,21,73,74,78,80,81,82,83,84,85],Pe={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:s(function(_e,he,q,se,ue,X,ae){var pe=X.length-1;switch(ue){case 8:this.$=X[pe-1];break;case 9:case 11:case 12:this.$=X[pe];break;case 10:case 13:this.$=X[pe-1]+X[pe];break;case 14:case 15:this.$=X[pe-1]+"~"+X[pe]+"~";break;case 16:se.addRelation(X[pe]);break;case 17:X[pe-1].title=se.cleanupLabel(X[pe]),se.addRelation(X[pe-1]);break;case 27:this.$=X[pe].trim(),se.setAccTitle(this.$);break;case 28:case 29:this.$=X[pe].trim(),se.setAccDescription(this.$);break;case 30:se.addClassesToNamespace(X[pe-3],X[pe-1]);break;case 31:se.addClassesToNamespace(X[pe-4],X[pe-1]);break;case 32:this.$=X[pe],se.addNamespace(X[pe]);break;case 33:this.$=[X[pe]];break;case 34:this.$=[X[pe-1]];break;case 35:X[pe].unshift(X[pe-2]),this.$=X[pe];break;case 37:se.setCssClass(X[pe-2],X[pe]);break;case 38:se.addMembers(X[pe-3],X[pe-1]);break;case 39:se.setCssClass(X[pe-5],X[pe-3]),se.addMembers(X[pe-5],X[pe-1]);break;case 40:this.$=X[pe],se.addClass(X[pe]);break;case 41:this.$=X[pe-1],se.addClass(X[pe-1]),se.setClassLabel(X[pe-1],X[pe]);break;case 42:se.addAnnotation(X[pe],X[pe-2]);break;case 43:this.$=[X[pe]];break;case 44:X[pe].push(X[pe-1]),this.$=X[pe];break;case 45:break;case 46:se.addMember(X[pe-1],se.cleanupLabel(X[pe]));break;case 47:break;case 48:break;case 49:this.$={id1:X[pe-2],id2:X[pe],relation:X[pe-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:X[pe-3],id2:X[pe],relation:X[pe-1],relationTitle1:X[pe-2],relationTitle2:"none"};break;case 51:this.$={id1:X[pe-3],id2:X[pe],relation:X[pe-2],relationTitle1:"none",relationTitle2:X[pe-1]};break;case 52:this.$={id1:X[pe-4],id2:X[pe],relation:X[pe-2],relationTitle1:X[pe-3],relationTitle2:X[pe-1]};break;case 53:se.addNote(X[pe],X[pe-1]);break;case 54:se.addNote(X[pe]);break;case 55:se.setDirection("TB");break;case 56:se.setDirection("BT");break;case 57:se.setDirection("RL");break;case 58:se.setDirection("LR");break;case 59:this.$={type1:X[pe-2],type2:X[pe],lineType:X[pe-1]};break;case 60:this.$={type1:"none",type2:X[pe],lineType:X[pe-1]};break;case 61:this.$={type1:X[pe-1],type2:"none",lineType:X[pe]};break;case 62:this.$={type1:"none",type2:"none",lineType:X[pe]};break;case 63:this.$=se.relationType.AGGREGATION;break;case 64:this.$=se.relationType.EXTENSION;break;case 65:this.$=se.relationType.COMPOSITION;break;case 66:this.$=se.relationType.DEPENDENCY;break;case 67:this.$=se.relationType.LOLLIPOP;break;case 68:this.$=se.lineType.LINE;break;case 69:this.$=se.lineType.DOTTED_LINE;break;case 70:case 76:this.$=X[pe-2],se.setClickEvent(X[pe-1],X[pe]);break;case 71:case 77:this.$=X[pe-3],se.setClickEvent(X[pe-2],X[pe-1]),se.setTooltip(X[pe-2],X[pe]);break;case 72:this.$=X[pe-2],se.setLink(X[pe-1],X[pe]);break;case 73:this.$=X[pe-3],se.setLink(X[pe-2],X[pe-1],X[pe]);break;case 74:this.$=X[pe-3],se.setLink(X[pe-2],X[pe-1]),se.setTooltip(X[pe-2],X[pe]);break;case 75:this.$=X[pe-4],se.setLink(X[pe-3],X[pe-2],X[pe]),se.setTooltip(X[pe-3],X[pe-1]);break;case 78:this.$=X[pe-3],se.setClickEvent(X[pe-2],X[pe-1],X[pe]);break;case 79:this.$=X[pe-4],se.setClickEvent(X[pe-3],X[pe-2],X[pe-1]),se.setTooltip(X[pe-3],X[pe]);break;case 80:this.$=X[pe-3],se.setLink(X[pe-2],X[pe]);break;case 81:this.$=X[pe-4],se.setLink(X[pe-3],X[pe-1],X[pe]);break;case 82:this.$=X[pe-4],se.setLink(X[pe-3],X[pe-1]),se.setTooltip(X[pe-3],X[pe]);break;case 83:this.$=X[pe-5],se.setLink(X[pe-4],X[pe-2],X[pe]),se.setTooltip(X[pe-4],X[pe-1]);break;case 84:this.$=X[pe-2],se.setCssStyle(X[pe-1],X[pe]);break;case 85:se.setCssClass(X[pe-1],X[pe]);break;case 86:this.$=[X[pe]];break;case 87:X[pe-2].push(X[pe]),this.$=X[pe-2];break;case 89:this.$=X[pe-1]+X[pe];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:r,35:n,36:21,40:i,41:22,44:a,45:o,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:k,76:A,80:w,95:T,97:C,98:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(S,[2,5],{8:[1,46]}),{8:[1,47]},t(R,[2,16],{21:[1,48]}),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(R,[2,23]),t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),{32:[1,49]},{34:[1,50]},t(R,[2,29]),t(R,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:D,60:L,61:P,62:M,63:F,64:I,65:O}),{37:[1,63]},t(z,[2,36],{37:[1,65],42:[1,64]}),t(R,[2,47]),t(R,[2,48]),{16:66,74:k,80:w,95:T,97:C},{16:37,17:67,18:38,74:k,80:w,95:T,97:C,98:E},{16:37,17:68,18:38,74:k,80:w,95:T,97:C,98:E},{16:37,17:69,18:38,74:k,80:w,95:T,97:C,98:E},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:k,80:w,95:T,97:C,98:E},{13:N,51:73},t(R,[2,55]),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(U,[2,11],{16:37,18:38,17:75,19:[1,76],74:k,80:w,95:T,97:C,98:E}),t(U,[2,12],{19:[1,77]}),{15:78,16:79,74:k,80:w,95:T,97:C},{16:37,17:80,18:38,74:k,80:w,95:T,97:C,98:E},t($,[2,112]),t($,[2,113]),t($,[2,114]),t($,[2,115]),t([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),t(S,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:e,33:r,35:n,40:i,44:a,45:o,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:k,76:A,80:w,95:T,97:C,98:E}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:r,35:n,36:21,40:i,41:22,44:a,45:o,47:l,48:u,50:h,52:f,53:d,54:p,55:m,56:g,66:y,67:v,69:x,73:b,74:k,76:A,80:w,95:T,97:C,98:E},t(R,[2,17]),t(R,[2,27]),t(R,[2,28]),{13:[1,84],16:37,17:83,18:38,74:k,80:w,95:T,97:C,98:E},{49:85,57:54,58:55,59:D,60:L,61:P,62:M,63:F,64:I,65:O},t(R,[2,46]),{58:86,64:I,65:O},t(W,[2,62],{57:87,59:D,60:L,61:P,62:M,63:F}),t(ee,[2,63]),t(ee,[2,64]),t(ee,[2,65]),t(ee,[2,66]),t(ee,[2,67]),t(te,[2,68]),t(te,[2,69]),{8:[1,89],23:90,38:88,41:22,44:a},{16:91,74:k,80:w,95:T,97:C},{43:92,47:ce},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:Z,73:fe,74:ne,75:99,77:100,79:101,80:H,81:Q,82:K,83:re,84:ie,85:ye},{74:[1,111]},{13:N,51:112},t(R,[2,54]),t(R,[2,117]),t(U,[2,13]),t(U,[2,14]),t(U,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:k,80:w,95:T,97:C},t(j,[2,40],{11:114,12:[1,115]}),t(S,[2,7]),{9:[1,116]},t(De,[2,49]),{16:37,17:117,18:38,74:k,80:w,95:T,97:C,98:E},{13:[1,119],16:37,17:118,18:38,74:k,80:w,95:T,97:C,98:E},t(W,[2,61],{57:120,59:D,60:L,61:P,62:M,63:F}),t(W,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:a},{8:[1,123],39:[2,33]},t(z,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:ce},{16:37,17:127,18:38,74:k,80:w,95:T,97:C,98:E},t(R,[2,70],{13:[1,128]}),t(R,[2,72],{13:[1,130],68:[1,129]}),t(R,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},t(R,[2,84],{78:[1,134]}),t(oe,[2,86],{79:135,21:Z,73:fe,74:ne,80:H,81:Q,82:K,83:re,84:ie,85:ye}),t(Re,[2,88]),t(Re,[2,90]),t(Re,[2,91]),t(Re,[2,92]),t(Re,[2,93]),t(Re,[2,94]),t(Re,[2,95]),t(Re,[2,96]),t(Re,[2,97]),t(Re,[2,98]),t(R,[2,85]),t(R,[2,53]),{37:[2,10]},t(j,[2,41]),{13:[1,136]},{1:[2,4]},t(De,[2,51]),t(De,[2,50]),{16:37,17:137,18:38,74:k,80:w,95:T,97:C,98:E},t(W,[2,59]),t(R,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:a},{43:140,47:ce},t(z,[2,38]),{39:[2,44]},t(R,[2,42]),t(R,[2,71]),t(R,[2,73]),t(R,[2,74],{68:[1,141]}),t(R,[2,77]),t(R,[2,78],{13:[1,142]}),t(R,[2,80],{13:[1,144],68:[1,143]}),{21:Z,73:fe,74:ne,77:145,79:101,80:H,81:Q,82:K,83:re,84:ie,85:ye},t(Re,[2,89]),{14:[1,146]},t(De,[2,52]),t(R,[2,31]),{39:[2,35]},{39:[1,147]},t(R,[2,75]),t(R,[2,79]),t(R,[2,81]),t(R,[2,82],{68:[1,148]}),t(oe,[2,87],{79:135,21:Z,73:fe,74:ne,80:H,81:Q,82:K,83:re,84:ie,85:ye}),t(j,[2,8]),t(z,[2,39]),t(R,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:s(function(_e,he){if(he.recoverable)this.trace(_e);else{var q=new Error(_e);throw q.hash=he,q}},"parseError"),parse:s(function(_e){var he=this,q=[0],se=[],ue=[null],X=[],ae=this.table,pe="",de=0,Ie=0,Ne=0,Be=2,ze=1,qe=X.slice.call(arguments,1),Fe=Object.create(this.lexer),we={yy:{}};for(var Je in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Je)&&(we.yy[Je]=this.yy[Je]);Fe.setInput(_e,we.yy),we.yy.lexer=Fe,we.yy.parser=this,typeof Fe.yylloc>"u"&&(Fe.yylloc={});var We=Fe.yylloc;X.push(We);var or=Fe.options&&Fe.options.ranges;typeof we.yy.parseError=="function"?this.parseError=we.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Cr(vt){q.length=q.length-2*vt,ue.length=ue.length-vt,X.length=X.length-vt}s(Cr,"popStack");function Ut(){var vt;return vt=se.pop()||Fe.lex()||ze,typeof vt!="number"&&(vt instanceof Array&&(se=vt,vt=se.pop()),vt=he.symbols_[vt]||vt),vt}s(Ut,"lex");for(var ar,ut,Rt,Qe,Dt,qt,yt={},Et,pt,Wt,ot;;){if(Rt=q[q.length-1],this.defaultActions[Rt]?Qe=this.defaultActions[Rt]:((ar===null||typeof ar>"u")&&(ar=Ut()),Qe=ae[Rt]&&ae[Rt][ar]),typeof Qe>"u"||!Qe.length||!Qe[0]){var fr="";ot=[];for(Et in ae[Rt])this.terminals_[Et]&&Et>Be&&ot.push("'"+this.terminals_[Et]+"'");Fe.showPosition?fr="Parse error on line "+(de+1)+`: +`+Fe.showPosition()+` +Expecting `+ot.join(", ")+", got '"+(this.terminals_[ar]||ar)+"'":fr="Parse error on line "+(de+1)+": Unexpected "+(ar==ze?"end of input":"'"+(this.terminals_[ar]||ar)+"'"),this.parseError(fr,{text:Fe.match,token:this.terminals_[ar]||ar,line:Fe.yylineno,loc:We,expected:ot})}if(Qe[0]instanceof Array&&Qe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+ar);switch(Qe[0]){case 1:q.push(ar),ue.push(Fe.yytext),X.push(Fe.yylloc),q.push(Qe[1]),ar=null,ut?(ar=ut,ut=null):(Ie=Fe.yyleng,pe=Fe.yytext,de=Fe.yylineno,We=Fe.yylloc,Ne>0&&Ne--);break;case 2:if(pt=this.productions_[Qe[1]][1],yt.$=ue[ue.length-pt],yt._$={first_line:X[X.length-(pt||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(pt||1)].first_column,last_column:X[X.length-1].last_column},or&&(yt._$.range=[X[X.length-(pt||1)].range[0],X[X.length-1].range[1]]),qt=this.performAction.apply(yt,[pe,Ie,de,we.yy,Qe[1],ue,X].concat(qe)),typeof qt<"u")return qt;pt&&(q=q.slice(0,-1*pt*2),ue=ue.slice(0,-1*pt),X=X.slice(0,-1*pt)),q.push(this.productions_[Qe[1]][0]),ue.push(yt.$),X.push(yt._$),Wt=ae[q[q.length-2]][q[q.length-1]],q.push(Wt);break;case 3:return!0}}return!0},"parse")},Se=function(){var Oe={EOF:1,parseError:s(function(he,q){if(this.yy.parser)this.yy.parser.parseError(he,q);else throw new Error(he)},"parseError"),setInput:s(function(_e,he){return this.yy=he||this.yy||{},this._input=_e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var _e=this._input[0];this.yytext+=_e,this.yyleng++,this.offset++,this.match+=_e,this.matched+=_e;var he=_e.match(/(?:\r\n?|\n).*/g);return he?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_e},"input"),unput:s(function(_e){var he=_e.length,q=_e.split(/(?:\r\n?|\n)/g);this._input=_e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-he),this.offset-=he;var se=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),q.length-1&&(this.yylineno-=q.length-1);var ue=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:q?(q.length===se.length?this.yylloc.first_column:0)+se[se.length-q.length].length-q[0].length:this.yylloc.first_column-he},this.options.ranges&&(this.yylloc.range=[ue[0],ue[0]+this.yyleng-he]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(_e){this.unput(this.match.slice(_e))},"less"),pastInput:s(function(){var _e=this.matched.substr(0,this.matched.length-this.match.length);return(_e.length>20?"...":"")+_e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var _e=this.match;return _e.length<20&&(_e+=this._input.substr(0,20-_e.length)),(_e.substr(0,20)+(_e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var _e=this.pastInput(),he=new Array(_e.length+1).join("-");return _e+this.upcomingInput()+` +`+he+"^"},"showPosition"),test_match:s(function(_e,he){var q,se,ue;if(this.options.backtrack_lexer&&(ue={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ue.yylloc.range=this.yylloc.range.slice(0))),se=_e[0].match(/(?:\r\n?|\n).*/g),se&&(this.yylineno+=se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:se?se[se.length-1].length-se[se.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_e[0].length},this.yytext+=_e[0],this.match+=_e[0],this.matches=_e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_e[0].length),this.matched+=_e[0],q=this.performAction.call(this,this.yy,this,he,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var X in ue)this[X]=ue[X];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _e,he,q,se;this._more||(this.yytext="",this.match="");for(var ue=this._currentRules(),X=0;Xhe[0].length)){if(he=q,se=X,this.options.backtrack_lexer){if(_e=this.test_match(q,ue[X]),_e!==!1)return _e;if(this._backtrack){he=!1;continue}else return!1}else if(!this.options.flex)break}return he?(_e=this.test_match(he,ue[se]),_e!==!1?_e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var he=this.next();return he||this.lex()},"lex"),begin:s(function(he){this.conditionStack.push(he)},"begin"),popState:s(function(){var he=this.conditionStack.length-1;return he>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(he){return he=this.conditionStack.length-1-Math.abs(he||0),he>=0?this.conditionStack[he]:"INITIAL"},"topState"),pushState:s(function(he){this.begin(he)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(he,q,se,ue){var X=ue;switch(se){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:break;case 5:break;case 6:return this.begin("acc_title"),31;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),33;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 22:this.popState();break;case 23:return 71;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;break;case 29:return this.popState(),8;break;case 30:break;case 31:return this.begin("namespace-body"),37;break;case 32:return this.popState(),39;break;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),44;break;case 38:return this.popState(),8;break;case 39:break;case 40:return this.popState(),this.popState(),39;break;case 41:return this.begin("class-body"),37;break;case 42:return this.popState(),39;break;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:return 68;case 64:return 68;case 65:return 68;case 66:return 68;case 67:return 60;case 68:return 60;case 69:return 62;case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:return 84;case 84:return 84;case 85:return 85;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:return 83;case 95:return 83;case 96:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};return Oe}();Pe.lexer=Se;function Ue(){this.yy={}}return s(Ue,"Parser"),Ue.prototype=Pe,Pe.Parser=Ue,new Ue}();DN.parser=DN;qw=DN});var qce,nx,Wce=_(()=>{"use strict";gt();Qt();qce=["#","+","~","-",""],nx=class{static{s(this,"ClassMember")}constructor(e,r){this.memberType=r,this.visibility="",this.classifier="";let n=$r(e,le());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+uh(this.id);this.memberType==="method"&&(e+=`(${uh(this.parameters.trim())})`,this.returnType&&(e+=" : "+uh(this.returnType))),e=e.trim();let r=this.parseClassifier();return{displayText:e,cssStyle:r}}parseMember(e){let r="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){let a=i[1]?i[1].trim():"";if(qce.includes(a)&&(this.visibility=a),this.id=i[2].trim(),this.parameters=i[3]?i[3].trim():"",r=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",r===""){let o=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(o)&&(r=o,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,i=e.substring(0,1),a=e.substring(n-1);qce.includes(i)&&(this.visibility=i),/[$*]/.exec(a)&&(r=a),this.id=e.substring(this.visibility===""?0:1,r===""?n:n-1)}this.classifier=r}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}});var Yw,IN,Mi,Ww,Hce,Gu,MN,ix,x0,b0,FFe,Hw,Yce,zFe,$Fe,GFe,VFe,UFe,qFe,WFe,Xce,HFe,YFe,XFe,NN,jFe,KFe,QFe,ZFe,JFe,eze,tze,rze,jce,ON,nze,ize,aze,sze,oze,lze,cze,wg,PN=_(()=>{"use strict";Xt();it();gt();Qt();pr();Ci();Wce();Yw="classId-",IN=[],Mi=new Map,Ww=[],Hce=0,Gu=new Map,MN=0,ix=[],x0=s(t=>$e.sanitizeText(t,le()),"sanitizeText"),b0=s(function(t){let e=$e.sanitizeText(t,le()),r="",n=e;if(e.indexOf("~")>0){let i=e.split("~");n=x0(i[0]),r=x0(i[1])}return{className:n,type:r}},"splitClassNameAndType"),FFe=s(function(t,e){let r=$e.sanitizeText(t,le());e&&(e=x0(e));let{className:n}=b0(r);Mi.get(n).label=e},"setClassLabel"),Hw=s(function(t){let e=$e.sanitizeText(t,le()),{className:r,type:n}=b0(e);if(Mi.has(r))return;let i=$e.sanitizeText(r,le());Mi.set(i,{id:i,type:n,label:i,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:Yw+i+"-"+Hce}),Hce++},"addClass"),Yce=s(function(t){let e=$e.sanitizeText(t,le());if(Mi.has(e))return Mi.get(e).domId;throw new Error("Class not found: "+e)},"lookUpDomId"),zFe=s(function(){IN=[],Mi=new Map,Ww=[],ix=[],ix.push(jce),Gu=new Map,MN=0,ON="TB",br()},"clear"),$Fe=s(function(t){return Mi.get(t)},"getClass"),GFe=s(function(){return Mi},"getClasses"),VFe=s(function(){return IN},"getRelations"),UFe=s(function(){return Ww},"getNotes"),qFe=s(function(t){V.debug("Adding relation: "+JSON.stringify(t)),Hw(t.id1),Hw(t.id2),t.id1=b0(t.id1).className,t.id2=b0(t.id2).className,t.relationTitle1=$e.sanitizeText(t.relationTitle1.trim(),le()),t.relationTitle2=$e.sanitizeText(t.relationTitle2.trim(),le()),IN.push(t)},"addRelation"),WFe=s(function(t,e){let r=b0(t).className;Mi.get(r).annotations.push(e)},"addAnnotation"),Xce=s(function(t,e){Hw(t);let r=b0(t).className,n=Mi.get(r);if(typeof e=="string"){let i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(x0(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(new nx(i,"method")):i&&n.members.push(new nx(i,"attribute"))}},"addMember"),HFe=s(function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Xce(t,r)))},"addMembers"),YFe=s(function(t,e){let r={id:`note${Ww.length}`,class:e,text:t};Ww.push(r)},"addNote"),XFe=s(function(t){return t.startsWith(":")&&(t=t.substring(1)),x0(t.trim())},"cleanupLabel"),NN=s(function(t,e){t.split(",").forEach(function(r){let n=r;/\d/.exec(r[0])&&(n=Yw+n);let i=Mi.get(n);i&&i.cssClasses.push(e)})},"setCssClass"),jFe=s(function(t,e){t.split(",").forEach(function(r){e!==void 0&&(Mi.get(r).tooltip=x0(e))})},"setTooltip"),KFe=s(function(t,e){return e&&Gu.has(e)?Gu.get(e).classes.get(t).tooltip:Mi.get(t).tooltip},"getTooltip"),QFe=s(function(t,e,r){let n=le();t.split(",").forEach(function(i){let a=i;/\d/.exec(i[0])&&(a=Yw+a);let o=Mi.get(a);o&&(o.link=dt.formatUrl(e,n),n.securityLevel==="sandbox"?o.linkTarget="_top":typeof r=="string"?o.linkTarget=x0(r):o.linkTarget="_blank")}),NN(t,"clickable")},"setLink"),ZFe=s(function(t,e,r){t.split(",").forEach(function(n){JFe(n,e,r),Mi.get(n).haveCallback=!0}),NN(t,"clickable")},"setClickEvent"),JFe=s(function(t,e,r){let n=$e.sanitizeText(t,le());if(le().securityLevel!=="loose"||e===void 0)return;let a=n;if(Mi.has(a)){let o=Yce(a),l=[];if(typeof r=="string"){l=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),Me(this).classed("hover",!1)})},"setupToolTips");ix.push(jce);ON="TB",nze=s(()=>ON,"getDirection"),ize=s(t=>{ON=t},"setDirection"),aze=s(function(t){Gu.has(t)||(Gu.set(t,{id:t,classes:new Map,children:{},domId:Yw+t+"-"+MN}),MN++)},"addNamespace"),sze=s(function(t){return Gu.get(t)},"getNamespace"),oze=s(function(){return Gu},"getNamespaces"),lze=s(function(t,e){if(Gu.has(t))for(let r of e){let{className:n}=b0(r);Mi.get(n).parent=t,Gu.get(t).classes.set(n,Mi.get(n))}},"addClassesToNamespace"),cze=s(function(t,e){let r=Mi.get(t);if(!(!e||!r))for(let n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),wg={setAccTitle:Ar,getAccTitle:Gr,getAccDescription:Ur,setAccDescription:Vr,getConfig:s(()=>le().class,"getConfig"),addClass:Hw,bindFunctions:eze,clear:zFe,getClass:$Fe,getClasses:GFe,getNotes:UFe,addAnnotation:WFe,addNote:YFe,getRelations:VFe,addRelation:qFe,getDirection:nze,setDirection:ize,addMember:Xce,addMembers:HFe,cleanupLabel:XFe,lineType:tze,relationType:rze,setClickEvent:ZFe,setCssClass:NN,setLink:QFe,getTooltip:KFe,setTooltip:jFe,lookUpDomId:Yce,setDiagramTitle:an,getDiagramTitle:Qr,setClassLabel:FFe,addNamespace:aze,addClassesToNamespace:lze,getNamespace:sze,getNamespaces:oze,setCssStyle:cze}});var uze,Xw,BN=_(()=>{"use strict";uze=s(t=>`g.classGroup text { + fill: ${t.nodeBorder||t.classText}; + stroke: none; + font-family: ${t.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${t.classText}; +} +.edgeLabel .label rect { + fill: ${t.mainBkg}; +} +.label text { + fill: ${t.classText}; +} +.edgeLabel .label span { + background: ${t.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.classGroup line { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${t.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${t.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),Xw=uze});var Kce,hze,fze,Zce,dze,Qce,jw,Jce=_(()=>{"use strict";Xt();pr();it();Qt();Kce=0,hze=s(function(t,e,r,n,i){let a=s(function(b){switch(b){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");e.points=e.points.filter(b=>!Number.isNaN(b.y));let o=e.points,l=ra().x(function(b){return b.x}).y(function(b){return b.y}).curve(hs),u=t.append("path").attr("d",l(o)).attr("id","edge"+Kce).attr("class","relation"),h="";n.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),r.relation.lineType==1&&u.attr("class","relation dashed-line"),r.relation.lineType==10&&u.attr("class","relation dotted-line"),r.relation.type1!=="none"&&u.attr("marker-start","url("+h+"#"+a(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&u.attr("marker-end","url("+h+"#"+a(r.relation.type2)+"End)");let f,d,p=e.points.length,m=dt.calcLabelPosition(e.points);f=m.x,d=m.y;let g,y,v,x;if(p%2!==0&&p>1){let b=dt.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),k=dt.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);V.debug("cardinality_1_point "+JSON.stringify(b)),V.debug("cardinality_2_point "+JSON.stringify(k)),g=b.x,y=b.y,v=k.x,x=k.y}if(r.title!==void 0){let b=t.append("g").attr("class","classLabel"),k=b.append("text").attr("class","label").attr("x",f).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=k;let A=k.node().getBBox();b.insert("rect",":first-child").attr("class","box").attr("x",A.x-n.padding/2).attr("y",A.y-n.padding/2).attr("width",A.width+n.padding).attr("height",A.height+n.padding)}V.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",g).attr("y",y).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",v).attr("y",x).attr("fill","black").attr("font-size","6").text(r.relationTitle2),Kce++},"drawEdge"),fze=s(function(t,e,r,n){V.debug("Rendering class ",e,r);let i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup"),l;e.link?l=o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):l=o.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let u=!0;e.annotations.forEach(function(k){let A=l.append("tspan").text("\xAB"+k+"\xBB");u||A.attr("dy",r.textHeight),u=!1});let h=Zce(e),f=l.append("tspan").text(h).attr("class","title");u||f.attr("dy",r.textHeight);let d=l.node().getBBox().height,p,m,g;if(e.members.length>0){p=o.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin/2).attr("y2",r.padding+d+r.dividerMargin/2);let k=o.append("text").attr("x",r.padding).attr("y",d+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");u=!0,e.members.forEach(function(A){Qce(k,A,u,r),u=!1}),m=k.node().getBBox()}if(e.methods.length>0){g=o.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin+m.height).attr("y2",r.padding+d+r.dividerMargin+m.height);let k=o.append("text").attr("x",r.padding).attr("y",d+2*r.dividerMargin+m.height+r.textHeight).attr("fill","white").attr("class","classText");u=!0,e.methods.forEach(function(A){Qce(k,A,u,r),u=!1})}let y=o.node().getBBox();var v=" ";e.cssClasses.length>0&&(v=v+e.cssClasses.join(" "));let b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y.width+2*r.padding).attr("height",y.height+r.padding+.5*r.dividerMargin).attr("class",v).node().getBBox().width;return l.node().childNodes.forEach(function(k){k.setAttribute("x",(b-k.getBBox().width)/2)}),e.tooltip&&l.insert("title").text(e.tooltip),p&&p.attr("x2",b),g&&g.attr("x2",b),a.width=b,a.height=y.height+r.padding+.5*r.dividerMargin,a},"drawClass"),Zce=s(function(t){let e=t.id;return t.type&&(e+="<"+uh(t.type)+">"),e},"getClassTitleString"),dze=s(function(t,e,r,n){V.debug("Rendering note ",e,r);let i=e.id,a={id:i,text:e.text,width:0,height:0},o=t.append("g").attr("id",i).attr("class","classGroup"),l=o.append("text").attr("y",r.textHeight+r.padding).attr("x",0),u=JSON.parse(`"${e.text}"`).split(` +`);u.forEach(function(p){V.debug(`Adding line: ${p}`),l.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});let h=o.node().getBBox(),d=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*r.padding).attr("height",h.height+u.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return l.node().childNodes.forEach(function(p){p.setAttribute("x",(d-p.getBBox().width)/2)}),a.width=d,a.height=h.height+u.length*r.textHeight+r.padding+.5*r.dividerMargin,a},"drawNote"),Qce=s(function(t,e,r,n){let{displayText:i,cssStyle:a}=e.getDisplayDetails(),o=t.append("tspan").attr("x",n.padding).text(i);a!==""&&o.attr("style",e.cssStyle),r||o.attr("dy",n.textHeight)},"addTspan"),jw={getClassTitleString:Zce,drawClass:fze,drawEdge:hze,drawNote:dze}});var Qw,Kw,ax,pze,mze,eue,tue=_(()=>{"use strict";Xt();Dd();la();it();Jce();Un();gt();Qw={},Kw=20,ax=s(function(t){let e=Object.entries(Qw).find(r=>r[1].label===t);if(e)return e[0]},"getGraphId"),pze=s(function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),mze=s(function(t,e,r,n){let i=le().class;Qw={},V.info("Rendering diagram "+t);let a=le().securityLevel,o;a==="sandbox"&&(o=Me("#i"+e));let l=a==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body"),u=l.select(`[id='${e}']`);pze(u);let h=new ir({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});let f=n.db.getClasses(),d=[...f.keys()];for(let b of d){let k=f.get(b),A=jw.drawClass(u,k,i,n);Qw[A.id]=A,h.setNode(A.id,A),V.info("Org height: "+A.height)}n.db.getRelations().forEach(function(b){V.info("tjoho"+ax(b.id1)+ax(b.id2)+JSON.stringify(b)),h.setEdge(ax(b.id1),ax(b.id2),{relation:b},b.title||"DEFAULT")}),n.db.getNotes().forEach(function(b){V.debug(`Adding note: ${JSON.stringify(b)}`);let k=jw.drawNote(u,b,i,n);Qw[k.id]=k,h.setNode(k.id,k),b.class&&f.has(b.class)&&h.setEdge(b.id,ax(b.class),{relation:{id1:b.id,id2:b.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),eo(h),h.nodes().forEach(function(b){b!==void 0&&h.node(b)!==void 0&&(V.debug("Node "+b+": "+JSON.stringify(h.node(b))),l.select("#"+(n.db.lookUpDomId(b)||b)).attr("transform","translate("+(h.node(b).x-h.node(b).width/2)+","+(h.node(b).y-h.node(b).height/2)+" )"))}),h.edges().forEach(function(b){b!==void 0&&h.edge(b)!==void 0&&(V.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(h.edge(b))),jw.drawEdge(u,h.edge(b),h.edge(b).relation,i,n))});let g=u.node().getBBox(),y=g.width+Kw*2,v=g.height+Kw*2;xr(u,v,y,i.useMaxWidth);let x=`${g.x-Kw} ${g.y-Kw} ${y} ${v}`;V.debug(`viewBox ${x}`),u.attr("viewBox",x)},"draw"),eue={draw:mze}});var rue={};ur(rue,{diagram:()=>gze});var gze,nue=_(()=>{"use strict";RN();PN();BN();tue();gze={parser:qw,db:wg,renderer:eue,styles:Xw,init:s(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,wg.clear()},"init")}});var bze,kze,wze,Tze,Eze,Cze,Sze,_ze,Aze,Lze,Dze,Zw,FN=_(()=>{"use strict";it();bze=s((t,e,r,n)=>{e.forEach(i=>{Dze[i](t,r,n)})},"insertMarkers"),kze=s((t,e,r)=>{V.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),wze=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Tze=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Eze=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Cze=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Sze=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),_ze=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Aze=s((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Lze=s((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Dze={extension:kze,composition:wze,aggregation:Tze,dependency:Eze,lollipop:Cze,point:Sze,circle:_ze,cross:Aze,barb:Lze},Zw=bze});var Kt,El,sue,oue,eT,Rze,lue,cue,Tg,Jw,uue,hue,fue,due,pue=_(()=>{"use strict";it();vv();la();Kt={},El={},sue={},oue=s(()=>{El={},sue={},Kt={}},"clear"),eT=s((t,e)=>(V.trace("In isDescendant",e," ",t," = ",El[e].includes(t)),!!El[e].includes(t)),"isDescendant"),Rze=s((t,e)=>(V.info("Descendants of ",e," is ",El[e]),V.info("Edge is ",t),t.v===e||t.w===e?!1:El[e]?El[e].includes(t.v)||eT(t.v,e)||eT(t.w,e)||El[e].includes(t.w):(V.debug("Tilt, ",e,",not in descendants"),!1)),"edgeInCluster"),lue=s((t,e,r,n)=>{V.warn("Copying children of ",t,"root",n,"data",e.node(t),n);let i=e.children(t)||[];t!==n&&i.push(t),V.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)lue(a,e,r,n);else{let o=e.node(a);V.info("cp ",a," to ",n," with parent ",t),r.setNode(a,o),n!==e.parent(a)&&(V.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(V.debug("Setting parent",a,t),r.setParent(a,t)):(V.info("In copy ",t,"root",n,"data",e.node(t),n),V.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));let l=e.edges(a);V.debug("Copying Edges",l),l.forEach(u=>{V.info("Edge",u);let h=e.edge(u.v,u.w,u.name);V.info("Edge data",h,n);try{Rze(u,n)?(V.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),V.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):V.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(f){V.error(f)}})}V.debug("Removing node",a),e.removeNode(a)})},"copy"),cue=s((t,e)=>{let r=e.children(t),n=[...r];for(let i of r)sue[i]=t,n=[...n,...cue(i,e)];return n},"extractDescendants"),Tg=s((t,e)=>{V.trace("Searching",t);let r=e.children(t);if(V.trace("Searching children of id ",t,r),r.length<1)return V.trace("This is a valid node",t),t;for(let n of r){let i=Tg(n,e);if(i)return V.trace("Found replacement for",t," => ",i),i}},"findNonClusterChild"),Jw=s(t=>!Kt[t]||!Kt[t].externalConnections?t:Kt[t]?Kt[t].id:t,"getAnchorId"),uue=s((t,e)=>{if(!t||e>10){V.debug("Opting out, no graph ");return}else V.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(V.warn("Cluster identified",r," Replacement id in edges: ",Tg(r,t)),El[r]=cue(r,t),Kt[r]={id:Tg(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){let n=t.children(r),i=t.edges();n.length>0?(V.debug("Cluster identified",r,El),i.forEach(a=>{if(a.v!==r&&a.w!==r){let o=eT(a.v,r),l=eT(a.w,r);o^l&&(V.warn("Edge: ",a," leaves cluster ",r),V.warn("Descendants of XXX ",r,": ",El[r]),Kt[r].externalConnections=!0)}})):V.debug("Not a cluster ",r,El)});for(let r of Object.keys(Kt)){let n=Kt[r].id,i=t.parent(n);i!==r&&Kt[i]&&!Kt[i].externalConnections&&(Kt[r].id=i)}t.edges().forEach(function(r){let n=t.edge(r);V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),V.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(V.warn("Fix XXX",Kt,"ids:",r.v,r.w,"Translating: ",Kt[r.v]," --- ",Kt[r.w]),Kt[r.v]&&Kt[r.w]&&Kt[r.v]===Kt[r.w]){V.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),V.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=Jw(r.v),a=Jw(r.w),t.removeEdge(r.v,r.w,r.name);let o=r.w+"---"+r.v;t.setNode(o,{domId:o,id:o,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});let l=structuredClone(n),u=structuredClone(n);l.label="",l.arrowTypeEnd="none",u.label="",l.fromCluster=r.v,u.toCluster=r.v,t.setEdge(i,o,l,r.name+"-cyclic-special"),t.setEdge(o,a,u,r.name+"-cyclic-special")}else if(Kt[r.v]||Kt[r.w]){if(V.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=Jw(r.v),a=Jw(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v){let o=t.parent(i);Kt[o].externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=t.parent(a);Kt[o].externalConnections=!0,n.toCluster=r.w}V.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name)}}),V.warn("Adjusted Graph",Mn(t)),hue(t,0),V.trace(Kt)},"adjustClustersAndEdges"),hue=s((t,e)=>{if(V.warn("extractor - ",e,Mn(t),t.children("D")),e>10){V.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i of r){let a=t.children(i);n=n||a.length>0}if(!n){V.debug("Done, no node has children",t.nodes());return}V.debug("Nodes = ",r,e);for(let i of r)if(V.debug("Extracting node",i,Kt,Kt[i]&&!Kt[i].externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),!Kt[i])V.debug("Not a cluster",i,e);else if(!Kt[i].externalConnections&&t.children(i)&&t.children(i).length>0){V.warn("Cluster without external connections, without a parent and with children",i,e);let o=t.graph().rankdir==="TB"?"LR":"TB";Kt[i]?.clusterData?.dir&&(o=Kt[i].clusterData.dir,V.warn("Fixing dir",Kt[i].clusterData.dir,o));let l=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});V.warn("Old graph before copy",Mn(t)),lue(i,t,l,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:Kt[i].clusterData,labelText:Kt[i].labelText,graph:l}),V.warn("New graph after copy node: (",i,")",Mn(l)),V.debug("Old graph after copy",Mn(t))}else V.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Kt[i].externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),V.debug(Kt);r=t.nodes(),V.warn("New list of nodes",r);for(let i of r){let a=t.node(i);V.warn(" Now next level",i,a),a.clusterNode&&hue(a.graph,e+1)}},"extractor"),fue=s((t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(n=>{let i=t.children(n),a=fue(t,i);r=[...r,...a]}),r},"sorter"),due=s(t=>fue(t,t.children()),"sortNodesByHierarchy")});var Mze,Ize,Nze,Oze,Pze,mue,gue,yue,vue=_(()=>{"use strict";PA();it();rv();ic();Xt();gt();Qt();gd();Mze=s((t,e)=>{V.info("Creating subgraph rect for ",e.id,e);let r=le(),n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),a=hr(r.flowchart.htmlLabels),o=n.insert("g").attr("class","cluster-label"),l=e.labelType==="markdown"?vs(o,e.labelText,{style:e.labelStyle,useHtmlLabels:a},r):o.node().appendChild(Hi(e.labelText,e.labelStyle,void 0,!0)),u=l.getBBox();if(hr(r.flowchart.htmlLabels)){let g=l.children[0],y=Me(l);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}let h=0*e.padding,f=h/2,d=e.width<=u.width+h?u.width+h:e.width;e.width<=u.width+h?e.diff=(u.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,V.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-d/2).attr("y",e.y-e.height/2-f).attr("width",d).attr("height",e.height+h);let{subGraphTitleTopMargin:p}=Ks(r);a?o.attr("transform",`translate(${e.x-u.width/2}, ${e.y-e.height/2+p})`):o.attr("transform",`translate(${e.x}, ${e.y-e.height/2+p})`);let m=i.node().getBBox();return e.width=m.width,e.height=m.height,e.intersect=function(g){return md(e,g)},n},"rect"),Ize=s((t,e)=>{let r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(l){return md(e,l)},r},"noteGroup"),Nze=s((t,e)=>{let r=le(),n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=n.insert("g").attr("class","cluster-label"),o=n.append("rect"),l=a.node().appendChild(Hi(e.labelText,e.labelStyle,void 0,!0)),u=l.getBBox();if(hr(r.flowchart.htmlLabels)){let g=l.children[0],y=Me(l);u=g.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height)}u=l.getBBox();let h=0*e.padding,f=h/2,d=e.width<=u.width+e.padding?u.width+e.padding:e.width;e.width<=u.width+e.padding?e.diff=(u.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f).attr("width",d+h).attr("height",e.height+h),o.attr("class","inner").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f+u.height-1).attr("width",d+h).attr("height",e.height+h-u.height-3);let{subGraphTitleTopMargin:p}=Ks(r);a.attr("transform",`translate(${e.x-u.width/2}, ${e.y-e.height/2-e.padding/3+(hr(r.flowchart.htmlLabels)?5:3)+p})`);let m=i.node().getBBox();return e.height=m.height,e.intersect=function(g){return md(e,g)},n},"roundedWithTitle"),Oze=s((t,e)=>{let r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);let o=n.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(l){return md(e,l)},r},"divider"),Pze={rect:Mze,roundedWithTitle:Nze,noteGroup:Ize,divider:Oze},mue={},gue=s((t,e)=>{V.trace("Inserting cluster");let r=e.shape||"rect";mue[e.id]=Pze[r](t,e)},"insertCluster"),yue=s(()=>{mue={}},"clear")});var bue,Bze,xue,kue=_(()=>{"use strict";it();bue=s((t,e,r,n,i)=>{e.arrowTypeStart&&xue(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&xue(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),Bze={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},xue=s((t,e,r,n,i,a)=>{let o=Bze[r];if(!o){V.warn(`Unknown arrow type: ${r}`);return}let l=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${o}${l})`)},"addEdgeMarker")});function tT(t,e){le().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}var rT,da,Tue,nT,iT,Fze,zze,wue,aT,zN=_(()=>{"use strict";it();rv();ic();Xt();gt();pr();Qt();a9();gd();kue();rT={},da={},Tue=s(()=>{rT={},da={}},"clear"),nT=s((t,e)=>{let r=le(),n=hr(r.flowchart.htmlLabels),i=e.labelType==="markdown"?vs(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):Hi(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label");o.node().appendChild(i);let l=i.getBBox();if(n){let h=i.children[0],f=Me(i);l=h.getBoundingClientRect(),f.attr("width",l.width),f.attr("height",l.height)}o.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),rT[e.id]=a,e.width=l.width,e.height=l.height;let u;if(e.startLabelLeft){let h=Hi(e.startLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),da[e.id]||(da[e.id]={}),da[e.id].startLeft=f,tT(u,e.startLabelLeft)}if(e.startLabelRight){let h=Hi(e.startLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=f.node().appendChild(h),d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),da[e.id]||(da[e.id]={}),da[e.id].startRight=f,tT(u,e.startLabelRight)}if(e.endLabelLeft){let h=Hi(e.endLabelLeft,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),da[e.id]||(da[e.id]={}),da[e.id].endLeft=f,tT(u,e.endLabelLeft)}if(e.endLabelRight){let h=Hi(e.endLabelRight,e.labelStyle),f=t.insert("g").attr("class","edgeTerminals"),d=f.insert("g").attr("class","inner");u=d.node().appendChild(h);let p=h.getBBox();d.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),f.node().appendChild(h),da[e.id]||(da[e.id]={}),da[e.id].endRight=f,tT(u,e.endLabelRight)}return i},"insertEdgeLabel");s(tT,"setTerminalWidth");iT=s((t,e)=>{V.debug("Moving label abc88 ",t.id,t.label,rT[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,n=le(),{subGraphTitleTotalMargin:i}=Ks(n);if(t.label){let a=rT[t.id],o=t.x,l=t.y;if(r){let u=dt.calcLabelPosition(r);V.debug("Moving label "+t.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(t.startLabelLeft){let a=da[t.id].startLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.startLabelRight){let a=da[t.id].startRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelLeft){let a=da[t.id].endLeft,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(t.endLabelRight){let a=da[t.id].endRight,o=t.x,l=t.y;if(r){let u=dt.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),Fze=s((t,e)=>{let r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),o=t.width/2,l=t.height/2;return i>=o||a>=l},"outsideNode"),zze=s((t,e,r)=>{V.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(e)} + insidePoint : ${JSON.stringify(r)} + node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,a=Math.abs(n-r.x),o=t.width/2,l=r.xMath.abs(n-e.x)*u){let d=r.y{V.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(!Fze(e,a)&&!i){let o=zze(e,n,a),l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)||r.push(o),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),aT=s(function(t,e,r,n,i,a,o){let l=r.points;V.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1,h=a.node(e.v);var f=a.node(e.w);f?.intersect&&h?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(h.intersect(l[0])),l.push(f.intersect(l[l.length-1]))),r.toCluster&&(V.debug("to cluster abc88",n[r.toCluster]),l=wue(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(V.debug("from cluster abc88",n[r.fromCluster]),l=wue(l.reverse(),n[r.fromCluster].node).reverse(),u=!0);let d=l.filter(A=>!Number.isNaN(A.y)),p=hs;r.curve&&(i==="graph"||i==="flowchart")&&(p=r.curve);let{x:m,y:g}=y5(r),y=ra().x(m).y(g).curve(p),v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}let x=t.append("path").attr("d",y(d)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";(le().flowchart.arrowMarkerAbsolute||le().state.arrowMarkerAbsolute)&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),bue(x,r,b,o,i);let k={};return u&&(k.updatedPath=l),k.originalPath=r.points,k},"insertEdge")});var Eue,Cue,Sue=_(()=>{"use strict";Dd();vv();FN();t5();pue();r5();vue();zN();it();gd();gt();Eue=s(async(t,e,r,n,i,a)=>{V.info("Graph in recursive render: XXX",Mn(e),i);let o=e.graph().rankdir;V.trace("Dir in recursive render - dir:",o);let l=t.insert("g").attr("class","root");e.nodes()?V.info("Recursive render XXX",e.nodes()):V.info("No nodes found for",e),e.edges().length>0&&V.trace("Recursive edges",e.edge(e.edges()[0]));let u=l.insert("g").attr("class","clusters"),h=l.insert("g").attr("class","edgePaths"),f=l.insert("g").attr("class","edgeLabels"),d=l.insert("g").attr("class","nodes");await Promise.all(e.nodes().map(async function(g){let y=e.node(g);if(i!==void 0){let v=JSON.parse(JSON.stringify(i.clusterData));V.info("Setting data for cluster XXX (",g,") ",v,i),e.setNode(i.id,v),e.parent(g)||(V.trace("Setting parent",g,i.id),e.setParent(g,i.id,v))}if(V.info("(Insert) Node XXX"+g+": "+JSON.stringify(e.node(g))),y?.clusterNode){V.info("Cluster identified",g,y.width,e.node(g));let{ranksep:v,nodesep:x}=e.graph();y.graph.setGraph({...y.graph.graph(),ranksep:v,nodesep:x});let b=await Eue(d,y.graph,r,n,e.node(g),a),k=b.elem;mn(y,k),y.diff=b.diff||0,V.info("Node bounds (abc123)",g,y,y.width,y.x,y.y),dX(k,y),V.warn("Recursive render complete ",k,y)}else e.children(g).length>0?(V.info("Cluster - the non recursive path XXX",g,y.id,y,e),V.info(Tg(y.id,e)),Kt[y.id]={id:Tg(y.id,e),node:y}):(V.info("Node - the non recursive path",g,y.id,y),await Zp(d,e.node(g),o))})),e.edges().forEach(async function(g){let y=e.edge(g.v,g.w,g.name);V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g)),V.info("Edge "+g.v+" -> "+g.w+": ",g," ",JSON.stringify(e.edge(g))),V.info("Fix",Kt,"ids:",g.v,g.w,"Translating: ",Kt[g.v],Kt[g.w]),await nT(f,y)}),e.edges().forEach(function(g){V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(g))}),V.info("Graph before layout:",JSON.stringify(Mn(e))),V.info("#############################################"),V.info("### Layout ###"),V.info("#############################################"),V.info(e),eo(e),V.info("Graph after layout:",JSON.stringify(Mn(e)));let p=0,{subGraphTitleTotalMargin:m}=Ks(a);return due(e).forEach(function(g){let y=e.node(g);V.info("Position "+g+": "+JSON.stringify(e.node(g))),V.info("Position "+g+": ("+y.x,","+y.y,") width: ",y.width," height: ",y.height),y?.clusterNode?(y.y+=m,nv(y)):e.children(g).length>0?(y.height+=m,gue(u,y),Kt[y.id].node=y):(y.y+=m/2,nv(y))}),e.edges().forEach(function(g){let y=e.edge(g);V.info("Edge "+g.v+" -> "+g.w+": "+JSON.stringify(y),y),y.points.forEach(x=>x.y+=m/2);let v=aT(h,g,y,Kt,r,e,n);iT(y,v)}),e.nodes().forEach(function(g){let y=e.node(g);V.info(g,y.type,y.diff),y.type==="group"&&(p=y.diff)}),{elem:l,diff:p}},"recursiveRender"),Cue=s(async(t,e,r,n,i)=>{Zw(t,r,n,i),pX(),Tue(),yue(),oue(),V.warn("Graph at first:",JSON.stringify(Mn(e))),uue(e),V.warn("Graph after:",JSON.stringify(Mn(e)));let a=le();await Eue(t,e,n,i,void 0,a)},"render")});function _ue(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}var GN,$N,$ze,Aue,Gze,Vze,Uze,qze,Lue,Due=_(()=>{"use strict";Xt();la();it();gt();Sue();pr();pr();Un();Qt();GN=s(t=>$e.sanitizeText(t,le()),"sanitizeText"),$N={dividerMargin:10,padding:5,textHeight:10,curve:void 0},$ze=s(function(t,e,r,n){V.info("keys:",[...t.keys()]),V.info(t),t.forEach(function(i){let o={shape:"rect",id:i.id,domId:i.domId,labelText:GN(i.id),labelStyle:"",style:"fill: none; stroke: black",padding:le().flowchart?.padding??le().class?.padding};e.setNode(i.id,o),Aue(i.classes,e,r,n,i.id),V.info("setNode",o)})},"addNamespaces"),Aue=s(function(t,e,r,n,i){V.info("keys:",[...t.keys()]),V.info(t),[...t.values()].filter(a=>a.parent===i).forEach(function(a){let o=a.cssClasses.join(" "),l=Hp(a.styles),u=a.label??a.id,h=0,d={labelStyle:l.labelStyle,shape:"class_box",labelText:GN(u),classData:a,rx:h,ry:h,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,i)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:le().flowchart?.padding??le().class?.padding};e.setNode(a.id,d),i&&e.setParent(a.id,i),V.info("setNode",d)})},"addClasses"),Gze=s(function(t,e,r,n){V.info(t),t.forEach(function(i,a){let o=i,l="",u={labelStyle:"",style:""},h=o.text,f=0,p={labelStyle:u.labelStyle,shape:"note",labelText:GN(h),noteData:o,rx:f,ry:f,class:l,style:u.style,id:o.id,domId:o.id,tooltip:"",type:"note",padding:le().flowchart?.padding??le().class?.padding};if(e.setNode(o.id,p),V.info("setNode",p),!o.class||!n.has(o.class))return;let m=r+a,g={id:`edgeNote${m}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:Wp($N.curve,uu)};e.setEdge(o.id,o.class,g,m)})},"addNotes"),Vze=s(function(t,e){let r=le().flowchart,n=0;t.forEach(function(i){n++;let a={classes:"relation",pattern:i.relation.lineType==1?"dashed":"solid",id:$3(i.id1,i.id2,{prefix:"id",counter:n}),arrowhead:i.type==="arrow_open"?"none":"normal",startLabelRight:i.relationTitle1==="none"?"":i.relationTitle1,endLabelLeft:i.relationTitle2==="none"?"":i.relationTitle2,arrowTypeStart:_ue(i.relation.type1),arrowTypeEnd:_ue(i.relation.type2),style:"fill:none",labelStyle:"",curve:Wp(r?.curve,uu)};if(V.info(a,i),i.style!==void 0){let o=Hp(i.style);a.style=o.style,a.labelStyle=o.labelStyle}i.text=i.title,i.text===void 0?i.style!==void 0&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",le().flowchart?.htmlLabels??le().htmlLabels?(a.labelType="html",a.label=''+i.text+""):(a.labelType="text",a.label=i.text.replace($e.lineBreakRegex,` +`),i.style===void 0&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(i.id1,i.id2,a,n)})},"addRelations"),Uze=s(function(t){$N={...$N,...t}},"setConf"),qze=s(async function(t,e,r,n){V.info("Drawing class - ",e);let i=le().flowchart??le().class,a=le().securityLevel;V.info("config:",i);let o=i?.nodeSpacing??50,l=i?.rankSpacing??50,u=new ir({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=n.db.getNamespaces(),f=n.db.getClasses(),d=n.db.getRelations(),p=n.db.getNotes();V.info(d),$ze(h,u,e,n),Aue(f,u,e,n),Vze(d,u),Gze(p,u,d.length+1,f);let m;a==="sandbox"&&(m=Me("#i"+e));let g=a==="sandbox"?Me(m.nodes()[0].contentDocument.body):Me("body"),y=g.select(`[id="${e}"]`),v=g.select("#"+e+" g");if(await Cue(v,u,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),dt.insertTitle(y,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),ql(u,y,i?.diagramPadding,i?.useMaxWidth),!i?.htmlLabels){let x=a==="sandbox"?m.nodes()[0].contentDocument:document,b=x.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let k of b){let A=k.getBBox(),w=x.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("rx",0),w.setAttribute("ry",0),w.setAttribute("width",A.width),w.setAttribute("height",A.height),k.insertBefore(w,k.firstChild)}}},"draw");s(_ue,"getArrowMarker");Lue={setConf:Uze,draw:qze}});var Rue={};ur(Rue,{diagram:()=>Wze});var Wze,Mue=_(()=>{"use strict";RN();PN();BN();Due();Wze={parser:qw,db:wg,renderer:Lue,styles:Xw,init:s(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,wg.clear()},"init")}});var VN,sT,UN=_(()=>{"use strict";VN=function(){var t=s(function(z,N,U,$){for(U=U||{},$=z.length;$--;U[z[$]]=N);return U},"o"),e=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],l=[1,16],u=[1,17],h=[1,18],f=[1,19],d=[1,32],p=[1,20],m=[1,21],g=[1,22],y=[1,23],v=[1,24],x=[1,26],b=[1,27],k=[1,28],A=[1,29],w=[1,30],T=[1,31],C=[1,34],E=[1,35],S=[1,36],R=[1,37],D=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],P=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],F={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:s(function(N,U,$,W,ee,te,ce){var Z=te.length-1;switch(ee){case 3:return W.setRootDoc(te[Z]),te[Z];break;case 4:this.$=[];break;case 5:te[Z]!="nl"&&(te[Z-1].push(te[Z]),this.$=te[Z-1]);break;case 6:case 7:this.$=te[Z];break;case 8:this.$="nl";break;case 12:this.$=te[Z];break;case 13:let Q=te[Z-1];Q.description=W.trimColon(te[Z]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:te[Z-2],state2:te[Z]};break;case 15:let K=W.trimColon(te[Z]);this.$={stmt:"relation",state1:te[Z-3],state2:te[Z-1],description:K};break;case 19:this.$={stmt:"state",id:te[Z-3],type:"default",description:"",doc:te[Z-1]};break;case 20:var fe=te[Z],ne=te[Z-2].trim();if(te[Z].match(":")){var H=te[Z].split(":");fe=H[0],ne=[ne,H[1]]}this.$={stmt:"state",id:fe,type:"default",description:ne};break;case 21:this.$={stmt:"state",id:te[Z-3],type:"default",description:te[Z-5],doc:te[Z-1]};break;case 22:this.$={stmt:"state",id:te[Z],type:"fork"};break;case 23:this.$={stmt:"state",id:te[Z],type:"join"};break;case 24:this.$={stmt:"state",id:te[Z],type:"choice"};break;case 25:this.$={stmt:"state",id:W.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:te[Z-1].trim(),note:{position:te[Z-2].trim(),text:te[Z].trim()}};break;case 29:this.$=te[Z].trim(),W.setAccTitle(this.$);break;case 30:case 31:this.$=te[Z].trim(),W.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:te[Z-1].trim(),classes:te[Z].trim()};break;case 34:this.$={stmt:"style",id:te[Z-1].trim(),styleClass:te[Z].trim()};break;case 35:this.$={stmt:"applyClass",id:te[Z-1].trim(),styleClass:te[Z].trim()};break;case 36:W.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:W.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:W.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:W.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:te[Z].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:te[Z-2].trim(),classes:[te[Z].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:te[Z-2].trim(),classes:[te[Z].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(P,[2,42],{55:[1,54]}),t(P,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:d,54:D},t(L,[2,17]),t(M,i,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,68],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(P,[2,44]),t(P,[2,45]),t(L,[2,15]),t(L,[2,19]),t(M,i,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,73],22:f,24:d,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:k,38:A,42:w,45:T,48:C,49:E,50:S,51:R,54:D},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:s(function(N,U){if(U.recoverable)this.trace(N);else{var $=new Error(N);throw $.hash=U,$}},"parseError"),parse:s(function(N){var U=this,$=[0],W=[],ee=[null],te=[],ce=this.table,Z="",fe=0,ne=0,H=0,Q=2,K=1,re=te.slice.call(arguments,1),ie=Object.create(this.lexer),ye={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(ye.yy[j]=this.yy[j]);ie.setInput(N,ye.yy),ye.yy.lexer=ie,ye.yy.parser=this,typeof ie.yylloc>"u"&&(ie.yylloc={});var De=ie.yylloc;te.push(De);var oe=ie.options&&ie.options.ranges;typeof ye.yy.parseError=="function"?this.parseError=ye.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(Ie){$.length=$.length-2*Ie,ee.length=ee.length-Ie,te.length=te.length-Ie}s(Re,"popStack");function Pe(){var Ie;return Ie=W.pop()||ie.lex()||K,typeof Ie!="number"&&(Ie instanceof Array&&(W=Ie,Ie=W.pop()),Ie=U.symbols_[Ie]||Ie),Ie}s(Pe,"lex");for(var Se,Ue,Oe,_e,he,q,se={},ue,X,ae,pe;;){if(Oe=$[$.length-1],this.defaultActions[Oe]?_e=this.defaultActions[Oe]:((Se===null||typeof Se>"u")&&(Se=Pe()),_e=ce[Oe]&&ce[Oe][Se]),typeof _e>"u"||!_e.length||!_e[0]){var de="";pe=[];for(ue in ce[Oe])this.terminals_[ue]&&ue>Q&&pe.push("'"+this.terminals_[ue]+"'");ie.showPosition?de="Parse error on line "+(fe+1)+`: +`+ie.showPosition()+` +Expecting `+pe.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":de="Parse error on line "+(fe+1)+": Unexpected "+(Se==K?"end of input":"'"+(this.terminals_[Se]||Se)+"'"),this.parseError(de,{text:ie.match,token:this.terminals_[Se]||Se,line:ie.yylineno,loc:De,expected:pe})}if(_e[0]instanceof Array&&_e.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Oe+", token: "+Se);switch(_e[0]){case 1:$.push(Se),ee.push(ie.yytext),te.push(ie.yylloc),$.push(_e[1]),Se=null,Ue?(Se=Ue,Ue=null):(ne=ie.yyleng,Z=ie.yytext,fe=ie.yylineno,De=ie.yylloc,H>0&&H--);break;case 2:if(X=this.productions_[_e[1]][1],se.$=ee[ee.length-X],se._$={first_line:te[te.length-(X||1)].first_line,last_line:te[te.length-1].last_line,first_column:te[te.length-(X||1)].first_column,last_column:te[te.length-1].last_column},oe&&(se._$.range=[te[te.length-(X||1)].range[0],te[te.length-1].range[1]]),q=this.performAction.apply(se,[Z,ne,fe,ye.yy,_e[1],ee,te].concat(re)),typeof q<"u")return q;X&&($=$.slice(0,-1*X*2),ee=ee.slice(0,-1*X),te=te.slice(0,-1*X)),$.push(this.productions_[_e[1]][0]),ee.push(se.$),te.push(se._$),ae=ce[$[$.length-2]][$[$.length-1]],$.push(ae);break;case 3:return!0}}return!0},"parse")},I=function(){var z={EOF:1,parseError:s(function(U,$){if(this.yy.parser)this.yy.parser.parseError(U,$);else throw new Error(U)},"parseError"),setInput:s(function(N,U){return this.yy=U||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var U=N.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:s(function(N){var U=N.length,$=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var W=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var ee=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$?($.length===W.length?this.yylloc.first_column:0)+W[W.length-$.length].length-$[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[ee[0],ee[0]+this.yyleng-U]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(N){this.unput(this.match.slice(N))},"less"),pastInput:s(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var N=this.pastInput(),U=new Array(N.length+1).join("-");return N+this.upcomingInput()+` +`+U+"^"},"showPosition"),test_match:s(function(N,U){var $,W,ee;if(this.options.backtrack_lexer&&(ee={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ee.yylloc.range=this.yylloc.range.slice(0))),W=N[0].match(/(?:\r\n?|\n).*/g),W&&(this.yylineno+=W.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:W?W[W.length-1].length-W[W.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],$=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var te in ee)this[te]=ee[te];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,U,$,W;this._more||(this.yytext="",this.match="");for(var ee=this._currentRules(),te=0;teU[0].length)){if(U=$,W=te,this.options.backtrack_lexer){if(N=this.test_match($,ee[te]),N!==!1)return N;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(N=this.test_match(U,ee[W]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var U=this.next();return U||this.lex()},"lex"),begin:s(function(U){this.conditionStack.push(U)},"begin"),popState:s(function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},"topState"),pushState:s(function(U){this.begin(U)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(U,$,W,ee){var te=ee;switch(W){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;break;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;break;case 16:return this.popState(),"acc_title_value";break;case 17:return this.begin("acc_descr"),35;break;case 18:return this.popState(),"acc_descr_value";break;case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;break;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 24:return this.popState(),this.pushState("CLASSDEFID"),39;break;case 25:return this.popState(),40;break;case 26:return this.pushState("CLASS"),45;break;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;break;case 28:return this.popState(),47;break;case 29:return this.pushState("STYLE"),42;break;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;break;case 31:return this.popState(),44;break;case 32:return this.pushState("SCALE"),17;break;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),25;break;case 37:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),26;break;case 38:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),27;break;case 39:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),25;break;case 40:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),26;break;case 41:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),27;break;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";break;case 48:return this.popState(),"ID";break;case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;break;case 54:break;case 55:return this.popState(),21;break;case 56:break;case 57:return this.begin("NOTE"),29;break;case 58:return this.popState(),this.pushState("NOTE_ID"),56;break;case 59:return this.popState(),this.pushState("NOTE_ID"),57;break;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";break;case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 66:return this.popState(),$.yytext=$.yytext.substr(2).trim(),31;break;case 67:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),31;break;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return $.yytext=$.yytext.trim(),14;break;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return z}();F.lexer=I;function O(){this.yy={}}return s(O,"Parser"),O.prototype=F,F.Parser=O,new O}();VN.parser=VN;sT=VN});var Oue,oT,Eg,sx,Pue,Bue,Fue,k0,lT,qN,WN,HN,YN,XN,cT,uT,zue,$ue,jN,KN,Gue,Vue,Cg,jze,Uue,QN,Kze,Qze,que,Wue,Zze,Hue,Jze,Yue,ZN,JN,Xue,hT,jue,eO,fT=_(()=>{"use strict";Oue="LR",oT="TB",Eg="state",sx="relation",Pue="classDef",Bue="style",Fue="applyClass",k0="default",lT="divider",qN="fill:none",WN="fill: #333",HN="c",YN="text",XN="normal",cT="rect",uT="rectWithTitle",zue="stateStart",$ue="stateEnd",jN="divider",KN="roundedWithTitle",Gue="note",Vue="noteGroup",Cg="statediagram",jze="state",Uue=`${Cg}-${jze}`,QN="transition",Kze="note",Qze="note-edge",que=`${QN} ${Qze}`,Wue=`${Cg}-${Kze}`,Zze="cluster",Hue=`${Cg}-${Zze}`,Jze="cluster-alt",Yue=`${Cg}-${Jze}`,ZN="parent",JN="note",Xue="state",hT="----",jue=`${hT}${JN}`,eO=`${hT}${ZN}`});function tO(t="",e=0,r="",n=hT){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${Xue}-${t}${i}-${e}`}function dT(t,e,r){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(i=>{if(r.get(i)){let a=r.get(i);e.cssCompiledStyles=[...e.cssCompiledStyles,...a.styles]}}));let n=t.find(i=>i.id===e.id);n?Object.assign(n,e):t.push(e)}function t$e(t){return t?.classes?.join(" ")??""}function r$e(t){return t?.styles??[]}var pT,of,e$e,Kue,Sg,Que,Zue=_(()=>{"use strict";gt();it();Qt();fT();pT=new Map,of=0;s(tO,"stateDomId");e$e=s((t,e,r,n,i,a,o,l)=>{V.trace("items",e),e.forEach(u=>{switch(u.stmt){case Eg:Sg(t,u,r,n,i,a,o,l);break;case k0:Sg(t,u,r,n,i,a,o,l);break;case sx:{Sg(t,u.state1,r,n,i,a,o,l),Sg(t,u.state2,r,n,i,a,o,l);let h={id:"edge"+of,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:qN,labelStyle:"",label:$e.sanitizeText(u.description,le()),arrowheadStyle:WN,labelpos:HN,labelType:YN,thickness:XN,classes:QN,look:o};i.push(h),of++}break}})},"setupDoc"),Kue=s((t,e=oT)=>{let r=e;if(t.doc)for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");s(dT,"insertOrUpdateNode");s(t$e,"getClassesFromDbInfo");s(r$e,"getStylesFromDbInfo");Sg=s((t,e,r,n,i,a,o,l)=>{let u=e.id,h=r.get(u),f=t$e(h),d=r$e(h);if(V.info("dataFetcher parsedItem",e,h,d),u!=="root"){let p=cT;e.start===!0?p=zue:e.start===!1&&(p=$ue),e.type!==k0&&(p=e.type),pT.get(u)||pT.set(u,{id:u,shape:p,description:$e.sanitizeText(u,le()),cssClasses:`${f} ${Uue}`,cssStyles:d});let m=pT.get(u);e.description&&(Array.isArray(m.description)?(m.shape=uT,m.description.push(e.description)):m.description?.length>0?(m.shape=uT,m.description===u?m.description=[e.description]:m.description=[m.description,e.description]):(m.shape=cT,m.description=e.description),m.description=$e.sanitizeTextOrArray(m.description,le())),m.description?.length===1&&m.shape===uT&&(m.type==="group"?m.shape=KN:m.shape=cT),!m.type&&e.doc&&(V.info("Setting cluster for XCX",u,Kue(e)),m.type="group",m.isGroup=!0,m.dir=Kue(e),m.shape=e.type===lT?jN:KN,m.cssClasses=`${m.cssClasses} ${Hue} ${a?Yue:""}`);let g={labelStyle:"",shape:m.shape,label:m.description,cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,id:u,dir:m.dir,domId:tO(u,of),type:m.type,isGroup:m.type==="group",padding:8,rx:10,ry:10,look:o};if(g.shape===jN&&(g.label=""),t&&t.id!=="root"&&(V.trace("Setting node ",u," to be child of its parent ",t.id),g.parentId=t.id),g.centerLabel=!0,e.note){let y={labelStyle:"",shape:Gue,label:e.note.text,cssClasses:Wue,cssStyles:[],cssCompilesStyles:[],id:u+jue+"-"+of,domId:tO(u,of,JN),type:m.type,isGroup:m.type==="group",padding:le().flowchart.padding,look:o,position:e.note.position},v=u+eO,x={labelStyle:"",shape:Vue,label:e.note.text,cssClasses:m.cssClasses,cssStyles:[],id:u+eO,domId:tO(u,of,ZN),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};of++,x.id=v,y.parentId=v,dT(n,x,l),dT(n,y,l),dT(n,g,l);let b=u,k=y.id;e.note.position==="left of"&&(b=y.id,k=u),i.push({id:b+"-"+k,start:b,end:k,arrowhead:"none",arrowTypeEnd:"",style:qN,labelStyle:"",classes:que,arrowheadStyle:WN,labelpos:HN,labelType:YN,thickness:XN,look:o})}else dT(n,g,l)}e.doc&&(V.trace("Adding nodes children "),e$e(e,e.doc,r,n,i,!a,o,l))},"dataFetcher"),Que=s(()=>{pT.clear(),of=0},"reset")});var rO,n$e,i$e,Jue,nO=_(()=>{"use strict";gt();it();zA();Rk();_L();pr();fT();rO=s((t,e=oT)=>{if(!t.doc)return e;let r=e;for(let n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),n$e=s(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),i$e=s(async function(t,e,r,n){V.info("REF0:"),V.info("Drawing state diagram (v2)",e);let{securityLevel:i,state:a,layout:o}=le();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=n5(e,i);l.type=n.type,l.layoutAlgorithm=o,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["barb"],l.diagramId=e,await Dk(l,u);let h=8;dt.insertTitle(u,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Mk(u,h,Cg,a?.useMaxWidth??!0)},"draw"),Jue={getClasses:n$e,draw:i$e,getDir:rO}});function she(){return new Map}function iO(t=""){let e=t;return t===oO&&(ox++,e=`${nhe}${ox}`),e}function aO(t="",e=k0){return t===oO?nhe:e}function p$e(t=""){let e=t;return t===ihe&&(ox++,e=`${ahe}${ox}`),e}function m$e(t="",e=k0){return t===ihe?ahe:e}function g$e(t,e,r){let n=iO(t.id.trim()),i=aO(t.id.trim(),t.type),a=iO(e.id.trim()),o=aO(e.id.trim(),e.type);lf(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),lf(a,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Rs.relations.push({id1:n,id2:a,relationTitle:$e.sanitizeText(r,le())})}var oO,nhe,ihe,ahe,ehe,the,a$e,s$e,yT,lO,ohe,vT,_g,lhe,xT,Rs,ox,rhe,o$e,l$e,mT,c$e,u$e,gT,cO,h$e,lf,che,w0,uhe,f$e,d$e,hhe,sO,y$e,v$e,fhe,x$e,uO,b$e,k$e,w$e,T$e,E$e,C$e,Fo,bT=_(()=>{"use strict";it();pr();Qt();gt();Ci();Zue();nO();fT();oO="[*]",nhe="start",ihe=oO,ahe="end",ehe="color",the="fill",a$e="bgFill",s$e=",";s(she,"newClassesList");yT=[],lO=[],ohe=Oue,vT=[],_g=she(),lhe=s(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),xT={root:lhe()},Rs=xT.root,ox=0,rhe=0,o$e={LINE:0,DOTTED_LINE:1},l$e={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},mT=s(t=>JSON.parse(JSON.stringify(t)),"clone"),c$e=s(t=>{V.info("Setting root doc",t),vT=t},"setRootDoc"),u$e=s(()=>vT,"getRootDoc"),gT=s((t,e,r)=>{if(e.stmt===sx)gT(t,e.state1,!0),gT(t,e.state2,!1);else if(e.stmt===Eg&&(e.id==="[*]"?(e.id=r?t.id+"_start":t.id+"_end",e.start=r):e.id=e.id.trim()),e.doc){let n=[],i=[],a;for(a=0;a0&&i.length>0){let o={stmt:Eg,id:lA(),type:"divider",doc:mT(i)};n.push(mT(o)),e.doc=n}e.doc.forEach(o=>gT(e,o,!0))}},"docTranslator"),cO=s(()=>(gT({id:"root"},{id:"root",doc:vT},!0),{id:"root",doc:vT}),"getRootDocV2"),h$e=s(t=>{let e;t.doc?e=t.doc:e=t,V.info(e),che(!0),V.info("Extract initial document:",e),e.forEach(a=>{switch(V.warn("Statement",a.stmt),a.stmt){case Eg:lf(a.id.trim(),a.type,a.doc,a.description,a.note,a.classes,a.styles,a.textStyles);break;case sx:hhe(a.state1,a.state2,a.description);break;case Pue:fhe(a.id.trim(),a.classes);break;case Bue:{let o=a.id.trim().split(","),l=a.styleClass.split(",");o.forEach(u=>{let h=w0(u);if(h===void 0){let f=u.trim();lf(f),h=w0(f)}h.styles=l.map(f=>f.replace(/;/g,"")?.trim())})}break;case Fue:uO(a.id.trim(),a.styleClass);break}});let r=uhe(),i=le().look;Que(),Sg(void 0,cO(),r,yT,lO,!0,i,_g),yT.forEach(a=>{if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+a.id+"]");a.label=a.label[0]}})},"extract"),lf=s(function(t,e=k0,r=null,n=null,i=null,a=null,o=null,l=null){let u=t?.trim();if(Rs.states.has(u)?(Rs.states.get(u).doc||(Rs.states.get(u).doc=r),Rs.states.get(u).type||(Rs.states.get(u).type=e)):(V.info("Adding state ",u,n),Rs.states.set(u,{id:u,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]})),n&&(V.info("Setting state description",u,n),typeof n=="string"&&sO(u,n.trim()),typeof n=="object"&&n.forEach(h=>sO(u,h.trim()))),i){let h=Rs.states.get(u);h.note=i,h.note.text=$e.sanitizeText(h.note.text,le())}a&&(V.info("Setting state classes",u,a),(typeof a=="string"?[a]:a).forEach(f=>uO(u,f.trim()))),o&&(V.info("Setting state styles",u,o),(typeof o=="string"?[o]:o).forEach(f=>b$e(u,f.trim()))),l&&(V.info("Setting state styles",u,o),(typeof l=="string"?[l]:l).forEach(f=>k$e(u,f.trim())))},"addState"),che=s(function(t){yT=[],lO=[],xT={root:lhe()},Rs=xT.root,ox=0,_g=she(),t||br()},"clear"),w0=s(function(t){return Rs.states.get(t)},"getState"),uhe=s(function(){return Rs.states},"getStates"),f$e=s(function(){V.info("Documents = ",xT)},"logDocuments"),d$e=s(function(){return Rs.relations},"getRelations");s(iO,"startIdIfNeeded");s(aO,"startTypeIfNeeded");s(p$e,"endIdIfNeeded");s(m$e,"endTypeIfNeeded");s(g$e,"addRelationObjs");hhe=s(function(t,e,r){if(typeof t=="object")g$e(t,e,r);else{let n=iO(t.trim()),i=aO(t),a=p$e(e.trim()),o=m$e(e);lf(n,i),lf(a,o),Rs.relations.push({id1:n,id2:a,title:$e.sanitizeText(r,le())})}},"addRelation"),sO=s(function(t,e){let r=Rs.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push($e.sanitizeText(n,le()))},"addDescription"),y$e=s(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),v$e=s(()=>(rhe++,"divider-id-"+rhe),"getDividerId"),fhe=s(function(t,e=""){_g.has(t)||_g.set(t,{id:t,styles:[],textStyles:[]});let r=_g.get(t);e?.split(s$e).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(ehe).exec(n)){let o=i.replace(the,a$e).replace(ehe,the);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),x$e=s(function(){return _g},"getClasses"),uO=s(function(t,e){t.split(",").forEach(function(r){let n=w0(r);if(n===void 0){let i=r.trim();lf(i),n=w0(i)}n.classes.push(e)})},"setCssClass"),b$e=s(function(t,e){let r=w0(t);r!==void 0&&r.styles.push(e)},"setStyle"),k$e=s(function(t,e){let r=w0(t);r!==void 0&&r.textStyles.push(e)},"setTextStyle"),w$e=s(()=>ohe,"getDirection"),T$e=s(t=>{ohe=t},"setDirection"),E$e=s(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),C$e=s(()=>{let t=le();return{nodes:yT,edges:lO,other:{},config:t,direction:rO(cO())}},"getData"),Fo={getConfig:s(()=>le().state,"getConfig"),getData:C$e,addState:lf,clear:che,getState:w0,getStates:uhe,getRelations:d$e,getClasses:x$e,getDirection:w$e,addRelation:hhe,getDividerId:v$e,setDirection:T$e,cleanupLabel:y$e,lineType:o$e,relationType:l$e,logDocuments:f$e,getRootDoc:u$e,setRootDoc:c$e,getRootDocV2:cO,extract:h$e,trimColon:E$e,getAccTitle:Gr,setAccTitle:Ar,getAccDescription:Ur,setAccDescription:Vr,addStyleClass:fhe,setCssClass:uO,addDescription:sO,setDiagramTitle:an,getDiagramTitle:Qr}});var S$e,kT,hO=_(()=>{"use strict";S$e=s(t=>` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),kT=S$e});var fO,_$e,A$e,dhe,L$e,phe,mhe=_(()=>{"use strict";fO={},_$e=s((t,e)=>{fO[t]=e},"set"),A$e=s(t=>fO[t],"get"),dhe=s(()=>Object.keys(fO),"keys"),L$e=s(()=>dhe().length,"size"),phe={get:A$e,set:_$e,keys:dhe,size:L$e}});var D$e,R$e,M$e,I$e,yhe,N$e,O$e,P$e,B$e,dO,ghe,vhe,xhe=_(()=>{"use strict";Xt();mhe();bT();pr();Qt();gt();it();D$e=s(t=>t.append("circle").attr("class","start-state").attr("r",le().state.sizeUnit).attr("cx",le().state.padding+le().state.sizeUnit).attr("cy",le().state.padding+le().state.sizeUnit),"drawStartState"),R$e=s(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",le().state.textHeight).attr("class","divider").attr("x2",le().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),M$e=s((t,e)=>{let r=t.append("text").attr("x",2*le().state.padding).attr("y",le().state.textHeight+2*le().state.padding).attr("font-size",le().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",le().state.padding).attr("y",le().state.padding).attr("width",n.width+2*le().state.padding).attr("height",n.height+2*le().state.padding).attr("rx",le().state.radius),r},"drawSimpleState"),I$e=s((t,e)=>{let r=s(function(p,m,g){let y=p.append("tspan").attr("x",2*le().state.padding).text(m);g||y.attr("dy",le().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*le().state.padding).attr("y",le().state.textHeight+1.3*le().state.padding).attr("font-size",le().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,o=t.append("text").attr("x",le().state.padding).attr("y",a+le().state.padding*.4+le().state.dividerMargin+le().state.textHeight).attr("class","state-description"),l=!0,u=!0;e.descriptions.forEach(function(p){l||(r(o,p,u),u=!1),l=!1});let h=t.append("line").attr("x1",le().state.padding).attr("y1",le().state.padding+a+le().state.dividerMargin/2).attr("y2",le().state.padding+a+le().state.dividerMargin/2).attr("class","descr-divider"),f=o.node().getBBox(),d=Math.max(f.width,i.width);return h.attr("x2",d+3*le().state.padding),t.insert("rect",":first-child").attr("x",le().state.padding).attr("y",le().state.padding).attr("width",d+2*le().state.padding).attr("height",f.height+a+2*le().state.padding).attr("rx",le().state.radius),t},"drawDescrState"),yhe=s((t,e,r)=>{let n=le().state.padding,i=2*le().state.padding,a=t.node().getBBox(),o=a.width,l=a.x,u=t.append("text").attr("x",0).attr("y",le().state.titleShift).attr("font-size",le().state.fontSize).attr("class","state-title").text(e.id),f=u.node().getBBox().width+i,d=Math.max(f,o);d===o&&(d=d+i);let p,m=t.node().getBBox();e.doc,p=l-n,f>o&&(p=(o-d)/2+n),Math.abs(l-m.x)o&&(p=l-(f-o)/2);let g=1-le().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",m.height+le().state.textHeight+le().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),f<=o&&u.attr("x",l+(d-i)/2-f/2+n),t.insert("rect",":first-child").attr("x",p).attr("y",le().state.titleShift-le().state.textHeight-le().state.padding).attr("width",d).attr("height",le().state.textHeight*3).attr("rx",le().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",le().state.titleShift-le().state.textHeight-le().state.padding).attr("width",d).attr("height",m.height+3+2*le().state.textHeight).attr("rx",le().state.radius),t},"addTitleAndBox"),N$e=s(t=>(t.append("circle").attr("class","end-state-outer").attr("r",le().state.sizeUnit+le().state.miniPadding).attr("cx",le().state.padding+le().state.sizeUnit+le().state.miniPadding).attr("cy",le().state.padding+le().state.sizeUnit+le().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",le().state.sizeUnit).attr("cx",le().state.padding+le().state.sizeUnit+2).attr("cy",le().state.padding+le().state.sizeUnit+2)),"drawEndState"),O$e=s((t,e)=>{let r=le().state.forkWidth,n=le().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",le().state.padding).attr("y",le().state.padding)},"drawForkJoinState"),P$e=s((t,e,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=t.replace(/\r\n/g,"
    ");o=o.replace(/\n/g,"
    ");let l=o.split($e.lineBreakRegex),u=1.25*le().state.noteMargin;for(let h of l){let f=h.trim();if(f.length>0){let d=a.append("tspan");if(d.text(f),u===0){let p=d.node().getBBox();u+=p.height}i+=u,d.attr("x",e+le().state.noteMargin),d.attr("y",r+i+1.25*le().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),B$e=s((t,e)=>{e.attr("class","state-note");let r=e.append("rect").attr("x",0).attr("y",le().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=P$e(t,0,0,n);return r.attr("height",a+2*le().state.noteMargin),r.attr("width",i+le().state.noteMargin*2),r},"drawNote"),dO=s(function(t,e){let r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&D$e(i),e.type==="end"&&N$e(i),(e.type==="fork"||e.type==="join")&&O$e(i,e),e.type==="note"&&B$e(e.note.text,i),e.type==="divider"&&R$e(i),e.type==="default"&&e.descriptions.length===0&&M$e(i,e),e.type==="default"&&e.descriptions.length>0&&I$e(i,e);let a=i.node().getBBox();return n.width=a.width+2*le().state.padding,n.height=a.height+2*le().state.padding,phe.set(r,n),n},"drawState"),ghe=0,vhe=s(function(t,e,r){let n=s(function(u){switch(u){case Fo.relationType.AGGREGATION:return"aggregation";case Fo.relationType.EXTENSION:return"extension";case Fo.relationType.COMPOSITION:return"composition";case Fo.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(u=>!Number.isNaN(u.y));let i=e.points,a=ra().x(function(u){return u.x}).y(function(u){return u.y}).curve(hs),o=t.append("path").attr("d",a(i)).attr("id","edge"+ghe).attr("class","transition"),l="";if(le().state.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),o.attr("marker-end","url("+l+"#"+n(Fo.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=t.append("g").attr("class","stateLabel"),{x:h,y:f}=dt.calcLabelPosition(e.points),d=$e.getRows(r.title),p=0,m=[],g=0,y=0;for(let b=0;b<=d.length;b++){let k=u.append("text").attr("text-anchor","middle").text(d[b]).attr("x",h).attr("y",f+p),A=k.node().getBBox();g=Math.max(g,A.width),y=Math.min(y,A.x),V.info(A.x,h,f+p),p===0&&(p=k.node().getBBox().height,V.info("Title height",p,f)),m.push(k)}let v=p*d.length;if(d.length>1){let b=(d.length-1)*p*.5;m.forEach((k,A)=>k.attr("y",f+A*p-b)),v=p*d.length}let x=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-le().state.padding/2).attr("y",f-v/2-le().state.padding/2-3.5).attr("width",g+le().state.padding).attr("height",v+le().state.padding),V.info(x)}ghe++},"drawEdge")});var so,pO,F$e,z$e,$$e,G$e,bhe,khe,whe=_(()=>{"use strict";Xt();Dd();la();it();Qt();xhe();gt();Un();pO={},F$e=s(function(){},"setConf"),z$e=s(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),$$e=s(function(t,e,r,n){so=le().state;let i=le().securityLevel,a;i==="sandbox"&&(a=Me("#i"+e));let o=i==="sandbox"?Me(a.nodes()[0].contentDocument.body):Me("body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;V.debug("Rendering diagram "+t);let u=o.select(`[id='${e}']`);z$e(u);let h=n.db.getRootDoc();bhe(h,u,void 0,!1,o,l,n);let f=so.padding,d=u.node().getBBox(),p=d.width+f*2,m=d.height+f*2,g=p*1.75;xr(u,m,g,so.useMaxWidth),u.attr("viewBox",`${d.x-so.padding} ${d.y-so.padding} `+p+" "+m)},"draw"),G$e=s(t=>t?t.length*so.fontSizeFactor:1,"getLabelWidth"),bhe=s((t,e,r,n,i,a,o)=>{let l=new ir({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u{let w=A.parentElement,T=0,C=0;w&&(w.parentElement&&(T=w.parentElement.getBBox().width),C=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(C)&&(C=0)),A.setAttribute("x1",0-C+8),A.setAttribute("x2",T-C-8)})):V.debug("No Node "+b+": "+JSON.stringify(l.node(b)))});let v=y.getBBox();l.edges().forEach(function(b){b!==void 0&&l.edge(b)!==void 0&&(V.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(l.edge(b))),vhe(e,l.edge(b),l.edge(b).relation))}),v=y.getBBox();let x={id:r||"root",label:r||"root",width:0,height:0};return x.width=v.width+2*so.padding,x.height=v.height+2*so.padding,V.debug("Doc rendered",x,l),x},"renderDoc"),khe={setConf:F$e,draw:$$e}});var The={};ur(The,{diagram:()=>V$e});var V$e,Ehe=_(()=>{"use strict";UN();bT();hO();whe();V$e={parser:sT,db:Fo,renderer:khe,styles:kT,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Fo.clear()},"init")}});var _he={};ur(_he,{diagram:()=>H$e});var H$e,Ahe=_(()=>{"use strict";UN();bT();hO();nO();H$e={parser:sT,db:Fo,renderer:Jue,styles:kT,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Fo.clear()},"init")}});var mO,Rhe,Mhe=_(()=>{"use strict";mO=function(){var t=s(function(d,p,m,g){for(m=m||{},g=d.length;g--;m[d[g]]=p);return m},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],o=[1,13],l=[1,14],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(p,m,g,y,v,x,b){var k=x.length-1;switch(v){case 1:return x[k-1];case 2:this.$=[];break;case 3:x[k-1].push(x[k]),this.$=x[k-1];break;case 4:case 5:this.$=x[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(x[k].substr(6)),this.$=x[k].substr(6);break;case 9:this.$=x[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=x[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(x[k].substr(8)),this.$=x[k].substr(8);break;case 13:y.addTask(x[k-1],x[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:s(function(p){var m=this,g=[0],y=[],v=[null],x=[],b=this.table,k="",A=0,w=0,T=0,C=2,E=1,S=x.slice.call(arguments,1),R=Object.create(this.lexer),D={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(D.yy[L]=this.yy[L]);R.setInput(p,D.yy),D.yy.lexer=R,D.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var P=R.yylloc;x.push(P);var M=R.options&&R.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(H){g.length=g.length-2*H,v.length=v.length-H,x.length=x.length-H}s(F,"popStack");function I(){var H;return H=y.pop()||R.lex()||E,typeof H!="number"&&(H instanceof Array&&(y=H,H=y.pop()),H=m.symbols_[H]||H),H}s(I,"lex");for(var O,z,N,U,$,W,ee={},te,ce,Z,fe;;){if(N=g[g.length-1],this.defaultActions[N]?U=this.defaultActions[N]:((O===null||typeof O>"u")&&(O=I()),U=b[N]&&b[N][O]),typeof U>"u"||!U.length||!U[0]){var ne="";fe=[];for(te in b[N])this.terminals_[te]&&te>C&&fe.push("'"+this.terminals_[te]+"'");R.showPosition?ne="Parse error on line "+(A+1)+`: +`+R.showPosition()+` +Expecting `+fe.join(", ")+", got '"+(this.terminals_[O]||O)+"'":ne="Parse error on line "+(A+1)+": Unexpected "+(O==E?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(ne,{text:R.match,token:this.terminals_[O]||O,line:R.yylineno,loc:P,expected:fe})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+O);switch(U[0]){case 1:g.push(O),v.push(R.yytext),x.push(R.yylloc),g.push(U[1]),O=null,z?(O=z,z=null):(w=R.yyleng,k=R.yytext,A=R.yylineno,P=R.yylloc,T>0&&T--);break;case 2:if(ce=this.productions_[U[1]][1],ee.$=v[v.length-ce],ee._$={first_line:x[x.length-(ce||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(ce||1)].first_column,last_column:x[x.length-1].last_column},M&&(ee._$.range=[x[x.length-(ce||1)].range[0],x[x.length-1].range[1]]),W=this.performAction.apply(ee,[k,w,A,D.yy,U[1],v,x].concat(S)),typeof W<"u")return W;ce&&(g=g.slice(0,-1*ce*2),v=v.slice(0,-1*ce),x=x.slice(0,-1*ce)),g.push(this.productions_[U[1]][0]),v.push(ee.$),x.push(ee._$),Z=b[g[g.length-2]][g[g.length-1]],g.push(Z);break;case 3:return!0}}return!0},"parse")},h=function(){var d={EOF:1,parseError:s(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:s(function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:s(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(p){this.unput(this.match.slice(p))},"less"),pastInput:s(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:s(function(p,m){var g,y,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var x in v)this[x]=v[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),x=0;xm[0].length)){if(m=g,y=x,this.options.backtrack_lexer){if(p=this.test_match(g,v[x]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,v[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var m=this.next();return m||this.lex()},"lex"),begin:s(function(m){this.conditionStack.push(m)},"begin"),popState:s(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:s(function(m){this.begin(m)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(m,g,y,v){var x=v;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return d}();u.lexer=h;function f(){this.yy={}}return s(f,"Parser"),f.prototype=u,u.Parser=f,new f}();mO.parser=mO;Rhe=mO});var Ag,gO,lx,cx,K$e,Q$e,Z$e,J$e,eGe,tGe,rGe,Ihe,nGe,yO,Nhe=_(()=>{"use strict";gt();Ci();Ag="",gO=[],lx=[],cx=[],K$e=s(function(){gO.length=0,lx.length=0,Ag="",cx.length=0,br()},"clear"),Q$e=s(function(t){Ag=t,gO.push(t)},"addSection"),Z$e=s(function(){return gO},"getSections"),J$e=s(function(){let t=Ihe(),e=100,r=0;for(;!t&&r{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),tGe=s(function(t,e){let r=e.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(l=>l.trim()),o={section:Ag,type:Ag,people:a,task:t,score:n};cx.push(o)},"addTask"),rGe=s(function(t){let e={section:Ag,type:Ag,description:t,task:t,classes:[]};lx.push(e)},"addTaskOrg"),Ihe=s(function(){let t=s(function(r){return cx[r].processed},"compileTask"),e=!0;for(let[r,n]of cx.entries())t(r),e=e&&n.processed;return e},"compileTasks"),nGe=s(function(){return eGe()},"getActors"),yO={getConfig:s(()=>le().journey,"getConfig"),clear:K$e,setDiagramTitle:an,getDiagramTitle:Qr,setAccTitle:Ar,getAccTitle:Gr,setAccDescription:Vr,getAccDescription:Ur,addSection:Q$e,getSections:Z$e,getTasks:J$e,addTask:tGe,addTaskOrg:rGe,getActors:nGe}});var iGe,Ohe,Phe=_(()=>{"use strict";iGe=s(t=>`.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } +`,"getStyles"),Ohe=iGe});var vO,aGe,Fhe,zhe,sGe,oGe,Bhe,lGe,cGe,$he,uGe,Lg,Ghe=_(()=>{"use strict";Xt();Iy();vO=s(function(t,e){return ad(t,e)},"drawRect"),aGe=s(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=sl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(a,"smile");function o(u){let h=sl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(l,"ambivalent"),e.score>3?a(i):e.score<3?o(i):l(i),n},"drawFace"),Fhe=s(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),zhe=s(function(t,e){return Zq(t,e)},"drawText"),sGe=s(function(t,e){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,zhe(t,e)},"drawLabel"),oGe=s(function(t,e,r){let n=t.append("g"),i=ol();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,vO(n,i),$he(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),Bhe=-1,lGe=s(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");Bhe++;let a=300+5*30;i.append("line").attr("id","task"+Bhe).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),aGe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let o=ol();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,vO(i,o);let l=e.x+14;e.people.forEach(u=>{let h=e.actors[u].color,f={cx:l,cy:e.y,r:7,fill:h,stroke:"#000",title:u,pos:e.actors[u].position};Fhe(i,f),l+=10}),$he(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),cGe=s(function(t,e){v3(t,e)},"drawBackgroundRect"),$he=function(){function t(i,a,o,l,u,h,f,d){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(//gi);for(let v=0;v{let i=Vu[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:Vu[n].position};Lg.drawCircle(t,a);let o={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};Lg.drawText(t,o),r+=20})}var hGe,Vu,wT,T0,dGe,zo,xO,Vhe,pGe,bO,Uhe=_(()=>{"use strict";Xt();Ghe();gt();Un();hGe=s(function(t){Object.keys(t).forEach(function(r){wT[r]=t[r]})},"setConf"),Vu={};s(fGe,"drawActorLegend");wT=le().journey,T0=wT.leftMargin,dGe=s(function(t,e,r,n){let i=le().journey,a=le().securityLevel,o;a==="sandbox"&&(o=Me("#i"+e));let l=a==="sandbox"?Me(o.nodes()[0].contentDocument.body):Me("body");zo.init();let u=l.select("#"+e);Lg.initGraphics(u);let h=n.db.getTasks(),f=n.db.getDiagramTitle(),d=n.db.getActors();for(let x in Vu)delete Vu[x];let p=0;d.forEach(x=>{Vu[x]={color:i.actorColours[p%i.actorColours.length],position:p},p++}),fGe(u),zo.insert(0,0,T0,Object.keys(Vu).length*50),pGe(u,h,0);let m=zo.getBounds();f&&u.append("text").text(f).attr("x",T0).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);let g=m.stopy-m.starty+2*i.diagramMarginY,y=T0+m.stopx+2*i.diagramMarginX;xr(u,g,y,i.useMaxWidth),u.append("line").attr("x1",T0).attr("y1",i.height*4).attr("x2",y-T0-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");let v=f?70:0;u.attr("viewBox",`${m.startx} -25 ${y} ${g+v}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",g+v+25)},"draw"),zo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,n){let i=le().journey,a=this,o=0;function l(u){return s(function(f){o++;let d=a.sequenceItems.length-o+1;a.updateVal(f,"starty",e-d*i.boxMargin,Math.min),a.updateVal(f,"stopy",n+d*i.boxMargin,Math.max),a.updateVal(zo.data,"startx",t-d*i.boxMargin,Math.min),a.updateVal(zo.data,"stopx",r+d*i.boxMargin,Math.max),u!=="activation"&&(a.updateVal(f,"startx",t-d*i.boxMargin,Math.min),a.updateVal(f,"stopx",r+d*i.boxMargin,Math.max),a.updateVal(zo.data,"starty",e-d*i.boxMargin,Math.min),a.updateVal(zo.data,"stopy",n+d*i.boxMargin,Math.max))},"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:s(function(t,e,r,n){let i=Math.min(t,r),a=Math.max(t,r),o=Math.min(e,n),l=Math.max(e,n);this.updateVal(zo.data,"startx",i,Math.min),this.updateVal(zo.data,"starty",o,Math.min),this.updateVal(zo.data,"stopx",a,Math.max),this.updateVal(zo.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},xO=wT.sectionFills,Vhe=wT.sectionColours,pGe=s(function(t,e,r){let n=le().journey,i="",a=n.height*2+n.diagramMarginY,o=r+a,l=0,u="#CCC",h="black",f=0;for(let[d,p]of e.entries()){if(i!==p.section){u=xO[l%xO.length],f=l%xO.length,h=Vhe[l%Vhe.length];let g=0,y=p.section;for(let x=d;x(Vu[y]&&(g[y]=Vu[y]),g),{});p.x=d*n.taskMargin+d*n.width+T0,p.y=o,p.width=n.diagramMarginX,p.height=n.diagramMarginY,p.colour=h,p.fill=u,p.num=f,p.actors=m,Lg.drawTask(t,p,n),zo.insert(p.x,p.y,p.x+p.width+n.taskMargin,300+5*30)}},"drawTasks"),bO={setConf:hGe,draw:dGe}});var qhe={};ur(qhe,{diagram:()=>mGe});var mGe,Whe=_(()=>{"use strict";Mhe();Nhe();Phe();Uhe();mGe={parser:Rhe,db:yO,renderer:bO,styles:Ohe,init:s(t=>{bO.setConf(t.journey),yO.clear()},"init")}});var wO,Zhe,Jhe=_(()=>{"use strict";wO=function(){var t=s(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g},"o"),e=[6,8,10,11,12,14,16,17,20,21],r=[1,9],n=[1,10],i=[1,11],a=[1,12],o=[1,13],l=[1,16],u=[1,17],h={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(m,g,y,v,x,b,k){var A=b.length-1;switch(x){case 1:return b[A-1];case 2:this.$=[];break;case 3:b[A-1].push(b[A]),this.$=b[A-1];break;case 4:case 5:this.$=b[A];break;case 6:case 7:this.$=[];break;case 8:v.getCommonDb().setDiagramTitle(b[A].substr(6)),this.$=b[A].substr(6);break;case 9:this.$=b[A].trim(),v.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=b[A].trim(),v.getCommonDb().setAccDescription(this.$);break;case 12:v.addSection(b[A].substr(8)),this.$=b[A].substr(8);break;case 15:v.addTask(b[A],0,""),this.$=b[A];break;case 16:v.addEvent(b[A].substr(2)),this.$=b[A];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:o,18:14,19:15,20:l,21:u},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:r,12:n,14:i,16:a,17:o,18:14,19:15,20:l,21:u},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:s(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:s(function(m){var g=this,y=[0],v=[],x=[null],b=[],k=this.table,A="",w=0,T=0,C=0,E=2,S=1,R=b.slice.call(arguments,1),D=Object.create(this.lexer),L={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(L.yy[P]=this.yy[P]);D.setInput(m,L.yy),L.yy.lexer=D,L.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var M=D.yylloc;b.push(M);var F=D.options&&D.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(Q){y.length=y.length-2*Q,x.length=x.length-Q,b.length=b.length-Q}s(I,"popStack");function O(){var Q;return Q=v.pop()||D.lex()||S,typeof Q!="number"&&(Q instanceof Array&&(v=Q,Q=v.pop()),Q=g.symbols_[Q]||Q),Q}s(O,"lex");for(var z,N,U,$,W,ee,te={},ce,Z,fe,ne;;){if(U=y[y.length-1],this.defaultActions[U]?$=this.defaultActions[U]:((z===null||typeof z>"u")&&(z=O()),$=k[U]&&k[U][z]),typeof $>"u"||!$.length||!$[0]){var H="";ne=[];for(ce in k[U])this.terminals_[ce]&&ce>E&&ne.push("'"+this.terminals_[ce]+"'");D.showPosition?H="Parse error on line "+(w+1)+`: +`+D.showPosition()+` +Expecting `+ne.join(", ")+", got '"+(this.terminals_[z]||z)+"'":H="Parse error on line "+(w+1)+": Unexpected "+(z==S?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(H,{text:D.match,token:this.terminals_[z]||z,line:D.yylineno,loc:M,expected:ne})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+z);switch($[0]){case 1:y.push(z),x.push(D.yytext),b.push(D.yylloc),y.push($[1]),z=null,N?(z=N,N=null):(T=D.yyleng,A=D.yytext,w=D.yylineno,M=D.yylloc,C>0&&C--);break;case 2:if(Z=this.productions_[$[1]][1],te.$=x[x.length-Z],te._$={first_line:b[b.length-(Z||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(Z||1)].first_column,last_column:b[b.length-1].last_column},F&&(te._$.range=[b[b.length-(Z||1)].range[0],b[b.length-1].range[1]]),ee=this.performAction.apply(te,[A,T,w,L.yy,$[1],x,b].concat(R)),typeof ee<"u")return ee;Z&&(y=y.slice(0,-1*Z*2),x=x.slice(0,-1*Z),b=b.slice(0,-1*Z)),y.push(this.productions_[$[1]][0]),x.push(te.$),b.push(te._$),fe=k[y[y.length-2]][y[y.length-1]],y.push(fe);break;case 3:return!0}}return!0},"parse")},f=function(){var p={EOF:1,parseError:s(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g)},"parseError"),setInput:s(function(m,g){return this.yy=g||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:s(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===v.length?this.yylloc.first_column:0)+v[v.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(m){this.unput(this.match.slice(m))},"less"),pastInput:s(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:s(function(m,g){var y,v,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),v=m[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var b in x)this[b]=x[b];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,v;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),b=0;bg[0].length)){if(g=y,v=b,this.options.backtrack_lexer){if(m=this.test_match(y,x[b]),m!==!1)return m;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(m=this.test_match(g,x[v]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var g=this.next();return g||this.lex()},"lex"),begin:s(function(g){this.conditionStack.push(g)},"begin"),popState:s(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:s(function(g){this.begin(g)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(g,y,v,x){var b=x;switch(v){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return p}();h.lexer=f;function d(){this.yy={}}return s(d,"Parser"),d.prototype=h,h.Parser=d,new d}();wO.parser=wO;Zhe=wO});var EO={};ur(EO,{addEvent:()=>lfe,addSection:()=>ife,addTask:()=>ofe,addTaskOrg:()=>cfe,clear:()=>nfe,default:()=>EGe,getCommonDb:()=>rfe,getSections:()=>afe,getTasks:()=>sfe});var Dg,tfe,TO,TT,Rg,rfe,nfe,ife,afe,sfe,ofe,lfe,cfe,efe,EGe,ufe=_(()=>{"use strict";Ci();Dg="",tfe=0,TO=[],TT=[],Rg=[],rfe=s(()=>q1,"getCommonDb"),nfe=s(function(){TO.length=0,TT.length=0,Dg="",Rg.length=0,br()},"clear"),ife=s(function(t){Dg=t,TO.push(t)},"addSection"),afe=s(function(){return TO},"getSections"),sfe=s(function(){let t=efe(),e=100,r=0;for(;!t&&rr.id===tfe-1).events.push(t)},"addEvent"),cfe=s(function(t){let e={section:Dg,type:Dg,description:t,task:t,classes:[]};TT.push(e)},"addTaskOrg"),efe=s(function(){let t=s(function(r){return Rg[r].processed},"compileTask"),e=!0;for(let[r,n]of Rg.entries())t(r),e=e&&n.processed;return e},"compileTasks"),EGe={clear:nfe,getCommonDb:rfe,addSection:ife,getSections:afe,getTasks:sfe,addTask:ofe,addTaskOrg:cfe,addEvent:lfe}});function pfe(t,e){t.each(function(){var r=Me(this),n=r.text().split(/(\s+|
    )/).reverse(),i,a=[],o=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let f=0;fe||i==="
    ")&&(a.pop(),h.text(a.join(" ").trim()),i==="
    "?a=[""]:a=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",o+"em").text(i))})}var CGe,ET,SGe,_Ge,ffe,AGe,LGe,hfe,DGe,RGe,MGe,CO,dfe,IGe,NGe,OGe,PGe,cf,mfe=_(()=>{"use strict";Xt();CGe=12,ET=s(function(t,e){let r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),SGe=s(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(u){let h=sl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(a,"smile");function o(u){let h=sl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(o,"sad");function l(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(l,"ambivalent"),e.score>3?a(i):e.score<3?o(i):l(i),n},"drawFace"),_Ge=s(function(t,e){let r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),ffe=s(function(t,e){let r=e.text.replace(//gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);let i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},"drawText"),AGe=s(function(t,e){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(r,"genPoints");let n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ffe(t,e)},"drawLabel"),LGe=s(function(t,e,r){let n=t.append("g"),i=CO();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,ET(n,i),dfe(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),hfe=-1,DGe=s(function(t,e,r){let n=e.x+r.width/2,i=t.append("g");hfe++;let a=300+5*30;i.append("line").attr("id","task"+hfe).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),SGe(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});let o=CO();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,ET(i,o),dfe(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),RGe=s(function(t,e){ET(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),MGe=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),CO=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dfe=function(){function t(i,a,o,l,u,h,f,d){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(p,f)}s(t,"byText");function e(i,a,o,l,u,h,f,d,p){let{taskFontSize:m,taskFontFamily:g}=d,y=i.split(//gi);for(let v=0;v{"use strict";Xt();mfe();it();gt();Un();BGe=s(function(t,e,r,n){let i=le(),a=i.leftMargin??50;V.debug("timeline",n.db);let o=i.securityLevel,l;o==="sandbox"&&(l=Me("#i"+e));let h=(o==="sandbox"?Me(l.nodes()[0].contentDocument.body):Me("body")).select("#"+e);h.append("g");let f=n.db.getTasks(),d=n.db.getCommonDb().getDiagramTitle();V.debug("task",f),cf.initGraphics(h);let p=n.db.getSections();V.debug("sections",p);let m=0,g=0,y=0,v=0,x=50+a,b=50;v=50;let k=0,A=!0;p.forEach(function(S){let R={number:k,descr:S,section:k,width:150,padding:20,maxHeight:m},D=cf.getVirtualNodeHeight(h,R,i);V.debug("sectionHeight before draw",D),m=Math.max(m,D+20)});let w=0,T=0;V.debug("tasks.length",f.length);for(let[S,R]of f.entries()){let D={number:S,descr:R,section:R.section,width:150,padding:20,maxHeight:g},L=cf.getVirtualNodeHeight(h,D,i);V.debug("taskHeight before draw",L),g=Math.max(g,L+20),w=Math.max(w,R.events.length);let P=0;for(let M of R.events){let F={descr:M,section:R.section,number:R.section,width:150,padding:20,maxHeight:50};P+=cf.getVirtualNodeHeight(h,F,i)}T=Math.max(T,P)}V.debug("maxSectionHeight before draw",m),V.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach(S=>{let R=f.filter(M=>M.section===S),D={number:k,descr:S,section:k,width:200*Math.max(R.length,1)-50,padding:20,maxHeight:m};V.debug("sectionNode",D);let L=h.append("g"),P=cf.drawNode(L,D,k,i);V.debug("sectionNode output",P),L.attr("transform",`translate(${x}, ${v})`),b+=m+50,R.length>0&&gfe(h,R,k,x,b,g,i,w,T,m,!1),x+=200*Math.max(R.length,1),b=v,k++}):(A=!1,gfe(h,f,k,x,b,g,i,w,T,m,!0));let C=h.node().getBBox();V.debug("bounds",C),d&&h.append("text").text(d).attr("x",C.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),y=A?m+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",y).attr("x2",C.width+3*a).attr("y2",y).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),ql(void 0,h,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),gfe=s(function(t,e,r,n,i,a,o,l,u,h,f){for(let d of e){let p={descr:d.task,section:r,number:r,width:150,padding:20,maxHeight:a};V.debug("taskNode",p);let m=t.append("g").attr("class","taskWrapper"),y=cf.drawNode(m,p,r,o).height;if(V.debug("taskHeight after draw",y),m.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,y),d.events){let v=t.append("g").attr("class","lineWrapper"),x=a;i+=100,x=x+FGe(t,d.events,r,n,i,o),i-=100,v.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+(f?a:h)+u+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}n=n+200,f&&!o.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),FGe=s(function(t,e,r,n,i,a){let o=0,l=i;i=i+100;for(let u of e){let h={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};V.debug("eventNode",h);let f=t.append("g").attr("class","eventWrapper"),p=cf.drawNode(f,h,r,a).height;o=o+p,f.attr("transform",`translate(${n}, ${i})`),i=i+10+p}return i=l,o},"drawEvents"),yfe={setConf:s(()=>{},"setConf"),draw:BGe}});var zGe,$Ge,xfe,bfe=_(()=>{"use strict";Ho();zGe=s(t=>{let e="";for(let r=0;r` + .edge { + stroke-width: 3; + } + ${zGe(t)} + .section-root rect, .section-root path, .section-root circle { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),xfe=$Ge});var kfe={};ur(kfe,{diagram:()=>GGe});var GGe,wfe=_(()=>{"use strict";Jhe();ufe();vfe();bfe();GGe={db:EO,renderer:yfe,parser:Zhe,styles:xfe}});var SO,Cfe,Sfe=_(()=>{"use strict";SO=function(){var t=s(function(A,w,T,C){for(T=T||{},C=A.length;C--;T[A[C]]=w);return T},"o"),e=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],f=[1,24],d=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],g=[1,33],y=[1,34],v=[1,6,7,11,13,15,16,19,22],x={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:s(function(w,T,C,E,S,R,D){var L=R.length-1;switch(S){case 6:case 7:return E;case 8:E.getLogger().trace("Stop NL ");break;case 9:E.getLogger().trace("Stop EOF ");break;case 11:E.getLogger().trace("Stop NL2 ");break;case 12:E.getLogger().trace("Stop EOF2 ");break;case 15:E.getLogger().info("Node: ",R[L].id),E.addNode(R[L-1].length,R[L].id,R[L].descr,R[L].type);break;case 16:E.getLogger().trace("Icon: ",R[L]),E.decorateNode({icon:R[L]});break;case 17:case 21:E.decorateNode({class:R[L]});break;case 18:E.getLogger().trace("SPACELIST");break;case 19:E.getLogger().trace("Node: ",R[L].id),E.addNode(0,R[L].id,R[L].descr,R[L].type);break;case 20:E.decorateNode({icon:R[L]});break;case 25:E.getLogger().trace("node found ..",R[L-2]),this.$={id:R[L-1],descr:R[L-1],type:E.getType(R[L-2],R[L])};break;case 26:this.$={id:R[L],descr:R[L],type:E.nodeType.DEFAULT};break;case 27:E.getLogger().trace("node found ..",R[L-3]),this.$={id:R[L-3],descr:R[L-1],type:E.getType(R[L-2],R[L])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:h,7:f,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:f,10:32,11:d},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},t(m,[2,14],{7:g,11:y}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:g,11:y}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(w,T){if(T.recoverable)this.trace(w);else{var C=new Error(w);throw C.hash=T,C}},"parseError"),parse:s(function(w){var T=this,C=[0],E=[],S=[null],R=[],D=this.table,L="",P=0,M=0,F=0,I=2,O=1,z=R.slice.call(arguments,1),N=Object.create(this.lexer),U={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(U.yy[$]=this.yy[$]);N.setInput(w,U.yy),U.yy.lexer=N,U.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var W=N.yylloc;R.push(W);var ee=N.options&&N.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(Re){C.length=C.length-2*Re,S.length=S.length-Re,R.length=R.length-Re}s(te,"popStack");function ce(){var Re;return Re=E.pop()||N.lex()||O,typeof Re!="number"&&(Re instanceof Array&&(E=Re,Re=E.pop()),Re=T.symbols_[Re]||Re),Re}s(ce,"lex");for(var Z,fe,ne,H,Q,K,re={},ie,ye,j,De;;){if(ne=C[C.length-1],this.defaultActions[ne]?H=this.defaultActions[ne]:((Z===null||typeof Z>"u")&&(Z=ce()),H=D[ne]&&D[ne][Z]),typeof H>"u"||!H.length||!H[0]){var oe="";De=[];for(ie in D[ne])this.terminals_[ie]&&ie>I&&De.push("'"+this.terminals_[ie]+"'");N.showPosition?oe="Parse error on line "+(P+1)+`: +`+N.showPosition()+` +Expecting `+De.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":oe="Parse error on line "+(P+1)+": Unexpected "+(Z==O?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(oe,{text:N.match,token:this.terminals_[Z]||Z,line:N.yylineno,loc:W,expected:De})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ne+", token: "+Z);switch(H[0]){case 1:C.push(Z),S.push(N.yytext),R.push(N.yylloc),C.push(H[1]),Z=null,fe?(Z=fe,fe=null):(M=N.yyleng,L=N.yytext,P=N.yylineno,W=N.yylloc,F>0&&F--);break;case 2:if(ye=this.productions_[H[1]][1],re.$=S[S.length-ye],re._$={first_line:R[R.length-(ye||1)].first_line,last_line:R[R.length-1].last_line,first_column:R[R.length-(ye||1)].first_column,last_column:R[R.length-1].last_column},ee&&(re._$.range=[R[R.length-(ye||1)].range[0],R[R.length-1].range[1]]),K=this.performAction.apply(re,[L,M,P,U.yy,H[1],S,R].concat(z)),typeof K<"u")return K;ye&&(C=C.slice(0,-1*ye*2),S=S.slice(0,-1*ye),R=R.slice(0,-1*ye)),C.push(this.productions_[H[1]][0]),S.push(re.$),R.push(re._$),j=D[C[C.length-2]][C[C.length-1]],C.push(j);break;case 3:return!0}}return!0},"parse")},b=function(){var A={EOF:1,parseError:s(function(T,C){if(this.yy.parser)this.yy.parser.parseError(T,C);else throw new Error(T)},"parseError"),setInput:s(function(w,T){return this.yy=T||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var T=w.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:s(function(w){var T=w.length,C=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),C.length-1&&(this.yylineno-=C.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===E.length?this.yylloc.first_column:0)+E[E.length-C.length].length-C[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(w){this.unput(this.match.slice(w))},"less"),pastInput:s(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var w=this.pastInput(),T=new Array(w.length+1).join("-");return w+this.upcomingInput()+` +`+T+"^"},"showPosition"),test_match:s(function(w,T){var C,E,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),E=w[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],C=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var R in S)this[R]=S[R];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,T,C,E;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),R=0;RT[0].length)){if(T=C,E=R,this.options.backtrack_lexer){if(w=this.test_match(C,S[R]),w!==!1)return w;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(w=this.test_match(T,S[E]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var T=this.next();return T||this.lex()},"lex"),begin:s(function(T){this.conditionStack.push(T)},"begin"),popState:s(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:s(function(T){this.begin(T)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(T,C,E,S){var R=S;switch(E){case 0:return T.getLogger().trace("Found comment",C.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:T.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return T.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:T.getLogger().trace("end icon"),this.popState();break;case 10:return T.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return T.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return T.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return T.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:T.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return T.getLogger().trace("description:",C.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),T.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),T.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),T.getLogger().trace("node end ...",C.yytext),"NODE_DEND";break;case 30:return this.popState(),T.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),T.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),T.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),T.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),T.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return T.getLogger().trace("Long description:",C.yytext),20;break;case 36:return T.getLogger().trace("Long description:",C.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return A}();x.lexer=b;function k(){this.yy={}}return s(k,"Parser"),k.prototype=x,x.Parser=k,new k}();SO.parser=SO;Cfe=SO});var Cl,_fe,_O,WGe,HGe,YGe,XGe,Ii,jGe,KGe,QGe,ZGe,JGe,eVe,tVe,Afe,Lfe=_(()=>{"use strict";gt();Qt();it();Pl();Cl=[],_fe=0,_O={},WGe=s(()=>{Cl=[],_fe=0,_O={}},"clear"),HGe=s(function(t){for(let e=Cl.length-1;e>=0;e--)if(Cl[e].levelCl.length>0?Cl[0]:null,"getMindmap"),XGe=s((t,e,r,n)=>{V.info("addNode",t,e,r,n);let i=le(),a=i.mindmap?.padding??dr.mindmap.padding;switch(n){case Ii.ROUNDED_RECT:case Ii.RECT:case Ii.HEXAGON:a*=2}let o={id:_fe++,nodeId:$r(e,i),level:t,descr:$r(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??dr.mindmap.maxNodeWidth,padding:a},l=HGe(t);if(l)l.children.push(o),Cl.push(o);else if(Cl.length===0)Cl.push(o);else throw new Error('There can be only one root. No parent could be found for ("'+o.descr+'")')},"addNode"),Ii={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},jGe=s((t,e)=>{switch(V.debug("In get type",t,e),t){case"[":return Ii.RECT;case"(":return e===")"?Ii.ROUNDED_RECT:Ii.CLOUD;case"((":return Ii.CIRCLE;case")":return Ii.CLOUD;case"))":return Ii.BANG;case"{{":return Ii.HEXAGON;default:return Ii.DEFAULT}},"getType"),KGe=s((t,e)=>{_O[t]=e},"setElementForId"),QGe=s(t=>{if(!t)return;let e=le(),r=Cl[Cl.length-1];t.icon&&(r.icon=$r(t.icon,e)),t.class&&(r.class=$r(t.class,e))},"decorateNode"),ZGe=s(t=>{switch(t){case Ii.DEFAULT:return"no-border";case Ii.RECT:return"rect";case Ii.ROUNDED_RECT:return"rounded-rect";case Ii.CIRCLE:return"circle";case Ii.CLOUD:return"cloud";case Ii.BANG:return"bang";case Ii.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),JGe=s(()=>V,"getLogger"),eVe=s(t=>_O[t],"getElementById"),tVe={clear:WGe,addNode:XGe,getMindmap:YGe,nodeType:Ii,getType:jGe,setElementForId:KGe,decorateNode:QGe,type2Str:ZGe,getLogger:JGe,getElementById:eVe},Afe=tVe});function Pi(t){"@babel/helpers - typeof";return Pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pi(t)}function nP(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dfe(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},"n"),e:s(function(u){throw u},"e"),f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,l;return{s:s(function(){r=r.call(t)},"s"),n:s(function(){var u=r.next();return a=u.done,u},"n"),e:s(function(u){o=!0,l=u},"e"),f:s(function(){try{!a&&r.return!=null&&r.return()}finally{if(o)throw l}},"f")}}function AVe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function LVe(t,e){return e={exports:{}},t(e,e.exports),e.exports}function PVe(t){for(var e=t.length;e--&&OVe.test(t.charAt(e)););return e}function zVe(t){return t&&t.slice(0,BVe(t)+1).replace(FVe,"")}function qVe(t){var e=VVe.call(t,ux),r=t[ux];try{t[ux]=void 0;var n=!0}catch{}var i=UVe.call(t);return n&&(e?t[ux]=r:delete t[ux]),i}function XVe(t){return YVe.call(t)}function ZVe(t){return t==null?t===void 0?QVe:KVe:Nfe&&Nfe in Object(t)?WVe(t):jVe(t)}function JVe(t){return t!=null&&typeof t=="object"}function rUe(t){return typeof t=="symbol"||eUe(t)&&t0e(t)==tUe}function oUe(t){if(typeof t=="number")return t;if(Ox(t))return Ofe;if(R0(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=R0(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=$Ve(t);var r=iUe.test(t);return r||aUe.test(t)?sUe(t.slice(2),r?2:8):nUe.test(t)?Ofe:+t}function hUe(t,e,r){var n,i,a,o,l,u,h=0,f=!1,d=!1,p=!0;if(typeof t!="function")throw new TypeError(lUe);e=Pfe(e)||0,R0(r)&&(f=!!r.leading,d="maxWait"in r,a=d?cUe(Pfe(r.maxWait)||0,e):a,p="trailing"in r?!!r.trailing:p);function m(T){var C=n,E=i;return n=i=void 0,h=T,o=t.apply(E,C),o}s(m,"invokeFunc");function g(T){return h=T,l=setTimeout(x,e),f?m(T):o}s(g,"leadingEdge");function y(T){var C=T-u,E=T-h,S=e-C;return d?uUe(S,a-E):S}s(y,"remainingWait");function v(T){var C=T-u,E=T-h;return u===void 0||C>=e||C<0||d&&E>=a}s(v,"shouldInvoke");function x(){var T=AO();if(v(T))return b(T);l=setTimeout(x,y(T))}s(x,"timerExpired");function b(T){return l=void 0,p&&n?m(T):(n=i=void 0,o)}s(b,"trailingEdge");function k(){l!==void 0&&clearTimeout(l),h=0,n=u=i=l=void 0}s(k,"cancel");function A(){return l===void 0?o:b(AO())}s(A,"flush");function w(){var T=AO(),C=v(T);if(n=arguments,i=this,u=T,C){if(l===void 0)return g(u);if(d)return clearTimeout(l),l=setTimeout(x,e),m(u)}return l===void 0&&(l=setTimeout(x,e)),o}return s(w,"debounced"),w.cancel=k,w.flush=A,w}function l7(t,e,r,n,i,a){var o;return Gn(t)?o=t:o=Hg[t]||Hg.euclidean,e===0&&Gn(t)?o(i,a):o(e,r,n,i,a)}function nWe(t,e){if(c7(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Ox(t)?!0:rWe.test(t)||!tWe.test(t)||e!=null&&t in Object(e)}function cWe(t){if(!R0(t))return!1;var e=t0e(t);return e==sWe||e==oWe||e==aWe||e==lWe}function fWe(t){return!!rde&&rde in t}function gWe(t){if(t!=null){try{return mWe.call(t)}catch{}try{return t+""}catch{}}return""}function CWe(t){if(!R0(t)||dWe(t))return!1;var e=uWe(t)?EWe:xWe;return e.test(yWe(t))}function _We(t,e){return t?.[e]}function LWe(t,e){var r=AWe(t,e);return SWe(r)?r:void 0}function RWe(){this.__data__=Ax?Ax(null):{},this.size=0}function IWe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function FWe(t){var e=this.__data__;if(Ax){var r=e[t];return r===OWe?void 0:r}return BWe.call(e,t)?e[t]:void 0}function VWe(t){var e=this.__data__;return Ax?e[t]!==void 0:GWe.call(e,t)}function WWe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ax&&e===void 0?qWe:e,this}function Kg(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}function aHe(t,e){var r=this.__data__,n=u7(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Qg(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t0;){var f=i.shift();e(f),a.add(f.id()),l&&n(i,a,f)}return t}function N0e(t,e,r){if(r.isParent())for(var n=r._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:UYe,e=arguments.length>1?arguments[1]:void 0,r=0;r0?L=M:D=M;while(Math.abs(P)>o&&++F=a?b(R,F):I===0?F:A(R,D,D+h)}s(w,"getTForX");var T=!1;function C(){T=!0,(t!==e||r!==n)&&k()}s(C,"precompute");var E=s(function(D){return T||C(),t===e&&r===n?D:D===0?0:D===1?1:v(w(D),e,n)},"f");E.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var S="generateBezier("+[t,e,r,n]+")";return E.toString=function(){return S},E}function kde(t,e,r,n,i){if(n===1||e===r)return r;var a=i(e,r,n);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a}function wde(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Ng(t,e,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var o=wde(t,i),l=wde(e,i);if(rt(o)&&rt(l))return kde(a,o,l,r,n);if(hn(o)&&hn(l)){for(var u=[],h=0;h0?(m==="spring"&&g.push(o.duration),o.easingImpl=GT[m].apply(null,g)):o.easingImpl=GT[m]}var y=o.easingImpl,v;if(o.duration===0?v=1:v=(r-u)/o.duration,o.applying&&(v=o.progress),v<0?v=0:v>1&&(v=1),o.delay==null){var x=o.startPosition,b=o.position;if(b&&i&&!t.locked()){var k={};px(x.x,b.x)&&(k.x=Ng(x.x,b.x,v,y)),px(x.y,b.y)&&(k.y=Ng(x.y,b.y,v,y)),t.position(k)}var A=o.startPan,w=o.pan,T=a.pan,C=w!=null&&n;C&&(px(A.x,w.x)&&(T.x=Ng(A.x,w.x,v,y)),px(A.y,w.y)&&(T.y=Ng(A.y,w.y,v,y)),t.emit("pan"));var E=o.startZoom,S=o.zoom,R=S!=null&&n;R&&(px(E,S)&&(a.zoom=Sx(a.minZoom,Ng(E,S,v,y),a.maxZoom)),t.emit("zoom")),(C||R)&&t.emit("viewport");var D=o.style;if(D&&D.length>0&&i){for(var L=0;L=0;C--){var E=T[C];E()}T.splice(0,T.length)},"callbacks"),b=m.length-1;b>=0;b--){var k=m[b],A=k._private;if(A.stopped){m.splice(b,1),A.hooked=!1,A.playing=!1,A.started=!1,x(A.frames);continue}!A.playing&&!A.applying||(A.playing&&A.applying&&(A.applying=!1),A.started||nXe(f,k,t),rXe(f,k,t,d),A.applying&&(A.applying=!1),x(A.frames),A.step!=null&&A.step(t),k.completed()&&(m.splice(b,1),A.hooked=!1,A.playing=!1,A.started=!1,x(A.completes)),y=!0)}return!d&&m.length===0&&g.length===0&&n.push(f),y}s(i,"stepOne");for(var a=!1,o=0;o0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}function Q0e(t){this.options=Pt({},hXe,fXe,t)}function Z0e(t){this.options=Pt({},dXe,t)}function J0e(t){this.options=Pt({},pXe,t)}function v7(t){this.options=Pt({},mXe,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),o=i.target().data("id"),l=e.some(function(h){return h.data("id")===a}),u=e.some(function(h){return h.data("id")===o});return!l||!u});this.options.eles=this.options.eles.not(n)}function tpe(t){this.options=Pt({},MXe,t)}function wP(t){this.options=Pt({},IXe,t)}function rpe(t){this.options=Pt({},NXe,t)}function npe(t){this.options=Pt({},OXe,t)}function ipe(t){this.options=t,this.notifications=0}function ope(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function EP(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(FXe(t,e,r,n,i),{cx:jO,cy:KO,radius:A0,startX:ape,startY:spe,stopX:QO,stopY:ZO,startAngle:Rc.ang+Math.PI/2*L0,endAngle:$o.ang-Math.PI/2*L0,counterClockwise:qT})}function lpe(t){var e=[];if(t!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+a,r),t.lineTo(e+n-a,r),t.quadraticCurveTo(e+n,r,e+n,r+a),t.lineTo(e+n,r+i-a),t.quadraticCurveTo(e+n,r+i,e+n-a,r+i),t.lineTo(e+a,r+i),t.quadraticCurveTo(e,r+i,e,r+i-a),t.lineTo(e,r+a),t.quadraticCurveTo(e,r,e+a,r),t.closePath(),o?t.stroke():t.fill()}function Sje(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),i=new Uint8Array(n),a=0;a{"use strict";s(Pi,"_typeof");s(nP,"_classCallCheck");s(Dfe,"_defineProperties");s(iP,"_createClass");s(qde,"_defineProperty$1");s(Sl,"_slicedToArray");s(rVe,"_arrayWithHoles");s(nVe,"_iterableToArrayLimit");s(Wde,"_unsupportedIterableToArray");s(Rfe,"_arrayLikeToArray");s(iVe,"_nonIterableRest");s(Hde,"_createForOfIteratorHelper");Ni=typeof window>"u"?null:window,Mfe=Ni?Ni.navigator:null;Ni&&Ni.document;aVe=Pi(""),Yde=Pi({}),sVe=Pi(function(){}),oVe=typeof HTMLElement>"u"?"undefined":Pi(HTMLElement),Ix=s(function(e){return e&&e.instanceString&&Gn(e.instanceString)?e.instanceString():null},"instanceStr"),At=s(function(e){return e!=null&&Pi(e)==aVe},"string"),Gn=s(function(e){return e!=null&&Pi(e)===sVe},"fn"),hn=s(function(e){return!oo(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},"array"),Er=s(function(e){return e!=null&&Pi(e)===Yde&&!hn(e)&&e.constructor===Object},"plainObject"),lVe=s(function(e){return e!=null&&Pi(e)===Yde},"object"),rt=s(function(e){return e!=null&&Pi(e)===Pi(1)&&!isNaN(e)},"number"),cVe=s(function(e){return rt(e)&&Math.floor(e)===e},"integer"),HT=s(function(e){if(oVe!=="undefined")return e!=null&&e instanceof HTMLElement},"htmlElement"),oo=s(function(e){return Nx(e)||Xde(e)},"elementOrCollection"),Nx=s(function(e){return Ix(e)==="collection"&&e._private.single},"element"),Xde=s(function(e){return Ix(e)==="collection"&&!e._private.single},"collection"),aP=s(function(e){return Ix(e)==="core"},"core"),jde=s(function(e){return Ix(e)==="stylesheet"},"stylesheet"),uVe=s(function(e){return Ix(e)==="event"},"event"),gf=s(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},"emptyString"),hVe=s(function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},"domElement"),fVe=s(function(e){return Er(e)&&rt(e.x1)&&rt(e.x2)&&rt(e.y1)&&rt(e.y2)},"boundingBox"),dVe=s(function(e){return lVe(e)&&Gn(e.then)},"promise"),pVe=s(function(){return Mfe&&Mfe.userAgent.match(/msie|trident|edge/i)},"ms"),wx=s(function(e,r){r||(r=s(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],o=0;or?1:0},"ascending"),kVe=s(function(e,r){return-1*Qde(e,r)},"descending"),Pt=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(v-=1),v<1/6?g+(y-g)*6*v:v<1/2?y:v<2/3?g+(y-g)*(2/3-v)*6:g}s(f,"hue2rgb");var d=new RegExp("^"+yVe+"$").exec(e);if(d){if(n=parseInt(d[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(d[2]),i<0||i>100||(i=i/100,a=parseFloat(d[3]),a<0||a>100)||(a=a/100,o=d[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(i===0)l=u=h=Math.round(a*255);else{var p=a<.5?a*(1+i):a+i-a*i,m=2*a-p;l=Math.round(255*f(m,p,n+1/3)),u=Math.round(255*f(m,p,n)),h=Math.round(255*f(m,p,n-1/3))}r=[l,u,h,o]}return r},"hsl2tuple"),EVe=s(function(e){var r,n=new RegExp("^"+mVe+"$").exec(e);if(n){r=[];for(var i=[],a=1;a<=3;a++){var o=n[a];if(o[o.length-1]==="%"&&(i[a]=!0),o=parseFloat(o),i[a]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var l=i[1]||i[2]||i[3],u=i[1]&&i[2]&&i[3];if(l&&!u)return;var h=n[4];if(h!==void 0){if(h=parseFloat(h),h<0||h>1)return;r.push(h)}}return r},"rgb2tuple"),CVe=s(function(e){return _Ve[e.toLowerCase()]},"colorname2tuple"),SVe=s(function(e){return(hn(e)?e:null)||CVe(e)||wVe(e)||EVe(e)||TVe(e)},"color2tuple"),_Ve={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Zde=s(function(e){for(var r=e.map,n=e.keys,i=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:Bg,n=r,i;i=e.next(),!i.done;)n=n*n0e+i.value|0;return n},"hashIterableInts"),Tx=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bg;return r*n0e+e|0},"hashInt"),Ex=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gx;return(r<<5)+r+e|0},"hashIntAlt"),dUe=s(function(e,r){return e*2097152+r},"combineHashes"),uf=s(function(e){return e[0]*2097152+e[1]},"combineHashesArray"),CT=s(function(e,r){return[Tx(e[0],r[0]),Ex(e[1],r[1])]},"hashArrays"),pUe=s(function(e,r){var n={value:0,done:!1},i=0,a=e.length,o={next:s(function(){return i=0&&!(e[i]===r&&(e.splice(i,1),n));i--);},"removeFromArray"),cP=s(function(e){e.splice(0,e.length)},"clearArray"),kUe=s(function(e,r){for(var n=0;n"u"?"undefined":Pi(Set))!==TUe?Set:EUe,s7=s(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!aP(e)){Jn("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){Jn("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new Xg,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var o=r.renderedPosition,l=e.pan(),u=e.zoom();a.position={x:(o.x-l.x)/u,y:(o.y-l.y)/u}}var h=[];hn(r.classes)?h=r.classes:At(r.classes)&&(h=r.classes.split(/\s+/));for(var f=0,d=h.length;fb?1:0},"defaultCmp"),f=s(function(x,b,k,A,w){var T;if(k==null&&(k=0),w==null&&(w=n),k<0)throw new Error("lo must be non-negative");for(A==null&&(A=x.length);kR;0<=R?S++:S--)E.push(S);return E}.apply(this).reverse(),C=[],A=0,w=T.length;AD;0<=D?++E:--E)L.push(o(x,k));return L},"nsmallest"),y=s(function(x,b,k,A){var w,T,C;for(A==null&&(A=n),w=x[k];k>b;){if(C=k-1>>1,T=x[C],A(w,T)<0){x[k]=T,k=C;continue}break}return x[k]=w},"_siftdown"),v=s(function(x,b,k){var A,w,T,C,E;for(k==null&&(k=n),w=x.length,E=b,T=x[b],A=2*b+1;A0;){var T=b.pop(),C=v(T),E=T.id();if(p[E]=C,C!==1/0)for(var S=T.neighborhood().intersect(g),R=0;R0)for(z.unshift(O);d[U];){var $=d[U];z.unshift($.edge),z.unshift($.node),N=$.node,U=N.id()}return l.spawn(z)},"pathTo")}},"dijkstra")},AUe={kruskal:s(function(e){e=e||function(k){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,o=new Array(a),l=n,u=s(function(A){for(var w=0;w0;){if(w(),C++,A===f){for(var E=[],S=a,R=f,D=x[R];E.unshift(S),D!=null&&E.unshift(D),S=v[R],S!=null;)R=S.id(),D=x[R];return{found:!0,distance:d[A],path:this.spawn(E),steps:C}}m[A]=!0;for(var L=k._private.edges,P=0;PD&&(g[R]=D,b[R]=S,k[R]=w),!a){var L=S*f+E;!a&&g[L]>D&&(g[L]=D,b[L]=E,k[L]=w)}}}for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:o,Se=k(Re),Ue=[],Oe=Se;;){if(Oe==null)return r.spawn();var _e=b(Oe),he=_e.edge,q=_e.pred;if(Ue.unshift(Oe[0]),Oe.same(Pe)&&Ue.length>0)break;he!=null&&Ue.unshift(he),Oe=q}return u.spawn(Ue)},"pathTo"),T=0;T=0;f--){var d=h[f],p=d[1],m=d[2];(r[p]===l&&r[m]===u||r[p]===u&&r[m]===l)&&h.splice(f,1)}for(var g=0;gi;){var a=Math.floor(Math.random()*r.length);r=PUe(a,e,r),n--}return r},"contractUntil"),BUe={kargerStein:s(function(){var e=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(z){return z.isLoop()});var a=n.length,o=i.length,l=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/OUe);if(a<2){Jn("At least 2 nodes are required for Karger-Stein algorithm");return}for(var h=[],f=0;f1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,a=0,o=r;o1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(r,n):(n0&&e.splice(0,r));for(var l=0,u=e.length-1;u>=0;u--){var h=e[u];o?isFinite(h)||(e[u]=-1/0,l++):e.splice(u,1)}a&&e.sort(function(p,m){return p-m});var f=e.length,d=Math.floor(f/2);return f%2!==0?e[d+1+l]:(e[d-1+l]+e[d+l])/2},"median"),UUe=s(function(e){return Math.PI*e/180},"deg2rad"),ST=s(function(e,r){return Math.atan2(r,e)-Math.PI/2},"getAngleFromDisp"),uP=Math.log2||function(t){return Math.log(t)/Math.log(2)},h0e=s(function(e){return e>0?1:e<0?-1:0},"signum"),I0=s(function(e,r){return Math.sqrt(S0(e,r))},"dist"),S0=s(function(e,r){var n=r.x-e.x,i=r.y-e.y;return n*n+i*i},"sqdist"),qUe=s(function(e){for(var r=e.length,n=0,i=0;i=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},"makeBoundingBox"),HUe=s(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),YUe=s(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),XUe=s(function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},"shiftBoundingBox"),f0e=s(function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},"updateBoundingBox"),jUe=s(function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),BT=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),FT=s(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,o;if(r.length===1)n=i=a=o=r[0];else if(r.length===2)n=a=r[0],o=i=r[1];else if(r.length===4){var l=Sl(r,4);n=l[0],i=l[1],a=l[2],o=l[3]}return e.x1-=o,e.x2+=i,e.y1-=n,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),$fe=s(function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),hP=s(function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},"boundingBoxesIntersect"),Wg=s(function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},"inBoundingBox"),KUe=s(function(e,r){return Wg(e,r.x,r.y)},"pointInBoundingBox"),d0e=s(function(e,r){return Wg(e,r.x1,r.y1)&&Wg(e,r.x2,r.y2)},"boundingBoxInBoundingBox"),p0e=s(function(e,r,n,i,a,o,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",h=u==="auto"?N0(a,o):u,f=a/2,d=o/2;h=Math.min(h,f,d);var p=h!==f,m=h!==d,g;if(p){var y=n-f+h-l,v=i-d-l,x=n+f-h+l,b=v;if(g=df(e,r,n,i,y,v,x,b,!1),g.length>0)return g}if(m){var k=n+f+l,A=i-d+h-l,w=k,T=i+d-h+l;if(g=df(e,r,n,i,k,A,w,T,!1),g.length>0)return g}if(p){var C=n-f+h-l,E=i+d+l,S=n+f-h+l,R=E;if(g=df(e,r,n,i,C,E,S,R,!1),g.length>0)return g}if(m){var D=n-f-l,L=i-d+h-l,P=D,M=i+d-h+l;if(g=df(e,r,n,i,D,L,P,M,!1),g.length>0)return g}var F;{var I=n-f+h,O=i-d+h;if(F=yx(e,r,n,i,I,O,h+l),F.length>0&&F[0]<=I&&F[1]<=O)return[F[0],F[1]]}{var z=n+f-h,N=i-d+h;if(F=yx(e,r,n,i,z,N,h+l),F.length>0&&F[0]>=z&&F[1]<=N)return[F[0],F[1]]}{var U=n+f-h,$=i+d-h;if(F=yx(e,r,n,i,U,$,h+l),F.length>0&&F[0]>=U&&F[1]>=$)return[F[0],F[1]]}{var W=n-f+h,ee=i+d-h;if(F=yx(e,r,n,i,W,ee,h+l),F.length>0&&F[0]<=W&&F[1]>=ee)return[F[0],F[1]]}return[]},"roundRectangleIntersectLine"),QUe=s(function(e,r,n,i,a,o,l){var u=l,h=Math.min(n,a),f=Math.max(n,a),d=Math.min(i,o),p=Math.max(i,o);return h-u<=e&&e<=f+u&&d-u<=r&&r<=p+u},"inLineVicinity"),ZUe=s(function(e,r,n,i,a,o,l,u,h){var f={x1:Math.min(n,l,a)-h,x2:Math.max(n,l,a)+h,y1:Math.min(i,u,o)-h,y2:Math.max(i,u,o)+h};return!(ef.x2||rf.y2)},"inBezierVicinity"),JUe=s(function(e,r,n,i){n-=i;var a=r*r-4*e*n;if(a<0)return[];var o=Math.sqrt(a),l=2*e,u=(-r+o)/l,h=(-r-o)/l;return[u,h]},"solveQuadratic"),eqe=s(function(e,r,n,i,a){var o=1e-5;e===0&&(e=o),r/=e,n/=e,i/=e;var l,u,h,f,d,p,m,g;if(u=(3*n-r*r)/9,h=-(27*i)+r*(9*n-2*(r*r)),h/=54,l=u*u*u+h*h,a[1]=0,m=r/3,l>0){d=h+Math.sqrt(l),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),p=h-Math.sqrt(l),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),a[0]=-m+d+p,m+=(d+p)/2,a[4]=a[2]=-m,m=Math.sqrt(3)*(-p+d)/2,a[3]=m,a[5]=-m;return}if(a[5]=a[3]=0,l===0){g=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),a[0]=-m+2*g,a[4]=a[2]=-(g+m);return}u=-u,f=u*u*u,f=Math.acos(h/Math.sqrt(f)),g=2*Math.sqrt(u),a[0]=-m+g*Math.cos(f/3),a[2]=-m+g*Math.cos((f+2*Math.PI)/3),a[4]=-m+g*Math.cos((f+4*Math.PI)/3)},"solveCubic"),tqe=s(function(e,r,n,i,a,o,l,u){var h=1*n*n-4*n*a+2*n*l+4*a*a-4*a*l+l*l+i*i-4*i*o+2*i*u+4*o*o-4*o*u+u*u,f=1*9*n*a-3*n*n-3*n*l-6*a*a+3*a*l+9*i*o-3*i*i-3*i*u-6*o*o+3*o*u,d=1*3*n*n-6*n*a+n*l-n*e+2*a*a+2*a*e-l*e+3*i*i-6*i*o+i*u-i*r+2*o*o+2*o*r-u*r,p=1*n*a-n*n+n*e-a*e+i*o-i*i+i*r-o*r,m=[];eqe(h,f,d,p,m);for(var g=1e-7,y=[],v=0;v<6;v+=2)Math.abs(m[v+1])=0&&m[v]<=1&&y.push(m[v]);y.push(1),y.push(0);for(var x=-1,b,k,A,w=0;w=0?Ah?(e-a)*(e-a)+(r-o)*(r-o):f-p},"sqdistToFiniteLine"),Ms=s(function(e,r,n){for(var i,a,o,l,u,h=0,f=0;f=e&&e>=o||i<=e&&e<=o)u=(e-i)/(o-i)*(l-a)+a,u>r&&h++;else continue;return h%2!==0},"pointInsidePolygonPoints"),Wu=s(function(e,r,n,i,a,o,l,u,h){var f=new Array(n.length),d;u[0]!=null?(d=Math.atan(u[1]/u[0]),u[0]<0?d=d+Math.PI/2:d=-d-Math.PI/2):d=u;for(var p=Math.cos(-d),m=Math.sin(-d),g=0;g0){var v=KT(f,-h);y=jT(v)}else y=f;return Ms(e,r,y)},"pointInsidePolygon"),nqe=s(function(e,r,n,i,a,o,l,u){for(var h=new Array(n.length*2),f=0;f=0&&v<=1&&b.push(v),x>=0&&x<=1&&b.push(x),b.length===0)return[];var k=b[0]*u[0]+e,A=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[k,A];var w=b[1]*u[0]+e,T=b[1]*u[1]+r;return[k,A,w,T]}else return[k,A]},"intersectLineCircle"),RO=s(function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},"midOfThree"),df=s(function(e,r,n,i,a,o,l,u,h){var f=e-a,d=n-e,p=l-a,m=r-o,g=i-r,y=u-o,v=p*m-y*f,x=d*m-g*f,b=y*d-p*g;if(b!==0){var k=v/b,A=x/b,w=.001,T=0-w,C=1+w;return T<=k&&k<=C&&T<=A&&A<=C?[e+k*d,r+k*g]:h?[e+k*d,r+k*g]:[]}else return v===0||x===0?RO(e,n,l)===l?[l,u]:RO(e,n,a)===a?[a,o]:RO(a,l,n)===n?[n,i]:[]:[]},"finiteLinesIntersect"),_x=s(function(e,r,n,i,a,o,l,u){var h=[],f,d=new Array(n.length),p=!0;o==null&&(p=!1);var m;if(p){for(var g=0;g0){var y=KT(d,-u);m=jT(y)}else m=d}else m=n;for(var v,x,b,k,A=0;A2){for(var g=[f[0],f[1]],y=Math.pow(g[0]-e,2)+Math.pow(g[1]-r,2),v=1;vf&&(f=A)},"set"),get:s(function(k){return h[k]},"get")},p=0;p0?I=F.edgesTo(M)[0]:I=M.edgesTo(F)[0];var O=i(I);M=M.id(),E[M]>E[L]+O&&(E[M]=E[L]+O,S.nodes.indexOf(M)<0?S.push(M):S.updateItem(M),C[M]=0,T[M]=[]),E[M]==E[L]+O&&(C[M]=C[M]+C[L],T[M].push(L))}else for(var z=0;z0;){for(var W=w.pop(),ee=0;ee0&&l.push(n[u]);l.length!==0&&a.push(i.collection(l))}return a},"assign"),xqe=s(function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:wqe,l=i,u,h,f=0;f=2?hx(e,r,n,0,Wfe,Tqe):hx(e,r,n,0,qfe)},"euclidean"),squaredEuclidean:s(function(e,r,n){return hx(e,r,n,0,Wfe)},"squaredEuclidean"),manhattan:s(function(e,r,n){return hx(e,r,n,0,qfe)},"manhattan"),max:s(function(e,r,n){return hx(e,r,n,-1/0,Eqe)},"max")};Hg["squared-euclidean"]=Hg.squaredEuclidean;Hg.squaredeuclidean=Hg.squaredEuclidean;s(l7,"clusteringDistance");Cqe=ya({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dP=s(function(e){return Cqe(e)},"setOptions"),QT=s(function(e,r,n,i,a){var o=a!=="kMedoids",l=o?function(d){return n[d]}:function(d){return i[d](n)},u=s(function(p){return i[p](r)},"getQ"),h=n,f=r;return l7(e,i.length,l,u,h,f)},"getDist"),MO=s(function(e,r,n){for(var i=n.length,a=new Array(i),o=new Array(i),l=new Array(r),u=null,h=0;hn)return!1}return!0},"haveMatricesConverged"),Aqe=s(function(e,r,n){for(var i=0;il&&(l=r[h][f],u=f);a[u].push(e[h])}for(var d=0;d=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var g=r[o],y=r[i[o]],v;a.mode==="dendrogram"?v={left:g,right:y,key:g.key}:v={value:g.value.concat(y.value),key:g.key},e[g.index]=v,e.splice(y.index,1),r[g.key]=v;for(var x=0;xn[y.key][b.key]&&(u=n[y.key][b.key])):a.linkage==="max"?(u=n[g.key][b.key],n[g.key][b.key]0&&i.push(a);return i},"findExemplars"),Qfe=s(function(e,r,n){for(var i=[],a=0;al&&(o=h,l=r[a*e+h])}o>0&&i.push(o)}for(var f=0;fh&&(u=f,h=d)}n[a]=o[u]}return i=Qfe(e,r,n),i},"assign"),Zfe=s(function(e){for(var r=this.cy(),n=this.nodes(),i=Vqe(e),a={},o=0;o=D?(L=D,D=M,P=F):M>L&&(L=M);for(var I=0;I0?1:0;C[S%i.minIterations*l+W]=ee,$+=ee}if($>0&&(S>=i.minIterations-1||S==i.maxIterations-1)){for(var te=0,ce=0;ce1||T>1)&&(l=!0),d[k]=[],b.outgoers().forEach(function(E){E.isEdge()&&d[k].push(E.id())})}else p[k]=[void 0,b.target().id()]}):o.forEach(function(b){var k=b.id();if(b.isNode()){var A=b.degree(!0);A%2&&(u?h?l=!0:h=k:u=k),d[k]=[],b.connectedEdges().forEach(function(w){return d[k].push(w.id())})}else p[k]=[b.source().id(),b.target().id()]});var m={found:!1,trail:void 0};if(l)return m;if(h&&u)if(a){if(f&&h!=f)return m;f=h}else{if(f&&h!=f&&u!=f)return m;f||(f=h)}else f||(f=o[0].id());var g=s(function(k){for(var A=k,w=[k],T,C,E;d[A].length;)T=d[A].shift(),C=p[T][0],E=p[T][1],A!=E?(d[E]=d[E].filter(function(S){return S!=T}),A=E):!a&&A!=C&&(d[C]=d[C].filter(function(S){return S!=T}),A=C),w.unshift(T),w.unshift(A);return w},"walk"),y=[],v=[];for(v=g(f);v.length!=1;)d[v[0]].length==0?(y.unshift(o.getElementById(v.shift())),y.unshift(o.getElementById(v.shift()))):v=g(v.shift()).concat(v);y.unshift(o.getElementById(v.shift()));for(var x in d)if(d[x].length)return m;return m.found=!0,m.trail=this.spawn(y,!0),m},"hierholzer")},LT=s(function(){var e=this,r={},n=0,i=0,a=[],o=[],l={},u=s(function(p,m){for(var g=o.length-1,y=[],v=e.spawn();o[g].x!=p||o[g].y!=m;)y.push(o.pop().edge),g--;y.push(o.pop().edge),y.forEach(function(x){var b=x.connectedNodes().intersection(e);v.merge(x),b.forEach(function(k){var A=k.id(),w=k.connectedEdges().intersection(e);v.merge(k),r[A].cutVertex?v.merge(w.filter(function(T){return T.isLoop()})):v.merge(w)})}),a.push(v)},"buildComponent"),h=s(function d(p,m,g){p===g&&(i+=1),r[m]={id:n,low:n++,cutVertex:!1};var y=e.getElementById(m).connectedEdges().intersection(e);if(y.size()===0)a.push(e.spawn(e.getElementById(m)));else{var v,x,b,k;y.forEach(function(A){v=A.source().id(),x=A.target().id(),b=v===m?x:v,b!==g&&(k=A.id(),l[k]||(l[k]=!0,o.push({x:m,y:b,edge:A})),b in r?r[m].low=Math.min(r[m].low,r[b].id):(d(p,b,m),r[m].low=Math.min(r[m].low,r[b].low),r[m].id<=r[b].low&&(r[m].cutVertex=!0,u(m,b))))})}},"biconnectedSearch");e.forEach(function(d){if(d.isNode()){var p=d.id();p in r||(i=0,h(p,p),r[p].cutVertex=i>1)}});var f=Object.keys(r).filter(function(d){return r[d].cutVertex}).map(function(d){return e.getElementById(d)});return{cut:e.spawn(f),components:a}},"hopcroftTarjanBiconnected"),Kqe={hopcroftTarjanBiconnected:LT,htbc:LT,htb:LT,hopcroftTarjanBiconnectedComponents:LT},DT=s(function(){var e=this,r={},n=0,i=[],a=[],o=e.spawn(e),l=s(function u(h){a.push(h),r[h]={index:n,low:n++,explored:!1};var f=e.getElementById(h).connectedEdges().intersection(e);if(f.forEach(function(y){var v=y.target().id();v!==h&&(v in r||u(v),r[v].explored||(r[h].low=Math.min(r[h].low,r[v].low)))}),r[h].index===r[h].low){for(var d=e.spawn();;){var p=a.pop();if(d.merge(e.getElementById(p)),r[p].low=r[h].index,r[p].explored=!0,p===h)break}var m=d.edgesWith(d),g=d.merge(m);i.push(g),o=o.difference(g)}},"stronglyConnectedSearch");return e.forEach(function(u){if(u.isNode()){var h=u.id();h in r||l(h)}}),{cut:o,components:i}},"tarjanStronglyConnected"),Qqe={tarjanStronglyConnected:DT,tsc:DT,tscc:DT,tarjanStronglyConnectedComponents:DT},k0e={};[Cx,_Ue,AUe,DUe,MUe,NUe,BUe,lqe,Gg,Vg,UO,kqe,Nqe,$qe,Yqe,jqe,Kqe,Qqe].forEach(function(t){Pt(k0e,t)});w0e=0,T0e=1,E0e=2,Hu=s(function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=w0e,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api");Hu.prototype={fulfill:s(function(e){return Jfe(this,T0e,"fulfillValue",e)},"fulfill"),reject:s(function(e){return Jfe(this,E0e,"rejectReason",e)},"reject"),then:s(function(e,r){var n=this,i=new Hu;return n.onFulfilled.push(tde(e,i,"fulfill")),n.onRejected.push(tde(r,i,"reject")),C0e(n),i.proxy},"then")};Jfe=s(function(e,r,n,i){return e.state===w0e&&(e.state=r,e[n]=i,C0e(e)),e},"deliver"),C0e=s(function(e){e.state===T0e?ede(e,"onFulfilled",e.fulfillValue):e.state===E0e&&ede(e,"onRejected",e.rejectReason)},"execute"),ede=s(function(e,r,n){if(e[r].length!==0){var i=e[r];e[r]=[];var a=s(function(){for(var l=0;l0},"animatedImpl")},"animated"),clearQueue:s(function(){return s(function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var o=0;o0&&this.spawn(i).updateStyle().emit("class"),r},"classes"),addClass:s(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:s(function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},"hasClass"),toggleClass:s(function(e,r){hn(e)||(e=e.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],o=0,l=n.length;o0&&this.spawn(a).updateStyle().emit("class"),n},"toggleClass"),removeClass:s(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:s(function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n},"flashClass")};zT.className=zT.classNames=zT.classes;Tr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Oi,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Tr.variable="(?:[\\w-.]|(?:\\\\"+Tr.metaChar+"))+";Tr.className="(?:[\\w-]|(?:\\\\"+Tr.metaChar+"))+";Tr.value=Tr.string+"|"+Tr.number;Tr.id=Tr.variable;(function(){var t,e,r;for(t=Tr.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(Tr.comparatorOp+="|\\!"+e)})();rn=s(function(){return{checks:[]}},"newQuery"),ft={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},WO=[{selector:":selected",matches:s(function(e){return e.selected()},"matches")},{selector:":unselected",matches:s(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:s(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:s(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:s(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:s(function(e){return!e.locked()},"matches")},{selector:":visible",matches:s(function(e){return e.visible()},"matches")},{selector:":hidden",matches:s(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:s(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:s(function(e){return e.grabbed()},"matches")},{selector:":free",matches:s(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:s(function(e){return e.removed()},"matches")},{selector:":inside",matches:s(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:s(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:s(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:s(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:s(function(e){return!e.animated()},"matches")},{selector:":parent",matches:s(function(e){return e.isParent()},"matches")},{selector:":childless",matches:s(function(e){return e.isChildless()},"matches")},{selector:":child",matches:s(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:s(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:s(function(e){return e.isChild()},"matches")},{selector:":compound",matches:s(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:s(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:s(function(e){return e.isSimple()},"matches")},{selector:":active",matches:s(function(e){return e.active()},"matches")},{selector:":inactive",matches:s(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:s(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:s(function(e){return!e.backgrounding()},"matches")}].sort(function(t,e){return kVe(t.selector,e.selector)}),uYe=function(){for(var t={},e,r=0;r0&&f.edgeCount>0)return Kr("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(f.edgeCount>1)return Kr("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;f.edgeCount===1&&Kr("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),gYe=s(function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=s(function(f){return f??""},"clean"),r=s(function(f){return At(f)?'"'+f+'"':e(f)},"cleanVal"),n=s(function(f){return" "+f+" "},"space"),i=s(function(f,d){var p=f.type,m=f.value;switch(p){case ft.GROUP:{var g=e(m);return g.substring(0,g.length-1)}case ft.DATA_COMPARE:{var y=f.field,v=f.operator;return"["+y+n(e(v))+r(m)+"]"}case ft.DATA_BOOL:{var x=f.operator,b=f.field;return"["+e(x)+b+"]"}case ft.DATA_EXIST:{var k=f.field;return"["+k+"]"}case ft.META_COMPARE:{var A=f.operator,w=f.field;return"[["+w+n(e(A))+r(m)+"]]"}case ft.STATE:return m;case ft.ID:return"#"+m;case ft.CLASS:return"."+m;case ft.PARENT:case ft.CHILD:return a(f.parent,d)+n(">")+a(f.child,d);case ft.ANCESTOR:case ft.DESCENDANT:return a(f.ancestor,d)+" "+a(f.descendant,d);case ft.COMPOUND_SPLIT:{var T=a(f.left,d),C=a(f.subject,d),E=a(f.right,d);return T+(T.length>0?" ":"")+C+E}case ft.TRUE:return""}},"checkToString"),a=s(function(f,d){return f.checks.reduce(function(p,m,g){return p+(d===f&&g===0?"$":"")+i(m,d)},"")},"queryToString"),o="",l=0;l1&&l=0&&(r=r.replace("!",""),d=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),f=!0),(a||l||f)&&(u=!a&&!o?"":""+e,h=""+n),f&&(e=u=u.toLowerCase(),n=h=h.toLowerCase()),r){case"*=":i=u.indexOf(h)>=0;break;case"$=":i=u.indexOf(h,u.length-h.length)>=0;break;case"^=":i=u.indexOf(h)===0;break;case"=":i=e===n;break;case">":p=!0,i=e>n;break;case">=":p=!0,i=e>=n;break;case"<":p=!0,i=e1&&arguments[1]!==void 0?arguments[1]:!0;return vP(this,t,e,N0e)};s(O0e,"addParent");Yg.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return vP(this,t,e,O0e)};s(EYe,"addParentAndChildren");Yg.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return vP(this,t,e,EYe)};Yg.ancestors=Yg.parents;Lx=P0e={data:jr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:jr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:jr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:jr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:jr.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:jr.removeData({field:"rscratch",triggerEvent:!1}),id:s(function(){var e=this[0];if(e)return e._private.data.id},"id")};Lx.attr=Lx.data;Lx.removeAttr=Lx.removeData;CYe=P0e,f7={};s(NO,"defineDegreeFunction");Pt(f7,{degree:NO(function(t,e){return e.source().same(e.target())?2:1}),indegree:NO(function(t,e){return e.target().same(t)?1:0}),outdegree:NO(function(t,e){return e.source().same(t)?1:0})});s(Ig,"defineDegreeBoundsFunction");Pt(f7,{minDegree:Ig("degree",function(t,e){return te}),minIndegree:Ig("indegree",function(t,e){return te}),minOutdegree:Ig("outdegree",function(t,e){return te})});Pt(f7,{totalDegree:s(function(e){for(var r=0,n=this.nodes(),i=0;i0,p=d;d&&(f=f[0]);var m=p?f.position():{x:0,y:0};r!==void 0?h.position(e,r+m[e]):a!==void 0&&h.position({x:a.x+m.x,y:a.y+m.y})}else{var g=n.position(),y=l?n.parent():null,v=y&&y.length>0,x=v;v&&(y=y[0]);var b=x?y.position():{x:0,y:0};return a={x:g.x-b.x,y:g.y-b.y},e===void 0?a:a[e]}else if(!o)return;return this},"relativePosition")};Ll.modelPosition=Ll.point=Ll.position;Ll.modelPositions=Ll.points=Ll.positions;Ll.renderedPoint=Ll.renderedPosition;Ll.relativePoint=Ll.relativePosition;SYe=B0e;Ug=kf={};kf.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),i=r.pan(),a=e.x1*n+i.x,o=e.x2*n+i.x,l=e.y1*n+i.y,u=e.y2*n+i.y;return{x1:a,x2:o,y1:l,y2:u,w:o-a,h:u-l}};kf.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};kf.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(o){if(!o.isParent())return;var l=o._private,u=o.children(),h=o.pstyle("compound-sizing-wrt-labels").value==="include",f={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},d=u.boundingBox({includeLabels:h,includeOverlays:!1,useCache:!1}),p=l.position;(d.w===0||d.h===0)&&(d={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},d.x1=p.x-d.w/2,d.x2=p.x+d.w/2,d.y1=p.y-d.h/2,d.y2=p.y+d.h/2);function m(S,R,D){var L=0,P=0,M=R+D;return S>0&&M>0&&(L=R/M*S,P=D/M*S),{biasDiff:L,biasComplementDiff:P}}s(m,"computeBiasValues");function g(S,R,D,L){if(D.units==="%")switch(L){case"width":return S>0?D.pfValue*S:0;case"height":return R>0?D.pfValue*R:0;case"average":return S>0&&R>0?D.pfValue*(S+R)/2:0;case"min":return S>0&&R>0?S>R?D.pfValue*R:D.pfValue*S:0;case"max":return S>0&&R>0?S>R?D.pfValue*S:D.pfValue*R:0;default:return 0}else return D.units==="px"?D.pfValue:0}s(g,"computePaddingValues");var y=f.width.left.value;f.width.left.units==="px"&&f.width.val>0&&(y=y*100/f.width.val);var v=f.width.right.value;f.width.right.units==="px"&&f.width.val>0&&(v=v*100/f.width.val);var x=f.height.top.value;f.height.top.units==="px"&&f.height.val>0&&(x=x*100/f.height.val);var b=f.height.bottom.value;f.height.bottom.units==="px"&&f.height.val>0&&(b=b*100/f.height.val);var k=m(f.width.val-d.w,y,v),A=k.biasDiff,w=k.biasComplementDiff,T=m(f.height.val-d.h,x,b),C=T.biasDiff,E=T.biasComplementDiff;l.autoPadding=g(d.w,d.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),l.autoWidth=Math.max(d.w,f.width.val),p.x=(-A+d.x1+d.x2+w)/2,l.autoHeight=Math.max(d.h,f.height.val),p.y=(-C+d.y1+d.y2+E)/2}s(r,"update");for(var n=0;ne.x2?i:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),_0=s(function(e,r){return r==null?e:_l(e,r.x1,r.y1,r.x2,r.y2)},"updateBoundsFromBox"),fx=s(function(e,r,n){return Al(e,r,n)},"prefixedProperty"),RT=s(function(e,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,o=a.arrowWidth/2,l=r.pstyle(n+"-arrow-shape").value,u,h;if(l!=="none"){n==="source"?(u=a.srcX,h=a.srcY):n==="target"?(u=a.tgtX,h=a.tgtY):(u=a.midX,h=a.midY);var f=i.arrowBounds=i.arrowBounds||{},d=f[n]=f[n]||{};d.x1=u-o,d.y1=h-o,d.x2=u+o,d.y2=h+o,d.w=d.x2-d.x1,d.h=d.y2-d.y1,BT(d,1),_l(e,d.x1,d.y1,d.x2,d.y2)}}},"updateBoundsFromArrow"),OO=s(function(e,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,o=a.rstyle,l=r.pstyle(i+"label").strValue;if(l){var u=r.pstyle("text-halign"),h=r.pstyle("text-valign"),f=fx(o,"labelWidth",n),d=fx(o,"labelHeight",n),p=fx(o,"labelX",n),m=fx(o,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,y=r.pstyle(i+"text-margin-y").pfValue,v=r.isEdge(),x=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,k=r.pstyle("text-border-width").pfValue,A=k/2,w=r.pstyle("text-background-padding").pfValue,T=2,C=d,E=f,S=E/2,R=C/2,D,L,P,M;if(v)D=p-S,L=p+S,P=m-R,M=m+R;else{switch(u.value){case"left":D=p-E,L=p;break;case"center":D=p-S,L=p+S;break;case"right":D=p,L=p+E;break}switch(h.value){case"top":P=m-C,M=m;break;case"center":P=m-R,M=m+R;break;case"bottom":P=m,M=m+C;break}}D+=g-Math.max(b,A)-w-T,L+=g+Math.max(b,A)+w+T,P+=y-Math.max(b,A)-w-T,M+=y+Math.max(b,A)+w+T;var F=n||"main",I=a.labelBounds,O=I[F]=I[F]||{};O.x1=D,O.y1=P,O.x2=L,O.y2=M,O.w=L-D,O.h=M-P;var z=v&&x.strValue==="autorotate",N=x.pfValue!=null&&x.pfValue!==0;if(z||N){var U=z?fx(a.rstyle,"labelAngle",n):x.pfValue,$=Math.cos(U),W=Math.sin(U),ee=(D+L)/2,te=(P+M)/2;if(!v){switch(u.value){case"left":ee=L;break;case"right":ee=D;break}switch(h.value){case"top":te=M;break;case"bottom":te=P;break}}var ce=s(function(ie,ye){return ie=ie-ee,ye=ye-te,{x:ie*$-ye*W+ee,y:ie*W+ye*$+te}},"rotate"),Z=ce(D,P),fe=ce(D,M),ne=ce(L,P),H=ce(L,M);D=Math.min(Z.x,fe.x,ne.x,H.x),L=Math.max(Z.x,fe.x,ne.x,H.x),P=Math.min(Z.y,fe.y,ne.y,H.y),M=Math.max(Z.y,fe.y,ne.y,H.y)}var Q=F+"Rot",K=I[Q]=I[Q]||{};K.x1=D,K.y1=P,K.x2=L,K.y2=M,K.w=L-D,K.h=M-P,_l(e,D,P,L,M),_l(a.labelBounds.all,D,P,L,M)}return e}},"updateBoundsFromLabel"),_Ye=s(function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value;if(n>0&&i>0){var a=r.pstyle("outline-offset").value,o=r.pstyle("shape").value,l=i+a,u=(e.w+l*2)/e.w,h=(e.h+l*2)/e.h,f=0,d=0;["diamond","pentagon","round-triangle"].includes(o)?(u=(e.w+l*2.4)/e.w,d=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(o)?u=(e.w+l*2.4)/e.w:o==="star"?(u=(e.w+l*2.8)/e.w,h=(e.h+l*2.6)/e.h,d=-l/3.8):o==="triangle"?(u=(e.w+l*2.8)/e.w,h=(e.h+l*2.4)/e.h,d=-l/1.4):o==="vee"&&(u=(e.w+l*4.4)/e.w,h=(e.h+l*3.8)/e.h,d=-l*.5);var p=e.h*h-e.h,m=e.w*u-e.w;if(FT(e,[Math.ceil(p/2),Math.ceil(m/2)]),f!=0||d!==0){var g=XUe(e,f,d);f0e(e,g)}}}},"updateBoundsFromOutline"),AYe=s(function(e,r){var n=e._private.cy,i=n.styleEnabled(),a=n.headless(),o=Is(),l=e._private,u=e.isNode(),h=e.isEdge(),f,d,p,m,g,y,v=l.rstyle,x=u&&i?e.pstyle("bounds-expansion").pfValue:[0],b=s(function(De){return De.pstyle("display").value!=="none"},"isDisplayed"),k=!i||b(e)&&(!h||b(e.source())&&b(e.target()));if(k){var A=0,w=0;i&&r.includeOverlays&&(A=e.pstyle("overlay-opacity").value,A!==0&&(w=e.pstyle("overlay-padding").value));var T=0,C=0;i&&r.includeUnderlays&&(T=e.pstyle("underlay-opacity").value,T!==0&&(C=e.pstyle("underlay-padding").value));var E=Math.max(w,C),S=0,R=0;if(i&&(S=e.pstyle("width").pfValue,R=S/2),u&&r.includeNodes){var D=e.position();g=D.x,y=D.y;var L=e.outerWidth(),P=L/2,M=e.outerHeight(),F=M/2;f=g-P,d=g+P,p=y-F,m=y+F,_l(o,f,p,d,m),i&&r.includeOutlines&&_Ye(o,e)}else if(h&&r.includeEdges)if(i&&!a){var I=e.pstyle("curve-style").strValue;if(f=Math.min(v.srcX,v.midX,v.tgtX),d=Math.max(v.srcX,v.midX,v.tgtX),p=Math.min(v.srcY,v.midY,v.tgtY),m=Math.max(v.srcY,v.midY,v.tgtY),f-=R,d+=R,p-=R,m+=R,_l(o,f,p,d,m),I==="haystack"){var O=v.haystackPts;if(O&&O.length===2){if(f=O[0].x,p=O[0].y,d=O[1].x,m=O[1].y,f>d){var z=f;f=d,d=z}if(p>m){var N=p;p=m,m=N}_l(o,f-R,p-R,d+R,m+R)}}else if(I==="bezier"||I==="unbundled-bezier"||I.endsWith("segments")||I.endsWith("taxi")){var U;switch(I){case"bezier":case"unbundled-bezier":U=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":U=v.linePts;break}if(U!=null)for(var $=0;$d){var fe=f;f=d,d=fe}if(p>m){var ne=p;p=m,m=ne}f-=R,d+=R,p-=R,m+=R,_l(o,f,p,d,m)}if(i&&r.includeEdges&&h&&(RT(o,e,"mid-source"),RT(o,e,"mid-target"),RT(o,e,"source"),RT(o,e,"target")),i){var H=e.pstyle("ghost").value==="yes";if(H){var Q=e.pstyle("ghost-offset-x").pfValue,K=e.pstyle("ghost-offset-y").pfValue;_l(o,o.x1+Q,o.y1+K,o.x2+Q,o.y2+K)}}var re=l.bodyBounds=l.bodyBounds||{};$fe(re,o),FT(re,x),BT(re,1),i&&(f=o.x1,d=o.x2,p=o.y1,m=o.y2,_l(o,f-E,p-E,d+E,m+E));var ie=l.overlayBounds=l.overlayBounds||{};$fe(ie,o),FT(ie,x),BT(ie,1);var ye=l.labelBounds=l.labelBounds||{};ye.all!=null?YUe(ye.all):ye.all=Is(),i&&r.includeLabels&&(r.includeMainLabels&&OO(o,e,null),h&&(r.includeSourceLabels&&OO(o,e,"source"),r.includeTargetLabels&&OO(o,e,"target")))}return o.x1=Go(o.x1),o.y1=Go(o.y1),o.x2=Go(o.x2),o.y2=Go(o.y2),o.w=Go(o.x2-o.x1),o.h=Go(o.y2-o.y1),o.w>0&&o.h>0&&k&&(FT(o,x),BT(o,1)),o},"boundingBoxImpl"),z0e=s(function(e){var r=0,n=s(function(o){return(o?1:0)<=0;l--)o(l);return this};bf.removeAllListeners=function(){return this.removeListener("*")};bf.emit=bf.trigger=function(t,e,r){var n=this.listeners,i=n.length;return this.emitting++,hn(e)||(e=[e]),qYe(this,function(a,o){r!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],i=n.length);for(var l=s(function(f){var d=n[f];if(d.type===o.type&&(!d.namespace||d.namespace===o.namespace||d.namespace===VYe)&&a.eventMatches(a.context,d,o)){var p=[o];e!=null&&kUe(p,e),a.beforeEmit(a.context,d,o),d.conf&&d.conf.one&&(a.listeners=a.listeners.filter(function(y){return y!==d}));var m=a.callbackContext(a.context,d,o),g=d.callback.apply(m,p);a.afterEmit(a.context,d,o),g===!1&&(o.stopPropagation(),o.preventDefault())}},"_loop2"),u=0;u1&&!o){var l=this.length-1,u=this[l],h=u._private.data.id;this[l]=void 0,this[e]=u,a.set(h,{ele:u,index:e})}return this.length--,this},"unmergeAt"),unmergeOne:s(function(e){e=e[0];var r=this._private,n=e._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var o=a.index;return this.unmergeAt(o),this},"unmergeOne"),unmerge:s(function(e){var r=this._private.cy;if(!e)return this;if(e&&At(e)){var n=e;e=r.mutableElements().filter(n)}for(var i=0;i=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},"unmergeBy"),map:s(function(e,r){for(var n=[],i=this,a=0;an&&(n=u,i=l)}return{value:n,ele:i}},"max"),min:s(function(e,r){for(var n=1/0,i,a=this,o=0;o=0&&a"u"?"undefined":Pi(Symbol))!=e&&Pi(Symbol.iterator)!=e;r&&(ZT[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,o=this.length;return qde({next:s(function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return a??(r?i.style().getDefaultProperty(e):null)}},"parsedStyle"),numericStyle:s(function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},"numericStyle"),numericStyleUnits:s(function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},"numericStyleUnits"),renderedStyle:s(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},"renderedStyle"),style:s(function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(Er(e)){var o=e;a.applyBypass(this,o,i),this.emitAndNotify("style")}else if(At(e))if(r===void 0){var l=this[0];return l?a.getStylePropertyValue(l,e):void 0}else a.applyBypass(this,e,r,i),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?a.getRawStyle(u):void 0}return this},"style"),removeStyle:s(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(e===void 0)for(var o=0;o0&&e.push(f[0]),e.push(l[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:s(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:s(function(e){return this.neighborhood(e)},"openNeighborhood")});Da.neighbourhood=Da.neighborhood;Da.closedNeighbourhood=Da.closedNeighborhood;Da.openNeighbourhood=Da.openNeighborhood;Pt(Da,{source:Vo(s(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"sourceImpl"),"source"),target:Vo(s(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"targetImpl"),"target"),sources:vde({attr:"source"}),targets:vde({attr:"target"})});s(vde,"defineSourceFunction");Pt(Da,{edgesWith:Vo(xde(),"edgesWith"),edgesTo:Vo(xde({thisIsSrc:!0}),"edgesTo")});s(xde,"defineEdgesWithFunction");Pt(Da,{connectedEdges:Vo(function(t){for(var e=[],r=this,n=0;n0);return o},"components"),component:s(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")});Da.componentsOf=Da.components;ga=s(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Jn("A collection must have a reference to the core");return}var a=new Ic,o=!1;if(!r)r=[];else if(r.length>0&&Er(r[0])&&!Nx(r[0])){o=!0;for(var l=[],u=new Xg,h=0,f=r.length;h0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],o=[],l,u=0,h=r.length;u0){for(var N=l.length===r.length?r:new ga(n,l),U=0;U0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function o(M){for(var F=M._private.edges,I=0;I0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var L=0;Lf&&Math.abs(g.v)>f;);return p?function(y){return u[y*(u.length-1)|0]}:h},"springRK4Factory")}(),kn=s(function(e,r,n,i){var a=eXe(e,r,n,i);return function(o,l,u){return o+(l-o)*a(u)}},"cubicBezier"),GT={linear:s(function(e,r,n){return e+(r-e)*n},"linear"),ease:kn(.25,.1,.25,1),"ease-in":kn(.42,0,1,1),"ease-out":kn(0,0,.58,1),"ease-in-out":kn(.42,0,.58,1),"ease-in-sine":kn(.47,0,.745,.715),"ease-out-sine":kn(.39,.575,.565,1),"ease-in-out-sine":kn(.445,.05,.55,.95),"ease-in-quad":kn(.55,.085,.68,.53),"ease-out-quad":kn(.25,.46,.45,.94),"ease-in-out-quad":kn(.455,.03,.515,.955),"ease-in-cubic":kn(.55,.055,.675,.19),"ease-out-cubic":kn(.215,.61,.355,1),"ease-in-out-cubic":kn(.645,.045,.355,1),"ease-in-quart":kn(.895,.03,.685,.22),"ease-out-quart":kn(.165,.84,.44,1),"ease-in-out-quart":kn(.77,0,.175,1),"ease-in-quint":kn(.755,.05,.855,.06),"ease-out-quint":kn(.23,1,.32,1),"ease-in-out-quint":kn(.86,0,.07,1),"ease-in-expo":kn(.95,.05,.795,.035),"ease-out-expo":kn(.19,1,.22,1),"ease-in-out-expo":kn(1,0,0,1),"ease-in-circ":kn(.6,.04,.98,.335),"ease-out-circ":kn(.075,.82,.165,1),"ease-in-out-circ":kn(.785,.135,.15,.86),spring:s(function(e,r,n){if(n===0)return GT.linear;var i=tXe(e,r,n);return function(a,o,l){return a+(o-a)*i(l)}},"spring"),"cubic-bezier":kn};s(kde,"getEasedValue");s(wde,"getValue");s(Ng,"ease");s(rXe,"step$1");s(px,"valid");s(nXe,"startAnimation");s(Tde,"stepAll");iXe={animate:jr.animate(),animation:jr.animation(),animated:jr.animated(),clearQueue:jr.clearQueue(),delay:jr.delay(),delayAnimation:jr.delayAnimation(),stop:jr.stop(),addToAnimationPool:s(function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:s(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:s(function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&YT(s(function(a){Tde(a,e),r()},"animationStep"))}s(r,"headlessStep");var n=e.renderer();n&&n.beforeRender?n.beforeRender(s(function(a,o){Tde(o,e)},"rendererAnimationStep"),n.beforeRenderPriorities.animations):r()},"startAnimationLoop")},aXe={qualifierCompare:s(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:s(function(e,r,n){var i=r.qualifier;return i!=null?e!==n.target&&Nx(n.target)&&i.matches(n.target):!0},"eventMatches"),addEventFields:s(function(e,r){r.cy=e,r.target=e},"addEventFields"),callbackContext:s(function(e,r,n){return r.qualifier!=null?n.target:e},"callbackContext")},NT=s(function(e){return At(e)?new vf(e):e},"argSelector"),K0e={createEmitter:s(function(){var e=this._private;return e.emitter||(e.emitter=new d7(aXe,this)),this},"createEmitter"),emitter:s(function(){return this._private.emitter},"emitter"),on:s(function(e,r,n){return this.emitter().on(e,NT(r),n),this},"on"),removeListener:s(function(e,r,n){return this.emitter().removeListener(e,NT(r),n),this},"removeListener"),removeAllListeners:s(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:s(function(e,r,n){return this.emitter().one(e,NT(r),n),this},"one"),once:s(function(e,r,n){return this.emitter().one(e,NT(r),n),this},"once"),emit:s(function(e,r){return this.emitter().emit(e,r),this},"emit"),emitAndNotify:s(function(e,r){return this.emit(e),this.notify(e,r),this},"emitAndNotify")};jr.eventAliasesOn(K0e);YO={png:s(function(e){var r=this._private.renderer;return e=e||{},r.png(e)},"png"),jpg:s(function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)},"jpg")};YO.jpeg=YO.jpg;VT={layout:s(function(e){var r=this;if(e==null){Jn("Layout options must be specified to make a layout");return}if(e.name==null){Jn("A `name` must be specified to make a layout");return}var n=e.name,i=r.extension("layout",n);if(i==null){Jn("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;At(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var o=new i(Pt({},e,{cy:r,eles:a}));return o},"layout")};VT.createLayout=VT.makeLayout=VT.layout;sXe={notify:s(function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r)}},"notify"),notifications:s(function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},"notifications"),noNotifications:s(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:s(function(){return this._private.batchCount>0},"batching"),startBatch:s(function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:s(function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var i=e.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},"endBatch"),batch:s(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:s(function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),i=0;i0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},"destroyRenderer"),onRender:s(function(e){return this.on("render",e)},"onRender"),offRender:s(function(e){return this.off("render",e)},"offRender")};XO.invalidateDimensions=XO.resize;UT={collection:s(function(e,r){return At(e)?this.$(e):oo(e)?e.collection():hn(e)?(r||(r={}),new ga(this,e,r.unique,r.removed)):new ga(this)},"collection"),nodes:s(function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},"nodes"),edges:s(function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},"edges"),$:s(function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},"$"),mutableElements:s(function(){return this._private.elements},"mutableElements")};UT.elements=UT.filter=UT.$;Ma={},bx="t",lXe="f";Ma.apply=function(t){for(var e=this,r=e._private,n=r.cy,i=n.collection(),a=0;a0;if(p||d&&m){var g=void 0;p&&m||p?g=h.properties:m&&(g=h.mappedProperties);for(var y=0;y1&&(A=1),l.color){var T=n.valueMin[0],C=n.valueMax[0],E=n.valueMin[1],S=n.valueMax[1],R=n.valueMin[2],D=n.valueMax[2],L=n.valueMin[3]==null?1:n.valueMin[3],P=n.valueMax[3]==null?1:n.valueMax[3],M=[Math.round(T+(C-T)*A),Math.round(E+(S-E)*A),Math.round(R+(D-R)*A),Math.round(L+(P-L)*A)];a={bypass:n.bypass,name:n.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else if(l.number){var F=n.valueMin+(n.valueMax-n.valueMin)*A;a=this.parse(n.name,F,n.bypass,p)}else return!1;if(!a)return y(),!1;a.mapping=n,n=a;break}case o.data:{for(var I=n.field.split("."),O=d.data,z=0;z0&&a>0){for(var l={},u=!1,h=0;h0?t.delayAnimation(o).play().promise().then(k):k()}).then(function(){return t.animation({style:l,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,i),t.emitAndNotify("style"),n.transitioning=!1)};Ma.checkTrigger=function(t,e,r,n,i,a){var o=this.properties[e],l=i(o);l!=null&&l(r,n)&&a(o)};Ma.checkZOrderTrigger=function(t,e,r,n){var i=this;this.checkTrigger(t,e,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",t)})};Ma.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(i){return i.triggersBounds},function(i){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),i.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||n==="bezier")&&t.parallelEdges().forEach(function(a){a.isBundledBezier()&&a.dirtyBoundingBoxCache()}),i.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||n==="none")&&t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};Ma.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n)};Fx={};Fx.applyBypass=function(t,e,r,n){var i=this,a=[],o=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var l=0;li.length?n=n.substr(i.length):n=""}s(l,"removeSelAndBlockFromRemaining");function u(){a.length>o.length?a=a.substr(o.length):a=""}for(s(u,"removePropAndValFromRem");;){var h=n.match(/^\s*$/);if(h)break;var f=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!f){Kr("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=f[0];var d=f[1];if(d!=="core"){var p=new vf(d);if(p.invalid){Kr("Skipping parsing of block: Invalid selector found in string stylesheet: "+d),l();continue}}var m=f[2],g=!1;a=m;for(var y=[];;){var v=a.match(/^\s*$/);if(v)break;var x=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!x){Kr("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+m),g=!0;break}o=x[0];var b=x[1],k=x[2],A=e.properties[b];if(!A){Kr("Skipping property: Invalid property name in: "+o),u();continue}var w=r.parse(b,k);if(!w){Kr("Skipping property: Invalid property definition in: "+o),u();continue}y.push({name:b,val:k}),u()}if(g){l();break}r.selector(d);for(var T=0;T=7&&e[0]==="d"&&(f=new RegExp(l.data.regex).exec(e))){if(r)return!1;var p=l.data;return{name:t,value:f,strValue:""+e,mapped:p,field:f[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(d=new RegExp(l.mapData.regex).exec(e))){if(r||h.multiple)return!1;var m=l.mapData;if(!(h.color||h.number))return!1;var g=this.parse(t,d[4]);if(!g||g.mapped)return!1;var y=this.parse(t,d[5]);if(!y||y.mapped)return!1;if(g.pfValue===y.pfValue||g.strValue===y.strValue)return Kr("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+g.strValue+"`"),this.parse(t,g.strValue);if(h.color){var v=g.value,x=y.value,b=v[0]===x[0]&&v[1]===x[1]&&v[2]===x[2]&&(v[3]===x[3]||(v[3]==null||v[3]===1)&&(x[3]==null||x[3]===1));if(b)return!1}return{name:t,value:d,strValue:""+e,mapped:m,field:d[1],fieldMin:parseFloat(d[2]),fieldMax:parseFloat(d[3]),valueMin:g.value,valueMax:y.value,bypass:r}}}if(h.multiple&&n!=="multiple"){var k;if(u?k=e.split(/\s+/):hn(e)?k=e:k=[e],h.evenMultiple&&k.length%2!==0)return null;for(var A=[],w=[],T=[],C="",E=!1,S=0;S0?" ":"")+R.strValue}return h.validate&&!h.validate(A,w)?null:h.singleEnum&&E?A.length===1&&At(A[0])?{name:t,value:A[0],strValue:A[0],bypass:r}:null:{name:t,value:A,pfValue:T,strValue:C,bypass:r,units:w}}var D=s(function(){for(var H=0;Hh.max||h.strictMax&&e===h.max))return null;var I={name:t,value:e,strValue:""+e+(L||""),units:L,bypass:r};return h.unitless||L!=="px"&&L!=="em"?I.pfValue=e:I.pfValue=L==="px"||!L?e:this.getEmSizeInPixels()*e,(L==="ms"||L==="s")&&(I.pfValue=L==="ms"?e:1e3*e),(L==="deg"||L==="rad")&&(I.pfValue=L==="rad"?e:UUe(e)),L==="%"&&(I.pfValue=e/100),I}else if(h.propList){var O=[],z=""+e;if(z!=="none"){for(var N=z.split(/\s*,\s*|\s+/),U=0;U0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u=n.minZoom&&(n.maxZoom=r),this},"zoomRange"),minZoom:s(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:s(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:s(function(e){var r=this._private,n=r.pan,i=r.zoom,a,o,l=!1;if(r.zoomingEnabled||(l=!0),rt(e)?o=e:Er(e)&&(o=e.level,e.position!=null?a=o7(e.position,i,n):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(l=!0)),o=o>r.maxZoom?r.maxZoom:o,o=or.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=u,a.push("zoom"))}if(i&&(!o||!e.cancelOnFailedZoom)&&r.panningEnabled){var h=e.pan;rt(h.x)&&(r.pan.x=h.x,l=!1),rt(h.y)&&(r.pan.y=h.y,l=!1),l||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},"viewport"),center:s(function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:s(function(e,r){if(this._private.panningEnabled){if(At(e)){var n=e;e=this.mutableElements().filter(n)}else oo(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),a=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var l={x:(a-r*(i.x1+i.x2))/2,y:(o-r*(i.y1+i.y2))/2};return l}}},"getCenterPan"),reset:s(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},"reset"),invalidateSize:s(function(){this._private.sizeCache=null},"invalidateSize"),size:s(function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var i=n.window().getComputedStyle(r),a=s(function(l){return parseFloat(i.getPropertyValue(l))},"val");return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}}():{width:1,height:1})},"size"),width:s(function(){return this.size().width},"width"),height:s(function(){return this.size().height},"height"),extent:s(function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},"extent"),renderedExtent:s(function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},"renderedExtent"),multiClickDebounceTime:s(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this},"multiClickDebounceTime")};P0.centre=P0.center;P0.autolockNodes=P0.autolock;P0.autoungrabifyNodes=P0.autoungrabify;Rx={data:jr.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:jr.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:jr.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:jr.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Rx.attr=Rx.data;Rx.removeAttr=Rx.removeData;Mx=s(function(e){var r=this;e=Pt({},e);var n=e.container;n&&!HT(n)&&HT(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var o=Ni!==void 0&&n!==void 0&&!e.headless,l=e;l.layout=Pt({name:o?"grid":"null"},l.layout),l.renderer=Pt({name:o?"canvas":"null"},l.renderer);var u=s(function(g,y,v){return y!==void 0?y:v!==void 0?v:g},"defVal"),h=this._private={container:n,ready:!1,options:l,elements:new ga(this),listeners:[],aniEles:new ga(this),data:l.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,l.zoomingEnabled),userZoomingEnabled:u(!0,l.userZoomingEnabled),panningEnabled:u(!0,l.panningEnabled),userPanningEnabled:u(!0,l.userPanningEnabled),boxSelectionEnabled:u(!0,l.boxSelectionEnabled),autolock:u(!1,l.autolock,l.autolockNodes),autoungrabify:u(!1,l.autoungrabify,l.autoungrabifyNodes),autounselectify:u(!1,l.autounselectify),styleEnabled:l.styleEnabled===void 0?o:l.styleEnabled,zoom:rt(l.zoom)?l.zoom:1,pan:{x:Er(l.pan)&&rt(l.pan.x)?l.pan.x:0,y:Er(l.pan)&&rt(l.pan.y)?l.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,l.multiClickDebounceTime)};this.createEmitter(),this.selectionType(l.selectionType),this.zoomRange({min:l.minZoom,max:l.maxZoom});var f=s(function(g,y){var v=g.some(dVe);if(v)return jg.all(g).then(y);y(g)},"loadExtData");h.styleEnabled&&r.setStyle([]);var d=Pt({},l,l.renderer);r.initRenderer(d);var p=s(function(g,y,v){r.notifications(!1);var x=r.mutableElements();x.length>0&&x.remove(),g!=null&&(Er(g)||hn(g))&&r.add(g),r.one("layoutready",function(k){r.notifications(!0),r.emit(k),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var b=Pt({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()},"setElesAndLayout");f([l.style,l.elements],function(m){var g=m[0],y=m[1];h.styleEnabled&&r.style().append(g),p(y,function(){r.startAnimationLoop(),h.ready=!0,Gn(l.ready)&&r.on("ready",l.ready);for(var v=0;v0,u=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),h;if(oo(e.roots))h=e.roots;else if(hn(e.roots)){for(var f=[],d=0;d0;){var F=M(),I=R(F,L);if(I)F.outgoers().filter(function(ye){return ye.isNode()&&n.has(ye)}).forEach(P);else if(I===null){Kr("Detected double maximal shift for node `"+F.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var O=0;if(e.avoidOverlap)for(var z=0;z0&&x[0].length<=3?Oe/2:0),q=2*Math.PI/x[oe].length*Re;return oe===0&&x[0].length===1&&(he=1),{x:K.x+he*Math.cos(q),y:K.y+he*Math.sin(q)}}else{var _e={x:K.x+(Re+1-(Pe+1)/2)*Se,y:(oe+1)*Ue};return _e}},"getPosition");return n.nodes().layoutPositions(this,e,ie),this};dXe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(Z0e,"CircleLayout");Z0e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var o=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,h=u/Math.max(1,a.length-1),f,d=0,p=0;p1&&e.avoidOverlap){d*=1.75;var x=Math.cos(h)-Math.cos(0),b=Math.sin(h)-Math.sin(0),k=Math.sqrt(d*d/(x*x+b*b));f=Math.max(k,f)}var A=s(function(T,C){var E=e.startAngle+C*h*(i?1:-1),S=f*Math.cos(E),R=f*Math.sin(E),D={x:l.x+S,y:l.y+R};return D},"getPos");return n.nodes().layoutPositions(this,e,A),this};pXe={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:s(function(e){return e.degree()},"concentric"),levelWidth:s(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(J0e,"ConcentricLayout");J0e.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,i=e.eles,a=i.nodes().not(":parent"),o=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],h=0,f=0;f0){var w=Math.abs(b[0].value-A.value);w>=v&&(b=[],x.push(b))}b.push(A)}var T=h+e.minNodeSpacing;if(!e.avoidOverlap){var C=x.length>0&&x[0].length>1,E=Math.min(o.w,o.h)/2-T,S=E/(x.length+C?1:0);T=Math.min(T,S)}for(var R=0,D=0;D1&&e.avoidOverlap){var F=Math.cos(M)-Math.cos(0),I=Math.sin(M)-Math.sin(0),O=Math.sqrt(T*T/(F*F+I*I));R=Math.max(O,R)}L.r=R,R+=T}if(e.equidistant){for(var z=0,N=0,U=0;U=t.numIter||(wXe(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&a(),YT(d)}},"frame");f()}else{for(;h;)h=o(u),u++;Sde(n,t),l()}return this};v7.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};v7.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};gXe=s(function(e,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),o=Is(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),l={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),h={},f=0;f0){l.graphSet.push(E);for(var f=0;fi.count?0:i.graph},"findLCA"),vXe=s(function t(e,r,n,i){var a=i.graphSet[n];if(-10)var d=i.nodeOverlap*f,p=Math.sqrt(l*l+u*u),m=d*l/p,g=d*u/p;else var y=e7(e,l,u),v=e7(r,-1*l,-1*u),x=v.x-y.x,b=v.y-y.y,k=x*x+b*b,p=Math.sqrt(k),d=(e.nodeRepulsion+r.nodeRepulsion)/k,m=d*x/p,g=d*b/p;e.isLocked||(e.offsetX-=m,e.offsetY-=g),r.isLocked||(r.offsetX+=m,r.offsetY+=g)}},"nodeRepulsion"),CXe=s(function(e,r,n,i){if(n>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(i>0)var o=e.maxY-r.minY;else var o=r.maxY-e.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},"nodesOverlap"),e7=s(function(e,r,n){var i=e.positionX,a=e.positionY,o=e.height||1,l=e.width||1,u=n/r,h=o/l,f={};return r===0&&0n?(f.x=i,f.y=a+o/2,f):0r&&-1*h<=u&&u<=h?(f.x=i-l/2,f.y=a-l*n/2/r,f):0=h)?(f.x=i+o*r/2/n,f.y=a+o/2,f):(0>n&&(u<=-1*h||u>=h)&&(f.x=i-o*r/2/n,f.y=a-o/2),f)},"findClippingPoint"),SXe=s(function(e,r){for(var n=0;nn){var v=r.gravity*m/y,x=r.gravity*g/y;p.offsetX+=v,p.offsetY+=x}}}}},"calculateGravityForces"),AXe=s(function(e,r){var n=[],i=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;i<=a;){var o=n[i++],l=e.idToIndex[o],u=e.layoutNodes[l],h=u.children;if(0n)var a={x:n*e/i,y:n*r/i};else var a={x:e,y:r};return a},"limitForce"),RXe=s(function t(e,r){var n=e.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,a=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,a=!0),(i.minY==null||e.minY-i.padTopx&&(g+=v+r.componentSpacing,m=0,y=0,v=0)}}},"separateComponents"),MXe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:s(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(e,r){return r},"transform")};s(tpe,"GridLayout");tpe.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));var a=Is(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,e,function(ee){return{x:a.x1,y:a.y1}});else{var o=i.size(),l=Math.sqrt(o*a.h/a.w),u=Math.round(l),h=Math.round(a.w/a.h*l),f=s(function(te){if(te==null)return Math.min(u,h);var ce=Math.min(u,h);ce==u?u=te:h=te},"small"),d=s(function(te){if(te==null)return Math.max(u,h);var ce=Math.max(u,h);ce==u?u=te:h=te},"large"),p=e.rows,m=e.cols!=null?e.cols:e.columns;if(p!=null&&m!=null)u=p,h=m;else if(p!=null&&m==null)u=p,h=Math.ceil(o/u);else if(p==null&&m!=null)h=m,u=Math.ceil(o/h);else if(h*u>o){var g=f(),y=d();(g-1)*y>=o?f(g-1):(y-1)*g>=o&&d(y-1)}else for(;h*u=o?d(x+1):f(v+1)}var b=a.w/h,k=a.h/u;if(e.condense&&(b=0,k=0),e.avoidOverlap)for(var A=0;A=h&&(F=0,M++)},"moveToNextCell"),O={},z=0;z(F=rqe(t,e,I[O],I[O+1],I[O+2],I[O+3])))return v(C,F),!0}else if(S.edgeType==="bezier"||S.edgeType==="multibezier"||S.edgeType==="self"||S.edgeType==="compound"){for(var I=S.allpts,O=0;O+5(F=tqe(t,e,I[O],I[O+1],I[O+2],I[O+3],I[O+4],I[O+5])))return v(C,F),!0}for(var z=z||E.source,N=N||E.target,U=i.getArrowWidth(R,D),$=[{name:"source",x:S.arrowStartX,y:S.arrowStartY,angle:S.srcArrowAngle},{name:"target",x:S.arrowEndX,y:S.arrowEndY,angle:S.tgtArrowAngle},{name:"mid-source",x:S.midX,y:S.midY,angle:S.midsrcArrowAngle},{name:"mid-target",x:S.midX,y:S.midY,angle:S.midtgtArrowAngle}],O=0;O<$.length;O++){var W=$[O],ee=a.arrowShapes[C.pstyle(W.name+"-arrow-shape").value],te=C.pstyle("width").pfValue;if(ee.roughCollide(t,e,U,W.angle,{x:W.x,y:W.y},te,f)&&ee.collide(t,e,U,W.angle,{x:W.x,y:W.y},te,f))return v(C),!0}h&&l.length>0&&(x(z),x(N))}s(b,"checkEdge");function k(C,E,S){return Al(C,E,S)}s(k,"preprop");function A(C,E){var S=C._private,R=p,D;E?D=E+"-":D="",C.boundingBox();var L=S.labelBounds[E||"main"],P=C.pstyle(D+"label").value,M=C.pstyle("text-events").strValue==="yes";if(!(!M||!P)){var F=k(S.rscratch,"labelX",E),I=k(S.rscratch,"labelY",E),O=k(S.rscratch,"labelAngle",E),z=C.pstyle(D+"text-margin-x").pfValue,N=C.pstyle(D+"text-margin-y").pfValue,U=L.x1-R-z,$=L.x2+R-z,W=L.y1-R-N,ee=L.y2+R-N;if(O){var te=Math.cos(O),ce=Math.sin(O),Z=s(function(ie,ye){return ie=ie-F,ye=ye-I,{x:ie*te-ye*ce+F,y:ie*ce+ye*te+I}},"rotate"),fe=Z(U,W),ne=Z(U,ee),H=Z($,W),Q=Z($,ee),K=[fe.x+z,fe.y+N,H.x+z,H.y+N,Q.x+z,Q.y+N,ne.x+z,ne.y+N];if(Ms(t,e,K))return v(C),!0}else if(Wg(L,t,e))return v(C),!0}}s(A,"checkLabel");for(var w=o.length-1;w>=0;w--){var T=o[w];T.isNode()?x(T)||A(T):b(T)||A(T)||A(T,"source")||A(T,"target")}return l};F0.getAllInBox=function(t,e,r,n){var i=this.getCachedZSortedEles().interactive,a=[],o=Math.min(t,r),l=Math.max(t,r),u=Math.min(e,n),h=Math.max(e,n);t=o,r=l,e=u,n=h;for(var f=Is({x1:t,y1:e,x2:r,y2:n}),d=0;d0?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),FXe=s(function(e,r,n,i,a){if(e!==Rde?Mde(r,e,Rc):BXe($o,Rc),Mde(r,n,$o),Lde=Rc.nx*$o.ny-Rc.ny*$o.nx,Dde=Rc.nx*$o.nx-Rc.ny*-$o.ny,Uu=Math.asin(Math.max(-1,Math.min(1,Lde))),Math.abs(Uu)<1e-6){jO=r.x,KO=r.y,A0=Pg=0;return}L0=1,qT=!1,Dde<0?Uu<0?Uu=Math.PI+Uu:(Uu=Math.PI-Uu,L0=-1,qT=!0):Uu>0&&(L0=-1,qT=!0),r.radius!==void 0?Pg=r.radius:Pg=i,E0=Uu/2,OT=Math.min(Rc.len/2,$o.len/2),a?(Dc=Math.abs(Math.cos(E0)*Pg/Math.sin(E0)),Dc>OT?(Dc=OT,A0=Math.abs(Dc*Math.sin(E0)/Math.cos(E0))):A0=Pg):(Dc=Math.min(OT,Pg),A0=Math.abs(Dc*Math.sin(E0)/Math.cos(E0))),QO=r.x+$o.nx*Dc,ZO=r.y+$o.ny*Dc,jO=QO-$o.ny*A0*L0,KO=ZO+$o.nx*A0*L0,ape=r.x+Rc.nx*Dc,spe=r.y+Rc.ny*Dc,Rde=r},"calcCornerArc");s(ope,"drawPreparedRoundCorner");s(EP,"getRoundCorner");Ia={};Ia.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,i=e.vectorNormInverse,a,o=t.pstyle("source-endpoint"),l=t.pstyle("target-endpoint"),u=o.units!=null&&l.units!=null,h=s(function(w,T,C,E){var S=E-T,R=C-w,D=Math.sqrt(R*R+S*S);return{x:-S/D,y:R/D}},"recalcVectorNormInverse"),f=t.pstyle("edge-distances").value;switch(f){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(u){var d=this.manualEndptToPx(t.source()[0],o),p=Sl(d,2),m=p[0],g=p[1],y=this.manualEndptToPx(t.target()[0],l),v=Sl(y,2),x=v[0],b=v[1],k={x1:m,y1:g,x2:x,y2:b};i=h(m,g,x,b),a=k}else Kr("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};Ia.findHaystackPoints=function(t){for(var e=0;e0?Math.max(Ne-Be,0):Math.min(Ne+Be,0)},"subDWH"),P=L(R,E),M=L(D,S),F=!1;b===h?x=Math.abs(P)>Math.abs(M)?i:n:b===u||b===l?(x=n,F=!0):(b===a||b===o)&&(x=i,F=!0);var I=x===n,O=I?M:P,z=I?D:R,N=h0e(z),U=!1;!(F&&(A||T))&&(b===l&&z<0||b===u&&z>0||b===a&&z>0||b===o&&z<0)&&(N*=-1,O=N*Math.abs(O),U=!0);var $;if(A){var W=w<0?1+w:w;$=W*O}else{var ee=w<0?O:0;$=ee+w*N}var te=s(function(Ne){return Math.abs(Ne)=Math.abs(O)},"getIsTooClose"),ce=te($),Z=te(Math.abs(O)-Math.abs($)),fe=ce||Z;if(fe&&!U)if(I){var ne=Math.abs(z)<=p/2,H=Math.abs(R)<=m/2;if(ne){var Q=(f.x1+f.x2)/2,K=f.y1,re=f.y2;r.segpts=[Q,K,Q,re]}else if(H){var ie=(f.y1+f.y2)/2,ye=f.x1,j=f.x2;r.segpts=[ye,ie,j,ie]}else r.segpts=[f.x1,f.y2]}else{var De=Math.abs(z)<=d/2,oe=Math.abs(D)<=g/2;if(De){var Re=(f.y1+f.y2)/2,Pe=f.x1,Se=f.x2;r.segpts=[Pe,Re,Se,Re]}else if(oe){var Ue=(f.x1+f.x2)/2,Oe=f.y1,_e=f.y2;r.segpts=[Ue,Oe,Ue,_e]}else r.segpts=[f.x2,f.y1]}else if(I){var he=f.y1+$+(v?p/2*N:0),q=f.x1,se=f.x2;r.segpts=[q,he,se,he]}else{var ue=f.x1+$+(v?d/2*N:0),X=f.y1,ae=f.y2;r.segpts=[ue,X,ue,ae]}if(r.isRound){var pe=t.pstyle("taxi-radius").value,de=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(pe),r.isArcRadius=new Array(r.segpts.length/2).fill(de)}};Ia.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,i=e.tgtPos,a=e.srcW,o=e.srcH,l=e.tgtW,u=e.tgtH,h=e.srcShape,f=e.tgtShape,d=e.srcCornerRadius,p=e.tgtCornerRadius,m=e.srcRs,g=e.tgtRs,y=!rt(r.startX)||!rt(r.startY),v=!rt(r.arrowStartX)||!rt(r.arrowStartY),x=!rt(r.endX)||!rt(r.endY),b=!rt(r.arrowEndX)||!rt(r.arrowEndY),k=3,A=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,w=k*A,T=I0({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),C=TM.poolIndex()){var F=P;P=M,M=F}var I=S.srcPos=P.position(),O=S.tgtPos=M.position(),z=S.srcW=P.outerWidth(),N=S.srcH=P.outerHeight(),U=S.tgtW=M.outerWidth(),$=S.tgtH=M.outerHeight(),W=S.srcShape=r.nodeShapes[e.getNodeShape(P)],ee=S.tgtShape=r.nodeShapes[e.getNodeShape(M)],te=S.srcCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,ce=S.tgtCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,Z=S.tgtRs=M._private.rscratch,fe=S.srcRs=P._private.rscratch;S.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ne=0;ne0){var re=a,ie=S0(re,Fg(r)),ye=S0(re,Fg(K)),j=ie;if(ye2){var De=S0(re,{x:K[2],y:K[3]});De0){var ae=o,pe=S0(ae,Fg(r)),de=S0(ae,Fg(X)),Ie=pe;if(de2){var Ne=S0(ae,{x:X[2],y:X[3]});Ne=g||C){v={cp:A,segment:T};break}}if(v)break}var E=v.cp,S=v.segment,R=(g-x)/S.length,D=S.t1-S.t0,L=m?S.t0+D*R:S.t1-D*R;L=Sx(0,L,1),e=$g(E.p0,E.p1,E.p2,L),p=$Xe(E.p0,E.p1,E.p2,L);break}case"straight":case"segments":case"haystack":{for(var P=0,M,F,I,O,z=n.allpts.length,N=0;N+3=g));N+=2);var U=g-F,$=U/M;$=Sx(0,$,1),e=WUe(I,O,$),p=upe(I,O);break}}o("labelX",d,e.x),o("labelY",d,e.y),o("labelAutoAngle",d,p)}},"calculateEndProjection");h("source"),h("target"),this.applyLabelDimensions(t)}};Oc.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};Oc.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),i=this.calculateLabelDimensions(t,n),a=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=Al(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),h=i.height/u,f=h*a,d=i.width,p=i.height+(u-1)*(a-1)*h;ff(r.rstyle,"labelWidth",e,d),ff(r.rscratch,"labelWidth",e,d),ff(r.rstyle,"labelHeight",e,p),ff(r.rscratch,"labelHeight",e,p),ff(r.rscratch,"labelLineHeight",e,f)};Oc.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",i=t.pstyle(n+"label").strValue,a=t.pstyle("text-transform").value,o=s(function(ee,te){return te?(ff(r.rscratch,ee,e,te),te):Al(r.rscratch,ee,e)},"rscratch");if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var l=t.pstyle("text-wrap").value;if(l==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var h="\u200B",f=i.split(` +`),d=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,m=p==="anywhere",g=[],y=/[\s\u200b]+|$/g,v=0;vd){var w=x.matchAll(y),T="",C=0,E=Hde(w),S;try{for(E.s();!(S=E.n()).done;){var R=S.value,D=R[0],L=x.substring(C,R.index);C=R.index+D.length;var P=T.length===0?L:T+L+D,M=this.calculateLabelDimensions(t,P),F=M.width;F<=d?T+=L+D:(T&&g.push(T),T=L+D)}}catch(W){E.e(W)}finally{E.f()}T.match(/^[\s\u200b]+$/)||g.push(T)}else g.push(x)}o("labelWrapCachedLines",g),i=o("labelWrapCachedText",g.join(` +`)),o("labelWrapKey",u)}else if(l==="ellipsis"){var I=t.pstyle("text-max-width").pfValue,O="",z="\u2026",N=!1;if(this.calculateLabelDimensions(t,i).widthI)break;O+=i[U],U===i.length-1&&(N=!0)}return N||(O+=z),O}return i};Oc.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Oc.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),i=n.document,a=M0(e,t._private.labelDimsKey),o=r.labelDimCache||(r.labelDimCache=[]),l=o[a];if(l!=null)return l;var u=0,h=t.pstyle("font-style").strValue,f=t.pstyle("font-size").pfValue,d=t.pstyle("font-family").strValue,p=t.pstyle("font-weight").strValue,m=this.labelCalcCanvas,g=this.labelCalcCanvasContext;if(!m){m=this.labelCalcCanvas=i.createElement("canvas"),g=this.labelCalcCanvasContext=m.getContext("2d");var y=m.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}g.font="".concat(h," ").concat(p," ").concat(f,"px ").concat(d);for(var v=0,x=0,b=e.split(` +`),k=0;k1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),l)for(var u=0;u=t.desktopTapThreshold2}var Rt=i(q);We&&(t.hoverData.tapholdCancelled=!0);var Qe=s(function(){var Bt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Bt.length===0?(Bt.push(we[0]),Bt.push(we[1])):(Bt[0]+=we[0],Bt[1]+=we[1])},"updateDragDelta");ue=!0,n(ze,["mousemove","vmousemove","tapdrag"],q,{x:de[0],y:de[1]});var Dt=s(function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||X.emit({originalEvent:q,type:"boxstart",position:{x:de[0],y:de[1]}}),Be[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()},"goIntoBoxMode");if(t.hoverData.which===3){if(We){var qt={originalEvent:q,type:"cxtdrag",position:{x:de[0],y:de[1]}};Fe?Fe.emit(qt):X.emit(qt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ze!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:de[0],y:de[1]}}),t.hoverData.cxtOver=ze,ze&&ze.emit({originalEvent:q,type:"cxtdragover",position:{x:de[0],y:de[1]}}))}}else if(t.hoverData.dragging){if(ue=!0,X.panningEnabled()&&X.userPanningEnabled()){var yt;if(t.hoverData.justStartedPan){var Et=t.hoverData.mdownPos;yt={x:(de[0]-Et[0])*ae,y:(de[1]-Et[1])*ae},t.hoverData.justStartedPan=!1}else yt={x:we[0]*ae,y:we[1]*ae};X.panBy(yt),X.emit("dragpan"),t.hoverData.dragged=!0}de=t.projectIntoViewport(q.clientX,q.clientY)}else if(Be[4]==1&&(Fe==null||Fe.pannable())){if(We){if(!t.hoverData.dragging&&X.boxSelectionEnabled()&&(Rt||!X.panningEnabled()||!X.userPanningEnabled()))Dt();else if(!t.hoverData.selecting&&X.panningEnabled()&&X.userPanningEnabled()){var pt=a(Fe,t.hoverData.downs);pt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Be[4]=0,t.data.bgActivePosistion=Fg(Ie),t.redrawHint("select",!0),t.redraw())}Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate()}}else{if(Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate(),(!Fe||!Fe.grabbed())&&ze!=qe&&(qe&&n(qe,["mouseout","tapdragout"],q,{x:de[0],y:de[1]}),ze&&n(ze,["mouseover","tapdragover"],q,{x:de[0],y:de[1]}),t.hoverData.last=ze),Fe)if(We){if(X.boxSelectionEnabled()&&Rt)Fe&&Fe.grabbed()&&(v(Je),Fe.emit("freeon"),Je.emit("free"),t.dragData.didDrag&&(Fe.emit("dragfreeon"),Je.emit("dragfree"))),Dt();else if(Fe&&Fe.grabbed()&&t.nodeIsDraggable(Fe)){var Wt=!t.dragData.didDrag;Wt&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||g(Je,{inDragLayer:!0});var ot={x:0,y:0};if(rt(we[0])&&rt(we[1])&&(ot.x+=we[0],ot.y+=we[1],Wt)){var fr=t.hoverData.dragDelta;fr&&rt(fr[0])&&rt(fr[1])&&(ot.x+=fr[0],ot.y+=fr[1])}t.hoverData.draggingEles=!0,Je.silentShift(ot).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else Qe();ue=!0}if(Be[2]=de[0],Be[3]=de[1],ue)return q.stopPropagation&&q.stopPropagation(),q.preventDefault&&q.preventDefault(),!1}},"mousemoveHandler"),!1);var R,D,L;t.registerBinding(e,"mouseup",s(function(q){if(!(t.hoverData.which===1&&q.which!==1&&t.hoverData.capture)){var se=t.hoverData.capture;if(se){t.hoverData.capture=!1;var ue=t.cy,X=t.projectIntoViewport(q.clientX,q.clientY),ae=t.selection,pe=t.findNearestElement(X[0],X[1],!0,!1),de=t.dragData.possibleDragElements,Ie=t.hoverData.down,Ne=i(q);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,Ie&&Ie.unactivate(),t.hoverData.which===3){var Be={originalEvent:q,type:"cxttapend",position:{x:X[0],y:X[1]}};if(Ie?Ie.emit(Be):ue.emit(Be),!t.hoverData.cxtDragged){var ze={originalEvent:q,type:"cxttap",position:{x:X[0],y:X[1]}};Ie?Ie.emit(ze):ue.emit(ze)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(pe,["mouseup","tapend","vmouseup"],q,{x:X[0],y:X[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(Ie,["click","tap","vclick"],q,{x:X[0],y:X[1]}),D=!1,q.timeStamp-L<=ue.multiClickDebounceTime()?(R&&clearTimeout(R),D=!0,L=null,n(Ie,["dblclick","dbltap","vdblclick"],q,{x:X[0],y:X[1]})):(R=setTimeout(function(){D||n(Ie,["oneclick","onetap","voneclick"],q,{x:X[0],y:X[1]})},ue.multiClickDebounceTime()),L=q.timeStamp)),Ie==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(q)&&(ue.$(r).unselect(["tapunselect"]),de.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=de=ue.collection()),pe==Ie&&!t.dragData.didDrag&&!t.hoverData.selecting&&pe!=null&&pe._private.selectable&&(t.hoverData.dragging||(ue.selectionType()==="additive"||Ne?pe.selected()?pe.unselect(["tapunselect"]):pe.select(["tapselect"]):Ne||(ue.$(r).unmerge(pe).unselect(["tapunselect"]),pe.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var qe=ue.collection(t.getAllInBox(ae[0],ae[1],ae[2],ae[3]));t.redrawHint("select",!0),qe.length>0&&t.redrawHint("eles",!0),ue.emit({type:"boxend",originalEvent:q,position:{x:X[0],y:X[1]}});var Fe=s(function(We){return We.selectable()&&!We.selected()},"eleWouldBeSelected");ue.selectionType()==="additive"||Ne||ue.$(r).unmerge(qe).unselect(),qe.emit("box").stdFilter(Fe).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!ae[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var we=Ie&&Ie.grabbed();v(de),we&&(Ie.emit("freeon"),de.emit("free"),t.dragData.didDrag&&(Ie.emit("dragfreeon"),de.emit("dragfree")))}}ae[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null}}},"mouseupHandler"),!1);var P=s(function(q){if(!t.scrollingPage){var se=t.cy,ue=se.zoom(),X=se.pan(),ae=t.projectIntoViewport(q.clientX,q.clientY),pe=[ae[0]*ue+X.x,ae[1]*ue+X.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||E()){q.preventDefault();return}if(se.panningEnabled()&&se.userPanningEnabled()&&se.zoomingEnabled()&&se.userZoomingEnabled()){q.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var de;q.deltaY!=null?de=q.deltaY/-250:q.wheelDeltaY!=null?de=q.wheelDeltaY/1e3:de=q.wheelDelta/1e3,de=de*t.wheelSensitivity;var Ie=q.deltaMode===1;Ie&&(de*=33);var Ne=se.zoom()*Math.pow(10,de);q.type==="gesturechange"&&(Ne=t.gestureStartZoom*q.scale),se.zoom({level:Ne,renderedPosition:{x:pe[0],y:pe[1]}}),se.emit(q.type==="gesturechange"?"pinchzoom":"scrollzoom")}}},"wheelHandler");t.registerBinding(t.container,"wheel",P,!0),t.registerBinding(e,"scroll",s(function(q){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},"scrollHandler"),!0),t.registerBinding(t.container,"gesturestart",s(function(q){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||q.preventDefault()},"gestureStartHandler"),!0),t.registerBinding(t.container,"gesturechange",function(he){t.hasTouchStarted||P(he)},!0),t.registerBinding(t.container,"mouseout",s(function(q){var se=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseout",position:{x:se[0],y:se[1]}})},"mouseOutHandler"),!1),t.registerBinding(t.container,"mouseover",s(function(q){var se=t.projectIntoViewport(q.clientX,q.clientY);t.cy.emit({originalEvent:q,type:"mouseover",position:{x:se[0],y:se[1]}})},"mouseOverHandler"),!1);var M,F,I,O,z,N,U,$,W,ee,te,ce,Z,fe=s(function(q,se,ue,X){return Math.sqrt((ue-q)*(ue-q)+(X-se)*(X-se))},"distance"),ne=s(function(q,se,ue,X){return(ue-q)*(ue-q)+(X-se)*(X-se)},"distanceSq"),H;t.registerBinding(t.container,"touchstart",H=s(function(q){if(t.hasTouchStarted=!0,!!S(q)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var se=t.cy,ue=t.touchData.now,X=t.touchData.earlier;if(q.touches[0]){var ae=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);ue[0]=ae[0],ue[1]=ae[1]}if(q.touches[1]){var ae=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);ue[2]=ae[0],ue[3]=ae[1]}if(q.touches[2]){var ae=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);ue[4]=ae[0],ue[5]=ae[1]}if(q.touches[1]){t.touchData.singleTouchMoved=!0,v(t.dragData.touchDragEles);var pe=t.findContainerClientCoords();W=pe[0],ee=pe[1],te=pe[2],ce=pe[3],M=q.touches[0].clientX-W,F=q.touches[0].clientY-ee,I=q.touches[1].clientX-W,O=q.touches[1].clientY-ee,Z=0<=M&&M<=te&&0<=I&&I<=te&&0<=F&&F<=ce&&0<=O&&O<=ce;var de=se.pan(),Ie=se.zoom();z=fe(M,F,I,O),N=ne(M,F,I,O),U=[(M+I)/2,(F+O)/2],$=[(U[0]-de.x)/Ie,(U[1]-de.y)/Ie];var Ne=200,Be=Ne*Ne;if(N=1){for(var Cr=t.touchData.startPosition=[null,null,null,null,null,null],Ut=0;Ut=t.touchTapThreshold2}if(se&&t.touchData.cxt){q.preventDefault();var Cr=q.touches[0].clientX-W,Ut=q.touches[0].clientY-ee,ar=q.touches[1].clientX-W,ut=q.touches[1].clientY-ee,Rt=ne(Cr,Ut,ar,ut),Qe=Rt/N,Dt=150,qt=Dt*Dt,yt=1.5,Et=yt*yt;if(Qe>=Et||Rt>=qt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var pt={originalEvent:q,type:"cxttapend",position:{x:ae[0],y:ae[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(pt),t.touchData.start=null):X.emit(pt)}}if(se&&t.touchData.cxt){var pt={originalEvent:q,type:"cxtdrag",position:{x:ae[0],y:ae[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(pt):X.emit(pt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var Wt=t.findNearestElement(ae[0],ae[1],!0,!0);(!t.touchData.cxtOver||Wt!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:q,type:"cxtdragout",position:{x:ae[0],y:ae[1]}}),t.touchData.cxtOver=Wt,Wt&&Wt.emit({originalEvent:q,type:"cxtdragover",position:{x:ae[0],y:ae[1]}}))}else if(se&&q.touches[2]&&X.boxSelectionEnabled())q.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||X.emit({originalEvent:q,type:"boxstart",position:{x:ae[0],y:ae[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,ue[4]=1,!ue||ue.length===0||ue[0]===void 0?(ue[0]=(ae[0]+ae[2]+ae[4])/3,ue[1]=(ae[1]+ae[3]+ae[5])/3,ue[2]=(ae[0]+ae[2]+ae[4])/3+1,ue[3]=(ae[1]+ae[3]+ae[5])/3+1):(ue[2]=(ae[0]+ae[2]+ae[4])/3,ue[3]=(ae[1]+ae[3]+ae[5])/3),t.redrawHint("select",!0),t.redraw();else if(se&&q.touches[1]&&!t.touchData.didSelect&&X.zoomingEnabled()&&X.panningEnabled()&&X.userZoomingEnabled()&&X.userPanningEnabled()){q.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ot=t.dragData.touchDragEles;if(ot){t.redrawHint("drag",!0);for(var fr=0;fr0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},"touchmoveHandler"),!1);var K;t.registerBinding(e,"touchcancel",K=s(function(q){var se=t.touchData.start;t.touchData.capture=!1,se&&se.unactivate()},"touchcancelHandler"));var re,ie,ye,j;if(t.registerBinding(e,"touchend",re=s(function(q){var se=t.touchData.start,ue=t.touchData.capture;if(ue)q.touches.length===0&&(t.touchData.capture=!1),q.preventDefault();else return;var X=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var ae=t.cy,pe=ae.zoom(),de=t.touchData.now,Ie=t.touchData.earlier;if(q.touches[0]){var Ne=t.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);de[0]=Ne[0],de[1]=Ne[1]}if(q.touches[1]){var Ne=t.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);de[2]=Ne[0],de[3]=Ne[1]}if(q.touches[2]){var Ne=t.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);de[4]=Ne[0],de[5]=Ne[1]}se&&se.unactivate();var Be;if(t.touchData.cxt){if(Be={originalEvent:q,type:"cxttapend",position:{x:de[0],y:de[1]}},se?se.emit(Be):ae.emit(Be),!t.touchData.cxtDragged){var ze={originalEvent:q,type:"cxttap",position:{x:de[0],y:de[1]}};se?se.emit(ze):ae.emit(ze)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!q.touches[2]&&ae.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var qe=ae.collection(t.getAllInBox(X[0],X[1],X[2],X[3]));X[0]=void 0,X[1]=void 0,X[2]=void 0,X[3]=void 0,X[4]=0,t.redrawHint("select",!0),ae.emit({type:"boxend",originalEvent:q,position:{x:de[0],y:de[1]}});var Fe=s(function(qt){return qt.selectable()&&!qt.selected()},"eleWouldBeSelected");qe.emit("box").stdFilter(Fe).select().emit("boxselect"),qe.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(se?.unactivate(),q.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!q.touches[1]){if(!q.touches[0]){if(!q.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var we=t.dragData.touchDragEles;if(se!=null){var Je=se._private.grabbed;v(we),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Je&&(se.emit("freeon"),we.emit("free"),t.dragData.didDrag&&(se.emit("dragfreeon"),we.emit("dragfree"))),n(se,["touchend","tapend","vmouseup","tapdragout"],q,{x:de[0],y:de[1]}),se.unactivate(),t.touchData.start=null}else{var We=t.findNearestElement(de[0],de[1],!0,!0);n(We,["touchend","tapend","vmouseup","tapdragout"],q,{x:de[0],y:de[1]})}var or=t.touchData.startPosition[0]-de[0],Cr=or*or,Ut=t.touchData.startPosition[1]-de[1],ar=Ut*Ut,ut=Cr+ar,Rt=ut*pe*pe;t.touchData.singleTouchMoved||(se||ae.$(":selected").unselect(["tapunselect"]),n(se,["tap","vclick"],q,{x:de[0],y:de[1]}),ie=!1,q.timeStamp-j<=ae.multiClickDebounceTime()?(ye&&clearTimeout(ye),ie=!0,j=null,n(se,["dbltap","vdblclick"],q,{x:de[0],y:de[1]})):(ye=setTimeout(function(){ie||n(se,["onetap","voneclick"],q,{x:de[0],y:de[1]})},ae.multiClickDebounceTime()),j=q.timeStamp)),se!=null&&!t.dragData.didDrag&&se._private.selectable&&Rt"u"){var De=[],oe=s(function(q){return{clientX:q.clientX,clientY:q.clientY,force:1,identifier:q.pointerId,pageX:q.pageX,pageY:q.pageY,radiusX:q.width/2,radiusY:q.height/2,screenX:q.screenX,screenY:q.screenY,target:q.target}},"makeTouch"),Re=s(function(q){return{event:q,touch:oe(q)}},"makePointer"),Pe=s(function(q){De.push(Re(q))},"addPointer"),Se=s(function(q){for(var se=0;se0)return W[0]}return null},"getCurveT"),g=Object.keys(p),y=0;y0?m:p0e(a,o,e,r,n,i,l,u)},"intersectLine"),checkPoint:s(function(e,r,n,i,a,o,l,u){u=u==="auto"?N0(i,a):u;var h=2*u;if(Wu(e,r,this.points,o,l,i,a-h,[0,-1],n)||Wu(e,r,this.points,o,l,i-h,a,[0,-1],n))return!0;var f=i/2+2*n,d=a/2+2*n,p=[o-f,l-d,o-f,l,o+f,l,o+f,l-d];return!!(Ms(e,r,p)||D0(e,r,h,h,o+i/2-u,l+a/2-u,n)||D0(e,r,h,h,o-i/2+u,l+a/2-u,n))},"checkPoint")}};Xu.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",es(3,0)),this.generateRoundPolygon("round-triangle",es(3,0)),this.generatePolygon("rectangle",es(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",es(5,0)),this.generateRoundPolygon("round-pentagon",es(5,0)),this.generatePolygon("hexagon",es(6,0)),this.generateRoundPolygon("round-hexagon",es(6,0)),this.generatePolygon("heptagon",es(7,0)),this.generateRoundPolygon("round-heptagon",es(7,0)),this.generatePolygon("octagon",es(8,0)),this.generateRoundPolygon("round-octagon",es(8,0));var n=new Array(20);{var i=GO(5,0),a=GO(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var l=0;l=e.deqFastCost*A)break}else if(h){if(b>=e.deqCost*m||b>=e.deqAvgCost*p)break}else if(k>=e.deqNoDrawCost*FO)break;var w=e.deq(n,v,y);if(w.length>0)for(var T=0;T0&&(e.onDeqd(n,g),!h&&e.shouldRedraw(n,g,v,y)&&a())},"dequeue"),l=e.priority||lP;i.beforeRender(o,l(n))}},"setupDequeueingImpl")},"setupDequeueing")},VXe=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:XT;nP(this,t),this.idsByKey=new Ic,this.keyForId=new Ic,this.cachesByLvl=new Ic,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return s(t,"ElementTextureCacheLookup"),iP(t,[{key:"getIdsFor",value:s(function(r){r==null&&Jn("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new Xg,n.set(r,i)),i},"getIdsFor")},{key:"addIdForKey",value:s(function(r,n){r!=null&&this.getIdsFor(r).add(n)},"addIdForKey")},{key:"deleteIdForKey",value:s(function(r,n){r!=null&&this.getIdsFor(r).delete(n)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:s(function(r){return r==null?0:this.getIdsFor(r).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a},"keyHasChangedFor")},{key:"isInvalid",value:s(function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)},"isInvalid")},{key:"getCachesAt",value:s(function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new Ic,n.set(r,a),i.push(r)),a},"getCachesAt")},{key:"getCache",value:s(function(r,n){return this.getCachesAt(n).get(r)},"getCache")},{key:"get",value:s(function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a},"get")},{key:"getForCachedKey",value:s(function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a},"getForCachedKey")},{key:"hasCache",value:s(function(r,n){return this.getCachesAt(n).has(r)},"hasCache")},{key:"has",value:s(function(r,n){var i=this.getKey(r);return this.hasCache(i,n)},"has")},{key:"setCache",value:s(function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)},"setCache")},{key:"set",value:s(function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)},"set")},{key:"deleteCache",value:s(function(r,n){this.getCachesAt(n).delete(r)},"deleteCache")},{key:"delete",value:s(function(r,n){var i=this.getKey(r);this.deleteCache(i,n)},"_delete")},{key:"invalidateKey",value:s(function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})},"invalidateKey")},{key:"invalidate",value:s(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0},"invalidate")}]),t}(),Pde=25,PT=50,WT=-4,JO=3,UXe=7.99,qXe=8,WXe=1024,HXe=1024,YXe=1024,XXe=.2,jXe=.8,KXe=10,QXe=.15,ZXe=.1,JXe=.9,eje=.9,tje=100,rje=1,zg={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},nje=ya({getKey:null,doesEleInvalidateKey:XT,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:s0e,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),xx=s(function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var i=nje(r);Pt(n,i),n.lookup=new VXe(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},"ElementTextureCache"),Bi=xx.prototype;Bi.reasons=zg;Bi.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Bi.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};Bi.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Px(function(r,n){return n.reqs-r.reqs});return e};Bi.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Bi.getElement=function(t,e,r,n,i){var a=this,o=this.renderer,l=o.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(uP(l*r))),n=UXe||n>JO)return null;var h=Math.pow(2,n),f=e.h*h,d=e.w*h,p=o.eleTextBiggerThanMin(t,h);if(!this.isVisible(t,p))return null;var m=u.get(t,n);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var g;if(f<=Pde?g=Pde:f<=PT?g=PT:g=Math.ceil(f/PT)*PT,f>YXe||d>HXe)return null;var y=a.getTextureQueue(g),v=y[y.length-2],x=s(function(){return a.recycleTexture(g,d)||a.addTexture(g,d)},"addNewTxr");v||(v=y[y.length-1]),v||(v=x()),v.width-v.usedWidthn;D--)S=a.getElement(t,e,r,D,zg.downscale);R()}else return a.queueElement(t,T.level-1),T;else{var L;if(!k&&!A&&!w)for(var P=n-1;P>=WT;P--){var M=u.get(t,P);if(M){L=M;break}}if(b(L))return a.queueElement(t,n),L;v.context.translate(v.usedWidth,0),v.context.scale(h,h),this.drawElement(v.context,t,e,p,!1),v.context.scale(1/h,1/h),v.context.translate(-v.usedWidth,0)}return m={x:v.usedWidth,texture:v,level:n,scale:h,width:d,height:f,scaledLabelShown:p},v.usedWidth+=Math.ceil(d+qXe),v.eleCaches.push(m),u.set(t,n,m),a.checkTextureFullness(v),m};Bi.invalidateElements=function(t){for(var e=0;e=XXe*t.width&&this.retireTexture(t)};Bi.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>jXe&&t.fullnessChecks>=KXe?yf(r,t):t.fullnessChecks++};Bi.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),i=this.lookup;yf(n,t),t.retired=!0;for(var a=t.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,cP(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),yf(i,o),n.push(o),o}};Bi.queueElement=function(t,e){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(t),o=i[a];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var l={eles:t.spawn().merge(t),level:e,reqs:1,key:a};n.push(l),i[a]=l}};Bi.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=[],a=e.lookup,o=0;o0;o++){var l=r.pop(),u=l.key,h=l.eles[0],f=a.hasCache(h,l.level);if(n[u]=null,f)continue;i.push(l);var d=e.getBoundingBox(h);e.getElement(h,d,t,l.level,zg.dequeue)}return i};Bi.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=oP,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(t))};Bi.onDequeue=function(t){this.onDequeues.push(t)};Bi.offDequeue=function(t){yf(this.onDequeues,t)};Bi.setupDequeueing=mpe.setupDequeueing({deqRedrawThreshold:tje,deqCost:QXe,deqAvgCost:ZXe,deqNoDrawCost:JXe,deqFastCost:eje,deq:s(function(e,r,n){return e.dequeue(r,n)},"deq"),onDeqd:s(function(e,r){for(var n=0;n=aje||r>r7)return null}n.validateLayersElesOrdering(r,t);var u=n.layersByLevel,h=Math.pow(2,r),f=u[r]=u[r]||[],d,p=n.levelIsComplete(r,t),m,g=s(function(){var R=s(function(F){if(n.validateLayersElesOrdering(F,t),n.levelIsComplete(F,t))return m=u[F],!0},"canUseAsTmpLvl"),D=s(function(F){if(!m)for(var I=r+F;kx<=I&&I<=r7&&!R(I);I+=F);},"checkLvls");D(1),D(-1);for(var L=f.length-1;L>=0;L--){var P=f[L];P.invalid&&yf(f,P)}},"checkTempLevels");if(!p)g();else return f;var y=s(function(){if(!d){d=Is();for(var R=0;Rdje)return null;var P=n.makeLayer(d,r);if(D!=null){var M=f.indexOf(D)+1;f.splice(M,0,P)}else(R.insert===void 0||R.insert)&&f.unshift(P);return P},"makeLayer");if(n.skipping&&!l)return null;for(var x=null,b=t.length/ije,k=!l,A=0;A=b||!d0e(x.bb,w.boundingBox()))&&(x=v({insert:!0,after:x}),!x))return null;m||k?n.queueLayer(x,w):n.drawEleInLayer(x,w,r,e),x.eles.push(w),C[r]=x}return m||(k?null:f)};va.getEleLevelForLayerLevel=function(t,e){return t};va.drawEleInLayer=function(t,e,r,n){var i=this,a=this.renderer,o=t.context,l=e.boundingBox();l.w===0||l.h===0||!e.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(o,!1),a.drawCachedElement(o,e,null,null,r,pje),a.setImgSmoothing(o,!0))};va.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||o.invalid)return!1;i+=o.eles.length}return i===e.length};va.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};va.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=qu(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,s(function(n,i,a){e.invalidateLayer(n)},"invalAssocLayers")))};va.invalidateLayer=function(t){if(this.lastInvalidationTime=qu(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];yf(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l=e._private.rscratch;if(!(a&&!e.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var h=a?e.pstyle("opacity").value:1,f=a?e.pstyle("line-opacity").value:1,d=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,m=e.pstyle("width").pfValue,g=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,x=h*f,b=h*f,k=s(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;d==="straight-triangle"?(o.eleStrokeStyle(t,e,F),o.drawEdgeTrianglePath(e,t,l.allpts)):(t.lineWidth=m,t.lineCap=g,o.eleStrokeStyle(t,e,F),o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},"drawLine"),A=s(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;if(t.lineWidth=m+y,t.lineCap=g,y>0)o.colorStrokeStyle(t,v[0],v[1],v[2],F);else{t.lineCap="butt";return}d==="straight-triangle"?o.drawEdgeTrianglePath(e,t,l.allpts):(o.drawEdgePath(e,t,l.allpts,p),t.lineCap="butt")},"drawLineOutline"),w=s(function(){i&&o.drawEdgeOverlay(t,e)},"drawOverlay"),T=s(function(){i&&o.drawEdgeUnderlay(t,e)},"drawUnderlay"),C=s(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;o.drawArrowheads(t,e,F)},"drawArrows"),E=s(function(){o.drawElementText(t,e,null,n)},"drawText");t.lineJoin="round";var S=e.pstyle("ghost").value==="yes";if(S){var R=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,L=e.pstyle("ghost-opacity").value,P=x*L;t.translate(R,D),k(P),C(P),t.translate(-R,-D)}else A();T(),k(),C(),w(),E(),r&&t.translate(u.x1,u.y1)}};vpe=s(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(e,"-opacity")).value;if(i!==0){var a=this,o=a.usePaths(),l=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,h=2*u,f=n.pstyle("".concat(e,"-color")).value;r.lineWidth=h,l.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,f[0],f[1],f[2],i),a.drawEdgePath(n,r,l.allpts,"solid")}}}},"drawEdgeOverlayUnderlay");ju.drawEdgeOverlay=vpe("overlay");ju.drawEdgeUnderlay=vpe("underlay");ju.drawEdgePath=function(t,e,r,n){var i=t._private.rscratch,a=e,o,l=!1,u=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,f=t.pstyle("line-dash-offset").pfValue;if(u){var d=r.join("$"),p=i.pathCacheKey&&i.pathCacheKey===d;p?(o=e=i.pathCache,l=!0):(o=e=new Path2D,i.pathCacheKey=d,i.pathCache=o)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(h),a.lineDashOffset=f;break;case"solid":a.setLineDash([]);break}if(!l&&!i.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var m=2;m+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(a&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var l=e.pstyle("label");if(!l||!l.value)return;var u=o.getLabelJustification(e);t.textAlign=u,t.textBaseline="bottom"}else{var h=e.element()._private.rscratch.badLine,f=e.pstyle("label"),d=e.pstyle("source-label"),p=e.pstyle("target-label");if(h||(!f||!f.value)&&(!d||!d.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var m=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),i==null?(o.drawText(t,e,null,m,a),e.isEdge()&&(o.drawText(t,e,"source",m,a),o.drawText(t,e,"target",m,a))):o.drawText(t,e,i,m,a),r&&t.translate(g.x1,g.y1)};z0.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,l=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*l,h=e.pstyle("color").value,f=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+i+" "+a,t.lineJoin="round",this.colorFillStyle(t,h[0],h[1],h[2],l),this.colorStrokeStyle(t,f[0],f[1],f[2],u)};s($O,"roundRect");z0.getTextAngle=function(t,e){var r,n=t._private,i=n.rscratch,a=e?e+"-":"",o=t.pstyle(a+"text-rotation"),l=Al(i,"labelAngle",e);return o.strValue==="autorotate"?r=t.isEdge()?l:0:o.strValue==="none"?r=0:r=o.pfValue,r};z0.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,o=a.rscratch,l=i?e.effectiveOpacity():1;if(!(i&&(l===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=Al(o,"labelX",r),h=Al(o,"labelY",r),f,d,p=this.getLabelText(e,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(h)){this.setupTextStyle(t,e,i);var m=r?r+"-":"",g=Al(o,"labelWidth",r),y=Al(o,"labelHeight",r),v=e.pstyle(m+"text-margin-x").pfValue,x=e.pstyle(m+"text-margin-y").pfValue,b=e.isEdge(),k=e.pstyle("text-halign").value,A=e.pstyle("text-valign").value;b&&(k="center",A="center"),u+=v,h+=x;var w;switch(n?w=this.getTextAngle(e,r):w=0,w!==0&&(f=u,d=h,t.translate(f,d),t.rotate(w),u=0,h=0),A){case"top":break;case"center":h+=y/2;break;case"bottom":h+=y;break}var T=e.pstyle("text-background-opacity").value,C=e.pstyle("text-border-opacity").value,E=e.pstyle("text-border-width").pfValue,S=e.pstyle("text-background-padding").pfValue,R=e.pstyle("text-background-shape").strValue,D=R.indexOf("round")===0,L=2;if(T>0||E>0&&C>0){var P=u-S;switch(k){case"left":P-=g;break;case"center":P-=g/2;break}var M=h-y-S,F=g+2*S,I=y+2*S;if(T>0){var O=t.fillStyle,z=e.pstyle("text-background-color").value;t.fillStyle="rgba("+z[0]+","+z[1]+","+z[2]+","+T*l+")",D?$O(t,P,M,F,I,L):t.fillRect(P,M,F,I),t.fillStyle=O}if(E>0&&C>0){var N=t.strokeStyle,U=t.lineWidth,$=e.pstyle("text-border-color").value,W=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+$[0]+","+$[1]+","+$[2]+","+C*l+")",t.lineWidth=E,t.setLineDash)switch(W){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=E/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(D?$O(t,P,M,F,I,L,"stroke"):t.strokeRect(P,M,F,I),W==="double"){var ee=E/2;D?$O(t,P+ee,M+ee,F-ee*2,I-ee*2,L,"stroke"):t.strokeRect(P+ee,M+ee,F-ee*2,I-ee*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=U,t.strokeStyle=N}}var te=2*e.pstyle("text-outline-width").pfValue;if(te>0&&(t.lineWidth=te),e.pstyle("text-wrap").value==="wrap"){var ce=Al(o,"labelWrapCachedLines",r),Z=Al(o,"labelLineHeight",r),fe=g/2,ne=this.getLabelJustification(e);switch(ne==="auto"||(k==="left"?ne==="left"?u+=-g:ne==="center"&&(u+=-fe):k==="center"?ne==="left"?u+=-fe:ne==="right"&&(u+=fe):k==="right"&&(ne==="center"?u+=fe:ne==="right"&&(u+=g))),A){case"top":h-=(ce.length-1)*Z;break;case"center":case"bottom":h-=(ce.length-1)*Z;break}for(var H=0;H0&&t.strokeText(ce[H],u,h),t.fillText(ce[H],u,h),h+=Z}else te>0&&t.strokeText(p,u,h),t.fillText(p,u,h);w!==0&&(t.rotate(-w),t.translate(-f,-d))}}};n1={};n1.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l,u,h=e._private,f=h.rscratch,d=e.position();if(!(!rt(d.x)||!rt(d.y))&&!(a&&!e.visible())){var p=a?e.effectiveOpacity():1,m=o.usePaths(),g,y=!1,v=e.padding();l=e.width()+2*v,u=e.height()+2*v;var x;r&&(x=r,t.translate(-x.x1,-x.y1));for(var b=e.pstyle("background-image"),k=b.value,A=new Array(k.length),w=new Array(k.length),T=0,C=0;C0&&arguments[0]!==void 0?arguments[0]:P;o.eleFillStyle(t,e,pe)},"setupShapeColor"),H=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$;o.colorStrokeStyle(t,M[0],M[1],M[2],pe)},"setupBorderColor"),Q=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ce;o.colorStrokeStyle(t,ee[0],ee[1],ee[2],pe)},"setupOutlineColor"),K=s(function(pe,de,Ie,Ne){var Be=o.nodePathCache=o.nodePathCache||[],ze=a0e(Ie==="polygon"?Ie+","+Ne.join(","):Ie,""+de,""+pe,""+fe),qe=Be[ze],Fe,we=!1;return qe!=null?(Fe=qe,we=!0,f.pathCache=Fe):(Fe=new Path2D,Be[ze]=f.pathCache=Fe),{path:Fe,cacheHit:we}},"getPath"),re=e.pstyle("shape").strValue,ie=e.pstyle("shape-polygon-points").pfValue;if(m){t.translate(d.x,d.y);var ye=K(l,u,re,ie);g=ye.path,y=ye.cacheHit}var j=s(function(){if(!y){var pe=d;m&&(pe={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(g||t,pe.x,pe.y,l,u,fe,f)}m?t.fill(g):t.fill()},"drawShape"),De=s(function(){for(var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ie=h.backgrounding,Ne=0,Be=0;Be0&&arguments[0]!==void 0?arguments[0]:!1,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(e)&&(o.drawPie(t,e,de),pe&&(m||o.nodeShapes[o.getNodeShape(e)].draw(t,d.x,d.y,l,u,fe,f)))},"drawPie"),Re=s(function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,de=(D>0?D:-D)*pe,Ie=D>0?0:255;D!==0&&(o.colorFillStyle(t,Ie,Ie,Ie,de),m?t.fill(g):t.fill())},"darken"),Pe=s(function(){if(L>0){if(t.lineWidth=L,t.lineCap=O,t.lineJoin=I,t.setLineDash)switch(F){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(N),t.lineDashOffset=U;break;case"solid":case"double":t.setLineDash([]);break}if(z!=="center"){if(t.save(),t.lineWidth*=2,z==="inside")m?t.clip(g):t.clip();else{var pe=new Path2D;pe.rect(-l/2-L,-u/2-L,l+2*L,u+2*L),pe.addPath(g),t.clip(pe,"evenodd")}m?t.stroke(g):t.stroke(),t.restore()}else m?t.stroke(g):t.stroke();if(F==="double"){t.lineWidth=L/3;var de=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",m?t.stroke(g):t.stroke(),t.globalCompositeOperation=de}t.setLineDash&&t.setLineDash([])}},"drawBorder"),Se=s(function(){if(W>0){if(t.lineWidth=W,t.lineCap="butt",t.setLineDash)switch(te){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var pe=d;m&&(pe={x:0,y:0});var de=o.getNodeShape(e),Ie=L;z==="inside"&&(Ie=0),z==="outside"&&(Ie*=2);var Ne=(l+Ie+(W+Z))/l,Be=(u+Ie+(W+Z))/u,ze=l*Ne,qe=u*Be,Fe=o.nodeShapes[de].points,we;if(m){var Je=K(ze,qe,de,Fe);we=Je.path}if(de==="ellipse")o.drawEllipsePath(we||t,pe.x,pe.y,ze,qe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(de)){var We=0,or=0,Cr=0;de==="round-diamond"?We=(Ie+Z+W)*1.4:de==="round-heptagon"?(We=(Ie+Z+W)*1.075,Cr=-(Ie/2+Z+W)/35):de==="round-hexagon"?We=(Ie+Z+W)*1.12:de==="round-pentagon"?(We=(Ie+Z+W)*1.13,Cr=-(Ie/2+Z+W)/15):de==="round-tag"?(We=(Ie+Z+W)*1.12,or=(Ie/2+W+Z)*.07):de==="round-triangle"&&(We=(Ie+Z+W)*(Math.PI/2),Cr=-(Ie+Z/2+W)/Math.PI),We!==0&&(Ne=(l+We)/l,ze=l*Ne,["round-hexagon","round-tag"].includes(de)||(Be=(u+We)/u,qe=u*Be)),fe=fe==="auto"?g0e(ze,qe):fe;for(var Ut=ze/2,ar=qe/2,ut=fe+(Ie+W+Z)/2,Rt=new Array(Fe.length/2),Qe=new Array(Fe.length/2),Dt=0;Dt0){if(i=i||n.position(),a==null||o==null){var m=n.padding();a=n.width()+2*m,o=n.height()+2*m}l.colorFillStyle(r,f[0],f[1],f[2],h),l.nodeShapes[d].draw(r,i.x,i.y,a+u*2,o+u*2,p),r.fill()}}}},"drawNodeOverlayUnderlay");n1.drawNodeOverlay=xpe("overlay");n1.drawNodeUnderlay=xpe("underlay");n1.hasPie=function(t){return t=t[0],t._private.hasPie};n1.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var i=e.cy().style(),a=e.pstyle("pie-size"),o=n.x,l=n.y,u=e.width(),h=e.height(),f=Math.min(u,h)/2,d=0,p=this.usePaths();p&&(o=0,l=0),a.units==="%"?f=f*a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2);for(var m=1;m<=i.pieBackgroundN;m++){var g=e.pstyle("pie-"+m+"-background-size").value,y=e.pstyle("pie-"+m+"-background-color").value,v=e.pstyle("pie-"+m+"-background-opacity").value*r,x=g/100;x+d>1&&(x=1-d);var b=1.5*Math.PI+2*Math.PI*d,k=2*Math.PI*x,A=b+k;g===0||d>=1||d+x>1||(t.beginPath(),t.moveTo(o,l),t.arc(o,l,f,b,A),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],v),t.fill(),d+=x)}};lo={},Cje=100;lo.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};lo.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;io.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!d&&(f[o.NODE]=!0,f[o.SELECT_BOX]=!0);var b=u.style(),k=u.zoom(),A=i!==void 0?i:k,w=u.pan(),T={x:w.x,y:w.y},C={zoom:k,pan:{x:w.x,y:w.y}},E=o.prevViewport,S=E===void 0||C.zoom!==E.zoom||C.pan.x!==E.pan.x||C.pan.y!==E.pan.y;!S&&!(y&&!g)&&(o.motionBlurPxRatio=1),a&&(T=a),A*=l,T.x*=l,T.y*=l;var R=o.getCachedZSortedEles();function D(ye,j,De,oe,Re){var Pe=ye.globalCompositeOperation;ye.globalCompositeOperation="destination-out",o.colorFillStyle(ye,255,255,255,o.motionBlurTransparency),ye.fillRect(j,De,oe,Re),ye.globalCompositeOperation=Pe}s(D,"mbclear");function L(ye,j){var De,oe,Re,Pe;!o.clearingMotionBlur&&(ye===h.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]||ye===h.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG])?(De={x:w.x*m,y:w.y*m},oe=k*m,Re=o.canvasWidth*m,Pe=o.canvasHeight*m):(De=T,oe=A,Re=o.canvasWidth,Pe=o.canvasHeight),ye.setTransform(1,0,0,1,0,0),j==="motionBlur"?D(ye,0,0,Re,Pe):!e&&(j===void 0||j)&&ye.clearRect(0,0,Re,Pe),r||(ye.translate(De.x,De.y),ye.scale(oe,oe)),a&&ye.translate(a.x,a.y),i&&ye.scale(i,i)}if(s(L,"setContextTransform"),d||(o.textureDrawLastFrame=!1),d){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=u.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var P=o.data.bufferContexts[o.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:l*o.textureMult});var C=o.textureCache.viewport={zoom:u.zoom(),pan:u.pan(),width:o.canvasWidth,height:o.canvasHeight};C.mpan={x:(0-C.pan.x)/C.zoom,y:(0-C.pan.y)/C.zoom}}f[o.DRAG]=!1,f[o.NODE]=!1;var M=h.contexts[o.NODE],F=o.textureCache.texture,C=o.textureCache.viewport;M.setTransform(1,0,0,1,0,0),p?D(M,0,0,C.width,C.height):M.clearRect(0,0,C.width,C.height);var I=b.core("outside-texture-bg-color").value,O=b.core("outside-texture-bg-opacity").value;o.colorFillStyle(M,I[0],I[1],I[2],O),M.fillRect(0,0,C.width,C.height);var k=u.zoom();L(M,!1),M.clearRect(C.mpan.x,C.mpan.y,C.width/C.zoom/l,C.height/C.zoom/l),M.drawImage(F,C.mpan.x,C.mpan.y,C.width/C.zoom/l,C.height/C.zoom/l)}else o.textureOnViewport&&!e&&(o.textureCache=null);var z=u.extent(),N=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),U=o.hideEdgesOnViewport&&N,$=[];if($[o.NODE]=!f[o.NODE]&&p&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,$[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),$[o.DRAG]=!f[o.DRAG]&&p&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,$[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),f[o.NODE]||r||n||$[o.NODE]){var W=p&&!$[o.NODE]&&m!==1,M=e||(W?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:h.contexts[o.NODE]),ee=p&&!W?"motionBlur":void 0;L(M,ee),U?o.drawCachedNodes(M,R.nondrag,l,z):o.drawLayeredElements(M,R.nondrag,l,z),o.debug&&o.drawDebugPoints(M,R.nondrag),!r&&!p&&(f[o.NODE]=!1)}if(!n&&(f[o.DRAG]||r||$[o.DRAG])){var W=p&&!$[o.DRAG]&&m!==1,M=e||(W?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:h.contexts[o.DRAG]);L(M,p&&!W?"motionBlur":void 0),U?o.drawCachedNodes(M,R.drag,l,z):o.drawCachedElements(M,R.drag,l,z),o.debug&&o.drawDebugPoints(M,R.drag),!r&&!p&&(f[o.DRAG]=!1)}if(o.showFps||!n&&f[o.SELECT_BOX]&&!r){var M=e||h.contexts[o.SELECT_BOX];if(L(M),o.selection[4]==1&&(o.hoverData.selecting||o.touchData.selecting)){var k=o.cy.zoom(),te=b.core("selection-box-border-width").value/k;M.lineWidth=te,M.fillStyle="rgba("+b.core("selection-box-color").value[0]+","+b.core("selection-box-color").value[1]+","+b.core("selection-box-color").value[2]+","+b.core("selection-box-opacity").value+")",M.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),te>0&&(M.strokeStyle="rgba("+b.core("selection-box-border-color").value[0]+","+b.core("selection-box-border-color").value[1]+","+b.core("selection-box-border-color").value[2]+","+b.core("selection-box-opacity").value+")",M.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(h.bgActivePosistion&&!o.hoverData.selecting){var k=o.cy.zoom(),ce=h.bgActivePosistion;M.fillStyle="rgba("+b.core("active-bg-color").value[0]+","+b.core("active-bg-color").value[1]+","+b.core("active-bg-color").value[2]+","+b.core("active-bg-opacity").value+")",M.beginPath(),M.arc(ce.x,ce.y,b.core("active-bg-size").pfValue/k,0,2*Math.PI),M.fill()}var Z=o.lastRedrawTime;if(o.showFps&&Z){Z=Math.round(Z);var fe=Math.round(1e3/Z);M.setTransform(1,0,0,1,0,0),M.fillStyle="rgba(255, 0, 0, 0.75)",M.strokeStyle="rgba(255, 0, 0, 0.75)",M.lineWidth=1,M.fillText("1 frame = "+Z+" ms = "+fe+" fps",0,20);var ne=60;M.strokeRect(0,30,250,20),M.fillRect(0,30,250*Math.min(fe/ne,1),20)}r||(f[o.SELECT_BOX]=!1)}if(p&&m!==1){var H=h.contexts[o.NODE],Q=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],K=h.contexts[o.DRAG],re=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],ie=s(function(j,De,oe){j.setTransform(1,0,0,1,0,0),oe||!x?j.clearRect(0,0,o.canvasWidth,o.canvasHeight):D(j,0,0,o.canvasWidth,o.canvasHeight);var Re=m;j.drawImage(De,0,0,o.canvasWidth*Re,o.canvasHeight*Re,0,0,o.canvasWidth,o.canvasHeight)},"drawMotionBlur");(f[o.NODE]||$[o.NODE])&&(ie(H,Q,$[o.NODE]),f[o.NODE]=!1),(f[o.DRAG]||$[o.DRAG])&&(ie(K,re,$[o.DRAG]),f[o.DRAG]=!1)}o.prevViewport=C,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),p&&(o.motionBlurTimeout=setTimeout(function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!d,o.mbFrames=0,f[o.NODE]=!0,f[o.DRAG]=!0,o.redraw()},Cje)),e||u.emit("render")};wf={};wf.drawPolygonPath=function(t,e,r,n,i,a){var o=n/2,l=i/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*a[0],r+l*a[1]);for(var u=1;u0&&o>0){m.clearRect(0,0,a,o),m.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(t.full)m.translate(-n.x1*h,-n.y1*h),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(n.x1*h,n.y1*h);else{var y=e.pan(),v={x:y.x*h,y:y.y*h};h*=e.zoom(),m.translate(v.x,v.y),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(-v.x,-v.y)}t.bg&&(m.globalCompositeOperation="destination-over",m.fillStyle=t.bg,m.rect(0,0,a,o),m.fill())}return p};s(Sje,"b64ToBlob");s(Ude,"b64UriToB64");s(kpe,"output");Gx.png=function(t){return kpe(t,this.bufferCanvasImage(t),"image/png")};Gx.jpg=function(t){return kpe(t,this.bufferCanvasImage(t),"image/jpeg")};wpe={};wpe.nodeShapeImpl=function(t,e,r,n,i,a,o,l){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,i,a);case"polygon":return this.drawPolygonPath(e,r,n,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,i,a,o,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,i,a,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,i,a,o,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,i,a,l);case"barrel":return this.drawBarrelPath(e,r,n,i,a)}};_je=Tpe,Fr=Tpe.prototype;Fr.CANVAS_LAYERS=3;Fr.SELECT_BOX=0;Fr.DRAG=1;Fr.NODE=2;Fr.BUFFER_COUNT=3;Fr.TEXTURE_BUFFER=0;Fr.MOTIONBLUR_BUFFER_NODE=1;Fr.MOTIONBLUR_BUFFER_DRAG=2;s(Tpe,"CanvasRenderer");Fr.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[Fr.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[Fr.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[Fr.SELECT_BOX]=e;break}};Aje=typeof Path2D<"u";Fr.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};Fr.usePaths=function(){return Aje&&this.pathsEnabled};Fr.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};Fr.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};Fr.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Pi(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=t,r.height=e}return r};[ype,Pc,ju,SP,z0,n1,lo,wf,Gx,wpe].forEach(function(t){Pt(Fr,t)});Lje=[{name:"null",impl:ipe},{name:"base",impl:ppe},{name:"canvas",impl:_je}],Dje=[{type:"layout",extensions:PXe},{type:"renderer",extensions:Lje}],Epe={},Cpe={};s(Spe,"setExtension");s(_pe,"getExtension");s(Rje,"setModule");s(Mje,"getModule");rP=s(function(){if(arguments.length===2)return _pe.apply(null,arguments);if(arguments.length===3)return Spe.apply(null,arguments);if(arguments.length===4)return Mje.apply(null,arguments);if(arguments.length===5)return Rje.apply(null,arguments);Jn("Invalid extension access syntax")},"extension");Mx.prototype.extension=rP;Dje.forEach(function(t){t.extensions.forEach(function(e){Spe(t.type,e.name,e.impl)})});Ape=s(function t(){if(!(this instanceof t))return new t;this.length=0},"Stylesheet"),B0=Ape.prototype;B0.instanceString=function(){return"stylesheet"};B0.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};B0.css=function(t,e){var r=this.length-1;if(At(t))this[r].properties.push({name:t,value:e});else if(Er(t))for(var n=t,i=Object.keys(n),a=0;a{"use strict";s(function(e,r){typeof Vx=="object"&&typeof _P=="object"?_P.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Vx=="object"?Vx.layoutBase=r():e.layoutBase=r()},"webpackUniversalModuleDefinition")(Vx,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"__webpack_require__"),r.m=t,r.c=e,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?s(function(){return n.default},"getDefault"):s(function(){return n},"getModuleExports");return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)}([function(t,e,r){"use strict";function n(){}s(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(8),a=r(9);function o(u,h,f){n.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=u,this.target=h}s(o,"LEdge"),o.prototype=Object.create(n.prototype);for(var l in n)o[l]=n[l];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(u,h){for(var f=this.getOtherEnd(u),d=h.getGraphManager().getRoot();;){if(f.getOwner()==h)return f;if(f.getOwner()==d)break;f=f.getOwner().getParent()}return null},o.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){"use strict";function n(i){this.vGraphObject=i}s(n,"LGraphObject"),t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(13),o=r(0),l=r(16),u=r(4);function h(d,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),d.graphManager!=null&&(d=d.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=d,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a}s(h,"LNode"),h.prototype=Object.create(n.prototype);for(var f in n)h[f]=n[f];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(d){this.rect.width=d},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(d){this.rect.height=d},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(d,p){this.rect.x=d.x,this.rect.y=d.y,this.rect.width=p.width,this.rect.height=p.height},h.prototype.setCenter=function(d,p){this.rect.x=d-this.rect.width/2,this.rect.y=p-this.rect.height/2},h.prototype.setLocation=function(d,p){this.rect.x=d,this.rect.y=p},h.prototype.moveBy=function(d,p){this.rect.x+=d,this.rect.y+=p},h.prototype.getEdgeListToNode=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==d){if(y.source!=g)throw"Incorrect edge source!";p.push(y)}}),p},h.prototype.getEdgesBetween=function(d){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==d||y.source==d)&&p.push(y)}),p},h.prototype.getNeighborsList=function(){var d=new Set,p=this;return p.edges.forEach(function(m){if(m.source==p)d.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";d.add(m.source)}}),d},h.prototype.withChildren=function(){var d=new Set,p,m;if(d.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;yp&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(d){var p=this.rect.x;p>o.WORLD_BOUNDARY?p=o.WORLD_BOUNDARY:p<-o.WORLD_BOUNDARY&&(p=-o.WORLD_BOUNDARY);var m=this.rect.y;m>o.WORLD_BOUNDARY?m=o.WORLD_BOUNDARY:m<-o.WORLD_BOUNDARY&&(m=-o.WORLD_BOUNDARY);var g=new u(p,m),y=d.inverseTransformPoint(g);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},t.exports=h},function(t,e,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}s(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},t.exports=n},function(t,e,r){"use strict";var n=r(2),i=r(10),a=r(0),o=r(6),l=r(3),u=r(1),h=r(13),f=r(12),d=r(11);function p(g,y,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,y!=null&&y instanceof o?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}s(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b)}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,k=0;k-1&&T>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(T,1);var A=x.source.owner.getEdges().indexOf(x);if(A==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(A,1)}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,k=this.getNodes(),A=k.length,w=0;wv&&(g=v),y>x&&(y=x)}return g==i.MAX_VALUE?null:(k[0].getParent().paddingLeft!=null?b=k[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new f(this.left,this.top))},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,k,A,w,T,C,E=this.nodes,S=E.length,R=0;Rk&&(y=k),vw&&(x=w),bk&&(y=k),vw&&(x=w),b=this.nodes.length){var S=0;v.forEach(function(R){R.owner==g&&S++}),S==this.nodes.length&&(this.isConnected=!0)}},t.exports=p},function(t,e,r){"use strict";var n,i=r(1);function a(o){n=r(5),this.layout=o,this.graphs=[],this.edges=[]}s(a,"LGraphManager"),a.prototype.addRoot=function(){var o=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(o,l);return this.setRootGraph(u),this.rootGraph},a.prototype.add=function(o,l,u,h,f){if(u==null&&h==null&&f==null){if(o==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(o)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(o),o.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return o.parent=l,l.child=o,o}else{f=u,h=l,u=o;var d=h.getOwner(),p=f.getOwner();if(!(d!=null&&d.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(d==p)return u.isInterGraph=!1,d.add(u,h,f);if(u.isInterGraph=!0,u.source=h,u.target=f,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},a.prototype.remove=function(o){if(o instanceof n){var l=o;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var u=[];u=u.concat(l.getEdges());for(var h,f=u.length,d=0;d=o.getRight()?l[0]+=Math.min(o.getX()-a.getX(),a.getRight()-o.getRight()):o.getX()<=a.getX()&&o.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-o.getX(),o.getRight()-a.getRight())),a.getY()<=o.getY()&&a.getBottom()>=o.getBottom()?l[1]+=Math.min(o.getY()-a.getY(),a.getBottom()-o.getBottom()):o.getY()<=a.getY()&&o.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-o.getY(),o.getBottom()-a.getBottom()));var f=Math.abs((o.getCenterY()-a.getCenterY())/(o.getCenterX()-a.getCenterX()));o.getCenterY()===a.getCenterY()&&o.getCenterX()===a.getCenterX()&&(f=1);var d=f*l[0],p=l[1]/f;l[0]d)return l[0]=u,l[1]=m,l[2]=f,l[3]=E,!1;if(hf)return l[0]=p,l[1]=h,l[2]=T,l[3]=d,!1;if(uf?(l[0]=y,l[1]=v,L=!0):(l[0]=g,l[1]=m,L=!0):M===I&&(u>f?(l[0]=p,l[1]=m,L=!0):(l[0]=x,l[1]=v,L=!0)),-F===I?f>u?(l[2]=C,l[3]=E,P=!0):(l[2]=T,l[3]=w,P=!0):F===I&&(f>u?(l[2]=A,l[3]=w,P=!0):(l[2]=S,l[3]=E,P=!0)),L&&P)return!1;if(u>f?h>d?(O=this.getCardinalDirection(M,I,4),z=this.getCardinalDirection(F,I,2)):(O=this.getCardinalDirection(-M,I,3),z=this.getCardinalDirection(-F,I,1)):h>d?(O=this.getCardinalDirection(-M,I,1),z=this.getCardinalDirection(-F,I,3)):(O=this.getCardinalDirection(M,I,2),z=this.getCardinalDirection(F,I,4)),!L)switch(O){case 1:U=m,N=u+-k/I,l[0]=N,l[1]=U;break;case 2:N=x,U=h+b*I,l[0]=N,l[1]=U;break;case 3:U=v,N=u+k/I,l[0]=N,l[1]=U;break;case 4:N=y,U=h+-b*I,l[0]=N,l[1]=U;break}if(!P)switch(z){case 1:W=w,$=f+-D/I,l[2]=$,l[3]=W;break;case 2:$=S,W=d+R*I,l[2]=$,l[3]=W;break;case 3:W=E,$=f+D/I,l[2]=$,l[3]=W;break;case 4:$=C,W=d+-R*I,l[2]=$,l[3]=W;break}}return!1},i.getCardinalDirection=function(a,o,l){return a>o?l:1+l%4},i.getIntersection=function(a,o,l,u){if(u==null)return this.getIntersection2(a,o,l);var h=a.x,f=a.y,d=o.x,p=o.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,k=void 0,A=void 0,w=void 0,T=void 0,C=void 0,E=void 0,S=void 0;return k=p-f,w=h-d,C=d*f-h*p,A=v-g,T=m-y,E=y*g-m*v,S=k*T-A*w,S===0?null:(x=(w*E-T*C)/S,b=(A*C-k*E)/S,new n(x,b))},i.angleOfVector=function(a,o,l,u){var h=void 0;return a!==l?(h=Math.atan((u-o)/(l-a)),l0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},t.exports=n},function(t,e,r){"use strict";function n(){}s(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,r){"use strict";var n=function(){function h(f,d){for(var p=0;p"u"?"undefined":n(a);return a==null||o!="object"&&o!="function"},t.exports=i},function(t,e,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g0&&g;){for(k.push(w[0]);k.length>0&&g;){var T=k[0];k.splice(0,1),b.add(T);for(var C=T.getEdges(),x=0;x-1&&w.splice(D,1)}b=new Set,A=new Map}}return m},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x0){for(var v=this.edgeToDummyNodes.get(y),x=0;x=0&&g.splice(E,1);var S=A.getNeighborsList();S.forEach(function(L){if(y.indexOf(L)<0){var P=v.get(L),M=P-1;M==1&&T.push(L),v.set(L,M)}})}y=y.concat(T),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},p.prototype.setGraphManager=function(m){this.graphManager=m},t.exports=p},function(t,e,r){"use strict";function n(){}s(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},t.exports=n},function(t,e,r){"use strict";var n=r(4);function i(a,o){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var o=0,l=this.lworldExtX;return l!=0&&(o=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),o},i.prototype.transformY=function(a){var o=0,l=this.lworldExtY;return l!=0&&(o=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),o},i.prototype.inverseTransformX=function(a){var o=0,l=this.ldeviceExtX;return l!=0&&(o=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),o},i.prototype.inverseTransformY=function(a){var o=0,l=this.ldeviceExtY;return l!=0&&(o=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),o},i.prototype.inverseTransformPoint=function(a){var o=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return o},t.exports=i},function(t,e,r){"use strict";function n(d){if(Array.isArray(d)){for(var p=0,m=Array(d.length);pa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(d>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(d-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var d=this.getAllEdges(),p,m=0;m0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&d&&this.updateGrid(),b=new Set,m=0;mk||b>k)&&(d.gravitationForceX=-this.gravityConstant*y,d.gravitationForceY=-this.gravityConstant*v)):(k=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>k||b>k)&&(d.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,d.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},h.prototype.isConverged=function(){var d,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),d=this.totalDisplacement=x.length||k>=x[0].length)){for(var A=0;Ah},"_defaultCompareFunction")}]),l}();t.exports=o},function(t,e,r){"use strict";var n=function(){function o(l,u){for(var h=0;h2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,o),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=f,this.gap_penalty=d,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p=0;l--){var u=this.listeners[l];u.event===a&&u.callback===o&&this.listeners.splice(l,1)}},i.emit=function(a,o){for(var l=0;l{"use strict";s(function(e,r){typeof Ux=="object"&&typeof LP=="object"?LP.exports=r(AP()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof Ux=="object"?Ux.coseBase=r(AP()):e.coseBase=r(e.layoutBase)},"webpackUniversalModuleDefinition")(Ux,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return s(n,"__webpack_require__"),n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,o){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:o})},n.n=function(i){var a=i&&i.__esModule?s(function(){return i.default},"getDefault"):s(function(){return i},"getModuleExports");return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}s(a,"CoSEConstants");for(var o in i)a[o]=i[o];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(l,u,h){i.call(this,l,u,h)}s(a,"CoSEEdge"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraph;function a(l,u,h){i.call(this,l,u,h)}s(a,"CoSEGraph"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];e.exports=a},function(e,r,n){"use strict";var i=n(0).LGraphManager;function a(l){i.call(this,l)}s(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];e.exports=a},function(e,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function o(u,h,f,d){i.call(this,u,h,f,d)}s(o,"CoSENode"),o.prototype=Object.create(i.prototype);for(var l in i)o[l]=i[l];o.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*a.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),u.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(u,h){for(var f=this.getChild().getNodes(),d,p=0;p0)this.positionNodesRadially(w);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var T=new Set(this.getAllNodes()),C=this.nodesWithGravity.filter(function(E){return T.has(E)});this.graphManager.setAllNodesToApplyGravitation(C),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},k.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),T=this.nodesWithGravity.filter(function(S){return w.has(S)});this.graphManager.setAllNodesToApplyGravitation(T),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var C=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(C,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},k.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),T={},C=0;C1){var L;for(L=0;LE&&(E=Math.floor(D.y)),R=Math.floor(D.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(d.WORLD_CENTER_X-D.x/2,d.WORLD_CENTER_Y-D.y/2))},k.radialLayout=function(w,T,C){var E=Math.max(this.maxDiagonalInTree(w),h.DEFAULT_RADIAL_SEPARATION);k.branchRadialLayout(T,null,0,359,0,E);var S=x.calculateBounds(w),R=new b;R.setDeviceOrgX(S.getMinX()),R.setDeviceOrgY(S.getMinY()),R.setWorldOrgX(C.x),R.setWorldOrgY(C.y);for(var D=0;D1;){var ee=W[0];W.splice(0,1);var te=O.indexOf(ee);te>=0&&O.splice(te,1),U--,z--}T!=null?$=(O.indexOf(W[0])+1)%U:$=0;for(var ce=Math.abs(E-C)/z,Z=$;N!=z;Z=++Z%U){var fe=O[Z].getOtherEnd(w);if(fe!=T){var ne=(C+N*ce)%360,H=(ne+ce)%360;k.branchRadialLayout(fe,w,ne,H,S+R,R),N++}}},k.maxDiagonalInTree=function(w){for(var T=y.MIN_VALUE,C=0;CT&&(T=S)}return T},k.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},k.prototype.groupZeroDegreeMembers=function(){var w=this,T={};this.memberGroups={},this.idToDummyNode={};for(var C=[],E=this.graphManager.getAllNodes(),S=0;S"u"&&(T[L]=[]),T[L]=T[L].concat(R)}Object.keys(T).forEach(function(P){if(T[P].length>1){var M="DummyCompound_"+P;w.memberGroups[M]=T[P];var F=T[P][0].getParent(),I=new l(w.graphManager);I.id=M,I.paddingLeft=F.paddingLeft||0,I.paddingRight=F.paddingRight||0,I.paddingBottom=F.paddingBottom||0,I.paddingTop=F.paddingTop||0,w.idToDummyNode[M]=I;var O=w.getGraphManager().add(w.newGraph(),I),z=F.getChild();z.add(I);for(var N=0;N=0;w--){var T=this.compoundOrder[w],C=T.id,E=T.paddingLeft,S=T.paddingTop;this.adjustLocations(this.tiledMemberPack[C],T.rect.x,T.rect.y,E,S)}},k.prototype.repopulateZeroDegreeMembers=function(){var w=this,T=this.tiledZeroDegreePack;Object.keys(T).forEach(function(C){var E=w.idToDummyNode[C],S=E.paddingLeft,R=E.paddingTop;w.adjustLocations(T[C],E.rect.x,E.rect.y,S,R)})},k.prototype.getToBeTiled=function(w){var T=w.id;if(this.toBeTiled[T]!=null)return this.toBeTiled[T];var C=w.getChild();if(C==null)return this.toBeTiled[T]=!1,!1;for(var E=C.getNodes(),S=0;S0)return this.toBeTiled[T]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[T]=!1,!1}return this.toBeTiled[T]=!0,!0},k.prototype.getNodeDegree=function(w){for(var T=w.id,C=w.getEdges(),E=0,S=0;SP&&(P=F.rect.height)}C+=P+w.verticalPadding}},k.prototype.tileCompoundMembers=function(w,T){var C=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(E){var S=T[E];C.tiledMemberPack[E]=C.tileNodes(w[E],S.paddingLeft+S.paddingRight),S.rect.width=C.tiledMemberPack[E].width,S.rect.height=C.tiledMemberPack[E].height})},k.prototype.tileNodes=function(w,T){var C=h.TILING_PADDING_VERTICAL,E=h.TILING_PADDING_HORIZONTAL,S={rows:[],rowWidth:[],rowHeight:[],width:0,height:T,verticalPadding:C,horizontalPadding:E};w.sort(function(L,P){return L.rect.width*L.rect.height>P.rect.width*P.rect.height?-1:L.rect.width*L.rect.height0&&(D+=w.horizontalPadding),w.rowWidth[C]=D,w.width0&&(L+=w.verticalPadding);var P=0;L>w.rowHeight[C]&&(P=w.rowHeight[C],w.rowHeight[C]=L,P=w.rowHeight[C]-P),w.height+=P,w.rows[C].push(T)},k.prototype.getShortestRowIndex=function(w){for(var T=-1,C=Number.MAX_VALUE,E=0;EC&&(T=E,C=w.rowWidth[E]);return T},k.prototype.canAddHorizontal=function(w,T,C){var E=this.getShortestRowIndex(w);if(E<0)return!0;var S=w.rowWidth[E];if(S+w.horizontalPadding+T<=w.width)return!0;var R=0;w.rowHeight[E]0&&(R=C+w.verticalPadding-w.rowHeight[E]);var D;w.width-S>=T+w.horizontalPadding?D=(w.height+R)/(S+T+w.horizontalPadding):D=(w.height+R)/w.width,R=C+w.verticalPadding;var L;return w.widthR&&T!=C){E.splice(-1,1),w.rows[C].push(S),w.rowWidth[T]=w.rowWidth[T]-R,w.rowWidth[C]=w.rowWidth[C]+R,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var D=Number.MIN_VALUE,L=0;LD&&(D=E[L].height);T>0&&(D+=w.verticalPadding);var P=w.rowHeight[T]+w.rowHeight[C];w.rowHeight[T]=D,w.rowHeight[C]0)for(var z=S;z<=R;z++)O[0]+=this.grid[z][D-1].length+this.grid[z][D].length-1;if(R0)for(var z=D;z<=L;z++)O[3]+=this.grid[S-1][z].length+this.grid[S][z].length-1;for(var N=y.MAX_VALUE,U,$,W=0;W{"use strict";s(function(e,r){typeof qx=="object"&&typeof RP=="object"?RP.exports=r(DP()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof qx=="object"?qx.cytoscapeCoseBilkent=r(DP()):e.cytoscapeCoseBilkent=r(e.coseBase)},"webpackUniversalModuleDefinition")(qx,function(t){return function(e){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return s(n,"__webpack_require__"),n.m=e,n.c=r,n.i=function(i){return i},n.d=function(i,a,o){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:o})},n.n=function(i){var a=i&&i.__esModule?s(function(){return i.default},"getDefault"):s(function(){return i},"getModuleExports");return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)}([function(e,r){e.exports=t},function(e,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,o=n(0).CoSEConstants,l=n(0).CoSELayout,u=n(0).CoSENode,h=n(0).layoutBase.PointD,f=n(0).layoutBase.DimensionD,d={ready:s(function(){},"ready"),stop:s(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function p(v,x){var b={};for(var k in v)b[k]=v[k];for(var k in x)b[k]=x[k];return b}s(p,"extend");function m(v){this.options=p(d,v),g(this.options)}s(m,"_CoSELayout");var g=s(function(x){x.nodeRepulsion!=null&&(o.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=x.nodeRepulsion),x.idealEdgeLength!=null&&(o.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=x.idealEdgeLength),x.edgeElasticity!=null&&(o.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=x.edgeElasticity),x.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(o.MAX_ITERATIONS=a.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.quality=="draft"?i.QUALITY=0:x.quality=="proof"?i.QUALITY=2:i.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!x.randomize,o.ANIMATE=a.ANIMATE=i.ANIMATE=x.animate,o.TILE=x.tile,o.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal},"getUserOptions");m.prototype.run=function(){var v,x,b=this.options,k=this.idToLNode={},A=this.layout=new l,w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var T=A.newGraphManager();this.gm=T;var C=this.options.eles.nodes(),E=this.options.eles.edges();this.root=T.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(C),A);for(var S=0;S0){var L;L=b.getGraphManager().add(b.newGraph(),C),this.processChildrenList(L,T,b)}}},m.prototype.stop=function(){return this.stopped=!0,this};var y=s(function(x){x("layout","cose-bilkent",m)},"register");typeof cytoscape<"u"&&y(cytoscape),e.exports=y}])})});function $je(t,e,r,n,i){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+(i.width-e)/2+", "+r+")")}var Nje,Oje,Pje,Bje,Fje,zje,Gje,Vje,Rpe,Mpe,Ipe=_(()=>{"use strict";ic();pr();Nje=12,Oje=s(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${-r.height+2*5} q0,-5 5,-5 h${r.width-2*5} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),Pje=s(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),Bje=s(function(t,e,r){let n=r.width,i=r.height,a=.15*n,o=.25*n,l=.35*n,u=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${n*.25},${-1*n*.1} + a${l},${l} 1 0,1 ${n*.4},${-1*n*.1} + a${o},${o} 1 0,1 ${n*.35},${1*n*.2} + + a${a},${a} 1 0,1 ${n*.15},${1*i*.35} + a${u},${u} 1 0,1 ${-1*n*.15},${1*i*.65} + + a${o},${a} 1 0,1 ${-1*n*.25},${n*.15} + a${l},${l} 1 0,1 ${-1*n*.5},0 + a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15} + + a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35} + a${u},${u} 1 0,1 ${n*.1},${-1*i*.65} + + H0 V0 Z`)},"cloudBkg"),Fje=s(function(t,e,r){let n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${n*.25},${-1*i*.1} + a${a},${a} 1 0,0 ${n*.25},0 + a${a},${a} 1 0,0 ${n*.25},0 + a${a},${a} 1 0,0 ${n*.25},${1*i*.1} + + a${a},${a} 1 0,0 ${n*.15},${1*i*.33} + a${a*.8},${a*.8} 1 0,0 0,${1*i*.34} + a${a},${a} 1 0,0 ${-1*n*.15},${1*i*.33} + + a${a},${a} 1 0,0 ${-1*n*.25},${i*.15} + a${a},${a} 1 0,0 ${-1*n*.25},0 + a${a},${a} 1 0,0 ${-1*n*.25},0 + a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15} + + a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33} + a${a*.8},${a*.8} 1 0,0 0,${-1*i*.34} + a${a},${a} 1 0,0 ${n*.1},${-1*i*.33} + + H0 V0 Z`)},"bangBkg"),zje=s(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg");s($je,"insertPolygonShape");Gje=s(function(t,e,r){let n=r.height,a=n/4,o=r.width-r.padding+2*a,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-n/2},{x:o-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}];$je(e,o,n,l,r)},"hexagonBkg"),Vje=s(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),Rpe=s(async function(t,e,r,n,i){let a=i.htmlLabels,o=n%(Nje-1),l=e.append("g");r.section=o;let u="section-"+o;o<0&&(u+=" section-root"),l.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+u);let h=l.append("g"),f=l.append("g"),d=r.descr.replace(/()/g,` +`);await vs(f,d,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let p=f.node().getBBox(),[m]=nc(i.fontSize);if(r.height=p.height+m*1.1*.5+r.padding,r.width=p.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,l.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),f.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let g=r.height;r.height=Math.max(g,60);let y=Math.abs(r.height-g);l.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+y/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),f.attr("transform","translate("+(25+r.width/2)+", "+(y/2+r.padding/2)+")")}else if(a){let g=(r.width-p.width)/2,y=(r.height-p.height)/2;f.attr("transform","translate("+g+", "+y+")")}else{let g=r.width/2,y=r.padding/2;f.attr("transform","translate("+g+", "+y+")")}switch(r.type){case t.nodeType.DEFAULT:Oje(t,h,r,o);break;case t.nodeType.ROUNDED_RECT:Vje(t,h,r,o);break;case t.nodeType.RECT:Pje(t,h,r,o);break;case t.nodeType.CIRCLE:h.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),zje(t,h,r,o);break;case t.nodeType.CLOUD:Bje(t,h,r,o);break;case t.nodeType.BANG:Fje(t,h,r,o);break;case t.nodeType.HEXAGON:Gje(t,h,r,o);break}return t.setElementForId(r.id,l),r.height},"drawNode"),Mpe=s(function(t,e){let r=t.getElementById(e.id),n=e.x||0,i=e.y||0;r.attr("transform","translate("+n+","+i+")")},"positionNode")});async function Ope(t,e,r,n,i){await Rpe(t,e,r,n,i),r.children&&await Promise.all(r.children.map((a,o)=>Ope(t,e,a,n<0?o:n,i)))}function Uje(t,e){e.edges().map((r,n)=>{let i=r.data();if(r[0]._private.bodyBounds){let a=r[0]._private.rscratch;V.trace("Edge: ",n,i),t.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}})}function Ppe(t,e,r,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(i=>{Ppe(i,e,r,n+1),e.add({group:"edges",data:{id:`${t.id}_${i.id}`,source:t.id,target:i.id,depth:n,section:i.section}})})}function qje(t,e){return new Promise(r=>{let n=Me("body").append("div").attr("id","cy").attr("style","display:none"),i=Yu({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),Ppe(t,i,e,0),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let o=a.data();return{w:o.width,h:o.height}}}),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready(a=>{V.info("Ready",a),r(i)})})}function Wje(t,e){e.nodes().map((r,n)=>{let i=r.data();i.x=r.position().x,i.y=r.position().y,Mpe(t,i);let a=t.getElementById(i.nodeId);V.info("Id:",n,"Position: (",r.position().x,", ",r.position().y,")",i),a.attr("transform",`translate(${r.position().x-i.width/2}, ${r.position().y-i.height/2})`),a.attr("attr",`apa-${n})`)})}var Npe,Hje,Bpe,Fpe=_(()=>{"use strict";Lpe();Npe=ka(Dpe(),1);Xt();gt();it();p0();Un();Ipe();Pl();Yu.use(Npe.default);s(Ope,"drawNodes");s(Uje,"drawEdges");s(Ppe,"addNodes");s(qje,"layoutMindmap");s(Wje,"positionNodes");Hje=s(async(t,e,r,n)=>{V.debug(`Rendering mindmap diagram +`+t);let i=n.db,a=i.getMindmap();if(!a)return;let o=le();o.htmlLabels=!1;let l=Bo(e),u=l.append("g");u.attr("class","mindmap-edges");let h=l.append("g");h.attr("class","mindmap-nodes"),await Ope(i,h,a,-1,o);let f=await qje(a,o);Uje(u,f),Wje(i,f),ql(void 0,l,o.mindmap?.padding??dr.mindmap.padding,o.mindmap?.useMaxWidth??dr.mindmap.useMaxWidth)},"draw"),Bpe={draw:Hje}});var Yje,Xje,zpe,$pe=_(()=>{"use strict";Ho();Yje=s(t=>{let e="";for(let r=0;r` + .edge { + stroke-width: 3; + } + ${Yje(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),zpe=Xje});var Gpe={};ur(Gpe,{diagram:()=>jje});var jje,Vpe=_(()=>{"use strict";Sfe();Lfe();Fpe();$pe();jje={db:Afe,renderer:Bpe,parser:Cfe,styles:zpe}});var MP,Wx,Wpe=_(()=>{"use strict";MP=function(){var t=s(function(l,u,h,f){for(h=h||{},f=l.length;f--;h[l[f]]=u);return h},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],i={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:s(function(u,h,f,d,p,m,g){var y=m.length-1;switch(p){case 7:let v=d.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),x=d.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),b=parseFloat(m[y].trim());d.addLink(v,x,b);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:s(function(u,h){if(h.recoverable)this.trace(u);else{var f=new Error(u);throw f.hash=h,f}},"parseError"),parse:s(function(u){var h=this,f=[0],d=[],p=[null],m=[],g=this.table,y="",v=0,x=0,b=0,k=2,A=1,w=m.slice.call(arguments,1),T=Object.create(this.lexer),C={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(C.yy[E]=this.yy[E]);T.setInput(u,C.yy),C.yy.lexer=T,C.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var S=T.yylloc;m.push(S);var R=T.options&&T.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(ce){f.length=f.length-2*ce,p.length=p.length-ce,m.length=m.length-ce}s(D,"popStack");function L(){var ce;return ce=d.pop()||T.lex()||A,typeof ce!="number"&&(ce instanceof Array&&(d=ce,ce=d.pop()),ce=h.symbols_[ce]||ce),ce}s(L,"lex");for(var P,M,F,I,O,z,N={},U,$,W,ee;;){if(F=f[f.length-1],this.defaultActions[F]?I=this.defaultActions[F]:((P===null||typeof P>"u")&&(P=L()),I=g[F]&&g[F][P]),typeof I>"u"||!I.length||!I[0]){var te="";ee=[];for(U in g[F])this.terminals_[U]&&U>k&&ee.push("'"+this.terminals_[U]+"'");T.showPosition?te="Parse error on line "+(v+1)+`: +`+T.showPosition()+` +Expecting `+ee.join(", ")+", got '"+(this.terminals_[P]||P)+"'":te="Parse error on line "+(v+1)+": Unexpected "+(P==A?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(te,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:S,expected:ee})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+P);switch(I[0]){case 1:f.push(P),p.push(T.yytext),m.push(T.yylloc),f.push(I[1]),P=null,M?(P=M,M=null):(x=T.yyleng,y=T.yytext,v=T.yylineno,S=T.yylloc,b>0&&b--);break;case 2:if($=this.productions_[I[1]][1],N.$=p[p.length-$],N._$={first_line:m[m.length-($||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-($||1)].first_column,last_column:m[m.length-1].last_column},R&&(N._$.range=[m[m.length-($||1)].range[0],m[m.length-1].range[1]]),z=this.performAction.apply(N,[y,x,v,C.yy,I[1],p,m].concat(w)),typeof z<"u")return z;$&&(f=f.slice(0,-1*$*2),p=p.slice(0,-1*$),m=m.slice(0,-1*$)),f.push(this.productions_[I[1]][0]),p.push(N.$),m.push(N._$),W=g[f[f.length-2]][f[f.length-1]],f.push(W);break;case 3:return!0}}return!0},"parse")},a=function(){var l={EOF:1,parseError:s(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw new Error(h)},"parseError"),setInput:s(function(u,h){return this.yy=h||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:s(function(u){var h=u.length,f=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(u){this.unput(this.match.slice(u))},"less"),pastInput:s(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:s(function(u,h){var f,d,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),d=u[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],f=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var m in p)this[m]=p[m];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,f,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;mh[0].length)){if(h=f,d=m,this.options.backtrack_lexer){if(u=this.test_match(f,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[d]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var h=this.next();return h||this.lex()},"lex"),begin:s(function(h){this.conditionStack.push(h)},"begin"),popState:s(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:s(function(h){this.begin(h)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(h,f,d,p){var m=p;switch(d){case 0:return this.pushState("csv"),4;break;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;break;case 5:return 20;case 6:return this.popState("escaped_text"),18;break;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return l}();i.lexer=a;function o(){this.yy={}}return s(o,"Parser"),o.prototype=i,i.Parser=o,new o}();MP.parser=MP;Wx=MP});var w7,T7,k7,Jje,IP,eKe,NP,tKe,rKe,nKe,iKe,Hpe,Ype=_(()=>{"use strict";gt();Qt();Ci();w7=[],T7=[],k7=new Map,Jje=s(()=>{w7=[],T7=[],k7=new Map,br()},"clear"),IP=class{constructor(e,r,n=0){this.source=e;this.target=r;this.value=n}static{s(this,"SankeyLink")}},eKe=s((t,e,r)=>{w7.push(new IP(t,e,r))},"addLink"),NP=class{constructor(e){this.ID=e}static{s(this,"SankeyNode")}},tKe=s(t=>{t=$e.sanitizeText(t,le());let e=k7.get(t);return e===void 0&&(e=new NP(t),k7.set(t,e),T7.push(e)),e},"findOrCreateNode"),rKe=s(()=>T7,"getNodes"),nKe=s(()=>w7,"getLinks"),iKe=s(()=>({nodes:T7.map(t=>({id:t.ID})),links:w7.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Hpe={nodesMap:k7,getConfig:s(()=>le().sankey,"getConfig"),getNodes:rKe,getLinks:nKe,getGraph:iKe,addLink:eKe,findOrCreateNode:tKe,getAccTitle:Gr,setAccTitle:Ar,getAccDescription:Ur,setAccDescription:Vr,getDiagramTitle:Qr,setDiagramTitle:an,clear:Jje}});function Hx(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}var Xpe=_(()=>{"use strict";s(Hx,"max")});function i1(t,e){let r;if(e===void 0)for(let n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var jpe=_(()=>{"use strict";s(i1,"min")});function a1(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}var Kpe=_(()=>{"use strict";s(a1,"sum")});var OP=_(()=>{"use strict";Xpe();jpe();Kpe()});function aKe(t){return t.target.depth}function PP(t){return t.depth}function BP(t,e){return e-1-t.height}function Yx(t,e){return t.sourceLinks.length?t.depth:e-1}function FP(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?i1(t.sourceLinks,aKe)-1:0}var zP=_(()=>{"use strict";OP();s(aKe,"targetDepth");s(PP,"left");s(BP,"right");s(Yx,"justify");s(FP,"center")});function s1(t){return function(){return t}}var Qpe=_(()=>{"use strict";s(s1,"constant")});function Zpe(t,e){return E7(t.source,e.source)||t.index-e.index}function Jpe(t,e){return E7(t.target,e.target)||t.index-e.index}function E7(t,e){return t.y0-e.y0}function $P(t){return t.value}function sKe(t){return t.index}function oKe(t){return t.nodes}function lKe(t){return t.links}function eme(t,e){let r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function tme({nodes:t}){for(let e of t){let r=e.y0,n=r;for(let i of e.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of e.targetLinks)i.y1=n+i.width/2,n+=i.width}}function C7(){let t=0,e=0,r=1,n=1,i=24,a=8,o,l=sKe,u=Yx,h,f,d=oKe,p=lKe,m=6;function g(){let F={nodes:d.apply(null,arguments),links:p.apply(null,arguments)};return y(F),v(F),x(F),b(F),w(F),tme(F),F}s(g,"sankey"),g.update=function(F){return tme(F),F},g.nodeId=function(F){return arguments.length?(l=typeof F=="function"?F:s1(F),g):l},g.nodeAlign=function(F){return arguments.length?(u=typeof F=="function"?F:s1(F),g):u},g.nodeSort=function(F){return arguments.length?(h=F,g):h},g.nodeWidth=function(F){return arguments.length?(i=+F,g):i},g.nodePadding=function(F){return arguments.length?(a=o=+F,g):a},g.nodes=function(F){return arguments.length?(d=typeof F=="function"?F:s1(F),g):d},g.links=function(F){return arguments.length?(p=typeof F=="function"?F:s1(F),g):p},g.linkSort=function(F){return arguments.length?(f=F,g):f},g.size=function(F){return arguments.length?(t=e=0,r=+F[0],n=+F[1],g):[r-t,n-e]},g.extent=function(F){return arguments.length?(t=+F[0][0],r=+F[1][0],e=+F[0][1],n=+F[1][1],g):[[t,e],[r,n]]},g.iterations=function(F){return arguments.length?(m=+F,g):m};function y({nodes:F,links:I}){for(let[z,N]of F.entries())N.index=z,N.sourceLinks=[],N.targetLinks=[];let O=new Map(F.map((z,N)=>[l(z,N,F),z]));for(let[z,N]of I.entries()){N.index=z;let{source:U,target:$}=N;typeof U!="object"&&(U=N.source=eme(O,U)),typeof $!="object"&&($=N.target=eme(O,$)),U.sourceLinks.push(N),$.targetLinks.push(N)}if(f!=null)for(let{sourceLinks:z,targetLinks:N}of F)z.sort(f),N.sort(f)}s(y,"computeNodeLinks");function v({nodes:F}){for(let I of F)I.value=I.fixedValue===void 0?Math.max(a1(I.sourceLinks,$P),a1(I.targetLinks,$P)):I.fixedValue}s(v,"computeNodeValues");function x({nodes:F}){let I=F.length,O=new Set(F),z=new Set,N=0;for(;O.size;){for(let U of O){U.depth=N;for(let{target:$}of U.sourceLinks)z.add($)}if(++N>I)throw new Error("circular link");O=z,z=new Set}}s(x,"computeNodeDepths");function b({nodes:F}){let I=F.length,O=new Set(F),z=new Set,N=0;for(;O.size;){for(let U of O){U.height=N;for(let{source:$}of U.targetLinks)z.add($)}if(++N>I)throw new Error("circular link");O=z,z=new Set}}s(b,"computeNodeHeights");function k({nodes:F}){let I=Hx(F,N=>N.depth)+1,O=(r-t-i)/(I-1),z=new Array(I);for(let N of F){let U=Math.max(0,Math.min(I-1,Math.floor(u.call(null,N,I))));N.layer=U,N.x0=t+U*O,N.x1=N.x0+i,z[U]?z[U].push(N):z[U]=[N]}if(h)for(let N of z)N.sort(h);return z}s(k,"computeNodeLayers");function A(F){let I=i1(F,O=>(n-e-(O.length-1)*o)/a1(O,$P));for(let O of F){let z=e;for(let N of O){N.y0=z,N.y1=z+N.value*I,z=N.y1+o;for(let U of N.sourceLinks)U.width=U.value*I}z=(n-z+o)/(O.length+1);for(let N=0;NO.length)-1)),A(I);for(let O=0;O0))continue;let te=(W/ee-$.y0)*I;$.y0+=te,$.y1+=te,D($)}h===void 0&&U.sort(E7),E(U,O)}}s(T,"relaxLeftToRight");function C(F,I,O){for(let z=F.length,N=z-2;N>=0;--N){let U=F[N];for(let $ of U){let W=0,ee=0;for(let{target:ce,value:Z}of $.sourceLinks){let fe=Z*(ce.layer-$.layer);W+=M($,ce)*fe,ee+=fe}if(!(ee>0))continue;let te=(W/ee-$.y0)*I;$.y0+=te,$.y1+=te,D($)}h===void 0&&U.sort(E7),E(U,O)}}s(C,"relaxRightToLeft");function E(F,I){let O=F.length>>1,z=F[O];R(F,z.y0-o,O-1,I),S(F,z.y1+o,O+1,I),R(F,n,F.length-1,I),S(F,e,0,I)}s(E,"resolveCollisions");function S(F,I,O,z){for(;O1e-6&&(N.y0+=U,N.y1+=U),I=N.y1+o}}s(S,"resolveCollisionsTopToBottom");function R(F,I,O,z){for(;O>=0;--O){let N=F[O],U=(N.y1-I)*z;U>1e-6&&(N.y0-=U,N.y1-=U),I=N.y0-o}}s(R,"resolveCollisionsBottomToTop");function D({sourceLinks:F,targetLinks:I}){if(f===void 0){for(let{source:{sourceLinks:O}}of I)O.sort(Jpe);for(let{target:{targetLinks:O}}of F)O.sort(Zpe)}}s(D,"reorderNodeLinks");function L(F){if(f===void 0)for(let{sourceLinks:I,targetLinks:O}of F)I.sort(Jpe),O.sort(Zpe)}s(L,"reorderLinks");function P(F,I){let O=F.y0-(F.sourceLinks.length-1)*o/2;for(let{target:z,width:N}of F.sourceLinks){if(z===I)break;O+=N+o}for(let{source:z,width:N}of I.targetLinks){if(z===F)break;O-=N}return O}s(P,"targetTop");function M(F,I){let O=I.y0-(I.targetLinks.length-1)*o/2;for(let{source:z,width:N}of I.targetLinks){if(z===F)break;O+=N+o}for(let{target:z,width:N}of F.sourceLinks){if(z===I)break;O-=N}return O}return s(M,"sourceTop"),g}var rme=_(()=>{"use strict";OP();zP();Qpe();s(Zpe,"ascendingSourceBreadth");s(Jpe,"ascendingTargetBreadth");s(E7,"ascendingBreadth");s($P,"value");s(sKe,"defaultId");s(oKe,"defaultNodes");s(lKe,"defaultLinks");s(eme,"find");s(tme,"computeLinkBreadths");s(C7,"Sankey")});function UP(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function nme(){return new UP}var GP,VP,$0,cKe,qP,ime=_(()=>{"use strict";GP=Math.PI,VP=2*GP,$0=1e-6,cKe=VP-$0;s(UP,"Path");s(nme,"path");UP.prototype=nme.prototype={constructor:UP,moveTo:s(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:s(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:s(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:s(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:s(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:s(function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,o=this._y1,l=r-t,u=n-e,h=a-t,f=o-e,d=h*h+f*f;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(d>$0)if(!(Math.abs(f*l-u*h)>$0)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var p=r-a,m=n-o,g=l*l+u*u,y=p*p+m*m,v=Math.sqrt(g),x=Math.sqrt(d),b=i*Math.tan((GP-Math.acos((g+d-y)/(2*v*x)))/2),k=b/x,A=b/v;Math.abs(k-1)>$0&&(this._+="L"+(t+k*h)+","+(e+k*f)),this._+="A"+i+","+i+",0,0,"+ +(f*p>h*m)+","+(this._x1=t+A*l)+","+(this._y1=e+A*u)}},"arcTo"),arc:s(function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var o=r*Math.cos(n),l=r*Math.sin(n),u=t+o,h=e+l,f=1^a,d=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>$0||Math.abs(this._y1-h)>$0)&&(this._+="L"+u+","+h),r&&(d<0&&(d=d%VP+VP),d>cKe?this._+="A"+r+","+r+",0,1,"+f+","+(t-o)+","+(e-l)+"A"+r+","+r+",0,1,"+f+","+(this._x1=u)+","+(this._y1=h):d>$0&&(this._+="A"+r+","+r+",0,"+ +(d>=GP)+","+f+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},"arc"),rect:s(function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:s(function(){return this._},"toString")};qP=nme});var ame=_(()=>{"use strict";ime()});function S7(t){return s(function(){return t},"constant")}var sme=_(()=>{"use strict";s(S7,"default")});function ome(t){return t[0]}function lme(t){return t[1]}var cme=_(()=>{"use strict";s(ome,"x");s(lme,"y")});var ume,hme=_(()=>{"use strict";ume=Array.prototype.slice});function uKe(t){return t.source}function hKe(t){return t.target}function fKe(t){var e=uKe,r=hKe,n=ome,i=lme,a=null;function o(){var l,u=ume.call(arguments),h=e.apply(this,u),f=r.apply(this,u);if(a||(a=l=qP()),t(a,+n.apply(this,(u[0]=h,u)),+i.apply(this,u),+n.apply(this,(u[0]=f,u)),+i.apply(this,u)),l)return a=null,l+""||null}return s(o,"link"),o.source=function(l){return arguments.length?(e=l,o):e},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:S7(+l),o):n},o.y=function(l){return arguments.length?(i=typeof l=="function"?l:S7(+l),o):i},o.context=function(l){return arguments.length?(a=l??null,o):a},o}function dKe(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function WP(){return fKe(dKe)}var fme=_(()=>{"use strict";ame();hme();sme();cme();s(uKe,"linkSource");s(hKe,"linkTarget");s(fKe,"link");s(dKe,"curveHorizontal");s(WP,"linkHorizontal")});var dme=_(()=>{"use strict";fme()});function pKe(t){return[t.source.x1,t.y0]}function mKe(t){return[t.target.x0,t.y1]}function _7(){return WP().source(pKe).target(mKe)}var pme=_(()=>{"use strict";dme();s(pKe,"horizontalSource");s(mKe,"horizontalTarget");s(_7,"default")});var mme=_(()=>{"use strict";rme();zP();pme()});var Xx,gme=_(()=>{"use strict";Xx=class t{static{s(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}}});var gKe,yKe,yme,vme=_(()=>{"use strict";gt();Xt();mme();Un();gme();gKe={left:PP,right:BP,center:FP,justify:Yx},yKe=s(function(t,e,r,n){let{securityLevel:i,sankey:a}=le(),o=Qb.sankey,l;i==="sandbox"&&(l=Me("#i"+e));let u=i==="sandbox"?Me(l.nodes()[0].contentDocument.body):Me("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):Me(`[id="${e}"]`),f=a?.width??o.width,d=a?.height??o.width,p=a?.useMaxWidth??o.useMaxWidth,m=a?.nodeAlignment??o.nodeAlignment,g=a?.prefix??o.prefix,y=a?.suffix??o.suffix,v=a?.showValues??o.showValues,x=n.db.getGraph(),b=gKe[m];C7().nodeId(R=>R.id).nodeWidth(10).nodePadding(10+(v?15:0)).nodeAlign(b).extent([[0,0],[f,d]])(x);let w=au(l_);h.append("g").attr("class","nodes").selectAll(".node").data(x.nodes).join("g").attr("class","node").attr("id",R=>(R.uid=Xx.next("node-")).id).attr("transform",function(R){return"translate("+R.x0+","+R.y0+")"}).attr("x",R=>R.x0).attr("y",R=>R.y0).append("rect").attr("height",R=>R.y1-R.y0).attr("width",R=>R.x1-R.x0).attr("fill",R=>w(R.id));let T=s(({id:R,value:D})=>v?`${R} +${g}${Math.round(D*100)/100}${y}`:R,"getText");h.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(x.nodes).join("text").attr("x",R=>R.x0(R.y1+R.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",R=>R.x0(D.uid=Xx.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",D=>D.source.x1).attr("x2",D=>D.target.x0);R.append("stop").attr("offset","0%").attr("stop-color",D=>w(D.source.id)),R.append("stop").attr("offset","100%").attr("stop-color",D=>w(D.target.id))}let S;switch(E){case"gradient":S=s(R=>R.uid,"coloring");break;case"source":S=s(R=>w(R.source.id),"coloring");break;case"target":S=s(R=>w(R.target.id),"coloring");break;default:S=E}C.append("path").attr("d",_7()).attr("stroke",S).attr("stroke-width",R=>Math.max(1,R.width)),ql(void 0,h,0,p)},"draw"),yme={draw:yKe}});var xme,bme=_(()=>{"use strict";xme=s(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")});var kme={};ur(kme,{diagram:()=>xKe});var vKe,xKe,wme=_(()=>{"use strict";Wpe();Ype();vme();bme();vKe=Wx.parse.bind(Wx);Wx.parse=t=>vKe(xme(t));xKe={parser:Wx,db:Hpe,renderer:yme}});var Cme,HP,TKe,EKe,CKe,SKe,_Ke,Tf,YP=_(()=>{"use strict";zs();Pl();pr();Ci();Cme={packet:[]},HP=structuredClone(Cme),TKe=dr.packet,EKe=s(()=>{let t=ms({...TKe,..._r().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),CKe=s(()=>HP.packet,"getPacket"),SKe=s(t=>{t.length>0&&HP.packet.push(t)},"pushWord"),_Ke=s(()=>{br(),HP=structuredClone(Cme)},"clear"),Tf={pushWord:SKe,getPacket:CKe,getConfig:EKe,clear:_Ke,setAccTitle:Ar,getAccTitle:Gr,setDiagramTitle:an,getDiagramTitle:Qr,getAccDescription:Ur,setAccDescription:Vr}});var AKe,LKe,DKe,Sme,_me=_(()=>{"use strict";V2();it();kw();YP();AKe=1e4,LKe=s(t=>{dg(t,Tf);let e=-1,r=[],n=1,{bitsPerRow:i}=Tf.getConfig();for(let{start:a,end:o,label:l}of t.blocks){if(o&&o{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),Sme={parse:s(async t=>{let e=await Bu("packet",t);V.debug(e),LKe(e)},"parse")}});var RKe,MKe,Ame,Lme=_(()=>{"use strict";p0();Un();RKe=s((t,e,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:o,paddingY:l,bitWidth:u,bitsPerRow:h}=a,f=i.getPacket(),d=i.getDiagramTitle(),p=o+l,m=p*(f.length+1)-(d?0:o),g=u*h+2,y=Bo(e);y.attr("viewbox",`0 0 ${g} ${m}`),xr(y,m,g,a.useMaxWidth);for(let[v,x]of f.entries())MKe(y,x,v,a);y.append("text").text(d).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),MKe=s((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:l,showBits:u})=>{let h=t.append("g"),f=r*(n+a)+a;for(let d of e){let p=d.start%l*o+1,m=(d.end-d.start+1)*o-i;if(h.append("rect").attr("x",p).attr("y",f).attr("width",m).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",f+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(d.label),!u)continue;let g=d.end===d.start,y=f-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(d.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(d.end)}},"drawWord"),Ame={draw:RKe}});var IKe,Dme,Rme=_(()=>{"use strict";pr();IKe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},Dme=s(({packet:t}={})=>{let e=ms(IKe,t);return` + .packetByte { + font-size: ${e.byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `},"styles")});var Mme={};ur(Mme,{diagram:()=>NKe});var NKe,Ime=_(()=>{"use strict";YP();_me();Lme();Rme();NKe={parser:Sme,db:Tf,renderer:Ame,styles:Dme}});var XP,Pme,Bme=_(()=>{"use strict";XP=function(){var t=s(function(k,A,w,T){for(w=w||{},T=k.length;T--;w[k[T]]=A);return w},"o"),e=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],o=[1,16],l=[1,17],u=[1,18],h=[8,30],f=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],g=[8,15,16,21,27,28,29,30,31,32,40,44,47],y=[1,49],v={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:s(function(A,w,T,C,E,S,R){var D=S.length-1;switch(E){case 4:C.getLogger().debug("Rule: separator (NL) ");break;case 5:C.getLogger().debug("Rule: separator (Space) ");break;case 6:C.getLogger().debug("Rule: separator (EOF) ");break;case 7:C.getLogger().debug("Rule: hierarchy: ",S[D-1]),C.setHierarchy(S[D-1]);break;case 8:C.getLogger().debug("Stop NL ");break;case 9:C.getLogger().debug("Stop EOF ");break;case 10:C.getLogger().debug("Stop NL2 ");break;case 11:C.getLogger().debug("Stop EOF2 ");break;case 12:C.getLogger().debug("Rule: statement: ",S[D]),typeof S[D].length=="number"?this.$=S[D]:this.$=[S[D]];break;case 13:C.getLogger().debug("Rule: statement #2: ",S[D-1]),this.$=[S[D-1]].concat(S[D]);break;case 14:C.getLogger().debug("Rule: link: ",S[D],A),this.$={edgeTypeStr:S[D],label:""};break;case 15:C.getLogger().debug("Rule: LABEL link: ",S[D-3],S[D-1],S[D]),this.$={edgeTypeStr:S[D],label:S[D-1]};break;case 18:let L=parseInt(S[D]),P=C.generateId();this.$={id:P,type:"space",label:"",width:L,children:[]};break;case 23:C.getLogger().debug("Rule: (nodeStatement link node) ",S[D-2],S[D-1],S[D]," typestr: ",S[D-1].edgeTypeStr);let M=C.edgeStrToEdgeData(S[D-1].edgeTypeStr);this.$=[{id:S[D-2].id,label:S[D-2].label,type:S[D-2].type,directions:S[D-2].directions},{id:S[D-2].id+"-"+S[D].id,start:S[D-2].id,end:S[D].id,label:S[D-1].label,type:"edge",directions:S[D].directions,arrowTypeEnd:M,arrowTypeStart:"arrow_open"},{id:S[D].id,label:S[D].label,type:C.typeStr2Type(S[D].typeStr),directions:S[D].directions}];break;case 24:C.getLogger().debug("Rule: nodeStatement (abc88 node size) ",S[D-1],S[D]),this.$={id:S[D-1].id,label:S[D-1].label,type:C.typeStr2Type(S[D-1].typeStr),directions:S[D-1].directions,widthInColumns:parseInt(S[D],10)};break;case 25:C.getLogger().debug("Rule: nodeStatement (node) ",S[D]),this.$={id:S[D].id,label:S[D].label,type:C.typeStr2Type(S[D].typeStr),directions:S[D].directions,widthInColumns:1};break;case 26:C.getLogger().debug("APA123",this?this:"na"),C.getLogger().debug("COLUMNS: ",S[D]),this.$={type:"column-setting",columns:S[D]==="auto"?-1:parseInt(S[D])};break;case 27:C.getLogger().debug("Rule: id-block statement : ",S[D-2],S[D-1]);let F=C.generateId();this.$={...S[D-2],type:"composite",children:S[D-1]};break;case 28:C.getLogger().debug("Rule: blockStatement : ",S[D-2],S[D-1],S[D]);let I=C.generateId();this.$={id:I,type:"composite",label:"",children:S[D-1]};break;case 29:C.getLogger().debug("Rule: node (NODE_ID separator): ",S[D]),this.$={id:S[D]};break;case 30:C.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",S[D-1],S[D]),this.$={id:S[D-1],label:S[D].label,typeStr:S[D].typeStr,directions:S[D].directions};break;case 31:C.getLogger().debug("Rule: dirList: ",S[D]),this.$=[S[D]];break;case 32:C.getLogger().debug("Rule: dirList: ",S[D-1],S[D]),this.$=[S[D-1]].concat(S[D]);break;case 33:C.getLogger().debug("Rule: nodeShapeNLabel: ",S[D-2],S[D-1],S[D]),this.$={typeStr:S[D-2]+S[D],label:S[D-1]};break;case 34:C.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",S[D-3],S[D-2]," #3:",S[D-1],S[D]),this.$={typeStr:S[D-3]+S[D],label:S[D-2],directions:S[D-1]};break;case 35:case 36:this.$={type:"classDef",id:S[D-1].trim(),css:S[D].trim()};break;case 37:this.$={type:"applyClass",id:S[D-1].trim(),styleClass:S[D].trim()};break;case 38:this.$={type:"applyStyles",id:S[D-1].trim(),stylesStr:S[D].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:o,44:l,47:u},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:e,28:r,29:n,31:i,32:a,40:o,44:l,47:u}),t(f,[2,16],{14:22,15:d,16:p}),t(f,[2,17]),t(f,[2,18]),t(f,[2,19]),t(f,[2,20]),t(f,[2,21]),t(f,[2,22]),t(m,[2,25],{27:[1,25]}),t(f,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:o,44:l,47:u},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(g,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},t(m,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:o,44:l,47:u},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(f,[2,28]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{37:[1,47]},{34:48,35:y},{15:[1,50]},t(f,[2,27]),t(g,[2,33]),{39:[1,51]},{34:52,35:y,39:[2,31]},{32:[2,15]},t(g,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:s(function(A,w){if(w.recoverable)this.trace(A);else{var T=new Error(A);throw T.hash=w,T}},"parseError"),parse:s(function(A){var w=this,T=[0],C=[],E=[null],S=[],R=this.table,D="",L=0,P=0,M=0,F=2,I=1,O=S.slice.call(arguments,1),z=Object.create(this.lexer),N={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(N.yy[U]=this.yy[U]);z.setInput(A,N.yy),N.yy.lexer=z,N.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var $=z.yylloc;S.push($);var W=z.options&&z.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(oe){T.length=T.length-2*oe,E.length=E.length-oe,S.length=S.length-oe}s(ee,"popStack");function te(){var oe;return oe=C.pop()||z.lex()||I,typeof oe!="number"&&(oe instanceof Array&&(C=oe,oe=C.pop()),oe=w.symbols_[oe]||oe),oe}s(te,"lex");for(var ce,Z,fe,ne,H,Q,K={},re,ie,ye,j;;){if(fe=T[T.length-1],this.defaultActions[fe]?ne=this.defaultActions[fe]:((ce===null||typeof ce>"u")&&(ce=te()),ne=R[fe]&&R[fe][ce]),typeof ne>"u"||!ne.length||!ne[0]){var De="";j=[];for(re in R[fe])this.terminals_[re]&&re>F&&j.push("'"+this.terminals_[re]+"'");z.showPosition?De="Parse error on line "+(L+1)+`: +`+z.showPosition()+` +Expecting `+j.join(", ")+", got '"+(this.terminals_[ce]||ce)+"'":De="Parse error on line "+(L+1)+": Unexpected "+(ce==I?"end of input":"'"+(this.terminals_[ce]||ce)+"'"),this.parseError(De,{text:z.match,token:this.terminals_[ce]||ce,line:z.yylineno,loc:$,expected:j})}if(ne[0]instanceof Array&&ne.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fe+", token: "+ce);switch(ne[0]){case 1:T.push(ce),E.push(z.yytext),S.push(z.yylloc),T.push(ne[1]),ce=null,Z?(ce=Z,Z=null):(P=z.yyleng,D=z.yytext,L=z.yylineno,$=z.yylloc,M>0&&M--);break;case 2:if(ie=this.productions_[ne[1]][1],K.$=E[E.length-ie],K._$={first_line:S[S.length-(ie||1)].first_line,last_line:S[S.length-1].last_line,first_column:S[S.length-(ie||1)].first_column,last_column:S[S.length-1].last_column},W&&(K._$.range=[S[S.length-(ie||1)].range[0],S[S.length-1].range[1]]),Q=this.performAction.apply(K,[D,P,L,N.yy,ne[1],E,S].concat(O)),typeof Q<"u")return Q;ie&&(T=T.slice(0,-1*ie*2),E=E.slice(0,-1*ie),S=S.slice(0,-1*ie)),T.push(this.productions_[ne[1]][0]),E.push(K.$),S.push(K._$),ye=R[T[T.length-2]][T[T.length-1]],T.push(ye);break;case 3:return!0}}return!0},"parse")},x=function(){var k={EOF:1,parseError:s(function(w,T){if(this.yy.parser)this.yy.parser.parseError(w,T);else throw new Error(w)},"parseError"),setInput:s(function(A,w){return this.yy=w||this.yy||{},this._input=A,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var w=A.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),A},"input"),unput:s(function(A){var w=A.length,T=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1&&(this.yylineno-=T.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===C.length?this.yylloc.first_column:0)+C[C.length-T.length].length-T[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-w]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(A){this.unput(this.match.slice(A))},"less"),pastInput:s(function(){var A=this.matched.substr(0,this.matched.length-this.match.length);return(A.length>20?"...":"")+A.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var A=this.match;return A.length<20&&(A+=this._input.substr(0,20-A.length)),(A.substr(0,20)+(A.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var A=this.pastInput(),w=new Array(A.length+1).join("-");return A+this.upcomingInput()+` +`+w+"^"},"showPosition"),test_match:s(function(A,w){var T,C,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),C=A[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+A[0].length},this.yytext+=A[0],this.match+=A[0],this.matches=A,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(A[0].length),this.matched+=A[0],T=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),T)return T;if(this._backtrack){for(var S in E)this[S]=E[S];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,w,T,C;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),S=0;Sw[0].length)){if(w=T,C=S,this.options.backtrack_lexer){if(A=this.test_match(T,E[S]),A!==!1)return A;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(A=this.test_match(w,E[C]),A!==!1?A:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var w=this.next();return w||this.lex()},"lex"),begin:s(function(w){this.conditionStack.push(w)},"begin"),popState:s(function(){var w=this.conditionStack.length-1;return w>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},"topState"),pushState:s(function(w){this.begin(w)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(w,T,C,E){var S=E;switch(C){case 0:return 10;case 1:return w.getLogger().debug("Found space-block"),31;break;case 2:return w.getLogger().debug("Found nl-block"),31;break;case 3:return w.getLogger().debug("Found space-block"),29;break;case 4:w.getLogger().debug(".",T.yytext);break;case 5:w.getLogger().debug("_",T.yytext);break;case 6:return 5;case 7:return T.yytext=-1,28;break;case 8:return T.yytext=T.yytext.replace(/columns\s+/,""),w.getLogger().debug("COLUMNS (LEX)",T.yytext),28;break;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:w.getLogger().debug("LEX: POPPING STR:",T.yytext),this.popState();break;case 14:return w.getLogger().debug("LEX: STR end:",T.yytext),"STR";break;case 15:return T.yytext=T.yytext.replace(/space\:/,""),w.getLogger().debug("SPACE NUM (LEX)",T.yytext),21;break;case 16:return T.yytext="1",w.getLogger().debug("COLUMNS (LEX)",T.yytext),21;break;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;break;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 22:return this.popState(),this.pushState("CLASSDEFID"),41;break;case 23:return this.popState(),42;break;case 24:return this.pushState("CLASS"),44;break;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;break;case 26:return this.popState(),46;break;case 27:return this.pushState("STYLE_STMNT"),47;break;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;break;case 29:return this.popState(),49;break;case 30:return this.pushState("acc_title"),"acc_title";break;case 31:return this.popState(),"acc_title_value";break;case 32:return this.pushState("acc_descr"),"acc_descr";break;case 33:return this.popState(),"acc_descr_value";break;case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 40:return this.popState(),w.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 41:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 43:return this.popState(),w.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 44:return this.popState(),w.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 45:return this.popState(),w.getLogger().debug("Lex: (("),"NODE_DEND";break;case 46:return this.popState(),w.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 47:return this.popState(),w.getLogger().debug("Lex: ("),"NODE_DEND";break;case 48:return this.popState(),w.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 49:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),w.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 51:return this.popState(),w.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 52:return this.popState(),w.getLogger().debug("Lex: )"),"NODE_DEND";break;case 53:return this.popState(),w.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 54:return this.popState(),w.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 55:return w.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;break;case 56:return w.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;break;case 57:return w.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;break;case 58:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 59:return w.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;break;case 60:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 61:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 62:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 63:return w.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;break;case 64:return w.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;break;case 65:return w.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;break;case 66:return this.pushState("NODE"),36;break;case 67:return this.pushState("NODE"),36;break;case 68:return this.pushState("NODE"),36;break;case 69:return this.pushState("NODE"),36;break;case 70:return this.pushState("NODE"),36;break;case 71:return this.pushState("NODE"),36;break;case 72:return this.pushState("NODE"),36;break;case 73:return w.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;break;case 74:return this.pushState("BLOCK_ARROW"),w.getLogger().debug("LEX ARR START"),38;break;case 75:return w.getLogger().debug("Lex: NODE_ID",T.yytext),32;break;case 76:return w.getLogger().debug("Lex: EOF",T.yytext),8;break;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:w.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:w.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return w.getLogger().debug("LEX: NODE_DESCR:",T.yytext),"NODE_DESCR";break;case 84:w.getLogger().debug("LEX POPPING"),this.popState();break;case 85:w.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (right): dir:",T.yytext),"DIR";break;case 87:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (left):",T.yytext),"DIR";break;case 88:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (x):",T.yytext),"DIR";break;case 89:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (y):",T.yytext),"DIR";break;case 90:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (up):",T.yytext),"DIR";break;case 91:return T.yytext=T.yytext.replace(/^,\s*/,""),w.getLogger().debug("Lex (down):",T.yytext),"DIR";break;case 92:return T.yytext="]>",w.getLogger().debug("Lex (ARROW_DIR end):",T.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 93:return w.getLogger().debug("Lex: LINK","#"+T.yytext+"#"),15;break;case 94:return w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 95:return w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 96:return w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 97:return w.getLogger().debug("Lex: START_LINK",T.yytext),this.pushState("LLABEL"),16;break;case 98:return w.getLogger().debug("Lex: START_LINK",T.yytext),this.pushState("LLABEL"),16;break;case 99:return w.getLogger().debug("Lex: START_LINK",T.yytext),this.pushState("LLABEL"),16;break;case 100:this.pushState("md_string");break;case 101:return w.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 102:return this.popState(),w.getLogger().debug("Lex: LINK","#"+T.yytext+"#"),15;break;case 103:return this.popState(),w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 104:return this.popState(),w.getLogger().debug("Lex: LINK",T.yytext),15;break;case 105:return w.getLogger().debug("Lex: COLON",T.yytext),T.yytext=T.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return k}();v.lexer=x;function b(){this.yy={}}return s(b,"Parser"),b.prototype=v,v.Parser=b,new b}();XP.parser=XP;Pme=XP});function qKe(t){switch(V.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return V.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function WKe(t){switch(V.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}function HKe(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var Dl,KP,jP,Fme,zme,BKe,Gme,FKe,A7,zKe,$Ke,GKe,VKe,Vme,QP,jx,UKe,$me,YKe,XKe,jKe,KKe,QKe,ZKe,JKe,eQe,tQe,rQe,nQe,Ume,qme=_(()=>{"use strict";S9();zs();gt();it();Qt();Ci();Dl=new Map,KP=[],jP=new Map,Fme="color",zme="fill",BKe="bgFill",Gme=",",FKe=le(),A7=new Map,zKe=s(t=>$e.sanitizeText(t,FKe),"sanitizeText"),$Ke=s(function(t,e=""){let r=A7.get(t);r||(r={id:t,styles:[],textStyles:[]},A7.set(t,r)),e?.split(Gme).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Fme).exec(n)){let o=i.replace(zme,BKe).replace(Fme,zme);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),GKe=s(function(t,e=""){let r=Dl.get(t);e!=null&&(r.styles=e.split(Gme))},"addStyle2Node"),VKe=s(function(t,e){t.split(",").forEach(function(r){let n=Dl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Dl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),Vme=s((t,e)=>{let r=t.flat(),n=[];for(let i of r){if(i.label&&(i.label=zKe(i.label)),i.type==="classDef"){$Ke(i.id,i.css);continue}if(i.type==="applyClass"){VKe(i.id,i?.styleClass??"");continue}if(i.type==="applyStyles"){i?.stylesStr&&GKe(i.id,i?.stylesStr);continue}if(i.type==="column-setting")e.columns=i.columns??-1;else if(i.type==="edge"){let a=(jP.get(i.id)??0)+1;jP.set(i.id,a),i.id=a+"-"+i.id,KP.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);let a=Dl.get(i.id);if(a===void 0?Dl.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Vme(i.children,i),i.type==="space"){let o=i.width??1;for(let l=0;l{V.debug("Clear called"),br(),jx={id:"root",type:"composite",children:[],columns:-1},Dl=new Map([["root",jx]]),QP=[],A7=new Map,KP=[],jP=new Map},"clear");s(qKe,"typeStr2Type");s(WKe,"edgeTypeStr2Type");s(HKe,"edgeStrToEdgeData");$me=0,YKe=s(()=>($me++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$me),"generateId"),XKe=s(t=>{jx.children=t,Vme(t,jx),QP=jx.children},"setHierarchy"),jKe=s(t=>{let e=Dl.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),KKe=s(()=>[...Dl.values()],"getBlocksFlat"),QKe=s(()=>QP||[],"getBlocks"),ZKe=s(()=>KP,"getEdges"),JKe=s(t=>Dl.get(t),"getBlock"),eQe=s(t=>{Dl.set(t.id,t)},"setBlock"),tQe=s(()=>console,"getLogger"),rQe=s(function(){return A7},"getClasses"),nQe={getConfig:s(()=>_r().block,"getConfig"),typeStr2Type:qKe,edgeTypeStr2Type:WKe,edgeStrToEdgeData:HKe,getLogger:tQe,getBlocksFlat:KKe,getBlocks:QKe,getEdges:ZKe,setHierarchy:XKe,getBlock:JKe,setBlock:eQe,getColumns:jKe,getClasses:rQe,clear:UKe,generateId:YKe},Ume=nQe});var L7,iQe,Wme,Hme=_(()=>{"use strict";Ho();L7=s((t,e)=>{let r=D1,n=r(t,"r"),i=r(t,"g"),a=r(t,"b");return Fs(n,i,a,e)},"fade"),iQe=s(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span,p { + color: ${t.titleColor}; + } + + + + .label text,span,p { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${L7(t.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${L7(t.mainBkg,.5)}; + fill: ${L7(t.clusterBkg,.5)}; + stroke: ${L7(t.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span,p { + color: ${t.titleColor}; + } + /* .cluster div { + color: ${t.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),Wme=iQe});function aQe(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};let r=e%t,n=Math.floor(e/t);return{px:r,py:n}}function ZP(t,e,r=0,n=0){V.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"sieblingWidth",r),t?.size?.width||(t.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(t.children?.length>0){for(let m of t.children)ZP(m,e);let o=sQe(t);i=o.width,a=o.height,V.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,a);for(let m of t.children)m.size&&(V.debug(`abc95 Setting size of children of ${t.id} id=${m.id} ${i} ${a} ${JSON.stringify(m.size)}`),m.size.width=i*(m.widthInColumns??1)+li*((m.widthInColumns??1)-1),m.size.height=a,m.size.x=0,m.size.y=0,V.debug(`abc95 updating size of ${t.id} children child:${m.id} maxWidth:${i} maxHeight:${a}`));for(let m of t.children)ZP(m,e,i,a);let l=t.columns??-1,u=0;for(let m of t.children)u+=m.widthInColumns??1;let h=t.children.length;l>0&&l0?Math.min(t.children.length,l):t.children.length;if(m>0){let g=(d-m*li-li)/m;V.debug("abc95 (growing to fit) width",t.id,d,t.size?.width,g);for(let y of t.children)y.size&&(y.size.width=g)}}t.size={width:d,height:p,x:0,y:0}}V.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function Yme(t,e){V.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(V.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let n=t?.children[0]?.size?.width??0,i=t.children.length*n+(t.children.length-1)*li;V.debug("widthOfChildren 88",i,"posX");let a=0;V.debug("abc91 block?.size?.x",t.id,t?.size?.x);let o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-li,l=0;for(let u of t.children){let h=t;if(!u.size)continue;let{width:f,height:d}=u.size,{px:p,py:m}=aQe(r,a);if(m!=l&&(l=m,o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-li,V.debug("New row in layout for block",t.id," and child ",u.id,l)),V.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${a} (px, py) ${p},${m} (${h?.size?.x},${h?.size?.y}) parent: ${h.id} width: ${f}${li}`),h.size){let g=f/2;u.size.x=o+li+g,V.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${o} new startingPosX${u.size.x} ${g} padding=${li} width=${f} halfWidth=${g} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(u?.widthInColumns??1)/2}`),o=u.size.x+g,u.size.y=h.size.y-h.size.height/2+m*(d+li)+d/2+li,V.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${o}${li}${g}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2${f*(u?.widthInColumns??1)/2}`)}u.children&&Yme(u,e),a+=u?.widthInColumns??1,V.debug("abc88 columnsPos",u,a)}}V.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function Xme(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){let{x:a,y:o,width:l,height:u}=t.size;a-l/2n&&(n=a+l/2),o+u/2>i&&(i=o+u/2)}if(t.children)for(let a of t.children)({minX:e,minY:r,maxX:n,maxY:i}=Xme(a,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function jme(t){let e=t.getBlock("root");if(!e)return;ZP(e,t,0,0),Yme(e,t),V.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:n,maxX:i,maxY:a}=Xme(e),o=a-n,l=i-r;return{x:r,y:n,width:l,height:o}}var li,sQe,Kme=_(()=>{"use strict";it();gt();li=le()?.block?.padding??8;s(aQe,"calculateBlockPosition");sQe=s(t=>{let e=0,r=0;for(let n of t.children){let{width:i,height:a,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};V.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",o,"y:",l,n.type),n.type!=="space"&&(i>e&&(e=i/(t.widthInColumns??1)),a>r&&(r=a))}return{width:e,height:r}},"getMaxChildSize");s(ZP,"setBlockSizes");s(Yme,"layoutBlocks");s(Xme,"findBounds");s(jme,"layout")});function Qme(t,e,r=!1){let n=t,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=0,o="",l;switch(n.type){case"round":a=5,o="rect";break;case"composite":a=0,o="composite",l=0;break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}let u=Hp(n?.styles??[]),h=n.label,f=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:u.labelStyle,shape:o,labelText:h,rx:a,ry:a,class:i,style:u.style,id:n.id,directions:n.directions,width:f.width,height:f.height,x:f.x,y:f.y,positioned:r,intersect:void 0,type:n.type,padding:l??_r()?.block?.padding??0}}async function oQe(t,e,r){let n=Qme(e,r,!1);if(n.type==="group")return;let i=await Zp(t,n),a=i.node().getBBox(),o=r.getBlock(n.id);o.size={width:a.width,height:a.height,x:0,y:0,node:i},r.setBlock(o),i.remove()}async function lQe(t,e,r){let n=Qme(e,r,!0);r.getBlock(n.id).type!=="space"&&(await Zp(t,n),e.intersect=n?.intersect,nv(n))}async function JP(t,e,r,n){for(let i of e)await n(t,i,r),i.children&&await JP(t,i.children,r,n)}async function Zme(t,e,r){await JP(t,e,r,oQe)}async function Jme(t,e,r){await JP(t,e,r,lQe)}async function ege(t,e,r,n,i){let a=new ir({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let o of r)o.size&&a.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(let o of e)if(o.start&&o.end){let l=n.getBlock(o.start),u=n.getBlock(o.end);if(l?.size&&u?.size){let h=l.size,f=u.size,d=[{x:h.x,y:h.y},{x:h.x+(f.x-h.x)/2,y:h.y+(f.y-h.y)/2},{x:f.x,y:f.y}];aT(t,{v:o.start,w:o.end,name:o.id},{...o,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),o.label&&(await nT(t,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:d,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),iT({...o,x:d[1].x,y:d[1].y},{originalPath:d}))}}}var tge=_(()=>{"use strict";la();zs();zN();r5();pr();s(Qme,"getNodeFromBlock");s(oQe,"calculateBlockSize");s(lQe,"insertBlockPositioned");s(JP,"performOperations");s(Zme,"calculateBlockSizes");s(Jme,"insertBlocks");s(ege,"insertEdges")});var cQe,uQe,rge,nge=_(()=>{"use strict";Xt();zs();FN();it();Un();Kme();tge();cQe=s(function(t,e){return e.db.getClasses()},"getClasses"),uQe=s(async function(t,e,r,n){let{securityLevel:i,block:a}=_r(),o=n.db,l;i==="sandbox"&&(l=Me("#i"+e));let u=i==="sandbox"?Me(l.nodes()[0].contentDocument.body):Me("body"),h=i==="sandbox"?u.select(`[id="${e}"]`):Me(`[id="${e}"]`);Zw(h,["point","circle","cross"],n.type,e);let d=o.getBlocks(),p=o.getBlocksFlat(),m=o.getEdges(),g=h.insert("g").attr("class","block");await Zme(g,d,o);let y=jme(o);if(await Jme(g,d,o),await ege(g,m,p,o,e),y){let v=y,x=Math.max(1,Math.round(.125*(v.width/v.height))),b=v.height+x+10,k=v.width+10,{useMaxWidth:A}=a;xr(h,b,k,!!A),V.debug("Here Bounds",y,v),h.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),rge={draw:uQe,getClasses:cQe}});var ige={};ur(ige,{diagram:()=>hQe});var hQe,age=_(()=>{"use strict";Bme();qme();Hme();nge();hQe={parser:Pme,db:Ume,renderer:rge,styles:Wme}});var bet={};ur(bet,{default:()=>xet});Y7();Mf();var dY="c4",Ywe=s(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Xwe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(fY(),hY));return{id:dY,diagram:t}},"loader"),jwe={id:dY,detector:Ywe,loader:Xwe},pY=jwe;var _te="flowchart",iDe=s((t,e)=>e?.flowchart?.defaultRenderer==="dagre-wrapper"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t),"detector"),aDe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nk(),Ik));return{id:_te,diagram:t}},"loader"),sDe={id:_te,detector:iDe,loader:aDe},Ate=sDe;var Lte="flowchart-v2",oDe=s((t,e)=>e?.flowchart?.defaultRenderer==="dagre-d3"||e?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(t)&&e?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(t),"detector"),lDe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nk(),Ik));return{id:Lte,diagram:t}},"loader"),cDe={id:Lte,detector:oDe,loader:lDe},Dte=cDe;var are="er",FDe=s(t=>/^\s*erDiagram/.test(t),"detector"),zDe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(ire(),nre));return{id:are,diagram:t}},"loader"),$De={id:are,detector:FDe,loader:zDe},sre=$De;var hoe="gitGraph",sOe=s(t=>/^\s*gitGraph/.test(t),"detector"),oOe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(uoe(),coe));return{id:hoe,diagram:t}},"loader"),lOe={id:hoe,detector:sOe,loader:oOe},foe=lOe;var Voe="gantt",jOe=s(t=>/^\s*gantt/.test(t),"detector"),KOe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Goe(),$oe));return{id:Voe,diagram:t}},"loader"),QOe={id:Voe,detector:jOe,loader:KOe},Uoe=QOe;var Zoe="info",nPe=s(t=>/^\s*info/.test(t),"detector"),iPe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Qoe(),Koe));return{id:Zoe,diagram:t}},"loader"),Joe={id:Zoe,detector:nPe,loader:iPe};var cle="pie",yPe=s(t=>/^\s*pie/.test(t),"detector"),vPe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(lle(),ole));return{id:cle,diagram:t}},"loader"),ule={id:cle,detector:yPe,loader:vPe};var Tle="quadrantChart",PPe=s(t=>/^\s*quadrantChart/.test(t),"detector"),BPe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wle(),kle));return{id:Tle,diagram:t}},"loader"),FPe={id:Tle,detector:PPe,loader:BPe},Ele=FPe;var Qle="xychart",eBe=s(t=>/^\s*xychart-beta/.test(t),"detector"),tBe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Kle(),jle));return{id:Qle,diagram:t}},"loader"),rBe={id:Qle,detector:eBe,loader:tBe},Zle=rBe;var pce="requirement",DBe=s(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),RBe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(dce(),fce));return{id:pce,diagram:t}},"loader"),MBe={id:pce,detector:DBe,loader:RBe},mce=MBe;var Vce="sequence",OFe=s(t=>/^\s*sequenceDiagram/.test(t),"detector"),PFe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Gce(),$ce));return{id:Vce,diagram:t}},"loader"),BFe={id:Vce,detector:OFe,loader:PFe},Uce=BFe;var iue="class",yze=s((t,e)=>e?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t),"detector"),vze=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(nue(),rue));return{id:iue,diagram:t}},"loader"),xze={id:iue,detector:yze,loader:vze},aue=xze;var Iue="classDiagram",Hze=s((t,e)=>/^\s*classDiagram/.test(t)&&e?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t),"detector"),Yze=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Mue(),Rue));return{id:Iue,diagram:t}},"loader"),Xze={id:Iue,detector:Hze,loader:Yze},Nue=Xze;var Che="state",U$e=s((t,e)=>e?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t),"detector"),q$e=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ehe(),The));return{id:Che,diagram:t}},"loader"),W$e={id:Che,detector:U$e,loader:q$e},She=W$e;var Lhe="stateDiagram",Y$e=s((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&e?.state?.defaultRenderer==="dagre-wrapper"),"detector"),X$e=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ahe(),_he));return{id:Lhe,diagram:t}},"loader"),j$e={id:Lhe,detector:Y$e,loader:X$e},Dhe=j$e;var Hhe="journey",gGe=s(t=>/^\s*journey/.test(t),"detector"),yGe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Whe(),qhe));return{id:Hhe,diagram:t}},"loader"),vGe={id:Hhe,detector:gGe,loader:yGe},Yhe=vGe;it();p0();Un();var xGe=s((t,e,r)=>{V.debug(`rendering svg for syntax error +`);let n=Bo(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),xr(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),kO={draw:xGe},Xhe=kO;var bGe={db:{},renderer:kO,parser:{parse:s(()=>{},"parse")}},jhe=bGe;var Khe="flowchart-elk",kGe=s((t,e={})=>/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&e?.flowchart?.defaultRenderer==="elk"?(e.layout="elk",!0):!1,"detector"),wGe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Nk(),Ik));return{id:Khe,diagram:t}},"loader"),TGe={id:Khe,detector:kGe,loader:wGe},Qhe=TGe;var Tfe="timeline",VGe=s(t=>/^\s*timeline/.test(t),"detector"),UGe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wfe(),kfe));return{id:Tfe,diagram:t}},"loader"),qGe={id:Tfe,detector:VGe,loader:UGe},Efe=qGe;var Upe="mindmap",Kje=s(t=>/^\s*mindmap/.test(t),"detector"),Qje=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Vpe(),Gpe));return{id:Upe,diagram:t}},"loader"),Zje={id:Upe,detector:Kje,loader:Qje},qpe=Zje;var Tme="sankey",bKe=s(t=>/^\s*sankey-beta/.test(t),"detector"),kKe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(wme(),kme));return{id:Tme,diagram:t}},"loader"),wKe={id:Tme,detector:bKe,loader:kKe},Eme=wKe;var Nme="packet",OKe=s(t=>/^\s*packet-beta/.test(t),"detector"),PKe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(Ime(),Mme));return{id:Nme,diagram:t}},"loader"),Ome={id:Nme,detector:OKe,loader:PKe};var sge="block",fQe=s(t=>/^\s*block-beta/.test(t),"detector"),dQe=s(async()=>{let{diagram:t}=await Promise.resolve().then(()=>(age(),ige));return{id:sge,diagram:t}},"loader"),pQe={id:sge,detector:fQe,loader:dQe},oge=pQe;Mf();gt();var lge=!1,o1=s(()=>{lge||(lge=!0,Gf("error",jhe,t=>t.toLowerCase().trim()==="error"),Gf("---",{db:{clear:s(()=>{},"clear")},styles:{},renderer:{draw:s(()=>{},"draw")},parser:{parse:s(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:s(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),fb(pY,Nue,aue,sre,Uoe,Joe,ule,mce,Uce,Qhe,Dte,Ate,qpe,Efe,foe,Dhe,She,Yhe,Ele,Eme,Ome,Zle,oge))},"addDiagrams");it();Mf();gt();var cge=s(async()=>{V.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Rf).map(async([r,{detector:n,loader:i}])=>{if(i)try{W1(r)}catch{try{let{diagram:a,id:o}=await i();Gf(o,a,n)}catch(a){throw V.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Rf[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){V.error(`Failed to load ${e.length} external diagrams`);for(let r of e)V.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams");it();Xt();var D7="comm",R7="rule",M7="decl";var uge="@import";var hge="@keyframes";var fge="@layer";var eB=Math.abs,Kx=String.fromCharCode;function I7(t){return t.trim()}s(I7,"trim");function Qx(t,e,r){return t.replace(e,r)}s(Qx,"replace");function dge(t,e,r){return t.indexOf(e,r)}s(dge,"indexof");function G0(t,e){return t.charCodeAt(e)|0}s(G0,"charat");function V0(t,e,r){return t.slice(e,r)}s(V0,"substr");function Uo(t){return t.length}s(Uo,"strlen");function pge(t){return t.length}s(pge,"sizeof");function l1(t,e){return e.push(t),t}s(l1,"append");var N7=1,c1=1,mge=0,qo=0,gi=0,u1="";function O7(t,e,r,n,i,a,o,l){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:N7,column:c1,length:o,return:"",siblings:l}}s(O7,"node");function gge(){return gi}s(gge,"char");function yge(){return gi=qo>0?G0(u1,--qo):0,c1--,gi===10&&(c1=1,N7--),gi}s(yge,"prev");function Wo(){return gi=qo2||tB(gi)>3?"":" "}s(bge,"whitespace");function kge(t,e){for(;--e&&Wo()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return P7(t,Zx()+(e<6&&Ef()==32&&Wo()==32))}s(kge,"escaping");function rB(t){for(;Wo();)switch(gi){case t:return qo;case 34:case 39:t!==34&&t!==39&&rB(gi);break;case 40:t===41&&rB(t);break;case 92:Wo();break}return qo}s(rB,"delimiter");function wge(t,e){for(;Wo()&&t+gi!==57;)if(t+gi===84&&Ef()===47)break;return"/*"+P7(e,qo-1)+"*"+Kx(t===47?t:Wo())}s(wge,"commenter");function Tge(t){for(;!tB(Ef());)Wo();return P7(t,qo)}s(Tge,"identifier");function Sge(t){return xge(F7("",null,null,null,[""],t=vge(t),0,[0],t))}s(Sge,"compile");function F7(t,e,r,n,i,a,o,l,u){for(var h=0,f=0,d=o,p=0,m=0,g=0,y=1,v=1,x=1,b=0,k="",A=i,w=a,T=n,C=k;v;)switch(g=b,b=Wo()){case 40:if(g!=108&&G0(C,d-1)==58){dge(C+=Qx(B7(b),"&","&\f"),"&\f",eB(h?l[h-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:C+=B7(b);break;case 9:case 10:case 13:case 32:C+=bge(g);break;case 92:C+=kge(Zx()-1,7);continue;case 47:switch(Ef()){case 42:case 47:l1(mQe(wge(Wo(),Zx()),e,r,u),u);break;default:C+="/"}break;case 123*y:l[h++]=Uo(C)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+f:x==-1&&(C=Qx(C,/\f/g,"")),m>0&&Uo(C)-d&&l1(m>32?Cge(C+";",n,r,d-1,u):Cge(Qx(C," ","")+";",n,r,d-2,u),u);break;case 59:C+=";";default:if(l1(T=Ege(C,e,r,h,f,i,l,k,A=[],w=[],d,a),a),b===123)if(f===0)F7(C,e,T,T,A,a,d,l,w);else switch(p===99&&G0(C,3)===110?100:p){case 100:case 108:case 109:case 115:F7(t,T,T,n&&l1(Ege(t,T,T,0,0,i,l,k,i,A=[],d,w),w),i,w,d,l,n?A:w);break;default:F7(C,T,T,T,[""],w,0,l,w)}}h=f=m=0,y=x=1,k=C="",d=o;break;case 58:d=1+Uo(C),m=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&yge()==125)continue}switch(C+=Kx(b),b*y){case 38:x=f>0?1:(C+="\f",-1);break;case 44:l[h++]=(Uo(C)-1)*x,x=1;break;case 64:Ef()===45&&(C+=B7(Wo())),p=Ef(),f=d=Uo(k=C+=Tge(Zx())),b++;break;case 45:g===45&&Uo(C)==2&&(y=0)}}return a}s(F7,"parse");function Ege(t,e,r,n,i,a,o,l,u,h,f,d){for(var p=i-1,m=i===0?a:[""],g=pge(m),y=0,v=0,x=0;y0?m[b]+" "+k:Qx(k,/&\f/g,m[b])))&&(u[x++]=A);return O7(t,e,r,i===0?R7:l,u,h,f,d)}s(Ege,"ruleset");function mQe(t,e,r,n){return O7(t,e,r,D7,Kx(gge()),V0(t,2,-2),0,n)}s(mQe,"comment");function Cge(t,e,r,n,i){return O7(t,e,r,M7,V0(t,0,n),V0(t,n+1,-1),n,i)}s(Cge,"declaration");function z7(t,e){for(var r="",n=0;n{Age.forEach(t=>{t()}),Age=[]},"attachFunctions");it();lC();xb();var _1e=ka(yE(),1);Qt();mk();var gQe="graphics-document document";function Dge(t,e){t.attr("role",gQe),e!==""&&t.attr("aria-roledescription",e)}s(Dge,"setA11yDiagramInfo");function Rge(t,e,r,n){if(t.insert!==void 0){if(r){let i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){let i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}s(Rge,"addSVGa11yTitleDescription");var Mge=s(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");hb();function Xge(t){return typeof t>"u"||t===null}s(Xge,"isNothing");function yQe(t){return typeof t=="object"&&t!==null}s(yQe,"isObject");function vQe(t){return Array.isArray(t)?t:Xge(t)?[]:[t]}s(vQe,"toArray");function xQe(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;rl&&(a=" ... ",e=n-l+a.length),r-n>l&&(o=" ...",r=n+l-o.length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:n-e+a.length}}s(nB,"getLine");function iB(t,e){return Fi.repeat(" ",e-t.length)+t}s(iB,"padStart");function AQe(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,o=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var l="",u,h,f=Math.min(t.line+e.linesAfter,i.length).toString().length,d=e.maxLength-(e.indent+f+3);for(u=1;u<=e.linesBefore&&!(o-u<0);u++)h=nB(t.buffer,n[o-u],i[o-u],t.position-(n[o]-n[o-u]),d),l=Fi.repeat(" ",e.indent)+iB((t.line-u+1).toString(),f)+" | "+h.str+` +`+l;for(h=nB(t.buffer,n[o],i[o],t.position,d),l+=Fi.repeat(" ",e.indent)+iB((t.line+1).toString(),f)+" | "+h.str+` +`,l+=Fi.repeat("-",e.indent+f+3+h.pos)+`^ +`,u=1;u<=e.linesAfter&&!(o+u>=i.length);u++)h=nB(t.buffer,n[o+u],i[o+u],t.position-(n[o]-n[o+u]),d),l+=Fi.repeat(" ",e.indent)+iB((t.line+u+1).toString(),f)+" | "+h.str+` +`;return l.replace(/\n$/,"")}s(AQe,"makeSnippet");var LQe=AQe,DQe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],RQe=["scalar","sequence","mapping"];function MQe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}s(MQe,"compileStyleAliases");function IQe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(DQe.indexOf(r)===-1)throw new Ns('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=MQe(e.styleAliases||null),RQe.indexOf(this.kind)===-1)throw new Ns('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}s(IQe,"Type$1");var Na=IQe;function Ige(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,o){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=o)}),r[i]=n}),r}s(Ige,"compileList");function NQe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(s(n,"collectType"),e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:s(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:s(function(t){return t.toString(10)},"decimal"),hexadecimal:s(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),tZe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function rZe(t){return!(t===null||!tZe.test(t)||t[t.length-1]==="_")}s(rZe,"resolveYamlFloat");function nZe(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}s(nZe,"constructYamlFloat");var iZe=/^[-+]?[0-9]+e/;function aZe(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fi.isNegativeZero(t))return"-0.0";return r=t.toString(10),iZe.test(r)?r.replace("e",".e"):r}s(aZe,"representYamlFloat");function sZe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Fi.isNegativeZero(t))}s(sZe,"isFloat");var oZe=new Na("tag:yaml.org,2002:float",{kind:"scalar",resolve:rZe,construct:nZe,predicate:sZe,represent:aZe,defaultStyle:"lowercase"}),Kge=zQe.extend({implicit:[UQe,YQe,eZe,oZe]}),lZe=Kge,Qge=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zge=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function cZe(t){return t===null?!1:Qge.exec(t)!==null||Zge.exec(t)!==null}s(cZe,"resolveYamlTimestamp");function uZe(t){var e,r,n,i,a,o,l,u=0,h=null,f,d,p;if(e=Qge.exec(t),e===null&&(e=Zge.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],o=+e[5],l=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(f=+e[10],d=+(e[11]||0),h=(f*60+d)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,i,a,o,l,u)),h&&p.setTime(p.getTime()-h),p}s(uZe,"constructYamlTimestamp");function hZe(t){return t.toISOString()}s(hZe,"representYamlTimestamp");var fZe=new Na("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:cZe,construct:uZe,instanceOf:Date,represent:hZe});function dZe(t){return t==="<<"||t===null}s(dZe,"resolveYamlMerge");var pZe=new Na("tag:yaml.org,2002:merge",{kind:"scalar",resolve:dZe}),hB=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function mZe(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=hB;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}s(mZe,"resolveYamlBinary");function gZe(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=hB,o=0,l=[];for(e=0;e>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):r===18?(l.push(o>>10&255),l.push(o>>2&255)):r===12&&l.push(o>>4&255),new Uint8Array(l)}s(gZe,"constructYamlBinary");function yZe(t){var e="",r=0,n,i,a=t.length,o=hB;for(n=0;n>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}s(yZe,"representYamlBinary");function vZe(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}s(vZe,"isBinary");var xZe=new Na("tag:yaml.org,2002:binary",{kind:"scalar",resolve:mZe,construct:gZe,predicate:vZe,represent:yZe}),bZe=Object.prototype.hasOwnProperty,kZe=Object.prototype.toString;function wZe(t){if(t===null)return!0;var e=[],r,n,i,a,o,l=t;for(r=0,n=l.length;r>10)+55296,(t-65536&1023)+56320)}s($Ze,"charFromCodepoint");var i1e=new Array(256),a1e=new Array(256);for(U0=0;U0<256;U0++)i1e[U0]=Pge(U0)?1:0,a1e[U0]=Pge(U0);var U0;function GZe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Jge,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}s(GZe,"State$1");function s1e(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=LQe(r),new Ns(e,r)}s(s1e,"generateError");function Lt(t,e){throw s1e(t,e)}s(Lt,"throwError");function V7(t,e){t.onWarning&&t.onWarning.call(null,s1e(t,e))}s(V7,"throwWarning");var Bge={YAML:s(function(e,r,n){var i,a,o;e.version!==null&&Lt(e,"duplication of %YAML directive"),n.length!==1&&Lt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Lt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&&Lt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&V7(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(e,r,n){var i,a;n.length!==2&&Lt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],r1e.test(i)||Lt(e,"ill-formed tag handle (first argument) of the TAG directive"),Sf.call(e.tagMap,i)&&Lt(e,'there is a previously declared suffix for "'+i+'" tag handle'),n1e.test(a)||Lt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Lt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function Cf(t,e,r,n){var i,a,o,l;if(e1&&(t.result+=Fi.repeat(` +`,e-1))}s(dB,"writeFoldedLines");function VZe(t,e,r){var n,i,a,o,l,u,h,f,d=t.kind,p=t.result,m;if(m=t.input.charCodeAt(t.position),Os(m)||d1(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=t.input.charCodeAt(t.position+1),Os(i)||r&&d1(i)))return!1;for(t.kind="scalar",t.result="",a=o=t.position,l=!1;m!==0;){if(m===58){if(i=t.input.charCodeAt(t.position+1),Os(i)||r&&d1(i))break}else if(m===35){if(n=t.input.charCodeAt(t.position-1),Os(n))break}else{if(t.position===t.lineStart&&W7(t)||r&&d1(m))break;if(Bc(m))if(u=t.line,h=t.lineStart,f=t.lineIndent,yi(t,!1,-1),t.lineIndent>=e){l=!0,m=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=u,t.lineStart=h,t.lineIndent=f;break}}l&&(Cf(t,a,o,!1),dB(t,t.line-u),a=o=t.position,l=!1),q0(m)||(o=t.position+1),m=t.input.charCodeAt(++t.position)}return Cf(t,a,o,!1),t.result?!0:(t.kind=d,t.result=p,!1)}s(VZe,"readPlainScalar");function UZe(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Cf(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Bc(r)?(Cf(t,n,i,!0),dB(t,yi(t,!1,e)),n=i=t.position):t.position===t.lineStart&&W7(t)?Lt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Lt(t,"unexpected end of the stream within a single quoted scalar")}s(UZe,"readSingleQuotedScalar");function qZe(t,e){var r,n,i,a,o,l;if(l=t.input.charCodeAt(t.position),l!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(l=t.input.charCodeAt(t.position))!==0;){if(l===34)return Cf(t,r,t.position,!0),t.position++,!0;if(l===92){if(Cf(t,r,t.position,!0),l=t.input.charCodeAt(++t.position),Bc(l))yi(t,!1,e);else if(l<256&&i1e[l])t.result+=a1e[l],t.position++;else if((o=FZe(l))>0){for(i=o,a=0;i>0;i--)l=t.input.charCodeAt(++t.position),(o=BZe(l))>=0?a=(a<<4)+o:Lt(t,"expected hexadecimal character");t.result+=$Ze(a),t.position++}else Lt(t,"unknown escape sequence");r=n=t.position}else Bc(l)?(Cf(t,r,n,!0),dB(t,yi(t,!1,e)),r=n=t.position):t.position===t.lineStart&&W7(t)?Lt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Lt(t,"unexpected end of the stream within a double quoted scalar")}s(qZe,"readDoubleQuotedScalar");function WZe(t,e){var r=!0,n,i,a,o=t.tag,l,u=t.anchor,h,f,d,p,m,g=Object.create(null),y,v,x,b;if(b=t.input.charCodeAt(t.position),b===91)f=93,m=!1,l=[];else if(b===123)f=125,m=!0,l={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=l),b=t.input.charCodeAt(++t.position);b!==0;){if(yi(t,!0,e),b=t.input.charCodeAt(t.position),b===f)return t.position++,t.tag=o,t.anchor=u,t.kind=m?"mapping":"sequence",t.result=l,!0;r?b===44&&Lt(t,"expected the node content, but found ','"):Lt(t,"missed comma between flow collection entries"),v=y=x=null,d=p=!1,b===63&&(h=t.input.charCodeAt(t.position+1),Os(h)&&(d=p=!0,t.position++,yi(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,m1(t,e,$7,!1,!0),v=t.tag,y=t.result,yi(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===n)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),yi(t,!0,e),m1(t,e,$7,!1,!0),x=t.result),m?p1(t,l,g,v,y,x,n,i,a):d?l.push(p1(t,null,g,v,y,x,n,i,a)):l.push(y),yi(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}Lt(t,"unexpected end of the stream within a flow collection")}s(WZe,"readFlowCollection");function HZe(t,e){var r,n,i=aB,a=!1,o=!1,l=e,u=0,h=!1,f,d;if(d=t.input.charCodeAt(t.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)aB===i?i=d===43?Nge:IZe:Lt(t,"repeat of a chomping mode identifier");else if((f=zZe(d))>=0)f===0?Lt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Lt(t,"repeat of an indentation width identifier"):(l=e+f-1,o=!0);else break;if(q0(d)){do d=t.input.charCodeAt(++t.position);while(q0(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Bc(d)&&d!==0)}for(;d!==0;){for(fB(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!o||t.lineIndentl&&(l=t.lineIndent),Bc(d)){u++;continue}if(t.lineIndente)&&u!==0)Lt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(v&&(o=t.line,l=t.lineStart,u=t.position),m1(t,e,G7,!0,i)&&(v?g=t.result:y=t.result),v||(p1(t,d,p,m,g,y,o,l,u),m=g=y=null),yi(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)Lt(t,"bad indentation of a mapping entry");else if(t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndente?u=1:t.lineIndent===e?u=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),d=0,p=t.implicitTypes.length;d"),t.result!==null&&g.kind!==t.kind&&Lt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Lt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||f}s(m1,"composeNode");function QZe(t){var e=t.position,r,n,i,a=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(yi(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(a=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!Os(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Lt(t,"directive name must not be less than one character in length");o!==0;){for(;q0(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Bc(o));break}if(Bc(o))break;for(r=t.position;o!==0&&!Os(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&fB(t),Sf.call(Bge,n)?Bge[n](t,n,i):V7(t,'unknown document directive "'+n+'"')}if(yi(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,yi(t,!0,-1)):a&&Lt(t,"directives end mark is expected"),m1(t,t.lineIndent-1,G7,!1,!0),yi(t,!0,-1),t.checkLineBreaks&&OZe.test(t.input.slice(e,t.position))&&V7(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&W7(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,yi(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=o1e(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}s(Jx,"codePointAt");function g1e(t){var e=/^\n* /;return e.test(t)}s(g1e,"needIndentIndicator");var y1e=1,cB=2,v1e=3,x1e=4,f1=5;function _Je(t,e,r,n,i,a,o,l){var u,h=0,f=null,d=!1,p=!1,m=n!==-1,g=-1,y=CJe(Jx(t,0))&&SJe(Jx(t,t.length-1));if(e||o)for(u=0;u=65536?u+=2:u++){if(h=Jx(t,u),!nb(h))return f1;y=y&&Vge(h,f,l),f=h}else{for(u=0;u=65536?u+=2:u++){if(h=Jx(t,u),h===tb)d=!0,m&&(p=p||u-g-1>n&&t[g+1]!==" ",g=u);else if(!nb(h))return f1;y=y&&Vge(h,f,l),f=h}p=p||m&&u-g-1>n&&t[g+1]!==" "}return!d&&!p?y&&!o&&!i(t)?y1e:a===rb?f1:cB:r>9&&g1e(t)?f1:o?a===rb?f1:cB:p?x1e:v1e}s(_Je,"chooseScalarStyle");function AJe(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===rb?'""':"''";if(!t.noCompatMode&&(vJe.indexOf(e)!==-1||xJe.test(e)))return t.quotingType===rb?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return EJe(t,h)}switch(s(u,"testAmbiguity"),_Je(e,l,t.indent,o,u,t.quotingType,t.forceQuotes&&!n,i)){case y1e:return e;case cB:return"'"+e.replace(/'/g,"''")+"'";case v1e:return"|"+Uge(e,t.indent)+qge($ge(e,a));case x1e:return">"+Uge(e,t.indent)+qge($ge(LJe(e,o),a));case f1:return'"'+DJe(e)+'"';default:throw new Ns("impossible error: invalid scalar style")}}()}s(AJe,"writeScalar");function Uge(t,e){var r=g1e(t)?String(e):"",n=t[t.length-1]===` +`,i=n&&(t[t.length-2]===` +`||t===` +`),a=i?"+":n?"":"-";return r+a+` +`}s(Uge,"blockHeader");function qge(t){return t[t.length-1]===` +`?t.slice(0,-1):t}s(qge,"dropEndingNewline");function LJe(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=t.indexOf(` +`);return h=h!==-1?h:t.length,r.lastIndex=h,Wge(t.slice(0,h),e)}(),i=t[0]===` +`||t[0]===" ",a,o;o=r.exec(t);){var l=o[1],u=o[2];a=u[0]===" ",n+=l+(!i&&!a&&u!==""?` +`:"")+Wge(u,e),i=a}return n}s(LJe,"foldString");function Wge(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,o=0,l=0,u="";n=r.exec(t);)l=n.index,l-i>e&&(a=o>i?o:l,u+=` +`+t.slice(i,a),i=a+1),o=l;return u+=` +`,t.length-i>e&&o>i?u+=t.slice(i,o)+` +`+t.slice(o+1):u+=t.slice(i),u.slice(1)}s(Wge,"foldLine");function DJe(t){for(var e="",r=0,n,i=0;i=65536?i+=2:i++)r=Jx(t,i),n=Oa[r],!n&&nb(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||kJe(r);return e}s(DJe,"escapeString");function RJe(t,e,r){var n="",i=t.tag,a,o,l;for(a=0,o=r.length;a"u"&&Ku(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}s(RJe,"writeFlowSequence");function Hge(t,e,r,n){var i="",a=t.tag,o,l,u;for(o=0,l=r.length;o"u"&&Ku(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=lB(t,e)),t.dump&&tb===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}s(Hge,"writeBlockSequence");function MJe(t,e,r){var n="",i=t.tag,a=Object.keys(r),o,l,u,h,f;for(o=0,l=a.length;o1024&&(f+="? "),f+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ku(t,e,h,!1,!1)&&(f+=t.dump,n+=f));t.tag=i,t.dump="{"+n+"}"}s(MJe,"writeFlowMapping");function IJe(t,e,r,n){var i="",a=t.tag,o=Object.keys(r),l,u,h,f,d,p;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Ns("sortKeys must be a boolean or a function");for(l=0,u=o.length;l1024,d&&(t.dump&&tb===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=lB(t,e)),Ku(t,e+1,f,!0,d)&&(t.dump&&tb===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,i+=p));t.tag=a,t.dump=i||"{}"}s(IJe,"writeBlockMapping");function Yge(t,e,r){var n,i,a,o,l,u;for(i=r?t.explicitTypes:t.implicitTypes,a=0,o=i.length;a tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}s(Yge,"detectType");function Ku(t,e,r,n,i,a,o){t.tag=null,t.dump=r,Yge(t,r,!1)||Yge(t,r,!0);var l=c1e.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var f=l==="[object Object]"||l==="[object Array]",d,p;if(f&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(i=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(f&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),l==="[object Object]")n&&Object.keys(t.dump).length!==0?(IJe(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(MJe(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?Hge(t,e-1,t.dump,i):Hge(t,e,t.dump,i),p&&(t.dump="&ref_"+d+t.dump)):(RJe(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(l==="[object String]")t.tag!=="?"&&AJe(t,t.dump,e,a,u);else{if(l==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Ns("unacceptable kind of an object to dump "+l)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}s(Ku,"writeNode");function NJe(t,e){var r=[],n=[],i,a;for(uB(t,r,n),i=0,a=n.length;it.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),$Je=s(t=>{let{text:e,metadata:r}=w1e(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),GJe=s(t=>{let e=dt.detectInit(t)??{},r=dt.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(e.wrap=!0),{text:eY(t),directive:e}},"processDirectives");function gB(t){let e=zJe(t),r=$Je(e),n=GJe(r.text),i=ms(r.config,n.directive);return t=Mge(n.text),{code:t,title:r.title,config:i}}s(gB,"preprocessDiagram");pr();function T1e(t){let e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}s(T1e,"toBase64");Y0();var VJe=5e4,UJe="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",qJe="sandbox",WJe="loose",HJe="http://www.w3.org/2000/svg",YJe="http://www.w3.org/1999/xlink",XJe="http://www.w3.org/1999/xhtml",jJe="100%",KJe="100%",QJe="border:0;margin:0;",ZJe="margin:0",JJe="allow-top-navigation-by-user-activation allow-popups",eet='The "iframe" tag is not supported by your browser.',tet=["foreignobject"],ret=["dominant-baseline"];function A1e(t){let e=gB(t);return I1(),CF(e.config??{}),e}s(A1e,"processAndSetConfigs");async function net(t,e){o1();try{let{code:r}=A1e(t);return{diagramType:(await L1e(r)).type}}catch(r){if(e?.suppressErrors)return!1;throw r}}s(net,"parse");var E1e=s((t,e,r=[])=>` +.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),iet=s((t,e=new Map)=>{let r="";if(t.themeCSS!==void 0&&(r+=` +${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` +:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){let o=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{Vt(l.styles)||o.forEach(u=>{r+=E1e(l.id,u,l.styles)}),Vt(l.textStyles)||(r+=E1e(l.id,"tspan",(l?.textStyles||[]).map(u=>u.replace("color","fill"))))})}return r},"createCssStyles"),aet=s((t,e,r,n)=>{let i=iet(t,r),a=s$(e,i,t.themeVariables);return z7(Sge(`${n}{${a}}`),_ge)},"createUserStyles"),set=s((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Ys(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),oet=s((t="",e)=>{let r=e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":KJe,n=T1e(`${t}`);return``},"putIntoIFrame"),C1e=s((t,e,r,n,i)=>{let a=t.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",HJe);return i&&o.attr("xmlns:xlink",i),o.append("g"),t},"appendDivSvgG");function S1e(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(S1e,"sandboxedIframe");var cet=s((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),uet=s(async function(t,e,r){o1();let n=A1e(e);e=n.code;let i=_r();V.debug(i),e.length>(i?.maxTextSize??VJe)&&(e=UJe);let a="#"+t,o="i"+t,l="#"+o,u="d"+t,h="#"+u,f=s(()=>{let P=Me(p?l:h).node();P&&"remove"in P&&P.remove()},"removeTempElements"),d=Me("body"),p=i.securityLevel===qJe,m=i.securityLevel===WJe,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let L=S1e(Me(r),o);d=Me(L.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=Me(r);C1e(d,t,u,`font-family: ${g}`,YJe)}else{if(cet(document,t,u,o),p){let L=S1e(Me("body"),o);d=Me(L.nodes()[0].contentDocument.body),d.node().style.margin=0}else d=Me("body");C1e(d,t,u)}let y,v;try{y=await h1.fromText(e,{title:n.title})}catch(L){if(i.suppressErrorRendering)throw f(),L;y=await h1.fromText("error"),v=L}let x=d.select(h).node(),b=y.type,k=x.firstChild,A=k.firstChild,w=y.renderer.getClasses?.(e,y),T=aet(i,b,w,a),C=document.createElement("style");C.innerHTML=T,k.insertBefore(C,A);try{await y.renderer.draw(e,t,X2,y)}catch(L){throw i.suppressErrorRendering?f():Xhe.draw(e,t,X2),L}let E=d.select(`${h} svg`),S=y.db.getAccTitle?.(),R=y.db.getAccDescription?.();fet(b,E,S,R),d.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",XJe);let D=d.select(h).node().innerHTML;if(V.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),D=set(D,p,hr(i.arrowMarkerAbsolute)),p){let L=d.select(h+" svg").node();D=oet(D,L)}else m||(D=_1e.default.sanitize(D,{ADD_TAGS:tet,ADD_ATTR:ret}));if(Lge(),v)throw v;return f(),{diagramType:b,svg:D,bindFunctions:y.db.bindFunctions}},"render");function het(t={}){let e=An({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),wF(e),e?.theme&&e.theme in po?e.themeVariables=po[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=po.default.getThemeVariables(e.themeVariables));let r=typeof e=="object"?dE(e):pE();E1(r.logLevel),o1()}s(het,"initialize");var L1e=s((t,e={})=>{let{code:r}=gB(t);return h1.fromText(r,e)},"getDiagramFromText");function fet(t,e,r,n){Dge(e,t),Rge(e,r,n,e.attr("id"))}s(fet,"addA11yInfo");var _f=Object.freeze({render:uet,parse:net,getDiagramFromText:L1e,initialize:het,getConfig:_r,setConfig:kb,getSiteConfig:pE,updateSiteConfig:TF,reset:s(()=>{I1()},"reset"),globalReset:s(()=>{I1(ih)},"globalReset"),defaultConfig:ih});E1(_r().logLevel);I1(_r());Rk();pr();var det=s((t,e,r)=>{V.warn(t),fA(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),D1e=s(async function(t={querySelector:".mermaid"}){try{await pet(t)}catch(e){if(fA(e)&&V.error(e.str),Qu.parseError&&Qu.parseError(e),!t.suppressErrors)throw V.error("Use the suppressErrors option to suppress these errors"),e}},"run"),pet=s(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){let n=_f.getConfig();V.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");V.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(V.debug("Start On Load: "+n?.startOnLoad),_f.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new dt.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){V.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=lb(dt.entityDecode(o)).trim().replace(//gi,"
    ");let f=dt.detectInit(o);f&&V.debug("Detected early reinit: ",f);try{let{svg:d,bindFunctions:p}=await N1e(h,o,u);u.innerHTML=d,t&&await t(h),p&&p(u)}catch(d){det(d,l,Qu.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),R1e=s(function(t){_f.initialize(t)},"initialize"),met=s(async function(t,e,r){V.warn("mermaid.init is deprecated. Please use run instead."),t&&R1e(t);let n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await D1e(n)},"init"),get=s(async(t,{lazyLoad:e=!0}={})=>{o1(),fb(...t),e===!1&&await cge()},"registerExternalDiagrams"),M1e=s(function(){if(Qu.startOnLoad){let{startOnLoad:t}=_f.getConfig();t&&Qu.run().catch(e=>V.error("Mermaid failed to initialize",e))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",M1e,!1)}var yet=s(function(t){Qu.parseError=t},"setParseErrorHandler"),H7=[],yB=!1,I1e=s(async()=>{if(!yB){for(yB=!0;H7.length>0;){let t=H7.shift();if(t)try{await t()}catch(e){V.error("Error executing queue",e)}}yB=!1}},"executeQueue"),vet=s(async(t,e)=>new Promise((r,n)=>{let i=s(()=>new Promise((a,o)=>{_f.parse(t,e).then(l=>{a(l),r(l)},l=>{V.error("Error parsing",l),Qu.parseError?.(l),o(l),n(l)})}),"performCall");H7.push(i),I1e().catch(n)}),"parse"),N1e=s((t,e,r)=>new Promise((n,i)=>{let a=s(()=>new Promise((o,l)=>{_f.render(t,e,r).then(u=>{o(u),n(u)},u=>{V.error("Error parsing",u),Qu.parseError?.(u),l(u),i(u)})}),"performCall");H7.push(a),I1e().catch(i)}),"render"),Qu={startOnLoad:!0,mermaidAPI:_f,parse:vet,render:N1e,init:met,run:D1e,registerExternalDiagrams:get,registerLayoutLoaders:SL,initialize:R1e,parseError:void 0,contentLoaded:M1e,setParseErrorHandler:yet,detectType:H0},xet=Qu;return V1e(bet);})(); +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ +/*! Bundled license information: + +dompurify/dist/purify.js: + (*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE *) + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +cytoscape/dist/cytoscape.esm.mjs: + (*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + *) + (*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + *) + (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) + (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) +*/ +globalThis.mermaid = globalThis.__esbuild_esm_mermaid.default; diff --git a/doc/_static/js/mermaid.min.js.map b/doc/_static/js/mermaid.min.js.map new file mode 100644 index 000000000..cb7008c01 --- /dev/null +++ b/doc/_static/js/mermaid.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/src/index.ts", "../../../node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/dayjs.min.js", "../src/logger.ts", "../src/diagram-api/regexes.ts", "../src/errors.ts", "../src/diagram-api/detectType.ts", "../src/diagrams/c4/parser/c4Diagram.jison", "../src/assignWithDepth.ts", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/channel.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/lang.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/unit.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/index.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/constants.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/type.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/index.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/reusable.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/hex.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/hsl.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/keyword.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/rgb.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/index.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/change.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/rgba.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/channel.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/luminance.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/is_light.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/is_dark.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/adjust_channel.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/lighten.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/darken.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/adjust.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/mix.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/invert.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/index.js", "../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/index.js", "../src/themes/erDiagram-oldHardcodedValues.ts", "../src/themes/theme-helpers.js", "../src/themes/theme-base.js", "../src/themes/theme-dark.js", "../src/themes/theme-default.js", "../src/themes/theme-forest.js", "../src/themes/theme-neutral.js", "../src/themes/index.js", "../src/schemas/config.schema.yaml", "../src/defaultConfig.ts", "../src/utils/sanitizeDirective.ts", "../src/config.ts", "../../../node_modules/.pnpm/dompurify@3.1.6/node_modules/dompurify/src/utils.js", "../../../node_modules/.pnpm/dompurify@3.1.6/node_modules/dompurify/src/tags.js", "../../../node_modules/.pnpm/dompurify@3.1.6/node_modules/dompurify/src/attrs.js", "../../../node_modules/.pnpm/dompurify@3.1.6/node_modules/dompurify/src/regexp.js", "../../../node_modules/.pnpm/dompurify@3.1.6/node_modules/dompurify/src/purify.js", "../../../node_modules/.pnpm/katex@0.16.11/node_modules/katex/dist/katex.mjs", "../src/diagrams/common/common.ts", "../src/setupGraphViewbox.js", "../src/styles.ts", "../src/diagrams/common/commonDb.ts", "../src/diagram-api/diagramAPI.ts", "../src/diagrams/c4/c4Db.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/descending.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js", "../../../node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/range.js", "../../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/index.js", "../../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/identity.js", "../../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js", "../../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/index.js", "../../../node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js", "../../../node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/index.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js", "../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/index.js", "../../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/index.js", "../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js", "../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js", "../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/math.js", "../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/lab.js", "../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/index.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basis.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basisClosed.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/round.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/hcl.js", "../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/index.js", "../../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js", "../../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js", "../../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/index.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js", "../../../node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js", "../../../node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/index.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js", "../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/index.js", "../../../node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/constant.js", "../../../node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/event.js", "../../../node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/noevent.js", "../../../node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/brush.js", "../../../node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/index.js", "../../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js", "../../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/index.js", "../../../node_modules/.pnpm/d3-chord@3.0.1/node_modules/d3-chord/src/index.js", "../../../node_modules/.pnpm/d3-contour@4.0.2/node_modules/d3-contour/src/index.js", "../../../node_modules/.pnpm/d3-delaunay@6.0.4/node_modules/d3-delaunay/src/index.js", "../../../node_modules/.pnpm/d3-dsv@3.0.1/node_modules/d3-dsv/src/index.js", "../../../node_modules/.pnpm/d3-fetch@3.0.1/node_modules/d3-fetch/src/index.js", "../../../node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/index.js", "../../../node_modules/.pnpm/d3-force@3.0.0/node_modules/d3-force/src/index.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatDecimal.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/exponent.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatGroup.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatNumerals.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatSpecifier.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatTrim.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatPrefixAuto.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatRounded.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatTypes.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/identity.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/locale.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/defaultLocale.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/precisionFixed.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/precisionPrefix.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/precisionRound.js", "../../../node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/index.js", "../../../node_modules/.pnpm/d3-geo@3.1.1/node_modules/d3-geo/src/index.js", "../../../node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/index.js", "../../../node_modules/.pnpm/d3-polygon@3.0.1/node_modules/d3-polygon/src/index.js", "../../../node_modules/.pnpm/d3-random@3.0.1/node_modules/d3-random/src/index.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/init.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/constant.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/number.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/continuous.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/tickFormat.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/nice.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/interval.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/millisecond.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/second.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/minute.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/hour.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/day.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/week.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/month.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/year.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/ticks.js", "../../../node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/index.js", "../../../node_modules/.pnpm/d3-time-format@4.1.0/node_modules/d3-time-format/src/locale.js", "../../../node_modules/.pnpm/d3-time-format@4.1.0/node_modules/d3-time-format/src/defaultLocale.js", "../../../node_modules/.pnpm/d3-time-format@4.1.0/node_modules/d3-time-format/src/index.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/time.js", "../../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/index.js", "../../../node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/colors.js", "../../../node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js", "../../../node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/index.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/math.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/arc.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/descending.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/identity.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/pie.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bump.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/noop.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basis.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisClosed.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisOpen.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bundle.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinal.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalClosed.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/cardinalOpen.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRom.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomClosed.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/catmullRomOpen.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linearClosed.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/natural.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/step.js", "../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/index.js", "../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/constant.js", "../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/event.js", "../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js", "../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/noevent.js", "../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/zoom.js", "../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/index.js", "../../../node_modules/.pnpm/d3@7.9.0/node_modules/d3/src/index.js", "../../../node_modules/.pnpm/@braintree+sanitize-url@7.1.0/node_modules/@braintree/sanitize-url/dist/constants.js", "../../../node_modules/.pnpm/@braintree+sanitize-url@7.1.0/node_modules/@braintree/sanitize-url/dist/index.js", "../src/diagrams/common/svgDrawCommon.ts", "../src/diagrams/c4/svgDraw.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/memoize.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_defineProperty.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignValue.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignMergeValue.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseFor.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFor.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneBuffer.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneArrayBuffer.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneTypedArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseCreate.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLikeObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_safeGet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignValue.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeysIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeysIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keysIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPlainObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMergeDeep.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMerge.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/identity.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_apply.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overRest.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/constant.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSetToString.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_shortOut.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToString.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRest.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIterateeCall.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAssigner.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js", "../src/utils.ts", "../src/diagrams/c4/c4Renderer.js", "../src/diagrams/c4/styles.js", "../src/diagrams/c4/c4Diagram.ts", "../src/diagrams/flowchart/flowDb.ts", "../src/dagre-wrapper/blockArrowHelper.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/defaults.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/helpers.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/Tokenizer.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/rules.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/Lexer.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/Renderer.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/TextRenderer.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/Parser.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/Hooks.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/Instance.ts", "../../../node_modules/.pnpm/marked@13.0.3/node_modules/marked/src/marked.ts", "../src/rendering-util/handle-markdown-text.ts", "../src/rendering-util/splitText.ts", "../src/rendering-util/createText.ts", "../src/dagre-wrapper/createLabel.js", "../src/dagre-wrapper/intersect/intersect-node.js", "../src/dagre-wrapper/intersect/intersect-ellipse.js", "../src/dagre-wrapper/intersect/intersect-circle.js", "../src/dagre-wrapper/intersect/intersect-line.js", "../src/dagre-wrapper/intersect/intersect-polygon.js", "../src/dagre-wrapper/intersect/intersect-rect.js", "../src/dagre-wrapper/intersect/index.js", "../src/dagre-wrapper/shapes/util.js", "../src/dagre-wrapper/shapes/note.js", "../src/dagre-wrapper/nodes.js", "../src/rendering-util/insertElementsForSize.js", "../src/utils/subGraphTitleMargins.ts", "../../../node_modules/.pnpm/roughjs@4.6.6/node_modules/roughjs/bundled/rough.esm.js", "../src/rendering-util/rendering-elements/intersect/intersect-rect.js", "../src/rendering-util/rendering-elements/createLabel.js", "../src/rendering-util/rendering-elements/shapes/roundedRectPath.ts", "../src/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.ts", "../src/rendering-util/rendering-elements/clusters.js", "../src/utils/lineWithOffset.ts", "../src/rendering-util/rendering-elements/edgeMarker.ts", "../src/rendering-util/rendering-elements/edges.js", "../src/rendering-util/rendering-elements/markers.js", "../src/rendering-util/rendering-elements/shapes/util.js", "../src/rendering-util/rendering-elements/intersect/intersect-node.js", "../src/rendering-util/rendering-elements/intersect/intersect-ellipse.js", "../src/rendering-util/rendering-elements/intersect/intersect-circle.js", "../src/rendering-util/rendering-elements/intersect/intersect-line.js", "../src/rendering-util/rendering-elements/intersect/intersect-polygon.js", "../src/rendering-util/rendering-elements/intersect/index.js", "../src/rendering-util/rendering-elements/shapes/drawRect.ts", "../src/rendering-util/rendering-elements/shapes/state.ts", "../src/rendering-util/rendering-elements/shapes/roundedRect.ts", "../src/rendering-util/rendering-elements/shapes/squareRect.ts", "../src/rendering-util/rendering-elements/shapes/stateStart.ts", "../src/rendering-util/rendering-elements/shapes/stateEnd.ts", "../src/rendering-util/rendering-elements/shapes/forkJoin.ts", "../src/rendering-util/rendering-elements/shapes/choice.ts", "../src/rendering-util/rendering-elements/shapes/note.ts", "../src/rendering-util/rendering-elements/shapes/stadium.ts", "../src/rendering-util/rendering-elements/shapes/rectWithTitle.ts", "../src/rendering-util/rendering-elements/shapes/insertPolygonShape.ts", "../src/rendering-util/rendering-elements/shapes/subroutine.ts", "../src/rendering-util/rendering-elements/shapes/cylinder.ts", "../src/rendering-util/rendering-elements/shapes/circle.ts", "../src/rendering-util/rendering-elements/shapes/doubleCircle.ts", "../src/rendering-util/rendering-elements/shapes/rectLeftInvArrow.ts", "../src/rendering-util/rendering-elements/shapes/question.ts", "../src/rendering-util/rendering-elements/shapes/hexagon.ts", "../src/rendering-util/rendering-elements/shapes/leanRight.ts", "../src/rendering-util/rendering-elements/shapes/leanLeft.ts", "../src/rendering-util/rendering-elements/shapes/trapezoid.ts", "../src/rendering-util/rendering-elements/shapes/invertedTrapezoid.ts", "../src/rendering-util/rendering-elements/shapes/labelRect.ts", "../src/rendering-util/rendering-elements/nodes.js", "../src/internals.ts", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toFinite.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toInteger.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/noop.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayEach.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFindIndex.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNaN.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_strictIndexOf.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIndexOf.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludes.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keys.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/assign.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKey.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_memoizeCapped.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToPath.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castPath.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toKey.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isFlattenable.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFlatten.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/flatten.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_flatRest.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssign.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbols.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbolsIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbolsIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeysIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_DataView.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Promise.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getTag.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneDataView.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneRegExp.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneSymbol.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneByTag.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMap.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isMap.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseClone.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/clone.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/compact.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arraySome.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalArrays.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalByTag.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalObjects.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqualDeep.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqual.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMatch.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isStrictComparable.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMatchData.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_matchesStrictComparable.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatches.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseHasIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasPath.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/hasIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatchesProperty.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseProperty.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyDeep.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/property.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIteratee.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayAggregator.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseForOwn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseEach.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseEach.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAggregator.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAggregator.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/defaults.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayIncludesWith.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseDifference.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/difference.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/last.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/drop.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/dropRight.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castFunction.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/forEach.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/each.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayEvery.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseEvery.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/every.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFilter.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/filter.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createFind.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/findIndex.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/find.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/head.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/first.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMap.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/map.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/flatMap.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/forIn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/forOwn.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/groupBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGt.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseHas.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/has.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseValues.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/values.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/includes.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/indexOf.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEmpty.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsRegExp.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isRegExp.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isUndefined.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseLt.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mapValues.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseExtremum.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/max.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/min.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/minBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/negate.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePickBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/pickBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSortBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_compareAscending.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_compareMultiple.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseOrderBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiSize.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeSize.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringSize.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePick.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/pick.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRange.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createRange.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/range.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseReduce.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/reduce.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/reject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/size.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSome.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/some.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/sortBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createSet.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUniq.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/union.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniq.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqBy.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqueId.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseZipObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/zipObject.js", "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/lodash.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/graph.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/index.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/data/list.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/greedy-fas.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/acyclic.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/util.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/add-border-segments.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/coordinate-system.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/normalize.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/rank/util.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/components.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/data/priority-queue.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra-all.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/tarjan.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/find-cycles.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/is-acyclic.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/prim.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/alg/index.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/rank/index.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/nesting-graph.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/cross-count.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/init-order.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/barycenter.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/sort.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/order/index.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/position/bk.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/position/index.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/layout.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/dagre/index.js", "../../../node_modules/.pnpm/dagre-d3-es@7.0.10/node_modules/dagre-d3-es/src/graphlib/json.js", "../src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js", "../src/rendering-util/layout-algorithms/dagre/index.js", "../src/rendering-util/render.ts", "../src/rendering-util/setupViewPortForSVG.ts", "../src/diagrams/flowchart/flowRenderer-v3-unified.ts", "../src/diagrams/flowchart/parser/flow.jison", "../src/diagrams/flowchart/styles.ts", "../src/diagrams/flowchart/flowDiagram.ts", "../src/diagrams/er/parser/erDiagram.jison", "../src/diagrams/er/erDb.js", "../src/diagrams/er/erMarkers.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/regex.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/stringify.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/parse.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v35.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/sha1.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/v5.js", "../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/index.js", "../src/diagrams/er/erRenderer.js", "../src/diagrams/er/styles.js", "../src/diagrams/er/erDiagram.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/syntax-tree.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/stream.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/cst-utils.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/errors.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/languages/generated/ast.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/ast-utils.ts", "../../../node_modules/.pnpm/@chevrotain+regexp-to-ast@11.0.3/node_modules/@chevrotain/regexp-to-ast/src/utils.ts", "../../../node_modules/.pnpm/@chevrotain+regexp-to-ast@11.0.3/node_modules/@chevrotain/regexp-to-ast/src/character-classes.ts", "../../../node_modules/.pnpm/@chevrotain+regexp-to-ast@11.0.3/node_modules/@chevrotain/regexp-to-ast/src/regexp-parser.ts", "../../../node_modules/.pnpm/@chevrotain+regexp-to-ast@11.0.3/node_modules/@chevrotain/regexp-to-ast/src/base-regexp-visitor.ts", "../../../node_modules/.pnpm/@chevrotain+regexp-to-ast@11.0.3/node_modules/@chevrotain/regexp-to-ast/src/api.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/regexp-utils.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/grammar-utils.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/languages/grammar-config.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/version.ts", "../../../node_modules/.pnpm/@chevrotain+utils@11.0.3/node_modules/@chevrotain/utils/src/print.ts", "../../../node_modules/.pnpm/@chevrotain+utils@11.0.3/node_modules/@chevrotain/utils/src/timer.ts", "../../../node_modules/.pnpm/@chevrotain+utils@11.0.3/node_modules/@chevrotain/utils/src/to-fast-properties.ts", "../../../node_modules/.pnpm/@chevrotain+utils@11.0.3/node_modules/@chevrotain/utils/src/api.ts", "../../../node_modules/.pnpm/@chevrotain+gast@11.0.3/node_modules/@chevrotain/gast/src/model.ts", "../../../node_modules/.pnpm/@chevrotain+gast@11.0.3/node_modules/@chevrotain/gast/src/visitor.ts", "../../../node_modules/.pnpm/@chevrotain+gast@11.0.3/node_modules/@chevrotain/gast/src/helpers.ts", "../../../node_modules/.pnpm/@chevrotain+gast@11.0.3/node_modules/@chevrotain/gast/src/api.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/rest.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/first.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/constants.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/follow.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/reg_exp_parser.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/reg_exp.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/lexer.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/tokens.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/lexer_errors_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/lexer_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/scan/tokens_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/errors_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/resolver.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/interpreter.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/lookahead.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/checks.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/gast/gast_resolver_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/exceptions_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/recoverable.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/keys.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/grammar/llk_lookahead.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/looksahead.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/cst/cst.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/lang/lang_extensions.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/cst/cst_visitor.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/tree_builder.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/lexer_adapter.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/recognizer_api.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/recognizer_engine.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/error_handler.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/context_assist.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/gast_recorder.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/traits/perf_tracer.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/utils/apply_mixins.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/parse/parser/parser.ts", "../../../node_modules/.pnpm/@chevrotain+cst-dts-gen@11.0.3/node_modules/@chevrotain/cst-dts-gen/src/model.ts", "../../../node_modules/.pnpm/@chevrotain+cst-dts-gen@11.0.3/node_modules/@chevrotain/cst-dts-gen/src/generate.ts", "../../../node_modules/.pnpm/@chevrotain+cst-dts-gen@11.0.3/node_modules/@chevrotain/cst-dts-gen/src/api.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/diagrams/render_public.ts", "../../../node_modules/.pnpm/chevrotain@11.0.3/node_modules/chevrotain/src/api.ts", "../../../node_modules/.pnpm/chevrotain-allstar@0.3.1_chevrotain@11.0.3/node_modules/chevrotain-allstar/src/atn.ts", "../../../node_modules/.pnpm/chevrotain-allstar@0.3.1_chevrotain@11.0.3/node_modules/chevrotain-allstar/src/dfa.ts", "../../../node_modules/.pnpm/chevrotain-allstar@0.3.1_chevrotain@11.0.3/node_modules/chevrotain-allstar/src/all-star-lookahead.ts", "../../../node_modules/.pnpm/chevrotain-allstar@0.3.1_chevrotain@11.0.3/node_modules/chevrotain-allstar/src/index.ts", "../../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/cst-node-builder.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/langium-parser.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/parser-builder-base.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/completion-parser-builder.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/langium-parser-builder.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/token-builder.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/value-converter.ts", "../../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js", "../../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js", "../../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js", "../../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/cancellation.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/promise-utils.ts", "../../../node_modules/.pnpm/vscode-languageserver-textdocument@1.0.12/node_modules/vscode-languageserver-textdocument/lib/esm/main.js", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/node_modules/path-browserify/index.js", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/bootstrap", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/runtime/define property getters", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/runtime/hasOwnProperty shorthand", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/webpack/runtime/make namespace object", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/src/platform.ts", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/src/uri.ts", "../../../node_modules/.pnpm/vscode-uri@3.0.8/node_modules/vscode-uri/lib/esm/webpack:/LIB/src/utils.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/uri-utils.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/documents.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/linker.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/name-provider.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/references.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/collections.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/scope-computation.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/scope.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/caching.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/scope-provider.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/serializer/json-serializer.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/service-registry.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/validation/validation-registry.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/validation/document-validator.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/ast-descriptions.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/ast-node-locator.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/configuration.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/disposable.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/document-builder.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/index-manager.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/workspace-manager.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/lexer.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/documentation/jsdoc.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/documentation/documentation-provider.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/documentation/comment-provider.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/event.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/async-parser.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/workspace-lock.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/serializer/hydrator.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/default-module.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/dependency-injection.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/services.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/documentation/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/languages/language-meta-data.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/languages/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/parser-config.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/parser/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/references/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/serializer/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/file-system-provider.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/grammar-loader.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/utils/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/validation/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/workspace/index.ts", "../../../node_modules/.pnpm/langium@3.0.0/node_modules/langium/src/index.ts", "../../parser/dist/chunks/mermaid-parser.core/chunk-U3TRWOCV.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-QE2ZKFLT.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-O2VHLUZY.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-HTBTGXD4.mjs", "../../parser/dist/chunks/mermaid-parser.core/chunk-NM56GJBF.mjs", "../../parser/dist/chunks/mermaid-parser.core/info-PWGDJKR5.mjs", "../../parser/dist/chunks/mermaid-parser.core/packet-7PPW3X5M.mjs", "../../parser/dist/chunks/mermaid-parser.core/pie-RF5LNP4B.mjs", "../../parser/dist/chunks/mermaid-parser.core/gitGraph-F2EDSAW4.mjs", "../../parser/dist/mermaid-parser.core.mjs", "../src/diagrams/common/populateCommonDb.ts", "../src/diagrams/git/gitGraphTypes.ts", "../src/utils/imperativeState.ts", "../src/diagrams/git/gitGraphAst.ts", "../src/diagrams/git/gitGraphParser.ts", "../src/diagrams/git/gitGraphRenderer.ts", "../src/diagrams/git/styles.js", "../src/diagrams/git/gitGraphDiagram.ts", "../src/diagrams/gantt/parser/gantt.jison", "../../../node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/plugin/isoWeek.js", "../../../node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/plugin/customParseFormat.js", "../../../node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/plugin/advancedFormat.js", "../src/diagrams/gantt/ganttDb.js", "../src/diagrams/gantt/ganttRenderer.js", "../src/diagrams/gantt/styles.js", "../src/diagrams/gantt/ganttDiagram.ts", "../src/diagrams/info/infoParser.ts", "../package.json", "../src/diagrams/info/infoDb.ts", "../src/rendering-util/selectSvgElement.ts", "../src/diagrams/info/infoRenderer.ts", "../src/diagrams/info/infoDiagram.ts", "../src/diagrams/pie/pieDb.ts", "../src/diagrams/pie/pieParser.ts", "../src/diagrams/pie/pieStyles.ts", "../src/diagrams/pie/pieRenderer.ts", "../src/diagrams/pie/pieDiagram.ts", "../src/diagrams/quadrant-chart/parser/quadrant.jison", "../src/diagrams/quadrant-chart/quadrantBuilder.ts", "../src/diagrams/quadrant-chart/utils.ts", "../src/diagrams/quadrant-chart/quadrantDb.ts", "../src/diagrams/quadrant-chart/quadrantRenderer.ts", "../src/diagrams/quadrant-chart/quadrantDiagram.ts", "../src/diagrams/xychart/parser/xychart.jison", "../src/diagrams/xychart/chartBuilder/interfaces.ts", "../src/diagrams/xychart/chartBuilder/textDimensionCalculator.ts", "../src/diagrams/xychart/chartBuilder/components/axis/baseAxis.ts", "../src/diagrams/xychart/chartBuilder/components/axis/bandAxis.ts", "../src/diagrams/xychart/chartBuilder/components/axis/linearAxis.ts", "../src/diagrams/xychart/chartBuilder/components/axis/index.ts", "../src/diagrams/xychart/chartBuilder/components/chartTitle.ts", "../src/diagrams/xychart/chartBuilder/components/plot/linePlot.ts", "../src/diagrams/xychart/chartBuilder/components/plot/barPlot.ts", "../src/diagrams/xychart/chartBuilder/components/plot/index.ts", "../src/diagrams/xychart/chartBuilder/orchestrator.ts", "../src/diagrams/xychart/chartBuilder/index.ts", "../src/diagrams/xychart/xychartDb.ts", "../src/diagrams/xychart/xychartRenderer.ts", "../src/diagrams/xychart/xychartDiagram.ts", "../src/diagrams/requirement/parser/requirementDiagram.jison", "../src/diagrams/requirement/requirementDb.js", "../src/diagrams/requirement/styles.js", "../src/diagrams/requirement/requirementMarkers.js", "../src/diagrams/requirement/requirementRenderer.js", "../src/diagrams/requirement/requirementDiagram.ts", "../src/diagrams/sequence/parser/sequenceDiagram.jison", "../src/diagrams/sequence/sequenceDb.ts", "../src/diagrams/sequence/styles.js", "../src/diagrams/sequence/svgDraw.js", "../src/diagrams/sequence/sequenceRenderer.ts", "../src/diagrams/sequence/sequenceDiagram.ts", "../src/diagrams/class/parser/classDiagram.jison", "../src/diagrams/class/classTypes.ts", "../src/diagrams/class/classDb.ts", "../src/diagrams/class/styles.js", "../src/diagrams/class/svgDraw.js", "../src/diagrams/class/classRenderer.js", "../src/diagrams/class/classDiagram.ts", "../src/dagre-wrapper/markers.js", "../src/dagre-wrapper/mermaid-graphlib.js", "../src/dagre-wrapper/clusters.js", "../src/dagre-wrapper/edgeMarker.ts", "../src/dagre-wrapper/edges.js", "../src/dagre-wrapper/index.js", "../src/diagrams/class/classRenderer-v2.ts", "../src/diagrams/class/classDiagram-v2.ts", "../src/diagrams/state/parser/stateDiagram.jison", "../src/diagrams/state/stateCommon.ts", "../src/diagrams/state/dataFetcher.js", "../src/diagrams/state/stateRenderer-v3-unified.ts", "../src/diagrams/state/stateDb.js", "../src/diagrams/state/styles.js", "../src/diagrams/state/id-cache.js", "../src/diagrams/state/shapes.js", "../src/diagrams/state/stateRenderer.js", "../src/diagrams/state/stateDiagram.ts", "../src/diagrams/state/stateDiagram-v2.ts", "../src/diagrams/user-journey/parser/journey.jison", "../src/diagrams/user-journey/journeyDb.js", "../src/diagrams/user-journey/styles.js", "../src/diagrams/user-journey/svgDraw.js", "../src/diagrams/user-journey/journeyRenderer.ts", "../src/diagrams/user-journey/journeyDiagram.ts", "../src/diagrams/timeline/parser/timeline.jison", "../src/diagrams/timeline/timelineDb.js", "../src/diagrams/timeline/svgDraw.js", "../src/diagrams/timeline/timelineRenderer.ts", "../src/diagrams/timeline/styles.js", "../src/diagrams/timeline/timeline-definition.ts", "../src/diagrams/mindmap/parser/mindmap.jison", "../src/diagrams/mindmap/mindmapDb.ts", "../../../node_modules/.pnpm/cytoscape@3.30.1/node_modules/cytoscape/dist/cytoscape.esm.mjs", "../../../node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js", "../../../node_modules/.pnpm/cose-base@1.0.3/node_modules/cose-base/cose-base.js", "../../../node_modules/.pnpm/cytoscape-cose-bilkent@4.1.0_cytoscape@3.30.1/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js", "../src/diagrams/mindmap/svgDraw.ts", "../src/diagrams/mindmap/mindmapRenderer.ts", "../src/diagrams/mindmap/styles.ts", "../src/diagrams/mindmap/mindmap-definition.ts", "../src/diagrams/sankey/parser/sankey.jison", "../src/diagrams/sankey/sankeyDB.ts", "../../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/max.js", "../../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/min.js", "../../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/sum.js", "../../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/index.js", "../../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/align.js", "../../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/constant.js", "../../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/sankey.js", "../../../node_modules/.pnpm/d3-path@1.0.9/node_modules/d3-path/src/path.js", "../../../node_modules/.pnpm/d3-path@1.0.9/node_modules/d3-path/src/index.js", "../../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/constant.js", "../../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/point.js", "../../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/array.js", "../../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/link/index.js", "../../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/index.js", "../../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/sankeyLinkHorizontal.js", "../../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/index.js", "../src/rendering-util/uid.ts", "../src/diagrams/sankey/sankeyRenderer.ts", "../src/diagrams/sankey/sankeyUtils.ts", "../src/diagrams/sankey/sankeyDiagram.ts", "../src/diagrams/packet/db.ts", "../src/diagrams/packet/parser.ts", "../src/diagrams/packet/renderer.ts", "../src/diagrams/packet/styles.ts", "../src/diagrams/packet/diagram.ts", "../src/diagrams/block/parser/block.jison", "../src/diagrams/block/blockDB.ts", "../src/diagrams/block/styles.ts", "../src/diagrams/block/layout.ts", "../src/diagrams/block/renderHelpers.ts", "../src/diagrams/block/blockRenderer.ts", "../src/diagrams/block/blockDiagram.ts", "../src/mermaid.ts", "../src/diagrams/c4/c4Detector.ts", "../src/diagrams/flowchart/flowDetector.ts", "../src/diagrams/flowchart/flowDetector-v2.ts", "../src/diagrams/er/erDetector.ts", "../src/diagrams/git/gitGraphDetector.ts", "../src/diagrams/gantt/ganttDetector.ts", "../src/diagrams/info/infoDetector.ts", "../src/diagrams/pie/pieDetector.ts", "../src/diagrams/quadrant-chart/quadrantDetector.ts", "../src/diagrams/xychart/xychartDetector.ts", "../src/diagrams/requirement/requirementDetector.ts", "../src/diagrams/sequence/sequenceDetector.ts", "../src/diagrams/class/classDetector.ts", "../src/diagrams/class/classDetector-V2.ts", "../src/diagrams/state/stateDetector.ts", "../src/diagrams/state/stateDetector-V2.ts", "../src/diagrams/user-journey/journeyDetector.ts", "../src/diagrams/error/errorRenderer.ts", "../src/diagrams/error/errorDiagram.ts", "../src/diagrams/flowchart/elk/detector.ts", "../src/diagrams/timeline/detector.ts", "../src/diagrams/mindmap/detector.ts", "../src/diagrams/sankey/sankeyDetector.ts", "../src/diagrams/packet/detector.ts", "../src/diagrams/block/blockDetector.ts", "../src/diagram-api/diagram-orchestration.ts", "../src/diagram-api/loadDiagram.ts", "../src/mermaidAPI.ts", "../../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Enum.js", "../../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Utility.js", "../../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Tokenizer.js", "../../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Parser.js", "../../../node_modules/.pnpm/stylis@4.3.2/node_modules/stylis/src/Serializer.js", "../src/Diagram.ts", "../src/interactionDb.ts", "../src/accessibility.ts", "../src/diagram-api/comments.ts", "../src/diagram-api/frontmatter.ts", "../../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs", "../src/preprocess.ts", "../src/utils/base64.ts"], + "sourcesContent": ["export function dedent(\n templ: TemplateStringsArray | string,\n ...values: unknown[]\n): string {\n let strings = Array.from(typeof templ === 'string' ? [templ] : templ);\n\n // 1. Remove trailing whitespace.\n strings[strings.length - 1] = strings[strings.length - 1].replace(\n /\\r?\\n([\\t ]*)$/,\n '',\n );\n\n // 2. Find all line breaks to determine the highest common indentation level.\n const indentLengths = strings.reduce((arr, str) => {\n const matches = str.match(/\\n([\\t ]+|(?!\\s).)/g);\n if (matches) {\n return arr.concat(\n matches.map((match) => match.match(/[\\t ]/g)?.length ?? 0),\n );\n }\n return arr;\n }, []);\n\n // 3. Remove the common indentation from all strings.\n if (indentLengths.length) {\n const pattern = new RegExp(`\\n[\\t ]{${Math.min(...indentLengths)}}`, 'g');\n\n strings = strings.map((str) => str.replace(pattern, '\\n'));\n }\n\n // 4. Remove leading whitespace.\n strings[0] = strings[0].replace(/^\\r?\\n/, '');\n\n // 5. Perform interpolation.\n let string = strings[0];\n\n values.forEach((value, i) => {\n // 5.1 Read current indentation level\n const endentations = string.match(/(?:^|\\n)( *)$/)\n const endentation = endentations ? endentations[1] : ''\n let indentedValue = value\n // 5.2 Add indentation to values with multiline strings\n if (typeof value === 'string' && value.includes('\\n')) {\n indentedValue = String(value)\n .split('\\n')\n .map((str, i) => {\n return i === 0 ? str : `${endentation}${str}`\n })\n .join('\\n');\n }\n\n string += indentedValue + strings[i + 1];\n });\n\n return string;\n}\n\nexport default dedent;\n", "!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) = {\n trace: 0,\n debug: 1,\n info: 2,\n warn: 3,\n error: 4,\n fatal: 5,\n};\n\nexport const log: Record = {\n trace: (..._args: any[]) => {},\n debug: (..._args: any[]) => {},\n info: (..._args: any[]) => {},\n warn: (..._args: any[]) => {},\n error: (..._args: any[]) => {},\n fatal: (..._args: any[]) => {},\n};\n\n/**\n * Sets a log level\n *\n * @param level - The level to set the logging to. Default is `\"fatal\"`\n */\nexport const setLogLevel = function (level: keyof typeof LEVELS | number = 'fatal') {\n let numericLevel: number = LEVELS.fatal;\n if (typeof level === 'string') {\n if (level.toLowerCase() in LEVELS) {\n numericLevel = LEVELS[level];\n }\n } else if (typeof level === 'number') {\n numericLevel = level;\n }\n log.trace = () => {};\n log.debug = () => {};\n log.info = () => {};\n log.warn = () => {};\n log.error = () => {};\n log.fatal = () => {};\n\n if (numericLevel <= LEVELS.fatal) {\n log.fatal = console.error\n ? console.error.bind(console, format('FATAL'), 'color: orange')\n : console.log.bind(console, '\\x1b[35m', format('FATAL'));\n }\n if (numericLevel <= LEVELS.error) {\n log.error = console.error\n ? console.error.bind(console, format('ERROR'), 'color: orange')\n : console.log.bind(console, '\\x1b[31m', format('ERROR'));\n }\n if (numericLevel <= LEVELS.warn) {\n log.warn = console.warn\n ? console.warn.bind(console, format('WARN'), 'color: orange')\n : console.log.bind(console, `\\x1b[33m`, format('WARN'));\n }\n if (numericLevel <= LEVELS.info) {\n log.info = console.info\n ? console.info.bind(console, format('INFO'), 'color: lightblue')\n : console.log.bind(console, '\\x1b[34m', format('INFO'));\n }\n if (numericLevel <= LEVELS.debug) {\n log.debug = console.debug\n ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen')\n : console.log.bind(console, '\\x1b[32m', format('DEBUG'));\n }\n if (numericLevel <= LEVELS.trace) {\n log.trace = console.debug\n ? console.debug.bind(console, format('TRACE'), 'color: lightgreen')\n : console.log.bind(console, '\\x1b[32m', format('TRACE'));\n }\n};\n\n/**\n * Returns a format with the timestamp and the log level\n *\n * @param level - The level for the log format\n * @returns The format with the timestamp and log level\n */\nconst format = (level: Uppercase): string => {\n const time = dayjs().format('ss.SSS');\n return `%c${time} : ${level} : `;\n};\n", "// Match Jekyll-style front matter blocks (https://jekyllrb.com/docs/front-matter/).\n// Based on regex used by Jekyll: https://github.com/jekyll/jekyll/blob/6dd3cc21c40b98054851846425af06c64f9fb466/lib/jekyll/document.rb#L10\n// Note that JS doesn't support the \"\\A\" anchor, which means we can't use\n// multiline mode.\n// Relevant YAML spec: https://yaml.org/spec/1.2.2/#914-explicit-documents\nexport const frontMatterRegex = /^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{3}\\s*[\\n\\r]+/s;\n\nexport const directiveRegex =\n /%{2}{\\s*(?:(\\w+)\\s*:|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi;\n\nexport const anyCommentRegex = /\\s*%%.*\\n/gm;\n", "export class UnknownDiagramError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnknownDiagramError';\n }\n}\n", "import type { MermaidConfig } from '../config.type.js';\nimport { log } from '../logger.js';\nimport type {\n DetectorRecord,\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from './types.js';\nimport { anyCommentRegex, directiveRegex, frontMatterRegex } from './regexes.js';\nimport { UnknownDiagramError } from '../errors.js';\n\nexport const detectors: Record = {};\n\n/**\n * Detects the type of the graph text.\n *\n * Takes into consideration the possible existence of an `%%init` directive\n *\n * @param text - The text defining the graph. For example:\n *\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param config - The mermaid config.\n * @returns A graph definition key\n */\nexport const detectType = function (text: string, config?: MermaidConfig): string {\n text = text\n .replace(frontMatterRegex, '')\n .replace(directiveRegex, '')\n .replace(anyCommentRegex, '\\n');\n for (const [key, { detector }] of Object.entries(detectors)) {\n const diagram = detector(text, config);\n if (diagram) {\n return key;\n }\n }\n\n throw new UnknownDiagramError(\n `No diagram type detected matching given configuration for text: ${text}`\n );\n};\n\n/**\n * Registers lazy-loaded diagrams to Mermaid.\n *\n * The diagram function is loaded asynchronously, so that diagrams are only loaded\n * if the diagram is detected.\n *\n * @remarks\n * Please note that the order of diagram detectors is important.\n * The first detector to return `true` is the diagram that will be loaded\n * and used, so put more specific detectors at the beginning!\n *\n * @param diagrams - Diagrams to lazy load, and their detectors, in order of importance.\n */\nexport const registerLazyLoadedDiagrams = (...diagrams: ExternalDiagramDefinition[]) => {\n for (const { id, detector, loader } of diagrams) {\n addDetector(id, detector, loader);\n }\n};\n\nexport const addDetector = (key: string, detector: DiagramDetector, loader?: DiagramLoader) => {\n if (detectors[key]) {\n log.warn(`Detector with key ${key} already exists. Overwriting.`);\n }\n detectors[key] = { detector, loader };\n log.debug(`Detector with key ${key} added${loader ? ' with loader' : ''}`);\n};\n\nexport const getDiagramLoader = (key: string) => {\n return detectors[key].loader;\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,24],$V1=[1,25],$V2=[1,26],$V3=[1,27],$V4=[1,28],$V5=[1,63],$V6=[1,64],$V7=[1,65],$V8=[1,66],$V9=[1,67],$Va=[1,68],$Vb=[1,69],$Vc=[1,29],$Vd=[1,30],$Ve=[1,31],$Vf=[1,32],$Vg=[1,33],$Vh=[1,34],$Vi=[1,35],$Vj=[1,36],$Vk=[1,37],$Vl=[1,38],$Vm=[1,39],$Vn=[1,40],$Vo=[1,41],$Vp=[1,42],$Vq=[1,43],$Vr=[1,44],$Vs=[1,45],$Vt=[1,46],$Vu=[1,47],$Vv=[1,48],$Vw=[1,50],$Vx=[1,51],$Vy=[1,52],$Vz=[1,53],$VA=[1,54],$VB=[1,55],$VC=[1,56],$VD=[1,57],$VE=[1,58],$VF=[1,59],$VG=[1,60],$VH=[14,42],$VI=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$VJ=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],$VK=[1,82],$VL=[1,83],$VM=[1,84],$VN=[1,85],$VO=[12,14,42],$VP=[12,14,33,42],$VQ=[12,14,33,42,76,77,79,80],$VR=[12,33],$VS=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"direction\":5,\"direction_tb\":6,\"direction_bt\":7,\"direction_rl\":8,\"direction_lr\":9,\"graphConfig\":10,\"C4_CONTEXT\":11,\"NEWLINE\":12,\"statements\":13,\"EOF\":14,\"C4_CONTAINER\":15,\"C4_COMPONENT\":16,\"C4_DYNAMIC\":17,\"C4_DEPLOYMENT\":18,\"otherStatements\":19,\"diagramStatements\":20,\"otherStatement\":21,\"title\":22,\"accDescription\":23,\"acc_title\":24,\"acc_title_value\":25,\"acc_descr\":26,\"acc_descr_value\":27,\"acc_descr_multiline_value\":28,\"boundaryStatement\":29,\"boundaryStartStatement\":30,\"boundaryStopStatement\":31,\"boundaryStart\":32,\"LBRACE\":33,\"ENTERPRISE_BOUNDARY\":34,\"attributes\":35,\"SYSTEM_BOUNDARY\":36,\"BOUNDARY\":37,\"CONTAINER_BOUNDARY\":38,\"NODE\":39,\"NODE_L\":40,\"NODE_R\":41,\"RBRACE\":42,\"diagramStatement\":43,\"PERSON\":44,\"PERSON_EXT\":45,\"SYSTEM\":46,\"SYSTEM_DB\":47,\"SYSTEM_QUEUE\":48,\"SYSTEM_EXT\":49,\"SYSTEM_EXT_DB\":50,\"SYSTEM_EXT_QUEUE\":51,\"CONTAINER\":52,\"CONTAINER_DB\":53,\"CONTAINER_QUEUE\":54,\"CONTAINER_EXT\":55,\"CONTAINER_EXT_DB\":56,\"CONTAINER_EXT_QUEUE\":57,\"COMPONENT\":58,\"COMPONENT_DB\":59,\"COMPONENT_QUEUE\":60,\"COMPONENT_EXT\":61,\"COMPONENT_EXT_DB\":62,\"COMPONENT_EXT_QUEUE\":63,\"REL\":64,\"BIREL\":65,\"REL_U\":66,\"REL_D\":67,\"REL_L\":68,\"REL_R\":69,\"REL_B\":70,\"REL_INDEX\":71,\"UPDATE_EL_STYLE\":72,\"UPDATE_REL_STYLE\":73,\"UPDATE_LAYOUT_CONFIG\":74,\"attribute\":75,\"STR\":76,\"STR_KEY\":77,\"STR_VALUE\":78,\"ATTRIBUTE\":79,\"ATTRIBUTE_EMPTY\":80,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"direction_tb\",7:\"direction_bt\",8:\"direction_rl\",9:\"direction_lr\",11:\"C4_CONTEXT\",12:\"NEWLINE\",14:\"EOF\",15:\"C4_CONTAINER\",16:\"C4_COMPONENT\",17:\"C4_DYNAMIC\",18:\"C4_DEPLOYMENT\",22:\"title\",23:\"accDescription\",24:\"acc_title\",25:\"acc_title_value\",26:\"acc_descr\",27:\"acc_descr_value\",28:\"acc_descr_multiline_value\",33:\"LBRACE\",34:\"ENTERPRISE_BOUNDARY\",36:\"SYSTEM_BOUNDARY\",37:\"BOUNDARY\",38:\"CONTAINER_BOUNDARY\",39:\"NODE\",40:\"NODE_L\",41:\"NODE_R\",42:\"RBRACE\",44:\"PERSON\",45:\"PERSON_EXT\",46:\"SYSTEM\",47:\"SYSTEM_DB\",48:\"SYSTEM_QUEUE\",49:\"SYSTEM_EXT\",50:\"SYSTEM_EXT_DB\",51:\"SYSTEM_EXT_QUEUE\",52:\"CONTAINER\",53:\"CONTAINER_DB\",54:\"CONTAINER_QUEUE\",55:\"CONTAINER_EXT\",56:\"CONTAINER_EXT_DB\",57:\"CONTAINER_EXT_QUEUE\",58:\"COMPONENT\",59:\"COMPONENT_DB\",60:\"COMPONENT_QUEUE\",61:\"COMPONENT_EXT\",62:\"COMPONENT_EXT_DB\",63:\"COMPONENT_EXT_QUEUE\",64:\"REL\",65:\"BIREL\",66:\"REL_U\",67:\"REL_D\",68:\"REL_L\",69:\"REL_R\",70:\"REL_B\",71:\"REL_INDEX\",72:\"UPDATE_EL_STYLE\",73:\"UPDATE_REL_STYLE\",74:\"UPDATE_LAYOUT_CONFIG\",76:\"STR\",77:\"STR_KEY\",78:\"STR_VALUE\",79:\"ATTRIBUTE\",80:\"ATTRIBUTE_EMPTY\"},\nproductions_: [0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n yy.setDirection('TB');\nbreak;\ncase 4:\n yy.setDirection('BT');\nbreak;\ncase 5:\n yy.setDirection('RL');\nbreak;\ncase 6:\n yy.setDirection('LR');\nbreak;\ncase 8: case 9: case 10: case 11: case 12:\nyy.setC4Type($$[$0-3])\nbreak;\ncase 19:\nyy.setTitle($$[$0].substring(6));this.$=$$[$0].substring(6);\nbreak;\ncase 20:\nyy.setAccDescription($$[$0].substring(15));this.$=$$[$0].substring(15);\nbreak;\ncase 21:\n this.$=$$[$0].trim();yy.setTitle(this.$); \nbreak;\ncase 22: case 23:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 28:\n$$[$0].splice(2, 0, 'ENTERPRISE'); yy.addPersonOrSystemBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 29:\n$$[$0].splice(2, 0, 'SYSTEM'); yy.addPersonOrSystemBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 30:\nyy.addPersonOrSystemBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 31:\n$$[$0].splice(2, 0, 'CONTAINER'); yy.addContainerBoundary(...$$[$0]); this.$=$$[$0];\nbreak;\ncase 32:\nyy.addDeploymentNode('node', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 33:\nyy.addDeploymentNode('nodeL', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 34:\nyy.addDeploymentNode('nodeR', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 35:\n yy.popBoundaryParseStack() \nbreak;\ncase 39:\nyy.addPersonOrSystem('person', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 40:\nyy.addPersonOrSystem('external_person', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 41:\nyy.addPersonOrSystem('system', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 42:\nyy.addPersonOrSystem('system_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 43:\nyy.addPersonOrSystem('system_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 44:\nyy.addPersonOrSystem('external_system', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 45:\nyy.addPersonOrSystem('external_system_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 46:\nyy.addPersonOrSystem('external_system_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 47:\nyy.addContainer('container', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 48:\nyy.addContainer('container_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 49:\nyy.addContainer('container_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 50:\nyy.addContainer('external_container', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 51:\nyy.addContainer('external_container_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 52:\nyy.addContainer('external_container_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 53:\nyy.addComponent('component', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 54:\nyy.addComponent('component_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 55:\nyy.addComponent('component_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 56:\nyy.addComponent('external_component', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 57:\nyy.addComponent('external_component_db', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 58:\nyy.addComponent('external_component_queue', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 60:\nyy.addRel('rel', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 61:\nyy.addRel('birel', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 62:\nyy.addRel('rel_u', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 63:\nyy.addRel('rel_d', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 64:\nyy.addRel('rel_l', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 65:\nyy.addRel('rel_r', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 66:\nyy.addRel('rel_b', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 67:\n$$[$0].splice(0, 1); yy.addRel('rel', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 68:\nyy.updateElStyle('update_el_style', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 69:\nyy.updateRelStyle('update_rel_style', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 70:\nyy.updateLayoutConfig('update_layout_config', ...$$[$0]); this.$=$$[$0];\nbreak;\ncase 71:\n this.$ = [$$[$0]]; \nbreak;\ncase 72:\n $$[$0].unshift($$[$0-1]); this.$=$$[$0];\nbreak;\ncase 73: case 75:\n this.$ = $$[$0].trim(); \nbreak;\ncase 74:\n let kv={}; kv[$$[$0-1].trim()]=$$[$0].trim(); this.$=kv; \nbreak;\ncase 76:\n this.$ = \"\"; \nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:70,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{13:71,19:20,20:21,21:22,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,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:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG}),o($VH,[2,14]),o($VI,[2,16],{12:[1,76]}),o($VH,[2,36],{12:[1,77]}),o($VJ,[2,19]),o($VJ,[2,20]),{25:[1,78]},{27:[1,79]},o($VJ,[2,23]),{35:80,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:86,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:87,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:88,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:89,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:90,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:91,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:92,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:93,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:94,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:95,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:96,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:97,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:98,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:99,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:100,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:101,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:102,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:103,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:104,75:81,76:$VK,77:$VL,79:$VM,80:$VN},o($VO,[2,59]),{35:105,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:106,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:107,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:108,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:109,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:110,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:111,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:112,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:113,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:114,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:115,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{20:116,29:49,30:61,32:62,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,43:23,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG},{12:[1,118],33:[1,117]},{35:119,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:120,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:121,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:122,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:123,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:124,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{35:125,75:81,76:$VK,77:$VL,79:$VM,80:$VN},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},o($VH,[2,15]),o($VI,[2,17],{21:22,19:130,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4}),o($VH,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:$V0,23:$V1,24:$V2,26:$V3,28:$V4,34:$V5,36:$V6,37:$V7,38:$V8,39:$V9,40:$Va,41:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi,51:$Vj,52:$Vk,53:$Vl,54:$Vm,55:$Vn,56:$Vo,57:$Vp,58:$Vq,59:$Vr,60:$Vs,61:$Vt,62:$Vu,63:$Vv,64:$Vw,65:$Vx,66:$Vy,67:$Vz,68:$VA,69:$VB,70:$VC,71:$VD,72:$VE,73:$VF,74:$VG}),o($VJ,[2,21]),o($VJ,[2,22]),o($VO,[2,39]),o($VP,[2,71],{75:81,35:132,76:$VK,77:$VL,79:$VM,80:$VN}),o($VQ,[2,73]),{78:[1,133]},o($VQ,[2,75]),o($VQ,[2,76]),o($VO,[2,40]),o($VO,[2,41]),o($VO,[2,42]),o($VO,[2,43]),o($VO,[2,44]),o($VO,[2,45]),o($VO,[2,46]),o($VO,[2,47]),o($VO,[2,48]),o($VO,[2,49]),o($VO,[2,50]),o($VO,[2,51]),o($VO,[2,52]),o($VO,[2,53]),o($VO,[2,54]),o($VO,[2,55]),o($VO,[2,56]),o($VO,[2,57]),o($VO,[2,58]),o($VO,[2,60]),o($VO,[2,61]),o($VO,[2,62]),o($VO,[2,63]),o($VO,[2,64]),o($VO,[2,65]),o($VO,[2,66]),o($VO,[2,67]),o($VO,[2,68]),o($VO,[2,69]),o($VO,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},o($VR,[2,28]),o($VR,[2,29]),o($VR,[2,30]),o($VR,[2,31]),o($VR,[2,32]),o($VR,[2,33]),o($VR,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},o($VI,[2,18]),o($VH,[2,38]),o($VP,[2,72]),o($VQ,[2,74]),o($VO,[2,24]),o($VO,[2,35]),o($VS,[2,25]),o($VS,[2,26],{12:[1,138]}),o($VS,[2,27])],\ndefaultActions: {2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 6;\nbreak;\ncase 1:return 7;\nbreak;\ncase 2:return 8;\nbreak;\ncase 3:return 9;\nbreak;\ncase 4:return 22;\nbreak;\ncase 5:return 23;\nbreak;\ncase 6: this.begin(\"acc_title\");return 24; \nbreak;\ncase 7: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 8: this.begin(\"acc_descr\");return 26; \nbreak;\ncase 9: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 10: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 11: this.popState(); \nbreak;\ncase 12:return \"acc_descr_multiline_value\";\nbreak;\ncase 13:/* skip comments */\nbreak;\ncase 14:c /* skip comments */\nbreak;\ncase 15:return 12;\nbreak;\ncase 16:/* skip whitespace */\nbreak;\ncase 17:return 11;\nbreak;\ncase 18:return 15;\nbreak;\ncase 19:return 16;\nbreak;\ncase 20:return 17;\nbreak;\ncase 21:return 18;\nbreak;\ncase 22: this.begin(\"person_ext\"); return 45;\nbreak;\ncase 23: this.begin(\"person\"); return 44;\nbreak;\ncase 24: this.begin(\"system_ext_queue\"); return 51;\nbreak;\ncase 25: this.begin(\"system_ext_db\"); return 50;\nbreak;\ncase 26: this.begin(\"system_ext\"); return 49;\nbreak;\ncase 27: this.begin(\"system_queue\"); return 48;\nbreak;\ncase 28: this.begin(\"system_db\"); return 47;\nbreak;\ncase 29: this.begin(\"system\"); return 46;\nbreak;\ncase 30: this.begin(\"boundary\"); return 37;\nbreak;\ncase 31: this.begin(\"enterprise_boundary\"); return 34;\nbreak;\ncase 32: this.begin(\"system_boundary\"); return 36;\nbreak;\ncase 33: this.begin(\"container_ext_queue\"); return 57;\nbreak;\ncase 34: this.begin(\"container_ext_db\"); return 56;\nbreak;\ncase 35: this.begin(\"container_ext\"); return 55;\nbreak;\ncase 36: this.begin(\"container_queue\"); return 54;\nbreak;\ncase 37: this.begin(\"container_db\"); return 53;\nbreak;\ncase 38: this.begin(\"container\"); return 52;\nbreak;\ncase 39: this.begin(\"container_boundary\"); return 38;\nbreak;\ncase 40: this.begin(\"component_ext_queue\"); return 63;\nbreak;\ncase 41: this.begin(\"component_ext_db\"); return 62;\nbreak;\ncase 42: this.begin(\"component_ext\"); return 61;\nbreak;\ncase 43: this.begin(\"component_queue\"); return 60;\nbreak;\ncase 44: this.begin(\"component_db\"); return 59;\nbreak;\ncase 45: this.begin(\"component\"); return 58;\nbreak;\ncase 46: this.begin(\"node\"); return 39;\nbreak;\ncase 47: this.begin(\"node\"); return 39;\nbreak;\ncase 48: this.begin(\"node_l\"); return 40;\nbreak;\ncase 49: this.begin(\"node_r\"); return 41;\nbreak;\ncase 50: this.begin(\"rel\"); return 64;\nbreak;\ncase 51: this.begin(\"birel\"); return 65;\nbreak;\ncase 52: this.begin(\"rel_u\"); return 66;\nbreak;\ncase 53: this.begin(\"rel_u\"); return 66;\nbreak;\ncase 54: this.begin(\"rel_d\"); return 67;\nbreak;\ncase 55: this.begin(\"rel_d\"); return 67;\nbreak;\ncase 56: this.begin(\"rel_l\"); return 68;\nbreak;\ncase 57: this.begin(\"rel_l\"); return 68;\nbreak;\ncase 58: this.begin(\"rel_r\"); return 69;\nbreak;\ncase 59: this.begin(\"rel_r\"); return 69;\nbreak;\ncase 60: this.begin(\"rel_b\"); return 70;\nbreak;\ncase 61: this.begin(\"rel_index\"); return 71;\nbreak;\ncase 62: this.begin(\"update_el_style\"); return 72;\nbreak;\ncase 63: this.begin(\"update_rel_style\"); return 73;\nbreak;\ncase 64: this.begin(\"update_layout_config\"); return 74;\nbreak;\ncase 65:return \"EOF_IN_STRUCT\";\nbreak;\ncase 66: this.begin(\"attribute\"); return \"ATTRIBUTE_EMPTY\";\nbreak;\ncase 67: this.begin(\"attribute\"); \nbreak;\ncase 68: this.popState();this.popState();\nbreak;\ncase 69: return 80;\nbreak;\ncase 70: \nbreak;\ncase 71: return 80;\nbreak;\ncase 72: this.begin(\"string\");\nbreak;\ncase 73: this.popState(); \nbreak;\ncase 74: return \"STR\";\nbreak;\ncase 75: this.begin(\"string_kv\");\nbreak;\ncase 76: this.begin(\"string_kv_key\"); return \"STR_KEY\";\nbreak;\ncase 77: this.popState(); this.begin(\"string_kv_value\"); \nbreak;\ncase 78: return \"STR_VALUE\";\nbreak;\ncase 79: this.popState(); this.popState(); \nbreak;\ncase 80: return \"STR\";\nbreak;\ncase 81: /* this.begin(\"lbrace\"); */ return \"LBRACE\";\nbreak;\ncase 82: /* this.popState(); */ return \"RBRACE\";\nbreak;\ncase 83:return 'SPACE';\nbreak;\ncase 84:return 'EOL';\nbreak;\ncase 85:return 14;\nbreak;\n}\n},\nrules: [/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:title\\s[^#\\n;]+)/,/^(?:accDescription\\s[^#\\n;]+)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:C4Context\\b)/,/^(?:C4Container\\b)/,/^(?:C4Component\\b)/,/^(?:C4Dynamic\\b)/,/^(?:C4Deployment\\b)/,/^(?:Person_Ext\\b)/,/^(?:Person\\b)/,/^(?:SystemQueue_Ext\\b)/,/^(?:SystemDb_Ext\\b)/,/^(?:System_Ext\\b)/,/^(?:SystemQueue\\b)/,/^(?:SystemDb\\b)/,/^(?:System\\b)/,/^(?:Boundary\\b)/,/^(?:Enterprise_Boundary\\b)/,/^(?:System_Boundary\\b)/,/^(?:ContainerQueue_Ext\\b)/,/^(?:ContainerDb_Ext\\b)/,/^(?:Container_Ext\\b)/,/^(?:ContainerQueue\\b)/,/^(?:ContainerDb\\b)/,/^(?:Container\\b)/,/^(?:Container_Boundary\\b)/,/^(?:ComponentQueue_Ext\\b)/,/^(?:ComponentDb_Ext\\b)/,/^(?:Component_Ext\\b)/,/^(?:ComponentQueue\\b)/,/^(?:ComponentDb\\b)/,/^(?:Component\\b)/,/^(?:Deployment_Node\\b)/,/^(?:Node\\b)/,/^(?:Node_L\\b)/,/^(?:Node_R\\b)/,/^(?:Rel\\b)/,/^(?:BiRel\\b)/,/^(?:Rel_Up\\b)/,/^(?:Rel_U\\b)/,/^(?:Rel_Down\\b)/,/^(?:Rel_D\\b)/,/^(?:Rel_Left\\b)/,/^(?:Rel_L\\b)/,/^(?:Rel_Right\\b)/,/^(?:Rel_R\\b)/,/^(?:Rel_Back\\b)/,/^(?:RelIndex\\b)/,/^(?:UpdateElementStyle\\b)/,/^(?:UpdateRelStyle\\b)/,/^(?:UpdateLayoutConfig\\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*[\"][\"])/,/^(?:[ ]*[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[ ]*[\\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*[\"])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:[^,]+)/,/^(?:\\{)/,/^(?:\\})/,/^(?:[\\s]+)/,/^(?:[\\n\\r]+)/,/^(?:$)/],\nconditions: {\"acc_descr_multiline\":{\"rules\":[11,12],\"inclusive\":false},\"acc_descr\":{\"rules\":[9],\"inclusive\":false},\"acc_title\":{\"rules\":[7],\"inclusive\":false},\"string_kv_value\":{\"rules\":[78,79],\"inclusive\":false},\"string_kv_key\":{\"rules\":[77],\"inclusive\":false},\"string_kv\":{\"rules\":[76],\"inclusive\":false},\"string\":{\"rules\":[73,74],\"inclusive\":false},\"attribute\":{\"rules\":[68,69,70,71,72,75,80],\"inclusive\":false},\"update_layout_config\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"update_rel_style\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"update_el_style\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_b\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_r\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_l\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_d\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_u\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"rel_bi\":{\"rules\":[],\"inclusive\":false},\"rel\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"node_r\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"node_l\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"node\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"index\":{\"rules\":[],\"inclusive\":false},\"rel_index\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_ext_queue\":{\"rules\":[],\"inclusive\":false},\"component_ext_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"component\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_ext_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_ext_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"container\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"birel\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"enterprise_boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"boundary\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_ext_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_ext_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_queue\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system_db\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"system\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"person_ext\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"person\":{\"rules\":[65,66,67,68],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * assignWithDepth Extends the functionality of {@link Object.assign} with the\n * ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)\n * performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of\n * undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to `{}` and\n * effectively merged with src[`k`]

    Additionally, dissimilar types will not clobber unless the\n * config.clobber parameter === true. Example:\n *\n * ```\n * const config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * const config_1 = { foo: 'foo', bar: 'bar' };\n * const result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n *\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a\n * destructured array of objects and dst is not an array, assignWithDepth will apply each element\n * of src to dst in order.\n * @param dst - The destination of the merge\n * @param src - The source object(s) to merge into destination\n * @param config -\n * * depth: depth to traverse within src and dst for merging\n * * clobber: should dissimilar types clobber\n */\nconst assignWithDepth = (\n dst: any,\n src: any,\n { depth = 2, clobber = false }: { depth?: number; clobber?: boolean } = {}\n): any => {\n const config: { depth: number; clobber: boolean } = { depth, clobber };\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach((s) => assignWithDepth(dst, s, config));\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach((s) => {\n if (!dst.includes(s)) {\n dst.push(s);\n }\n });\n return dst;\n }\n if (dst === undefined || depth <= 0) {\n if (dst !== undefined && dst !== null && typeof dst === 'object' && typeof src === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n if (src !== undefined && typeof dst === 'object' && typeof src === 'object') {\n Object.keys(src).forEach((key) => {\n if (\n typeof src[key] === 'object' &&\n (dst[key] === undefined || typeof dst[key] === 'object')\n ) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });\n } else if (clobber || (typeof dst[key] !== 'object' && typeof src[key] !== 'object')) {\n dst[key] = src[key];\n }\n });\n }\n return dst;\n};\n\nexport default assignWithDepth;\n", "/* IMPORT */\n/* MAIN */\nconst Channel = {\n /* CLAMP */\n min: {\n r: 0,\n g: 0,\n b: 0,\n s: 0,\n l: 0,\n a: 0\n },\n max: {\n r: 255,\n g: 255,\n b: 255,\n h: 360,\n s: 100,\n l: 100,\n a: 1\n },\n clamp: {\n r: (r) => r >= 255 ? 255 : (r < 0 ? 0 : r),\n g: (g) => g >= 255 ? 255 : (g < 0 ? 0 : g),\n b: (b) => b >= 255 ? 255 : (b < 0 ? 0 : b),\n h: (h) => h % 360,\n s: (s) => s >= 100 ? 100 : (s < 0 ? 0 : s),\n l: (l) => l >= 100 ? 100 : (l < 0 ? 0 : l),\n a: (a) => a >= 1 ? 1 : (a < 0 ? 0 : a)\n },\n /* CONVERSION */\n //SOURCE: https://planetcalc.com/7779\n toLinear: (c) => {\n const n = c / 255;\n return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n },\n //SOURCE: https://gist.github.com/mjackson/5311256\n hue2rgb: (p, q, t) => {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n },\n hsl2rgb: ({ h, s, l }, channel) => {\n if (!s)\n return l * 2.55; // Achromatic\n h /= 360;\n s /= 100;\n l /= 100;\n const q = (l < .5) ? l * (1 + s) : (l + s) - (l * s);\n const p = 2 * l - q;\n switch (channel) {\n case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n case 'g': return Channel.hue2rgb(p, q, h) * 255;\n case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n }\n },\n rgb2hsl: ({ r, g, b }, channel) => {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n if (channel === 'l')\n return l * 100;\n if (max === min)\n return 0; // Achromatic\n const d = max - min;\n const s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n if (channel === 's')\n return s * 100;\n switch (max) {\n case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n case g: return ((b - r) / d + 2) * 60;\n case b: return ((r - g) / d + 4) * 60;\n default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n }\n }\n};\n/* EXPORT */\nexport default Channel;\n", "/* MAIN */\nconst Lang = {\n /* API */\n clamp: (number, lower, upper) => {\n if (lower > upper)\n return Math.min(lower, Math.max(upper, number));\n return Math.min(upper, Math.max(lower, number));\n },\n round: (number) => {\n return Math.round(number * 10000000000) / 10000000000;\n }\n};\n/* EXPORT */\nexport default Lang;\n", "/* MAIN */\nconst Unit = {\n /* API */\n dec2hex: (dec) => {\n const hex = Math.round(dec).toString(16);\n return hex.length > 1 ? hex : `0${hex}`;\n }\n};\n/* EXPORT */\nexport default Unit;\n", "/* IMPORT */\nimport channel from './channel.js';\nimport lang from './lang.js';\nimport unit from './unit.js';\n/* MAIN */\nconst Utils = {\n channel,\n lang,\n unit\n};\n/* EXPORT */\nexport default Utils;\n", "/* IMPORT */\nimport _ from './utils/index.js';\n/* MAIN */\nconst DEC2HEX = {};\nfor (let i = 0; i <= 255; i++)\n DEC2HEX[i] = _.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\nconst TYPE = {\n ALL: 0,\n RGB: 1,\n HSL: 2\n};\n/* EXPORT */\nexport { DEC2HEX, TYPE };\n", "/* IMPORT */\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Type {\n constructor() {\n /* VARIABLES */\n this.type = TYPE.ALL;\n }\n /* API */\n get() {\n return this.type;\n }\n set(type) {\n if (this.type && this.type !== type)\n throw new Error('Cannot change both RGB and HSL channels at the same time');\n this.type = type;\n }\n reset() {\n this.type = TYPE.ALL;\n }\n is(type) {\n return this.type === type;\n }\n}\n/* EXPORT */\nexport default Type;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Type from './type.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Channels {\n /* CONSTRUCTOR */\n constructor(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type = new Type();\n }\n /* API */\n set(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type.type = TYPE.ALL;\n return this;\n }\n /* HELPERS */\n _ensureHSL() {\n const data = this.data;\n const { h, s, l } = data;\n if (h === undefined)\n data.h = _.channel.rgb2hsl(data, 'h');\n if (s === undefined)\n data.s = _.channel.rgb2hsl(data, 's');\n if (l === undefined)\n data.l = _.channel.rgb2hsl(data, 'l');\n }\n _ensureRGB() {\n const data = this.data;\n const { r, g, b } = data;\n if (r === undefined)\n data.r = _.channel.hsl2rgb(data, 'r');\n if (g === undefined)\n data.g = _.channel.hsl2rgb(data, 'g');\n if (b === undefined)\n data.b = _.channel.hsl2rgb(data, 'b');\n }\n /* GETTERS */\n get r() {\n const data = this.data;\n const r = data.r;\n if (!this.type.is(TYPE.HSL) && r !== undefined)\n return r;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'r');\n }\n get g() {\n const data = this.data;\n const g = data.g;\n if (!this.type.is(TYPE.HSL) && g !== undefined)\n return g;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'g');\n }\n get b() {\n const data = this.data;\n const b = data.b;\n if (!this.type.is(TYPE.HSL) && b !== undefined)\n return b;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'b');\n }\n get h() {\n const data = this.data;\n const h = data.h;\n if (!this.type.is(TYPE.RGB) && h !== undefined)\n return h;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'h');\n }\n get s() {\n const data = this.data;\n const s = data.s;\n if (!this.type.is(TYPE.RGB) && s !== undefined)\n return s;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 's');\n }\n get l() {\n const data = this.data;\n const l = data.l;\n if (!this.type.is(TYPE.RGB) && l !== undefined)\n return l;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'l');\n }\n get a() {\n return this.data.a;\n }\n /* SETTERS */\n set r(r) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.r = r;\n }\n set g(g) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.g = g;\n }\n set b(b) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.b = b;\n }\n set h(h) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.h = h;\n }\n set s(s) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.s = s;\n }\n set l(l) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.l = l;\n }\n set a(a) {\n this.changed = true;\n this.data.a = a;\n }\n}\n/* EXPORT */\nexport default Channels;\n", "/* IMPORT */\nimport Channels from './/index.js';\n/* MAIN */\nconst channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexport default channels;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport { DEC2HEX } from '../constants.js';\n/* MAIN */\nconst Hex = {\n /* VARIABLES */\n re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n /* API */\n parse: (color) => {\n if (color.charCodeAt(0) !== 35)\n return; // '#'\n const match = color.match(Hex.re);\n if (!match)\n return;\n const hex = match[1];\n const dec = parseInt(hex, 16);\n const length = hex.length;\n const hasAlpha = length % 4 === 0;\n const isFullLength = length > 4;\n const multiplier = isFullLength ? 1 : 17;\n const bits = isFullLength ? 8 : 4;\n const bitsOffset = hasAlpha ? 0 : -1;\n const mask = isFullLength ? 255 : 15;\n return ChannelsReusable.set({\n r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // #RRGGBBAA\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;\n }\n else { // #RRGGBB\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;\n }\n }\n};\n/* EXPORT */\nexport default Hex;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst HSL = {\n /* VARIABLES */\n re: /^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,\n hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n /* HELPERS */\n _hue2deg: (hue) => {\n const match = hue.match(HSL.hueRe);\n if (match) {\n const [, number, unit] = match;\n switch (unit) {\n case 'grad': return _.channel.clamp.h(parseFloat(number) * .9);\n case 'rad': return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n case 'turn': return _.channel.clamp.h(parseFloat(number) * 360);\n }\n }\n return _.channel.clamp.h(parseFloat(hue));\n },\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 104 && charCode !== 72)\n return; // 'h'/'H'\n const match = color.match(HSL.re);\n if (!match)\n return;\n const [, h, s, l, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n h: HSL._hue2deg(h),\n s: _.channel.clamp.s(parseFloat(s)),\n l: _.channel.clamp.l(parseFloat(l)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { h, s, l, a } = channels;\n if (a < 1) { // HSLA\n return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`;\n }\n else { // HSL\n return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`;\n }\n }\n};\n/* EXPORT */\nexport default HSL;\n", "/* IMPORT */\nimport Hex from './hex.js';\n/* MAIN */\nconst Keyword = {\n /* VARIABLES */\n colors: {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyanaqua: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n transparent: '#00000000',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n },\n /* API */\n parse: (color) => {\n color = color.toLowerCase();\n const hex = Keyword.colors[color];\n if (!hex)\n return;\n return Hex.parse(hex);\n },\n stringify: (channels) => {\n const hex = Hex.stringify(channels);\n for (const name in Keyword.colors) {\n if (Keyword.colors[name] === hex)\n return name;\n }\n return;\n }\n};\n/* EXPORT */\nexport default Keyword;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst RGB = {\n /* VARIABLES */\n re: /^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 114 && charCode !== 82)\n return; // 'r'/'R'\n const match = color.match(RGB.re);\n if (!match)\n return;\n const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // RGBA\n return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`;\n }\n else { // RGB\n return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`;\n }\n }\n};\n/* EXPORT */\nexport default RGB;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Hex from './hex.js';\nimport HSL from './hsl.js';\nimport Keyword from './keyword.js';\nimport RGB from './rgb.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nconst Color = {\n /* VARIABLES */\n format: {\n keyword: Keyword,\n hex: Hex,\n rgb: RGB,\n rgba: RGB,\n hsl: HSL,\n hsla: HSL\n },\n /* API */\n parse: (color) => {\n if (typeof color !== 'string')\n return color;\n const channels = Hex.parse(color) || RGB.parse(color) || HSL.parse(color) || Keyword.parse(color); // Color providers ordered with performance in mind\n if (channels)\n return channels;\n throw new Error(`Unsupported color format: \"${color}\"`);\n },\n stringify: (channels) => {\n // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n if (!channels.changed && channels.color)\n return channels.color;\n if (channels.type.is(TYPE.HSL) || channels.data.r === undefined) {\n return HSL.stringify(channels);\n }\n else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n return RGB.stringify(channels);\n }\n else {\n return Hex.stringify(channels);\n }\n }\n};\n/* EXPORT */\nexport default Color;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst change = (color, channels) => {\n const ch = Color.parse(color);\n for (const c in channels) {\n ch[c] = _.channel.clamp[c](channels[c]);\n }\n return Color.stringify(ch);\n};\n/* EXPORT */\nexport default change;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst rgba = (r, g, b = 0, a = 1) => {\n if (typeof r !== 'number')\n return change(r, { a: g });\n const channels = ChannelsReusable.set({\n r: _.channel.clamp.r(r),\n g: _.channel.clamp.g(g),\n b: _.channel.clamp.b(b),\n a: _.channel.clamp.a(a)\n });\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default rgba;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst channel = (color, channel) => {\n return _.lang.round(Color.parse(color)[channel]);\n};\n/* EXPORT */\nexport default channel;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n const { r, g, b } = Color.parse(color);\n const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n", "/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n", "/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst adjustChannel = (color, channel, amount) => {\n const channels = Color.parse(color);\n const amountCurrent = channels[channel];\n const amountNext = _.channel.clamp[channel](amountCurrent + amount);\n if (amountCurrent !== amountNext)\n channels[channel] = amountNext;\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default adjustChannel;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst lighten = (color, amount) => {\n return adjustChannel(color, 'l', amount);\n};\n/* EXPORT */\nexport default lighten;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst darken = (color, amount) => {\n return adjustChannel(color, 'l', -amount);\n};\n/* EXPORT */\nexport default darken;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst adjust = (color, channels) => {\n const ch = Color.parse(color);\n const changes = {};\n for (const c in channels) {\n if (!channels[c])\n continue;\n changes[c] = ch[c] + channels[c];\n }\n return change(color, changes);\n};\n/* EXPORT */\nexport default adjust;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport rgba from './rgba.js';\n/* MAIN */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nconst mix = (color1, color2, weight = 50) => {\n const { r: r1, g: g1, b: b1, a: a1 } = Color.parse(color1);\n const { r: r2, g: g2, b: b2, a: a2 } = Color.parse(color2);\n const weightScale = weight / 100;\n const weightNormalized = (weightScale * 2) - 1;\n const alphaDelta = a1 - a2;\n const weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);\n const weight1 = (weight1combined + 1) / 2;\n const weight2 = 1 - weight1;\n const r = (r1 * weight1) + (r2 * weight2);\n const g = (g1 * weight1) + (g2 * weight2);\n const b = (b1 * weight1) + (b2 * weight2);\n const a = (a1 * weightScale) + (a2 * (1 - weightScale));\n return rgba(r, g, b, a);\n};\n/* EXPORT */\nexport default mix;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport mix from './mix.js';\n/* MAIN */\nconst invert = (color, weight = 100) => {\n const inverse = Color.parse(color);\n inverse.r = 255 - inverse.r;\n inverse.g = 255 - inverse.g;\n inverse.b = 255 - inverse.b;\n return mix(inverse, color, weight);\n};\n/* EXPORT */\nexport default invert;\n", "/* IMPORT */\nimport hex from './rgba.js'; // Alias\nimport rgb from './rgba.js'; // Alias\nimport rgba from './rgba.js';\nimport hsl from './hsla.js'; // Alias\nimport hsla from './hsla.js';\nimport toKeyword from './to_keyword.js';\nimport toHex from './to_hex.js';\nimport toRgba from './to_rgba.js';\nimport toHsla from './to_hsla.js';\nimport channel from './channel.js';\nimport red from './red.js';\nimport green from './green.js';\nimport blue from './blue.js';\nimport hue from './hue.js';\nimport saturation from './saturation.js';\nimport lightness from './lightness.js';\nimport alpha from './alpha.js';\nimport opacity from './alpha.js'; // Alias\nimport contrast from './contrast.js';\nimport luminance from './luminance.js';\nimport isDark from './is_dark.js';\nimport isLight from './is_light.js';\nimport isTransparent from './is_transparent.js';\nimport isValid from './is_valid.js';\nimport saturate from './saturate.js';\nimport desaturate from './desaturate.js';\nimport lighten from './lighten.js';\nimport darken from './darken.js';\nimport opacify from './opacify.js';\nimport fadeIn from './opacify.js'; // Alias\nimport transparentize from './transparentize.js';\nimport fadeOut from './transparentize.js'; // Alias\nimport complement from './complement.js';\nimport grayscale from './grayscale.js';\nimport adjust from './adjust.js';\nimport change from './change.js';\nimport invert from './invert.js';\nimport mix from './mix.js';\nimport scale from './scale.js';\n/* EXPORT */\nexport { \n/* CREATE */\nhex, rgb, rgba, hsl, hsla, \n/* CONVERT */\ntoKeyword, toHex, toRgba, toHsla, \n/* GET - CHANNEL */\nchannel, red, green, blue, hue, saturation, lightness, alpha, opacity, \n/* GET - MORE */\ncontrast, luminance, isDark, isLight, isTransparent, isValid, \n/* EDIT - CHANNEL */\nsaturate, desaturate, lighten, darken, opacify, fadeIn, transparentize, fadeOut, complement, grayscale, \n/* EDIT - MORE */\nadjust, change, invert, mix, scale };\n", "/* EXPORT */\nexport * from './methods/index.js';\n", "/**\n * Values that have been hardcoded in src/diagrams/er/styles.js. These can be used by\n * theme-_._ files to maintain display styles until themes, styles, renderers are revised. --\n * 2022-09-22\n */\nexport const oldAttributeBackgroundColorOdd = '#ffffff';\nexport const oldAttributeBackgroundColorEven = '#f2f2f2';\n", "import { adjust } from 'khroma';\n\nexport const mkBorder = (col, darkMode) =>\n darkMode ? adjust(col, { s: -40, l: 10 }) : adjust(col, { s: -40, l: -10 });\n", "import { adjust, darken, invert, isDark, lighten } from 'khroma';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n constructor() {\n /** # Base variables */\n /**\n * - Background - used to know what the background color is of the diagram. This is used for\n * deducing colors for instance line color. Default value is #f4f4f4.\n */\n this.background = '#f4f4f4';\n\n this.primaryColor = '#fff4dd';\n\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = '#333';\n\n this.THEME_COLOR_LIMIT = 12;\n\n // dark\n\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n }\n updateColors() {\n // The || is to make sure that if the variable has been defined by a user override that value is to be used\n\n /* Main */\n this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor);\n this.secondaryColor = this.secondaryColor || adjust(this.primaryColor, { h: -120 });\n this.tertiaryColor = this.tertiaryColor || adjust(this.primaryColor, { h: 180, l: 5 });\n\n this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor =\n this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor =\n this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode);\n this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode);\n this.noteBkgColor = this.noteBkgColor || '#fff5ad';\n this.noteTextColor = this.noteTextColor || '#333';\n\n this.secondaryTextColor = this.secondaryTextColor || invert(this.secondaryColor);\n this.tertiaryTextColor = this.tertiaryTextColor || invert(this.tertiaryColor);\n this.lineColor = this.lineColor || invert(this.background);\n this.arrowheadColor = this.arrowheadColor || invert(this.background);\n this.textColor = this.textColor || this.primaryTextColor;\n\n // TODO: should this instead default to secondaryBorderColor?\n this.border2 = this.border2 || this.tertiaryBorderColor;\n\n /* Flowchart variables */\n this.nodeBkg = this.nodeBkg || this.primaryColor;\n this.mainBkg = this.mainBkg || this.primaryColor;\n this.nodeBorder = this.nodeBorder || this.primaryBorderColor;\n this.clusterBkg = this.clusterBkg || this.tertiaryColor;\n this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;\n this.defaultLinkColor = this.defaultLinkColor || this.lineColor;\n this.titleColor = this.titleColor || this.tertiaryTextColor;\n this.edgeLabelBackground =\n this.edgeLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = this.actorBorder || this.primaryBorderColor;\n this.actorBkg = this.actorBkg || this.mainBkg;\n this.actorTextColor = this.actorTextColor || this.primaryTextColor;\n this.actorLineColor = this.actorLineColor || this.actorBorder;\n this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;\n this.signalColor = this.signalColor || this.textColor;\n this.signalTextColor = this.signalTextColor || this.textColor;\n this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;\n this.labelTextColor = this.labelTextColor || this.actorTextColor;\n this.loopTextColor = this.loopTextColor || this.actorTextColor;\n this.activationBorderColor = this.activationBorderColor || darken(this.secondaryColor, 10);\n this.activationBkgColor = this.activationBkgColor || this.secondaryColor;\n this.sequenceNumberColor = this.sequenceNumberColor || invert(this.lineColor);\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;\n this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;\n this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;\n this.excludeBkgColor = this.excludeBkgColor || '#eeeeee';\n this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n this.taskBkgColor = this.taskBkgColor || this.primaryColor;\n this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;\n this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(this.primaryColor, 23);\n this.gridColor = this.gridColor || 'lightgrey';\n this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey';\n this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey';\n this.critBorderColor = this.critBorderColor || '#ff8888';\n this.critBkgColor = this.critBkgColor || 'red';\n this.todayLineColor = this.todayLineColor || 'red';\n this.taskTextColor = this.taskTextColor || this.textColor;\n this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;\n this.taskTextLightColor = this.taskTextLightColor || this.textColor;\n this.taskTextColor = this.taskTextColor || this.primaryTextColor;\n this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;\n this.taskTextClickableColor = this.taskTextClickableColor || '#003163';\n\n /* Sequence Diagram variables */\n\n this.personBorder = this.personBorder || this.primaryBorderColor;\n this.personBkg = this.personBkg || this.mainBkg;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n /* The color of the text tables of the states*/\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || this.tertiaryColor;\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.nodeBorder;\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n this.specialStateColor = this.lineColor;\n\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210, l: 150 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n if (this.darkMode) {\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScale' + i] = darken(this['cScale' + i], 75);\n }\n } else {\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScale' + i] = darken(this['cScale' + i], 25);\n }\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n if (this.darkMode) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n } else {\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 10);\n }\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n const multiplier = this.darkMode ? -4 : -1;\n for (let i = 0; i < 5; i++) {\n this['surface' + i] =\n this['surface' + i] ||\n adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] ||\n adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\n }\n\n /* class */\n this.classText = this.classText || this.textColor;\n\n /* user-journey */\n this.fillType0 = this.fillType0 || this.primaryColor;\n this.fillType1 = this.fillType1 || this.secondaryColor;\n this.fillType2 = this.fillType2 || adjust(this.primaryColor, { h: 64 });\n this.fillType3 = this.fillType3 || adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = this.fillType4 || adjust(this.primaryColor, { h: -64 });\n this.fillType5 = this.fillType5 || adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = this.fillType6 || adjust(this.primaryColor, { h: 128 });\n this.fillType7 = this.fillType7 || adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || this.tertiaryColor;\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground =\n this.relationLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.branchLabelColor =\n this.branchLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor;\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor;\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { adjust, darken, invert, isDark, lighten, rgba } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n constructor() {\n this.background = '#333';\n this.primaryColor = '#1f2020';\n this.secondaryColor = lighten(this.primaryColor, 16);\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = invert(this.background);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n this.mainBkg = '#1f2020';\n this.secondBkg = 'calculated';\n this.mainContrastColor = 'lightgrey';\n this.darkTextColor = lighten(invert('#323D47'), 10);\n this.lineColor = 'calculated';\n this.border1 = '#ccc';\n this.border2 = rgba(255, 255, 255, 0.25);\n this.arrowheadColor = 'calculated';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = '#181818';\n this.textColor = '#ccc';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#F9FFFE';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = 'calculated';\n this.activationBkgColor = 'calculated';\n this.sequenceNumberColor = 'black';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = darken('#EAE8D9', 30);\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = '#EAE8D9';\n this.excludeBkgColor = darken(this.sectionBkgColor, 10);\n this.taskBorderColor = rgba(255, 255, 255, 70);\n this.taskBkgColor = 'calculated';\n this.taskTextColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = rgba(255, 255, 255, 50);\n this.activeTaskBkgColor = '#81B1DB';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#E83737';\n this.critBkgColor = '#E83737';\n this.taskTextDarkColor = 'calculated';\n this.todayLineColor = '#DB5757';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* state colors */\n this.labelColor = 'calculated';\n\n this.errorBkgColor = '#a44141';\n this.errorTextColor = '#ddd';\n }\n updateColors() {\n this.secondBkg = lighten(this.mainBkg, 16);\n this.lineColor = this.mainContrastColor;\n this.arrowheadColor = this.mainContrastColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.edgeLabelBackground = lighten(this.labelBackground, 25);\n\n /* Sequence Diagram variables */\n\n this.actorBorder = this.border1;\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.mainContrastColor;\n this.actorLineColor = this.actorBorder;\n this.signalColor = this.mainContrastColor;\n this.signalTextColor = this.mainContrastColor;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.mainContrastColor;\n this.loopTextColor = this.mainContrastColor;\n this.noteBorderColor = this.secondaryBorderColor;\n this.noteBkgColor = this.secondBkg;\n this.noteTextColor = this.secondaryTextColor;\n this.activationBorderColor = this.border1;\n this.activationBkgColor = this.secondBkg;\n\n /* Gantt chart variables */\n\n this.altSectionBkgColor = this.background;\n this.taskBkgColor = lighten(this.mainBkg, 23);\n this.taskTextColor = this.darkTextColor;\n this.taskTextLightColor = this.mainContrastColor;\n this.taskTextOutsideColor = this.taskTextLightColor;\n this.gridColor = this.mainContrastColor;\n this.doneTaskBkgColor = this.mainContrastColor;\n this.taskTextDarkColor = this.darkTextColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#555';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = '#f4f4f4'; // this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* cScale */\n this.cScale1 = this.cScale1 || '#0b0000';\n this.cScale2 = this.cScale2 || '#4d1037';\n this.cScale3 = this.cScale3 || '#3f5258';\n this.cScale4 = this.cScale4 || '#4f2f1b';\n this.cScale5 = this.cScale5 || '#6e0a0a';\n this.cScale6 = this.cScale6 || '#3b0048';\n this.cScale7 = this.cScale7 || '#995a01';\n this.cScale8 = this.cScale8 || '#154706';\n this.cScale9 = this.cScale9 || '#161722';\n this.cScale10 = this.cScale10 || '#00296f';\n this.cScale11 = this.cScale11 || '#01629c';\n this.cScale12 = this.cScale12 || '#010029';\n\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] =\n this['surface' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n /* Pie diagram */\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['pie' + i] = this['cScale' + i];\n }\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22',\n };\n\n this.packet = {\n startByteColor: this.primaryTextColor,\n endByteColor: this.primaryTextColor,\n labelColor: this.primaryTextColor,\n titleColor: this.primaryTextColor,\n blockStrokeColor: this.primaryTextColor,\n blockFillColor: this.background,\n };\n\n /* class */\n this.classText = this.primaryTextColor;\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground =\n this.relationLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = lighten(this.secondaryColor, 20);\n this.git1 = lighten(this.pie2 || this.secondaryColor, 20);\n this.git2 = lighten(this.pie3 || this.tertiaryColor, 20);\n this.git3 = lighten(this.pie4 || adjust(this.primaryColor, { h: -30 }), 20);\n this.git4 = lighten(this.pie5 || adjust(this.primaryColor, { h: -60 }), 20);\n this.git5 = lighten(this.pie6 || adjust(this.primaryColor, { h: -90 }), 10);\n this.git6 = lighten(this.pie7 || adjust(this.primaryColor, { h: +60 }), 10);\n this.git7 = lighten(this.pie8 || adjust(this.primaryColor, { h: +120 }), 20);\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || lighten(this.background, 12);\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || lighten(this.background, 2);\n /* -------------------------------------------------- */\n\n this.nodeBorder = this.nodeBorder || '#999';\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { invert, lighten, rgba, adjust, darken, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.background = '#f4f4f4';\n this.primaryColor = '#ECECFF';\n\n this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n this.secondaryColor = '#ffffde';\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n this.background = 'white';\n this.mainBkg = '#ECECFF';\n this.secondBkg = '#ffffde';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.border2 = '#aaaa33';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = 'rgba(232,232,232, 0.8)';\n this.textColor = '#333';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = 'calculated';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.taskTextClickableColor = 'calculated';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n this.sectionBkgColor = rgba(102, 102, 255, 0.49);\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#fff400';\n this.taskBorderColor = '#534fbc';\n this.taskBkgColor = '#8a90dd';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = '#534fbc';\n this.activeTaskBkgColor = '#bfc7ff';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n this.updateColors();\n }\n updateColors() {\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n this['cScalePeer' + 1] = this['cScalePeer' + 1] || darken(this.secondaryColor, 45);\n this['cScalePeer' + 2] = this['cScalePeer' + 2] || darken(this.tertiaryColor, 40);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n // Setup the peer color for the set, useful for borders\n this['cScale' + i] = darken(this['cScale' + i], 10);\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 25);\n }\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] = this['surface' + i] || adjust(this.mainBkg, { h: 30, l: -(5 + i * 5) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, l: -(7 + i * 5) });\n }\n // Setup the label color for the set\n this.scaleLabelColor =\n this.scaleLabelColor !== 'calculated' && this.scaleLabelColor\n ? this.scaleLabelColor\n : this.labelTextColor;\n\n if (this.labelTextColor !== 'calculated') {\n this.cScaleLabel0 = this.cScaleLabel0 || invert(this.labelTextColor);\n this.cScaleLabel3 = this.cScaleLabel3 || invert(this.labelTextColor);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.labelTextColor;\n }\n }\n\n /* Flowchart variables */\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1; // border 1\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n this.actorLineColor = this.actorBorder;\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f0f0f0';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.nodeBorder;\n this.specialStateColor = this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || adjust(this.tertiaryColor, { l: -40 });\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -20 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -20 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -40 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: -40 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -40 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -90, l: -40 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -30 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.labelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || darken(invert(this.git0), 25);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { adjust, darken, invert, isDark, lighten } from 'khroma';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n constructor() {\n /* Base vales */\n this.background = '#f4f4f4';\n this.primaryColor = '#cde498';\n this.secondaryColor = '#cdffb2';\n this.background = 'white';\n this.mainBkg = '#cde498';\n this.secondBkg = '#cdffb2';\n this.lineColor = 'green';\n this.border1 = '#13540c';\n this.border2 = '#6eaa49';\n this.arrowheadColor = 'green';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n\n this.tertiaryColor = lighten('#cde498', 10);\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.primaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#333';\n this.edgeLabelBackground = '#e8e8e8';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'calculated';\n this.signalColor = '#333';\n this.signalTextColor = '#333';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = '#326932';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = '#6eaa49';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#6eaa49';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = '#487e3a';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n /* Sequence Diagram variables */\n this.actorBorder = darken(this.mainBkg, 20);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n this.actorLineColor = this.actorBorder;\n\n /* Each color-set will have a background, a foreground and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n this['cScalePeer' + 1] = this['cScalePeer' + 1] || darken(this.secondaryColor, 45);\n this['cScalePeer' + 2] = this['cScalePeer' + 2] || darken(this.tertiaryColor, 40);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n // Setup the peer color for the set, useful for borders\n this['cScale' + i] = darken(this['cScale' + i], 10);\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 25);\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });\n }\n\n // Setup the label color for the set\n this.scaleLabelColor =\n this.scaleLabelColor !== 'calculated' && this.scaleLabelColor\n ? this.scaleLabelColor\n : this.labelTextColor;\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] =\n this['surface' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) });\n }\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n\n /* Gantt chart variables */\n\n this.taskBorderColor = this.border1;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f0f0f0';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || this.tertiaryColor;\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -30 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { h: +40, l: -40 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -50 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -50 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -50 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n this.packet = {\n startByteColor: this.primaryTextColor,\n endByteColor: this.primaryTextColor,\n labelColor: this.primaryTextColor,\n titleColor: this.primaryTextColor,\n blockStrokeColor: this.primaryTextColor,\n blockFillColor: this.mainBkg,\n };\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { invert, darken, lighten, adjust, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\n\n// const Color = require ( 'khroma/dist/color' ).default\n// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\nclass Theme {\n constructor() {\n this.primaryColor = '#eee';\n this.contrast = '#707070';\n this.secondaryColor = lighten(this.contrast, 55);\n this.background = '#ffffff';\n\n // this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n // this.altBackground = lighten(this.contrast, 55);\n this.mainBkg = '#eee';\n this.secondBkg = 'calculated';\n this.lineColor = '#666';\n this.border1 = '#999';\n this.border2 = 'calculated';\n this.note = '#ffa';\n this.text = '#333';\n this.critical = '#d42';\n this.done = '#bbb';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'white';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = this.actorBorder;\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = 'calculated';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = 'calculated';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n /* C4 Context Diagram variables */\n this.personBorder = this.primaryBorderColor;\n this.personBkg = this.mainBkg;\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n this.secondBkg = lighten(this.contrast, 55);\n this.border2 = this.contrast;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.text;\n this.actorLineColor = this.actorBorder;\n this.signalColor = this.text;\n this.signalTextColor = this.text;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.text;\n this.loopTextColor = this.text;\n this.noteBorderColor = '#999';\n this.noteBkgColor = '#666';\n this.noteTextColor = '#fff';\n\n /* Color Scale */\n /* Each color-set will have a background, a foreground and a border color */\n\n this.cScale0 = this.cScale0 || '#555';\n this.cScale1 = this.cScale1 || '#F4F4F4';\n this.cScale2 = this.cScale2 || '#555';\n this.cScale3 = this.cScale3 || '#BBB';\n this.cScale4 = this.cScale4 || '#777';\n this.cScale5 = this.cScale5 || '#999';\n this.cScale6 = this.cScale6 || '#DDD';\n this.cScale7 = this.cScale7 || '#FFF';\n this.cScale8 = this.cScale8 || '#DDD';\n this.cScale9 = this.cScale9 || '#BBB';\n this.cScale10 = this.cScale10 || '#999';\n this.cScale11 = this.cScale11 || '#777';\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n if (this.darkMode) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n } else {\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 10);\n }\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n\n this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1;\n this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1;\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n for (let i = 0; i < 5; i++) {\n this['surface' + i] = this['surface' + i] || adjust(this.mainBkg, { l: -(5 + i * 5) });\n this['surfacePeer' + i] =\n this['surfacePeer' + i] || adjust(this.mainBkg, { l: -(8 + i * 5) });\n }\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.text;\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = lighten(this.contrast, 30);\n this.sectionBkgColor2 = lighten(this.contrast, 30);\n\n this.taskBorderColor = darken(this.contrast, 10);\n\n this.taskBkgColor = this.contrast;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = this.text;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n this.gridColor = lighten(this.border1, 30);\n\n this.doneTaskBkgColor = this.done;\n this.doneTaskBorderColor = this.lineColor;\n this.critBkgColor = this.critical;\n this.critBorderColor = darken(this.critBkgColor, 10);\n\n this.todayLineColor = this.critBkgColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || '#000';\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f4f4f4';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.stateBorder = this.stateBorder || '#000';\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = '#222';\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n // /* pie */\n /* Pie diagram */\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['pie' + i] = this['cScale' + i];\n }\n this.pie12 = this.pie0;\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* quadrant-graph */\n this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n this.quadrant2TextFill =\n this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n this.quadrant3TextFill =\n this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n this.quadrant4TextFill =\n this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n this.quadrantPointFill =\n this.quadrantPointFill || isDark(this.quadrant1Fill)\n ? lighten(this.quadrant1Fill)\n : darken(this.quadrant1Fill);\n this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n this.quadrantInternalBorderStrokeFill =\n this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantExternalBorderStrokeFill =\n this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n /* xychart */\n this.xyChart = {\n backgroundColor: this.xyChart?.backgroundColor || this.background,\n titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n plotColorPalette:\n this.xyChart?.plotColorPalette ||\n '#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0',\n };\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || '1';\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = darken(this.pie1, 25) || this.primaryColor;\n this.git1 = this.pie2 || this.secondaryColor;\n this.git2 = this.pie3 || this.tertiaryColor;\n this.git3 = this.pie4 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.pie5 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.pie6 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.pie7 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.pie8 || adjust(this.primaryColor, { h: +120 });\n\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n\n this.branchLabelColor = this.branchLabelColor || this.labelTextColor;\n this.gitBranchLabel0 = this.branchLabelColor;\n this.gitBranchLabel1 = 'white';\n this.gitBranchLabel2 = this.branchLabelColor;\n this.gitBranchLabel3 = 'white';\n this.gitBranchLabel4 = this.branchLabelColor;\n this.gitBranchLabel5 = this.branchLabelColor;\n this.gitBranchLabel6 = this.branchLabelColor;\n this.gitBranchLabel7 = this.branchLabelColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n", "import { getThemeVariables as baseThemeVariables } from './theme-base.js';\nimport { getThemeVariables as darkThemeVariables } from './theme-dark.js';\nimport { getThemeVariables as defaultThemeVariables } from './theme-default.js';\nimport { getThemeVariables as forestThemeVariables } from './theme-forest.js';\nimport { getThemeVariables as neutralThemeVariables } from './theme-neutral.js';\n\nexport default {\n base: {\n getThemeVariables: baseThemeVariables,\n },\n dark: {\n getThemeVariables: darkThemeVariables,\n },\n default: {\n getThemeVariables: defaultThemeVariables,\n },\n forest: {\n getThemeVariables: forestThemeVariables,\n },\n neutral: {\n getThemeVariables: neutralThemeVariables,\n },\n};\n", "export default {\n \"flowchart\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"subGraphTitleMargin\": {\n \"top\": 0,\n \"bottom\": 0\n },\n \"diagramPadding\": 8,\n \"htmlLabels\": true,\n \"nodeSpacing\": 50,\n \"rankSpacing\": 50,\n \"curve\": \"basis\",\n \"padding\": 15,\n \"defaultRenderer\": \"dagre-wrapper\",\n \"wrappingWidth\": 200\n },\n \"sequence\": {\n \"useMaxWidth\": true,\n \"hideUnusedParticipants\": false,\n \"activationWidth\": 10,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"actorMargin\": 50,\n \"width\": 150,\n \"height\": 65,\n \"boxMargin\": 10,\n \"boxTextMargin\": 5,\n \"noteMargin\": 10,\n \"messageMargin\": 35,\n \"messageAlign\": \"center\",\n \"mirrorActors\": true,\n \"forceMenus\": false,\n \"bottomMarginAdj\": 1,\n \"rightAngles\": false,\n \"showSequenceNumbers\": false,\n \"actorFontSize\": 14,\n \"actorFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"actorFontWeight\": 400,\n \"noteFontSize\": 14,\n \"noteFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n \"noteFontWeight\": 400,\n \"noteAlign\": \"center\",\n \"messageFontSize\": 16,\n \"messageFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n \"messageFontWeight\": 400,\n \"wrap\": false,\n \"wrapPadding\": 10,\n \"labelBoxWidth\": 50,\n \"labelBoxHeight\": 20\n },\n \"gantt\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"barHeight\": 20,\n \"barGap\": 4,\n \"topPadding\": 50,\n \"rightPadding\": 75,\n \"leftPadding\": 75,\n \"gridLineStartPadding\": 35,\n \"fontSize\": 11,\n \"sectionFontSize\": 11,\n \"numberSectionStyles\": 4,\n \"axisFormat\": \"%Y-%m-%d\",\n \"topAxis\": false,\n \"displayMode\": \"\",\n \"weekday\": \"sunday\"\n },\n \"journey\": {\n \"useMaxWidth\": true,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"leftMargin\": 150,\n \"width\": 150,\n \"height\": 50,\n \"boxMargin\": 10,\n \"boxTextMargin\": 5,\n \"noteMargin\": 10,\n \"messageMargin\": 35,\n \"messageAlign\": \"center\",\n \"bottomMarginAdj\": 1,\n \"rightAngles\": false,\n \"taskFontSize\": 14,\n \"taskFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"taskMargin\": 50,\n \"activationWidth\": 10,\n \"textPlacement\": \"fo\",\n \"actorColours\": [\n \"#8FBC8F\",\n \"#7CFC00\",\n \"#00FFFF\",\n \"#20B2AA\",\n \"#B0E0E6\",\n \"#FFFFE0\"\n ],\n \"sectionFills\": [\n \"#191970\",\n \"#8B008B\",\n \"#4B0082\",\n \"#2F4F4F\",\n \"#800000\",\n \"#8B4513\",\n \"#00008B\"\n ],\n \"sectionColours\": [\n \"#fff\"\n ]\n },\n \"class\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"arrowMarkerAbsolute\": false,\n \"dividerMargin\": 10,\n \"padding\": 5,\n \"textHeight\": 10,\n \"defaultRenderer\": \"dagre-wrapper\",\n \"htmlLabels\": false\n },\n \"state\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"dividerMargin\": 10,\n \"sizeUnit\": 5,\n \"padding\": 8,\n \"textHeight\": 10,\n \"titleShift\": -15,\n \"noteMargin\": 10,\n \"forkWidth\": 70,\n \"forkHeight\": 7,\n \"miniPadding\": 2,\n \"fontSizeFactor\": 5.02,\n \"fontSize\": 24,\n \"labelHeight\": 16,\n \"edgeLengthFactor\": \"20\",\n \"compositTitleSize\": 35,\n \"radius\": 5,\n \"defaultRenderer\": \"dagre-wrapper\"\n },\n \"er\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"diagramPadding\": 20,\n \"layoutDirection\": \"TB\",\n \"minEntityWidth\": 100,\n \"minEntityHeight\": 75,\n \"entityPadding\": 15,\n \"stroke\": \"gray\",\n \"fill\": \"honeydew\",\n \"fontSize\": 12\n },\n \"pie\": {\n \"useMaxWidth\": true,\n \"textPosition\": 0.75\n },\n \"quadrantChart\": {\n \"useMaxWidth\": true,\n \"chartWidth\": 500,\n \"chartHeight\": 500,\n \"titleFontSize\": 20,\n \"titlePadding\": 10,\n \"quadrantPadding\": 5,\n \"xAxisLabelPadding\": 5,\n \"yAxisLabelPadding\": 5,\n \"xAxisLabelFontSize\": 16,\n \"yAxisLabelFontSize\": 16,\n \"quadrantLabelFontSize\": 16,\n \"quadrantTextTopPadding\": 5,\n \"pointTextPadding\": 5,\n \"pointLabelFontSize\": 12,\n \"pointRadius\": 5,\n \"xAxisPosition\": \"top\",\n \"yAxisPosition\": \"left\",\n \"quadrantInternalBorderStrokeWidth\": 1,\n \"quadrantExternalBorderStrokeWidth\": 2\n },\n \"xyChart\": {\n \"useMaxWidth\": true,\n \"width\": 700,\n \"height\": 500,\n \"titleFontSize\": 20,\n \"titlePadding\": 10,\n \"showTitle\": true,\n \"xAxis\": {\n \"$ref\": \"#/$defs/XYChartAxisConfig\",\n \"showLabel\": true,\n \"labelFontSize\": 14,\n \"labelPadding\": 5,\n \"showTitle\": true,\n \"titleFontSize\": 16,\n \"titlePadding\": 5,\n \"showTick\": true,\n \"tickLength\": 5,\n \"tickWidth\": 2,\n \"showAxisLine\": true,\n \"axisLineWidth\": 2\n },\n \"yAxis\": {\n \"$ref\": \"#/$defs/XYChartAxisConfig\",\n \"showLabel\": true,\n \"labelFontSize\": 14,\n \"labelPadding\": 5,\n \"showTitle\": true,\n \"titleFontSize\": 16,\n \"titlePadding\": 5,\n \"showTick\": true,\n \"tickLength\": 5,\n \"tickWidth\": 2,\n \"showAxisLine\": true,\n \"axisLineWidth\": 2\n },\n \"chartOrientation\": \"vertical\",\n \"plotReservedSpacePercent\": 50\n },\n \"requirement\": {\n \"useMaxWidth\": true,\n \"rect_fill\": \"#f9f9f9\",\n \"text_color\": \"#333\",\n \"rect_border_size\": \"0.5px\",\n \"rect_border_color\": \"#bbb\",\n \"rect_min_width\": 200,\n \"rect_min_height\": 200,\n \"fontSize\": 14,\n \"rect_padding\": 10,\n \"line_height\": 20\n },\n \"mindmap\": {\n \"useMaxWidth\": true,\n \"padding\": 10,\n \"maxNodeWidth\": 200\n },\n \"timeline\": {\n \"useMaxWidth\": true,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"leftMargin\": 150,\n \"width\": 150,\n \"height\": 50,\n \"boxMargin\": 10,\n \"boxTextMargin\": 5,\n \"noteMargin\": 10,\n \"messageMargin\": 35,\n \"messageAlign\": \"center\",\n \"bottomMarginAdj\": 1,\n \"rightAngles\": false,\n \"taskFontSize\": 14,\n \"taskFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"taskMargin\": 50,\n \"activationWidth\": 10,\n \"textPlacement\": \"fo\",\n \"actorColours\": [\n \"#8FBC8F\",\n \"#7CFC00\",\n \"#00FFFF\",\n \"#20B2AA\",\n \"#B0E0E6\",\n \"#FFFFE0\"\n ],\n \"sectionFills\": [\n \"#191970\",\n \"#8B008B\",\n \"#4B0082\",\n \"#2F4F4F\",\n \"#800000\",\n \"#8B4513\",\n \"#00008B\"\n ],\n \"sectionColours\": [\n \"#fff\"\n ],\n \"disableMulticolor\": false\n },\n \"gitGraph\": {\n \"useMaxWidth\": true,\n \"titleTopMargin\": 25,\n \"diagramPadding\": 8,\n \"nodeLabel\": {\n \"width\": 75,\n \"height\": 100,\n \"x\": -25,\n \"y\": 0\n },\n \"mainBranchName\": \"main\",\n \"mainBranchOrder\": 0,\n \"showCommitLabel\": true,\n \"showBranches\": true,\n \"rotateCommitLabel\": true,\n \"parallelCommits\": false,\n \"arrowMarkerAbsolute\": false\n },\n \"c4\": {\n \"useMaxWidth\": true,\n \"diagramMarginX\": 50,\n \"diagramMarginY\": 10,\n \"c4ShapeMargin\": 50,\n \"c4ShapePadding\": 20,\n \"width\": 216,\n \"height\": 60,\n \"boxMargin\": 10,\n \"c4ShapeInRow\": 4,\n \"nextLinePaddingX\": 0,\n \"c4BoundaryInRow\": 2,\n \"personFontSize\": 14,\n \"personFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"personFontWeight\": \"normal\",\n \"external_personFontSize\": 14,\n \"external_personFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_personFontWeight\": \"normal\",\n \"systemFontSize\": 14,\n \"systemFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"systemFontWeight\": \"normal\",\n \"external_systemFontSize\": 14,\n \"external_systemFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_systemFontWeight\": \"normal\",\n \"system_dbFontSize\": 14,\n \"system_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"system_dbFontWeight\": \"normal\",\n \"external_system_dbFontSize\": 14,\n \"external_system_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_system_dbFontWeight\": \"normal\",\n \"system_queueFontSize\": 14,\n \"system_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"system_queueFontWeight\": \"normal\",\n \"external_system_queueFontSize\": 14,\n \"external_system_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_system_queueFontWeight\": \"normal\",\n \"boundaryFontSize\": 14,\n \"boundaryFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"boundaryFontWeight\": \"normal\",\n \"messageFontSize\": 12,\n \"messageFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"messageFontWeight\": \"normal\",\n \"containerFontSize\": 14,\n \"containerFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"containerFontWeight\": \"normal\",\n \"external_containerFontSize\": 14,\n \"external_containerFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_containerFontWeight\": \"normal\",\n \"container_dbFontSize\": 14,\n \"container_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"container_dbFontWeight\": \"normal\",\n \"external_container_dbFontSize\": 14,\n \"external_container_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_container_dbFontWeight\": \"normal\",\n \"container_queueFontSize\": 14,\n \"container_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"container_queueFontWeight\": \"normal\",\n \"external_container_queueFontSize\": 14,\n \"external_container_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_container_queueFontWeight\": \"normal\",\n \"componentFontSize\": 14,\n \"componentFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"componentFontWeight\": \"normal\",\n \"external_componentFontSize\": 14,\n \"external_componentFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_componentFontWeight\": \"normal\",\n \"component_dbFontSize\": 14,\n \"component_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"component_dbFontWeight\": \"normal\",\n \"external_component_dbFontSize\": 14,\n \"external_component_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_component_dbFontWeight\": \"normal\",\n \"component_queueFontSize\": 14,\n \"component_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"component_queueFontWeight\": \"normal\",\n \"external_component_queueFontSize\": 14,\n \"external_component_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n \"external_component_queueFontWeight\": \"normal\",\n \"wrap\": true,\n \"wrapPadding\": 10,\n \"person_bg_color\": \"#08427B\",\n \"person_border_color\": \"#073B6F\",\n \"external_person_bg_color\": \"#686868\",\n \"external_person_border_color\": \"#8A8A8A\",\n \"system_bg_color\": \"#1168BD\",\n \"system_border_color\": \"#3C7FC0\",\n \"system_db_bg_color\": \"#1168BD\",\n \"system_db_border_color\": \"#3C7FC0\",\n \"system_queue_bg_color\": \"#1168BD\",\n \"system_queue_border_color\": \"#3C7FC0\",\n \"external_system_bg_color\": \"#999999\",\n \"external_system_border_color\": \"#8A8A8A\",\n \"external_system_db_bg_color\": \"#999999\",\n \"external_system_db_border_color\": \"#8A8A8A\",\n \"external_system_queue_bg_color\": \"#999999\",\n \"external_system_queue_border_color\": \"#8A8A8A\",\n \"container_bg_color\": \"#438DD5\",\n \"container_border_color\": \"#3C7FC0\",\n \"container_db_bg_color\": \"#438DD5\",\n \"container_db_border_color\": \"#3C7FC0\",\n \"container_queue_bg_color\": \"#438DD5\",\n \"container_queue_border_color\": \"#3C7FC0\",\n \"external_container_bg_color\": \"#B3B3B3\",\n \"external_container_border_color\": \"#A6A6A6\",\n \"external_container_db_bg_color\": \"#B3B3B3\",\n \"external_container_db_border_color\": \"#A6A6A6\",\n \"external_container_queue_bg_color\": \"#B3B3B3\",\n \"external_container_queue_border_color\": \"#A6A6A6\",\n \"component_bg_color\": \"#85BBF0\",\n \"component_border_color\": \"#78A8D8\",\n \"component_db_bg_color\": \"#85BBF0\",\n \"component_db_border_color\": \"#78A8D8\",\n \"component_queue_bg_color\": \"#85BBF0\",\n \"component_queue_border_color\": \"#78A8D8\",\n \"external_component_bg_color\": \"#CCCCCC\",\n \"external_component_border_color\": \"#BFBFBF\",\n \"external_component_db_bg_color\": \"#CCCCCC\",\n \"external_component_db_border_color\": \"#BFBFBF\",\n \"external_component_queue_bg_color\": \"#CCCCCC\",\n \"external_component_queue_border_color\": \"#BFBFBF\"\n },\n \"sankey\": {\n \"useMaxWidth\": true,\n \"width\": 600,\n \"height\": 400,\n \"linkColor\": \"gradient\",\n \"nodeAlignment\": \"justify\",\n \"showValues\": true,\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"block\": {\n \"useMaxWidth\": true,\n \"padding\": 8\n },\n \"packet\": {\n \"useMaxWidth\": true,\n \"rowHeight\": 32,\n \"bitWidth\": 32,\n \"bitsPerRow\": 32,\n \"showBits\": true,\n \"paddingX\": 5,\n \"paddingY\": 5\n },\n \"theme\": \"default\",\n \"look\": \"classic\",\n \"handDrawnSeed\": 0,\n \"layout\": \"dagre\",\n \"maxTextSize\": 50000,\n \"maxEdges\": 500,\n \"darkMode\": false,\n \"fontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif;\",\n \"logLevel\": 5,\n \"securityLevel\": \"strict\",\n \"startOnLoad\": true,\n \"arrowMarkerAbsolute\": false,\n \"secure\": [\n \"secure\",\n \"securityLevel\",\n \"startOnLoad\",\n \"maxTextSize\",\n \"suppressErrorRendering\",\n \"maxEdges\"\n ],\n \"legacyMathML\": false,\n \"forceLegacyMathML\": false,\n \"deterministicIds\": false,\n \"fontSize\": 16,\n \"markdownAutoWrap\": true,\n \"suppressErrorRendering\": false\n};", "import type { RequiredDeep } from 'type-fest';\n\nimport theme from './themes/index.js';\nimport type { MermaidConfig } from './config.type.js';\n\n// Uses our custom Vite jsonSchemaPlugin to load only the default values from\n// our JSON Schema\n// @ts-expect-error This file is automatically generated via a custom Vite plugin\nimport defaultConfigJson from './schemas/config.schema.yaml?only-defaults=true';\n\n/**\n * Default mermaid configuration options.\n *\n * Please see the Mermaid config JSON Schema for the default JSON values.\n * Non-JSON JS default values are listed in this file, e.g. functions, or\n * `undefined` (explicitly set so that `configKeys` finds them).\n */\nconst config: RequiredDeep = {\n ...defaultConfigJson,\n // Set, even though they're `undefined` so that `configKeys` finds these keys\n // TODO: Should we replace these with `null` so that they can go in the JSON Schema?\n deterministicIDSeed: undefined,\n elk: {\n mergeEdges: false,\n nodePlacementStrategy: 'SIMPLE',\n },\n themeCSS: undefined,\n\n // add non-JSON default config values\n themeVariables: theme.default.getThemeVariables(),\n sequence: {\n ...defaultConfigJson.sequence,\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n noteFont: function () {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight,\n };\n },\n actorFont: function () {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight,\n };\n },\n },\n gantt: {\n ...defaultConfigJson.gantt,\n tickInterval: undefined,\n useWidth: undefined, // can probably be removed since `configKeys` already includes this\n },\n c4: {\n ...defaultConfigJson.c4,\n useWidth: undefined,\n personFont: function () {\n return {\n fontFamily: this.personFontFamily,\n fontSize: this.personFontSize,\n fontWeight: this.personFontWeight,\n };\n },\n\n external_personFont: function () {\n return {\n fontFamily: this.external_personFontFamily,\n fontSize: this.external_personFontSize,\n fontWeight: this.external_personFontWeight,\n };\n },\n\n systemFont: function () {\n return {\n fontFamily: this.systemFontFamily,\n fontSize: this.systemFontSize,\n fontWeight: this.systemFontWeight,\n };\n },\n\n external_systemFont: function () {\n return {\n fontFamily: this.external_systemFontFamily,\n fontSize: this.external_systemFontSize,\n fontWeight: this.external_systemFontWeight,\n };\n },\n\n system_dbFont: function () {\n return {\n fontFamily: this.system_dbFontFamily,\n fontSize: this.system_dbFontSize,\n fontWeight: this.system_dbFontWeight,\n };\n },\n\n external_system_dbFont: function () {\n return {\n fontFamily: this.external_system_dbFontFamily,\n fontSize: this.external_system_dbFontSize,\n fontWeight: this.external_system_dbFontWeight,\n };\n },\n\n system_queueFont: function () {\n return {\n fontFamily: this.system_queueFontFamily,\n fontSize: this.system_queueFontSize,\n fontWeight: this.system_queueFontWeight,\n };\n },\n\n external_system_queueFont: function () {\n return {\n fontFamily: this.external_system_queueFontFamily,\n fontSize: this.external_system_queueFontSize,\n fontWeight: this.external_system_queueFontWeight,\n };\n },\n\n containerFont: function () {\n return {\n fontFamily: this.containerFontFamily,\n fontSize: this.containerFontSize,\n fontWeight: this.containerFontWeight,\n };\n },\n\n external_containerFont: function () {\n return {\n fontFamily: this.external_containerFontFamily,\n fontSize: this.external_containerFontSize,\n fontWeight: this.external_containerFontWeight,\n };\n },\n\n container_dbFont: function () {\n return {\n fontFamily: this.container_dbFontFamily,\n fontSize: this.container_dbFontSize,\n fontWeight: this.container_dbFontWeight,\n };\n },\n\n external_container_dbFont: function () {\n return {\n fontFamily: this.external_container_dbFontFamily,\n fontSize: this.external_container_dbFontSize,\n fontWeight: this.external_container_dbFontWeight,\n };\n },\n\n container_queueFont: function () {\n return {\n fontFamily: this.container_queueFontFamily,\n fontSize: this.container_queueFontSize,\n fontWeight: this.container_queueFontWeight,\n };\n },\n\n external_container_queueFont: function () {\n return {\n fontFamily: this.external_container_queueFontFamily,\n fontSize: this.external_container_queueFontSize,\n fontWeight: this.external_container_queueFontWeight,\n };\n },\n\n componentFont: function () {\n return {\n fontFamily: this.componentFontFamily,\n fontSize: this.componentFontSize,\n fontWeight: this.componentFontWeight,\n };\n },\n\n external_componentFont: function () {\n return {\n fontFamily: this.external_componentFontFamily,\n fontSize: this.external_componentFontSize,\n fontWeight: this.external_componentFontWeight,\n };\n },\n\n component_dbFont: function () {\n return {\n fontFamily: this.component_dbFontFamily,\n fontSize: this.component_dbFontSize,\n fontWeight: this.component_dbFontWeight,\n };\n },\n\n external_component_dbFont: function () {\n return {\n fontFamily: this.external_component_dbFontFamily,\n fontSize: this.external_component_dbFontSize,\n fontWeight: this.external_component_dbFontWeight,\n };\n },\n\n component_queueFont: function () {\n return {\n fontFamily: this.component_queueFontFamily,\n fontSize: this.component_queueFontSize,\n fontWeight: this.component_queueFontWeight,\n };\n },\n\n external_component_queueFont: function () {\n return {\n fontFamily: this.external_component_queueFontFamily,\n fontSize: this.external_component_queueFontSize,\n fontWeight: this.external_component_queueFontWeight,\n };\n },\n\n boundaryFont: function () {\n return {\n fontFamily: this.boundaryFontFamily,\n fontSize: this.boundaryFontSize,\n fontWeight: this.boundaryFontWeight,\n };\n },\n\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n },\n pie: {\n ...defaultConfigJson.pie,\n useWidth: 984,\n },\n xyChart: {\n ...defaultConfigJson.xyChart,\n useWidth: undefined,\n },\n requirement: {\n ...defaultConfigJson.requirement,\n useWidth: undefined,\n },\n packet: {\n ...defaultConfigJson.packet,\n },\n};\n\nconst keyify = (obj: any, prefix = ''): string[] =>\n Object.keys(obj).reduce((res: string[], el): string[] => {\n if (Array.isArray(obj[el])) {\n return res;\n } else if (typeof obj[el] === 'object' && obj[el] !== null) {\n return [...res, prefix + el, ...keyify(obj[el], '')];\n }\n return [...res, prefix + el];\n }, []);\n\nexport const configKeys = new Set(keyify(config, ''));\nexport default config;\n", "import { configKeys } from '../defaultConfig.js';\nimport { log } from '../logger.js';\n\n/**\n * Sanitizes directive objects\n *\n * @param args - Directive's JSON\n */\nexport const sanitizeDirective = (args: any): void => {\n log.debug('sanitizeDirective called with', args);\n\n // Return if not an object\n if (typeof args !== 'object' || args == null) {\n return;\n }\n\n // Sanitize each element if an array\n if (Array.isArray(args)) {\n args.forEach((arg) => sanitizeDirective(arg));\n return;\n }\n\n // Sanitize each key if an object\n for (const key of Object.keys(args)) {\n log.debug('Checking key', key);\n if (\n key.startsWith('__') ||\n key.includes('proto') ||\n key.includes('constr') ||\n !configKeys.has(key) ||\n args[key] == null\n ) {\n log.debug('sanitize deleting key: ', key);\n delete args[key];\n continue;\n }\n\n // Recurse if an object\n if (typeof args[key] === 'object') {\n log.debug('sanitizing object', key);\n sanitizeDirective(args[key]);\n continue;\n }\n\n const cssMatchers = ['themeCSS', 'fontFamily', 'altFontFamily'];\n for (const cssKey of cssMatchers) {\n if (key.includes(cssKey)) {\n log.debug('sanitizing css option', key);\n args[key] = sanitizeCss(args[key]);\n }\n }\n }\n\n if (args.themeVariables) {\n for (const k of Object.keys(args.themeVariables)) {\n const val = args.themeVariables[k];\n if (val?.match && !val.match(/^[\\d \"#%(),.;A-Za-z]+$/)) {\n args.themeVariables[k] = '';\n }\n }\n }\n log.debug('After sanitization', args);\n};\n\nexport const sanitizeCss = (str: string): string => {\n let startCnt = 0;\n let endCnt = 0;\n\n for (const element of str) {\n if (startCnt < endCnt) {\n return '{ /* ERROR: Unbalanced CSS */ }';\n }\n if (element === '{') {\n startCnt++;\n } else if (element === '}') {\n endCnt++;\n }\n }\n if (startCnt !== endCnt) {\n return '{ /* ERROR: Unbalanced CSS */ }';\n }\n // Todo add more checks here\n return str;\n};\n", "import assignWithDepth from './assignWithDepth.js';\nimport { log } from './logger.js';\nimport theme from './themes/index.js';\nimport config from './defaultConfig.js';\nimport type { MermaidConfig } from './config.type.js';\nimport { sanitizeDirective } from './utils/sanitizeDirective.js';\n\nexport const defaultConfig: MermaidConfig = Object.freeze(config);\n\nlet siteConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\nlet configFromInitialize: MermaidConfig;\nlet directives: MermaidConfig[] = [];\nlet currentConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\n\nexport const updateCurrentConfig = (siteCfg: MermaidConfig, _directives: MermaidConfig[]) => {\n // start with config being the siteConfig\n let cfg: MermaidConfig = assignWithDepth({}, siteCfg);\n // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta);\n\n // Join directives\n let sumOfDirectives: MermaidConfig = {};\n for (const d of _directives) {\n sanitize(d);\n // Apply the data from the directive where the overrides the themeVariables\n sumOfDirectives = assignWithDepth(sumOfDirectives, d);\n }\n\n cfg = assignWithDepth(cfg, sumOfDirectives);\n\n if (sumOfDirectives.theme && sumOfDirectives.theme in theme) {\n const tmpConfigFromInitialize = assignWithDepth({}, configFromInitialize);\n const themeVariables = assignWithDepth(\n tmpConfigFromInitialize.themeVariables || {},\n sumOfDirectives.themeVariables\n );\n if (cfg.theme && cfg.theme in theme) {\n cfg.themeVariables = theme[cfg.theme as keyof typeof theme].getThemeVariables(themeVariables);\n }\n }\n\n currentConfig = cfg;\n checkConfig(currentConfig);\n return currentConfig;\n};\n\n/**\n * ## setSiteConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------- | ----------- | --------------------------------------- |\n * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |\n *\n * **Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls\n * to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig)\n * will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this\n * function _Default value: At default, will mirror Global Config_\n *\n * @param conf - The base currentConfig to use as siteConfig\n * @returns The new siteConfig\n */\nexport const setSiteConfig = (conf: MermaidConfig): MermaidConfig => {\n siteConfig = assignWithDepth({}, defaultConfig);\n siteConfig = assignWithDepth(siteConfig, conf);\n\n // @ts-ignore: TODO Fix ts errors\n if (conf.theme && theme[conf.theme]) {\n // @ts-ignore: TODO Fix ts errors\n siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables);\n }\n\n updateCurrentConfig(siteConfig, directives);\n return siteConfig;\n};\n\nexport const saveConfigFromInitialize = (conf: MermaidConfig): void => {\n configFromInitialize = assignWithDepth({}, conf);\n};\n\nexport const updateSiteConfig = (conf: MermaidConfig): MermaidConfig => {\n siteConfig = assignWithDepth(siteConfig, conf);\n updateCurrentConfig(siteConfig, directives);\n\n return siteConfig;\n};\n/**\n * ## getSiteConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------------------- | ----------- | -------------------------------- |\n * | setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |\n *\n * **Notes**: Returns **any** values in siteConfig.\n *\n * @returns The siteConfig\n */\nexport const getSiteConfig = (): MermaidConfig => {\n return assignWithDepth({}, siteConfig);\n};\n/**\n * ## setConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------- | ----------- | --------------------------------------- |\n * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |\n *\n * **Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure\n * keys. Any values found in conf with key found in siteConfig.secure will be replaced with the\n * corresponding siteConfig value.\n *\n * @param conf - The potential currentConfig\n * @returns The currentConfig merged with the sanitized conf\n */\nexport const setConfig = (conf: MermaidConfig): MermaidConfig => {\n checkConfig(conf);\n assignWithDepth(currentConfig, conf);\n\n return getConfig();\n};\n\n/**\n * ## getConfig\n *\n * | Function | Description | Type | Return Values |\n * | --------- | ------------------------- | ----------- | ------------------------------ |\n * | getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |\n *\n * **Notes**: Avoid calling this function repeatedly. Instead, store the result in a variable and use it, and pass it down to function calls.\n *\n * @returns The currentConfig\n */\nexport const getConfig = (): MermaidConfig => {\n return assignWithDepth({}, currentConfig);\n};\n/**\n * ## sanitize\n *\n * | Function | Description | Type | Values |\n * | -------- | -------------------------------------- | ----------- | ------ |\n * | sanitize | Sets the siteConfig to desired values. | Put Request | None |\n *\n * Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies\n * options in-place\n *\n * @param options - The potential setConfig parameter\n */\nexport const sanitize = (options: any) => {\n if (!options) {\n return;\n }\n // Checking that options are not in the list of excluded options\n ['secure', ...(siteConfig.secure ?? [])].forEach((key) => {\n if (Object.hasOwn(options, key)) {\n // DO NOT attempt to print options[key] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n log.debug(`Denied attempt to modify a secure key ${key}`, options[key]);\n delete options[key];\n }\n });\n\n // Check that there no attempts of prototype pollution\n Object.keys(options).forEach((key) => {\n if (key.startsWith('__')) {\n delete options[key];\n }\n });\n // Check that there no attempts of xss, there should be no tags at all in the directive\n // blocking data urls as base64 urls can contain svg's with inline script tags\n Object.keys(options).forEach((key) => {\n if (\n typeof options[key] === 'string' &&\n (options[key].includes('<') ||\n options[key].includes('>') ||\n options[key].includes('url(data:'))\n ) {\n delete options[key];\n }\n if (typeof options[key] === 'object') {\n sanitize(options[key]);\n }\n });\n};\n\n/**\n * Pushes in a directive to the configuration\n *\n * @param directive - The directive to push in\n */\nexport const addDirective = (directive: MermaidConfig) => {\n sanitizeDirective(directive);\n\n // If the directive has a fontFamily, but no themeVariables, add the fontFamily to the themeVariables\n if (directive.fontFamily && !directive.themeVariables?.fontFamily) {\n directive.themeVariables = {\n ...directive.themeVariables,\n fontFamily: directive.fontFamily,\n };\n }\n\n directives.push(directive);\n updateCurrentConfig(siteConfig, directives);\n};\n\n/**\n * ## reset\n *\n * | Function | Description | Type | Required | Values |\n * | -------- | ---------------------------- | ----------- | -------- | ------ |\n * | reset | Resets currentConfig to conf | Put Request | Required | None |\n *\n * ## conf\n *\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |\n * | conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |\n *\n * **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`)\n *\n * @param config - base set of values, which currentConfig could be **reset** to.\n * Defaults to the current siteConfig (e.g returned by {@link getSiteConfig}).\n */\nexport const reset = (config = siteConfig): void => {\n // Replace current config with siteConfig\n directives = [];\n updateCurrentConfig(config, directives);\n};\n\nconst ConfigWarning = {\n LAZY_LOAD_DEPRECATED:\n 'The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.',\n} as const;\n\ntype ConfigWarningStrings = keyof typeof ConfigWarning;\nconst issuedWarnings: { [key in ConfigWarningStrings]?: boolean } = {};\nconst issueWarning = (warning: ConfigWarningStrings) => {\n if (issuedWarnings[warning]) {\n return;\n }\n log.warn(ConfigWarning[warning]);\n issuedWarnings[warning] = true;\n};\n\nconst checkConfig = (config: MermaidConfig) => {\n if (!config) {\n return;\n }\n // @ts-expect-error Properties were removed in v10. Warning should exist.\n if (config.lazyLoadedDiagrams || config.loadExternalDiagramsAtStartup) {\n issueWarning('LAZY_LOAD_DEPRECATED');\n }\n};\n", "const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n freeze = function (x) {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x) {\n return x;\n };\n}\n\nif (!apply) {\n apply = function (fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n}\n\nif (!construct) {\n construct = function (Func, args) {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n return (thisArg, ...args) => apply(func, thisArg, args);\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(func) {\n return (...args) => construct(func, args);\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\nfunction addToSet(set, array, transformCaseFunc = stringToLowerCase) {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\nfunction cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n\n return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\nfunction clone(object) {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (\n value &&\n typeof value === 'object' &&\n value.constructor === Object\n ) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n\n return newObject;\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue() {\n return null;\n }\n\n return fallbackValue;\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n // Object\n entries,\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n isFrozen,\n setPrototypeOf,\n seal,\n clone,\n create,\n objectHasOwnProperty,\n // RegExp\n regExpTest,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n addToSet,\n // Reflect\n unapply,\n unconstruct,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'section',\n 'select',\n 'shadow',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n]);\n\n// SVG\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n]);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n]);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n]);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n 'mprescripts',\n]);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n]);\n\nexport const text = freeze(['#text']);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'popover',\n 'popovertarget',\n 'popovertargetaction',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'wrap',\n 'xmlns',\n 'slot',\n]);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n]);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnsalign',\n 'columnlines',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lspace',\n 'lquote',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n]);\n", "import { seal } from './utils.js';\n\n// eslint-disable-next-line unicorn/better-regex\nexport const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n", "import * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n entries,\n freeze,\n arrayForEach,\n arrayPop,\n arrayPush,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n regExpTest,\n typeErrorCreate,\n lookupGetter,\n create,\n objectHasOwnProperty,\n} from './utils.js';\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5, // Deprecated\n entityNode: 6, // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12, // Deprecated\n};\n\nconst getGlobal = function () {\n return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (trustedTypes, purifyHostElement) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nfunction createDOMPurify(window = getGlobal()) {\n const DOMPurify = (root) => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = VERSION;\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n\n if (\n !window ||\n !window.document ||\n window.document.nodeType !== NODE_TYPE.document\n ) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n let { document } = window;\n\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof entries === 'function' &&\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n 'style',\n 'svg',\n 'template',\n 'thead',\n 'title',\n 'video',\n 'xmp',\n ]);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, [\n 'audio',\n 'video',\n 'img',\n 'source',\n 'image',\n 'track',\n ]);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n 'alt',\n 'class',\n 'for',\n 'id',\n 'label',\n 'name',\n 'pattern',\n 'placeholder',\n 'role',\n 'summary',\n 'title',\n 'value',\n 'style',\n 'xmlns',\n ]);\n\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet(\n {},\n [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE],\n stringToString\n );\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function (testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function (cfg = {}) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1\n ? DEFAULT_PARSER_MEDIA_TYPE\n : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc =\n PARSER_MEDIA_TYPE === 'application/xhtml+xml'\n ? stringToString\n : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS')\n ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc)\n : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR')\n ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc)\n : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES')\n ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString)\n : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR')\n ? addToSet(\n clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS')\n ? addToSet(\n clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS')\n ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc)\n : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS')\n ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc)\n : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR')\n ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc)\n : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES')\n ? cfg.USE_PROFILES\n : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI = cfg.ALLOWED_URI_REGEXP || EXPRESSIONS.IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)\n ) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck =\n cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (\n cfg.CUSTOM_ELEMENT_HANDLING &&\n typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements ===\n 'boolean'\n ) {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =\n cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, TAGS.text);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, TAGS.html);\n addToSet(ALLOWED_ATTR, ATTRS.html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, TAGS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, TAGS.svgFilters);\n addToSet(ALLOWED_ATTR, ATTRS.svg);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, TAGS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.mathMl);\n addToSet(ALLOWED_ATTR, ATTRS.xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate(\n 'TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.'\n );\n }\n\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate(\n 'TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.'\n );\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n currentScript\n );\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [\n 'mi',\n 'mo',\n 'mn',\n 'ms',\n 'mtext',\n ]);\n\n const HTML_INTEGRATION_POINTS = addToSet({}, [\n 'foreignobject',\n 'annotation-xml',\n ]);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n 'title',\n 'style',\n 'font',\n 'a',\n 'script',\n ]);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.svgDisallowed,\n ]);\n const ALL_MATHML_TAGS = addToSet({}, [\n ...TAGS.mathMl,\n ...TAGS.mathMlDisallowed,\n ]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function (element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template',\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return (\n tagName === 'svg' &&\n (parentTagName === 'annotation-xml' ||\n MATHML_TEXT_INTEGRATION_POINTS[parentTagName])\n );\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (\n parent.namespaceURI === SVG_NAMESPACE &&\n !HTML_INTEGRATION_POINTS[parentTagName]\n ) {\n return false;\n }\n\n if (\n parent.namespaceURI === MATHML_NAMESPACE &&\n !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]\n ) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return (\n !ALL_MATHML_TAGS[tagName] &&\n (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName])\n );\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (\n PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n ALLOWED_NAMESPACES[element.namespaceURI]\n ) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function (node) {\n arrayPush(DOMPurify.removed, { element: node });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n getParentNode(node).removeChild(node);\n } catch (_) {\n remove(node);\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function (name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node,\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node,\n });\n }\n\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function (dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (\n PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n NAMESPACE === HTML_NAMESPACE\n ) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty =\n '' +\n dirty +\n '';\n }\n\n const dirtyPayload = trustedTypesPolicy\n ? trustedTypesPolicy.createHTML(dirty)\n : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT\n ? emptyHTML\n : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n\n const body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(\n document.createTextNode(leadingWhitespace),\n body.childNodes[0] || null\n );\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(\n doc,\n WHOLE_DOCUMENT ? 'html' : 'body'\n )[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function (root) {\n return createNodeIterator.call(\n root.ownerDocument || root,\n root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT |\n NodeFilter.SHOW_COMMENT |\n NodeFilter.SHOW_TEXT |\n NodeFilter.SHOW_PROCESSING_INSTRUCTION |\n NodeFilter.SHOW_CDATA_SECTION,\n null\n );\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function (elm) {\n return (\n elm instanceof HTMLFormElement &&\n (typeof elm.nodeName !== 'string' ||\n typeof elm.textContent !== 'string' ||\n typeof elm.removeChild !== 'function' ||\n !(elm.attributes instanceof NamedNodeMap) ||\n typeof elm.removeAttribute !== 'function' ||\n typeof elm.setAttribute !== 'function' ||\n typeof elm.namespaceURI !== 'string' ||\n typeof elm.insertBefore !== 'function' ||\n typeof elm.hasChildNodes !== 'function')\n );\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function (object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function (entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], (hook) => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function (currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS,\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (\n currentNode.hasChildNodes() &&\n !_isNode(currentNode.firstElementChild) &&\n regExpTest(/<[/\\w]/g, currentNode.innerHTML) &&\n regExpTest(/<[/\\w]/g, currentNode.textContent)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any occurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (\n SAFE_FOR_XML &&\n currentNode.nodeType === NODE_TYPE.comment &&\n regExpTest(/<[/\\w]/g, currentNode.data)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (\n CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)\n ) {\n return false;\n }\n\n if (\n CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)\n ) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if (\n (tagName === 'noscript' ||\n tagName === 'noembed' ||\n tagName === 'noframes') &&\n regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)\n ) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr) => {\n content = stringReplace(content, expr, ' ');\n });\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function (lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (\n SANITIZE_DOM &&\n (lcName === 'id' || lcName === 'name') &&\n (value in document || value in formElement)\n ) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (\n ALLOW_DATA_ATTR &&\n !FORBID_ATTR[lcName] &&\n regExpTest(DATA_ATTR, lcName)\n ) {\n // This attribute is safe\n } else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) {\n // This attribute is safe\n /* Otherwise, check the name is permitted */\n } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n (_isBasicCustomElement(lcTag) &&\n ((CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag)) ||\n (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag))) &&\n ((CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName)) ||\n (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)))) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n (lcName === 'is' &&\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements &&\n ((CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value)) ||\n (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))))\n ) {\n // If user has supplied a regexp or function in CUSTOM_ELEMENT_HANDLING.tagNameCheck, we need to also allow derived custom elements using the same tagName test.\n // Additionally, we need to allow attributes passing the CUSTOM_ELEMENT_HANDLING.attributeNameCheck user has configured, as custom elements can define these at their own discretion.\n } else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n // This attribute is safe\n /* Check no script, data or unknown possibly unsafe URI\n unless we know URI values are safe for that attribute */\n } else if (\n regExpTest(IS_ALLOWED_URI, stringReplace(value, ATTR_WHITESPACE, ''))\n ) {\n // This attribute is safe\n /* Keep image data URIs alive if src/xlink:href is allowed */\n /* Further prevent gadget XSS for dynamically built script tags */\n } else if (\n (lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') &&\n lcTag !== 'script' &&\n stringIndexOf(value, 'data:') === 0 &&\n DATA_URI_TAGS[lcTag]\n ) {\n // This attribute is safe\n /* Allow unknown protocols: This provides support for links that\n are handled by protocol handlers which may be unknown ahead of\n time, e.g. fb:, spotify: */\n } else if (\n ALLOW_UNKNOWN_PROTOCOLS &&\n !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))\n ) {\n // This attribute is safe\n /* Check for binary attributes */\n } else if (value) {\n return false;\n } else {\n // Binary attributes are safe at this point\n /* Anything else, presume unsafe, do not add it back */\n }\n\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function (tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function (currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n const { attributes } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR,\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const { name, namespaceURI, value: attrValue } = attr;\n const lcName = transformCaseFunc(name);\n\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr) => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\n if (\n trustedTypesPolicy &&\n typeof trustedTypes === 'object' &&\n typeof trustedTypes.getAttributeType === 'function'\n ) {\n if (namespaceURI) {\n /* Namespaces are not yet supported, see https://bugs.chromium.org/p/chromium/issues/detail?id=1305293 */\n } else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML': {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n\n case 'TrustedScriptURL': {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n\n default: {\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function (fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while ((shadowNode = shadowIterator.nextNode())) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty, cfg = {}) {\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate(\n 'root node is forbidden and cannot be sanitized in-place'\n );\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (\n importedNode.nodeType === NODE_TYPE.element &&\n importedNode.nodeName === 'BODY'\n ) {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (\n !RETURN_DOM &&\n !SAFE_FOR_TEMPLATES &&\n !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1\n ) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n ? trustedTypesPolicy.createHTML(dirty)\n : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while ((currentNode = nodeIterator.nextNode())) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (\n WHOLE_DOCUMENT &&\n ALLOWED_TAGS['!doctype'] &&\n body.ownerDocument &&\n body.ownerDocument.doctype &&\n body.ownerDocument.doctype.name &&\n regExpTest(EXPRESSIONS.DOCTYPE_NAME, body.ownerDocument.doctype.name)\n ) {\n serializedHTML =\n '\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr) => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n ? trustedTypesPolicy.createHTML(serializedHTML)\n : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function (cfg = {}) {\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n}\n\nexport default createDOMPurify();\n", "/**\n * Lexing or parsing positional information for error reporting.\n * This object is immutable.\n */\nclass SourceLocation {\n // The + prefix indicates that these fields aren't writeable\n // Lexer holding the input string.\n // Start offset, zero-based inclusive.\n // End offset, zero-based exclusive.\n constructor(lexer, start, end) {\n this.lexer = void 0;\n this.start = void 0;\n this.end = void 0;\n this.lexer = lexer;\n this.start = start;\n this.end = end;\n }\n /**\n * Merges two `SourceLocation`s from location providers, given they are\n * provided in order of appearance.\n * - Returns the first one's location if only the first is provided.\n * - Returns a merged range of the first and the last if both are provided\n * and their lexers match.\n * - Otherwise, returns null.\n */\n\n\n static range(first, second) {\n if (!second) {\n return first && first.loc;\n } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {\n return null;\n } else {\n return new SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);\n }\n }\n\n}\n\n/**\n * Interface required to break circular dependency between Token, Lexer, and\n * ParseError.\n */\n\n/**\n * The resulting token returned from `lex`.\n *\n * It consists of the token text plus some position information.\n * The position information is essentially a range in an input string,\n * but instead of referencing the bare input string, we refer to the lexer.\n * That way it is possible to attach extra metadata to the input string,\n * like for example a file name or similar.\n *\n * The position information is optional, so it is OK to construct synthetic\n * tokens if appropriate. Not providing available position information may\n * lead to degraded error reporting, though.\n */\nclass Token {\n // don't expand the token\n // used in \\noexpand\n constructor(text, // the text of this token\n loc) {\n this.text = void 0;\n this.loc = void 0;\n this.noexpand = void 0;\n this.treatAsRelax = void 0;\n this.text = text;\n this.loc = loc;\n }\n /**\n * Given a pair of tokens (this and endToken), compute a `Token` encompassing\n * the whole input range enclosed by these two.\n */\n\n\n range(endToken, // last token of the range, inclusive\n text // the text of the newly constructed token\n ) {\n return new Token(text, SourceLocation.range(this, endToken));\n }\n\n}\n\n/**\n * This is the ParseError class, which is the main error thrown by KaTeX\n * functions when something has gone wrong. This is used to distinguish internal\n * errors from errors in the expression that the user provided.\n *\n * If possible, a caller should provide a Token or ParseNode with information\n * about where in the source string the problem occurred.\n */\nclass ParseError {\n // Error start position based on passed-in Token or ParseNode.\n // Length of affected text based on passed-in Token or ParseNode.\n // The underlying error message without any context added.\n constructor(message, // The error message\n token // An object providing position information\n ) {\n this.name = void 0;\n this.position = void 0;\n this.length = void 0;\n this.rawMessage = void 0;\n var error = \"KaTeX parse error: \" + message;\n var start;\n var end;\n var loc = token && token.loc;\n\n if (loc && loc.start <= loc.end) {\n // If we have the input and a position, make the error a bit fancier\n // Get the input\n var input = loc.lexer.input; // Prepend some information\n\n start = loc.start;\n end = loc.end;\n\n if (start === input.length) {\n error += \" at end of input: \";\n } else {\n error += \" at position \" + (start + 1) + \": \";\n } // Underline token in question using combining underscores\n\n\n var underlined = input.slice(start, end).replace(/[^]/g, \"$&\\u0332\"); // Extract some context from the input and add it to the error\n\n var left;\n\n if (start > 15) {\n left = \"\u2026\" + input.slice(start - 15, start);\n } else {\n left = input.slice(0, start);\n }\n\n var right;\n\n if (end + 15 < input.length) {\n right = input.slice(end, end + 15) + \"\u2026\";\n } else {\n right = input.slice(end);\n }\n\n error += left + underlined + right;\n } // Some hackery to make ParseError a prototype of Error\n // See http://stackoverflow.com/a/8460753\n // $FlowFixMe\n\n\n var self = new Error(error);\n self.name = \"ParseError\"; // $FlowFixMe\n\n self.__proto__ = ParseError.prototype;\n self.position = start;\n\n if (start != null && end != null) {\n self.length = end - start;\n }\n\n self.rawMessage = message;\n return self;\n }\n\n} // $FlowFixMe More hackery\n\n\nParseError.prototype.__proto__ = Error.prototype;\n\n/**\n * This file contains a list of utility functions which are useful in other\n * files.\n */\n\n/**\n * Return whether an element is contained in a list\n */\nvar contains = function contains(list, elem) {\n return list.indexOf(elem) !== -1;\n};\n/**\n * Provide a default value if a setting is undefined\n * NOTE: Couldn't use `T` as the output type due to facebook/flow#5022.\n */\n\n\nvar deflt = function deflt(setting, defaultIfUndefined) {\n return setting === undefined ? defaultIfUndefined : setting;\n}; // hyphenate and escape adapted from Facebook's React under Apache 2 license\n\n\nvar uppercase = /([A-Z])/g;\n\nvar hyphenate = function hyphenate(str) {\n return str.replace(uppercase, \"-$1\").toLowerCase();\n};\n\nvar ESCAPE_LOOKUP = {\n \"&\": \"&\",\n \">\": \">\",\n \"<\": \"<\",\n \"\\\"\": \""\",\n \"'\": \"'\"\n};\nvar ESCAPE_REGEX = /[&><\"']/g;\n/**\n * Escapes text to prevent scripting attacks.\n */\n\nfunction escape(text) {\n return String(text).replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);\n}\n/**\n * Sometimes we want to pull out the innermost element of a group. In most\n * cases, this will just be the group itself, but when ordgroups and colors have\n * a single element, we want to pull that out.\n */\n\n\nvar getBaseElem = function getBaseElem(group) {\n if (group.type === \"ordgroup\") {\n if (group.body.length === 1) {\n return getBaseElem(group.body[0]);\n } else {\n return group;\n }\n } else if (group.type === \"color\") {\n if (group.body.length === 1) {\n return getBaseElem(group.body[0]);\n } else {\n return group;\n }\n } else if (group.type === \"font\") {\n return getBaseElem(group.body);\n } else {\n return group;\n }\n};\n/**\n * TeXbook algorithms often reference \"character boxes\", which are simply groups\n * with a single character in them. To decide if something is a character box,\n * we find its innermost group, and see if it is a single character.\n */\n\n\nvar isCharacterBox = function isCharacterBox(group) {\n var baseElem = getBaseElem(group); // These are all they types of groups which hold single characters\n\n return baseElem.type === \"mathord\" || baseElem.type === \"textord\" || baseElem.type === \"atom\";\n};\n\nvar assert = function assert(value) {\n if (!value) {\n throw new Error('Expected non-null, but got ' + String(value));\n }\n\n return value;\n};\n/**\n * Return the protocol of a URL, or \"_relative\" if the URL does not specify a\n * protocol (and thus is relative), or `null` if URL has invalid protocol\n * (so should be outright rejected).\n */\n\nvar protocolFromUrl = function protocolFromUrl(url) {\n // Check for possible leading protocol.\n // https://url.spec.whatwg.org/#url-parsing strips leading whitespace\n // (U+20) or C0 control (U+00-U+1F) characters.\n // eslint-disable-next-line no-control-regex\n var protocol = /^[\\x00-\\x20]*([^\\\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(url);\n\n if (!protocol) {\n return \"_relative\";\n } // Reject weird colons\n\n\n if (protocol[2] !== \":\") {\n return null;\n } // Reject invalid characters in scheme according to\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.1\n\n\n if (!/^[a-zA-Z][a-zA-Z0-9+\\-.]*$/.test(protocol[1])) {\n return null;\n } // Lowercase the protocol\n\n\n return protocol[1].toLowerCase();\n};\nvar utils = {\n contains,\n deflt,\n escape,\n hyphenate,\n getBaseElem,\n isCharacterBox,\n protocolFromUrl\n};\n\n/* eslint no-console:0 */\n// TODO: automatically generate documentation\n// TODO: check all properties on Settings exist\n// TODO: check the type of a property on Settings matches\nvar SETTINGS_SCHEMA = {\n displayMode: {\n type: \"boolean\",\n description: \"Render math in display mode, which puts the math in \" + \"display style (so \\\\int and \\\\sum are large, for example), and \" + \"centers the math on the page on its own line.\",\n cli: \"-d, --display-mode\"\n },\n output: {\n type: {\n enum: [\"htmlAndMathml\", \"html\", \"mathml\"]\n },\n description: \"Determines the markup language of the output.\",\n cli: \"-F, --format \"\n },\n leqno: {\n type: \"boolean\",\n description: \"Render display math in leqno style (left-justified tags).\"\n },\n fleqn: {\n type: \"boolean\",\n description: \"Render display math flush left.\"\n },\n throwOnError: {\n type: \"boolean\",\n default: true,\n cli: \"-t, --no-throw-on-error\",\n cliDescription: \"Render errors (in the color given by --error-color) ins\" + \"tead of throwing a ParseError exception when encountering an error.\"\n },\n errorColor: {\n type: \"string\",\n default: \"#cc0000\",\n cli: \"-c, --error-color \",\n cliDescription: \"A color string given in the format 'rgb' or 'rrggbb' \" + \"(no #). This option determines the color of errors rendered by the \" + \"-t option.\",\n cliProcessor: color => \"#\" + color\n },\n macros: {\n type: \"object\",\n cli: \"-m, --macro \",\n cliDescription: \"Define custom macro of the form '\\\\foo:expansion' (use \" + \"multiple -m arguments for multiple macros).\",\n cliDefault: [],\n cliProcessor: (def, defs) => {\n defs.push(def);\n return defs;\n }\n },\n minRuleThickness: {\n type: \"number\",\n description: \"Specifies a minimum thickness, in ems, for fraction lines,\" + \" `\\\\sqrt` top lines, `{array}` vertical lines, `\\\\hline`, \" + \"`\\\\hdashline`, `\\\\underline`, `\\\\overline`, and the borders of \" + \"`\\\\fbox`, `\\\\boxed`, and `\\\\fcolorbox`.\",\n processor: t => Math.max(0, t),\n cli: \"--min-rule-thickness \",\n cliProcessor: parseFloat\n },\n colorIsTextColor: {\n type: \"boolean\",\n description: \"Makes \\\\color behave like LaTeX's 2-argument \\\\textcolor, \" + \"instead of LaTeX's one-argument \\\\color mode change.\",\n cli: \"-b, --color-is-text-color\"\n },\n strict: {\n type: [{\n enum: [\"warn\", \"ignore\", \"error\"]\n }, \"boolean\", \"function\"],\n description: \"Turn on strict / LaTeX faithfulness mode, which throws an \" + \"error if the input uses features that are not supported by LaTeX.\",\n cli: \"-S, --strict\",\n cliDefault: false\n },\n trust: {\n type: [\"boolean\", \"function\"],\n description: \"Trust the input, enabling all HTML features such as \\\\url.\",\n cli: \"-T, --trust\"\n },\n maxSize: {\n type: \"number\",\n default: Infinity,\n description: \"If non-zero, all user-specified sizes, e.g. in \" + \"\\\\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, \" + \"elements and spaces can be arbitrarily large\",\n processor: s => Math.max(0, s),\n cli: \"-s, --max-size \",\n cliProcessor: parseInt\n },\n maxExpand: {\n type: \"number\",\n default: 1000,\n description: \"Limit the number of macro expansions to the specified \" + \"number, to prevent e.g. infinite macro loops. If set to Infinity, \" + \"the macro expander will try to fully expand as in LaTeX.\",\n processor: n => Math.max(0, n),\n cli: \"-e, --max-expand \",\n cliProcessor: n => n === \"Infinity\" ? Infinity : parseInt(n)\n },\n globalGroup: {\n type: \"boolean\",\n cli: false\n }\n};\n\nfunction getDefaultValue(schema) {\n if (schema.default) {\n return schema.default;\n }\n\n var type = schema.type;\n var defaultType = Array.isArray(type) ? type[0] : type;\n\n if (typeof defaultType !== 'string') {\n return defaultType.enum[0];\n }\n\n switch (defaultType) {\n case 'boolean':\n return false;\n\n case 'string':\n return '';\n\n case 'number':\n return 0;\n\n case 'object':\n return {};\n }\n}\n/**\n * The main Settings object\n *\n * The current options stored are:\n * - displayMode: Whether the expression should be typeset as inline math\n * (false, the default), meaning that the math starts in\n * \\textstyle and is placed in an inline-block); or as display\n * math (true), meaning that the math starts in \\displaystyle\n * and is placed in a block with vertical margin.\n */\n\n\nclass Settings {\n constructor(options) {\n this.displayMode = void 0;\n this.output = void 0;\n this.leqno = void 0;\n this.fleqn = void 0;\n this.throwOnError = void 0;\n this.errorColor = void 0;\n this.macros = void 0;\n this.minRuleThickness = void 0;\n this.colorIsTextColor = void 0;\n this.strict = void 0;\n this.trust = void 0;\n this.maxSize = void 0;\n this.maxExpand = void 0;\n this.globalGroup = void 0;\n // allow null options\n options = options || {};\n\n for (var prop in SETTINGS_SCHEMA) {\n if (SETTINGS_SCHEMA.hasOwnProperty(prop)) {\n // $FlowFixMe\n var schema = SETTINGS_SCHEMA[prop]; // TODO: validate options\n // $FlowFixMe\n\n this[prop] = options[prop] !== undefined ? schema.processor ? schema.processor(options[prop]) : options[prop] : getDefaultValue(schema);\n }\n }\n }\n /**\n * Report nonstrict (non-LaTeX-compatible) input.\n * Can safely not be called if `this.strict` is false in JavaScript.\n */\n\n\n reportNonstrict(errorCode, errorMsg, token) {\n var strict = this.strict;\n\n if (typeof strict === \"function\") {\n // Allow return value of strict function to be boolean or string\n // (or null/undefined, meaning no further processing).\n strict = strict(errorCode, errorMsg, token);\n }\n\n if (!strict || strict === \"ignore\") {\n return;\n } else if (strict === true || strict === \"error\") {\n throw new ParseError(\"LaTeX-incompatible input and strict mode is set to 'error': \" + (errorMsg + \" [\" + errorCode + \"]\"), token);\n } else if (strict === \"warn\") {\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to 'warn': \" + (errorMsg + \" [\" + errorCode + \"]\"));\n } else {\n // won't happen in type-safe code\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to \" + (\"unrecognized '\" + strict + \"': \" + errorMsg + \" [\" + errorCode + \"]\"));\n }\n }\n /**\n * Check whether to apply strict (LaTeX-adhering) behavior for unusual\n * input (like `\\\\`). Unlike `nonstrict`, will not throw an error;\n * instead, \"error\" translates to a return value of `true`, while \"ignore\"\n * translates to a return value of `false`. May still print a warning:\n * \"warn\" prints a warning and returns `false`.\n * This is for the second category of `errorCode`s listed in the README.\n */\n\n\n useStrictBehavior(errorCode, errorMsg, token) {\n var strict = this.strict;\n\n if (typeof strict === \"function\") {\n // Allow return value of strict function to be boolean or string\n // (or null/undefined, meaning no further processing).\n // But catch any exceptions thrown by function, treating them\n // like \"error\".\n try {\n strict = strict(errorCode, errorMsg, token);\n } catch (error) {\n strict = \"error\";\n }\n }\n\n if (!strict || strict === \"ignore\") {\n return false;\n } else if (strict === true || strict === \"error\") {\n return true;\n } else if (strict === \"warn\") {\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to 'warn': \" + (errorMsg + \" [\" + errorCode + \"]\"));\n return false;\n } else {\n // won't happen in type-safe code\n typeof console !== \"undefined\" && console.warn(\"LaTeX-incompatible input and strict mode is set to \" + (\"unrecognized '\" + strict + \"': \" + errorMsg + \" [\" + errorCode + \"]\"));\n return false;\n }\n }\n /**\n * Check whether to test potentially dangerous input, and return\n * `true` (trusted) or `false` (untrusted). The sole argument `context`\n * should be an object with `command` field specifying the relevant LaTeX\n * command (as a string starting with `\\`), and any other arguments, etc.\n * If `context` has a `url` field, a `protocol` field will automatically\n * get added by this function (changing the specified object).\n */\n\n\n isTrusted(context) {\n if (context.url && !context.protocol) {\n var protocol = utils.protocolFromUrl(context.url);\n\n if (protocol == null) {\n return false;\n }\n\n context.protocol = protocol;\n }\n\n var trust = typeof this.trust === \"function\" ? this.trust(context) : this.trust;\n return Boolean(trust);\n }\n\n}\n\n/**\n * This file contains information and classes for the various kinds of styles\n * used in TeX. It provides a generic `Style` class, which holds information\n * about a specific style. It then provides instances of all the different kinds\n * of styles possible, and provides functions to move between them and get\n * information about them.\n */\n\n/**\n * The main style class. Contains a unique id for the style, a size (which is\n * the same for cramped and uncramped version of a style), and a cramped flag.\n */\nclass Style {\n constructor(id, size, cramped) {\n this.id = void 0;\n this.size = void 0;\n this.cramped = void 0;\n this.id = id;\n this.size = size;\n this.cramped = cramped;\n }\n /**\n * Get the style of a superscript given a base in the current style.\n */\n\n\n sup() {\n return styles[sup[this.id]];\n }\n /**\n * Get the style of a subscript given a base in the current style.\n */\n\n\n sub() {\n return styles[sub[this.id]];\n }\n /**\n * Get the style of a fraction numerator given the fraction in the current\n * style.\n */\n\n\n fracNum() {\n return styles[fracNum[this.id]];\n }\n /**\n * Get the style of a fraction denominator given the fraction in the current\n * style.\n */\n\n\n fracDen() {\n return styles[fracDen[this.id]];\n }\n /**\n * Get the cramped version of a style (in particular, cramping a cramped style\n * doesn't change the style).\n */\n\n\n cramp() {\n return styles[cramp[this.id]];\n }\n /**\n * Get a text or display version of this style.\n */\n\n\n text() {\n return styles[text$1[this.id]];\n }\n /**\n * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)\n */\n\n\n isTight() {\n return this.size >= 2;\n }\n\n} // Export an interface for type checking, but don't expose the implementation.\n// This way, no more styles can be generated.\n\n\n// IDs of the different styles\nvar D = 0;\nvar Dc = 1;\nvar T = 2;\nvar Tc = 3;\nvar S = 4;\nvar Sc = 5;\nvar SS = 6;\nvar SSc = 7; // Instances of the different styles\n\nvar styles = [new Style(D, 0, false), new Style(Dc, 0, true), new Style(T, 1, false), new Style(Tc, 1, true), new Style(S, 2, false), new Style(Sc, 2, true), new Style(SS, 3, false), new Style(SSc, 3, true)]; // Lookup tables for switching from one style to another\n\nvar sup = [S, Sc, S, Sc, SS, SSc, SS, SSc];\nvar sub = [Sc, Sc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar fracNum = [T, Tc, S, Sc, SS, SSc, SS, SSc];\nvar fracDen = [Tc, Tc, Sc, Sc, SSc, SSc, SSc, SSc];\nvar cramp = [Dc, Dc, Tc, Tc, Sc, Sc, SSc, SSc];\nvar text$1 = [D, Dc, T, Tc, T, Tc, T, Tc]; // We only export some of the styles.\n\nvar Style$1 = {\n DISPLAY: styles[D],\n TEXT: styles[T],\n SCRIPT: styles[S],\n SCRIPTSCRIPT: styles[SS]\n};\n\n/*\n * This file defines the Unicode scripts and script families that we\n * support. To add new scripts or families, just add a new entry to the\n * scriptData array below. Adding scripts to the scriptData array allows\n * characters from that script to appear in \\text{} environments.\n */\n\n/**\n * Each script or script family has a name and an array of blocks.\n * Each block is an array of two numbers which specify the start and\n * end points (inclusive) of a block of Unicode codepoints.\n */\n\n/**\n * Unicode block data for the families of scripts we support in \\text{}.\n * Scripts only need to appear here if they do not have font metrics.\n */\nvar scriptData = [{\n // Latin characters beyond the Latin-1 characters we have metrics for.\n // Needed for Czech, Hungarian and Turkish text, for example.\n name: 'latin',\n blocks: [[0x0100, 0x024f], // Latin Extended-A and Latin Extended-B\n [0x0300, 0x036f] // Combining Diacritical marks\n ]\n}, {\n // The Cyrillic script used by Russian and related languages.\n // A Cyrillic subset used to be supported as explicitly defined\n // symbols in symbols.js\n name: 'cyrillic',\n blocks: [[0x0400, 0x04ff]]\n}, {\n // Armenian\n name: 'armenian',\n blocks: [[0x0530, 0x058F]]\n}, {\n // The Brahmic scripts of South and Southeast Asia\n // Devanagari (0900\u2013097F)\n // Bengali (0980\u201309FF)\n // Gurmukhi (0A00\u20130A7F)\n // Gujarati (0A80\u20130AFF)\n // Oriya (0B00\u20130B7F)\n // Tamil (0B80\u20130BFF)\n // Telugu (0C00\u20130C7F)\n // Kannada (0C80\u20130CFF)\n // Malayalam (0D00\u20130D7F)\n // Sinhala (0D80\u20130DFF)\n // Thai (0E00\u20130E7F)\n // Lao (0E80\u20130EFF)\n // Tibetan (0F00\u20130FFF)\n // Myanmar (1000\u2013109F)\n name: 'brahmic',\n blocks: [[0x0900, 0x109F]]\n}, {\n name: 'georgian',\n blocks: [[0x10A0, 0x10ff]]\n}, {\n // Chinese and Japanese.\n // The \"k\" in cjk is for Korean, but we've separated Korean out\n name: \"cjk\",\n blocks: [[0x3000, 0x30FF], // CJK symbols and punctuation, Hiragana, Katakana\n [0x4E00, 0x9FAF], // CJK ideograms\n [0xFF00, 0xFF60] // Fullwidth punctuation\n // TODO: add halfwidth Katakana and Romanji glyphs\n ]\n}, {\n // Korean\n name: 'hangul',\n blocks: [[0xAC00, 0xD7AF]]\n}];\n/**\n * Given a codepoint, return the name of the script or script family\n * it is from, or null if it is not part of a known block\n */\n\nfunction scriptFromCodepoint(codepoint) {\n for (var i = 0; i < scriptData.length; i++) {\n var script = scriptData[i];\n\n for (var _i = 0; _i < script.blocks.length; _i++) {\n var block = script.blocks[_i];\n\n if (codepoint >= block[0] && codepoint <= block[1]) {\n return script.name;\n }\n }\n }\n\n return null;\n}\n/**\n * A flattened version of all the supported blocks in a single array.\n * This is an optimization to make supportedCodepoint() fast.\n */\n\nvar allBlocks = [];\nscriptData.forEach(s => s.blocks.forEach(b => allBlocks.push(...b)));\n/**\n * Given a codepoint, return true if it falls within one of the\n * scripts or script families defined above and false otherwise.\n *\n * Micro benchmarks shows that this is faster than\n * /[\\u3000-\\u30FF\\u4E00-\\u9FAF\\uFF00-\\uFF60\\uAC00-\\uD7AF\\u0900-\\u109F]/.test()\n * in Firefox, Chrome and Node.\n */\n\nfunction supportedCodepoint(codepoint) {\n for (var i = 0; i < allBlocks.length; i += 2) {\n if (codepoint >= allBlocks[i] && codepoint <= allBlocks[i + 1]) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * This file provides support to domTree.js and delimiter.js.\n * It's a storehouse of path geometry for SVG images.\n */\n// In all paths below, the viewBox-to-em scale is 1000:1.\nvar hLinePad = 80; // padding above a sqrt vinculum. Prevents image cropping.\n// The vinculum of a \\sqrt can be made thicker by a KaTeX rendering option.\n// Think of variable extraVinculum as two detours in the SVG path.\n// The detour begins at the lower left of the area labeled extraVinculum below.\n// The detour proceeds one extraVinculum distance up and slightly to the right,\n// displacing the radiused corner between surd and vinculum. The radius is\n// traversed as usual, then the detour resumes. It goes right, to the end of\n// the very long vinculum, then down one extraVinculum distance,\n// after which it resumes regular path geometry for the radical.\n\n/* vinculum\n /\n /\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2592\u2190extraVinculum\n / \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u21900.04em (40 unit) std vinculum thickness\n / /\n / /\n / /\\\n / / surd\n*/\n\nvar sqrtMain = function sqrtMain(extraVinculum, hLinePad) {\n // sqrtMain path geometry is from glyph U221A in the font KaTeX Main\n return \"M95,\" + (622 + extraVinculum + hLinePad) + \"\\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\\nc69,-144,104.5,-217.7,106.5,-221\\nl\" + extraVinculum / 2.075 + \" -\" + extraVinculum + \"\\nc5.3,-9.3,12,-14,20,-14\\nH400000v\" + (40 + extraVinculum) + \"H845.2724\\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\\nM\" + (834 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize1 = function sqrtSize1(extraVinculum, hLinePad) {\n // size1 is from glyph U221A in the font KaTeX_Size1-Regular\n return \"M263,\" + (601 + extraVinculum + hLinePad) + \"c0.7,0,18,39.7,52,119\\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\\nc340,-704.7,510.7,-1060.3,512,-1067\\nl\" + extraVinculum / 2.084 + \" -\" + extraVinculum + \"\\nc4.7,-7.3,11,-11,19,-11\\nH40000v\" + (40 + extraVinculum) + \"H1012.3\\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\\nM\" + (1001 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize2 = function sqrtSize2(extraVinculum, hLinePad) {\n // size2 is from glyph U221A in the font KaTeX_Size2-Regular\n return \"M983 \" + (10 + extraVinculum + hLinePad) + \"\\nl\" + extraVinculum / 3.13 + \" -\" + extraVinculum + \"\\nc4,-6.7,10,-10,18,-10 H400000v\" + (40 + extraVinculum) + \"\\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\\nM\" + (1001 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize3 = function sqrtSize3(extraVinculum, hLinePad) {\n // size3 is from glyph U221A in the font KaTeX_Size3-Regular\n return \"M424,\" + (2398 + extraVinculum + hLinePad) + \"\\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\\nl\" + extraVinculum / 4.223 + \" -\" + extraVinculum + \"c4,-6.7,10,-10,18,-10 H400000\\nv\" + (40 + extraVinculum) + \"H1014.6\\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\\nc-2,6,-10,9,-24,9\\nc-8,0,-12,-0.7,-12,-2z M\" + (1001 + extraVinculum) + \" \" + hLinePad + \"\\nh400000v\" + (40 + extraVinculum) + \"h-400000z\";\n};\n\nvar sqrtSize4 = function sqrtSize4(extraVinculum, hLinePad) {\n // size4 is from glyph U221A in the font KaTeX_Size4-Regular\n return \"M473,\" + (2713 + extraVinculum + hLinePad) + \"\\nc339.3,-1799.3,509.3,-2700,510,-2702 l\" + extraVinculum / 5.298 + \" -\" + extraVinculum + \"\\nc3.3,-7.3,9.3,-11,18,-11 H400000v\" + (40 + extraVinculum) + \"H1017.7\\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\\n606zM\" + (1001 + extraVinculum) + \" \" + hLinePad + \"h400000v\" + (40 + extraVinculum) + \"H1017.7z\";\n};\n\nvar phasePath = function phasePath(y) {\n var x = y / 2; // x coordinate at top of angle\n\n return \"M400000 \" + y + \" H0 L\" + x + \" 0 l65 45 L145 \" + (y - 80) + \" H400000z\";\n};\n\nvar sqrtTall = function sqrtTall(extraVinculum, hLinePad, viewBoxHeight) {\n // sqrtTall is from glyph U23B7 in the font KaTeX_Size4-Regular\n // One path edge has a variable length. It runs vertically from the vinculum\n // to a point near (14 units) the bottom of the surd. The vinculum\n // is normally 40 units thick. So the length of the line in question is:\n var vertSegment = viewBoxHeight - 54 - hLinePad - extraVinculum;\n return \"M702 \" + (extraVinculum + hLinePad) + \"H400000\" + (40 + extraVinculum) + \"\\nH742v\" + vertSegment + \"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\\n219 661 l218 661zM702 \" + hLinePad + \"H400000v\" + (40 + extraVinculum) + \"H742z\";\n};\n\nvar sqrtPath = function sqrtPath(size, extraVinculum, viewBoxHeight) {\n extraVinculum = 1000 * extraVinculum; // Convert from document ems to viewBox.\n\n var path = \"\";\n\n switch (size) {\n case \"sqrtMain\":\n path = sqrtMain(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize1\":\n path = sqrtSize1(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize2\":\n path = sqrtSize2(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize3\":\n path = sqrtSize3(extraVinculum, hLinePad);\n break;\n\n case \"sqrtSize4\":\n path = sqrtSize4(extraVinculum, hLinePad);\n break;\n\n case \"sqrtTall\":\n path = sqrtTall(extraVinculum, hLinePad, viewBoxHeight);\n }\n\n return path;\n};\nvar innerPath = function innerPath(name, height) {\n // The inner part of stretchy tall delimiters\n switch (name) {\n case \"\\u239c\":\n return \"M291 0 H417 V\" + height + \" H291z M291 0 H417 V\" + height + \" H291z\";\n\n case \"\\u2223\":\n return \"M145 0 H188 V\" + height + \" H145z M145 0 H188 V\" + height + \" H145z\";\n\n case \"\\u2225\":\n return \"M145 0 H188 V\" + height + \" H145z M145 0 H188 V\" + height + \" H145z\" + (\"M367 0 H410 V\" + height + \" H367z M367 0 H410 V\" + height + \" H367z\");\n\n case \"\\u239f\":\n return \"M457 0 H583 V\" + height + \" H457z M457 0 H583 V\" + height + \" H457z\";\n\n case \"\\u23a2\":\n return \"M319 0 H403 V\" + height + \" H319z M319 0 H403 V\" + height + \" H319z\";\n\n case \"\\u23a5\":\n return \"M263 0 H347 V\" + height + \" H263z M263 0 H347 V\" + height + \" H263z\";\n\n case \"\\u23aa\":\n return \"M384 0 H504 V\" + height + \" H384z M384 0 H504 V\" + height + \" H384z\";\n\n case \"\\u23d0\":\n return \"M312 0 H355 V\" + height + \" H312z M312 0 H355 V\" + height + \" H312z\";\n\n case \"\\u2016\":\n return \"M257 0 H300 V\" + height + \" H257z M257 0 H300 V\" + height + \" H257z\" + (\"M478 0 H521 V\" + height + \" H478z M478 0 H521 V\" + height + \" H478z\");\n\n default:\n return \"\";\n }\n};\nvar path = {\n // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main\n doubleleftarrow: \"M262 157\\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\\nm8 0v40h399730v-40zm0 194v40h399730v-40z\",\n // doublerightarrow is from glyph U+21D2 in font KaTeX Main\n doublerightarrow: \"M399738 392l\\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z\",\n // leftarrow is from glyph U+2190 in font KaTeX Main\n leftarrow: \"M400000 241H110l3-3c68.7-52.7 113.7-120\\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\\n l-3-3h399890zM100 241v40h399900v-40z\",\n // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular\n leftbrace: \"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z\",\n leftbraceunder: \"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z\",\n // overgroup is from the MnSymbol package (public domain)\n leftgroup: \"M400000 80\\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\\n 435 0h399565z\",\n leftgroupunder: \"M400000 262\\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\\n 435 219h399565z\",\n // Harpoons are from glyph U+21BD in font KaTeX Main\n leftharpoon: \"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z\",\n leftharpoonplus: \"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\\nm0 0v40h400000v-40z\",\n leftharpoondown: \"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z\",\n leftharpoondownplus: \"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z\",\n // hook is from glyph U+21A9 in font KaTeX Main\n lefthook: \"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\\n 71.5 23h399859zM103 281v-40h399897v40z\",\n leftlinesegment: \"M40 281 V428 H0 V94 H40 V241 H400000 v40z\\nM40 281 V428 H0 V94 H40 V241 H400000 v40z\",\n leftmapsto: \"M40 281 V448H0V74H40V241H400000v40z\\nM40 281 V448H0V74H40V241H400000v40z\",\n // tofrom is from glyph U+21C4 in font KaTeX AMS Regular\n leftToFrom: \"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z\",\n longequal: \"M0 50 h400000 v40H0z m0 194h40000v40H0z\\nM0 50 h400000 v40H0z m0 194h40000v40H0z\",\n midbrace: \"M200428 334\\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z\",\n midbraceunder: \"M199572 214\\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z\",\n oiintSize1: \"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z\",\n oiintSize2: \"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\\nc0 110 84 276 504 276s502.4-166 502.4-276z\",\n oiiintSize1: \"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z\",\n oiiintSize2: \"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z\",\n rightarrow: \"M0 241v40h399891c-47.3 35.3-84 78-110 128\\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n 151.7 139 205zm0 0v40h399900v-40z\",\n rightbrace: \"M400000 542l\\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z\",\n rightbraceunder: \"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z\",\n rightgroup: \"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\\n 3-1 3-3v-38c-76-158-257-219-435-219H0z\",\n rightgroupunder: \"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z\",\n rightharpoon: \"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\\n 69.2 92 94.5zm0 0v40h399900v-40z\",\n rightharpoonplus: \"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z\",\n rightharpoondown: \"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z\",\n rightharpoondownplus: \"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\\nm0-194v40h400000v-40zm0 0v40h400000v-40z\",\n righthook: \"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z\",\n rightlinesegment: \"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z\",\n rightToFrom: \"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z\",\n // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular\n twoheadleftarrow: \"M0 167c68 40\\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z\",\n twoheadrightarrow: \"M400000 167\\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z\",\n // tilde1 is a modified version of a glyph from the MnSymbol package\n tilde1: \"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\\n-68.267.847-113-73.952-191-73.952z\",\n // ditto tilde2, tilde3, & tilde4\n tilde2: \"M344 55.266c-142 0-300.638 81.316-311.5 86.418\\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z\",\n tilde3: \"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\\n -338 0-409-156.573-744-156.573z\",\n tilde4: \"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\\n -175.236-744-175.236z\",\n // vec is from glyph U+20D7 in font KaTeX Main\n vec: \"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\\nc-16-25.333-24-45-24-59z\",\n // widehat1 is a modified version of a glyph from the MnSymbol package\n widehat1: \"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z\",\n // ditto widehat2, widehat3, & widehat4\n widehat2: \"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n widehat3: \"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n widehat4: \"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z\",\n // widecheck paths are all inverted versions of widehat\n widecheck1: \"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z\",\n widecheck2: \"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n widecheck3: \"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n widecheck4: \"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z\",\n // The next ten paths support reaction arrows from the mhchem package.\n // Arrows for \\ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX\n // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main\n baraboveleftarrow: \"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z\",\n // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main\n rightarrowabovebar: \"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z\",\n // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.\n // Ref from mhchem.sty: \\rlap{\\raisebox{-.22ex}{$\\kern0.5em\n baraboveshortleftharpoon: \"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z\",\n rightharpoonaboveshortbar: \"M0,241 l0,40c399126,0,399993,0,399993,0\\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z\",\n shortbaraboveleftharpoon: \"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z\",\n shortrightharpoonabovebar: \"M53,241l0,40c398570,0,399437,0,399437,0\\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z\"\n};\nvar tallDelim = function tallDelim(label, midHeight) {\n switch (label) {\n case \"lbrack\":\n return \"M403 1759 V84 H666 V0 H319 V1759 v\" + midHeight + \" v1759 h347 v-84\\nH403z M403 1759 V0 H319 V1759 v\" + midHeight + \" v1759 h84z\";\n\n case \"rbrack\":\n return \"M347 1759 V0 H0 V84 H263 V1759 v\" + midHeight + \" v1759 H0 v84 H347z\\nM347 1759 V0 H263 V1759 v\" + midHeight + \" v1759 h84z\";\n\n case \"vert\":\n return \"M145 15 v585 v\" + midHeight + \" v585 c2.667,10,9.667,15,21,15\\nc10,0,16.667,-5,20,-15 v-585 v\" + -midHeight + \" v-585 c-2.667,-10,-9.667,-15,-21,-15\\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v\" + midHeight + \" v585 h43z\";\n\n case \"doublevert\":\n return \"M145 15 v585 v\" + midHeight + \" v585 c2.667,10,9.667,15,21,15\\nc10,0,16.667,-5,20,-15 v-585 v\" + -midHeight + \" v-585 c-2.667,-10,-9.667,-15,-21,-15\\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v\" + midHeight + \" v585 h43z\\nM367 15 v585 v\" + midHeight + \" v585 c2.667,10,9.667,15,21,15\\nc10,0,16.667,-5,20,-15 v-585 v\" + -midHeight + \" v-585 c-2.667,-10,-9.667,-15,-21,-15\\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v\" + midHeight + \" v585 h43z\";\n\n case \"lfloor\":\n return \"M319 602 V0 H403 V602 v\" + midHeight + \" v1715 h263 v84 H319z\\nMM319 602 V0 H403 V602 v\" + midHeight + \" v1715 H319z\";\n\n case \"rfloor\":\n return \"M319 602 V0 H403 V602 v\" + midHeight + \" v1799 H0 v-84 H319z\\nMM319 602 V0 H403 V602 v\" + midHeight + \" v1715 H319z\";\n\n case \"lceil\":\n return \"M403 1759 V84 H666 V0 H319 V1759 v\" + midHeight + \" v602 h84z\\nM403 1759 V0 H319 V1759 v\" + midHeight + \" v602 h84z\";\n\n case \"rceil\":\n return \"M347 1759 V0 H0 V84 H263 V1759 v\" + midHeight + \" v602 h84z\\nM347 1759 V0 h-84 V1759 v\" + midHeight + \" v602 h84z\";\n\n case \"lparen\":\n return \"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\\n-36,557 l0,\" + (midHeight + 84) + \"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\\nl0,-\" + (midHeight + 92) + \"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z\";\n\n case \"rparen\":\n return \"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,\" + (midHeight + 9) + \"\\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\\nl0,-\" + (midHeight + 144) + \"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z\";\n\n default:\n // We should not ever get here.\n throw new Error(\"Unknown stretchy delimiter.\");\n }\n};\n\n/**\n * This node represents a document fragment, which contains elements, but when\n * placed into the DOM doesn't have any representation itself. It only contains\n * children and doesn't have any DOM node properties.\n */\nclass DocumentFragment {\n // HtmlDomNode\n // Never used; needed for satisfying interface.\n constructor(children) {\n this.children = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n this.children = children;\n this.classes = [];\n this.height = 0;\n this.depth = 0;\n this.maxFontSize = 0;\n this.style = {};\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n /** Convert the fragment into a node. */\n\n\n toNode() {\n var frag = document.createDocumentFragment();\n\n for (var i = 0; i < this.children.length; i++) {\n frag.appendChild(this.children[i].toNode());\n }\n\n return frag;\n }\n /** Convert the fragment into HTML markup. */\n\n\n toMarkup() {\n var markup = \"\"; // Simply concatenate the markup for the children together.\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n return markup;\n }\n /**\n * Converts the math node into a string, similar to innerText. Applies to\n * MathDomNode's only.\n */\n\n\n toText() {\n // To avoid this, we would subclass documentFragment separately for\n // MathML, but polyfills for subclassing is expensive per PR 1469.\n // $FlowFixMe: Only works for ChildType = MathDomNode.\n var toText = child => child.toText();\n\n return this.children.map(toText).join(\"\");\n }\n\n}\n\n// This file is GENERATED by buildMetrics.sh. DO NOT MODIFY.\nvar fontMetricsData = {\n \"AMS-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"65\": [0, 0.68889, 0, 0, 0.72222],\n \"66\": [0, 0.68889, 0, 0, 0.66667],\n \"67\": [0, 0.68889, 0, 0, 0.72222],\n \"68\": [0, 0.68889, 0, 0, 0.72222],\n \"69\": [0, 0.68889, 0, 0, 0.66667],\n \"70\": [0, 0.68889, 0, 0, 0.61111],\n \"71\": [0, 0.68889, 0, 0, 0.77778],\n \"72\": [0, 0.68889, 0, 0, 0.77778],\n \"73\": [0, 0.68889, 0, 0, 0.38889],\n \"74\": [0.16667, 0.68889, 0, 0, 0.5],\n \"75\": [0, 0.68889, 0, 0, 0.77778],\n \"76\": [0, 0.68889, 0, 0, 0.66667],\n \"77\": [0, 0.68889, 0, 0, 0.94445],\n \"78\": [0, 0.68889, 0, 0, 0.72222],\n \"79\": [0.16667, 0.68889, 0, 0, 0.77778],\n \"80\": [0, 0.68889, 0, 0, 0.61111],\n \"81\": [0.16667, 0.68889, 0, 0, 0.77778],\n \"82\": [0, 0.68889, 0, 0, 0.72222],\n \"83\": [0, 0.68889, 0, 0, 0.55556],\n \"84\": [0, 0.68889, 0, 0, 0.66667],\n \"85\": [0, 0.68889, 0, 0, 0.72222],\n \"86\": [0, 0.68889, 0, 0, 0.72222],\n \"87\": [0, 0.68889, 0, 0, 1.0],\n \"88\": [0, 0.68889, 0, 0, 0.72222],\n \"89\": [0, 0.68889, 0, 0, 0.72222],\n \"90\": [0, 0.68889, 0, 0, 0.66667],\n \"107\": [0, 0.68889, 0, 0, 0.55556],\n \"160\": [0, 0, 0, 0, 0.25],\n \"165\": [0, 0.675, 0.025, 0, 0.75],\n \"174\": [0.15559, 0.69224, 0, 0, 0.94666],\n \"240\": [0, 0.68889, 0, 0, 0.55556],\n \"295\": [0, 0.68889, 0, 0, 0.54028],\n \"710\": [0, 0.825, 0, 0, 2.33334],\n \"732\": [0, 0.9, 0, 0, 2.33334],\n \"770\": [0, 0.825, 0, 0, 2.33334],\n \"771\": [0, 0.9, 0, 0, 2.33334],\n \"989\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"1008\": [0, 0.43056, 0.04028, 0, 0.66667],\n \"8245\": [0, 0.54986, 0, 0, 0.275],\n \"8463\": [0, 0.68889, 0, 0, 0.54028],\n \"8487\": [0, 0.68889, 0, 0, 0.72222],\n \"8498\": [0, 0.68889, 0, 0, 0.55556],\n \"8502\": [0, 0.68889, 0, 0, 0.66667],\n \"8503\": [0, 0.68889, 0, 0, 0.44445],\n \"8504\": [0, 0.68889, 0, 0, 0.66667],\n \"8513\": [0, 0.68889, 0, 0, 0.63889],\n \"8592\": [-0.03598, 0.46402, 0, 0, 0.5],\n \"8594\": [-0.03598, 0.46402, 0, 0, 0.5],\n \"8602\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8603\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8606\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8608\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8610\": [0.01354, 0.52239, 0, 0, 1.11111],\n \"8611\": [0.01354, 0.52239, 0, 0, 1.11111],\n \"8619\": [0, 0.54986, 0, 0, 1.0],\n \"8620\": [0, 0.54986, 0, 0, 1.0],\n \"8621\": [-0.13313, 0.37788, 0, 0, 1.38889],\n \"8622\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8624\": [0, 0.69224, 0, 0, 0.5],\n \"8625\": [0, 0.69224, 0, 0, 0.5],\n \"8630\": [0, 0.43056, 0, 0, 1.0],\n \"8631\": [0, 0.43056, 0, 0, 1.0],\n \"8634\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8635\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8638\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8639\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8642\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8643\": [0.19444, 0.69224, 0, 0, 0.41667],\n \"8644\": [0.1808, 0.675, 0, 0, 1.0],\n \"8646\": [0.1808, 0.675, 0, 0, 1.0],\n \"8647\": [0.1808, 0.675, 0, 0, 1.0],\n \"8648\": [0.19444, 0.69224, 0, 0, 0.83334],\n \"8649\": [0.1808, 0.675, 0, 0, 1.0],\n \"8650\": [0.19444, 0.69224, 0, 0, 0.83334],\n \"8651\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8652\": [0.01354, 0.52239, 0, 0, 1.0],\n \"8653\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8654\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8655\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8666\": [0.13667, 0.63667, 0, 0, 1.0],\n \"8667\": [0.13667, 0.63667, 0, 0, 1.0],\n \"8669\": [-0.13313, 0.37788, 0, 0, 1.0],\n \"8672\": [-0.064, 0.437, 0, 0, 1.334],\n \"8674\": [-0.064, 0.437, 0, 0, 1.334],\n \"8705\": [0, 0.825, 0, 0, 0.5],\n \"8708\": [0, 0.68889, 0, 0, 0.55556],\n \"8709\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8717\": [0, 0.43056, 0, 0, 0.42917],\n \"8722\": [-0.03598, 0.46402, 0, 0, 0.5],\n \"8724\": [0.08198, 0.69224, 0, 0, 0.77778],\n \"8726\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8733\": [0, 0.69224, 0, 0, 0.77778],\n \"8736\": [0, 0.69224, 0, 0, 0.72222],\n \"8737\": [0, 0.69224, 0, 0, 0.72222],\n \"8738\": [0.03517, 0.52239, 0, 0, 0.72222],\n \"8739\": [0.08167, 0.58167, 0, 0, 0.22222],\n \"8740\": [0.25142, 0.74111, 0, 0, 0.27778],\n \"8741\": [0.08167, 0.58167, 0, 0, 0.38889],\n \"8742\": [0.25142, 0.74111, 0, 0, 0.5],\n \"8756\": [0, 0.69224, 0, 0, 0.66667],\n \"8757\": [0, 0.69224, 0, 0, 0.66667],\n \"8764\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"8765\": [-0.13313, 0.37788, 0, 0, 0.77778],\n \"8769\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"8770\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8774\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8776\": [-0.01688, 0.48312, 0, 0, 0.77778],\n \"8778\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8782\": [0.06062, 0.54986, 0, 0, 0.77778],\n \"8783\": [0.06062, 0.54986, 0, 0, 0.77778],\n \"8785\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8786\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8787\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8790\": [0, 0.69224, 0, 0, 0.77778],\n \"8791\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8796\": [0.08198, 0.91667, 0, 0, 0.77778],\n \"8806\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"8807\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"8808\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"8809\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"8812\": [0.25583, 0.75583, 0, 0, 0.5],\n \"8814\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8815\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8816\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8817\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8818\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8819\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8822\": [0.1808, 0.675, 0, 0, 0.77778],\n \"8823\": [0.1808, 0.675, 0, 0, 0.77778],\n \"8828\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8829\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8830\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8831\": [0.22958, 0.72958, 0, 0, 0.77778],\n \"8832\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8833\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8840\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8841\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8842\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8843\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8847\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8848\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8858\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8859\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8861\": [0.08198, 0.58198, 0, 0, 0.77778],\n \"8862\": [0, 0.675, 0, 0, 0.77778],\n \"8863\": [0, 0.675, 0, 0, 0.77778],\n \"8864\": [0, 0.675, 0, 0, 0.77778],\n \"8865\": [0, 0.675, 0, 0, 0.77778],\n \"8872\": [0, 0.69224, 0, 0, 0.61111],\n \"8873\": [0, 0.69224, 0, 0, 0.72222],\n \"8874\": [0, 0.69224, 0, 0, 0.88889],\n \"8876\": [0, 0.68889, 0, 0, 0.61111],\n \"8877\": [0, 0.68889, 0, 0, 0.61111],\n \"8878\": [0, 0.68889, 0, 0, 0.72222],\n \"8879\": [0, 0.68889, 0, 0, 0.72222],\n \"8882\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8883\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8884\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8885\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8888\": [0, 0.54986, 0, 0, 1.11111],\n \"8890\": [0.19444, 0.43056, 0, 0, 0.55556],\n \"8891\": [0.19444, 0.69224, 0, 0, 0.61111],\n \"8892\": [0.19444, 0.69224, 0, 0, 0.61111],\n \"8901\": [0, 0.54986, 0, 0, 0.27778],\n \"8903\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8905\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8906\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"8907\": [0, 0.69224, 0, 0, 0.77778],\n \"8908\": [0, 0.69224, 0, 0, 0.77778],\n \"8909\": [-0.03598, 0.46402, 0, 0, 0.77778],\n \"8910\": [0, 0.54986, 0, 0, 0.76042],\n \"8911\": [0, 0.54986, 0, 0, 0.76042],\n \"8912\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8913\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"8914\": [0, 0.54986, 0, 0, 0.66667],\n \"8915\": [0, 0.54986, 0, 0, 0.66667],\n \"8916\": [0, 0.69224, 0, 0, 0.66667],\n \"8918\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8919\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8920\": [0.03517, 0.54986, 0, 0, 1.33334],\n \"8921\": [0.03517, 0.54986, 0, 0, 1.33334],\n \"8922\": [0.38569, 0.88569, 0, 0, 0.77778],\n \"8923\": [0.38569, 0.88569, 0, 0, 0.77778],\n \"8926\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8927\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"8928\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8929\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8934\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8935\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8936\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8937\": [0.23222, 0.74111, 0, 0, 0.77778],\n \"8938\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8939\": [0.20576, 0.70576, 0, 0, 0.77778],\n \"8940\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8941\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"8994\": [0.19444, 0.69224, 0, 0, 0.77778],\n \"8995\": [0.19444, 0.69224, 0, 0, 0.77778],\n \"9416\": [0.15559, 0.69224, 0, 0, 0.90222],\n \"9484\": [0, 0.69224, 0, 0, 0.5],\n \"9488\": [0, 0.69224, 0, 0, 0.5],\n \"9492\": [0, 0.37788, 0, 0, 0.5],\n \"9496\": [0, 0.37788, 0, 0, 0.5],\n \"9585\": [0.19444, 0.68889, 0, 0, 0.88889],\n \"9586\": [0.19444, 0.74111, 0, 0, 0.88889],\n \"9632\": [0, 0.675, 0, 0, 0.77778],\n \"9633\": [0, 0.675, 0, 0, 0.77778],\n \"9650\": [0, 0.54986, 0, 0, 0.72222],\n \"9651\": [0, 0.54986, 0, 0, 0.72222],\n \"9654\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"9660\": [0, 0.54986, 0, 0, 0.72222],\n \"9661\": [0, 0.54986, 0, 0, 0.72222],\n \"9664\": [0.03517, 0.54986, 0, 0, 0.77778],\n \"9674\": [0.11111, 0.69224, 0, 0, 0.66667],\n \"9733\": [0.19444, 0.69224, 0, 0, 0.94445],\n \"10003\": [0, 0.69224, 0, 0, 0.83334],\n \"10016\": [0, 0.69224, 0, 0, 0.83334],\n \"10731\": [0.11111, 0.69224, 0, 0, 0.66667],\n \"10846\": [0.19444, 0.75583, 0, 0, 0.61111],\n \"10877\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10878\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10885\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10886\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10887\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"10888\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"10889\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10890\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10891\": [0.48256, 0.98256, 0, 0, 0.77778],\n \"10892\": [0.48256, 0.98256, 0, 0, 0.77778],\n \"10901\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10902\": [0.13667, 0.63667, 0, 0, 0.77778],\n \"10933\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"10934\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"10935\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10936\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10937\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10938\": [0.26167, 0.75726, 0, 0, 0.77778],\n \"10949\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10950\": [0.25583, 0.75583, 0, 0, 0.77778],\n \"10955\": [0.28481, 0.79383, 0, 0, 0.77778],\n \"10956\": [0.28481, 0.79383, 0, 0, 0.77778],\n \"57350\": [0.08167, 0.58167, 0, 0, 0.22222],\n \"57351\": [0.08167, 0.58167, 0, 0, 0.38889],\n \"57352\": [0.08167, 0.58167, 0, 0, 0.77778],\n \"57353\": [0, 0.43056, 0.04028, 0, 0.66667],\n \"57356\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57357\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57358\": [0.41951, 0.91951, 0, 0, 0.77778],\n \"57359\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"57360\": [0.30274, 0.79383, 0, 0, 0.77778],\n \"57361\": [0.41951, 0.91951, 0, 0, 0.77778],\n \"57366\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57367\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57368\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57369\": [0.25142, 0.75726, 0, 0, 0.77778],\n \"57370\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"57371\": [0.13597, 0.63597, 0, 0, 0.77778]\n },\n \"Caligraphic-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"65\": [0, 0.68333, 0, 0.19445, 0.79847],\n \"66\": [0, 0.68333, 0.03041, 0.13889, 0.65681],\n \"67\": [0, 0.68333, 0.05834, 0.13889, 0.52653],\n \"68\": [0, 0.68333, 0.02778, 0.08334, 0.77139],\n \"69\": [0, 0.68333, 0.08944, 0.11111, 0.52778],\n \"70\": [0, 0.68333, 0.09931, 0.11111, 0.71875],\n \"71\": [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],\n \"72\": [0, 0.68333, 0.00965, 0.11111, 0.84452],\n \"73\": [0, 0.68333, 0.07382, 0, 0.54452],\n \"74\": [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],\n \"75\": [0, 0.68333, 0.01445, 0.05556, 0.76195],\n \"76\": [0, 0.68333, 0, 0.13889, 0.68972],\n \"77\": [0, 0.68333, 0, 0.13889, 1.2009],\n \"78\": [0, 0.68333, 0.14736, 0.08334, 0.82049],\n \"79\": [0, 0.68333, 0.02778, 0.11111, 0.79611],\n \"80\": [0, 0.68333, 0.08222, 0.08334, 0.69556],\n \"81\": [0.09722, 0.68333, 0, 0.11111, 0.81667],\n \"82\": [0, 0.68333, 0, 0.08334, 0.8475],\n \"83\": [0, 0.68333, 0.075, 0.13889, 0.60556],\n \"84\": [0, 0.68333, 0.25417, 0, 0.54464],\n \"85\": [0, 0.68333, 0.09931, 0.08334, 0.62583],\n \"86\": [0, 0.68333, 0.08222, 0, 0.61278],\n \"87\": [0, 0.68333, 0.08222, 0.08334, 0.98778],\n \"88\": [0, 0.68333, 0.14643, 0.13889, 0.7133],\n \"89\": [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],\n \"90\": [0, 0.68333, 0.07944, 0.13889, 0.72473],\n \"160\": [0, 0, 0, 0, 0.25]\n },\n \"Fraktur-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69141, 0, 0, 0.29574],\n \"34\": [0, 0.69141, 0, 0, 0.21471],\n \"38\": [0, 0.69141, 0, 0, 0.73786],\n \"39\": [0, 0.69141, 0, 0, 0.21201],\n \"40\": [0.24982, 0.74947, 0, 0, 0.38865],\n \"41\": [0.24982, 0.74947, 0, 0, 0.38865],\n \"42\": [0, 0.62119, 0, 0, 0.27764],\n \"43\": [0.08319, 0.58283, 0, 0, 0.75623],\n \"44\": [0, 0.10803, 0, 0, 0.27764],\n \"45\": [0.08319, 0.58283, 0, 0, 0.75623],\n \"46\": [0, 0.10803, 0, 0, 0.27764],\n \"47\": [0.24982, 0.74947, 0, 0, 0.50181],\n \"48\": [0, 0.47534, 0, 0, 0.50181],\n \"49\": [0, 0.47534, 0, 0, 0.50181],\n \"50\": [0, 0.47534, 0, 0, 0.50181],\n \"51\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"52\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"53\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"54\": [0, 0.69141, 0, 0, 0.50181],\n \"55\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"56\": [0, 0.69141, 0, 0, 0.50181],\n \"57\": [0.18906, 0.47534, 0, 0, 0.50181],\n \"58\": [0, 0.47534, 0, 0, 0.21606],\n \"59\": [0.12604, 0.47534, 0, 0, 0.21606],\n \"61\": [-0.13099, 0.36866, 0, 0, 0.75623],\n \"63\": [0, 0.69141, 0, 0, 0.36245],\n \"65\": [0, 0.69141, 0, 0, 0.7176],\n \"66\": [0, 0.69141, 0, 0, 0.88397],\n \"67\": [0, 0.69141, 0, 0, 0.61254],\n \"68\": [0, 0.69141, 0, 0, 0.83158],\n \"69\": [0, 0.69141, 0, 0, 0.66278],\n \"70\": [0.12604, 0.69141, 0, 0, 0.61119],\n \"71\": [0, 0.69141, 0, 0, 0.78539],\n \"72\": [0.06302, 0.69141, 0, 0, 0.7203],\n \"73\": [0, 0.69141, 0, 0, 0.55448],\n \"74\": [0.12604, 0.69141, 0, 0, 0.55231],\n \"75\": [0, 0.69141, 0, 0, 0.66845],\n \"76\": [0, 0.69141, 0, 0, 0.66602],\n \"77\": [0, 0.69141, 0, 0, 1.04953],\n \"78\": [0, 0.69141, 0, 0, 0.83212],\n \"79\": [0, 0.69141, 0, 0, 0.82699],\n \"80\": [0.18906, 0.69141, 0, 0, 0.82753],\n \"81\": [0.03781, 0.69141, 0, 0, 0.82699],\n \"82\": [0, 0.69141, 0, 0, 0.82807],\n \"83\": [0, 0.69141, 0, 0, 0.82861],\n \"84\": [0, 0.69141, 0, 0, 0.66899],\n \"85\": [0, 0.69141, 0, 0, 0.64576],\n \"86\": [0, 0.69141, 0, 0, 0.83131],\n \"87\": [0, 0.69141, 0, 0, 1.04602],\n \"88\": [0, 0.69141, 0, 0, 0.71922],\n \"89\": [0.18906, 0.69141, 0, 0, 0.83293],\n \"90\": [0.12604, 0.69141, 0, 0, 0.60201],\n \"91\": [0.24982, 0.74947, 0, 0, 0.27764],\n \"93\": [0.24982, 0.74947, 0, 0, 0.27764],\n \"94\": [0, 0.69141, 0, 0, 0.49965],\n \"97\": [0, 0.47534, 0, 0, 0.50046],\n \"98\": [0, 0.69141, 0, 0, 0.51315],\n \"99\": [0, 0.47534, 0, 0, 0.38946],\n \"100\": [0, 0.62119, 0, 0, 0.49857],\n \"101\": [0, 0.47534, 0, 0, 0.40053],\n \"102\": [0.18906, 0.69141, 0, 0, 0.32626],\n \"103\": [0.18906, 0.47534, 0, 0, 0.5037],\n \"104\": [0.18906, 0.69141, 0, 0, 0.52126],\n \"105\": [0, 0.69141, 0, 0, 0.27899],\n \"106\": [0, 0.69141, 0, 0, 0.28088],\n \"107\": [0, 0.69141, 0, 0, 0.38946],\n \"108\": [0, 0.69141, 0, 0, 0.27953],\n \"109\": [0, 0.47534, 0, 0, 0.76676],\n \"110\": [0, 0.47534, 0, 0, 0.52666],\n \"111\": [0, 0.47534, 0, 0, 0.48885],\n \"112\": [0.18906, 0.52396, 0, 0, 0.50046],\n \"113\": [0.18906, 0.47534, 0, 0, 0.48912],\n \"114\": [0, 0.47534, 0, 0, 0.38919],\n \"115\": [0, 0.47534, 0, 0, 0.44266],\n \"116\": [0, 0.62119, 0, 0, 0.33301],\n \"117\": [0, 0.47534, 0, 0, 0.5172],\n \"118\": [0, 0.52396, 0, 0, 0.5118],\n \"119\": [0, 0.52396, 0, 0, 0.77351],\n \"120\": [0.18906, 0.47534, 0, 0, 0.38865],\n \"121\": [0.18906, 0.47534, 0, 0, 0.49884],\n \"122\": [0.18906, 0.47534, 0, 0, 0.39054],\n \"160\": [0, 0, 0, 0, 0.25],\n \"8216\": [0, 0.69141, 0, 0, 0.21471],\n \"8217\": [0, 0.69141, 0, 0, 0.21471],\n \"58112\": [0, 0.62119, 0, 0, 0.49749],\n \"58113\": [0, 0.62119, 0, 0, 0.4983],\n \"58114\": [0.18906, 0.69141, 0, 0, 0.33328],\n \"58115\": [0.18906, 0.69141, 0, 0, 0.32923],\n \"58116\": [0.18906, 0.47534, 0, 0, 0.50343],\n \"58117\": [0, 0.69141, 0, 0, 0.33301],\n \"58118\": [0, 0.62119, 0, 0, 0.33409],\n \"58119\": [0, 0.47534, 0, 0, 0.50073]\n },\n \"Main-Bold\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.35],\n \"34\": [0, 0.69444, 0, 0, 0.60278],\n \"35\": [0.19444, 0.69444, 0, 0, 0.95833],\n \"36\": [0.05556, 0.75, 0, 0, 0.575],\n \"37\": [0.05556, 0.75, 0, 0, 0.95833],\n \"38\": [0, 0.69444, 0, 0, 0.89444],\n \"39\": [0, 0.69444, 0, 0, 0.31944],\n \"40\": [0.25, 0.75, 0, 0, 0.44722],\n \"41\": [0.25, 0.75, 0, 0, 0.44722],\n \"42\": [0, 0.75, 0, 0, 0.575],\n \"43\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"44\": [0.19444, 0.15556, 0, 0, 0.31944],\n \"45\": [0, 0.44444, 0, 0, 0.38333],\n \"46\": [0, 0.15556, 0, 0, 0.31944],\n \"47\": [0.25, 0.75, 0, 0, 0.575],\n \"48\": [0, 0.64444, 0, 0, 0.575],\n \"49\": [0, 0.64444, 0, 0, 0.575],\n \"50\": [0, 0.64444, 0, 0, 0.575],\n \"51\": [0, 0.64444, 0, 0, 0.575],\n \"52\": [0, 0.64444, 0, 0, 0.575],\n \"53\": [0, 0.64444, 0, 0, 0.575],\n \"54\": [0, 0.64444, 0, 0, 0.575],\n \"55\": [0, 0.64444, 0, 0, 0.575],\n \"56\": [0, 0.64444, 0, 0, 0.575],\n \"57\": [0, 0.64444, 0, 0, 0.575],\n \"58\": [0, 0.44444, 0, 0, 0.31944],\n \"59\": [0.19444, 0.44444, 0, 0, 0.31944],\n \"60\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"61\": [-0.10889, 0.39111, 0, 0, 0.89444],\n \"62\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"63\": [0, 0.69444, 0, 0, 0.54305],\n \"64\": [0, 0.69444, 0, 0, 0.89444],\n \"65\": [0, 0.68611, 0, 0, 0.86944],\n \"66\": [0, 0.68611, 0, 0, 0.81805],\n \"67\": [0, 0.68611, 0, 0, 0.83055],\n \"68\": [0, 0.68611, 0, 0, 0.88194],\n \"69\": [0, 0.68611, 0, 0, 0.75555],\n \"70\": [0, 0.68611, 0, 0, 0.72361],\n \"71\": [0, 0.68611, 0, 0, 0.90416],\n \"72\": [0, 0.68611, 0, 0, 0.9],\n \"73\": [0, 0.68611, 0, 0, 0.43611],\n \"74\": [0, 0.68611, 0, 0, 0.59444],\n \"75\": [0, 0.68611, 0, 0, 0.90138],\n \"76\": [0, 0.68611, 0, 0, 0.69166],\n \"77\": [0, 0.68611, 0, 0, 1.09166],\n \"78\": [0, 0.68611, 0, 0, 0.9],\n \"79\": [0, 0.68611, 0, 0, 0.86388],\n \"80\": [0, 0.68611, 0, 0, 0.78611],\n \"81\": [0.19444, 0.68611, 0, 0, 0.86388],\n \"82\": [0, 0.68611, 0, 0, 0.8625],\n \"83\": [0, 0.68611, 0, 0, 0.63889],\n \"84\": [0, 0.68611, 0, 0, 0.8],\n \"85\": [0, 0.68611, 0, 0, 0.88472],\n \"86\": [0, 0.68611, 0.01597, 0, 0.86944],\n \"87\": [0, 0.68611, 0.01597, 0, 1.18888],\n \"88\": [0, 0.68611, 0, 0, 0.86944],\n \"89\": [0, 0.68611, 0.02875, 0, 0.86944],\n \"90\": [0, 0.68611, 0, 0, 0.70277],\n \"91\": [0.25, 0.75, 0, 0, 0.31944],\n \"92\": [0.25, 0.75, 0, 0, 0.575],\n \"93\": [0.25, 0.75, 0, 0, 0.31944],\n \"94\": [0, 0.69444, 0, 0, 0.575],\n \"95\": [0.31, 0.13444, 0.03194, 0, 0.575],\n \"97\": [0, 0.44444, 0, 0, 0.55902],\n \"98\": [0, 0.69444, 0, 0, 0.63889],\n \"99\": [0, 0.44444, 0, 0, 0.51111],\n \"100\": [0, 0.69444, 0, 0, 0.63889],\n \"101\": [0, 0.44444, 0, 0, 0.52708],\n \"102\": [0, 0.69444, 0.10903, 0, 0.35139],\n \"103\": [0.19444, 0.44444, 0.01597, 0, 0.575],\n \"104\": [0, 0.69444, 0, 0, 0.63889],\n \"105\": [0, 0.69444, 0, 0, 0.31944],\n \"106\": [0.19444, 0.69444, 0, 0, 0.35139],\n \"107\": [0, 0.69444, 0, 0, 0.60694],\n \"108\": [0, 0.69444, 0, 0, 0.31944],\n \"109\": [0, 0.44444, 0, 0, 0.95833],\n \"110\": [0, 0.44444, 0, 0, 0.63889],\n \"111\": [0, 0.44444, 0, 0, 0.575],\n \"112\": [0.19444, 0.44444, 0, 0, 0.63889],\n \"113\": [0.19444, 0.44444, 0, 0, 0.60694],\n \"114\": [0, 0.44444, 0, 0, 0.47361],\n \"115\": [0, 0.44444, 0, 0, 0.45361],\n \"116\": [0, 0.63492, 0, 0, 0.44722],\n \"117\": [0, 0.44444, 0, 0, 0.63889],\n \"118\": [0, 0.44444, 0.01597, 0, 0.60694],\n \"119\": [0, 0.44444, 0.01597, 0, 0.83055],\n \"120\": [0, 0.44444, 0, 0, 0.60694],\n \"121\": [0.19444, 0.44444, 0.01597, 0, 0.60694],\n \"122\": [0, 0.44444, 0, 0, 0.51111],\n \"123\": [0.25, 0.75, 0, 0, 0.575],\n \"124\": [0.25, 0.75, 0, 0, 0.31944],\n \"125\": [0.25, 0.75, 0, 0, 0.575],\n \"126\": [0.35, 0.34444, 0, 0, 0.575],\n \"160\": [0, 0, 0, 0, 0.25],\n \"163\": [0, 0.69444, 0, 0, 0.86853],\n \"168\": [0, 0.69444, 0, 0, 0.575],\n \"172\": [0, 0.44444, 0, 0, 0.76666],\n \"176\": [0, 0.69444, 0, 0, 0.86944],\n \"177\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"184\": [0.17014, 0, 0, 0, 0.51111],\n \"198\": [0, 0.68611, 0, 0, 1.04166],\n \"215\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"216\": [0.04861, 0.73472, 0, 0, 0.89444],\n \"223\": [0, 0.69444, 0, 0, 0.59722],\n \"230\": [0, 0.44444, 0, 0, 0.83055],\n \"247\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"248\": [0.09722, 0.54167, 0, 0, 0.575],\n \"305\": [0, 0.44444, 0, 0, 0.31944],\n \"338\": [0, 0.68611, 0, 0, 1.16944],\n \"339\": [0, 0.44444, 0, 0, 0.89444],\n \"567\": [0.19444, 0.44444, 0, 0, 0.35139],\n \"710\": [0, 0.69444, 0, 0, 0.575],\n \"711\": [0, 0.63194, 0, 0, 0.575],\n \"713\": [0, 0.59611, 0, 0, 0.575],\n \"714\": [0, 0.69444, 0, 0, 0.575],\n \"715\": [0, 0.69444, 0, 0, 0.575],\n \"728\": [0, 0.69444, 0, 0, 0.575],\n \"729\": [0, 0.69444, 0, 0, 0.31944],\n \"730\": [0, 0.69444, 0, 0, 0.86944],\n \"732\": [0, 0.69444, 0, 0, 0.575],\n \"733\": [0, 0.69444, 0, 0, 0.575],\n \"915\": [0, 0.68611, 0, 0, 0.69166],\n \"916\": [0, 0.68611, 0, 0, 0.95833],\n \"920\": [0, 0.68611, 0, 0, 0.89444],\n \"923\": [0, 0.68611, 0, 0, 0.80555],\n \"926\": [0, 0.68611, 0, 0, 0.76666],\n \"928\": [0, 0.68611, 0, 0, 0.9],\n \"931\": [0, 0.68611, 0, 0, 0.83055],\n \"933\": [0, 0.68611, 0, 0, 0.89444],\n \"934\": [0, 0.68611, 0, 0, 0.83055],\n \"936\": [0, 0.68611, 0, 0, 0.89444],\n \"937\": [0, 0.68611, 0, 0, 0.83055],\n \"8211\": [0, 0.44444, 0.03194, 0, 0.575],\n \"8212\": [0, 0.44444, 0.03194, 0, 1.14999],\n \"8216\": [0, 0.69444, 0, 0, 0.31944],\n \"8217\": [0, 0.69444, 0, 0, 0.31944],\n \"8220\": [0, 0.69444, 0, 0, 0.60278],\n \"8221\": [0, 0.69444, 0, 0, 0.60278],\n \"8224\": [0.19444, 0.69444, 0, 0, 0.51111],\n \"8225\": [0.19444, 0.69444, 0, 0, 0.51111],\n \"8242\": [0, 0.55556, 0, 0, 0.34444],\n \"8407\": [0, 0.72444, 0.15486, 0, 0.575],\n \"8463\": [0, 0.69444, 0, 0, 0.66759],\n \"8465\": [0, 0.69444, 0, 0, 0.83055],\n \"8467\": [0, 0.69444, 0, 0, 0.47361],\n \"8472\": [0.19444, 0.44444, 0, 0, 0.74027],\n \"8476\": [0, 0.69444, 0, 0, 0.83055],\n \"8501\": [0, 0.69444, 0, 0, 0.70277],\n \"8592\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8593\": [0.19444, 0.69444, 0, 0, 0.575],\n \"8594\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8595\": [0.19444, 0.69444, 0, 0, 0.575],\n \"8596\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8597\": [0.25, 0.75, 0, 0, 0.575],\n \"8598\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8599\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8600\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8601\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"8636\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8637\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8640\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8641\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8656\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8657\": [0.19444, 0.69444, 0, 0, 0.70277],\n \"8658\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8659\": [0.19444, 0.69444, 0, 0, 0.70277],\n \"8660\": [-0.10889, 0.39111, 0, 0, 1.14999],\n \"8661\": [0.25, 0.75, 0, 0, 0.70277],\n \"8704\": [0, 0.69444, 0, 0, 0.63889],\n \"8706\": [0, 0.69444, 0.06389, 0, 0.62847],\n \"8707\": [0, 0.69444, 0, 0, 0.63889],\n \"8709\": [0.05556, 0.75, 0, 0, 0.575],\n \"8711\": [0, 0.68611, 0, 0, 0.95833],\n \"8712\": [0.08556, 0.58556, 0, 0, 0.76666],\n \"8715\": [0.08556, 0.58556, 0, 0, 0.76666],\n \"8722\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8723\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8725\": [0.25, 0.75, 0, 0, 0.575],\n \"8726\": [0.25, 0.75, 0, 0, 0.575],\n \"8727\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"8728\": [-0.02639, 0.47361, 0, 0, 0.575],\n \"8729\": [-0.02639, 0.47361, 0, 0, 0.575],\n \"8730\": [0.18, 0.82, 0, 0, 0.95833],\n \"8733\": [0, 0.44444, 0, 0, 0.89444],\n \"8734\": [0, 0.44444, 0, 0, 1.14999],\n \"8736\": [0, 0.69224, 0, 0, 0.72222],\n \"8739\": [0.25, 0.75, 0, 0, 0.31944],\n \"8741\": [0.25, 0.75, 0, 0, 0.575],\n \"8743\": [0, 0.55556, 0, 0, 0.76666],\n \"8744\": [0, 0.55556, 0, 0, 0.76666],\n \"8745\": [0, 0.55556, 0, 0, 0.76666],\n \"8746\": [0, 0.55556, 0, 0, 0.76666],\n \"8747\": [0.19444, 0.69444, 0.12778, 0, 0.56875],\n \"8764\": [-0.10889, 0.39111, 0, 0, 0.89444],\n \"8768\": [0.19444, 0.69444, 0, 0, 0.31944],\n \"8771\": [0.00222, 0.50222, 0, 0, 0.89444],\n \"8773\": [0.027, 0.638, 0, 0, 0.894],\n \"8776\": [0.02444, 0.52444, 0, 0, 0.89444],\n \"8781\": [0.00222, 0.50222, 0, 0, 0.89444],\n \"8801\": [0.00222, 0.50222, 0, 0, 0.89444],\n \"8804\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8805\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8810\": [0.08556, 0.58556, 0, 0, 1.14999],\n \"8811\": [0.08556, 0.58556, 0, 0, 1.14999],\n \"8826\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8827\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8834\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8835\": [0.08556, 0.58556, 0, 0, 0.89444],\n \"8838\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8839\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8846\": [0, 0.55556, 0, 0, 0.76666],\n \"8849\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8850\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"8851\": [0, 0.55556, 0, 0, 0.76666],\n \"8852\": [0, 0.55556, 0, 0, 0.76666],\n \"8853\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8854\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8855\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8856\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8857\": [0.13333, 0.63333, 0, 0, 0.89444],\n \"8866\": [0, 0.69444, 0, 0, 0.70277],\n \"8867\": [0, 0.69444, 0, 0, 0.70277],\n \"8868\": [0, 0.69444, 0, 0, 0.89444],\n \"8869\": [0, 0.69444, 0, 0, 0.89444],\n \"8900\": [-0.02639, 0.47361, 0, 0, 0.575],\n \"8901\": [-0.02639, 0.47361, 0, 0, 0.31944],\n \"8902\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"8968\": [0.25, 0.75, 0, 0, 0.51111],\n \"8969\": [0.25, 0.75, 0, 0, 0.51111],\n \"8970\": [0.25, 0.75, 0, 0, 0.51111],\n \"8971\": [0.25, 0.75, 0, 0, 0.51111],\n \"8994\": [-0.13889, 0.36111, 0, 0, 1.14999],\n \"8995\": [-0.13889, 0.36111, 0, 0, 1.14999],\n \"9651\": [0.19444, 0.69444, 0, 0, 1.02222],\n \"9657\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"9661\": [0.19444, 0.69444, 0, 0, 1.02222],\n \"9667\": [-0.02778, 0.47222, 0, 0, 0.575],\n \"9711\": [0.19444, 0.69444, 0, 0, 1.14999],\n \"9824\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9825\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9826\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9827\": [0.12963, 0.69444, 0, 0, 0.89444],\n \"9837\": [0, 0.75, 0, 0, 0.44722],\n \"9838\": [0.19444, 0.69444, 0, 0, 0.44722],\n \"9839\": [0.19444, 0.69444, 0, 0, 0.44722],\n \"10216\": [0.25, 0.75, 0, 0, 0.44722],\n \"10217\": [0.25, 0.75, 0, 0, 0.44722],\n \"10815\": [0, 0.68611, 0, 0, 0.9],\n \"10927\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"10928\": [0.19667, 0.69667, 0, 0, 0.89444],\n \"57376\": [0.19444, 0.69444, 0, 0, 0]\n },\n \"Main-BoldItalic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0.11417, 0, 0.38611],\n \"34\": [0, 0.69444, 0.07939, 0, 0.62055],\n \"35\": [0.19444, 0.69444, 0.06833, 0, 0.94444],\n \"37\": [0.05556, 0.75, 0.12861, 0, 0.94444],\n \"38\": [0, 0.69444, 0.08528, 0, 0.88555],\n \"39\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"40\": [0.25, 0.75, 0.15806, 0, 0.47333],\n \"41\": [0.25, 0.75, 0.03306, 0, 0.47333],\n \"42\": [0, 0.75, 0.14333, 0, 0.59111],\n \"43\": [0.10333, 0.60333, 0.03306, 0, 0.88555],\n \"44\": [0.19444, 0.14722, 0, 0, 0.35555],\n \"45\": [0, 0.44444, 0.02611, 0, 0.41444],\n \"46\": [0, 0.14722, 0, 0, 0.35555],\n \"47\": [0.25, 0.75, 0.15806, 0, 0.59111],\n \"48\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"49\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"50\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"51\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"52\": [0.19444, 0.64444, 0.13167, 0, 0.59111],\n \"53\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"54\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"55\": [0.19444, 0.64444, 0.13167, 0, 0.59111],\n \"56\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"57\": [0, 0.64444, 0.13167, 0, 0.59111],\n \"58\": [0, 0.44444, 0.06695, 0, 0.35555],\n \"59\": [0.19444, 0.44444, 0.06695, 0, 0.35555],\n \"61\": [-0.10889, 0.39111, 0.06833, 0, 0.88555],\n \"63\": [0, 0.69444, 0.11472, 0, 0.59111],\n \"64\": [0, 0.69444, 0.09208, 0, 0.88555],\n \"65\": [0, 0.68611, 0, 0, 0.86555],\n \"66\": [0, 0.68611, 0.0992, 0, 0.81666],\n \"67\": [0, 0.68611, 0.14208, 0, 0.82666],\n \"68\": [0, 0.68611, 0.09062, 0, 0.87555],\n \"69\": [0, 0.68611, 0.11431, 0, 0.75666],\n \"70\": [0, 0.68611, 0.12903, 0, 0.72722],\n \"71\": [0, 0.68611, 0.07347, 0, 0.89527],\n \"72\": [0, 0.68611, 0.17208, 0, 0.8961],\n \"73\": [0, 0.68611, 0.15681, 0, 0.47166],\n \"74\": [0, 0.68611, 0.145, 0, 0.61055],\n \"75\": [0, 0.68611, 0.14208, 0, 0.89499],\n \"76\": [0, 0.68611, 0, 0, 0.69777],\n \"77\": [0, 0.68611, 0.17208, 0, 1.07277],\n \"78\": [0, 0.68611, 0.17208, 0, 0.8961],\n \"79\": [0, 0.68611, 0.09062, 0, 0.85499],\n \"80\": [0, 0.68611, 0.0992, 0, 0.78721],\n \"81\": [0.19444, 0.68611, 0.09062, 0, 0.85499],\n \"82\": [0, 0.68611, 0.02559, 0, 0.85944],\n \"83\": [0, 0.68611, 0.11264, 0, 0.64999],\n \"84\": [0, 0.68611, 0.12903, 0, 0.7961],\n \"85\": [0, 0.68611, 0.17208, 0, 0.88083],\n \"86\": [0, 0.68611, 0.18625, 0, 0.86555],\n \"87\": [0, 0.68611, 0.18625, 0, 1.15999],\n \"88\": [0, 0.68611, 0.15681, 0, 0.86555],\n \"89\": [0, 0.68611, 0.19803, 0, 0.86555],\n \"90\": [0, 0.68611, 0.14208, 0, 0.70888],\n \"91\": [0.25, 0.75, 0.1875, 0, 0.35611],\n \"93\": [0.25, 0.75, 0.09972, 0, 0.35611],\n \"94\": [0, 0.69444, 0.06709, 0, 0.59111],\n \"95\": [0.31, 0.13444, 0.09811, 0, 0.59111],\n \"97\": [0, 0.44444, 0.09426, 0, 0.59111],\n \"98\": [0, 0.69444, 0.07861, 0, 0.53222],\n \"99\": [0, 0.44444, 0.05222, 0, 0.53222],\n \"100\": [0, 0.69444, 0.10861, 0, 0.59111],\n \"101\": [0, 0.44444, 0.085, 0, 0.53222],\n \"102\": [0.19444, 0.69444, 0.21778, 0, 0.4],\n \"103\": [0.19444, 0.44444, 0.105, 0, 0.53222],\n \"104\": [0, 0.69444, 0.09426, 0, 0.59111],\n \"105\": [0, 0.69326, 0.11387, 0, 0.35555],\n \"106\": [0.19444, 0.69326, 0.1672, 0, 0.35555],\n \"107\": [0, 0.69444, 0.11111, 0, 0.53222],\n \"108\": [0, 0.69444, 0.10861, 0, 0.29666],\n \"109\": [0, 0.44444, 0.09426, 0, 0.94444],\n \"110\": [0, 0.44444, 0.09426, 0, 0.64999],\n \"111\": [0, 0.44444, 0.07861, 0, 0.59111],\n \"112\": [0.19444, 0.44444, 0.07861, 0, 0.59111],\n \"113\": [0.19444, 0.44444, 0.105, 0, 0.53222],\n \"114\": [0, 0.44444, 0.11111, 0, 0.50167],\n \"115\": [0, 0.44444, 0.08167, 0, 0.48694],\n \"116\": [0, 0.63492, 0.09639, 0, 0.385],\n \"117\": [0, 0.44444, 0.09426, 0, 0.62055],\n \"118\": [0, 0.44444, 0.11111, 0, 0.53222],\n \"119\": [0, 0.44444, 0.11111, 0, 0.76777],\n \"120\": [0, 0.44444, 0.12583, 0, 0.56055],\n \"121\": [0.19444, 0.44444, 0.105, 0, 0.56166],\n \"122\": [0, 0.44444, 0.13889, 0, 0.49055],\n \"126\": [0.35, 0.34444, 0.11472, 0, 0.59111],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.69444, 0.11473, 0, 0.59111],\n \"176\": [0, 0.69444, 0, 0, 0.94888],\n \"184\": [0.17014, 0, 0, 0, 0.53222],\n \"198\": [0, 0.68611, 0.11431, 0, 1.02277],\n \"216\": [0.04861, 0.73472, 0.09062, 0, 0.88555],\n \"223\": [0.19444, 0.69444, 0.09736, 0, 0.665],\n \"230\": [0, 0.44444, 0.085, 0, 0.82666],\n \"248\": [0.09722, 0.54167, 0.09458, 0, 0.59111],\n \"305\": [0, 0.44444, 0.09426, 0, 0.35555],\n \"338\": [0, 0.68611, 0.11431, 0, 1.14054],\n \"339\": [0, 0.44444, 0.085, 0, 0.82666],\n \"567\": [0.19444, 0.44444, 0.04611, 0, 0.385],\n \"710\": [0, 0.69444, 0.06709, 0, 0.59111],\n \"711\": [0, 0.63194, 0.08271, 0, 0.59111],\n \"713\": [0, 0.59444, 0.10444, 0, 0.59111],\n \"714\": [0, 0.69444, 0.08528, 0, 0.59111],\n \"715\": [0, 0.69444, 0, 0, 0.59111],\n \"728\": [0, 0.69444, 0.10333, 0, 0.59111],\n \"729\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"730\": [0, 0.69444, 0, 0, 0.94888],\n \"732\": [0, 0.69444, 0.11472, 0, 0.59111],\n \"733\": [0, 0.69444, 0.11472, 0, 0.59111],\n \"915\": [0, 0.68611, 0.12903, 0, 0.69777],\n \"916\": [0, 0.68611, 0, 0, 0.94444],\n \"920\": [0, 0.68611, 0.09062, 0, 0.88555],\n \"923\": [0, 0.68611, 0, 0, 0.80666],\n \"926\": [0, 0.68611, 0.15092, 0, 0.76777],\n \"928\": [0, 0.68611, 0.17208, 0, 0.8961],\n \"931\": [0, 0.68611, 0.11431, 0, 0.82666],\n \"933\": [0, 0.68611, 0.10778, 0, 0.88555],\n \"934\": [0, 0.68611, 0.05632, 0, 0.82666],\n \"936\": [0, 0.68611, 0.10778, 0, 0.88555],\n \"937\": [0, 0.68611, 0.0992, 0, 0.82666],\n \"8211\": [0, 0.44444, 0.09811, 0, 0.59111],\n \"8212\": [0, 0.44444, 0.09811, 0, 1.18221],\n \"8216\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"8217\": [0, 0.69444, 0.12945, 0, 0.35555],\n \"8220\": [0, 0.69444, 0.16772, 0, 0.62055],\n \"8221\": [0, 0.69444, 0.07939, 0, 0.62055]\n },\n \"Main-Italic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"34\": [0, 0.69444, 0.06961, 0, 0.51444],\n \"35\": [0.19444, 0.69444, 0.06616, 0, 0.81777],\n \"37\": [0.05556, 0.75, 0.13639, 0, 0.81777],\n \"38\": [0, 0.69444, 0.09694, 0, 0.76666],\n \"39\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"40\": [0.25, 0.75, 0.16194, 0, 0.40889],\n \"41\": [0.25, 0.75, 0.03694, 0, 0.40889],\n \"42\": [0, 0.75, 0.14917, 0, 0.51111],\n \"43\": [0.05667, 0.56167, 0.03694, 0, 0.76666],\n \"44\": [0.19444, 0.10556, 0, 0, 0.30667],\n \"45\": [0, 0.43056, 0.02826, 0, 0.35778],\n \"46\": [0, 0.10556, 0, 0, 0.30667],\n \"47\": [0.25, 0.75, 0.16194, 0, 0.51111],\n \"48\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"49\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"50\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"51\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"52\": [0.19444, 0.64444, 0.13556, 0, 0.51111],\n \"53\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"54\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"55\": [0.19444, 0.64444, 0.13556, 0, 0.51111],\n \"56\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"57\": [0, 0.64444, 0.13556, 0, 0.51111],\n \"58\": [0, 0.43056, 0.0582, 0, 0.30667],\n \"59\": [0.19444, 0.43056, 0.0582, 0, 0.30667],\n \"61\": [-0.13313, 0.36687, 0.06616, 0, 0.76666],\n \"63\": [0, 0.69444, 0.1225, 0, 0.51111],\n \"64\": [0, 0.69444, 0.09597, 0, 0.76666],\n \"65\": [0, 0.68333, 0, 0, 0.74333],\n \"66\": [0, 0.68333, 0.10257, 0, 0.70389],\n \"67\": [0, 0.68333, 0.14528, 0, 0.71555],\n \"68\": [0, 0.68333, 0.09403, 0, 0.755],\n \"69\": [0, 0.68333, 0.12028, 0, 0.67833],\n \"70\": [0, 0.68333, 0.13305, 0, 0.65277],\n \"71\": [0, 0.68333, 0.08722, 0, 0.77361],\n \"72\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"73\": [0, 0.68333, 0.15806, 0, 0.38555],\n \"74\": [0, 0.68333, 0.14028, 0, 0.525],\n \"75\": [0, 0.68333, 0.14528, 0, 0.76888],\n \"76\": [0, 0.68333, 0, 0, 0.62722],\n \"77\": [0, 0.68333, 0.16389, 0, 0.89666],\n \"78\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"79\": [0, 0.68333, 0.09403, 0, 0.76666],\n \"80\": [0, 0.68333, 0.10257, 0, 0.67833],\n \"81\": [0.19444, 0.68333, 0.09403, 0, 0.76666],\n \"82\": [0, 0.68333, 0.03868, 0, 0.72944],\n \"83\": [0, 0.68333, 0.11972, 0, 0.56222],\n \"84\": [0, 0.68333, 0.13305, 0, 0.71555],\n \"85\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"86\": [0, 0.68333, 0.18361, 0, 0.74333],\n \"87\": [0, 0.68333, 0.18361, 0, 0.99888],\n \"88\": [0, 0.68333, 0.15806, 0, 0.74333],\n \"89\": [0, 0.68333, 0.19383, 0, 0.74333],\n \"90\": [0, 0.68333, 0.14528, 0, 0.61333],\n \"91\": [0.25, 0.75, 0.1875, 0, 0.30667],\n \"93\": [0.25, 0.75, 0.10528, 0, 0.30667],\n \"94\": [0, 0.69444, 0.06646, 0, 0.51111],\n \"95\": [0.31, 0.12056, 0.09208, 0, 0.51111],\n \"97\": [0, 0.43056, 0.07671, 0, 0.51111],\n \"98\": [0, 0.69444, 0.06312, 0, 0.46],\n \"99\": [0, 0.43056, 0.05653, 0, 0.46],\n \"100\": [0, 0.69444, 0.10333, 0, 0.51111],\n \"101\": [0, 0.43056, 0.07514, 0, 0.46],\n \"102\": [0.19444, 0.69444, 0.21194, 0, 0.30667],\n \"103\": [0.19444, 0.43056, 0.08847, 0, 0.46],\n \"104\": [0, 0.69444, 0.07671, 0, 0.51111],\n \"105\": [0, 0.65536, 0.1019, 0, 0.30667],\n \"106\": [0.19444, 0.65536, 0.14467, 0, 0.30667],\n \"107\": [0, 0.69444, 0.10764, 0, 0.46],\n \"108\": [0, 0.69444, 0.10333, 0, 0.25555],\n \"109\": [0, 0.43056, 0.07671, 0, 0.81777],\n \"110\": [0, 0.43056, 0.07671, 0, 0.56222],\n \"111\": [0, 0.43056, 0.06312, 0, 0.51111],\n \"112\": [0.19444, 0.43056, 0.06312, 0, 0.51111],\n \"113\": [0.19444, 0.43056, 0.08847, 0, 0.46],\n \"114\": [0, 0.43056, 0.10764, 0, 0.42166],\n \"115\": [0, 0.43056, 0.08208, 0, 0.40889],\n \"116\": [0, 0.61508, 0.09486, 0, 0.33222],\n \"117\": [0, 0.43056, 0.07671, 0, 0.53666],\n \"118\": [0, 0.43056, 0.10764, 0, 0.46],\n \"119\": [0, 0.43056, 0.10764, 0, 0.66444],\n \"120\": [0, 0.43056, 0.12042, 0, 0.46389],\n \"121\": [0.19444, 0.43056, 0.08847, 0, 0.48555],\n \"122\": [0, 0.43056, 0.12292, 0, 0.40889],\n \"126\": [0.35, 0.31786, 0.11585, 0, 0.51111],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.66786, 0.10474, 0, 0.51111],\n \"176\": [0, 0.69444, 0, 0, 0.83129],\n \"184\": [0.17014, 0, 0, 0, 0.46],\n \"198\": [0, 0.68333, 0.12028, 0, 0.88277],\n \"216\": [0.04861, 0.73194, 0.09403, 0, 0.76666],\n \"223\": [0.19444, 0.69444, 0.10514, 0, 0.53666],\n \"230\": [0, 0.43056, 0.07514, 0, 0.71555],\n \"248\": [0.09722, 0.52778, 0.09194, 0, 0.51111],\n \"338\": [0, 0.68333, 0.12028, 0, 0.98499],\n \"339\": [0, 0.43056, 0.07514, 0, 0.71555],\n \"710\": [0, 0.69444, 0.06646, 0, 0.51111],\n \"711\": [0, 0.62847, 0.08295, 0, 0.51111],\n \"713\": [0, 0.56167, 0.10333, 0, 0.51111],\n \"714\": [0, 0.69444, 0.09694, 0, 0.51111],\n \"715\": [0, 0.69444, 0, 0, 0.51111],\n \"728\": [0, 0.69444, 0.10806, 0, 0.51111],\n \"729\": [0, 0.66786, 0.11752, 0, 0.30667],\n \"730\": [0, 0.69444, 0, 0, 0.83129],\n \"732\": [0, 0.66786, 0.11585, 0, 0.51111],\n \"733\": [0, 0.69444, 0.1225, 0, 0.51111],\n \"915\": [0, 0.68333, 0.13305, 0, 0.62722],\n \"916\": [0, 0.68333, 0, 0, 0.81777],\n \"920\": [0, 0.68333, 0.09403, 0, 0.76666],\n \"923\": [0, 0.68333, 0, 0, 0.69222],\n \"926\": [0, 0.68333, 0.15294, 0, 0.66444],\n \"928\": [0, 0.68333, 0.16389, 0, 0.74333],\n \"931\": [0, 0.68333, 0.12028, 0, 0.71555],\n \"933\": [0, 0.68333, 0.11111, 0, 0.76666],\n \"934\": [0, 0.68333, 0.05986, 0, 0.71555],\n \"936\": [0, 0.68333, 0.11111, 0, 0.76666],\n \"937\": [0, 0.68333, 0.10257, 0, 0.71555],\n \"8211\": [0, 0.43056, 0.09208, 0, 0.51111],\n \"8212\": [0, 0.43056, 0.09208, 0, 1.02222],\n \"8216\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"8217\": [0, 0.69444, 0.12417, 0, 0.30667],\n \"8220\": [0, 0.69444, 0.1685, 0, 0.51444],\n \"8221\": [0, 0.69444, 0.06961, 0, 0.51444],\n \"8463\": [0, 0.68889, 0, 0, 0.54028]\n },\n \"Main-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.27778],\n \"34\": [0, 0.69444, 0, 0, 0.5],\n \"35\": [0.19444, 0.69444, 0, 0, 0.83334],\n \"36\": [0.05556, 0.75, 0, 0, 0.5],\n \"37\": [0.05556, 0.75, 0, 0, 0.83334],\n \"38\": [0, 0.69444, 0, 0, 0.77778],\n \"39\": [0, 0.69444, 0, 0, 0.27778],\n \"40\": [0.25, 0.75, 0, 0, 0.38889],\n \"41\": [0.25, 0.75, 0, 0, 0.38889],\n \"42\": [0, 0.75, 0, 0, 0.5],\n \"43\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"44\": [0.19444, 0.10556, 0, 0, 0.27778],\n \"45\": [0, 0.43056, 0, 0, 0.33333],\n \"46\": [0, 0.10556, 0, 0, 0.27778],\n \"47\": [0.25, 0.75, 0, 0, 0.5],\n \"48\": [0, 0.64444, 0, 0, 0.5],\n \"49\": [0, 0.64444, 0, 0, 0.5],\n \"50\": [0, 0.64444, 0, 0, 0.5],\n \"51\": [0, 0.64444, 0, 0, 0.5],\n \"52\": [0, 0.64444, 0, 0, 0.5],\n \"53\": [0, 0.64444, 0, 0, 0.5],\n \"54\": [0, 0.64444, 0, 0, 0.5],\n \"55\": [0, 0.64444, 0, 0, 0.5],\n \"56\": [0, 0.64444, 0, 0, 0.5],\n \"57\": [0, 0.64444, 0, 0, 0.5],\n \"58\": [0, 0.43056, 0, 0, 0.27778],\n \"59\": [0.19444, 0.43056, 0, 0, 0.27778],\n \"60\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"61\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"62\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"63\": [0, 0.69444, 0, 0, 0.47222],\n \"64\": [0, 0.69444, 0, 0, 0.77778],\n \"65\": [0, 0.68333, 0, 0, 0.75],\n \"66\": [0, 0.68333, 0, 0, 0.70834],\n \"67\": [0, 0.68333, 0, 0, 0.72222],\n \"68\": [0, 0.68333, 0, 0, 0.76389],\n \"69\": [0, 0.68333, 0, 0, 0.68056],\n \"70\": [0, 0.68333, 0, 0, 0.65278],\n \"71\": [0, 0.68333, 0, 0, 0.78472],\n \"72\": [0, 0.68333, 0, 0, 0.75],\n \"73\": [0, 0.68333, 0, 0, 0.36111],\n \"74\": [0, 0.68333, 0, 0, 0.51389],\n \"75\": [0, 0.68333, 0, 0, 0.77778],\n \"76\": [0, 0.68333, 0, 0, 0.625],\n \"77\": [0, 0.68333, 0, 0, 0.91667],\n \"78\": [0, 0.68333, 0, 0, 0.75],\n \"79\": [0, 0.68333, 0, 0, 0.77778],\n \"80\": [0, 0.68333, 0, 0, 0.68056],\n \"81\": [0.19444, 0.68333, 0, 0, 0.77778],\n \"82\": [0, 0.68333, 0, 0, 0.73611],\n \"83\": [0, 0.68333, 0, 0, 0.55556],\n \"84\": [0, 0.68333, 0, 0, 0.72222],\n \"85\": [0, 0.68333, 0, 0, 0.75],\n \"86\": [0, 0.68333, 0.01389, 0, 0.75],\n \"87\": [0, 0.68333, 0.01389, 0, 1.02778],\n \"88\": [0, 0.68333, 0, 0, 0.75],\n \"89\": [0, 0.68333, 0.025, 0, 0.75],\n \"90\": [0, 0.68333, 0, 0, 0.61111],\n \"91\": [0.25, 0.75, 0, 0, 0.27778],\n \"92\": [0.25, 0.75, 0, 0, 0.5],\n \"93\": [0.25, 0.75, 0, 0, 0.27778],\n \"94\": [0, 0.69444, 0, 0, 0.5],\n \"95\": [0.31, 0.12056, 0.02778, 0, 0.5],\n \"97\": [0, 0.43056, 0, 0, 0.5],\n \"98\": [0, 0.69444, 0, 0, 0.55556],\n \"99\": [0, 0.43056, 0, 0, 0.44445],\n \"100\": [0, 0.69444, 0, 0, 0.55556],\n \"101\": [0, 0.43056, 0, 0, 0.44445],\n \"102\": [0, 0.69444, 0.07778, 0, 0.30556],\n \"103\": [0.19444, 0.43056, 0.01389, 0, 0.5],\n \"104\": [0, 0.69444, 0, 0, 0.55556],\n \"105\": [0, 0.66786, 0, 0, 0.27778],\n \"106\": [0.19444, 0.66786, 0, 0, 0.30556],\n \"107\": [0, 0.69444, 0, 0, 0.52778],\n \"108\": [0, 0.69444, 0, 0, 0.27778],\n \"109\": [0, 0.43056, 0, 0, 0.83334],\n \"110\": [0, 0.43056, 0, 0, 0.55556],\n \"111\": [0, 0.43056, 0, 0, 0.5],\n \"112\": [0.19444, 0.43056, 0, 0, 0.55556],\n \"113\": [0.19444, 0.43056, 0, 0, 0.52778],\n \"114\": [0, 0.43056, 0, 0, 0.39167],\n \"115\": [0, 0.43056, 0, 0, 0.39445],\n \"116\": [0, 0.61508, 0, 0, 0.38889],\n \"117\": [0, 0.43056, 0, 0, 0.55556],\n \"118\": [0, 0.43056, 0.01389, 0, 0.52778],\n \"119\": [0, 0.43056, 0.01389, 0, 0.72222],\n \"120\": [0, 0.43056, 0, 0, 0.52778],\n \"121\": [0.19444, 0.43056, 0.01389, 0, 0.52778],\n \"122\": [0, 0.43056, 0, 0, 0.44445],\n \"123\": [0.25, 0.75, 0, 0, 0.5],\n \"124\": [0.25, 0.75, 0, 0, 0.27778],\n \"125\": [0.25, 0.75, 0, 0, 0.5],\n \"126\": [0.35, 0.31786, 0, 0, 0.5],\n \"160\": [0, 0, 0, 0, 0.25],\n \"163\": [0, 0.69444, 0, 0, 0.76909],\n \"167\": [0.19444, 0.69444, 0, 0, 0.44445],\n \"168\": [0, 0.66786, 0, 0, 0.5],\n \"172\": [0, 0.43056, 0, 0, 0.66667],\n \"176\": [0, 0.69444, 0, 0, 0.75],\n \"177\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"182\": [0.19444, 0.69444, 0, 0, 0.61111],\n \"184\": [0.17014, 0, 0, 0, 0.44445],\n \"198\": [0, 0.68333, 0, 0, 0.90278],\n \"215\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"216\": [0.04861, 0.73194, 0, 0, 0.77778],\n \"223\": [0, 0.69444, 0, 0, 0.5],\n \"230\": [0, 0.43056, 0, 0, 0.72222],\n \"247\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"248\": [0.09722, 0.52778, 0, 0, 0.5],\n \"305\": [0, 0.43056, 0, 0, 0.27778],\n \"338\": [0, 0.68333, 0, 0, 1.01389],\n \"339\": [0, 0.43056, 0, 0, 0.77778],\n \"567\": [0.19444, 0.43056, 0, 0, 0.30556],\n \"710\": [0, 0.69444, 0, 0, 0.5],\n \"711\": [0, 0.62847, 0, 0, 0.5],\n \"713\": [0, 0.56778, 0, 0, 0.5],\n \"714\": [0, 0.69444, 0, 0, 0.5],\n \"715\": [0, 0.69444, 0, 0, 0.5],\n \"728\": [0, 0.69444, 0, 0, 0.5],\n \"729\": [0, 0.66786, 0, 0, 0.27778],\n \"730\": [0, 0.69444, 0, 0, 0.75],\n \"732\": [0, 0.66786, 0, 0, 0.5],\n \"733\": [0, 0.69444, 0, 0, 0.5],\n \"915\": [0, 0.68333, 0, 0, 0.625],\n \"916\": [0, 0.68333, 0, 0, 0.83334],\n \"920\": [0, 0.68333, 0, 0, 0.77778],\n \"923\": [0, 0.68333, 0, 0, 0.69445],\n \"926\": [0, 0.68333, 0, 0, 0.66667],\n \"928\": [0, 0.68333, 0, 0, 0.75],\n \"931\": [0, 0.68333, 0, 0, 0.72222],\n \"933\": [0, 0.68333, 0, 0, 0.77778],\n \"934\": [0, 0.68333, 0, 0, 0.72222],\n \"936\": [0, 0.68333, 0, 0, 0.77778],\n \"937\": [0, 0.68333, 0, 0, 0.72222],\n \"8211\": [0, 0.43056, 0.02778, 0, 0.5],\n \"8212\": [0, 0.43056, 0.02778, 0, 1.0],\n \"8216\": [0, 0.69444, 0, 0, 0.27778],\n \"8217\": [0, 0.69444, 0, 0, 0.27778],\n \"8220\": [0, 0.69444, 0, 0, 0.5],\n \"8221\": [0, 0.69444, 0, 0, 0.5],\n \"8224\": [0.19444, 0.69444, 0, 0, 0.44445],\n \"8225\": [0.19444, 0.69444, 0, 0, 0.44445],\n \"8230\": [0, 0.123, 0, 0, 1.172],\n \"8242\": [0, 0.55556, 0, 0, 0.275],\n \"8407\": [0, 0.71444, 0.15382, 0, 0.5],\n \"8463\": [0, 0.68889, 0, 0, 0.54028],\n \"8465\": [0, 0.69444, 0, 0, 0.72222],\n \"8467\": [0, 0.69444, 0, 0.11111, 0.41667],\n \"8472\": [0.19444, 0.43056, 0, 0.11111, 0.63646],\n \"8476\": [0, 0.69444, 0, 0, 0.72222],\n \"8501\": [0, 0.69444, 0, 0, 0.61111],\n \"8592\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8593\": [0.19444, 0.69444, 0, 0, 0.5],\n \"8594\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8595\": [0.19444, 0.69444, 0, 0, 0.5],\n \"8596\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8597\": [0.25, 0.75, 0, 0, 0.5],\n \"8598\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8599\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8600\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8601\": [0.19444, 0.69444, 0, 0, 1.0],\n \"8614\": [0.011, 0.511, 0, 0, 1.0],\n \"8617\": [0.011, 0.511, 0, 0, 1.126],\n \"8618\": [0.011, 0.511, 0, 0, 1.126],\n \"8636\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8637\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8640\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8641\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8652\": [0.011, 0.671, 0, 0, 1.0],\n \"8656\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8657\": [0.19444, 0.69444, 0, 0, 0.61111],\n \"8658\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8659\": [0.19444, 0.69444, 0, 0, 0.61111],\n \"8660\": [-0.13313, 0.36687, 0, 0, 1.0],\n \"8661\": [0.25, 0.75, 0, 0, 0.61111],\n \"8704\": [0, 0.69444, 0, 0, 0.55556],\n \"8706\": [0, 0.69444, 0.05556, 0.08334, 0.5309],\n \"8707\": [0, 0.69444, 0, 0, 0.55556],\n \"8709\": [0.05556, 0.75, 0, 0, 0.5],\n \"8711\": [0, 0.68333, 0, 0, 0.83334],\n \"8712\": [0.0391, 0.5391, 0, 0, 0.66667],\n \"8715\": [0.0391, 0.5391, 0, 0, 0.66667],\n \"8722\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8723\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8725\": [0.25, 0.75, 0, 0, 0.5],\n \"8726\": [0.25, 0.75, 0, 0, 0.5],\n \"8727\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"8728\": [-0.05555, 0.44445, 0, 0, 0.5],\n \"8729\": [-0.05555, 0.44445, 0, 0, 0.5],\n \"8730\": [0.2, 0.8, 0, 0, 0.83334],\n \"8733\": [0, 0.43056, 0, 0, 0.77778],\n \"8734\": [0, 0.43056, 0, 0, 1.0],\n \"8736\": [0, 0.69224, 0, 0, 0.72222],\n \"8739\": [0.25, 0.75, 0, 0, 0.27778],\n \"8741\": [0.25, 0.75, 0, 0, 0.5],\n \"8743\": [0, 0.55556, 0, 0, 0.66667],\n \"8744\": [0, 0.55556, 0, 0, 0.66667],\n \"8745\": [0, 0.55556, 0, 0, 0.66667],\n \"8746\": [0, 0.55556, 0, 0, 0.66667],\n \"8747\": [0.19444, 0.69444, 0.11111, 0, 0.41667],\n \"8764\": [-0.13313, 0.36687, 0, 0, 0.77778],\n \"8768\": [0.19444, 0.69444, 0, 0, 0.27778],\n \"8771\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8773\": [-0.022, 0.589, 0, 0, 0.778],\n \"8776\": [-0.01688, 0.48312, 0, 0, 0.77778],\n \"8781\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8784\": [-0.133, 0.673, 0, 0, 0.778],\n \"8801\": [-0.03625, 0.46375, 0, 0, 0.77778],\n \"8804\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8805\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8810\": [0.0391, 0.5391, 0, 0, 1.0],\n \"8811\": [0.0391, 0.5391, 0, 0, 1.0],\n \"8826\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8827\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8834\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8835\": [0.0391, 0.5391, 0, 0, 0.77778],\n \"8838\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8839\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8846\": [0, 0.55556, 0, 0, 0.66667],\n \"8849\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8850\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"8851\": [0, 0.55556, 0, 0, 0.66667],\n \"8852\": [0, 0.55556, 0, 0, 0.66667],\n \"8853\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8854\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8855\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8856\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8857\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"8866\": [0, 0.69444, 0, 0, 0.61111],\n \"8867\": [0, 0.69444, 0, 0, 0.61111],\n \"8868\": [0, 0.69444, 0, 0, 0.77778],\n \"8869\": [0, 0.69444, 0, 0, 0.77778],\n \"8872\": [0.249, 0.75, 0, 0, 0.867],\n \"8900\": [-0.05555, 0.44445, 0, 0, 0.5],\n \"8901\": [-0.05555, 0.44445, 0, 0, 0.27778],\n \"8902\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"8904\": [0.005, 0.505, 0, 0, 0.9],\n \"8942\": [0.03, 0.903, 0, 0, 0.278],\n \"8943\": [-0.19, 0.313, 0, 0, 1.172],\n \"8945\": [-0.1, 0.823, 0, 0, 1.282],\n \"8968\": [0.25, 0.75, 0, 0, 0.44445],\n \"8969\": [0.25, 0.75, 0, 0, 0.44445],\n \"8970\": [0.25, 0.75, 0, 0, 0.44445],\n \"8971\": [0.25, 0.75, 0, 0, 0.44445],\n \"8994\": [-0.14236, 0.35764, 0, 0, 1.0],\n \"8995\": [-0.14236, 0.35764, 0, 0, 1.0],\n \"9136\": [0.244, 0.744, 0, 0, 0.412],\n \"9137\": [0.244, 0.745, 0, 0, 0.412],\n \"9651\": [0.19444, 0.69444, 0, 0, 0.88889],\n \"9657\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"9661\": [0.19444, 0.69444, 0, 0, 0.88889],\n \"9667\": [-0.03472, 0.46528, 0, 0, 0.5],\n \"9711\": [0.19444, 0.69444, 0, 0, 1.0],\n \"9824\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9825\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9826\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9827\": [0.12963, 0.69444, 0, 0, 0.77778],\n \"9837\": [0, 0.75, 0, 0, 0.38889],\n \"9838\": [0.19444, 0.69444, 0, 0, 0.38889],\n \"9839\": [0.19444, 0.69444, 0, 0, 0.38889],\n \"10216\": [0.25, 0.75, 0, 0, 0.38889],\n \"10217\": [0.25, 0.75, 0, 0, 0.38889],\n \"10222\": [0.244, 0.744, 0, 0, 0.412],\n \"10223\": [0.244, 0.745, 0, 0, 0.412],\n \"10229\": [0.011, 0.511, 0, 0, 1.609],\n \"10230\": [0.011, 0.511, 0, 0, 1.638],\n \"10231\": [0.011, 0.511, 0, 0, 1.859],\n \"10232\": [0.024, 0.525, 0, 0, 1.609],\n \"10233\": [0.024, 0.525, 0, 0, 1.638],\n \"10234\": [0.024, 0.525, 0, 0, 1.858],\n \"10236\": [0.011, 0.511, 0, 0, 1.638],\n \"10815\": [0, 0.68333, 0, 0, 0.75],\n \"10927\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"10928\": [0.13597, 0.63597, 0, 0, 0.77778],\n \"57376\": [0.19444, 0.69444, 0, 0, 0]\n },\n \"Math-BoldItalic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"48\": [0, 0.44444, 0, 0, 0.575],\n \"49\": [0, 0.44444, 0, 0, 0.575],\n \"50\": [0, 0.44444, 0, 0, 0.575],\n \"51\": [0.19444, 0.44444, 0, 0, 0.575],\n \"52\": [0.19444, 0.44444, 0, 0, 0.575],\n \"53\": [0.19444, 0.44444, 0, 0, 0.575],\n \"54\": [0, 0.64444, 0, 0, 0.575],\n \"55\": [0.19444, 0.44444, 0, 0, 0.575],\n \"56\": [0, 0.64444, 0, 0, 0.575],\n \"57\": [0.19444, 0.44444, 0, 0, 0.575],\n \"65\": [0, 0.68611, 0, 0, 0.86944],\n \"66\": [0, 0.68611, 0.04835, 0, 0.8664],\n \"67\": [0, 0.68611, 0.06979, 0, 0.81694],\n \"68\": [0, 0.68611, 0.03194, 0, 0.93812],\n \"69\": [0, 0.68611, 0.05451, 0, 0.81007],\n \"70\": [0, 0.68611, 0.15972, 0, 0.68889],\n \"71\": [0, 0.68611, 0, 0, 0.88673],\n \"72\": [0, 0.68611, 0.08229, 0, 0.98229],\n \"73\": [0, 0.68611, 0.07778, 0, 0.51111],\n \"74\": [0, 0.68611, 0.10069, 0, 0.63125],\n \"75\": [0, 0.68611, 0.06979, 0, 0.97118],\n \"76\": [0, 0.68611, 0, 0, 0.75555],\n \"77\": [0, 0.68611, 0.11424, 0, 1.14201],\n \"78\": [0, 0.68611, 0.11424, 0, 0.95034],\n \"79\": [0, 0.68611, 0.03194, 0, 0.83666],\n \"80\": [0, 0.68611, 0.15972, 0, 0.72309],\n \"81\": [0.19444, 0.68611, 0, 0, 0.86861],\n \"82\": [0, 0.68611, 0.00421, 0, 0.87235],\n \"83\": [0, 0.68611, 0.05382, 0, 0.69271],\n \"84\": [0, 0.68611, 0.15972, 0, 0.63663],\n \"85\": [0, 0.68611, 0.11424, 0, 0.80027],\n \"86\": [0, 0.68611, 0.25555, 0, 0.67778],\n \"87\": [0, 0.68611, 0.15972, 0, 1.09305],\n \"88\": [0, 0.68611, 0.07778, 0, 0.94722],\n \"89\": [0, 0.68611, 0.25555, 0, 0.67458],\n \"90\": [0, 0.68611, 0.06979, 0, 0.77257],\n \"97\": [0, 0.44444, 0, 0, 0.63287],\n \"98\": [0, 0.69444, 0, 0, 0.52083],\n \"99\": [0, 0.44444, 0, 0, 0.51342],\n \"100\": [0, 0.69444, 0, 0, 0.60972],\n \"101\": [0, 0.44444, 0, 0, 0.55361],\n \"102\": [0.19444, 0.69444, 0.11042, 0, 0.56806],\n \"103\": [0.19444, 0.44444, 0.03704, 0, 0.5449],\n \"104\": [0, 0.69444, 0, 0, 0.66759],\n \"105\": [0, 0.69326, 0, 0, 0.4048],\n \"106\": [0.19444, 0.69326, 0.0622, 0, 0.47083],\n \"107\": [0, 0.69444, 0.01852, 0, 0.6037],\n \"108\": [0, 0.69444, 0.0088, 0, 0.34815],\n \"109\": [0, 0.44444, 0, 0, 1.0324],\n \"110\": [0, 0.44444, 0, 0, 0.71296],\n \"111\": [0, 0.44444, 0, 0, 0.58472],\n \"112\": [0.19444, 0.44444, 0, 0, 0.60092],\n \"113\": [0.19444, 0.44444, 0.03704, 0, 0.54213],\n \"114\": [0, 0.44444, 0.03194, 0, 0.5287],\n \"115\": [0, 0.44444, 0, 0, 0.53125],\n \"116\": [0, 0.63492, 0, 0, 0.41528],\n \"117\": [0, 0.44444, 0, 0, 0.68102],\n \"118\": [0, 0.44444, 0.03704, 0, 0.56666],\n \"119\": [0, 0.44444, 0.02778, 0, 0.83148],\n \"120\": [0, 0.44444, 0, 0, 0.65903],\n \"121\": [0.19444, 0.44444, 0.03704, 0, 0.59028],\n \"122\": [0, 0.44444, 0.04213, 0, 0.55509],\n \"160\": [0, 0, 0, 0, 0.25],\n \"915\": [0, 0.68611, 0.15972, 0, 0.65694],\n \"916\": [0, 0.68611, 0, 0, 0.95833],\n \"920\": [0, 0.68611, 0.03194, 0, 0.86722],\n \"923\": [0, 0.68611, 0, 0, 0.80555],\n \"926\": [0, 0.68611, 0.07458, 0, 0.84125],\n \"928\": [0, 0.68611, 0.08229, 0, 0.98229],\n \"931\": [0, 0.68611, 0.05451, 0, 0.88507],\n \"933\": [0, 0.68611, 0.15972, 0, 0.67083],\n \"934\": [0, 0.68611, 0, 0, 0.76666],\n \"936\": [0, 0.68611, 0.11653, 0, 0.71402],\n \"937\": [0, 0.68611, 0.04835, 0, 0.8789],\n \"945\": [0, 0.44444, 0, 0, 0.76064],\n \"946\": [0.19444, 0.69444, 0.03403, 0, 0.65972],\n \"947\": [0.19444, 0.44444, 0.06389, 0, 0.59003],\n \"948\": [0, 0.69444, 0.03819, 0, 0.52222],\n \"949\": [0, 0.44444, 0, 0, 0.52882],\n \"950\": [0.19444, 0.69444, 0.06215, 0, 0.50833],\n \"951\": [0.19444, 0.44444, 0.03704, 0, 0.6],\n \"952\": [0, 0.69444, 0.03194, 0, 0.5618],\n \"953\": [0, 0.44444, 0, 0, 0.41204],\n \"954\": [0, 0.44444, 0, 0, 0.66759],\n \"955\": [0, 0.69444, 0, 0, 0.67083],\n \"956\": [0.19444, 0.44444, 0, 0, 0.70787],\n \"957\": [0, 0.44444, 0.06898, 0, 0.57685],\n \"958\": [0.19444, 0.69444, 0.03021, 0, 0.50833],\n \"959\": [0, 0.44444, 0, 0, 0.58472],\n \"960\": [0, 0.44444, 0.03704, 0, 0.68241],\n \"961\": [0.19444, 0.44444, 0, 0, 0.6118],\n \"962\": [0.09722, 0.44444, 0.07917, 0, 0.42361],\n \"963\": [0, 0.44444, 0.03704, 0, 0.68588],\n \"964\": [0, 0.44444, 0.13472, 0, 0.52083],\n \"965\": [0, 0.44444, 0.03704, 0, 0.63055],\n \"966\": [0.19444, 0.44444, 0, 0, 0.74722],\n \"967\": [0.19444, 0.44444, 0, 0, 0.71805],\n \"968\": [0.19444, 0.69444, 0.03704, 0, 0.75833],\n \"969\": [0, 0.44444, 0.03704, 0, 0.71782],\n \"977\": [0, 0.69444, 0, 0, 0.69155],\n \"981\": [0.19444, 0.69444, 0, 0, 0.7125],\n \"982\": [0, 0.44444, 0.03194, 0, 0.975],\n \"1009\": [0.19444, 0.44444, 0, 0, 0.6118],\n \"1013\": [0, 0.44444, 0, 0, 0.48333],\n \"57649\": [0, 0.44444, 0, 0, 0.39352],\n \"57911\": [0.19444, 0.44444, 0, 0, 0.43889]\n },\n \"Math-Italic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"48\": [0, 0.43056, 0, 0, 0.5],\n \"49\": [0, 0.43056, 0, 0, 0.5],\n \"50\": [0, 0.43056, 0, 0, 0.5],\n \"51\": [0.19444, 0.43056, 0, 0, 0.5],\n \"52\": [0.19444, 0.43056, 0, 0, 0.5],\n \"53\": [0.19444, 0.43056, 0, 0, 0.5],\n \"54\": [0, 0.64444, 0, 0, 0.5],\n \"55\": [0.19444, 0.43056, 0, 0, 0.5],\n \"56\": [0, 0.64444, 0, 0, 0.5],\n \"57\": [0.19444, 0.43056, 0, 0, 0.5],\n \"65\": [0, 0.68333, 0, 0.13889, 0.75],\n \"66\": [0, 0.68333, 0.05017, 0.08334, 0.75851],\n \"67\": [0, 0.68333, 0.07153, 0.08334, 0.71472],\n \"68\": [0, 0.68333, 0.02778, 0.05556, 0.82792],\n \"69\": [0, 0.68333, 0.05764, 0.08334, 0.7382],\n \"70\": [0, 0.68333, 0.13889, 0.08334, 0.64306],\n \"71\": [0, 0.68333, 0, 0.08334, 0.78625],\n \"72\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n \"73\": [0, 0.68333, 0.07847, 0.11111, 0.43958],\n \"74\": [0, 0.68333, 0.09618, 0.16667, 0.55451],\n \"75\": [0, 0.68333, 0.07153, 0.05556, 0.84931],\n \"76\": [0, 0.68333, 0, 0.02778, 0.68056],\n \"77\": [0, 0.68333, 0.10903, 0.08334, 0.97014],\n \"78\": [0, 0.68333, 0.10903, 0.08334, 0.80347],\n \"79\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n \"80\": [0, 0.68333, 0.13889, 0.08334, 0.64201],\n \"81\": [0.19444, 0.68333, 0, 0.08334, 0.79056],\n \"82\": [0, 0.68333, 0.00773, 0.08334, 0.75929],\n \"83\": [0, 0.68333, 0.05764, 0.08334, 0.6132],\n \"84\": [0, 0.68333, 0.13889, 0.08334, 0.58438],\n \"85\": [0, 0.68333, 0.10903, 0.02778, 0.68278],\n \"86\": [0, 0.68333, 0.22222, 0, 0.58333],\n \"87\": [0, 0.68333, 0.13889, 0, 0.94445],\n \"88\": [0, 0.68333, 0.07847, 0.08334, 0.82847],\n \"89\": [0, 0.68333, 0.22222, 0, 0.58056],\n \"90\": [0, 0.68333, 0.07153, 0.08334, 0.68264],\n \"97\": [0, 0.43056, 0, 0, 0.52859],\n \"98\": [0, 0.69444, 0, 0, 0.42917],\n \"99\": [0, 0.43056, 0, 0.05556, 0.43276],\n \"100\": [0, 0.69444, 0, 0.16667, 0.52049],\n \"101\": [0, 0.43056, 0, 0.05556, 0.46563],\n \"102\": [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],\n \"103\": [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],\n \"104\": [0, 0.69444, 0, 0, 0.57616],\n \"105\": [0, 0.65952, 0, 0, 0.34451],\n \"106\": [0.19444, 0.65952, 0.05724, 0, 0.41181],\n \"107\": [0, 0.69444, 0.03148, 0, 0.5206],\n \"108\": [0, 0.69444, 0.01968, 0.08334, 0.29838],\n \"109\": [0, 0.43056, 0, 0, 0.87801],\n \"110\": [0, 0.43056, 0, 0, 0.60023],\n \"111\": [0, 0.43056, 0, 0.05556, 0.48472],\n \"112\": [0.19444, 0.43056, 0, 0.08334, 0.50313],\n \"113\": [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],\n \"114\": [0, 0.43056, 0.02778, 0.05556, 0.45116],\n \"115\": [0, 0.43056, 0, 0.05556, 0.46875],\n \"116\": [0, 0.61508, 0, 0.08334, 0.36111],\n \"117\": [0, 0.43056, 0, 0.02778, 0.57246],\n \"118\": [0, 0.43056, 0.03588, 0.02778, 0.48472],\n \"119\": [0, 0.43056, 0.02691, 0.08334, 0.71592],\n \"120\": [0, 0.43056, 0, 0.02778, 0.57153],\n \"121\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],\n \"122\": [0, 0.43056, 0.04398, 0.05556, 0.46505],\n \"160\": [0, 0, 0, 0, 0.25],\n \"915\": [0, 0.68333, 0.13889, 0.08334, 0.61528],\n \"916\": [0, 0.68333, 0, 0.16667, 0.83334],\n \"920\": [0, 0.68333, 0.02778, 0.08334, 0.76278],\n \"923\": [0, 0.68333, 0, 0.16667, 0.69445],\n \"926\": [0, 0.68333, 0.07569, 0.08334, 0.74236],\n \"928\": [0, 0.68333, 0.08125, 0.05556, 0.83125],\n \"931\": [0, 0.68333, 0.05764, 0.08334, 0.77986],\n \"933\": [0, 0.68333, 0.13889, 0.05556, 0.58333],\n \"934\": [0, 0.68333, 0, 0.08334, 0.66667],\n \"936\": [0, 0.68333, 0.11, 0.05556, 0.61222],\n \"937\": [0, 0.68333, 0.05017, 0.08334, 0.7724],\n \"945\": [0, 0.43056, 0.0037, 0.02778, 0.6397],\n \"946\": [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],\n \"947\": [0.19444, 0.43056, 0.05556, 0, 0.51773],\n \"948\": [0, 0.69444, 0.03785, 0.05556, 0.44444],\n \"949\": [0, 0.43056, 0, 0.08334, 0.46632],\n \"950\": [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],\n \"951\": [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],\n \"952\": [0, 0.69444, 0.02778, 0.08334, 0.46944],\n \"953\": [0, 0.43056, 0, 0.05556, 0.35394],\n \"954\": [0, 0.43056, 0, 0, 0.57616],\n \"955\": [0, 0.69444, 0, 0, 0.58334],\n \"956\": [0.19444, 0.43056, 0, 0.02778, 0.60255],\n \"957\": [0, 0.43056, 0.06366, 0.02778, 0.49398],\n \"958\": [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],\n \"959\": [0, 0.43056, 0, 0.05556, 0.48472],\n \"960\": [0, 0.43056, 0.03588, 0, 0.57003],\n \"961\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n \"962\": [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],\n \"963\": [0, 0.43056, 0.03588, 0, 0.57141],\n \"964\": [0, 0.43056, 0.1132, 0.02778, 0.43715],\n \"965\": [0, 0.43056, 0.03588, 0.02778, 0.54028],\n \"966\": [0.19444, 0.43056, 0, 0.08334, 0.65417],\n \"967\": [0.19444, 0.43056, 0, 0.05556, 0.62569],\n \"968\": [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],\n \"969\": [0, 0.43056, 0.03588, 0, 0.62245],\n \"977\": [0, 0.69444, 0, 0.08334, 0.59144],\n \"981\": [0.19444, 0.69444, 0, 0.08334, 0.59583],\n \"982\": [0, 0.43056, 0.02778, 0, 0.82813],\n \"1009\": [0.19444, 0.43056, 0, 0.08334, 0.51702],\n \"1013\": [0, 0.43056, 0, 0.05556, 0.4059],\n \"57649\": [0, 0.43056, 0, 0.02778, 0.32246],\n \"57911\": [0.19444, 0.43056, 0, 0.08334, 0.38403]\n },\n \"SansSerif-Bold\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.36667],\n \"34\": [0, 0.69444, 0, 0, 0.55834],\n \"35\": [0.19444, 0.69444, 0, 0, 0.91667],\n \"36\": [0.05556, 0.75, 0, 0, 0.55],\n \"37\": [0.05556, 0.75, 0, 0, 1.02912],\n \"38\": [0, 0.69444, 0, 0, 0.83056],\n \"39\": [0, 0.69444, 0, 0, 0.30556],\n \"40\": [0.25, 0.75, 0, 0, 0.42778],\n \"41\": [0.25, 0.75, 0, 0, 0.42778],\n \"42\": [0, 0.75, 0, 0, 0.55],\n \"43\": [0.11667, 0.61667, 0, 0, 0.85556],\n \"44\": [0.10556, 0.13056, 0, 0, 0.30556],\n \"45\": [0, 0.45833, 0, 0, 0.36667],\n \"46\": [0, 0.13056, 0, 0, 0.30556],\n \"47\": [0.25, 0.75, 0, 0, 0.55],\n \"48\": [0, 0.69444, 0, 0, 0.55],\n \"49\": [0, 0.69444, 0, 0, 0.55],\n \"50\": [0, 0.69444, 0, 0, 0.55],\n \"51\": [0, 0.69444, 0, 0, 0.55],\n \"52\": [0, 0.69444, 0, 0, 0.55],\n \"53\": [0, 0.69444, 0, 0, 0.55],\n \"54\": [0, 0.69444, 0, 0, 0.55],\n \"55\": [0, 0.69444, 0, 0, 0.55],\n \"56\": [0, 0.69444, 0, 0, 0.55],\n \"57\": [0, 0.69444, 0, 0, 0.55],\n \"58\": [0, 0.45833, 0, 0, 0.30556],\n \"59\": [0.10556, 0.45833, 0, 0, 0.30556],\n \"61\": [-0.09375, 0.40625, 0, 0, 0.85556],\n \"63\": [0, 0.69444, 0, 0, 0.51945],\n \"64\": [0, 0.69444, 0, 0, 0.73334],\n \"65\": [0, 0.69444, 0, 0, 0.73334],\n \"66\": [0, 0.69444, 0, 0, 0.73334],\n \"67\": [0, 0.69444, 0, 0, 0.70278],\n \"68\": [0, 0.69444, 0, 0, 0.79445],\n \"69\": [0, 0.69444, 0, 0, 0.64167],\n \"70\": [0, 0.69444, 0, 0, 0.61111],\n \"71\": [0, 0.69444, 0, 0, 0.73334],\n \"72\": [0, 0.69444, 0, 0, 0.79445],\n \"73\": [0, 0.69444, 0, 0, 0.33056],\n \"74\": [0, 0.69444, 0, 0, 0.51945],\n \"75\": [0, 0.69444, 0, 0, 0.76389],\n \"76\": [0, 0.69444, 0, 0, 0.58056],\n \"77\": [0, 0.69444, 0, 0, 0.97778],\n \"78\": [0, 0.69444, 0, 0, 0.79445],\n \"79\": [0, 0.69444, 0, 0, 0.79445],\n \"80\": [0, 0.69444, 0, 0, 0.70278],\n \"81\": [0.10556, 0.69444, 0, 0, 0.79445],\n \"82\": [0, 0.69444, 0, 0, 0.70278],\n \"83\": [0, 0.69444, 0, 0, 0.61111],\n \"84\": [0, 0.69444, 0, 0, 0.73334],\n \"85\": [0, 0.69444, 0, 0, 0.76389],\n \"86\": [0, 0.69444, 0.01528, 0, 0.73334],\n \"87\": [0, 0.69444, 0.01528, 0, 1.03889],\n \"88\": [0, 0.69444, 0, 0, 0.73334],\n \"89\": [0, 0.69444, 0.0275, 0, 0.73334],\n \"90\": [0, 0.69444, 0, 0, 0.67223],\n \"91\": [0.25, 0.75, 0, 0, 0.34306],\n \"93\": [0.25, 0.75, 0, 0, 0.34306],\n \"94\": [0, 0.69444, 0, 0, 0.55],\n \"95\": [0.35, 0.10833, 0.03056, 0, 0.55],\n \"97\": [0, 0.45833, 0, 0, 0.525],\n \"98\": [0, 0.69444, 0, 0, 0.56111],\n \"99\": [0, 0.45833, 0, 0, 0.48889],\n \"100\": [0, 0.69444, 0, 0, 0.56111],\n \"101\": [0, 0.45833, 0, 0, 0.51111],\n \"102\": [0, 0.69444, 0.07639, 0, 0.33611],\n \"103\": [0.19444, 0.45833, 0.01528, 0, 0.55],\n \"104\": [0, 0.69444, 0, 0, 0.56111],\n \"105\": [0, 0.69444, 0, 0, 0.25556],\n \"106\": [0.19444, 0.69444, 0, 0, 0.28611],\n \"107\": [0, 0.69444, 0, 0, 0.53056],\n \"108\": [0, 0.69444, 0, 0, 0.25556],\n \"109\": [0, 0.45833, 0, 0, 0.86667],\n \"110\": [0, 0.45833, 0, 0, 0.56111],\n \"111\": [0, 0.45833, 0, 0, 0.55],\n \"112\": [0.19444, 0.45833, 0, 0, 0.56111],\n \"113\": [0.19444, 0.45833, 0, 0, 0.56111],\n \"114\": [0, 0.45833, 0.01528, 0, 0.37222],\n \"115\": [0, 0.45833, 0, 0, 0.42167],\n \"116\": [0, 0.58929, 0, 0, 0.40417],\n \"117\": [0, 0.45833, 0, 0, 0.56111],\n \"118\": [0, 0.45833, 0.01528, 0, 0.5],\n \"119\": [0, 0.45833, 0.01528, 0, 0.74445],\n \"120\": [0, 0.45833, 0, 0, 0.5],\n \"121\": [0.19444, 0.45833, 0.01528, 0, 0.5],\n \"122\": [0, 0.45833, 0, 0, 0.47639],\n \"126\": [0.35, 0.34444, 0, 0, 0.55],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.69444, 0, 0, 0.55],\n \"176\": [0, 0.69444, 0, 0, 0.73334],\n \"180\": [0, 0.69444, 0, 0, 0.55],\n \"184\": [0.17014, 0, 0, 0, 0.48889],\n \"305\": [0, 0.45833, 0, 0, 0.25556],\n \"567\": [0.19444, 0.45833, 0, 0, 0.28611],\n \"710\": [0, 0.69444, 0, 0, 0.55],\n \"711\": [0, 0.63542, 0, 0, 0.55],\n \"713\": [0, 0.63778, 0, 0, 0.55],\n \"728\": [0, 0.69444, 0, 0, 0.55],\n \"729\": [0, 0.69444, 0, 0, 0.30556],\n \"730\": [0, 0.69444, 0, 0, 0.73334],\n \"732\": [0, 0.69444, 0, 0, 0.55],\n \"733\": [0, 0.69444, 0, 0, 0.55],\n \"915\": [0, 0.69444, 0, 0, 0.58056],\n \"916\": [0, 0.69444, 0, 0, 0.91667],\n \"920\": [0, 0.69444, 0, 0, 0.85556],\n \"923\": [0, 0.69444, 0, 0, 0.67223],\n \"926\": [0, 0.69444, 0, 0, 0.73334],\n \"928\": [0, 0.69444, 0, 0, 0.79445],\n \"931\": [0, 0.69444, 0, 0, 0.79445],\n \"933\": [0, 0.69444, 0, 0, 0.85556],\n \"934\": [0, 0.69444, 0, 0, 0.79445],\n \"936\": [0, 0.69444, 0, 0, 0.85556],\n \"937\": [0, 0.69444, 0, 0, 0.79445],\n \"8211\": [0, 0.45833, 0.03056, 0, 0.55],\n \"8212\": [0, 0.45833, 0.03056, 0, 1.10001],\n \"8216\": [0, 0.69444, 0, 0, 0.30556],\n \"8217\": [0, 0.69444, 0, 0, 0.30556],\n \"8220\": [0, 0.69444, 0, 0, 0.55834],\n \"8221\": [0, 0.69444, 0, 0, 0.55834]\n },\n \"SansSerif-Italic\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0.05733, 0, 0.31945],\n \"34\": [0, 0.69444, 0.00316, 0, 0.5],\n \"35\": [0.19444, 0.69444, 0.05087, 0, 0.83334],\n \"36\": [0.05556, 0.75, 0.11156, 0, 0.5],\n \"37\": [0.05556, 0.75, 0.03126, 0, 0.83334],\n \"38\": [0, 0.69444, 0.03058, 0, 0.75834],\n \"39\": [0, 0.69444, 0.07816, 0, 0.27778],\n \"40\": [0.25, 0.75, 0.13164, 0, 0.38889],\n \"41\": [0.25, 0.75, 0.02536, 0, 0.38889],\n \"42\": [0, 0.75, 0.11775, 0, 0.5],\n \"43\": [0.08333, 0.58333, 0.02536, 0, 0.77778],\n \"44\": [0.125, 0.08333, 0, 0, 0.27778],\n \"45\": [0, 0.44444, 0.01946, 0, 0.33333],\n \"46\": [0, 0.08333, 0, 0, 0.27778],\n \"47\": [0.25, 0.75, 0.13164, 0, 0.5],\n \"48\": [0, 0.65556, 0.11156, 0, 0.5],\n \"49\": [0, 0.65556, 0.11156, 0, 0.5],\n \"50\": [0, 0.65556, 0.11156, 0, 0.5],\n \"51\": [0, 0.65556, 0.11156, 0, 0.5],\n \"52\": [0, 0.65556, 0.11156, 0, 0.5],\n \"53\": [0, 0.65556, 0.11156, 0, 0.5],\n \"54\": [0, 0.65556, 0.11156, 0, 0.5],\n \"55\": [0, 0.65556, 0.11156, 0, 0.5],\n \"56\": [0, 0.65556, 0.11156, 0, 0.5],\n \"57\": [0, 0.65556, 0.11156, 0, 0.5],\n \"58\": [0, 0.44444, 0.02502, 0, 0.27778],\n \"59\": [0.125, 0.44444, 0.02502, 0, 0.27778],\n \"61\": [-0.13, 0.37, 0.05087, 0, 0.77778],\n \"63\": [0, 0.69444, 0.11809, 0, 0.47222],\n \"64\": [0, 0.69444, 0.07555, 0, 0.66667],\n \"65\": [0, 0.69444, 0, 0, 0.66667],\n \"66\": [0, 0.69444, 0.08293, 0, 0.66667],\n \"67\": [0, 0.69444, 0.11983, 0, 0.63889],\n \"68\": [0, 0.69444, 0.07555, 0, 0.72223],\n \"69\": [0, 0.69444, 0.11983, 0, 0.59722],\n \"70\": [0, 0.69444, 0.13372, 0, 0.56945],\n \"71\": [0, 0.69444, 0.11983, 0, 0.66667],\n \"72\": [0, 0.69444, 0.08094, 0, 0.70834],\n \"73\": [0, 0.69444, 0.13372, 0, 0.27778],\n \"74\": [0, 0.69444, 0.08094, 0, 0.47222],\n \"75\": [0, 0.69444, 0.11983, 0, 0.69445],\n \"76\": [0, 0.69444, 0, 0, 0.54167],\n \"77\": [0, 0.69444, 0.08094, 0, 0.875],\n \"78\": [0, 0.69444, 0.08094, 0, 0.70834],\n \"79\": [0, 0.69444, 0.07555, 0, 0.73611],\n \"80\": [0, 0.69444, 0.08293, 0, 0.63889],\n \"81\": [0.125, 0.69444, 0.07555, 0, 0.73611],\n \"82\": [0, 0.69444, 0.08293, 0, 0.64584],\n \"83\": [0, 0.69444, 0.09205, 0, 0.55556],\n \"84\": [0, 0.69444, 0.13372, 0, 0.68056],\n \"85\": [0, 0.69444, 0.08094, 0, 0.6875],\n \"86\": [0, 0.69444, 0.1615, 0, 0.66667],\n \"87\": [0, 0.69444, 0.1615, 0, 0.94445],\n \"88\": [0, 0.69444, 0.13372, 0, 0.66667],\n \"89\": [0, 0.69444, 0.17261, 0, 0.66667],\n \"90\": [0, 0.69444, 0.11983, 0, 0.61111],\n \"91\": [0.25, 0.75, 0.15942, 0, 0.28889],\n \"93\": [0.25, 0.75, 0.08719, 0, 0.28889],\n \"94\": [0, 0.69444, 0.0799, 0, 0.5],\n \"95\": [0.35, 0.09444, 0.08616, 0, 0.5],\n \"97\": [0, 0.44444, 0.00981, 0, 0.48056],\n \"98\": [0, 0.69444, 0.03057, 0, 0.51667],\n \"99\": [0, 0.44444, 0.08336, 0, 0.44445],\n \"100\": [0, 0.69444, 0.09483, 0, 0.51667],\n \"101\": [0, 0.44444, 0.06778, 0, 0.44445],\n \"102\": [0, 0.69444, 0.21705, 0, 0.30556],\n \"103\": [0.19444, 0.44444, 0.10836, 0, 0.5],\n \"104\": [0, 0.69444, 0.01778, 0, 0.51667],\n \"105\": [0, 0.67937, 0.09718, 0, 0.23889],\n \"106\": [0.19444, 0.67937, 0.09162, 0, 0.26667],\n \"107\": [0, 0.69444, 0.08336, 0, 0.48889],\n \"108\": [0, 0.69444, 0.09483, 0, 0.23889],\n \"109\": [0, 0.44444, 0.01778, 0, 0.79445],\n \"110\": [0, 0.44444, 0.01778, 0, 0.51667],\n \"111\": [0, 0.44444, 0.06613, 0, 0.5],\n \"112\": [0.19444, 0.44444, 0.0389, 0, 0.51667],\n \"113\": [0.19444, 0.44444, 0.04169, 0, 0.51667],\n \"114\": [0, 0.44444, 0.10836, 0, 0.34167],\n \"115\": [0, 0.44444, 0.0778, 0, 0.38333],\n \"116\": [0, 0.57143, 0.07225, 0, 0.36111],\n \"117\": [0, 0.44444, 0.04169, 0, 0.51667],\n \"118\": [0, 0.44444, 0.10836, 0, 0.46111],\n \"119\": [0, 0.44444, 0.10836, 0, 0.68334],\n \"120\": [0, 0.44444, 0.09169, 0, 0.46111],\n \"121\": [0.19444, 0.44444, 0.10836, 0, 0.46111],\n \"122\": [0, 0.44444, 0.08752, 0, 0.43472],\n \"126\": [0.35, 0.32659, 0.08826, 0, 0.5],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.67937, 0.06385, 0, 0.5],\n \"176\": [0, 0.69444, 0, 0, 0.73752],\n \"184\": [0.17014, 0, 0, 0, 0.44445],\n \"305\": [0, 0.44444, 0.04169, 0, 0.23889],\n \"567\": [0.19444, 0.44444, 0.04169, 0, 0.26667],\n \"710\": [0, 0.69444, 0.0799, 0, 0.5],\n \"711\": [0, 0.63194, 0.08432, 0, 0.5],\n \"713\": [0, 0.60889, 0.08776, 0, 0.5],\n \"714\": [0, 0.69444, 0.09205, 0, 0.5],\n \"715\": [0, 0.69444, 0, 0, 0.5],\n \"728\": [0, 0.69444, 0.09483, 0, 0.5],\n \"729\": [0, 0.67937, 0.07774, 0, 0.27778],\n \"730\": [0, 0.69444, 0, 0, 0.73752],\n \"732\": [0, 0.67659, 0.08826, 0, 0.5],\n \"733\": [0, 0.69444, 0.09205, 0, 0.5],\n \"915\": [0, 0.69444, 0.13372, 0, 0.54167],\n \"916\": [0, 0.69444, 0, 0, 0.83334],\n \"920\": [0, 0.69444, 0.07555, 0, 0.77778],\n \"923\": [0, 0.69444, 0, 0, 0.61111],\n \"926\": [0, 0.69444, 0.12816, 0, 0.66667],\n \"928\": [0, 0.69444, 0.08094, 0, 0.70834],\n \"931\": [0, 0.69444, 0.11983, 0, 0.72222],\n \"933\": [0, 0.69444, 0.09031, 0, 0.77778],\n \"934\": [0, 0.69444, 0.04603, 0, 0.72222],\n \"936\": [0, 0.69444, 0.09031, 0, 0.77778],\n \"937\": [0, 0.69444, 0.08293, 0, 0.72222],\n \"8211\": [0, 0.44444, 0.08616, 0, 0.5],\n \"8212\": [0, 0.44444, 0.08616, 0, 1.0],\n \"8216\": [0, 0.69444, 0.07816, 0, 0.27778],\n \"8217\": [0, 0.69444, 0.07816, 0, 0.27778],\n \"8220\": [0, 0.69444, 0.14205, 0, 0.5],\n \"8221\": [0, 0.69444, 0.00316, 0, 0.5]\n },\n \"SansSerif-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"33\": [0, 0.69444, 0, 0, 0.31945],\n \"34\": [0, 0.69444, 0, 0, 0.5],\n \"35\": [0.19444, 0.69444, 0, 0, 0.83334],\n \"36\": [0.05556, 0.75, 0, 0, 0.5],\n \"37\": [0.05556, 0.75, 0, 0, 0.83334],\n \"38\": [0, 0.69444, 0, 0, 0.75834],\n \"39\": [0, 0.69444, 0, 0, 0.27778],\n \"40\": [0.25, 0.75, 0, 0, 0.38889],\n \"41\": [0.25, 0.75, 0, 0, 0.38889],\n \"42\": [0, 0.75, 0, 0, 0.5],\n \"43\": [0.08333, 0.58333, 0, 0, 0.77778],\n \"44\": [0.125, 0.08333, 0, 0, 0.27778],\n \"45\": [0, 0.44444, 0, 0, 0.33333],\n \"46\": [0, 0.08333, 0, 0, 0.27778],\n \"47\": [0.25, 0.75, 0, 0, 0.5],\n \"48\": [0, 0.65556, 0, 0, 0.5],\n \"49\": [0, 0.65556, 0, 0, 0.5],\n \"50\": [0, 0.65556, 0, 0, 0.5],\n \"51\": [0, 0.65556, 0, 0, 0.5],\n \"52\": [0, 0.65556, 0, 0, 0.5],\n \"53\": [0, 0.65556, 0, 0, 0.5],\n \"54\": [0, 0.65556, 0, 0, 0.5],\n \"55\": [0, 0.65556, 0, 0, 0.5],\n \"56\": [0, 0.65556, 0, 0, 0.5],\n \"57\": [0, 0.65556, 0, 0, 0.5],\n \"58\": [0, 0.44444, 0, 0, 0.27778],\n \"59\": [0.125, 0.44444, 0, 0, 0.27778],\n \"61\": [-0.13, 0.37, 0, 0, 0.77778],\n \"63\": [0, 0.69444, 0, 0, 0.47222],\n \"64\": [0, 0.69444, 0, 0, 0.66667],\n \"65\": [0, 0.69444, 0, 0, 0.66667],\n \"66\": [0, 0.69444, 0, 0, 0.66667],\n \"67\": [0, 0.69444, 0, 0, 0.63889],\n \"68\": [0, 0.69444, 0, 0, 0.72223],\n \"69\": [0, 0.69444, 0, 0, 0.59722],\n \"70\": [0, 0.69444, 0, 0, 0.56945],\n \"71\": [0, 0.69444, 0, 0, 0.66667],\n \"72\": [0, 0.69444, 0, 0, 0.70834],\n \"73\": [0, 0.69444, 0, 0, 0.27778],\n \"74\": [0, 0.69444, 0, 0, 0.47222],\n \"75\": [0, 0.69444, 0, 0, 0.69445],\n \"76\": [0, 0.69444, 0, 0, 0.54167],\n \"77\": [0, 0.69444, 0, 0, 0.875],\n \"78\": [0, 0.69444, 0, 0, 0.70834],\n \"79\": [0, 0.69444, 0, 0, 0.73611],\n \"80\": [0, 0.69444, 0, 0, 0.63889],\n \"81\": [0.125, 0.69444, 0, 0, 0.73611],\n \"82\": [0, 0.69444, 0, 0, 0.64584],\n \"83\": [0, 0.69444, 0, 0, 0.55556],\n \"84\": [0, 0.69444, 0, 0, 0.68056],\n \"85\": [0, 0.69444, 0, 0, 0.6875],\n \"86\": [0, 0.69444, 0.01389, 0, 0.66667],\n \"87\": [0, 0.69444, 0.01389, 0, 0.94445],\n \"88\": [0, 0.69444, 0, 0, 0.66667],\n \"89\": [0, 0.69444, 0.025, 0, 0.66667],\n \"90\": [0, 0.69444, 0, 0, 0.61111],\n \"91\": [0.25, 0.75, 0, 0, 0.28889],\n \"93\": [0.25, 0.75, 0, 0, 0.28889],\n \"94\": [0, 0.69444, 0, 0, 0.5],\n \"95\": [0.35, 0.09444, 0.02778, 0, 0.5],\n \"97\": [0, 0.44444, 0, 0, 0.48056],\n \"98\": [0, 0.69444, 0, 0, 0.51667],\n \"99\": [0, 0.44444, 0, 0, 0.44445],\n \"100\": [0, 0.69444, 0, 0, 0.51667],\n \"101\": [0, 0.44444, 0, 0, 0.44445],\n \"102\": [0, 0.69444, 0.06944, 0, 0.30556],\n \"103\": [0.19444, 0.44444, 0.01389, 0, 0.5],\n \"104\": [0, 0.69444, 0, 0, 0.51667],\n \"105\": [0, 0.67937, 0, 0, 0.23889],\n \"106\": [0.19444, 0.67937, 0, 0, 0.26667],\n \"107\": [0, 0.69444, 0, 0, 0.48889],\n \"108\": [0, 0.69444, 0, 0, 0.23889],\n \"109\": [0, 0.44444, 0, 0, 0.79445],\n \"110\": [0, 0.44444, 0, 0, 0.51667],\n \"111\": [0, 0.44444, 0, 0, 0.5],\n \"112\": [0.19444, 0.44444, 0, 0, 0.51667],\n \"113\": [0.19444, 0.44444, 0, 0, 0.51667],\n \"114\": [0, 0.44444, 0.01389, 0, 0.34167],\n \"115\": [0, 0.44444, 0, 0, 0.38333],\n \"116\": [0, 0.57143, 0, 0, 0.36111],\n \"117\": [0, 0.44444, 0, 0, 0.51667],\n \"118\": [0, 0.44444, 0.01389, 0, 0.46111],\n \"119\": [0, 0.44444, 0.01389, 0, 0.68334],\n \"120\": [0, 0.44444, 0, 0, 0.46111],\n \"121\": [0.19444, 0.44444, 0.01389, 0, 0.46111],\n \"122\": [0, 0.44444, 0, 0, 0.43472],\n \"126\": [0.35, 0.32659, 0, 0, 0.5],\n \"160\": [0, 0, 0, 0, 0.25],\n \"168\": [0, 0.67937, 0, 0, 0.5],\n \"176\": [0, 0.69444, 0, 0, 0.66667],\n \"184\": [0.17014, 0, 0, 0, 0.44445],\n \"305\": [0, 0.44444, 0, 0, 0.23889],\n \"567\": [0.19444, 0.44444, 0, 0, 0.26667],\n \"710\": [0, 0.69444, 0, 0, 0.5],\n \"711\": [0, 0.63194, 0, 0, 0.5],\n \"713\": [0, 0.60889, 0, 0, 0.5],\n \"714\": [0, 0.69444, 0, 0, 0.5],\n \"715\": [0, 0.69444, 0, 0, 0.5],\n \"728\": [0, 0.69444, 0, 0, 0.5],\n \"729\": [0, 0.67937, 0, 0, 0.27778],\n \"730\": [0, 0.69444, 0, 0, 0.66667],\n \"732\": [0, 0.67659, 0, 0, 0.5],\n \"733\": [0, 0.69444, 0, 0, 0.5],\n \"915\": [0, 0.69444, 0, 0, 0.54167],\n \"916\": [0, 0.69444, 0, 0, 0.83334],\n \"920\": [0, 0.69444, 0, 0, 0.77778],\n \"923\": [0, 0.69444, 0, 0, 0.61111],\n \"926\": [0, 0.69444, 0, 0, 0.66667],\n \"928\": [0, 0.69444, 0, 0, 0.70834],\n \"931\": [0, 0.69444, 0, 0, 0.72222],\n \"933\": [0, 0.69444, 0, 0, 0.77778],\n \"934\": [0, 0.69444, 0, 0, 0.72222],\n \"936\": [0, 0.69444, 0, 0, 0.77778],\n \"937\": [0, 0.69444, 0, 0, 0.72222],\n \"8211\": [0, 0.44444, 0.02778, 0, 0.5],\n \"8212\": [0, 0.44444, 0.02778, 0, 1.0],\n \"8216\": [0, 0.69444, 0, 0, 0.27778],\n \"8217\": [0, 0.69444, 0, 0, 0.27778],\n \"8220\": [0, 0.69444, 0, 0, 0.5],\n \"8221\": [0, 0.69444, 0, 0, 0.5]\n },\n \"Script-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"65\": [0, 0.7, 0.22925, 0, 0.80253],\n \"66\": [0, 0.7, 0.04087, 0, 0.90757],\n \"67\": [0, 0.7, 0.1689, 0, 0.66619],\n \"68\": [0, 0.7, 0.09371, 0, 0.77443],\n \"69\": [0, 0.7, 0.18583, 0, 0.56162],\n \"70\": [0, 0.7, 0.13634, 0, 0.89544],\n \"71\": [0, 0.7, 0.17322, 0, 0.60961],\n \"72\": [0, 0.7, 0.29694, 0, 0.96919],\n \"73\": [0, 0.7, 0.19189, 0, 0.80907],\n \"74\": [0.27778, 0.7, 0.19189, 0, 1.05159],\n \"75\": [0, 0.7, 0.31259, 0, 0.91364],\n \"76\": [0, 0.7, 0.19189, 0, 0.87373],\n \"77\": [0, 0.7, 0.15981, 0, 1.08031],\n \"78\": [0, 0.7, 0.3525, 0, 0.9015],\n \"79\": [0, 0.7, 0.08078, 0, 0.73787],\n \"80\": [0, 0.7, 0.08078, 0, 1.01262],\n \"81\": [0, 0.7, 0.03305, 0, 0.88282],\n \"82\": [0, 0.7, 0.06259, 0, 0.85],\n \"83\": [0, 0.7, 0.19189, 0, 0.86767],\n \"84\": [0, 0.7, 0.29087, 0, 0.74697],\n \"85\": [0, 0.7, 0.25815, 0, 0.79996],\n \"86\": [0, 0.7, 0.27523, 0, 0.62204],\n \"87\": [0, 0.7, 0.27523, 0, 0.80532],\n \"88\": [0, 0.7, 0.26006, 0, 0.94445],\n \"89\": [0, 0.7, 0.2939, 0, 0.70961],\n \"90\": [0, 0.7, 0.24037, 0, 0.8212],\n \"160\": [0, 0, 0, 0, 0.25]\n },\n \"Size1-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [0.35001, 0.85, 0, 0, 0.45834],\n \"41\": [0.35001, 0.85, 0, 0, 0.45834],\n \"47\": [0.35001, 0.85, 0, 0, 0.57778],\n \"91\": [0.35001, 0.85, 0, 0, 0.41667],\n \"92\": [0.35001, 0.85, 0, 0, 0.57778],\n \"93\": [0.35001, 0.85, 0, 0, 0.41667],\n \"123\": [0.35001, 0.85, 0, 0, 0.58334],\n \"125\": [0.35001, 0.85, 0, 0, 0.58334],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.72222, 0, 0, 0.55556],\n \"732\": [0, 0.72222, 0, 0, 0.55556],\n \"770\": [0, 0.72222, 0, 0, 0.55556],\n \"771\": [0, 0.72222, 0, 0, 0.55556],\n \"8214\": [-0.00099, 0.601, 0, 0, 0.77778],\n \"8593\": [1e-05, 0.6, 0, 0, 0.66667],\n \"8595\": [1e-05, 0.6, 0, 0, 0.66667],\n \"8657\": [1e-05, 0.6, 0, 0, 0.77778],\n \"8659\": [1e-05, 0.6, 0, 0, 0.77778],\n \"8719\": [0.25001, 0.75, 0, 0, 0.94445],\n \"8720\": [0.25001, 0.75, 0, 0, 0.94445],\n \"8721\": [0.25001, 0.75, 0, 0, 1.05556],\n \"8730\": [0.35001, 0.85, 0, 0, 1.0],\n \"8739\": [-0.00599, 0.606, 0, 0, 0.33333],\n \"8741\": [-0.00599, 0.606, 0, 0, 0.55556],\n \"8747\": [0.30612, 0.805, 0.19445, 0, 0.47222],\n \"8748\": [0.306, 0.805, 0.19445, 0, 0.47222],\n \"8749\": [0.306, 0.805, 0.19445, 0, 0.47222],\n \"8750\": [0.30612, 0.805, 0.19445, 0, 0.47222],\n \"8896\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8897\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8898\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8899\": [0.25001, 0.75, 0, 0, 0.83334],\n \"8968\": [0.35001, 0.85, 0, 0, 0.47222],\n \"8969\": [0.35001, 0.85, 0, 0, 0.47222],\n \"8970\": [0.35001, 0.85, 0, 0, 0.47222],\n \"8971\": [0.35001, 0.85, 0, 0, 0.47222],\n \"9168\": [-0.00099, 0.601, 0, 0, 0.66667],\n \"10216\": [0.35001, 0.85, 0, 0, 0.47222],\n \"10217\": [0.35001, 0.85, 0, 0, 0.47222],\n \"10752\": [0.25001, 0.75, 0, 0, 1.11111],\n \"10753\": [0.25001, 0.75, 0, 0, 1.11111],\n \"10754\": [0.25001, 0.75, 0, 0, 1.11111],\n \"10756\": [0.25001, 0.75, 0, 0, 0.83334],\n \"10758\": [0.25001, 0.75, 0, 0, 0.83334]\n },\n \"Size2-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [0.65002, 1.15, 0, 0, 0.59722],\n \"41\": [0.65002, 1.15, 0, 0, 0.59722],\n \"47\": [0.65002, 1.15, 0, 0, 0.81111],\n \"91\": [0.65002, 1.15, 0, 0, 0.47222],\n \"92\": [0.65002, 1.15, 0, 0, 0.81111],\n \"93\": [0.65002, 1.15, 0, 0, 0.47222],\n \"123\": [0.65002, 1.15, 0, 0, 0.66667],\n \"125\": [0.65002, 1.15, 0, 0, 0.66667],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.75, 0, 0, 1.0],\n \"732\": [0, 0.75, 0, 0, 1.0],\n \"770\": [0, 0.75, 0, 0, 1.0],\n \"771\": [0, 0.75, 0, 0, 1.0],\n \"8719\": [0.55001, 1.05, 0, 0, 1.27778],\n \"8720\": [0.55001, 1.05, 0, 0, 1.27778],\n \"8721\": [0.55001, 1.05, 0, 0, 1.44445],\n \"8730\": [0.65002, 1.15, 0, 0, 1.0],\n \"8747\": [0.86225, 1.36, 0.44445, 0, 0.55556],\n \"8748\": [0.862, 1.36, 0.44445, 0, 0.55556],\n \"8749\": [0.862, 1.36, 0.44445, 0, 0.55556],\n \"8750\": [0.86225, 1.36, 0.44445, 0, 0.55556],\n \"8896\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8897\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8898\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8899\": [0.55001, 1.05, 0, 0, 1.11111],\n \"8968\": [0.65002, 1.15, 0, 0, 0.52778],\n \"8969\": [0.65002, 1.15, 0, 0, 0.52778],\n \"8970\": [0.65002, 1.15, 0, 0, 0.52778],\n \"8971\": [0.65002, 1.15, 0, 0, 0.52778],\n \"10216\": [0.65002, 1.15, 0, 0, 0.61111],\n \"10217\": [0.65002, 1.15, 0, 0, 0.61111],\n \"10752\": [0.55001, 1.05, 0, 0, 1.51112],\n \"10753\": [0.55001, 1.05, 0, 0, 1.51112],\n \"10754\": [0.55001, 1.05, 0, 0, 1.51112],\n \"10756\": [0.55001, 1.05, 0, 0, 1.11111],\n \"10758\": [0.55001, 1.05, 0, 0, 1.11111]\n },\n \"Size3-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [0.95003, 1.45, 0, 0, 0.73611],\n \"41\": [0.95003, 1.45, 0, 0, 0.73611],\n \"47\": [0.95003, 1.45, 0, 0, 1.04445],\n \"91\": [0.95003, 1.45, 0, 0, 0.52778],\n \"92\": [0.95003, 1.45, 0, 0, 1.04445],\n \"93\": [0.95003, 1.45, 0, 0, 0.52778],\n \"123\": [0.95003, 1.45, 0, 0, 0.75],\n \"125\": [0.95003, 1.45, 0, 0, 0.75],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.75, 0, 0, 1.44445],\n \"732\": [0, 0.75, 0, 0, 1.44445],\n \"770\": [0, 0.75, 0, 0, 1.44445],\n \"771\": [0, 0.75, 0, 0, 1.44445],\n \"8730\": [0.95003, 1.45, 0, 0, 1.0],\n \"8968\": [0.95003, 1.45, 0, 0, 0.58334],\n \"8969\": [0.95003, 1.45, 0, 0, 0.58334],\n \"8970\": [0.95003, 1.45, 0, 0, 0.58334],\n \"8971\": [0.95003, 1.45, 0, 0, 0.58334],\n \"10216\": [0.95003, 1.45, 0, 0, 0.75],\n \"10217\": [0.95003, 1.45, 0, 0, 0.75]\n },\n \"Size4-Regular\": {\n \"32\": [0, 0, 0, 0, 0.25],\n \"40\": [1.25003, 1.75, 0, 0, 0.79167],\n \"41\": [1.25003, 1.75, 0, 0, 0.79167],\n \"47\": [1.25003, 1.75, 0, 0, 1.27778],\n \"91\": [1.25003, 1.75, 0, 0, 0.58334],\n \"92\": [1.25003, 1.75, 0, 0, 1.27778],\n \"93\": [1.25003, 1.75, 0, 0, 0.58334],\n \"123\": [1.25003, 1.75, 0, 0, 0.80556],\n \"125\": [1.25003, 1.75, 0, 0, 0.80556],\n \"160\": [0, 0, 0, 0, 0.25],\n \"710\": [0, 0.825, 0, 0, 1.8889],\n \"732\": [0, 0.825, 0, 0, 1.8889],\n \"770\": [0, 0.825, 0, 0, 1.8889],\n \"771\": [0, 0.825, 0, 0, 1.8889],\n \"8730\": [1.25003, 1.75, 0, 0, 1.0],\n \"8968\": [1.25003, 1.75, 0, 0, 0.63889],\n \"8969\": [1.25003, 1.75, 0, 0, 0.63889],\n \"8970\": [1.25003, 1.75, 0, 0, 0.63889],\n \"8971\": [1.25003, 1.75, 0, 0, 0.63889],\n \"9115\": [0.64502, 1.155, 0, 0, 0.875],\n \"9116\": [1e-05, 0.6, 0, 0, 0.875],\n \"9117\": [0.64502, 1.155, 0, 0, 0.875],\n \"9118\": [0.64502, 1.155, 0, 0, 0.875],\n \"9119\": [1e-05, 0.6, 0, 0, 0.875],\n \"9120\": [0.64502, 1.155, 0, 0, 0.875],\n \"9121\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9122\": [-0.00099, 0.601, 0, 0, 0.66667],\n \"9123\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9124\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9125\": [-0.00099, 0.601, 0, 0, 0.66667],\n \"9126\": [0.64502, 1.155, 0, 0, 0.66667],\n \"9127\": [1e-05, 0.9, 0, 0, 0.88889],\n \"9128\": [0.65002, 1.15, 0, 0, 0.88889],\n \"9129\": [0.90001, 0, 0, 0, 0.88889],\n \"9130\": [0, 0.3, 0, 0, 0.88889],\n \"9131\": [1e-05, 0.9, 0, 0, 0.88889],\n \"9132\": [0.65002, 1.15, 0, 0, 0.88889],\n \"9133\": [0.90001, 0, 0, 0, 0.88889],\n \"9143\": [0.88502, 0.915, 0, 0, 1.05556],\n \"10216\": [1.25003, 1.75, 0, 0, 0.80556],\n \"10217\": [1.25003, 1.75, 0, 0, 0.80556],\n \"57344\": [-0.00499, 0.605, 0, 0, 1.05556],\n \"57345\": [-0.00499, 0.605, 0, 0, 1.05556],\n \"57680\": [0, 0.12, 0, 0, 0.45],\n \"57681\": [0, 0.12, 0, 0, 0.45],\n \"57682\": [0, 0.12, 0, 0, 0.45],\n \"57683\": [0, 0.12, 0, 0, 0.45]\n },\n \"Typewriter-Regular\": {\n \"32\": [0, 0, 0, 0, 0.525],\n \"33\": [0, 0.61111, 0, 0, 0.525],\n \"34\": [0, 0.61111, 0, 0, 0.525],\n \"35\": [0, 0.61111, 0, 0, 0.525],\n \"36\": [0.08333, 0.69444, 0, 0, 0.525],\n \"37\": [0.08333, 0.69444, 0, 0, 0.525],\n \"38\": [0, 0.61111, 0, 0, 0.525],\n \"39\": [0, 0.61111, 0, 0, 0.525],\n \"40\": [0.08333, 0.69444, 0, 0, 0.525],\n \"41\": [0.08333, 0.69444, 0, 0, 0.525],\n \"42\": [0, 0.52083, 0, 0, 0.525],\n \"43\": [-0.08056, 0.53055, 0, 0, 0.525],\n \"44\": [0.13889, 0.125, 0, 0, 0.525],\n \"45\": [-0.08056, 0.53055, 0, 0, 0.525],\n \"46\": [0, 0.125, 0, 0, 0.525],\n \"47\": [0.08333, 0.69444, 0, 0, 0.525],\n \"48\": [0, 0.61111, 0, 0, 0.525],\n \"49\": [0, 0.61111, 0, 0, 0.525],\n \"50\": [0, 0.61111, 0, 0, 0.525],\n \"51\": [0, 0.61111, 0, 0, 0.525],\n \"52\": [0, 0.61111, 0, 0, 0.525],\n \"53\": [0, 0.61111, 0, 0, 0.525],\n \"54\": [0, 0.61111, 0, 0, 0.525],\n \"55\": [0, 0.61111, 0, 0, 0.525],\n \"56\": [0, 0.61111, 0, 0, 0.525],\n \"57\": [0, 0.61111, 0, 0, 0.525],\n \"58\": [0, 0.43056, 0, 0, 0.525],\n \"59\": [0.13889, 0.43056, 0, 0, 0.525],\n \"60\": [-0.05556, 0.55556, 0, 0, 0.525],\n \"61\": [-0.19549, 0.41562, 0, 0, 0.525],\n \"62\": [-0.05556, 0.55556, 0, 0, 0.525],\n \"63\": [0, 0.61111, 0, 0, 0.525],\n \"64\": [0, 0.61111, 0, 0, 0.525],\n \"65\": [0, 0.61111, 0, 0, 0.525],\n \"66\": [0, 0.61111, 0, 0, 0.525],\n \"67\": [0, 0.61111, 0, 0, 0.525],\n \"68\": [0, 0.61111, 0, 0, 0.525],\n \"69\": [0, 0.61111, 0, 0, 0.525],\n \"70\": [0, 0.61111, 0, 0, 0.525],\n \"71\": [0, 0.61111, 0, 0, 0.525],\n \"72\": [0, 0.61111, 0, 0, 0.525],\n \"73\": [0, 0.61111, 0, 0, 0.525],\n \"74\": [0, 0.61111, 0, 0, 0.525],\n \"75\": [0, 0.61111, 0, 0, 0.525],\n \"76\": [0, 0.61111, 0, 0, 0.525],\n \"77\": [0, 0.61111, 0, 0, 0.525],\n \"78\": [0, 0.61111, 0, 0, 0.525],\n \"79\": [0, 0.61111, 0, 0, 0.525],\n \"80\": [0, 0.61111, 0, 0, 0.525],\n \"81\": [0.13889, 0.61111, 0, 0, 0.525],\n \"82\": [0, 0.61111, 0, 0, 0.525],\n \"83\": [0, 0.61111, 0, 0, 0.525],\n \"84\": [0, 0.61111, 0, 0, 0.525],\n \"85\": [0, 0.61111, 0, 0, 0.525],\n \"86\": [0, 0.61111, 0, 0, 0.525],\n \"87\": [0, 0.61111, 0, 0, 0.525],\n \"88\": [0, 0.61111, 0, 0, 0.525],\n \"89\": [0, 0.61111, 0, 0, 0.525],\n \"90\": [0, 0.61111, 0, 0, 0.525],\n \"91\": [0.08333, 0.69444, 0, 0, 0.525],\n \"92\": [0.08333, 0.69444, 0, 0, 0.525],\n \"93\": [0.08333, 0.69444, 0, 0, 0.525],\n \"94\": [0, 0.61111, 0, 0, 0.525],\n \"95\": [0.09514, 0, 0, 0, 0.525],\n \"96\": [0, 0.61111, 0, 0, 0.525],\n \"97\": [0, 0.43056, 0, 0, 0.525],\n \"98\": [0, 0.61111, 0, 0, 0.525],\n \"99\": [0, 0.43056, 0, 0, 0.525],\n \"100\": [0, 0.61111, 0, 0, 0.525],\n \"101\": [0, 0.43056, 0, 0, 0.525],\n \"102\": [0, 0.61111, 0, 0, 0.525],\n \"103\": [0.22222, 0.43056, 0, 0, 0.525],\n \"104\": [0, 0.61111, 0, 0, 0.525],\n \"105\": [0, 0.61111, 0, 0, 0.525],\n \"106\": [0.22222, 0.61111, 0, 0, 0.525],\n \"107\": [0, 0.61111, 0, 0, 0.525],\n \"108\": [0, 0.61111, 0, 0, 0.525],\n \"109\": [0, 0.43056, 0, 0, 0.525],\n \"110\": [0, 0.43056, 0, 0, 0.525],\n \"111\": [0, 0.43056, 0, 0, 0.525],\n \"112\": [0.22222, 0.43056, 0, 0, 0.525],\n \"113\": [0.22222, 0.43056, 0, 0, 0.525],\n \"114\": [0, 0.43056, 0, 0, 0.525],\n \"115\": [0, 0.43056, 0, 0, 0.525],\n \"116\": [0, 0.55358, 0, 0, 0.525],\n \"117\": [0, 0.43056, 0, 0, 0.525],\n \"118\": [0, 0.43056, 0, 0, 0.525],\n \"119\": [0, 0.43056, 0, 0, 0.525],\n \"120\": [0, 0.43056, 0, 0, 0.525],\n \"121\": [0.22222, 0.43056, 0, 0, 0.525],\n \"122\": [0, 0.43056, 0, 0, 0.525],\n \"123\": [0.08333, 0.69444, 0, 0, 0.525],\n \"124\": [0.08333, 0.69444, 0, 0, 0.525],\n \"125\": [0.08333, 0.69444, 0, 0, 0.525],\n \"126\": [0, 0.61111, 0, 0, 0.525],\n \"127\": [0, 0.61111, 0, 0, 0.525],\n \"160\": [0, 0, 0, 0, 0.525],\n \"176\": [0, 0.61111, 0, 0, 0.525],\n \"184\": [0.19445, 0, 0, 0, 0.525],\n \"305\": [0, 0.43056, 0, 0, 0.525],\n \"567\": [0.22222, 0.43056, 0, 0, 0.525],\n \"711\": [0, 0.56597, 0, 0, 0.525],\n \"713\": [0, 0.56555, 0, 0, 0.525],\n \"714\": [0, 0.61111, 0, 0, 0.525],\n \"715\": [0, 0.61111, 0, 0, 0.525],\n \"728\": [0, 0.61111, 0, 0, 0.525],\n \"730\": [0, 0.61111, 0, 0, 0.525],\n \"770\": [0, 0.61111, 0, 0, 0.525],\n \"771\": [0, 0.61111, 0, 0, 0.525],\n \"776\": [0, 0.61111, 0, 0, 0.525],\n \"915\": [0, 0.61111, 0, 0, 0.525],\n \"916\": [0, 0.61111, 0, 0, 0.525],\n \"920\": [0, 0.61111, 0, 0, 0.525],\n \"923\": [0, 0.61111, 0, 0, 0.525],\n \"926\": [0, 0.61111, 0, 0, 0.525],\n \"928\": [0, 0.61111, 0, 0, 0.525],\n \"931\": [0, 0.61111, 0, 0, 0.525],\n \"933\": [0, 0.61111, 0, 0, 0.525],\n \"934\": [0, 0.61111, 0, 0, 0.525],\n \"936\": [0, 0.61111, 0, 0, 0.525],\n \"937\": [0, 0.61111, 0, 0, 0.525],\n \"8216\": [0, 0.61111, 0, 0, 0.525],\n \"8217\": [0, 0.61111, 0, 0, 0.525],\n \"8242\": [0, 0.61111, 0, 0, 0.525],\n \"9251\": [0.11111, 0.21944, 0, 0, 0.525]\n }\n};\n\n/**\n * This file contains metrics regarding fonts and individual symbols. The sigma\n * and xi variables, as well as the metricMap map contain data extracted from\n * TeX, TeX font metrics, and the TTF files. These data are then exposed via the\n * `metrics` variable and the getCharacterMetrics function.\n */\n// In TeX, there are actually three sets of dimensions, one for each of\n// textstyle (size index 5 and higher: >=9pt), scriptstyle (size index 3 and 4:\n// 7-8pt), and scriptscriptstyle (size index 1 and 2: 5-6pt). These are\n// provided in the arrays below, in that order.\n//\n// The font metrics are stored in fonts cmsy10, cmsy7, and cmsy5 respectively.\n// This was determined by running the following script:\n//\n// latex -interaction=nonstopmode \\\n// '\\documentclass{article}\\usepackage{amsmath}\\begin{document}' \\\n// '$a$ \\expandafter\\show\\the\\textfont2' \\\n// '\\expandafter\\show\\the\\scriptfont2' \\\n// '\\expandafter\\show\\the\\scriptscriptfont2' \\\n// '\\stop'\n//\n// The metrics themselves were retrieved using the following commands:\n//\n// tftopl cmsy10\n// tftopl cmsy7\n// tftopl cmsy5\n//\n// The output of each of these commands is quite lengthy. The only part we\n// care about is the FONTDIMEN section. Each value is measured in EMs.\nvar sigmasAndXis = {\n slant: [0.250, 0.250, 0.250],\n // sigma1\n space: [0.000, 0.000, 0.000],\n // sigma2\n stretch: [0.000, 0.000, 0.000],\n // sigma3\n shrink: [0.000, 0.000, 0.000],\n // sigma4\n xHeight: [0.431, 0.431, 0.431],\n // sigma5\n quad: [1.000, 1.171, 1.472],\n // sigma6\n extraSpace: [0.000, 0.000, 0.000],\n // sigma7\n num1: [0.677, 0.732, 0.925],\n // sigma8\n num2: [0.394, 0.384, 0.387],\n // sigma9\n num3: [0.444, 0.471, 0.504],\n // sigma10\n denom1: [0.686, 0.752, 1.025],\n // sigma11\n denom2: [0.345, 0.344, 0.532],\n // sigma12\n sup1: [0.413, 0.503, 0.504],\n // sigma13\n sup2: [0.363, 0.431, 0.404],\n // sigma14\n sup3: [0.289, 0.286, 0.294],\n // sigma15\n sub1: [0.150, 0.143, 0.200],\n // sigma16\n sub2: [0.247, 0.286, 0.400],\n // sigma17\n supDrop: [0.386, 0.353, 0.494],\n // sigma18\n subDrop: [0.050, 0.071, 0.100],\n // sigma19\n delim1: [2.390, 1.700, 1.980],\n // sigma20\n delim2: [1.010, 1.157, 1.420],\n // sigma21\n axisHeight: [0.250, 0.250, 0.250],\n // sigma22\n // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;\n // they correspond to the font parameters of the extension fonts (family 3).\n // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to\n // match cmex7, we'd use cmex7.tfm values for script and scriptscript\n // values.\n defaultRuleThickness: [0.04, 0.049, 0.049],\n // xi8; cmex7: 0.049\n bigOpSpacing1: [0.111, 0.111, 0.111],\n // xi9\n bigOpSpacing2: [0.166, 0.166, 0.166],\n // xi10\n bigOpSpacing3: [0.2, 0.2, 0.2],\n // xi11\n bigOpSpacing4: [0.6, 0.611, 0.611],\n // xi12; cmex7: 0.611\n bigOpSpacing5: [0.1, 0.143, 0.143],\n // xi13; cmex7: 0.143\n // The \\sqrt rule width is taken from the height of the surd character.\n // Since we use the same font at all sizes, this thickness doesn't scale.\n sqrtRuleThickness: [0.04, 0.04, 0.04],\n // This value determines how large a pt is, for metrics which are defined\n // in terms of pts.\n // This value is also used in katex.scss; if you change it make sure the\n // values match.\n ptPerEm: [10.0, 10.0, 10.0],\n // The space between adjacent `|` columns in an array definition. From\n // `\\showthe\\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.\n doubleRuleSep: [0.2, 0.2, 0.2],\n // The width of separator lines in {array} environments. From\n // `\\showthe\\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.\n arrayRuleWidth: [0.04, 0.04, 0.04],\n // Two values from LaTeX source2e:\n fboxsep: [0.3, 0.3, 0.3],\n // 3 pt / ptPerEm\n fboxrule: [0.04, 0.04, 0.04] // 0.4 pt / ptPerEm\n\n}; // This map contains a mapping from font name and character code to character\n// should have Latin-1 and Cyrillic characters, but may not depending on the\n// operating system. The metrics do not account for extra height from the\n// accents. In the case of Cyrillic characters which have both ascenders and\n// descenders we prefer approximations with ascenders, primarily to prevent\n// the fraction bar or root line from intersecting the glyph.\n// TODO(kevinb) allow union of multiple glyph metrics for better accuracy.\n\nvar extraCharacterMap = {\n // Latin-1\n '\u00C5': 'A',\n '\u00D0': 'D',\n '\u00DE': 'o',\n '\u00E5': 'a',\n '\u00F0': 'd',\n '\u00FE': 'o',\n // Cyrillic\n '\u0410': 'A',\n '\u0411': 'B',\n '\u0412': 'B',\n '\u0413': 'F',\n '\u0414': 'A',\n '\u0415': 'E',\n '\u0416': 'K',\n '\u0417': '3',\n '\u0418': 'N',\n '\u0419': 'N',\n '\u041A': 'K',\n '\u041B': 'N',\n '\u041C': 'M',\n '\u041D': 'H',\n '\u041E': 'O',\n '\u041F': 'N',\n '\u0420': 'P',\n '\u0421': 'C',\n '\u0422': 'T',\n '\u0423': 'y',\n '\u0424': 'O',\n '\u0425': 'X',\n '\u0426': 'U',\n '\u0427': 'h',\n '\u0428': 'W',\n '\u0429': 'W',\n '\u042A': 'B',\n '\u042B': 'X',\n '\u042C': 'B',\n '\u042D': '3',\n '\u042E': 'X',\n '\u042F': 'R',\n '\u0430': 'a',\n '\u0431': 'b',\n '\u0432': 'a',\n '\u0433': 'r',\n '\u0434': 'y',\n '\u0435': 'e',\n '\u0436': 'm',\n '\u0437': 'e',\n '\u0438': 'n',\n '\u0439': 'n',\n '\u043A': 'n',\n '\u043B': 'n',\n '\u043C': 'm',\n '\u043D': 'n',\n '\u043E': 'o',\n '\u043F': 'n',\n '\u0440': 'p',\n '\u0441': 'c',\n '\u0442': 'o',\n '\u0443': 'y',\n '\u0444': 'b',\n '\u0445': 'x',\n '\u0446': 'n',\n '\u0447': 'n',\n '\u0448': 'w',\n '\u0449': 'w',\n '\u044A': 'a',\n '\u044B': 'm',\n '\u044C': 'a',\n '\u044D': 'e',\n '\u044E': 'm',\n '\u044F': 'r'\n};\n\n/**\n * This function adds new font metrics to default metricMap\n * It can also override existing metrics\n */\nfunction setFontMetrics(fontName, metrics) {\n fontMetricsData[fontName] = metrics;\n}\n/**\n * This function is a convenience function for looking up information in the\n * metricMap table. It takes a character as a string, and a font.\n *\n * Note: the `width` property may be undefined if fontMetricsData.js wasn't\n * built using `Make extended_metrics`.\n */\n\nfunction getCharacterMetrics(character, font, mode) {\n if (!fontMetricsData[font]) {\n throw new Error(\"Font metrics not found for font: \" + font + \".\");\n }\n\n var ch = character.charCodeAt(0);\n var metrics = fontMetricsData[font][ch];\n\n if (!metrics && character[0] in extraCharacterMap) {\n ch = extraCharacterMap[character[0]].charCodeAt(0);\n metrics = fontMetricsData[font][ch];\n }\n\n if (!metrics && mode === 'text') {\n // We don't typically have font metrics for Asian scripts.\n // But since we support them in text mode, we need to return\n // some sort of metrics.\n // So if the character is in a script we support but we\n // don't have metrics for it, just use the metrics for\n // the Latin capital letter M. This is close enough because\n // we (currently) only care about the height of the glyph\n // not its width.\n if (supportedCodepoint(ch)) {\n metrics = fontMetricsData[font][77]; // 77 is the charcode for 'M'\n }\n }\n\n if (metrics) {\n return {\n depth: metrics[0],\n height: metrics[1],\n italic: metrics[2],\n skew: metrics[3],\n width: metrics[4]\n };\n }\n}\nvar fontMetricsBySizeIndex = {};\n/**\n * Get the font metrics for a given size.\n */\n\nfunction getGlobalMetrics(size) {\n var sizeIndex;\n\n if (size >= 5) {\n sizeIndex = 0;\n } else if (size >= 3) {\n sizeIndex = 1;\n } else {\n sizeIndex = 2;\n }\n\n if (!fontMetricsBySizeIndex[sizeIndex]) {\n var metrics = fontMetricsBySizeIndex[sizeIndex] = {\n cssEmPerMu: sigmasAndXis.quad[sizeIndex] / 18\n };\n\n for (var key in sigmasAndXis) {\n if (sigmasAndXis.hasOwnProperty(key)) {\n metrics[key] = sigmasAndXis[key][sizeIndex];\n }\n }\n }\n\n return fontMetricsBySizeIndex[sizeIndex];\n}\n\n/**\n * This file contains information about the options that the Parser carries\n * around with it while parsing. Data is held in an `Options` object, and when\n * recursing, a new `Options` object can be created with the `.with*` and\n * `.reset` functions.\n */\nvar sizeStyleMap = [// Each element contains [textsize, scriptsize, scriptscriptsize].\n// The size mappings are taken from TeX with \\normalsize=10pt.\n[1, 1, 1], // size1: [5, 5, 5] \\tiny\n[2, 1, 1], // size2: [6, 5, 5]\n[3, 1, 1], // size3: [7, 5, 5] \\scriptsize\n[4, 2, 1], // size4: [8, 6, 5] \\footnotesize\n[5, 2, 1], // size5: [9, 6, 5] \\small\n[6, 3, 1], // size6: [10, 7, 5] \\normalsize\n[7, 4, 2], // size7: [12, 8, 6] \\large\n[8, 6, 3], // size8: [14.4, 10, 7] \\Large\n[9, 7, 6], // size9: [17.28, 12, 10] \\LARGE\n[10, 8, 7], // size10: [20.74, 14.4, 12] \\huge\n[11, 10, 9] // size11: [24.88, 20.74, 17.28] \\HUGE\n];\nvar sizeMultipliers = [// fontMetrics.js:getGlobalMetrics also uses size indexes, so if\n// you change size indexes, change that function.\n0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.44, 1.728, 2.074, 2.488];\n\nvar sizeAtStyle = function sizeAtStyle(size, style) {\n return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];\n}; // In these types, \"\" (empty string) means \"no change\".\n\n\n/**\n * This is the main options class. It contains the current style, size, color,\n * and font.\n *\n * Options objects should not be modified. To create a new Options with\n * different properties, call a `.having*` method.\n */\nclass Options {\n // A font family applies to a group of fonts (i.e. SansSerif), while a font\n // represents a specific font (i.e. SansSerif Bold).\n // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm\n\n /**\n * The base size index.\n */\n constructor(data) {\n this.style = void 0;\n this.color = void 0;\n this.size = void 0;\n this.textSize = void 0;\n this.phantom = void 0;\n this.font = void 0;\n this.fontFamily = void 0;\n this.fontWeight = void 0;\n this.fontShape = void 0;\n this.sizeMultiplier = void 0;\n this.maxSize = void 0;\n this.minRuleThickness = void 0;\n this._fontMetrics = void 0;\n this.style = data.style;\n this.color = data.color;\n this.size = data.size || Options.BASESIZE;\n this.textSize = data.textSize || this.size;\n this.phantom = !!data.phantom;\n this.font = data.font || \"\";\n this.fontFamily = data.fontFamily || \"\";\n this.fontWeight = data.fontWeight || '';\n this.fontShape = data.fontShape || '';\n this.sizeMultiplier = sizeMultipliers[this.size - 1];\n this.maxSize = data.maxSize;\n this.minRuleThickness = data.minRuleThickness;\n this._fontMetrics = undefined;\n }\n /**\n * Returns a new options object with the same properties as \"this\". Properties\n * from \"extension\" will be copied to the new options object.\n */\n\n\n extend(extension) {\n var data = {\n style: this.style,\n size: this.size,\n textSize: this.textSize,\n color: this.color,\n phantom: this.phantom,\n font: this.font,\n fontFamily: this.fontFamily,\n fontWeight: this.fontWeight,\n fontShape: this.fontShape,\n maxSize: this.maxSize,\n minRuleThickness: this.minRuleThickness\n };\n\n for (var key in extension) {\n if (extension.hasOwnProperty(key)) {\n data[key] = extension[key];\n }\n }\n\n return new Options(data);\n }\n /**\n * Return an options object with the given style. If `this.style === style`,\n * returns `this`.\n */\n\n\n havingStyle(style) {\n if (this.style === style) {\n return this;\n } else {\n return this.extend({\n style: style,\n size: sizeAtStyle(this.textSize, style)\n });\n }\n }\n /**\n * Return an options object with a cramped version of the current style. If\n * the current style is cramped, returns `this`.\n */\n\n\n havingCrampedStyle() {\n return this.havingStyle(this.style.cramp());\n }\n /**\n * Return an options object with the given size and in at least `\\textstyle`.\n * Returns `this` if appropriate.\n */\n\n\n havingSize(size) {\n if (this.size === size && this.textSize === size) {\n return this;\n } else {\n return this.extend({\n style: this.style.text(),\n size: size,\n textSize: size,\n sizeMultiplier: sizeMultipliers[size - 1]\n });\n }\n }\n /**\n * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,\n * changes to at least `\\textstyle`.\n */\n\n\n havingBaseStyle(style) {\n style = style || this.style.text();\n var wantSize = sizeAtStyle(Options.BASESIZE, style);\n\n if (this.size === wantSize && this.textSize === Options.BASESIZE && this.style === style) {\n return this;\n } else {\n return this.extend({\n style: style,\n size: wantSize\n });\n }\n }\n /**\n * Remove the effect of sizing changes such as \\Huge.\n * Keep the effect of the current style, such as \\scriptstyle.\n */\n\n\n havingBaseSizing() {\n var size;\n\n switch (this.style.id) {\n case 4:\n case 5:\n size = 3; // normalsize in scriptstyle\n\n break;\n\n case 6:\n case 7:\n size = 1; // normalsize in scriptscriptstyle\n\n break;\n\n default:\n size = 6;\n // normalsize in textstyle or displaystyle\n }\n\n return this.extend({\n style: this.style.text(),\n size: size\n });\n }\n /**\n * Create a new options object with the given color.\n */\n\n\n withColor(color) {\n return this.extend({\n color: color\n });\n }\n /**\n * Create a new options object with \"phantom\" set to true.\n */\n\n\n withPhantom() {\n return this.extend({\n phantom: true\n });\n }\n /**\n * Creates a new options object with the given math font or old text font.\n * @type {[type]}\n */\n\n\n withFont(font) {\n return this.extend({\n font\n });\n }\n /**\n * Create a new options objects with the given fontFamily.\n */\n\n\n withTextFontFamily(fontFamily) {\n return this.extend({\n fontFamily,\n font: \"\"\n });\n }\n /**\n * Creates a new options object with the given font weight\n */\n\n\n withTextFontWeight(fontWeight) {\n return this.extend({\n fontWeight,\n font: \"\"\n });\n }\n /**\n * Creates a new options object with the given font weight\n */\n\n\n withTextFontShape(fontShape) {\n return this.extend({\n fontShape,\n font: \"\"\n });\n }\n /**\n * Return the CSS sizing classes required to switch from enclosing options\n * `oldOptions` to `this`. Returns an array of classes.\n */\n\n\n sizingClasses(oldOptions) {\n if (oldOptions.size !== this.size) {\n return [\"sizing\", \"reset-size\" + oldOptions.size, \"size\" + this.size];\n } else {\n return [];\n }\n }\n /**\n * Return the CSS sizing classes required to switch to the base size. Like\n * `this.havingSize(BASESIZE).sizingClasses(this)`.\n */\n\n\n baseSizingClasses() {\n if (this.size !== Options.BASESIZE) {\n return [\"sizing\", \"reset-size\" + this.size, \"size\" + Options.BASESIZE];\n } else {\n return [];\n }\n }\n /**\n * Return the font metrics for this size.\n */\n\n\n fontMetrics() {\n if (!this._fontMetrics) {\n this._fontMetrics = getGlobalMetrics(this.size);\n }\n\n return this._fontMetrics;\n }\n /**\n * Gets the CSS color of the current options object\n */\n\n\n getColor() {\n if (this.phantom) {\n return \"transparent\";\n } else {\n return this.color;\n }\n }\n\n}\n\nOptions.BASESIZE = 6;\n\n/**\n * This file does conversion between units. In particular, it provides\n * calculateSize to convert other units into ems.\n */\n// Thus, multiplying a length by this number converts the length from units\n// into pts. Dividing the result by ptPerEm gives the number of ems\n// *assuming* a font size of ptPerEm (normal size, normal style).\n\nvar ptPerUnit = {\n // https://en.wikibooks.org/wiki/LaTeX/Lengths and\n // https://tex.stackexchange.com/a/8263\n \"pt\": 1,\n // TeX point\n \"mm\": 7227 / 2540,\n // millimeter\n \"cm\": 7227 / 254,\n // centimeter\n \"in\": 72.27,\n // inch\n \"bp\": 803 / 800,\n // big (PostScript) points\n \"pc\": 12,\n // pica\n \"dd\": 1238 / 1157,\n // didot\n \"cc\": 14856 / 1157,\n // cicero (12 didot)\n \"nd\": 685 / 642,\n // new didot\n \"nc\": 1370 / 107,\n // new cicero (12 new didot)\n \"sp\": 1 / 65536,\n // scaled point (TeX's internal smallest unit)\n // https://tex.stackexchange.com/a/41371\n \"px\": 803 / 800 // \\pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX\n\n}; // Dictionary of relative units, for fast validity testing.\n\nvar relativeUnit = {\n \"ex\": true,\n \"em\": true,\n \"mu\": true\n};\n\n/**\n * Determine whether the specified unit (either a string defining the unit\n * or a \"size\" parse node containing a unit field) is valid.\n */\nvar validUnit = function validUnit(unit) {\n if (typeof unit !== \"string\") {\n unit = unit.unit;\n }\n\n return unit in ptPerUnit || unit in relativeUnit || unit === \"ex\";\n};\n/*\n * Convert a \"size\" parse node (with numeric \"number\" and string \"unit\" fields,\n * as parsed by functions.js argType \"size\") into a CSS em value for the\n * current style/scale. `options` gives the current options.\n */\n\nvar calculateSize = function calculateSize(sizeValue, options) {\n var scale;\n\n if (sizeValue.unit in ptPerUnit) {\n // Absolute units\n scale = ptPerUnit[sizeValue.unit] // Convert unit to pt\n / options.fontMetrics().ptPerEm // Convert pt to CSS em\n / options.sizeMultiplier; // Unscale to make absolute units\n } else if (sizeValue.unit === \"mu\") {\n // `mu` units scale with scriptstyle/scriptscriptstyle.\n scale = options.fontMetrics().cssEmPerMu;\n } else {\n // Other relative units always refer to the *textstyle* font\n // in the current size.\n var unitOptions;\n\n if (options.style.isTight()) {\n // isTight() means current style is script/scriptscript.\n unitOptions = options.havingStyle(options.style.text());\n } else {\n unitOptions = options;\n } // TODO: In TeX these units are relative to the quad of the current\n // *text* font, e.g. cmr10. KaTeX instead uses values from the\n // comparably-sized *Computer Modern symbol* font. At 10pt, these\n // match. At 7pt and 5pt, they differ: cmr7=1.138894, cmsy7=1.170641;\n // cmr5=1.361133, cmsy5=1.472241. Consider $\\scriptsize a\\kern1emb$.\n // TeX \\showlists shows a kern of 1.13889 * fontsize;\n // KaTeX shows a kern of 1.171 * fontsize.\n\n\n if (sizeValue.unit === \"ex\") {\n scale = unitOptions.fontMetrics().xHeight;\n } else if (sizeValue.unit === \"em\") {\n scale = unitOptions.fontMetrics().quad;\n } else {\n throw new ParseError(\"Invalid unit: '\" + sizeValue.unit + \"'\");\n }\n\n if (unitOptions !== options) {\n scale *= unitOptions.sizeMultiplier / options.sizeMultiplier;\n }\n }\n\n return Math.min(sizeValue.number * scale, options.maxSize);\n};\n/**\n * Round `n` to 4 decimal places, or to the nearest 1/10,000th em. See\n * https://github.com/KaTeX/KaTeX/pull/2460.\n */\n\nvar makeEm = function makeEm(n) {\n return +n.toFixed(4) + \"em\";\n};\n\n/**\n * These objects store the data about the DOM nodes we create, as well as some\n * extra data. They can then be transformed into real DOM nodes with the\n * `toNode` function or HTML markup using `toMarkup`. They are useful for both\n * storing extra properties on the nodes, as well as providing a way to easily\n * work with the DOM.\n *\n * Similar functions for working with MathML nodes exist in mathMLTree.js.\n *\n * TODO: refactor `span` and `anchor` into common superclass when\n * target environments support class inheritance\n */\n\n/**\n * Create an HTML className based on a list of classes. In addition to joining\n * with spaces, we also remove empty classes.\n */\nvar createClass = function createClass(classes) {\n return classes.filter(cls => cls).join(\" \");\n};\n\nvar initNode = function initNode(classes, options, style) {\n this.classes = classes || [];\n this.attributes = {};\n this.height = 0;\n this.depth = 0;\n this.maxFontSize = 0;\n this.style = style || {};\n\n if (options) {\n if (options.style.isTight()) {\n this.classes.push(\"mtight\");\n }\n\n var color = options.getColor();\n\n if (color) {\n this.style.color = color;\n }\n }\n};\n/**\n * Convert into an HTML node\n */\n\n\nvar toNode = function toNode(tagName) {\n var node = document.createElement(tagName); // Apply the class\n\n node.className = createClass(this.classes); // Apply inline styles\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n // $FlowFixMe Flow doesn't seem to understand span.style's type.\n node.style[style] = this.style[style];\n }\n } // Apply attributes\n\n\n for (var attr in this.attributes) {\n if (this.attributes.hasOwnProperty(attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n } // Append the children, also as HTML nodes\n\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n};\n/**\n * Convert into an HTML markup string\n */\n\n\nvar toMarkup = function toMarkup(tagName) {\n var markup = \"<\" + tagName; // Add the class\n\n if (this.classes.length) {\n markup += \" class=\\\"\" + utils.escape(createClass(this.classes)) + \"\\\"\";\n }\n\n var styles = \"\"; // Add the styles, after hyphenation\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n }\n }\n\n if (styles) {\n markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n } // Add the attributes\n\n\n for (var attr in this.attributes) {\n if (this.attributes.hasOwnProperty(attr)) {\n markup += \" \" + attr + \"=\\\"\" + utils.escape(this.attributes[attr]) + \"\\\"\";\n }\n }\n\n markup += \">\"; // Add the markup of the children, also as markup\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n return markup;\n}; // Making the type below exact with all optional fields doesn't work due to\n// - https://github.com/facebook/flow/issues/4582\n// - https://github.com/facebook/flow/issues/5688\n// However, since *all* fields are optional, $Shape<> works as suggested in 5688\n// above.\n// This type does not include all CSS properties. Additional properties should\n// be added as needed.\n\n\n/**\n * This node represents a span node, with a className, a list of children, and\n * an inline style. It also contains information about its height, depth, and\n * maxFontSize.\n *\n * Represents two types with different uses: SvgSpan to wrap an SVG and DomSpan\n * otherwise. This typesafety is important when HTML builders access a span's\n * children.\n */\nclass Span {\n constructor(classes, children, options, style) {\n this.children = void 0;\n this.attributes = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.width = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n initNode.call(this, classes, options, style);\n this.children = children || [];\n }\n /**\n * Sets an arbitrary attribute on the span. Warning: use this wisely. Not\n * all browsers support attributes the same, and having too many custom\n * attributes is probably bad.\n */\n\n\n setAttribute(attribute, value) {\n this.attributes[attribute] = value;\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n\n toNode() {\n return toNode.call(this, \"span\");\n }\n\n toMarkup() {\n return toMarkup.call(this, \"span\");\n }\n\n}\n/**\n * This node represents an anchor () element with a hyperlink. See `span`\n * for further details.\n */\n\nclass Anchor {\n constructor(href, classes, children, options) {\n this.children = void 0;\n this.attributes = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n initNode.call(this, classes, options);\n this.children = children || [];\n this.setAttribute('href', href);\n }\n\n setAttribute(attribute, value) {\n this.attributes[attribute] = value;\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n\n toNode() {\n return toNode.call(this, \"a\");\n }\n\n toMarkup() {\n return toMarkup.call(this, \"a\");\n }\n\n}\n/**\n * This node represents an image embed () element.\n */\n\nclass Img {\n constructor(src, alt, style) {\n this.src = void 0;\n this.alt = void 0;\n this.classes = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.maxFontSize = void 0;\n this.style = void 0;\n this.alt = alt;\n this.src = src;\n this.classes = [\"mord\"];\n this.style = style;\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n\n toNode() {\n var node = document.createElement(\"img\");\n node.src = this.src;\n node.alt = this.alt;\n node.className = \"mord\"; // Apply inline styles\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n // $FlowFixMe\n node.style[style] = this.style[style];\n }\n }\n\n return node;\n }\n\n toMarkup() {\n var markup = \"\\\"\"\";\n return markup;\n }\n\n}\nvar iCombinations = {\n '\u00EE': '\\u0131\\u0302',\n '\u00EF': '\\u0131\\u0308',\n '\u00ED': '\\u0131\\u0301',\n // '\u012B': '\\u0131\\u0304', // enable when we add Extended Latin\n '\u00EC': '\\u0131\\u0300'\n};\n/**\n * A symbol node contains information about a single symbol. It either renders\n * to a single text node, or a span with a single text node in it, depending on\n * whether it has CSS classes, styles, or needs italic correction.\n */\n\nclass SymbolNode {\n constructor(text, height, depth, italic, skew, width, classes, style) {\n this.text = void 0;\n this.height = void 0;\n this.depth = void 0;\n this.italic = void 0;\n this.skew = void 0;\n this.width = void 0;\n this.maxFontSize = void 0;\n this.classes = void 0;\n this.style = void 0;\n this.text = text;\n this.height = height || 0;\n this.depth = depth || 0;\n this.italic = italic || 0;\n this.skew = skew || 0;\n this.width = width || 0;\n this.classes = classes || [];\n this.style = style || {};\n this.maxFontSize = 0; // Mark text from non-Latin scripts with specific classes so that we\n // can specify which fonts to use. This allows us to render these\n // characters with a serif font in situations where the browser would\n // either default to a sans serif or render a placeholder character.\n // We use CSS class names like cjk_fallback, hangul_fallback and\n // brahmic_fallback. See ./unicodeScripts.js for the set of possible\n // script names\n\n var script = scriptFromCodepoint(this.text.charCodeAt(0));\n\n if (script) {\n this.classes.push(script + \"_fallback\");\n }\n\n if (/[\u00EE\u00EF\u00ED\u00EC]/.test(this.text)) {\n // add \u012B when we add Extended Latin\n this.text = iCombinations[this.text];\n }\n }\n\n hasClass(className) {\n return utils.contains(this.classes, className);\n }\n /**\n * Creates a text node or span from a symbol node. Note that a span is only\n * created if it is needed.\n */\n\n\n toNode() {\n var node = document.createTextNode(this.text);\n var span = null;\n\n if (this.italic > 0) {\n span = document.createElement(\"span\");\n span.style.marginRight = makeEm(this.italic);\n }\n\n if (this.classes.length > 0) {\n span = span || document.createElement(\"span\");\n span.className = createClass(this.classes);\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n span = span || document.createElement(\"span\"); // $FlowFixMe Flow doesn't seem to understand span.style's type.\n\n span.style[style] = this.style[style];\n }\n }\n\n if (span) {\n span.appendChild(node);\n return span;\n } else {\n return node;\n }\n }\n /**\n * Creates markup for a symbol node.\n */\n\n\n toMarkup() {\n // TODO(alpert): More duplication than I'd like from\n // span.prototype.toMarkup and symbolNode.prototype.toNode...\n var needsSpan = false;\n var markup = \" 0) {\n styles += \"margin-right:\" + this.italic + \"em;\";\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n }\n }\n\n if (styles) {\n needsSpan = true;\n markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n }\n\n var escaped = utils.escape(this.text);\n\n if (needsSpan) {\n markup += \">\";\n markup += escaped;\n markup += \"\";\n return markup;\n } else {\n return escaped;\n }\n }\n\n}\n/**\n * SVG nodes are used to render stretchy wide elements.\n */\n\nclass SvgNode {\n constructor(children, attributes) {\n this.children = void 0;\n this.attributes = void 0;\n this.children = children || [];\n this.attributes = attributes || {};\n }\n\n toNode() {\n var svgNS = \"http://www.w3.org/2000/svg\";\n var node = document.createElementNS(svgNS, \"svg\"); // Apply attributes\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n }\n\n toMarkup() {\n var markup = \"\";\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n return markup;\n }\n\n}\nclass PathNode {\n constructor(pathName, alternate) {\n this.pathName = void 0;\n this.alternate = void 0;\n this.pathName = pathName;\n this.alternate = alternate; // Used only for \\sqrt, \\phase, & tall delims\n }\n\n toNode() {\n var svgNS = \"http://www.w3.org/2000/svg\";\n var node = document.createElementNS(svgNS, \"path\");\n\n if (this.alternate) {\n node.setAttribute(\"d\", this.alternate);\n } else {\n node.setAttribute(\"d\", path[this.pathName]);\n }\n\n return node;\n }\n\n toMarkup() {\n if (this.alternate) {\n return \"\";\n } else {\n return \"\";\n }\n }\n\n}\nclass LineNode {\n constructor(attributes) {\n this.attributes = void 0;\n this.attributes = attributes || {};\n }\n\n toNode() {\n var svgNS = \"http://www.w3.org/2000/svg\";\n var node = document.createElementNS(svgNS, \"line\"); // Apply attributes\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n return node;\n }\n\n toMarkup() {\n var markup = \"\";\n return markup;\n }\n\n}\nfunction assertSymbolDomNode(group) {\n if (group instanceof SymbolNode) {\n return group;\n } else {\n throw new Error(\"Expected symbolNode but got \" + String(group) + \".\");\n }\n}\nfunction assertSpan(group) {\n if (group instanceof Span) {\n return group;\n } else {\n throw new Error(\"Expected span but got \" + String(group) + \".\");\n }\n}\n\n/**\n * This file holds a list of all no-argument functions and single-character\n * symbols (like 'a' or ';').\n *\n * For each of the symbols, there are three properties they can have:\n * - font (required): the font to be used for this symbol. Either \"main\" (the\n normal font), or \"ams\" (the ams fonts).\n * - group (required): the ParseNode group type the symbol should have (i.e.\n \"textord\", \"mathord\", etc).\n See https://github.com/KaTeX/KaTeX/wiki/Examining-TeX#group-types\n * - replace: the character that this symbol or function should be\n * replaced with (i.e. \"\\phi\" has a replace value of \"\\u03d5\", the phi\n * character in the main font).\n *\n * The outermost map in the table indicates what mode the symbols should be\n * accepted in (e.g. \"math\" or \"text\").\n */\n// Some of these have a \"-token\" suffix since these are also used as `ParseNode`\n// types for raw text tokens, and we want to avoid conflicts with higher-level\n// `ParseNode` types. These `ParseNode`s are constructed within `Parser` by\n// looking up the `symbols` map.\nvar ATOMS = {\n \"bin\": 1,\n \"close\": 1,\n \"inner\": 1,\n \"open\": 1,\n \"punct\": 1,\n \"rel\": 1\n};\nvar NON_ATOMS = {\n \"accent-token\": 1,\n \"mathord\": 1,\n \"op-token\": 1,\n \"spacing\": 1,\n \"textord\": 1\n};\nvar symbols = {\n \"math\": {},\n \"text\": {}\n};\n/** `acceptUnicodeChar = true` is only applicable if `replace` is set. */\n\nfunction defineSymbol(mode, font, group, replace, name, acceptUnicodeChar) {\n symbols[mode][name] = {\n font,\n group,\n replace\n };\n\n if (acceptUnicodeChar && replace) {\n symbols[mode][replace] = symbols[mode][name];\n }\n} // Some abbreviations for commonly used strings.\n// This helps minify the code, and also spotting typos using jshint.\n// modes:\n\nvar math = \"math\";\nvar text = \"text\"; // fonts:\n\nvar main = \"main\";\nvar ams = \"ams\"; // groups:\n\nvar accent = \"accent-token\";\nvar bin = \"bin\";\nvar close = \"close\";\nvar inner = \"inner\";\nvar mathord = \"mathord\";\nvar op = \"op-token\";\nvar open = \"open\";\nvar punct = \"punct\";\nvar rel = \"rel\";\nvar spacing = \"spacing\";\nvar textord = \"textord\"; // Now comes the symbol table\n// Relation Symbols\n\ndefineSymbol(math, main, rel, \"\\u2261\", \"\\\\equiv\", true);\ndefineSymbol(math, main, rel, \"\\u227a\", \"\\\\prec\", true);\ndefineSymbol(math, main, rel, \"\\u227b\", \"\\\\succ\", true);\ndefineSymbol(math, main, rel, \"\\u223c\", \"\\\\sim\", true);\ndefineSymbol(math, main, rel, \"\\u22a5\", \"\\\\perp\");\ndefineSymbol(math, main, rel, \"\\u2aaf\", \"\\\\preceq\", true);\ndefineSymbol(math, main, rel, \"\\u2ab0\", \"\\\\succeq\", true);\ndefineSymbol(math, main, rel, \"\\u2243\", \"\\\\simeq\", true);\ndefineSymbol(math, main, rel, \"\\u2223\", \"\\\\mid\", true);\ndefineSymbol(math, main, rel, \"\\u226a\", \"\\\\ll\", true);\ndefineSymbol(math, main, rel, \"\\u226b\", \"\\\\gg\", true);\ndefineSymbol(math, main, rel, \"\\u224d\", \"\\\\asymp\", true);\ndefineSymbol(math, main, rel, \"\\u2225\", \"\\\\parallel\");\ndefineSymbol(math, main, rel, \"\\u22c8\", \"\\\\bowtie\", true);\ndefineSymbol(math, main, rel, \"\\u2323\", \"\\\\smile\", true);\ndefineSymbol(math, main, rel, \"\\u2291\", \"\\\\sqsubseteq\", true);\ndefineSymbol(math, main, rel, \"\\u2292\", \"\\\\sqsupseteq\", true);\ndefineSymbol(math, main, rel, \"\\u2250\", \"\\\\doteq\", true);\ndefineSymbol(math, main, rel, \"\\u2322\", \"\\\\frown\", true);\ndefineSymbol(math, main, rel, \"\\u220b\", \"\\\\ni\", true);\ndefineSymbol(math, main, rel, \"\\u221d\", \"\\\\propto\", true);\ndefineSymbol(math, main, rel, \"\\u22a2\", \"\\\\vdash\", true);\ndefineSymbol(math, main, rel, \"\\u22a3\", \"\\\\dashv\", true);\ndefineSymbol(math, main, rel, \"\\u220b\", \"\\\\owns\"); // Punctuation\n\ndefineSymbol(math, main, punct, \"\\u002e\", \"\\\\ldotp\");\ndefineSymbol(math, main, punct, \"\\u22c5\", \"\\\\cdotp\"); // Misc Symbols\n\ndefineSymbol(math, main, textord, \"\\u0023\", \"\\\\#\");\ndefineSymbol(text, main, textord, \"\\u0023\", \"\\\\#\");\ndefineSymbol(math, main, textord, \"\\u0026\", \"\\\\&\");\ndefineSymbol(text, main, textord, \"\\u0026\", \"\\\\&\");\ndefineSymbol(math, main, textord, \"\\u2135\", \"\\\\aleph\", true);\ndefineSymbol(math, main, textord, \"\\u2200\", \"\\\\forall\", true);\ndefineSymbol(math, main, textord, \"\\u210f\", \"\\\\hbar\", true);\ndefineSymbol(math, main, textord, \"\\u2203\", \"\\\\exists\", true);\ndefineSymbol(math, main, textord, \"\\u2207\", \"\\\\nabla\", true);\ndefineSymbol(math, main, textord, \"\\u266d\", \"\\\\flat\", true);\ndefineSymbol(math, main, textord, \"\\u2113\", \"\\\\ell\", true);\ndefineSymbol(math, main, textord, \"\\u266e\", \"\\\\natural\", true);\ndefineSymbol(math, main, textord, \"\\u2663\", \"\\\\clubsuit\", true);\ndefineSymbol(math, main, textord, \"\\u2118\", \"\\\\wp\", true);\ndefineSymbol(math, main, textord, \"\\u266f\", \"\\\\sharp\", true);\ndefineSymbol(math, main, textord, \"\\u2662\", \"\\\\diamondsuit\", true);\ndefineSymbol(math, main, textord, \"\\u211c\", \"\\\\Re\", true);\ndefineSymbol(math, main, textord, \"\\u2661\", \"\\\\heartsuit\", true);\ndefineSymbol(math, main, textord, \"\\u2111\", \"\\\\Im\", true);\ndefineSymbol(math, main, textord, \"\\u2660\", \"\\\\spadesuit\", true);\ndefineSymbol(math, main, textord, \"\\u00a7\", \"\\\\S\", true);\ndefineSymbol(text, main, textord, \"\\u00a7\", \"\\\\S\");\ndefineSymbol(math, main, textord, \"\\u00b6\", \"\\\\P\", true);\ndefineSymbol(text, main, textord, \"\\u00b6\", \"\\\\P\"); // Math and Text\n\ndefineSymbol(math, main, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\dag\");\ndefineSymbol(text, main, textord, \"\\u2020\", \"\\\\textdagger\");\ndefineSymbol(math, main, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, main, textord, \"\\u2021\", \"\\\\ddag\");\ndefineSymbol(text, main, textord, \"\\u2021\", \"\\\\textdaggerdbl\"); // Large Delimiters\n\ndefineSymbol(math, main, close, \"\\u23b1\", \"\\\\rmoustache\", true);\ndefineSymbol(math, main, open, \"\\u23b0\", \"\\\\lmoustache\", true);\ndefineSymbol(math, main, close, \"\\u27ef\", \"\\\\rgroup\", true);\ndefineSymbol(math, main, open, \"\\u27ee\", \"\\\\lgroup\", true); // Binary Operators\n\ndefineSymbol(math, main, bin, \"\\u2213\", \"\\\\mp\", true);\ndefineSymbol(math, main, bin, \"\\u2296\", \"\\\\ominus\", true);\ndefineSymbol(math, main, bin, \"\\u228e\", \"\\\\uplus\", true);\ndefineSymbol(math, main, bin, \"\\u2293\", \"\\\\sqcap\", true);\ndefineSymbol(math, main, bin, \"\\u2217\", \"\\\\ast\");\ndefineSymbol(math, main, bin, \"\\u2294\", \"\\\\sqcup\", true);\ndefineSymbol(math, main, bin, \"\\u25ef\", \"\\\\bigcirc\", true);\ndefineSymbol(math, main, bin, \"\\u2219\", \"\\\\bullet\", true);\ndefineSymbol(math, main, bin, \"\\u2021\", \"\\\\ddagger\");\ndefineSymbol(math, main, bin, \"\\u2240\", \"\\\\wr\", true);\ndefineSymbol(math, main, bin, \"\\u2a3f\", \"\\\\amalg\");\ndefineSymbol(math, main, bin, \"\\u0026\", \"\\\\And\"); // from amsmath\n// Arrow Symbols\n\ndefineSymbol(math, main, rel, \"\\u27f5\", \"\\\\longleftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d0\", \"\\\\Leftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f8\", \"\\\\Longleftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f6\", \"\\\\longrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d2\", \"\\\\Rightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f9\", \"\\\\Longrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2194\", \"\\\\leftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27f7\", \"\\\\longleftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d4\", \"\\\\Leftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u27fa\", \"\\\\Longleftrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21a6\", \"\\\\mapsto\", true);\ndefineSymbol(math, main, rel, \"\\u27fc\", \"\\\\longmapsto\", true);\ndefineSymbol(math, main, rel, \"\\u2197\", \"\\\\nearrow\", true);\ndefineSymbol(math, main, rel, \"\\u21a9\", \"\\\\hookleftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21aa\", \"\\\\hookrightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2198\", \"\\\\searrow\", true);\ndefineSymbol(math, main, rel, \"\\u21bc\", \"\\\\leftharpoonup\", true);\ndefineSymbol(math, main, rel, \"\\u21c0\", \"\\\\rightharpoonup\", true);\ndefineSymbol(math, main, rel, \"\\u2199\", \"\\\\swarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21bd\", \"\\\\leftharpoondown\", true);\ndefineSymbol(math, main, rel, \"\\u21c1\", \"\\\\rightharpoondown\", true);\ndefineSymbol(math, main, rel, \"\\u2196\", \"\\\\nwarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21cc\", \"\\\\rightleftharpoons\", true); // AMS Negated Binary Relations\n\ndefineSymbol(math, ams, rel, \"\\u226e\", \"\\\\nless\", true); // Symbol names preceded by \"@\" each have a corresponding macro.\n\ndefineSymbol(math, ams, rel, \"\\ue010\", \"\\\\@nleqslant\");\ndefineSymbol(math, ams, rel, \"\\ue011\", \"\\\\@nleqq\");\ndefineSymbol(math, ams, rel, \"\\u2a87\", \"\\\\lneq\", true);\ndefineSymbol(math, ams, rel, \"\\u2268\", \"\\\\lneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue00c\", \"\\\\@lvertneqq\");\ndefineSymbol(math, ams, rel, \"\\u22e6\", \"\\\\lnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a89\", \"\\\\lnapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u2280\", \"\\\\nprec\", true); // unicode-math maps \\u22e0 to \\npreccurlyeq. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u22e0\", \"\\\\npreceq\", true);\ndefineSymbol(math, ams, rel, \"\\u22e8\", \"\\\\precnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab9\", \"\\\\precnapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u2241\", \"\\\\nsim\", true);\ndefineSymbol(math, ams, rel, \"\\ue006\", \"\\\\@nshortmid\");\ndefineSymbol(math, ams, rel, \"\\u2224\", \"\\\\nmid\", true);\ndefineSymbol(math, ams, rel, \"\\u22ac\", \"\\\\nvdash\", true);\ndefineSymbol(math, ams, rel, \"\\u22ad\", \"\\\\nvDash\", true);\ndefineSymbol(math, ams, rel, \"\\u22ea\", \"\\\\ntriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u22ec\", \"\\\\ntrianglelefteq\", true);\ndefineSymbol(math, ams, rel, \"\\u228a\", \"\\\\subsetneq\", true);\ndefineSymbol(math, ams, rel, \"\\ue01a\", \"\\\\@varsubsetneq\");\ndefineSymbol(math, ams, rel, \"\\u2acb\", \"\\\\subsetneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue017\", \"\\\\@varsubsetneqq\");\ndefineSymbol(math, ams, rel, \"\\u226f\", \"\\\\ngtr\", true);\ndefineSymbol(math, ams, rel, \"\\ue00f\", \"\\\\@ngeqslant\");\ndefineSymbol(math, ams, rel, \"\\ue00e\", \"\\\\@ngeqq\");\ndefineSymbol(math, ams, rel, \"\\u2a88\", \"\\\\gneq\", true);\ndefineSymbol(math, ams, rel, \"\\u2269\", \"\\\\gneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue00d\", \"\\\\@gvertneqq\");\ndefineSymbol(math, ams, rel, \"\\u22e7\", \"\\\\gnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a8a\", \"\\\\gnapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u2281\", \"\\\\nsucc\", true); // unicode-math maps \\u22e1 to \\nsucccurlyeq. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u22e1\", \"\\\\nsucceq\", true);\ndefineSymbol(math, ams, rel, \"\\u22e9\", \"\\\\succnsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2aba\", \"\\\\succnapprox\", true); // unicode-math maps \\u2246 to \\simneqq. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u2246\", \"\\\\ncong\", true);\ndefineSymbol(math, ams, rel, \"\\ue007\", \"\\\\@nshortparallel\");\ndefineSymbol(math, ams, rel, \"\\u2226\", \"\\\\nparallel\", true);\ndefineSymbol(math, ams, rel, \"\\u22af\", \"\\\\nVDash\", true);\ndefineSymbol(math, ams, rel, \"\\u22eb\", \"\\\\ntriangleright\");\ndefineSymbol(math, ams, rel, \"\\u22ed\", \"\\\\ntrianglerighteq\", true);\ndefineSymbol(math, ams, rel, \"\\ue018\", \"\\\\@nsupseteqq\");\ndefineSymbol(math, ams, rel, \"\\u228b\", \"\\\\supsetneq\", true);\ndefineSymbol(math, ams, rel, \"\\ue01b\", \"\\\\@varsupsetneq\");\ndefineSymbol(math, ams, rel, \"\\u2acc\", \"\\\\supsetneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue019\", \"\\\\@varsupsetneqq\");\ndefineSymbol(math, ams, rel, \"\\u22ae\", \"\\\\nVdash\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab5\", \"\\\\precneqq\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab6\", \"\\\\succneqq\", true);\ndefineSymbol(math, ams, rel, \"\\ue016\", \"\\\\@nsubseteqq\");\ndefineSymbol(math, ams, bin, \"\\u22b4\", \"\\\\unlhd\");\ndefineSymbol(math, ams, bin, \"\\u22b5\", \"\\\\unrhd\"); // AMS Negated Arrows\n\ndefineSymbol(math, ams, rel, \"\\u219a\", \"\\\\nleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u219b\", \"\\\\nrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21cd\", \"\\\\nLeftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21cf\", \"\\\\nRightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21ae\", \"\\\\nleftrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21ce\", \"\\\\nLeftrightarrow\", true); // AMS Misc\n\ndefineSymbol(math, ams, rel, \"\\u25b3\", \"\\\\vartriangle\");\ndefineSymbol(math, ams, textord, \"\\u210f\", \"\\\\hslash\");\ndefineSymbol(math, ams, textord, \"\\u25bd\", \"\\\\triangledown\");\ndefineSymbol(math, ams, textord, \"\\u25ca\", \"\\\\lozenge\");\ndefineSymbol(math, ams, textord, \"\\u24c8\", \"\\\\circledS\");\ndefineSymbol(math, ams, textord, \"\\u00ae\", \"\\\\circledR\");\ndefineSymbol(text, ams, textord, \"\\u00ae\", \"\\\\circledR\");\ndefineSymbol(math, ams, textord, \"\\u2221\", \"\\\\measuredangle\", true);\ndefineSymbol(math, ams, textord, \"\\u2204\", \"\\\\nexists\");\ndefineSymbol(math, ams, textord, \"\\u2127\", \"\\\\mho\");\ndefineSymbol(math, ams, textord, \"\\u2132\", \"\\\\Finv\", true);\ndefineSymbol(math, ams, textord, \"\\u2141\", \"\\\\Game\", true);\ndefineSymbol(math, ams, textord, \"\\u2035\", \"\\\\backprime\");\ndefineSymbol(math, ams, textord, \"\\u25b2\", \"\\\\blacktriangle\");\ndefineSymbol(math, ams, textord, \"\\u25bc\", \"\\\\blacktriangledown\");\ndefineSymbol(math, ams, textord, \"\\u25a0\", \"\\\\blacksquare\");\ndefineSymbol(math, ams, textord, \"\\u29eb\", \"\\\\blacklozenge\");\ndefineSymbol(math, ams, textord, \"\\u2605\", \"\\\\bigstar\");\ndefineSymbol(math, ams, textord, \"\\u2222\", \"\\\\sphericalangle\", true);\ndefineSymbol(math, ams, textord, \"\\u2201\", \"\\\\complement\", true); // unicode-math maps U+F0 to \\matheth. We map to AMS function \\eth\n\ndefineSymbol(math, ams, textord, \"\\u00f0\", \"\\\\eth\", true);\ndefineSymbol(text, main, textord, \"\\u00f0\", \"\\u00f0\");\ndefineSymbol(math, ams, textord, \"\\u2571\", \"\\\\diagup\");\ndefineSymbol(math, ams, textord, \"\\u2572\", \"\\\\diagdown\");\ndefineSymbol(math, ams, textord, \"\\u25a1\", \"\\\\square\");\ndefineSymbol(math, ams, textord, \"\\u25a1\", \"\\\\Box\");\ndefineSymbol(math, ams, textord, \"\\u25ca\", \"\\\\Diamond\"); // unicode-math maps U+A5 to \\mathyen. We map to AMS function \\yen\n\ndefineSymbol(math, ams, textord, \"\\u00a5\", \"\\\\yen\", true);\ndefineSymbol(text, ams, textord, \"\\u00a5\", \"\\\\yen\", true);\ndefineSymbol(math, ams, textord, \"\\u2713\", \"\\\\checkmark\", true);\ndefineSymbol(text, ams, textord, \"\\u2713\", \"\\\\checkmark\"); // AMS Hebrew\n\ndefineSymbol(math, ams, textord, \"\\u2136\", \"\\\\beth\", true);\ndefineSymbol(math, ams, textord, \"\\u2138\", \"\\\\daleth\", true);\ndefineSymbol(math, ams, textord, \"\\u2137\", \"\\\\gimel\", true); // AMS Greek\n\ndefineSymbol(math, ams, textord, \"\\u03dd\", \"\\\\digamma\", true);\ndefineSymbol(math, ams, textord, \"\\u03f0\", \"\\\\varkappa\"); // AMS Delimiters\n\ndefineSymbol(math, ams, open, \"\\u250c\", \"\\\\@ulcorner\", true);\ndefineSymbol(math, ams, close, \"\\u2510\", \"\\\\@urcorner\", true);\ndefineSymbol(math, ams, open, \"\\u2514\", \"\\\\@llcorner\", true);\ndefineSymbol(math, ams, close, \"\\u2518\", \"\\\\@lrcorner\", true); // AMS Binary Relations\n\ndefineSymbol(math, ams, rel, \"\\u2266\", \"\\\\leqq\", true);\ndefineSymbol(math, ams, rel, \"\\u2a7d\", \"\\\\leqslant\", true);\ndefineSymbol(math, ams, rel, \"\\u2a95\", \"\\\\eqslantless\", true);\ndefineSymbol(math, ams, rel, \"\\u2272\", \"\\\\lesssim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a85\", \"\\\\lessapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u224a\", \"\\\\approxeq\", true);\ndefineSymbol(math, ams, bin, \"\\u22d6\", \"\\\\lessdot\");\ndefineSymbol(math, ams, rel, \"\\u22d8\", \"\\\\lll\", true);\ndefineSymbol(math, ams, rel, \"\\u2276\", \"\\\\lessgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u22da\", \"\\\\lesseqgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u2a8b\", \"\\\\lesseqqgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u2251\", \"\\\\doteqdot\");\ndefineSymbol(math, ams, rel, \"\\u2253\", \"\\\\risingdotseq\", true);\ndefineSymbol(math, ams, rel, \"\\u2252\", \"\\\\fallingdotseq\", true);\ndefineSymbol(math, ams, rel, \"\\u223d\", \"\\\\backsim\", true);\ndefineSymbol(math, ams, rel, \"\\u22cd\", \"\\\\backsimeq\", true);\ndefineSymbol(math, ams, rel, \"\\u2ac5\", \"\\\\subseteqq\", true);\ndefineSymbol(math, ams, rel, \"\\u22d0\", \"\\\\Subset\", true);\ndefineSymbol(math, ams, rel, \"\\u228f\", \"\\\\sqsubset\", true);\ndefineSymbol(math, ams, rel, \"\\u227c\", \"\\\\preccurlyeq\", true);\ndefineSymbol(math, ams, rel, \"\\u22de\", \"\\\\curlyeqprec\", true);\ndefineSymbol(math, ams, rel, \"\\u227e\", \"\\\\precsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab7\", \"\\\\precapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u22b2\", \"\\\\vartriangleleft\");\ndefineSymbol(math, ams, rel, \"\\u22b4\", \"\\\\trianglelefteq\");\ndefineSymbol(math, ams, rel, \"\\u22a8\", \"\\\\vDash\", true);\ndefineSymbol(math, ams, rel, \"\\u22aa\", \"\\\\Vvdash\", true);\ndefineSymbol(math, ams, rel, \"\\u2323\", \"\\\\smallsmile\");\ndefineSymbol(math, ams, rel, \"\\u2322\", \"\\\\smallfrown\");\ndefineSymbol(math, ams, rel, \"\\u224f\", \"\\\\bumpeq\", true);\ndefineSymbol(math, ams, rel, \"\\u224e\", \"\\\\Bumpeq\", true);\ndefineSymbol(math, ams, rel, \"\\u2267\", \"\\\\geqq\", true);\ndefineSymbol(math, ams, rel, \"\\u2a7e\", \"\\\\geqslant\", true);\ndefineSymbol(math, ams, rel, \"\\u2a96\", \"\\\\eqslantgtr\", true);\ndefineSymbol(math, ams, rel, \"\\u2273\", \"\\\\gtrsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2a86\", \"\\\\gtrapprox\", true);\ndefineSymbol(math, ams, bin, \"\\u22d7\", \"\\\\gtrdot\");\ndefineSymbol(math, ams, rel, \"\\u22d9\", \"\\\\ggg\", true);\ndefineSymbol(math, ams, rel, \"\\u2277\", \"\\\\gtrless\", true);\ndefineSymbol(math, ams, rel, \"\\u22db\", \"\\\\gtreqless\", true);\ndefineSymbol(math, ams, rel, \"\\u2a8c\", \"\\\\gtreqqless\", true);\ndefineSymbol(math, ams, rel, \"\\u2256\", \"\\\\eqcirc\", true);\ndefineSymbol(math, ams, rel, \"\\u2257\", \"\\\\circeq\", true);\ndefineSymbol(math, ams, rel, \"\\u225c\", \"\\\\triangleq\", true);\ndefineSymbol(math, ams, rel, \"\\u223c\", \"\\\\thicksim\");\ndefineSymbol(math, ams, rel, \"\\u2248\", \"\\\\thickapprox\");\ndefineSymbol(math, ams, rel, \"\\u2ac6\", \"\\\\supseteqq\", true);\ndefineSymbol(math, ams, rel, \"\\u22d1\", \"\\\\Supset\", true);\ndefineSymbol(math, ams, rel, \"\\u2290\", \"\\\\sqsupset\", true);\ndefineSymbol(math, ams, rel, \"\\u227d\", \"\\\\succcurlyeq\", true);\ndefineSymbol(math, ams, rel, \"\\u22df\", \"\\\\curlyeqsucc\", true);\ndefineSymbol(math, ams, rel, \"\\u227f\", \"\\\\succsim\", true);\ndefineSymbol(math, ams, rel, \"\\u2ab8\", \"\\\\succapprox\", true);\ndefineSymbol(math, ams, rel, \"\\u22b3\", \"\\\\vartriangleright\");\ndefineSymbol(math, ams, rel, \"\\u22b5\", \"\\\\trianglerighteq\");\ndefineSymbol(math, ams, rel, \"\\u22a9\", \"\\\\Vdash\", true);\ndefineSymbol(math, ams, rel, \"\\u2223\", \"\\\\shortmid\");\ndefineSymbol(math, ams, rel, \"\\u2225\", \"\\\\shortparallel\");\ndefineSymbol(math, ams, rel, \"\\u226c\", \"\\\\between\", true);\ndefineSymbol(math, ams, rel, \"\\u22d4\", \"\\\\pitchfork\", true);\ndefineSymbol(math, ams, rel, \"\\u221d\", \"\\\\varpropto\");\ndefineSymbol(math, ams, rel, \"\\u25c0\", \"\\\\blacktriangleleft\"); // unicode-math says that \\therefore is a mathord atom.\n// We kept the amssymb atom type, which is rel.\n\ndefineSymbol(math, ams, rel, \"\\u2234\", \"\\\\therefore\", true);\ndefineSymbol(math, ams, rel, \"\\u220d\", \"\\\\backepsilon\");\ndefineSymbol(math, ams, rel, \"\\u25b6\", \"\\\\blacktriangleright\"); // unicode-math says that \\because is a mathord atom.\n// We kept the amssymb atom type, which is rel.\n\ndefineSymbol(math, ams, rel, \"\\u2235\", \"\\\\because\", true);\ndefineSymbol(math, ams, rel, \"\\u22d8\", \"\\\\llless\");\ndefineSymbol(math, ams, rel, \"\\u22d9\", \"\\\\gggtr\");\ndefineSymbol(math, ams, bin, \"\\u22b2\", \"\\\\lhd\");\ndefineSymbol(math, ams, bin, \"\\u22b3\", \"\\\\rhd\");\ndefineSymbol(math, ams, rel, \"\\u2242\", \"\\\\eqsim\", true);\ndefineSymbol(math, main, rel, \"\\u22c8\", \"\\\\Join\");\ndefineSymbol(math, ams, rel, \"\\u2251\", \"\\\\Doteq\", true); // AMS Binary Operators\n\ndefineSymbol(math, ams, bin, \"\\u2214\", \"\\\\dotplus\", true);\ndefineSymbol(math, ams, bin, \"\\u2216\", \"\\\\smallsetminus\");\ndefineSymbol(math, ams, bin, \"\\u22d2\", \"\\\\Cap\", true);\ndefineSymbol(math, ams, bin, \"\\u22d3\", \"\\\\Cup\", true);\ndefineSymbol(math, ams, bin, \"\\u2a5e\", \"\\\\doublebarwedge\", true);\ndefineSymbol(math, ams, bin, \"\\u229f\", \"\\\\boxminus\", true);\ndefineSymbol(math, ams, bin, \"\\u229e\", \"\\\\boxplus\", true);\ndefineSymbol(math, ams, bin, \"\\u22c7\", \"\\\\divideontimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22c9\", \"\\\\ltimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22ca\", \"\\\\rtimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22cb\", \"\\\\leftthreetimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22cc\", \"\\\\rightthreetimes\", true);\ndefineSymbol(math, ams, bin, \"\\u22cf\", \"\\\\curlywedge\", true);\ndefineSymbol(math, ams, bin, \"\\u22ce\", \"\\\\curlyvee\", true);\ndefineSymbol(math, ams, bin, \"\\u229d\", \"\\\\circleddash\", true);\ndefineSymbol(math, ams, bin, \"\\u229b\", \"\\\\circledast\", true);\ndefineSymbol(math, ams, bin, \"\\u22c5\", \"\\\\centerdot\");\ndefineSymbol(math, ams, bin, \"\\u22ba\", \"\\\\intercal\", true);\ndefineSymbol(math, ams, bin, \"\\u22d2\", \"\\\\doublecap\");\ndefineSymbol(math, ams, bin, \"\\u22d3\", \"\\\\doublecup\");\ndefineSymbol(math, ams, bin, \"\\u22a0\", \"\\\\boxtimes\", true); // AMS Arrows\n// Note: unicode-math maps \\u21e2 to their own function \\rightdasharrow.\n// We'll map it to AMS function \\dashrightarrow. It produces the same atom.\n\ndefineSymbol(math, ams, rel, \"\\u21e2\", \"\\\\dashrightarrow\", true); // unicode-math maps \\u21e0 to \\leftdasharrow. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u21e0\", \"\\\\dashleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21c7\", \"\\\\leftleftarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21c6\", \"\\\\leftrightarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21da\", \"\\\\Lleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u219e\", \"\\\\twoheadleftarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21a2\", \"\\\\leftarrowtail\", true);\ndefineSymbol(math, ams, rel, \"\\u21ab\", \"\\\\looparrowleft\", true);\ndefineSymbol(math, ams, rel, \"\\u21cb\", \"\\\\leftrightharpoons\", true);\ndefineSymbol(math, ams, rel, \"\\u21b6\", \"\\\\curvearrowleft\", true); // unicode-math maps \\u21ba to \\acwopencirclearrow. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u21ba\", \"\\\\circlearrowleft\", true);\ndefineSymbol(math, ams, rel, \"\\u21b0\", \"\\\\Lsh\", true);\ndefineSymbol(math, ams, rel, \"\\u21c8\", \"\\\\upuparrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21bf\", \"\\\\upharpoonleft\", true);\ndefineSymbol(math, ams, rel, \"\\u21c3\", \"\\\\downharpoonleft\", true);\ndefineSymbol(math, main, rel, \"\\u22b6\", \"\\\\origof\", true); // not in font\n\ndefineSymbol(math, main, rel, \"\\u22b7\", \"\\\\imageof\", true); // not in font\n\ndefineSymbol(math, ams, rel, \"\\u22b8\", \"\\\\multimap\", true);\ndefineSymbol(math, ams, rel, \"\\u21ad\", \"\\\\leftrightsquigarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21c9\", \"\\\\rightrightarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21c4\", \"\\\\rightleftarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21a0\", \"\\\\twoheadrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21a3\", \"\\\\rightarrowtail\", true);\ndefineSymbol(math, ams, rel, \"\\u21ac\", \"\\\\looparrowright\", true);\ndefineSymbol(math, ams, rel, \"\\u21b7\", \"\\\\curvearrowright\", true); // unicode-math maps \\u21bb to \\cwopencirclearrow. We'll use the AMS synonym.\n\ndefineSymbol(math, ams, rel, \"\\u21bb\", \"\\\\circlearrowright\", true);\ndefineSymbol(math, ams, rel, \"\\u21b1\", \"\\\\Rsh\", true);\ndefineSymbol(math, ams, rel, \"\\u21ca\", \"\\\\downdownarrows\", true);\ndefineSymbol(math, ams, rel, \"\\u21be\", \"\\\\upharpoonright\", true);\ndefineSymbol(math, ams, rel, \"\\u21c2\", \"\\\\downharpoonright\", true);\ndefineSymbol(math, ams, rel, \"\\u21dd\", \"\\\\rightsquigarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21dd\", \"\\\\leadsto\");\ndefineSymbol(math, ams, rel, \"\\u21db\", \"\\\\Rrightarrow\", true);\ndefineSymbol(math, ams, rel, \"\\u21be\", \"\\\\restriction\");\ndefineSymbol(math, main, textord, \"\\u2018\", \"`\");\ndefineSymbol(math, main, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, main, textord, \"$\", \"\\\\$\");\ndefineSymbol(text, main, textord, \"$\", \"\\\\textdollar\");\ndefineSymbol(math, main, textord, \"%\", \"\\\\%\");\ndefineSymbol(text, main, textord, \"%\", \"\\\\%\");\ndefineSymbol(math, main, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, main, textord, \"_\", \"\\\\_\");\ndefineSymbol(text, main, textord, \"_\", \"\\\\textunderscore\");\ndefineSymbol(math, main, textord, \"\\u2220\", \"\\\\angle\", true);\ndefineSymbol(math, main, textord, \"\\u221e\", \"\\\\infty\", true);\ndefineSymbol(math, main, textord, \"\\u2032\", \"\\\\prime\");\ndefineSymbol(math, main, textord, \"\\u25b3\", \"\\\\triangle\");\ndefineSymbol(math, main, textord, \"\\u0393\", \"\\\\Gamma\", true);\ndefineSymbol(math, main, textord, \"\\u0394\", \"\\\\Delta\", true);\ndefineSymbol(math, main, textord, \"\\u0398\", \"\\\\Theta\", true);\ndefineSymbol(math, main, textord, \"\\u039b\", \"\\\\Lambda\", true);\ndefineSymbol(math, main, textord, \"\\u039e\", \"\\\\Xi\", true);\ndefineSymbol(math, main, textord, \"\\u03a0\", \"\\\\Pi\", true);\ndefineSymbol(math, main, textord, \"\\u03a3\", \"\\\\Sigma\", true);\ndefineSymbol(math, main, textord, \"\\u03a5\", \"\\\\Upsilon\", true);\ndefineSymbol(math, main, textord, \"\\u03a6\", \"\\\\Phi\", true);\ndefineSymbol(math, main, textord, \"\\u03a8\", \"\\\\Psi\", true);\ndefineSymbol(math, main, textord, \"\\u03a9\", \"\\\\Omega\", true);\ndefineSymbol(math, main, textord, \"A\", \"\\u0391\");\ndefineSymbol(math, main, textord, \"B\", \"\\u0392\");\ndefineSymbol(math, main, textord, \"E\", \"\\u0395\");\ndefineSymbol(math, main, textord, \"Z\", \"\\u0396\");\ndefineSymbol(math, main, textord, \"H\", \"\\u0397\");\ndefineSymbol(math, main, textord, \"I\", \"\\u0399\");\ndefineSymbol(math, main, textord, \"K\", \"\\u039A\");\ndefineSymbol(math, main, textord, \"M\", \"\\u039C\");\ndefineSymbol(math, main, textord, \"N\", \"\\u039D\");\ndefineSymbol(math, main, textord, \"O\", \"\\u039F\");\ndefineSymbol(math, main, textord, \"P\", \"\\u03A1\");\ndefineSymbol(math, main, textord, \"T\", \"\\u03A4\");\ndefineSymbol(math, main, textord, \"X\", \"\\u03A7\");\ndefineSymbol(math, main, textord, \"\\u00ac\", \"\\\\neg\", true);\ndefineSymbol(math, main, textord, \"\\u00ac\", \"\\\\lnot\");\ndefineSymbol(math, main, textord, \"\\u22a4\", \"\\\\top\");\ndefineSymbol(math, main, textord, \"\\u22a5\", \"\\\\bot\");\ndefineSymbol(math, main, textord, \"\\u2205\", \"\\\\emptyset\");\ndefineSymbol(math, ams, textord, \"\\u2205\", \"\\\\varnothing\");\ndefineSymbol(math, main, mathord, \"\\u03b1\", \"\\\\alpha\", true);\ndefineSymbol(math, main, mathord, \"\\u03b2\", \"\\\\beta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b3\", \"\\\\gamma\", true);\ndefineSymbol(math, main, mathord, \"\\u03b4\", \"\\\\delta\", true);\ndefineSymbol(math, main, mathord, \"\\u03f5\", \"\\\\epsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03b6\", \"\\\\zeta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b7\", \"\\\\eta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b8\", \"\\\\theta\", true);\ndefineSymbol(math, main, mathord, \"\\u03b9\", \"\\\\iota\", true);\ndefineSymbol(math, main, mathord, \"\\u03ba\", \"\\\\kappa\", true);\ndefineSymbol(math, main, mathord, \"\\u03bb\", \"\\\\lambda\", true);\ndefineSymbol(math, main, mathord, \"\\u03bc\", \"\\\\mu\", true);\ndefineSymbol(math, main, mathord, \"\\u03bd\", \"\\\\nu\", true);\ndefineSymbol(math, main, mathord, \"\\u03be\", \"\\\\xi\", true);\ndefineSymbol(math, main, mathord, \"\\u03bf\", \"\\\\omicron\", true);\ndefineSymbol(math, main, mathord, \"\\u03c0\", \"\\\\pi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c1\", \"\\\\rho\", true);\ndefineSymbol(math, main, mathord, \"\\u03c3\", \"\\\\sigma\", true);\ndefineSymbol(math, main, mathord, \"\\u03c4\", \"\\\\tau\", true);\ndefineSymbol(math, main, mathord, \"\\u03c5\", \"\\\\upsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03d5\", \"\\\\phi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c7\", \"\\\\chi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c8\", \"\\\\psi\", true);\ndefineSymbol(math, main, mathord, \"\\u03c9\", \"\\\\omega\", true);\ndefineSymbol(math, main, mathord, \"\\u03b5\", \"\\\\varepsilon\", true);\ndefineSymbol(math, main, mathord, \"\\u03d1\", \"\\\\vartheta\", true);\ndefineSymbol(math, main, mathord, \"\\u03d6\", \"\\\\varpi\", true);\ndefineSymbol(math, main, mathord, \"\\u03f1\", \"\\\\varrho\", true);\ndefineSymbol(math, main, mathord, \"\\u03c2\", \"\\\\varsigma\", true);\ndefineSymbol(math, main, mathord, \"\\u03c6\", \"\\\\varphi\", true);\ndefineSymbol(math, main, bin, \"\\u2217\", \"*\", true);\ndefineSymbol(math, main, bin, \"+\", \"+\");\ndefineSymbol(math, main, bin, \"\\u2212\", \"-\", true);\ndefineSymbol(math, main, bin, \"\\u22c5\", \"\\\\cdot\", true);\ndefineSymbol(math, main, bin, \"\\u2218\", \"\\\\circ\", true);\ndefineSymbol(math, main, bin, \"\\u00f7\", \"\\\\div\", true);\ndefineSymbol(math, main, bin, \"\\u00b1\", \"\\\\pm\", true);\ndefineSymbol(math, main, bin, \"\\u00d7\", \"\\\\times\", true);\ndefineSymbol(math, main, bin, \"\\u2229\", \"\\\\cap\", true);\ndefineSymbol(math, main, bin, \"\\u222a\", \"\\\\cup\", true);\ndefineSymbol(math, main, bin, \"\\u2216\", \"\\\\setminus\", true);\ndefineSymbol(math, main, bin, \"\\u2227\", \"\\\\land\");\ndefineSymbol(math, main, bin, \"\\u2228\", \"\\\\lor\");\ndefineSymbol(math, main, bin, \"\\u2227\", \"\\\\wedge\", true);\ndefineSymbol(math, main, bin, \"\\u2228\", \"\\\\vee\", true);\ndefineSymbol(math, main, textord, \"\\u221a\", \"\\\\surd\");\ndefineSymbol(math, main, open, \"\\u27e8\", \"\\\\langle\", true);\ndefineSymbol(math, main, open, \"\\u2223\", \"\\\\lvert\");\ndefineSymbol(math, main, open, \"\\u2225\", \"\\\\lVert\");\ndefineSymbol(math, main, close, \"?\", \"?\");\ndefineSymbol(math, main, close, \"!\", \"!\");\ndefineSymbol(math, main, close, \"\\u27e9\", \"\\\\rangle\", true);\ndefineSymbol(math, main, close, \"\\u2223\", \"\\\\rvert\");\ndefineSymbol(math, main, close, \"\\u2225\", \"\\\\rVert\");\ndefineSymbol(math, main, rel, \"=\", \"=\");\ndefineSymbol(math, main, rel, \":\", \":\");\ndefineSymbol(math, main, rel, \"\\u2248\", \"\\\\approx\", true);\ndefineSymbol(math, main, rel, \"\\u2245\", \"\\\\cong\", true);\ndefineSymbol(math, main, rel, \"\\u2265\", \"\\\\ge\");\ndefineSymbol(math, main, rel, \"\\u2265\", \"\\\\geq\", true);\ndefineSymbol(math, main, rel, \"\\u2190\", \"\\\\gets\");\ndefineSymbol(math, main, rel, \">\", \"\\\\gt\", true);\ndefineSymbol(math, main, rel, \"\\u2208\", \"\\\\in\", true);\ndefineSymbol(math, main, rel, \"\\ue020\", \"\\\\@not\");\ndefineSymbol(math, main, rel, \"\\u2282\", \"\\\\subset\", true);\ndefineSymbol(math, main, rel, \"\\u2283\", \"\\\\supset\", true);\ndefineSymbol(math, main, rel, \"\\u2286\", \"\\\\subseteq\", true);\ndefineSymbol(math, main, rel, \"\\u2287\", \"\\\\supseteq\", true);\ndefineSymbol(math, ams, rel, \"\\u2288\", \"\\\\nsubseteq\", true);\ndefineSymbol(math, ams, rel, \"\\u2289\", \"\\\\nsupseteq\", true);\ndefineSymbol(math, main, rel, \"\\u22a8\", \"\\\\models\");\ndefineSymbol(math, main, rel, \"\\u2190\", \"\\\\leftarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2264\", \"\\\\le\");\ndefineSymbol(math, main, rel, \"\\u2264\", \"\\\\leq\", true);\ndefineSymbol(math, main, rel, \"<\", \"\\\\lt\", true);\ndefineSymbol(math, main, rel, \"\\u2192\", \"\\\\rightarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2192\", \"\\\\to\");\ndefineSymbol(math, ams, rel, \"\\u2271\", \"\\\\ngeq\", true);\ndefineSymbol(math, ams, rel, \"\\u2270\", \"\\\\nleq\", true);\ndefineSymbol(math, main, spacing, \"\\u00a0\", \"\\\\ \");\ndefineSymbol(math, main, spacing, \"\\u00a0\", \"\\\\space\"); // Ref: LaTeX Source 2e: \\DeclareRobustCommand{\\nobreakspace}{%\n\ndefineSymbol(math, main, spacing, \"\\u00a0\", \"\\\\nobreakspace\");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \"\\\\ \");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \" \");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \"\\\\space\");\ndefineSymbol(text, main, spacing, \"\\u00a0\", \"\\\\nobreakspace\");\ndefineSymbol(math, main, spacing, null, \"\\\\nobreak\");\ndefineSymbol(math, main, spacing, null, \"\\\\allowbreak\");\ndefineSymbol(math, main, punct, \",\", \",\");\ndefineSymbol(math, main, punct, \";\", \";\");\ndefineSymbol(math, ams, bin, \"\\u22bc\", \"\\\\barwedge\", true);\ndefineSymbol(math, ams, bin, \"\\u22bb\", \"\\\\veebar\", true);\ndefineSymbol(math, main, bin, \"\\u2299\", \"\\\\odot\", true);\ndefineSymbol(math, main, bin, \"\\u2295\", \"\\\\oplus\", true);\ndefineSymbol(math, main, bin, \"\\u2297\", \"\\\\otimes\", true);\ndefineSymbol(math, main, textord, \"\\u2202\", \"\\\\partial\", true);\ndefineSymbol(math, main, bin, \"\\u2298\", \"\\\\oslash\", true);\ndefineSymbol(math, ams, bin, \"\\u229a\", \"\\\\circledcirc\", true);\ndefineSymbol(math, ams, bin, \"\\u22a1\", \"\\\\boxdot\", true);\ndefineSymbol(math, main, bin, \"\\u25b3\", \"\\\\bigtriangleup\");\ndefineSymbol(math, main, bin, \"\\u25bd\", \"\\\\bigtriangledown\");\ndefineSymbol(math, main, bin, \"\\u2020\", \"\\\\dagger\");\ndefineSymbol(math, main, bin, \"\\u22c4\", \"\\\\diamond\");\ndefineSymbol(math, main, bin, \"\\u22c6\", \"\\\\star\");\ndefineSymbol(math, main, bin, \"\\u25c3\", \"\\\\triangleleft\");\ndefineSymbol(math, main, bin, \"\\u25b9\", \"\\\\triangleright\");\ndefineSymbol(math, main, open, \"{\", \"\\\\{\");\ndefineSymbol(text, main, textord, \"{\", \"\\\\{\");\ndefineSymbol(text, main, textord, \"{\", \"\\\\textbraceleft\");\ndefineSymbol(math, main, close, \"}\", \"\\\\}\");\ndefineSymbol(text, main, textord, \"}\", \"\\\\}\");\ndefineSymbol(text, main, textord, \"}\", \"\\\\textbraceright\");\ndefineSymbol(math, main, open, \"{\", \"\\\\lbrace\");\ndefineSymbol(math, main, close, \"}\", \"\\\\rbrace\");\ndefineSymbol(math, main, open, \"[\", \"\\\\lbrack\", true);\ndefineSymbol(text, main, textord, \"[\", \"\\\\lbrack\", true);\ndefineSymbol(math, main, close, \"]\", \"\\\\rbrack\", true);\ndefineSymbol(text, main, textord, \"]\", \"\\\\rbrack\", true);\ndefineSymbol(math, main, open, \"(\", \"\\\\lparen\", true);\ndefineSymbol(math, main, close, \")\", \"\\\\rparen\", true);\ndefineSymbol(text, main, textord, \"<\", \"\\\\textless\", true); // in T1 fontenc\n\ndefineSymbol(text, main, textord, \">\", \"\\\\textgreater\", true); // in T1 fontenc\n\ndefineSymbol(math, main, open, \"\\u230a\", \"\\\\lfloor\", true);\ndefineSymbol(math, main, close, \"\\u230b\", \"\\\\rfloor\", true);\ndefineSymbol(math, main, open, \"\\u2308\", \"\\\\lceil\", true);\ndefineSymbol(math, main, close, \"\\u2309\", \"\\\\rceil\", true);\ndefineSymbol(math, main, textord, \"\\\\\", \"\\\\backslash\");\ndefineSymbol(math, main, textord, \"\\u2223\", \"|\");\ndefineSymbol(math, main, textord, \"\\u2223\", \"\\\\vert\");\ndefineSymbol(text, main, textord, \"|\", \"\\\\textbar\", true); // in T1 fontenc\n\ndefineSymbol(math, main, textord, \"\\u2225\", \"\\\\|\");\ndefineSymbol(math, main, textord, \"\\u2225\", \"\\\\Vert\");\ndefineSymbol(text, main, textord, \"\\u2225\", \"\\\\textbardbl\");\ndefineSymbol(text, main, textord, \"~\", \"\\\\textasciitilde\");\ndefineSymbol(text, main, textord, \"\\\\\", \"\\\\textbackslash\");\ndefineSymbol(text, main, textord, \"^\", \"\\\\textasciicircum\");\ndefineSymbol(math, main, rel, \"\\u2191\", \"\\\\uparrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d1\", \"\\\\Uparrow\", true);\ndefineSymbol(math, main, rel, \"\\u2193\", \"\\\\downarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d3\", \"\\\\Downarrow\", true);\ndefineSymbol(math, main, rel, \"\\u2195\", \"\\\\updownarrow\", true);\ndefineSymbol(math, main, rel, \"\\u21d5\", \"\\\\Updownarrow\", true);\ndefineSymbol(math, main, op, \"\\u2210\", \"\\\\coprod\");\ndefineSymbol(math, main, op, \"\\u22c1\", \"\\\\bigvee\");\ndefineSymbol(math, main, op, \"\\u22c0\", \"\\\\bigwedge\");\ndefineSymbol(math, main, op, \"\\u2a04\", \"\\\\biguplus\");\ndefineSymbol(math, main, op, \"\\u22c2\", \"\\\\bigcap\");\ndefineSymbol(math, main, op, \"\\u22c3\", \"\\\\bigcup\");\ndefineSymbol(math, main, op, \"\\u222b\", \"\\\\int\");\ndefineSymbol(math, main, op, \"\\u222b\", \"\\\\intop\");\ndefineSymbol(math, main, op, \"\\u222c\", \"\\\\iint\");\ndefineSymbol(math, main, op, \"\\u222d\", \"\\\\iiint\");\ndefineSymbol(math, main, op, \"\\u220f\", \"\\\\prod\");\ndefineSymbol(math, main, op, \"\\u2211\", \"\\\\sum\");\ndefineSymbol(math, main, op, \"\\u2a02\", \"\\\\bigotimes\");\ndefineSymbol(math, main, op, \"\\u2a01\", \"\\\\bigoplus\");\ndefineSymbol(math, main, op, \"\\u2a00\", \"\\\\bigodot\");\ndefineSymbol(math, main, op, \"\\u222e\", \"\\\\oint\");\ndefineSymbol(math, main, op, \"\\u222f\", \"\\\\oiint\");\ndefineSymbol(math, main, op, \"\\u2230\", \"\\\\oiiint\");\ndefineSymbol(math, main, op, \"\\u2a06\", \"\\\\bigsqcup\");\ndefineSymbol(math, main, op, \"\\u222b\", \"\\\\smallint\");\ndefineSymbol(text, main, inner, \"\\u2026\", \"\\\\textellipsis\");\ndefineSymbol(math, main, inner, \"\\u2026\", \"\\\\mathellipsis\");\ndefineSymbol(text, main, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, main, inner, \"\\u2026\", \"\\\\ldots\", true);\ndefineSymbol(math, main, inner, \"\\u22ef\", \"\\\\@cdots\", true);\ndefineSymbol(math, main, inner, \"\\u22f1\", \"\\\\ddots\", true);\ndefineSymbol(math, main, textord, \"\\u22ee\", \"\\\\varvdots\"); // \\vdots is a macro\n\ndefineSymbol(math, main, accent, \"\\u02ca\", \"\\\\acute\");\ndefineSymbol(math, main, accent, \"\\u02cb\", \"\\\\grave\");\ndefineSymbol(math, main, accent, \"\\u00a8\", \"\\\\ddot\");\ndefineSymbol(math, main, accent, \"\\u007e\", \"\\\\tilde\");\ndefineSymbol(math, main, accent, \"\\u02c9\", \"\\\\bar\");\ndefineSymbol(math, main, accent, \"\\u02d8\", \"\\\\breve\");\ndefineSymbol(math, main, accent, \"\\u02c7\", \"\\\\check\");\ndefineSymbol(math, main, accent, \"\\u005e\", \"\\\\hat\");\ndefineSymbol(math, main, accent, \"\\u20d7\", \"\\\\vec\");\ndefineSymbol(math, main, accent, \"\\u02d9\", \"\\\\dot\");\ndefineSymbol(math, main, accent, \"\\u02da\", \"\\\\mathring\"); // \\imath and \\jmath should be invariant to \\mathrm, \\mathbf, etc., so use PUA\n\ndefineSymbol(math, main, mathord, \"\\ue131\", \"\\\\@imath\");\ndefineSymbol(math, main, mathord, \"\\ue237\", \"\\\\@jmath\");\ndefineSymbol(math, main, textord, \"\\u0131\", \"\\u0131\");\ndefineSymbol(math, main, textord, \"\\u0237\", \"\\u0237\");\ndefineSymbol(text, main, textord, \"\\u0131\", \"\\\\i\", true);\ndefineSymbol(text, main, textord, \"\\u0237\", \"\\\\j\", true);\ndefineSymbol(text, main, textord, \"\\u00df\", \"\\\\ss\", true);\ndefineSymbol(text, main, textord, \"\\u00e6\", \"\\\\ae\", true);\ndefineSymbol(text, main, textord, \"\\u0153\", \"\\\\oe\", true);\ndefineSymbol(text, main, textord, \"\\u00f8\", \"\\\\o\", true);\ndefineSymbol(text, main, textord, \"\\u00c6\", \"\\\\AE\", true);\ndefineSymbol(text, main, textord, \"\\u0152\", \"\\\\OE\", true);\ndefineSymbol(text, main, textord, \"\\u00d8\", \"\\\\O\", true);\ndefineSymbol(text, main, accent, \"\\u02ca\", \"\\\\'\"); // acute\n\ndefineSymbol(text, main, accent, \"\\u02cb\", \"\\\\`\"); // grave\n\ndefineSymbol(text, main, accent, \"\\u02c6\", \"\\\\^\"); // circumflex\n\ndefineSymbol(text, main, accent, \"\\u02dc\", \"\\\\~\"); // tilde\n\ndefineSymbol(text, main, accent, \"\\u02c9\", \"\\\\=\"); // macron\n\ndefineSymbol(text, main, accent, \"\\u02d8\", \"\\\\u\"); // breve\n\ndefineSymbol(text, main, accent, \"\\u02d9\", \"\\\\.\"); // dot above\n\ndefineSymbol(text, main, accent, \"\\u00b8\", \"\\\\c\"); // cedilla\n\ndefineSymbol(text, main, accent, \"\\u02da\", \"\\\\r\"); // ring above\n\ndefineSymbol(text, main, accent, \"\\u02c7\", \"\\\\v\"); // caron\n\ndefineSymbol(text, main, accent, \"\\u00a8\", '\\\\\"'); // diaresis\n\ndefineSymbol(text, main, accent, \"\\u02dd\", \"\\\\H\"); // double acute\n\ndefineSymbol(text, main, accent, \"\\u25ef\", \"\\\\textcircled\"); // \\bigcirc glyph\n// These ligatures are detected and created in Parser.js's `formLigatures`.\n\nvar ligatures = {\n \"--\": true,\n \"---\": true,\n \"``\": true,\n \"''\": true\n};\ndefineSymbol(text, main, textord, \"\\u2013\", \"--\", true);\ndefineSymbol(text, main, textord, \"\\u2013\", \"\\\\textendash\");\ndefineSymbol(text, main, textord, \"\\u2014\", \"---\", true);\ndefineSymbol(text, main, textord, \"\\u2014\", \"\\\\textemdash\");\ndefineSymbol(text, main, textord, \"\\u2018\", \"`\", true);\ndefineSymbol(text, main, textord, \"\\u2018\", \"\\\\textquoteleft\");\ndefineSymbol(text, main, textord, \"\\u2019\", \"'\", true);\ndefineSymbol(text, main, textord, \"\\u2019\", \"\\\\textquoteright\");\ndefineSymbol(text, main, textord, \"\\u201c\", \"``\", true);\ndefineSymbol(text, main, textord, \"\\u201c\", \"\\\\textquotedblleft\");\ndefineSymbol(text, main, textord, \"\\u201d\", \"''\", true);\ndefineSymbol(text, main, textord, \"\\u201d\", \"\\\\textquotedblright\"); // \\degree from gensymb package\n\ndefineSymbol(math, main, textord, \"\\u00b0\", \"\\\\degree\", true);\ndefineSymbol(text, main, textord, \"\\u00b0\", \"\\\\degree\"); // \\textdegree from inputenc package\n\ndefineSymbol(text, main, textord, \"\\u00b0\", \"\\\\textdegree\", true); // TODO: In LaTeX, \\pounds can generate a different character in text and math\n// mode, but among our fonts, only Main-Regular defines this character \"163\".\n\ndefineSymbol(math, main, textord, \"\\u00a3\", \"\\\\pounds\");\ndefineSymbol(math, main, textord, \"\\u00a3\", \"\\\\mathsterling\", true);\ndefineSymbol(text, main, textord, \"\\u00a3\", \"\\\\pounds\");\ndefineSymbol(text, main, textord, \"\\u00a3\", \"\\\\textsterling\", true);\ndefineSymbol(math, ams, textord, \"\\u2720\", \"\\\\maltese\");\ndefineSymbol(text, ams, textord, \"\\u2720\", \"\\\\maltese\"); // There are lots of symbols which are the same, so we add them in afterwards.\n// All of these are textords in math mode\n\nvar mathTextSymbols = \"0123456789/@.\\\"\";\n\nfor (var i = 0; i < mathTextSymbols.length; i++) {\n var ch = mathTextSymbols.charAt(i);\n defineSymbol(math, main, textord, ch, ch);\n} // All of these are textords in text mode\n\n\nvar textSymbols = \"0123456789!@*()-=+\\\";:?/.,\";\n\nfor (var _i = 0; _i < textSymbols.length; _i++) {\n var _ch = textSymbols.charAt(_i);\n\n defineSymbol(text, main, textord, _ch, _ch);\n} // All of these are textords in text mode, and mathords in math mode\n\n\nvar letters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\nfor (var _i2 = 0; _i2 < letters.length; _i2++) {\n var _ch2 = letters.charAt(_i2);\n\n defineSymbol(math, main, mathord, _ch2, _ch2);\n defineSymbol(text, main, textord, _ch2, _ch2);\n} // Blackboard bold and script letters in Unicode range\n\n\ndefineSymbol(math, ams, textord, \"C\", \"\\u2102\"); // blackboard bold\n\ndefineSymbol(text, ams, textord, \"C\", \"\\u2102\");\ndefineSymbol(math, ams, textord, \"H\", \"\\u210D\");\ndefineSymbol(text, ams, textord, \"H\", \"\\u210D\");\ndefineSymbol(math, ams, textord, \"N\", \"\\u2115\");\ndefineSymbol(text, ams, textord, \"N\", \"\\u2115\");\ndefineSymbol(math, ams, textord, \"P\", \"\\u2119\");\ndefineSymbol(text, ams, textord, \"P\", \"\\u2119\");\ndefineSymbol(math, ams, textord, \"Q\", \"\\u211A\");\ndefineSymbol(text, ams, textord, \"Q\", \"\\u211A\");\ndefineSymbol(math, ams, textord, \"R\", \"\\u211D\");\ndefineSymbol(text, ams, textord, \"R\", \"\\u211D\");\ndefineSymbol(math, ams, textord, \"Z\", \"\\u2124\");\ndefineSymbol(text, ams, textord, \"Z\", \"\\u2124\");\ndefineSymbol(math, main, mathord, \"h\", \"\\u210E\"); // italic h, Planck constant\n\ndefineSymbol(text, main, mathord, \"h\", \"\\u210E\"); // The next loop loads wide (surrogate pair) characters.\n// We support some letters in the Unicode range U+1D400 to U+1D7FF,\n// Mathematical Alphanumeric Symbols.\n// Some editors do not deal well with wide characters. So don't write the\n// string into this file. Instead, create the string from the surrogate pair.\n\nvar wideChar = \"\";\n\nfor (var _i3 = 0; _i3 < letters.length; _i3++) {\n var _ch3 = letters.charAt(_i3); // The hex numbers in the next line are a surrogate pair.\n // 0xD835 is the high surrogate for all letters in the range we support.\n // 0xDC00 is the low surrogate for bold A.\n\n\n wideChar = String.fromCharCode(0xD835, 0xDC00 + _i3); // A-Z a-z bold\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDC34 + _i3); // A-Z a-z italic\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDC68 + _i3); // A-Z a-z bold italic\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDD04 + _i3); // A-Z a-z Fraktur\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDD6C + _i3); // A-Z a-z bold Fraktur\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDDA0 + _i3); // A-Z a-z sans-serif\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDDD4 + _i3); // A-Z a-z sans bold\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDE08 + _i3); // A-Z a-z sans italic\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDE70 + _i3); // A-Z a-z monospace\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n\n if (_i3 < 26) {\n // KaTeX fonts have only capital letters for blackboard bold and script.\n // See exception for k below.\n wideChar = String.fromCharCode(0xD835, 0xDD38 + _i3); // A-Z double struck\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDC9C + _i3); // A-Z script\n\n defineSymbol(math, main, mathord, _ch3, wideChar);\n defineSymbol(text, main, textord, _ch3, wideChar);\n } // TODO: Add bold script when it is supported by a KaTeX font.\n\n} // \"k\" is the only double struck lower case letter in the KaTeX fonts.\n\n\nwideChar = String.fromCharCode(0xD835, 0xDD5C); // k double struck\n\ndefineSymbol(math, main, mathord, \"k\", wideChar);\ndefineSymbol(text, main, textord, \"k\", wideChar); // Next, some wide character numerals\n\nfor (var _i4 = 0; _i4 < 10; _i4++) {\n var _ch4 = _i4.toString();\n\n wideChar = String.fromCharCode(0xD835, 0xDFCE + _i4); // 0-9 bold\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDFE2 + _i4); // 0-9 sans serif\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDFEC + _i4); // 0-9 bold sans\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n wideChar = String.fromCharCode(0xD835, 0xDFF6 + _i4); // 0-9 monospace\n\n defineSymbol(math, main, mathord, _ch4, wideChar);\n defineSymbol(text, main, textord, _ch4, wideChar);\n} // We add these Latin-1 letters as symbols for backwards-compatibility,\n// but they are not actually in the font, nor are they supported by the\n// Unicode accent mechanism, so they fall back to Times font and look ugly.\n// TODO(edemaine): Fix this.\n\n\nvar extraLatin = \"\\u00d0\\u00de\\u00fe\";\n\nfor (var _i5 = 0; _i5 < extraLatin.length; _i5++) {\n var _ch5 = extraLatin.charAt(_i5);\n\n defineSymbol(math, main, mathord, _ch5, _ch5);\n defineSymbol(text, main, textord, _ch5, _ch5);\n}\n\n/**\n * This file provides support for Unicode range U+1D400 to U+1D7FF,\n * Mathematical Alphanumeric Symbols.\n *\n * Function wideCharacterFont takes a wide character as input and returns\n * the font information necessary to render it properly.\n */\n/**\n * Data below is from https://www.unicode.org/charts/PDF/U1D400.pdf\n * That document sorts characters into groups by font type, say bold or italic.\n *\n * In the arrays below, each subarray consists three elements:\n * * The CSS class of that group when in math mode.\n * * The CSS class of that group when in text mode.\n * * The font name, so that KaTeX can get font metrics.\n */\n\nvar wideLatinLetterData = [[\"mathbf\", \"textbf\", \"Main-Bold\"], // A-Z bold upright\n[\"mathbf\", \"textbf\", \"Main-Bold\"], // a-z bold upright\n[\"mathnormal\", \"textit\", \"Math-Italic\"], // A-Z italic\n[\"mathnormal\", \"textit\", \"Math-Italic\"], // a-z italic\n[\"boldsymbol\", \"boldsymbol\", \"Main-BoldItalic\"], // A-Z bold italic\n[\"boldsymbol\", \"boldsymbol\", \"Main-BoldItalic\"], // a-z bold italic\n// Map fancy A-Z letters to script, not calligraphic.\n// This aligns with unicode-math and math fonts (except Cambria Math).\n[\"mathscr\", \"textscr\", \"Script-Regular\"], // A-Z script\n[\"\", \"\", \"\"], // a-z script. No font\n[\"\", \"\", \"\"], // A-Z bold script. No font\n[\"\", \"\", \"\"], // a-z bold script. No font\n[\"mathfrak\", \"textfrak\", \"Fraktur-Regular\"], // A-Z Fraktur\n[\"mathfrak\", \"textfrak\", \"Fraktur-Regular\"], // a-z Fraktur\n[\"mathbb\", \"textbb\", \"AMS-Regular\"], // A-Z double-struck\n[\"mathbb\", \"textbb\", \"AMS-Regular\"], // k double-struck\n// Note that we are using a bold font, but font metrics for regular Fraktur.\n[\"mathboldfrak\", \"textboldfrak\", \"Fraktur-Regular\"], // A-Z bold Fraktur\n[\"mathboldfrak\", \"textboldfrak\", \"Fraktur-Regular\"], // a-z bold Fraktur\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // A-Z sans-serif\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // a-z sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // A-Z bold sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // a-z bold sans-serif\n[\"mathitsf\", \"textitsf\", \"SansSerif-Italic\"], // A-Z italic sans-serif\n[\"mathitsf\", \"textitsf\", \"SansSerif-Italic\"], // a-z italic sans-serif\n[\"\", \"\", \"\"], // A-Z bold italic sans. No font\n[\"\", \"\", \"\"], // a-z bold italic sans. No font\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"], // A-Z monospace\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"] // a-z monospace\n];\nvar wideNumeralData = [[\"mathbf\", \"textbf\", \"Main-Bold\"], // 0-9 bold\n[\"\", \"\", \"\"], // 0-9 double-struck. No KaTeX font.\n[\"mathsf\", \"textsf\", \"SansSerif-Regular\"], // 0-9 sans-serif\n[\"mathboldsf\", \"textboldsf\", \"SansSerif-Bold\"], // 0-9 bold sans-serif\n[\"mathtt\", \"texttt\", \"Typewriter-Regular\"] // 0-9 monospace\n];\nvar wideCharacterFont = function wideCharacterFont(wideChar, mode) {\n // IE doesn't support codePointAt(). So work with the surrogate pair.\n var H = wideChar.charCodeAt(0); // high surrogate\n\n var L = wideChar.charCodeAt(1); // low surrogate\n\n var codePoint = (H - 0xD800) * 0x400 + (L - 0xDC00) + 0x10000;\n var j = mode === \"math\" ? 0 : 1; // column index for CSS class.\n\n if (0x1D400 <= codePoint && codePoint < 0x1D6A4) {\n // wideLatinLetterData contains exactly 26 chars on each row.\n // So we can calculate the relevant row. No traverse necessary.\n var i = Math.floor((codePoint - 0x1D400) / 26);\n return [wideLatinLetterData[i][2], wideLatinLetterData[i][j]];\n } else if (0x1D7CE <= codePoint && codePoint <= 0x1D7FF) {\n // Numerals, ten per row.\n var _i = Math.floor((codePoint - 0x1D7CE) / 10);\n\n return [wideNumeralData[_i][2], wideNumeralData[_i][j]];\n } else if (codePoint === 0x1D6A5 || codePoint === 0x1D6A6) {\n // dotless i or j\n return [wideLatinLetterData[0][2], wideLatinLetterData[0][j]];\n } else if (0x1D6A6 < codePoint && codePoint < 0x1D7CE) {\n // Greek letters. Not supported, yet.\n return [\"\", \"\"];\n } else {\n // We don't support any wide characters outside 1D400\u20131D7FF.\n throw new ParseError(\"Unsupported character: \" + wideChar);\n }\n};\n\n/* eslint no-console:0 */\n\n/**\n * Looks up the given symbol in fontMetrics, after applying any symbol\n * replacements defined in symbol.js\n */\nvar lookupSymbol = function lookupSymbol(value, // TODO(#963): Use a union type for this.\nfontName, mode) {\n // Replace the value with its replaced value from symbol.js\n if (symbols[mode][value] && symbols[mode][value].replace) {\n value = symbols[mode][value].replace;\n }\n\n return {\n value: value,\n metrics: getCharacterMetrics(value, fontName, mode)\n };\n};\n/**\n * Makes a symbolNode after translation via the list of symbols in symbols.js.\n * Correctly pulls out metrics for the character, and optionally takes a list of\n * classes to be attached to the node.\n *\n * TODO: make argument order closer to makeSpan\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n * TODO(#953): Make `options` mandatory and always pass it in.\n */\n\n\nvar makeSymbol = function makeSymbol(value, fontName, mode, options, classes) {\n var lookup = lookupSymbol(value, fontName, mode);\n var metrics = lookup.metrics;\n value = lookup.value;\n var symbolNode;\n\n if (metrics) {\n var italic = metrics.italic;\n\n if (mode === \"text\" || options && options.font === \"mathit\") {\n italic = 0;\n }\n\n symbolNode = new SymbolNode(value, metrics.height, metrics.depth, italic, metrics.skew, metrics.width, classes);\n } else {\n // TODO(emily): Figure out a good way to only print this in development\n typeof console !== \"undefined\" && console.warn(\"No character metrics \" + (\"for '\" + value + \"' in style '\" + fontName + \"' and mode '\" + mode + \"'\"));\n symbolNode = new SymbolNode(value, 0, 0, 0, 0, 0, classes);\n }\n\n if (options) {\n symbolNode.maxFontSize = options.sizeMultiplier;\n\n if (options.style.isTight()) {\n symbolNode.classes.push(\"mtight\");\n }\n\n var color = options.getColor();\n\n if (color) {\n symbolNode.style.color = color;\n }\n }\n\n return symbolNode;\n};\n/**\n * Makes a symbol in Main-Regular or AMS-Regular.\n * Used for rel, bin, open, close, inner, and punct.\n */\n\n\nvar mathsym = function mathsym(value, mode, options, classes) {\n if (classes === void 0) {\n classes = [];\n }\n\n // Decide what font to render the symbol in by its entry in the symbols\n // table.\n // Have a special case for when the value = \\ because the \\ is used as a\n // textord in unsupported command errors but cannot be parsed as a regular\n // text ordinal and is therefore not present as a symbol in the symbols\n // table for text, as well as a special case for boldsymbol because it\n // can be used for bold + and -\n if (options.font === \"boldsymbol\" && lookupSymbol(value, \"Main-Bold\", mode).metrics) {\n return makeSymbol(value, \"Main-Bold\", mode, options, classes.concat([\"mathbf\"]));\n } else if (value === \"\\\\\" || symbols[mode][value].font === \"main\") {\n return makeSymbol(value, \"Main-Regular\", mode, options, classes);\n } else {\n return makeSymbol(value, \"AMS-Regular\", mode, options, classes.concat([\"amsrm\"]));\n }\n};\n/**\n * Determines which of the two font names (Main-Bold and Math-BoldItalic) and\n * corresponding style tags (mathbf or boldsymbol) to use for font \"boldsymbol\",\n * depending on the symbol. Use this function instead of fontMap for font\n * \"boldsymbol\".\n */\n\n\nvar boldsymbol = function boldsymbol(value, mode, options, classes, type) {\n if (type !== \"textord\" && lookupSymbol(value, \"Math-BoldItalic\", mode).metrics) {\n return {\n fontName: \"Math-BoldItalic\",\n fontClass: \"boldsymbol\"\n };\n } else {\n // Some glyphs do not exist in Math-BoldItalic so we need to use\n // Main-Bold instead.\n return {\n fontName: \"Main-Bold\",\n fontClass: \"mathbf\"\n };\n }\n};\n/**\n * Makes either a mathord or textord in the correct font and color.\n */\n\n\nvar makeOrd = function makeOrd(group, options, type) {\n var mode = group.mode;\n var text = group.text;\n var classes = [\"mord\"]; // Math mode or Old font (i.e. \\rm)\n\n var isFont = mode === \"math\" || mode === \"text\" && options.font;\n var fontOrFamily = isFont ? options.font : options.fontFamily;\n var wideFontName = \"\";\n var wideFontClass = \"\";\n\n if (text.charCodeAt(0) === 0xD835) {\n [wideFontName, wideFontClass] = wideCharacterFont(text, mode);\n }\n\n if (wideFontName.length > 0) {\n // surrogate pairs get special treatment\n return makeSymbol(text, wideFontName, mode, options, classes.concat(wideFontClass));\n } else if (fontOrFamily) {\n var fontName;\n var fontClasses;\n\n if (fontOrFamily === \"boldsymbol\") {\n var fontData = boldsymbol(text, mode, options, classes, type);\n fontName = fontData.fontName;\n fontClasses = [fontData.fontClass];\n } else if (isFont) {\n fontName = fontMap[fontOrFamily].fontName;\n fontClasses = [fontOrFamily];\n } else {\n fontName = retrieveTextFontName(fontOrFamily, options.fontWeight, options.fontShape);\n fontClasses = [fontOrFamily, options.fontWeight, options.fontShape];\n }\n\n if (lookupSymbol(text, fontName, mode).metrics) {\n return makeSymbol(text, fontName, mode, options, classes.concat(fontClasses));\n } else if (ligatures.hasOwnProperty(text) && fontName.slice(0, 10) === \"Typewriter\") {\n // Deconstruct ligatures in monospace fonts (\\texttt, \\tt).\n var parts = [];\n\n for (var i = 0; i < text.length; i++) {\n parts.push(makeSymbol(text[i], fontName, mode, options, classes.concat(fontClasses)));\n }\n\n return makeFragment(parts);\n }\n } // Makes a symbol in the default font for mathords and textords.\n\n\n if (type === \"mathord\") {\n return makeSymbol(text, \"Math-Italic\", mode, options, classes.concat([\"mathnormal\"]));\n } else if (type === \"textord\") {\n var font = symbols[mode][text] && symbols[mode][text].font;\n\n if (font === \"ams\") {\n var _fontName = retrieveTextFontName(\"amsrm\", options.fontWeight, options.fontShape);\n\n return makeSymbol(text, _fontName, mode, options, classes.concat(\"amsrm\", options.fontWeight, options.fontShape));\n } else if (font === \"main\" || !font) {\n var _fontName2 = retrieveTextFontName(\"textrm\", options.fontWeight, options.fontShape);\n\n return makeSymbol(text, _fontName2, mode, options, classes.concat(options.fontWeight, options.fontShape));\n } else {\n // fonts added by plugins\n var _fontName3 = retrieveTextFontName(font, options.fontWeight, options.fontShape); // We add font name as a css class\n\n\n return makeSymbol(text, _fontName3, mode, options, classes.concat(_fontName3, options.fontWeight, options.fontShape));\n }\n } else {\n throw new Error(\"unexpected type: \" + type + \" in makeOrd\");\n }\n};\n/**\n * Returns true if subsequent symbolNodes have the same classes, skew, maxFont,\n * and styles.\n */\n\n\nvar canCombine = (prev, next) => {\n if (createClass(prev.classes) !== createClass(next.classes) || prev.skew !== next.skew || prev.maxFontSize !== next.maxFontSize) {\n return false;\n } // If prev and next both are just \"mbin\"s or \"mord\"s we don't combine them\n // so that the proper spacing can be preserved.\n\n\n if (prev.classes.length === 1) {\n var cls = prev.classes[0];\n\n if (cls === \"mbin\" || cls === \"mord\") {\n return false;\n }\n }\n\n for (var style in prev.style) {\n if (prev.style.hasOwnProperty(style) && prev.style[style] !== next.style[style]) {\n return false;\n }\n }\n\n for (var _style in next.style) {\n if (next.style.hasOwnProperty(_style) && prev.style[_style] !== next.style[_style]) {\n return false;\n }\n }\n\n return true;\n};\n/**\n * Combine consecutive domTree.symbolNodes into a single symbolNode.\n * Note: this function mutates the argument.\n */\n\n\nvar tryCombineChars = chars => {\n for (var i = 0; i < chars.length - 1; i++) {\n var prev = chars[i];\n var next = chars[i + 1];\n\n if (prev instanceof SymbolNode && next instanceof SymbolNode && canCombine(prev, next)) {\n prev.text += next.text;\n prev.height = Math.max(prev.height, next.height);\n prev.depth = Math.max(prev.depth, next.depth); // Use the last character's italic correction since we use\n // it to add padding to the right of the span created from\n // the combined characters.\n\n prev.italic = next.italic;\n chars.splice(i + 1, 1);\n i--;\n }\n }\n\n return chars;\n};\n/**\n * Calculate the height, depth, and maxFontSize of an element based on its\n * children.\n */\n\n\nvar sizeElementFromChildren = function sizeElementFromChildren(elem) {\n var height = 0;\n var depth = 0;\n var maxFontSize = 0;\n\n for (var i = 0; i < elem.children.length; i++) {\n var child = elem.children[i];\n\n if (child.height > height) {\n height = child.height;\n }\n\n if (child.depth > depth) {\n depth = child.depth;\n }\n\n if (child.maxFontSize > maxFontSize) {\n maxFontSize = child.maxFontSize;\n }\n }\n\n elem.height = height;\n elem.depth = depth;\n elem.maxFontSize = maxFontSize;\n};\n/**\n * Makes a span with the given list of classes, list of children, and options.\n *\n * TODO(#953): Ensure that `options` is always provided (currently some call\n * sites don't pass it) and make the type below mandatory.\n * TODO: add a separate argument for math class (e.g. `mop`, `mbin`), which\n * should if present come first in `classes`.\n */\n\n\nvar makeSpan$2 = function makeSpan(classes, children, options, style) {\n var span = new Span(classes, children, options, style);\n sizeElementFromChildren(span);\n return span;\n}; // SVG one is simpler -- doesn't require height, depth, max-font setting.\n// This is also a separate method for typesafety.\n\n\nvar makeSvgSpan = (classes, children, options, style) => new Span(classes, children, options, style);\n\nvar makeLineSpan = function makeLineSpan(className, options, thickness) {\n var line = makeSpan$2([className], [], options);\n line.height = Math.max(thickness || options.fontMetrics().defaultRuleThickness, options.minRuleThickness);\n line.style.borderBottomWidth = makeEm(line.height);\n line.maxFontSize = 1.0;\n return line;\n};\n/**\n * Makes an anchor with the given href, list of classes, list of children,\n * and options.\n */\n\n\nvar makeAnchor = function makeAnchor(href, classes, children, options) {\n var anchor = new Anchor(href, classes, children, options);\n sizeElementFromChildren(anchor);\n return anchor;\n};\n/**\n * Makes a document fragment with the given list of children.\n */\n\n\nvar makeFragment = function makeFragment(children) {\n var fragment = new DocumentFragment(children);\n sizeElementFromChildren(fragment);\n return fragment;\n};\n/**\n * Wraps group in a span if it's a document fragment, allowing to apply classes\n * and styles\n */\n\n\nvar wrapFragment = function wrapFragment(group, options) {\n if (group instanceof DocumentFragment) {\n return makeSpan$2([], [group], options);\n }\n\n return group;\n}; // These are exact object types to catch typos in the names of the optional fields.\n\n\n// Computes the updated `children` list and the overall depth.\n//\n// This helper function for makeVList makes it easier to enforce type safety by\n// allowing early exits (returns) in the logic.\nvar getVListChildrenAndDepth = function getVListChildrenAndDepth(params) {\n if (params.positionType === \"individualShift\") {\n var oldChildren = params.children;\n var children = [oldChildren[0]]; // Add in kerns to the list of params.children to get each element to be\n // shifted to the correct specified shift\n\n var _depth = -oldChildren[0].shift - oldChildren[0].elem.depth;\n\n var currPos = _depth;\n\n for (var i = 1; i < oldChildren.length; i++) {\n var diff = -oldChildren[i].shift - currPos - oldChildren[i].elem.depth;\n var size = diff - (oldChildren[i - 1].elem.height + oldChildren[i - 1].elem.depth);\n currPos = currPos + diff;\n children.push({\n type: \"kern\",\n size\n });\n children.push(oldChildren[i]);\n }\n\n return {\n children,\n depth: _depth\n };\n }\n\n var depth;\n\n if (params.positionType === \"top\") {\n // We always start at the bottom, so calculate the bottom by adding up\n // all the sizes\n var bottom = params.positionData;\n\n for (var _i = 0; _i < params.children.length; _i++) {\n var child = params.children[_i];\n bottom -= child.type === \"kern\" ? child.size : child.elem.height + child.elem.depth;\n }\n\n depth = bottom;\n } else if (params.positionType === \"bottom\") {\n depth = -params.positionData;\n } else {\n var firstChild = params.children[0];\n\n if (firstChild.type !== \"elem\") {\n throw new Error('First child must have type \"elem\".');\n }\n\n if (params.positionType === \"shift\") {\n depth = -firstChild.elem.depth - params.positionData;\n } else if (params.positionType === \"firstBaseline\") {\n depth = -firstChild.elem.depth;\n } else {\n throw new Error(\"Invalid positionType \" + params.positionType + \".\");\n }\n }\n\n return {\n children: params.children,\n depth\n };\n};\n/**\n * Makes a vertical list by stacking elements and kerns on top of each other.\n * Allows for many different ways of specifying the positioning method.\n *\n * See VListParam documentation above.\n */\n\n\nvar makeVList = function makeVList(params, options) {\n var {\n children,\n depth\n } = getVListChildrenAndDepth(params); // Create a strut that is taller than any list item. The strut is added to\n // each item, where it will determine the item's baseline. Since it has\n // `overflow:hidden`, the strut's top edge will sit on the item's line box's\n // top edge and the strut's bottom edge will sit on the item's baseline,\n // with no additional line-height spacing. This allows the item baseline to\n // be positioned precisely without worrying about font ascent and\n // line-height.\n\n var pstrutSize = 0;\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n\n if (child.type === \"elem\") {\n var elem = child.elem;\n pstrutSize = Math.max(pstrutSize, elem.maxFontSize, elem.height);\n }\n }\n\n pstrutSize += 2;\n var pstrut = makeSpan$2([\"pstrut\"], []);\n pstrut.style.height = makeEm(pstrutSize); // Create a new list of actual children at the correct offsets\n\n var realChildren = [];\n var minPos = depth;\n var maxPos = depth;\n var currPos = depth;\n\n for (var _i2 = 0; _i2 < children.length; _i2++) {\n var _child = children[_i2];\n\n if (_child.type === \"kern\") {\n currPos += _child.size;\n } else {\n var _elem = _child.elem;\n var classes = _child.wrapperClasses || [];\n var style = _child.wrapperStyle || {};\n var childWrap = makeSpan$2(classes, [pstrut, _elem], undefined, style);\n childWrap.style.top = makeEm(-pstrutSize - currPos - _elem.depth);\n\n if (_child.marginLeft) {\n childWrap.style.marginLeft = _child.marginLeft;\n }\n\n if (_child.marginRight) {\n childWrap.style.marginRight = _child.marginRight;\n }\n\n realChildren.push(childWrap);\n currPos += _elem.height + _elem.depth;\n }\n\n minPos = Math.min(minPos, currPos);\n maxPos = Math.max(maxPos, currPos);\n } // The vlist contents go in a table-cell with `vertical-align:bottom`.\n // This cell's bottom edge will determine the containing table's baseline\n // without overly expanding the containing line-box.\n\n\n var vlist = makeSpan$2([\"vlist\"], realChildren);\n vlist.style.height = makeEm(maxPos); // A second row is used if necessary to represent the vlist's depth.\n\n var rows;\n\n if (minPos < 0) {\n // We will define depth in an empty span with display: table-cell.\n // It should render with the height that we define. But Chrome, in\n // contenteditable mode only, treats that span as if it contains some\n // text content. And that min-height over-rides our desired height.\n // So we put another empty span inside the depth strut span.\n var emptySpan = makeSpan$2([], []);\n var depthStrut = makeSpan$2([\"vlist\"], [emptySpan]);\n depthStrut.style.height = makeEm(-minPos); // Safari wants the first row to have inline content; otherwise it\n // puts the bottom of the *second* row on the baseline.\n\n var topStrut = makeSpan$2([\"vlist-s\"], [new SymbolNode(\"\\u200b\")]);\n rows = [makeSpan$2([\"vlist-r\"], [vlist, topStrut]), makeSpan$2([\"vlist-r\"], [depthStrut])];\n } else {\n rows = [makeSpan$2([\"vlist-r\"], [vlist])];\n }\n\n var vtable = makeSpan$2([\"vlist-t\"], rows);\n\n if (rows.length === 2) {\n vtable.classes.push(\"vlist-t2\");\n }\n\n vtable.height = maxPos;\n vtable.depth = -minPos;\n return vtable;\n}; // Glue is a concept from TeX which is a flexible space between elements in\n// either a vertical or horizontal list. In KaTeX, at least for now, it's\n// static space between elements in a horizontal layout.\n\n\nvar makeGlue = (measurement, options) => {\n // Make an empty span for the space\n var rule = makeSpan$2([\"mspace\"], [], options);\n var size = calculateSize(measurement, options);\n rule.style.marginRight = makeEm(size);\n return rule;\n}; // Takes font options, and returns the appropriate fontLookup name\n\n\nvar retrieveTextFontName = function retrieveTextFontName(fontFamily, fontWeight, fontShape) {\n var baseFontName = \"\";\n\n switch (fontFamily) {\n case \"amsrm\":\n baseFontName = \"AMS\";\n break;\n\n case \"textrm\":\n baseFontName = \"Main\";\n break;\n\n case \"textsf\":\n baseFontName = \"SansSerif\";\n break;\n\n case \"texttt\":\n baseFontName = \"Typewriter\";\n break;\n\n default:\n baseFontName = fontFamily;\n // use fonts added by a plugin\n }\n\n var fontStylesName;\n\n if (fontWeight === \"textbf\" && fontShape === \"textit\") {\n fontStylesName = \"BoldItalic\";\n } else if (fontWeight === \"textbf\") {\n fontStylesName = \"Bold\";\n } else if (fontWeight === \"textit\") {\n fontStylesName = \"Italic\";\n } else {\n fontStylesName = \"Regular\";\n }\n\n return baseFontName + \"-\" + fontStylesName;\n};\n/**\n * Maps TeX font commands to objects containing:\n * - variant: string used for \"mathvariant\" attribute in buildMathML.js\n * - fontName: the \"style\" parameter to fontMetrics.getCharacterMetrics\n */\n// A map between tex font commands an MathML mathvariant attribute values\n\n\nvar fontMap = {\n // styles\n \"mathbf\": {\n variant: \"bold\",\n fontName: \"Main-Bold\"\n },\n \"mathrm\": {\n variant: \"normal\",\n fontName: \"Main-Regular\"\n },\n \"textit\": {\n variant: \"italic\",\n fontName: \"Main-Italic\"\n },\n \"mathit\": {\n variant: \"italic\",\n fontName: \"Main-Italic\"\n },\n \"mathnormal\": {\n variant: \"italic\",\n fontName: \"Math-Italic\"\n },\n // \"boldsymbol\" is missing because they require the use of multiple fonts:\n // Math-BoldItalic and Main-Bold. This is handled by a special case in\n // makeOrd which ends up calling boldsymbol.\n // families\n \"mathbb\": {\n variant: \"double-struck\",\n fontName: \"AMS-Regular\"\n },\n \"mathcal\": {\n variant: \"script\",\n fontName: \"Caligraphic-Regular\"\n },\n \"mathfrak\": {\n variant: \"fraktur\",\n fontName: \"Fraktur-Regular\"\n },\n \"mathscr\": {\n variant: \"script\",\n fontName: \"Script-Regular\"\n },\n \"mathsf\": {\n variant: \"sans-serif\",\n fontName: \"SansSerif-Regular\"\n },\n \"mathtt\": {\n variant: \"monospace\",\n fontName: \"Typewriter-Regular\"\n }\n};\nvar svgData = {\n // path, width, height\n vec: [\"vec\", 0.471, 0.714],\n // values from the font glyph\n oiintSize1: [\"oiintSize1\", 0.957, 0.499],\n // oval to overlay the integrand\n oiintSize2: [\"oiintSize2\", 1.472, 0.659],\n oiiintSize1: [\"oiiintSize1\", 1.304, 0.499],\n oiiintSize2: [\"oiiintSize2\", 1.98, 0.659]\n};\n\nvar staticSvg = function staticSvg(value, options) {\n // Create a span with inline SVG for the element.\n var [pathName, width, height] = svgData[value];\n var path = new PathNode(pathName);\n var svgNode = new SvgNode([path], {\n \"width\": makeEm(width),\n \"height\": makeEm(height),\n // Override CSS rule `.katex svg { width: 100% }`\n \"style\": \"width:\" + makeEm(width),\n \"viewBox\": \"0 0 \" + 1000 * width + \" \" + 1000 * height,\n \"preserveAspectRatio\": \"xMinYMin\"\n });\n var span = makeSvgSpan([\"overlay\"], [svgNode], options);\n span.height = height;\n span.style.height = makeEm(height);\n span.style.width = makeEm(width);\n return span;\n};\n\nvar buildCommon = {\n fontMap,\n makeSymbol,\n mathsym,\n makeSpan: makeSpan$2,\n makeSvgSpan,\n makeLineSpan,\n makeAnchor,\n makeFragment,\n wrapFragment,\n makeVList,\n makeOrd,\n makeGlue,\n staticSvg,\n svgData,\n tryCombineChars\n};\n\n/**\n * Describes spaces between different classes of atoms.\n */\nvar thinspace = {\n number: 3,\n unit: \"mu\"\n};\nvar mediumspace = {\n number: 4,\n unit: \"mu\"\n};\nvar thickspace = {\n number: 5,\n unit: \"mu\"\n}; // Making the type below exact with all optional fields doesn't work due to\n// - https://github.com/facebook/flow/issues/4582\n// - https://github.com/facebook/flow/issues/5688\n// However, since *all* fields are optional, $Shape<> works as suggested in 5688\n// above.\n\n// Spacing relationships for display and text styles\nvar spacings = {\n mord: {\n mop: thinspace,\n mbin: mediumspace,\n mrel: thickspace,\n minner: thinspace\n },\n mop: {\n mord: thinspace,\n mop: thinspace,\n mrel: thickspace,\n minner: thinspace\n },\n mbin: {\n mord: mediumspace,\n mop: mediumspace,\n mopen: mediumspace,\n minner: mediumspace\n },\n mrel: {\n mord: thickspace,\n mop: thickspace,\n mopen: thickspace,\n minner: thickspace\n },\n mopen: {},\n mclose: {\n mop: thinspace,\n mbin: mediumspace,\n mrel: thickspace,\n minner: thinspace\n },\n mpunct: {\n mord: thinspace,\n mop: thinspace,\n mrel: thickspace,\n mopen: thinspace,\n mclose: thinspace,\n mpunct: thinspace,\n minner: thinspace\n },\n minner: {\n mord: thinspace,\n mop: thinspace,\n mbin: mediumspace,\n mrel: thickspace,\n mopen: thinspace,\n mpunct: thinspace,\n minner: thinspace\n }\n}; // Spacing relationships for script and scriptscript styles\n\nvar tightSpacings = {\n mord: {\n mop: thinspace\n },\n mop: {\n mord: thinspace,\n mop: thinspace\n },\n mbin: {},\n mrel: {},\n mopen: {},\n mclose: {\n mop: thinspace\n },\n mpunct: {},\n minner: {\n mop: thinspace\n }\n};\n\n/** Context provided to function handlers for error messages. */\n// Note: reverse the order of the return type union will cause a flow error.\n// See https://github.com/facebook/flow/issues/3663.\n// More general version of `HtmlBuilder` for nodes (e.g. \\sum, accent types)\n// whose presence impacts super/subscripting. In this case, ParseNode<\"supsub\">\n// delegates its HTML building to the HtmlBuilder corresponding to these nodes.\n\n/**\n * Final function spec for use at parse time.\n * This is almost identical to `FunctionPropSpec`, except it\n * 1. includes the function handler, and\n * 2. requires all arguments except argTypes.\n * It is generated by `defineFunction()` below.\n */\n\n/**\n * All registered functions.\n * `functions.js` just exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary.\n */\nvar _functions = {};\n/**\n * All HTML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\n\nvar _htmlGroupBuilders = {};\n/**\n * All MathML builders. Should be only used in the `define*` and the `build*ML`\n * functions.\n */\n\nvar _mathmlGroupBuilders = {};\nfunction defineFunction(_ref) {\n var {\n type,\n names,\n props,\n handler,\n htmlBuilder,\n mathmlBuilder\n } = _ref;\n // Set default values of functions\n var data = {\n type,\n numArgs: props.numArgs,\n argTypes: props.argTypes,\n allowedInArgument: !!props.allowedInArgument,\n allowedInText: !!props.allowedInText,\n allowedInMath: props.allowedInMath === undefined ? true : props.allowedInMath,\n numOptionalArgs: props.numOptionalArgs || 0,\n infix: !!props.infix,\n primitive: !!props.primitive,\n handler: handler\n };\n\n for (var i = 0; i < names.length; ++i) {\n _functions[names[i]] = data;\n }\n\n if (type) {\n if (htmlBuilder) {\n _htmlGroupBuilders[type] = htmlBuilder;\n }\n\n if (mathmlBuilder) {\n _mathmlGroupBuilders[type] = mathmlBuilder;\n }\n }\n}\n/**\n * Use this to register only the HTML and MathML builders for a function (e.g.\n * if the function's ParseNode is generated in Parser.js rather than via a\n * stand-alone handler provided to `defineFunction`).\n */\n\nfunction defineFunctionBuilders(_ref2) {\n var {\n type,\n htmlBuilder,\n mathmlBuilder\n } = _ref2;\n defineFunction({\n type,\n names: [],\n props: {\n numArgs: 0\n },\n\n handler() {\n throw new Error('Should never be called.');\n },\n\n htmlBuilder,\n mathmlBuilder\n });\n}\nvar normalizeArgument = function normalizeArgument(arg) {\n return arg.type === \"ordgroup\" && arg.body.length === 1 ? arg.body[0] : arg;\n}; // Since the corresponding buildHTML/buildMathML function expects a\n// list of elements, we normalize for different kinds of arguments\n\nvar ordargument = function ordargument(arg) {\n return arg.type === \"ordgroup\" ? arg.body : [arg];\n};\n\n/**\n * This file does the main work of building a domTree structure from a parse\n * tree. The entry point is the `buildHTML` function, which takes a parse tree.\n * Then, the buildExpression, buildGroup, and various groupBuilders functions\n * are called, to produce a final HTML tree.\n */\nvar makeSpan$1 = buildCommon.makeSpan; // Binary atoms (first class `mbin`) change into ordinary atoms (`mord`)\n// depending on their surroundings. See TeXbook pg. 442-446, Rules 5 and 6,\n// and the text before Rule 19.\n\nvar binLeftCanceller = [\"leftmost\", \"mbin\", \"mopen\", \"mrel\", \"mop\", \"mpunct\"];\nvar binRightCanceller = [\"rightmost\", \"mrel\", \"mclose\", \"mpunct\"];\nvar styleMap$1 = {\n \"display\": Style$1.DISPLAY,\n \"text\": Style$1.TEXT,\n \"script\": Style$1.SCRIPT,\n \"scriptscript\": Style$1.SCRIPTSCRIPT\n};\nvar DomEnum = {\n mord: \"mord\",\n mop: \"mop\",\n mbin: \"mbin\",\n mrel: \"mrel\",\n mopen: \"mopen\",\n mclose: \"mclose\",\n mpunct: \"mpunct\",\n minner: \"minner\"\n};\n\n/**\n * Take a list of nodes, build them in order, and return a list of the built\n * nodes. documentFragments are flattened into their contents, so the\n * returned list contains no fragments. `isRealGroup` is true if `expression`\n * is a real group (no atoms will be added on either side), as opposed to\n * a partial group (e.g. one created by \\color). `surrounding` is an array\n * consisting type of nodes that will be added to the left and right.\n */\nvar buildExpression$1 = function buildExpression(expression, options, isRealGroup, surrounding) {\n if (surrounding === void 0) {\n surrounding = [null, null];\n }\n\n // Parse expressions into `groups`.\n var groups = [];\n\n for (var i = 0; i < expression.length; i++) {\n var output = buildGroup$1(expression[i], options);\n\n if (output instanceof DocumentFragment) {\n var children = output.children;\n groups.push(...children);\n } else {\n groups.push(output);\n }\n } // Combine consecutive domTree.symbolNodes into a single symbolNode.\n\n\n buildCommon.tryCombineChars(groups); // If `expression` is a partial group, let the parent handle spacings\n // to avoid processing groups multiple times.\n\n if (!isRealGroup) {\n return groups;\n }\n\n var glueOptions = options;\n\n if (expression.length === 1) {\n var node = expression[0];\n\n if (node.type === \"sizing\") {\n glueOptions = options.havingSize(node.size);\n } else if (node.type === \"styling\") {\n glueOptions = options.havingStyle(styleMap$1[node.style]);\n }\n } // Dummy spans for determining spacings between surrounding atoms.\n // If `expression` has no atoms on the left or right, class \"leftmost\"\n // or \"rightmost\", respectively, is used to indicate it.\n\n\n var dummyPrev = makeSpan$1([surrounding[0] || \"leftmost\"], [], options);\n var dummyNext = makeSpan$1([surrounding[1] || \"rightmost\"], [], options); // TODO: These code assumes that a node's math class is the first element\n // of its `classes` array. A later cleanup should ensure this, for\n // instance by changing the signature of `makeSpan`.\n // Before determining what spaces to insert, perform bin cancellation.\n // Binary operators change to ordinary symbols in some contexts.\n\n var isRoot = isRealGroup === \"root\";\n traverseNonSpaceNodes(groups, (node, prev) => {\n var prevType = prev.classes[0];\n var type = node.classes[0];\n\n if (prevType === \"mbin\" && utils.contains(binRightCanceller, type)) {\n prev.classes[0] = \"mord\";\n } else if (type === \"mbin\" && utils.contains(binLeftCanceller, prevType)) {\n node.classes[0] = \"mord\";\n }\n }, {\n node: dummyPrev\n }, dummyNext, isRoot);\n traverseNonSpaceNodes(groups, (node, prev) => {\n var prevType = getTypeOfDomTree(prev);\n var type = getTypeOfDomTree(node); // 'mtight' indicates that the node is script or scriptscript style.\n\n var space = prevType && type ? node.hasClass(\"mtight\") ? tightSpacings[prevType][type] : spacings[prevType][type] : null;\n\n if (space) {\n // Insert glue (spacing) after the `prev`.\n return buildCommon.makeGlue(space, glueOptions);\n }\n }, {\n node: dummyPrev\n }, dummyNext, isRoot);\n return groups;\n}; // Depth-first traverse non-space `nodes`, calling `callback` with the current and\n// previous node as arguments, optionally returning a node to insert after the\n// previous node. `prev` is an object with the previous node and `insertAfter`\n// function to insert after it. `next` is a node that will be added to the right.\n// Used for bin cancellation and inserting spacings.\n\nvar traverseNonSpaceNodes = function traverseNonSpaceNodes(nodes, callback, prev, next, isRoot) {\n if (next) {\n // temporarily append the right node, if exists\n nodes.push(next);\n }\n\n var i = 0;\n\n for (; i < nodes.length; i++) {\n var node = nodes[i];\n var partialGroup = checkPartialGroup(node);\n\n if (partialGroup) {\n // Recursive DFS\n // $FlowFixMe: make nodes a $ReadOnlyArray by returning a new array\n traverseNonSpaceNodes(partialGroup.children, callback, prev, null, isRoot);\n continue;\n } // Ignore explicit spaces (e.g., \\;, \\,) when determining what implicit\n // spacing should go between atoms of different classes\n\n\n var nonspace = !node.hasClass(\"mspace\");\n\n if (nonspace) {\n var result = callback(node, prev.node);\n\n if (result) {\n if (prev.insertAfter) {\n prev.insertAfter(result);\n } else {\n // insert at front\n nodes.unshift(result);\n i++;\n }\n }\n }\n\n if (nonspace) {\n prev.node = node;\n } else if (isRoot && node.hasClass(\"newline\")) {\n prev.node = makeSpan$1([\"leftmost\"]); // treat like beginning of line\n }\n\n prev.insertAfter = (index => n => {\n nodes.splice(index + 1, 0, n);\n i++;\n })(i);\n }\n\n if (next) {\n nodes.pop();\n }\n}; // Check if given node is a partial group, i.e., does not affect spacing around.\n\n\nvar checkPartialGroup = function checkPartialGroup(node) {\n if (node instanceof DocumentFragment || node instanceof Anchor || node instanceof Span && node.hasClass(\"enclosing\")) {\n return node;\n }\n\n return null;\n}; // Return the outermost node of a domTree.\n\n\nvar getOutermostNode = function getOutermostNode(node, side) {\n var partialGroup = checkPartialGroup(node);\n\n if (partialGroup) {\n var children = partialGroup.children;\n\n if (children.length) {\n if (side === \"right\") {\n return getOutermostNode(children[children.length - 1], \"right\");\n } else if (side === \"left\") {\n return getOutermostNode(children[0], \"left\");\n }\n }\n }\n\n return node;\n}; // Return math atom class (mclass) of a domTree.\n// If `side` is given, it will get the type of the outermost node at given side.\n\n\nvar getTypeOfDomTree = function getTypeOfDomTree(node, side) {\n if (!node) {\n return null;\n }\n\n if (side) {\n node = getOutermostNode(node, side);\n } // This makes a lot of assumptions as to where the type of atom\n // appears. We should do a better job of enforcing this.\n\n\n return DomEnum[node.classes[0]] || null;\n};\nvar makeNullDelimiter = function makeNullDelimiter(options, classes) {\n var moreClasses = [\"nulldelimiter\"].concat(options.baseSizingClasses());\n return makeSpan$1(classes.concat(moreClasses));\n};\n/**\n * buildGroup is the function that takes a group and calls the correct groupType\n * function for it. It also handles the interaction of size and style changes\n * between parents and children.\n */\n\nvar buildGroup$1 = function buildGroup(group, options, baseOptions) {\n if (!group) {\n return makeSpan$1();\n }\n\n if (_htmlGroupBuilders[group.type]) {\n // Call the groupBuilders function\n // $FlowFixMe\n var groupNode = _htmlGroupBuilders[group.type](group, options); // If the size changed between the parent and the current group, account\n // for that size difference.\n\n if (baseOptions && options.size !== baseOptions.size) {\n groupNode = makeSpan$1(options.sizingClasses(baseOptions), [groupNode], options);\n var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier;\n groupNode.height *= multiplier;\n groupNode.depth *= multiplier;\n }\n\n return groupNode;\n } else {\n throw new ParseError(\"Got group of unknown type: '\" + group.type + \"'\");\n }\n};\n/**\n * Combine an array of HTML DOM nodes (e.g., the output of `buildExpression`)\n * into an unbreakable HTML node of class .base, with proper struts to\n * guarantee correct vertical extent. `buildHTML` calls this repeatedly to\n * make up the entire expression as a sequence of unbreakable units.\n */\n\nfunction buildHTMLUnbreakable(children, options) {\n // Compute height and depth of this chunk.\n var body = makeSpan$1([\"base\"], children, options); // Add strut, which ensures that the top of the HTML element falls at\n // the height of the expression, and the bottom of the HTML element\n // falls at the depth of the expression.\n\n var strut = makeSpan$1([\"strut\"]);\n strut.style.height = makeEm(body.height + body.depth);\n\n if (body.depth) {\n strut.style.verticalAlign = makeEm(-body.depth);\n }\n\n body.children.unshift(strut);\n return body;\n}\n/**\n * Take an entire parse tree, and build it into an appropriate set of HTML\n * nodes.\n */\n\n\nfunction buildHTML(tree, options) {\n // Strip off outer tag wrapper for processing below.\n var tag = null;\n\n if (tree.length === 1 && tree[0].type === \"tag\") {\n tag = tree[0].tag;\n tree = tree[0].body;\n } // Build the expression contained in the tree\n\n\n var expression = buildExpression$1(tree, options, \"root\");\n var eqnNum;\n\n if (expression.length === 2 && expression[1].hasClass(\"tag\")) {\n // An environment with automatic equation numbers, e.g. {gather}.\n eqnNum = expression.pop();\n }\n\n var children = []; // Create one base node for each chunk between potential line breaks.\n // The TeXBook [p.173] says \"A formula will be broken only after a\n // relation symbol like $=$ or $<$ or $\\rightarrow$, or after a binary\n // operation symbol like $+$ or $-$ or $\\times$, where the relation or\n // binary operation is on the ``outer level'' of the formula (i.e., not\n // enclosed in {...} and not part of an \\over construction).\"\n\n var parts = [];\n\n for (var i = 0; i < expression.length; i++) {\n parts.push(expression[i]);\n\n if (expression[i].hasClass(\"mbin\") || expression[i].hasClass(\"mrel\") || expression[i].hasClass(\"allowbreak\")) {\n // Put any post-operator glue on same line as operator.\n // Watch for \\nobreak along the way, and stop at \\newline.\n var nobreak = false;\n\n while (i < expression.length - 1 && expression[i + 1].hasClass(\"mspace\") && !expression[i + 1].hasClass(\"newline\")) {\n i++;\n parts.push(expression[i]);\n\n if (expression[i].hasClass(\"nobreak\")) {\n nobreak = true;\n }\n } // Don't allow break if \\nobreak among the post-operator glue.\n\n\n if (!nobreak) {\n children.push(buildHTMLUnbreakable(parts, options));\n parts = [];\n }\n } else if (expression[i].hasClass(\"newline\")) {\n // Write the line except the newline\n parts.pop();\n\n if (parts.length > 0) {\n children.push(buildHTMLUnbreakable(parts, options));\n parts = [];\n } // Put the newline at the top level\n\n\n children.push(expression[i]);\n }\n }\n\n if (parts.length > 0) {\n children.push(buildHTMLUnbreakable(parts, options));\n } // Now, if there was a tag, build it too and append it as a final child.\n\n\n var tagChild;\n\n if (tag) {\n tagChild = buildHTMLUnbreakable(buildExpression$1(tag, options, true));\n tagChild.classes = [\"tag\"];\n children.push(tagChild);\n } else if (eqnNum) {\n children.push(eqnNum);\n }\n\n var htmlNode = makeSpan$1([\"katex-html\"], children);\n htmlNode.setAttribute(\"aria-hidden\", \"true\"); // Adjust the strut of the tag to be the maximum height of all children\n // (the height of the enclosing htmlNode) for proper vertical alignment.\n\n if (tagChild) {\n var strut = tagChild.children[0];\n strut.style.height = makeEm(htmlNode.height + htmlNode.depth);\n\n if (htmlNode.depth) {\n strut.style.verticalAlign = makeEm(-htmlNode.depth);\n }\n }\n\n return htmlNode;\n}\n\n/**\n * These objects store data about MathML nodes. This is the MathML equivalent\n * of the types in domTree.js. Since MathML handles its own rendering, and\n * since we're mainly using MathML to improve accessibility, we don't manage\n * any of the styling state that the plain DOM nodes do.\n *\n * The `toNode` and `toMarkup` functions work similarly to how they do in\n * domTree.js, creating namespaced DOM nodes and HTML text markup respectively.\n */\nfunction newDocumentFragment(children) {\n return new DocumentFragment(children);\n}\n/**\n * This node represents a general purpose MathML node of any type. The\n * constructor requires the type of node to create (for example, `\"mo\"` or\n * `\"mspace\"`, corresponding to `` and `` tags).\n */\n\nclass MathNode {\n constructor(type, children, classes) {\n this.type = void 0;\n this.attributes = void 0;\n this.children = void 0;\n this.classes = void 0;\n this.type = type;\n this.attributes = {};\n this.children = children || [];\n this.classes = classes || [];\n }\n /**\n * Sets an attribute on a MathML node. MathML depends on attributes to convey a\n * semantic content, so this is used heavily.\n */\n\n\n setAttribute(name, value) {\n this.attributes[name] = value;\n }\n /**\n * Gets an attribute on a MathML node.\n */\n\n\n getAttribute(name) {\n return this.attributes[name];\n }\n /**\n * Converts the math node into a MathML-namespaced DOM element.\n */\n\n\n toNode() {\n var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", this.type);\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n node.setAttribute(attr, this.attributes[attr]);\n }\n }\n\n if (this.classes.length > 0) {\n node.className = createClass(this.classes);\n }\n\n for (var i = 0; i < this.children.length; i++) {\n node.appendChild(this.children[i].toNode());\n }\n\n return node;\n }\n /**\n * Converts the math node into an HTML markup string.\n */\n\n\n toMarkup() {\n var markup = \"<\" + this.type; // Add the attributes\n\n for (var attr in this.attributes) {\n if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {\n markup += \" \" + attr + \"=\\\"\";\n markup += utils.escape(this.attributes[attr]);\n markup += \"\\\"\";\n }\n }\n\n if (this.classes.length > 0) {\n markup += \" class =\\\"\" + utils.escape(createClass(this.classes)) + \"\\\"\";\n }\n\n markup += \">\";\n\n for (var i = 0; i < this.children.length; i++) {\n markup += this.children[i].toMarkup();\n }\n\n markup += \"\";\n return markup;\n }\n /**\n * Converts the math node into a string, similar to innerText, but escaped.\n */\n\n\n toText() {\n return this.children.map(child => child.toText()).join(\"\");\n }\n\n}\n/**\n * This node represents a piece of text.\n */\n\nclass TextNode {\n constructor(text) {\n this.text = void 0;\n this.text = text;\n }\n /**\n * Converts the text node into a DOM text node.\n */\n\n\n toNode() {\n return document.createTextNode(this.text);\n }\n /**\n * Converts the text node into escaped HTML markup\n * (representing the text itself).\n */\n\n\n toMarkup() {\n return utils.escape(this.toText());\n }\n /**\n * Converts the text node into a string\n * (representing the text itself).\n */\n\n\n toText() {\n return this.text;\n }\n\n}\n/**\n * This node represents a space, but may render as or as text,\n * depending on the width.\n */\n\nclass SpaceNode {\n /**\n * Create a Space node with width given in CSS ems.\n */\n constructor(width) {\n this.width = void 0;\n this.character = void 0;\n this.width = width; // See https://www.w3.org/TR/2000/WD-MathML2-20000328/chapter6.html\n // for a table of space-like characters. We use Unicode\n // representations instead of &LongNames; as it's not clear how to\n // make the latter via document.createTextNode.\n\n if (width >= 0.05555 && width <= 0.05556) {\n this.character = \"\\u200a\"; //  \n } else if (width >= 0.1666 && width <= 0.1667) {\n this.character = \"\\u2009\"; //  \n } else if (width >= 0.2222 && width <= 0.2223) {\n this.character = \"\\u2005\"; //  \n } else if (width >= 0.2777 && width <= 0.2778) {\n this.character = \"\\u2005\\u200a\"; //   \n } else if (width >= -0.05556 && width <= -0.05555) {\n this.character = \"\\u200a\\u2063\"; // ​\n } else if (width >= -0.1667 && width <= -0.1666) {\n this.character = \"\\u2009\\u2063\"; // ​\n } else if (width >= -0.2223 && width <= -0.2222) {\n this.character = \"\\u205f\\u2063\"; // ​\n } else if (width >= -0.2778 && width <= -0.2777) {\n this.character = \"\\u2005\\u2063\"; // ​\n } else {\n this.character = null;\n }\n }\n /**\n * Converts the math node into a MathML-namespaced DOM element.\n */\n\n\n toNode() {\n if (this.character) {\n return document.createTextNode(this.character);\n } else {\n var node = document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", \"mspace\");\n node.setAttribute(\"width\", makeEm(this.width));\n return node;\n }\n }\n /**\n * Converts the math node into an HTML markup string.\n */\n\n\n toMarkup() {\n if (this.character) {\n return \"\" + this.character + \"\";\n } else {\n return \"\";\n }\n }\n /**\n * Converts the math node into a string, similar to innerText.\n */\n\n\n toText() {\n if (this.character) {\n return this.character;\n } else {\n return \" \";\n }\n }\n\n}\n\nvar mathMLTree = {\n MathNode,\n TextNode,\n SpaceNode,\n newDocumentFragment\n};\n\n/**\n * This file converts a parse tree into a corresponding MathML tree. The main\n * entry point is the `buildMathML` function, which takes a parse tree from the\n * parser.\n */\n\n/**\n * Takes a symbol and converts it into a MathML text node after performing\n * optional replacement from symbols.js.\n */\nvar makeText = function makeText(text, mode, options) {\n if (symbols[mode][text] && symbols[mode][text].replace && text.charCodeAt(0) !== 0xD835 && !(ligatures.hasOwnProperty(text) && options && (options.fontFamily && options.fontFamily.slice(4, 6) === \"tt\" || options.font && options.font.slice(4, 6) === \"tt\"))) {\n text = symbols[mode][text].replace;\n }\n\n return new mathMLTree.TextNode(text);\n};\n/**\n * Wrap the given array of nodes in an node if needed, i.e.,\n * unless the array has length 1. Always returns a single node.\n */\n\nvar makeRow = function makeRow(body) {\n if (body.length === 1) {\n return body[0];\n } else {\n return new mathMLTree.MathNode(\"mrow\", body);\n }\n};\n/**\n * Returns the math variant as a string or null if none is required.\n */\n\nvar getVariant = function getVariant(group, options) {\n // Handle \\text... font specifiers as best we can.\n // MathML has a limited list of allowable mathvariant specifiers; see\n // https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt\n if (options.fontFamily === \"texttt\") {\n return \"monospace\";\n } else if (options.fontFamily === \"textsf\") {\n if (options.fontShape === \"textit\" && options.fontWeight === \"textbf\") {\n return \"sans-serif-bold-italic\";\n } else if (options.fontShape === \"textit\") {\n return \"sans-serif-italic\";\n } else if (options.fontWeight === \"textbf\") {\n return \"bold-sans-serif\";\n } else {\n return \"sans-serif\";\n }\n } else if (options.fontShape === \"textit\" && options.fontWeight === \"textbf\") {\n return \"bold-italic\";\n } else if (options.fontShape === \"textit\") {\n return \"italic\";\n } else if (options.fontWeight === \"textbf\") {\n return \"bold\";\n }\n\n var font = options.font;\n\n if (!font || font === \"mathnormal\") {\n return null;\n }\n\n var mode = group.mode;\n\n if (font === \"mathit\") {\n return \"italic\";\n } else if (font === \"boldsymbol\") {\n return group.type === \"textord\" ? \"bold\" : \"bold-italic\";\n } else if (font === \"mathbf\") {\n return \"bold\";\n } else if (font === \"mathbb\") {\n return \"double-struck\";\n } else if (font === \"mathfrak\") {\n return \"fraktur\";\n } else if (font === \"mathscr\" || font === \"mathcal\") {\n // MathML makes no distinction between script and calligraphic\n return \"script\";\n } else if (font === \"mathsf\") {\n return \"sans-serif\";\n } else if (font === \"mathtt\") {\n return \"monospace\";\n }\n\n var text = group.text;\n\n if (utils.contains([\"\\\\imath\", \"\\\\jmath\"], text)) {\n return null;\n }\n\n if (symbols[mode][text] && symbols[mode][text].replace) {\n text = symbols[mode][text].replace;\n }\n\n var fontName = buildCommon.fontMap[font].fontName;\n\n if (getCharacterMetrics(text, fontName, mode)) {\n return buildCommon.fontMap[font].variant;\n }\n\n return null;\n};\n/**\n * Takes a list of nodes, builds them, and returns a list of the generated\n * MathML nodes. Also combine consecutive outputs into a single\n * tag.\n */\n\nvar buildExpression = function buildExpression(expression, options, isOrdgroup) {\n if (expression.length === 1) {\n var group = buildGroup(expression[0], options);\n\n if (isOrdgroup && group instanceof MathNode && group.type === \"mo\") {\n // When TeX writers want to suppress spacing on an operator,\n // they often put the operator by itself inside braces.\n group.setAttribute(\"lspace\", \"0em\");\n group.setAttribute(\"rspace\", \"0em\");\n }\n\n return [group];\n }\n\n var groups = [];\n var lastGroup;\n\n for (var i = 0; i < expression.length; i++) {\n var _group = buildGroup(expression[i], options);\n\n if (_group instanceof MathNode && lastGroup instanceof MathNode) {\n // Concatenate adjacent s\n if (_group.type === 'mtext' && lastGroup.type === 'mtext' && _group.getAttribute('mathvariant') === lastGroup.getAttribute('mathvariant')) {\n lastGroup.children.push(..._group.children);\n continue; // Concatenate adjacent s\n } else if (_group.type === 'mn' && lastGroup.type === 'mn') {\n lastGroup.children.push(..._group.children);\n continue; // Concatenate ... followed by .\n } else if (_group.type === 'mi' && _group.children.length === 1 && lastGroup.type === 'mn') {\n var child = _group.children[0];\n\n if (child instanceof TextNode && child.text === '.') {\n lastGroup.children.push(..._group.children);\n continue;\n }\n } else if (lastGroup.type === 'mi' && lastGroup.children.length === 1) {\n var lastChild = lastGroup.children[0];\n\n if (lastChild instanceof TextNode && lastChild.text === '\\u0338' && (_group.type === 'mo' || _group.type === 'mi' || _group.type === 'mn')) {\n var _child = _group.children[0];\n\n if (_child instanceof TextNode && _child.text.length > 0) {\n // Overlay with combining character long solidus\n _child.text = _child.text.slice(0, 1) + \"\\u0338\" + _child.text.slice(1);\n groups.pop();\n }\n }\n }\n }\n\n groups.push(_group);\n lastGroup = _group;\n }\n\n return groups;\n};\n/**\n * Equivalent to buildExpression, but wraps the elements in an \n * if there's more than one. Returns a single node instead of an array.\n */\n\nvar buildExpressionRow = function buildExpressionRow(expression, options, isOrdgroup) {\n return makeRow(buildExpression(expression, options, isOrdgroup));\n};\n/**\n * Takes a group from the parser and calls the appropriate groupBuilders function\n * on it to produce a MathML node.\n */\n\nvar buildGroup = function buildGroup(group, options) {\n if (!group) {\n return new mathMLTree.MathNode(\"mrow\");\n }\n\n if (_mathmlGroupBuilders[group.type]) {\n // Call the groupBuilders function\n // $FlowFixMe\n var result = _mathmlGroupBuilders[group.type](group, options); // $FlowFixMe\n\n return result;\n } else {\n throw new ParseError(\"Got group of unknown type: '\" + group.type + \"'\");\n }\n};\n/**\n * Takes a full parse tree and settings and builds a MathML representation of\n * it. In particular, we put the elements from building the parse tree into a\n * tag so we can also include that TeX source as an annotation.\n *\n * Note that we actually return a domTree element with a `` inside it so\n * we can do appropriate styling.\n */\n\nfunction buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) {\n var expression = buildExpression(tree, options); // TODO: Make a pass thru the MathML similar to buildHTML.traverseNonSpaceNodes\n // and add spacing nodes. This is necessary only adjacent to math operators\n // like \\sin or \\lim or to subsup elements that contain math operators.\n // MathML takes care of the other spacing issues.\n // Wrap up the expression in an mrow so it is presented in the semantics\n // tag correctly, unless it's a single or .\n\n var wrapper;\n\n if (expression.length === 1 && expression[0] instanceof MathNode && utils.contains([\"mrow\", \"mtable\"], expression[0].type)) {\n wrapper = expression[0];\n } else {\n wrapper = new mathMLTree.MathNode(\"mrow\", expression);\n } // Build a TeX annotation of the source\n\n\n var annotation = new mathMLTree.MathNode(\"annotation\", [new mathMLTree.TextNode(texExpression)]);\n annotation.setAttribute(\"encoding\", \"application/x-tex\");\n var semantics = new mathMLTree.MathNode(\"semantics\", [wrapper, annotation]);\n var math = new mathMLTree.MathNode(\"math\", [semantics]);\n math.setAttribute(\"xmlns\", \"http://www.w3.org/1998/Math/MathML\");\n\n if (isDisplayMode) {\n math.setAttribute(\"display\", \"block\");\n } // You can't style nodes, so we wrap the node in a span.\n // NOTE: The span class is not typed to have nodes as children, and\n // we don't want to make the children type more generic since the children\n // of span are expected to have more fields in `buildHtml` contexts.\n\n\n var wrapperClass = forMathmlOnly ? \"katex\" : \"katex-mathml\"; // $FlowFixMe\n\n return buildCommon.makeSpan([wrapperClass], [math]);\n}\n\nvar optionsFromSettings = function optionsFromSettings(settings) {\n return new Options({\n style: settings.displayMode ? Style$1.DISPLAY : Style$1.TEXT,\n maxSize: settings.maxSize,\n minRuleThickness: settings.minRuleThickness\n });\n};\n\nvar displayWrap = function displayWrap(node, settings) {\n if (settings.displayMode) {\n var classes = [\"katex-display\"];\n\n if (settings.leqno) {\n classes.push(\"leqno\");\n }\n\n if (settings.fleqn) {\n classes.push(\"fleqn\");\n }\n\n node = buildCommon.makeSpan(classes, [node]);\n }\n\n return node;\n};\n\nvar buildTree = function buildTree(tree, expression, settings) {\n var options = optionsFromSettings(settings);\n var katexNode;\n\n if (settings.output === \"mathml\") {\n return buildMathML(tree, expression, options, settings.displayMode, true);\n } else if (settings.output === \"html\") {\n var htmlNode = buildHTML(tree, options);\n katexNode = buildCommon.makeSpan([\"katex\"], [htmlNode]);\n } else {\n var mathMLNode = buildMathML(tree, expression, options, settings.displayMode, false);\n\n var _htmlNode = buildHTML(tree, options);\n\n katexNode = buildCommon.makeSpan([\"katex\"], [mathMLNode, _htmlNode]);\n }\n\n return displayWrap(katexNode, settings);\n};\nvar buildHTMLTree = function buildHTMLTree(tree, expression, settings) {\n var options = optionsFromSettings(settings);\n var htmlNode = buildHTML(tree, options);\n var katexNode = buildCommon.makeSpan([\"katex\"], [htmlNode]);\n return displayWrap(katexNode, settings);\n};\n\n/**\n * This file provides support to buildMathML.js and buildHTML.js\n * for stretchy wide elements rendered from SVG files\n * and other CSS trickery.\n */\nvar stretchyCodePoint = {\n widehat: \"^\",\n widecheck: \"\u02C7\",\n widetilde: \"~\",\n utilde: \"~\",\n overleftarrow: \"\\u2190\",\n underleftarrow: \"\\u2190\",\n xleftarrow: \"\\u2190\",\n overrightarrow: \"\\u2192\",\n underrightarrow: \"\\u2192\",\n xrightarrow: \"\\u2192\",\n underbrace: \"\\u23df\",\n overbrace: \"\\u23de\",\n overgroup: \"\\u23e0\",\n undergroup: \"\\u23e1\",\n overleftrightarrow: \"\\u2194\",\n underleftrightarrow: \"\\u2194\",\n xleftrightarrow: \"\\u2194\",\n Overrightarrow: \"\\u21d2\",\n xRightarrow: \"\\u21d2\",\n overleftharpoon: \"\\u21bc\",\n xleftharpoonup: \"\\u21bc\",\n overrightharpoon: \"\\u21c0\",\n xrightharpoonup: \"\\u21c0\",\n xLeftarrow: \"\\u21d0\",\n xLeftrightarrow: \"\\u21d4\",\n xhookleftarrow: \"\\u21a9\",\n xhookrightarrow: \"\\u21aa\",\n xmapsto: \"\\u21a6\",\n xrightharpoondown: \"\\u21c1\",\n xleftharpoondown: \"\\u21bd\",\n xrightleftharpoons: \"\\u21cc\",\n xleftrightharpoons: \"\\u21cb\",\n xtwoheadleftarrow: \"\\u219e\",\n xtwoheadrightarrow: \"\\u21a0\",\n xlongequal: \"=\",\n xtofrom: \"\\u21c4\",\n xrightleftarrows: \"\\u21c4\",\n xrightequilibrium: \"\\u21cc\",\n // Not a perfect match.\n xleftequilibrium: \"\\u21cb\",\n // None better available.\n \"\\\\cdrightarrow\": \"\\u2192\",\n \"\\\\cdleftarrow\": \"\\u2190\",\n \"\\\\cdlongequal\": \"=\"\n};\n\nvar mathMLnode = function mathMLnode(label) {\n var node = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(stretchyCodePoint[label.replace(/^\\\\/, '')])]);\n node.setAttribute(\"stretchy\", \"true\");\n return node;\n}; // Many of the KaTeX SVG images have been adapted from glyphs in KaTeX fonts.\n// Copyright (c) 2009-2010, Design Science, Inc. ()\n// Copyright (c) 2014-2017 Khan Academy ()\n// Licensed under the SIL Open Font License, Version 1.1.\n// See \\nhttp://scripts.sil.org/OFL\n// Very Long SVGs\n// Many of the KaTeX stretchy wide elements use a long SVG image and an\n// overflow: hidden tactic to achieve a stretchy image while avoiding\n// distortion of arrowheads or brace corners.\n// The SVG typically contains a very long (400 em) arrow.\n// The SVG is in a container span that has overflow: hidden, so the span\n// acts like a window that exposes only part of the SVG.\n// The SVG always has a longer, thinner aspect ratio than the container span.\n// After the SVG fills 100% of the height of the container span,\n// there is a long arrow shaft left over. That left-over shaft is not shown.\n// Instead, it is sliced off because the span's CSS has overflow: hidden.\n// Thus, the reader sees an arrow that matches the subject matter width\n// without distortion.\n// Some functions, such as \\cancel, need to vary their aspect ratio. These\n// functions do not get the overflow SVG treatment.\n// Second Brush Stroke\n// Low resolution monitors struggle to display images in fine detail.\n// So browsers apply anti-aliasing. A long straight arrow shaft therefore\n// will sometimes appear as if it has a blurred edge.\n// To mitigate this, these SVG files contain a second \"brush-stroke\" on the\n// arrow shafts. That is, a second long thin rectangular SVG path has been\n// written directly on top of each arrow shaft. This reinforcement causes\n// some of the screen pixels to display as black instead of the anti-aliased\n// gray pixel that a single path would generate. So we get arrow shafts\n// whose edges appear to be sharper.\n// In the katexImagesData object just below, the dimensions all\n// correspond to path geometry inside the relevant SVG.\n// For example, \\overrightarrow uses the same arrowhead as glyph U+2192\n// from the KaTeX Main font. The scaling factor is 1000.\n// That is, inside the font, that arrowhead is 522 units tall, which\n// corresponds to 0.522 em inside the document.\n\n\nvar katexImagesData = {\n // path(s), minWidth, height, align\n overrightarrow: [[\"rightarrow\"], 0.888, 522, \"xMaxYMin\"],\n overleftarrow: [[\"leftarrow\"], 0.888, 522, \"xMinYMin\"],\n underrightarrow: [[\"rightarrow\"], 0.888, 522, \"xMaxYMin\"],\n underleftarrow: [[\"leftarrow\"], 0.888, 522, \"xMinYMin\"],\n xrightarrow: [[\"rightarrow\"], 1.469, 522, \"xMaxYMin\"],\n \"\\\\cdrightarrow\": [[\"rightarrow\"], 3.0, 522, \"xMaxYMin\"],\n // CD minwwidth2.5pc\n xleftarrow: [[\"leftarrow\"], 1.469, 522, \"xMinYMin\"],\n \"\\\\cdleftarrow\": [[\"leftarrow\"], 3.0, 522, \"xMinYMin\"],\n Overrightarrow: [[\"doublerightarrow\"], 0.888, 560, \"xMaxYMin\"],\n xRightarrow: [[\"doublerightarrow\"], 1.526, 560, \"xMaxYMin\"],\n xLeftarrow: [[\"doubleleftarrow\"], 1.526, 560, \"xMinYMin\"],\n overleftharpoon: [[\"leftharpoon\"], 0.888, 522, \"xMinYMin\"],\n xleftharpoonup: [[\"leftharpoon\"], 0.888, 522, \"xMinYMin\"],\n xleftharpoondown: [[\"leftharpoondown\"], 0.888, 522, \"xMinYMin\"],\n overrightharpoon: [[\"rightharpoon\"], 0.888, 522, \"xMaxYMin\"],\n xrightharpoonup: [[\"rightharpoon\"], 0.888, 522, \"xMaxYMin\"],\n xrightharpoondown: [[\"rightharpoondown\"], 0.888, 522, \"xMaxYMin\"],\n xlongequal: [[\"longequal\"], 0.888, 334, \"xMinYMin\"],\n \"\\\\cdlongequal\": [[\"longequal\"], 3.0, 334, \"xMinYMin\"],\n xtwoheadleftarrow: [[\"twoheadleftarrow\"], 0.888, 334, \"xMinYMin\"],\n xtwoheadrightarrow: [[\"twoheadrightarrow\"], 0.888, 334, \"xMaxYMin\"],\n overleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 0.888, 522],\n overbrace: [[\"leftbrace\", \"midbrace\", \"rightbrace\"], 1.6, 548],\n underbrace: [[\"leftbraceunder\", \"midbraceunder\", \"rightbraceunder\"], 1.6, 548],\n underleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 0.888, 522],\n xleftrightarrow: [[\"leftarrow\", \"rightarrow\"], 1.75, 522],\n xLeftrightarrow: [[\"doubleleftarrow\", \"doublerightarrow\"], 1.75, 560],\n xrightleftharpoons: [[\"leftharpoondownplus\", \"rightharpoonplus\"], 1.75, 716],\n xleftrightharpoons: [[\"leftharpoonplus\", \"rightharpoondownplus\"], 1.75, 716],\n xhookleftarrow: [[\"leftarrow\", \"righthook\"], 1.08, 522],\n xhookrightarrow: [[\"lefthook\", \"rightarrow\"], 1.08, 522],\n overlinesegment: [[\"leftlinesegment\", \"rightlinesegment\"], 0.888, 522],\n underlinesegment: [[\"leftlinesegment\", \"rightlinesegment\"], 0.888, 522],\n overgroup: [[\"leftgroup\", \"rightgroup\"], 0.888, 342],\n undergroup: [[\"leftgroupunder\", \"rightgroupunder\"], 0.888, 342],\n xmapsto: [[\"leftmapsto\", \"rightarrow\"], 1.5, 522],\n xtofrom: [[\"leftToFrom\", \"rightToFrom\"], 1.75, 528],\n // The next three arrows are from the mhchem package.\n // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the\n // document as \\xrightarrow or \\xrightleftharpoons. Those have\n // min-length = 1.75em, so we set min-length on these next three to match.\n xrightleftarrows: [[\"baraboveleftarrow\", \"rightarrowabovebar\"], 1.75, 901],\n xrightequilibrium: [[\"baraboveshortleftharpoon\", \"rightharpoonaboveshortbar\"], 1.75, 716],\n xleftequilibrium: [[\"shortbaraboveleftharpoon\", \"shortrightharpoonabovebar\"], 1.75, 716]\n};\n\nvar groupLength = function groupLength(arg) {\n if (arg.type === \"ordgroup\") {\n return arg.body.length;\n } else {\n return 1;\n }\n};\n\nvar svgSpan = function svgSpan(group, options) {\n // Create a span with inline SVG for the element.\n function buildSvgSpan_() {\n var viewBoxWidth = 400000; // default\n\n var label = group.label.slice(1);\n\n if (utils.contains([\"widehat\", \"widecheck\", \"widetilde\", \"utilde\"], label)) {\n // Each type in the `if` statement corresponds to one of the ParseNode\n // types below. This narrowing is required to access `grp.base`.\n // $FlowFixMe\n var grp = group; // There are four SVG images available for each function.\n // Choose a taller image when there are more characters.\n\n var numChars = groupLength(grp.base);\n var viewBoxHeight;\n var pathName;\n\n var _height;\n\n if (numChars > 5) {\n if (label === \"widehat\" || label === \"widecheck\") {\n viewBoxHeight = 420;\n viewBoxWidth = 2364;\n _height = 0.42;\n pathName = label + \"4\";\n } else {\n viewBoxHeight = 312;\n viewBoxWidth = 2340;\n _height = 0.34;\n pathName = \"tilde4\";\n }\n } else {\n var imgIndex = [1, 1, 2, 2, 3, 3][numChars];\n\n if (label === \"widehat\" || label === \"widecheck\") {\n viewBoxWidth = [0, 1062, 2364, 2364, 2364][imgIndex];\n viewBoxHeight = [0, 239, 300, 360, 420][imgIndex];\n _height = [0, 0.24, 0.3, 0.3, 0.36, 0.42][imgIndex];\n pathName = label + imgIndex;\n } else {\n viewBoxWidth = [0, 600, 1033, 2339, 2340][imgIndex];\n viewBoxHeight = [0, 260, 286, 306, 312][imgIndex];\n _height = [0, 0.26, 0.286, 0.3, 0.306, 0.34][imgIndex];\n pathName = \"tilde\" + imgIndex;\n }\n }\n\n var path = new PathNode(pathName);\n var svgNode = new SvgNode([path], {\n \"width\": \"100%\",\n \"height\": makeEm(_height),\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + viewBoxHeight,\n \"preserveAspectRatio\": \"none\"\n });\n return {\n span: buildCommon.makeSvgSpan([], [svgNode], options),\n minWidth: 0,\n height: _height\n };\n } else {\n var spans = [];\n var data = katexImagesData[label];\n var [paths, _minWidth, _viewBoxHeight] = data;\n\n var _height2 = _viewBoxHeight / 1000;\n\n var numSvgChildren = paths.length;\n var widthClasses;\n var aligns;\n\n if (numSvgChildren === 1) {\n // $FlowFixMe: All these cases must be of the 4-tuple type.\n var align1 = data[3];\n widthClasses = [\"hide-tail\"];\n aligns = [align1];\n } else if (numSvgChildren === 2) {\n widthClasses = [\"halfarrow-left\", \"halfarrow-right\"];\n aligns = [\"xMinYMin\", \"xMaxYMin\"];\n } else if (numSvgChildren === 3) {\n widthClasses = [\"brace-left\", \"brace-center\", \"brace-right\"];\n aligns = [\"xMinYMin\", \"xMidYMin\", \"xMaxYMin\"];\n } else {\n throw new Error(\"Correct katexImagesData or update code here to support\\n \" + numSvgChildren + \" children.\");\n }\n\n for (var i = 0; i < numSvgChildren; i++) {\n var _path = new PathNode(paths[i]);\n\n var _svgNode = new SvgNode([_path], {\n \"width\": \"400em\",\n \"height\": makeEm(_height2),\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + _viewBoxHeight,\n \"preserveAspectRatio\": aligns[i] + \" slice\"\n });\n\n var _span = buildCommon.makeSvgSpan([widthClasses[i]], [_svgNode], options);\n\n if (numSvgChildren === 1) {\n return {\n span: _span,\n minWidth: _minWidth,\n height: _height2\n };\n } else {\n _span.style.height = makeEm(_height2);\n spans.push(_span);\n }\n }\n\n return {\n span: buildCommon.makeSpan([\"stretchy\"], spans, options),\n minWidth: _minWidth,\n height: _height2\n };\n }\n } // buildSvgSpan_()\n\n\n var {\n span,\n minWidth,\n height\n } = buildSvgSpan_(); // Note that we are returning span.depth = 0.\n // Any adjustments relative to the baseline must be done in buildHTML.\n\n span.height = height;\n span.style.height = makeEm(height);\n\n if (minWidth > 0) {\n span.style.minWidth = makeEm(minWidth);\n }\n\n return span;\n};\n\nvar encloseSpan = function encloseSpan(inner, label, topPad, bottomPad, options) {\n // Return an image span for \\cancel, \\bcancel, \\xcancel, \\fbox, or \\angl\n var img;\n var totalHeight = inner.height + inner.depth + topPad + bottomPad;\n\n if (/fbox|color|angl/.test(label)) {\n img = buildCommon.makeSpan([\"stretchy\", label], [], options);\n\n if (label === \"fbox\") {\n var color = options.color && options.getColor();\n\n if (color) {\n img.style.borderColor = color;\n }\n }\n } else {\n // \\cancel, \\bcancel, or \\xcancel\n // Since \\cancel's SVG is inline and it omits the viewBox attribute,\n // its stroke-width will not vary with span area.\n var lines = [];\n\n if (/^[bx]cancel$/.test(label)) {\n lines.push(new LineNode({\n \"x1\": \"0\",\n \"y1\": \"0\",\n \"x2\": \"100%\",\n \"y2\": \"100%\",\n \"stroke-width\": \"0.046em\"\n }));\n }\n\n if (/^x?cancel$/.test(label)) {\n lines.push(new LineNode({\n \"x1\": \"0\",\n \"y1\": \"100%\",\n \"x2\": \"100%\",\n \"y2\": \"0\",\n \"stroke-width\": \"0.046em\"\n }));\n }\n\n var svgNode = new SvgNode(lines, {\n \"width\": \"100%\",\n \"height\": makeEm(totalHeight)\n });\n img = buildCommon.makeSvgSpan([], [svgNode], options);\n }\n\n img.height = totalHeight;\n img.style.height = makeEm(totalHeight);\n return img;\n};\n\nvar stretchy = {\n encloseSpan,\n mathMLnode,\n svgSpan\n};\n\n/**\n * Asserts that the node is of the given type and returns it with stricter\n * typing. Throws if the node's type does not match.\n */\nfunction assertNodeType(node, type) {\n if (!node || node.type !== type) {\n throw new Error(\"Expected node of type \" + type + \", but got \" + (node ? \"node of type \" + node.type : String(node)));\n } // $FlowFixMe, >=0.125\n\n\n return node;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction assertSymbolNodeType(node) {\n var typedNode = checkSymbolNodeType(node);\n\n if (!typedNode) {\n throw new Error(\"Expected node of symbol group type, but got \" + (node ? \"node of type \" + node.type : String(node)));\n }\n\n return typedNode;\n}\n/**\n * Returns the node more strictly typed iff it is of the given type. Otherwise,\n * returns null.\n */\n\nfunction checkSymbolNodeType(node) {\n if (node && (node.type === \"atom\" || NON_ATOMS.hasOwnProperty(node.type))) {\n // $FlowFixMe\n return node;\n }\n\n return null;\n}\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only \"accent\", but\n// also \"supsub\" since an accent can affect super/subscripting.\nvar htmlBuilder$a = (grp, options) => {\n // Accents are handled in the TeXbook pg. 443, rule 12.\n var base;\n var group;\n var supSubGroup;\n\n if (grp && grp.type === \"supsub\") {\n // If our base is a character box, and we have superscripts and\n // subscripts, the supsub will defer to us. In particular, we want\n // to attach the superscripts and subscripts to the inner body (so\n // that the position of the superscripts and subscripts won't be\n // affected by the height of the accent). We accomplish this by\n // sticking the base of the accent into the base of the supsub, and\n // rendering that, while keeping track of where the accent is.\n // The real accent group is the base of the supsub group\n group = assertNodeType(grp.base, \"accent\"); // The character box is the base of the accent group\n\n base = group.base; // Stick the character box into the base of the supsub group\n\n grp.base = base; // Rerender the supsub group with its new base, and store that\n // result.\n\n supSubGroup = assertSpan(buildGroup$1(grp, options)); // reset original base\n\n grp.base = group;\n } else {\n group = assertNodeType(grp, \"accent\");\n base = group.base;\n } // Build the base group\n\n\n var body = buildGroup$1(base, options.havingCrampedStyle()); // Does the accent need to shift for the skew of a character?\n\n var mustShift = group.isShifty && utils.isCharacterBox(base); // Calculate the skew of the accent. This is based on the line \"If the\n // nucleus is not a single character, let s = 0; otherwise set s to the\n // kern amount for the nucleus followed by the \\skewchar of its font.\"\n // Note that our skew metrics are just the kern between each character\n // and the skewchar.\n\n var skew = 0;\n\n if (mustShift) {\n // If the base is a character box, then we want the skew of the\n // innermost character. To do that, we find the innermost character:\n var baseChar = utils.getBaseElem(base); // Then, we render its group to get the symbol inside it\n\n var baseGroup = buildGroup$1(baseChar, options.havingCrampedStyle()); // Finally, we pull the skew off of the symbol.\n\n skew = assertSymbolDomNode(baseGroup).skew; // Note that we now throw away baseGroup, because the layers we\n // removed with getBaseElem might contain things like \\color which\n // we can't get rid of.\n // TODO(emily): Find a better way to get the skew\n }\n\n var accentBelow = group.label === \"\\\\c\"; // calculate the amount of space between the body and the accent\n\n var clearance = accentBelow ? body.height + body.depth : Math.min(body.height, options.fontMetrics().xHeight); // Build the accent\n\n var accentBody;\n\n if (!group.isStretchy) {\n var accent;\n var width;\n\n if (group.label === \"\\\\vec\") {\n // Before version 0.9, \\vec used the combining font glyph U+20D7.\n // But browsers, especially Safari, are not consistent in how they\n // render combining characters when not preceded by a character.\n // So now we use an SVG.\n // If Safari reforms, we should consider reverting to the glyph.\n accent = buildCommon.staticSvg(\"vec\", options);\n width = buildCommon.svgData.vec[1];\n } else {\n accent = buildCommon.makeOrd({\n mode: group.mode,\n text: group.label\n }, options, \"textord\");\n accent = assertSymbolDomNode(accent); // Remove the italic correction of the accent, because it only serves to\n // shift the accent over to a place we don't want.\n\n accent.italic = 0;\n width = accent.width;\n\n if (accentBelow) {\n clearance += accent.depth;\n }\n }\n\n accentBody = buildCommon.makeSpan([\"accent-body\"], [accent]); // \"Full\" accents expand the width of the resulting symbol to be\n // at least the width of the accent, and overlap directly onto the\n // character without any vertical offset.\n\n var accentFull = group.label === \"\\\\textcircled\";\n\n if (accentFull) {\n accentBody.classes.push('accent-full');\n clearance = body.height;\n } // Shift the accent over by the skew.\n\n\n var left = skew; // CSS defines `.katex .accent .accent-body:not(.accent-full) { width: 0 }`\n // so that the accent doesn't contribute to the bounding box.\n // We need to shift the character by its width (effectively half\n // its width) to compensate.\n\n if (!accentFull) {\n left -= width / 2;\n }\n\n accentBody.style.left = makeEm(left); // \\textcircled uses the \\bigcirc glyph, so it needs some\n // vertical adjustment to match LaTeX.\n\n if (group.label === \"\\\\textcircled\") {\n accentBody.style.top = \".2em\";\n }\n\n accentBody = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: body\n }, {\n type: \"kern\",\n size: -clearance\n }, {\n type: \"elem\",\n elem: accentBody\n }]\n }, options);\n } else {\n accentBody = stretchy.svgSpan(group, options);\n accentBody = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: body\n }, {\n type: \"elem\",\n elem: accentBody,\n wrapperClasses: [\"svg-align\"],\n wrapperStyle: skew > 0 ? {\n width: \"calc(100% - \" + makeEm(2 * skew) + \")\",\n marginLeft: makeEm(2 * skew)\n } : undefined\n }]\n }, options);\n }\n\n var accentWrap = buildCommon.makeSpan([\"mord\", \"accent\"], [accentBody], options);\n\n if (supSubGroup) {\n // Here, we replace the \"base\" child of the supsub with our newly\n // generated accent.\n supSubGroup.children[0] = accentWrap; // Since we don't rerun the height calculation after replacing the\n // accent, we manually recalculate height.\n\n supSubGroup.height = Math.max(accentWrap.height, supSubGroup.height); // Accents should always be ords, even when their innards are not.\n\n supSubGroup.classes[0] = \"mord\";\n return supSubGroup;\n } else {\n return accentWrap;\n }\n};\n\nvar mathmlBuilder$9 = (group, options) => {\n var accentNode = group.isStretchy ? stretchy.mathMLnode(group.label) : new mathMLTree.MathNode(\"mo\", [makeText(group.label, group.mode)]);\n var node = new mathMLTree.MathNode(\"mover\", [buildGroup(group.base, options), accentNode]);\n node.setAttribute(\"accent\", \"true\");\n return node;\n};\n\nvar NON_STRETCHY_ACCENT_REGEX = new RegExp([\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\mathring\"].map(accent => \"\\\\\" + accent).join(\"|\")); // Accents\n\ndefineFunction({\n type: \"accent\",\n names: [\"\\\\acute\", \"\\\\grave\", \"\\\\ddot\", \"\\\\tilde\", \"\\\\bar\", \"\\\\breve\", \"\\\\check\", \"\\\\hat\", \"\\\\vec\", \"\\\\dot\", \"\\\\mathring\", \"\\\\widecheck\", \"\\\\widehat\", \"\\\\widetilde\", \"\\\\overrightarrow\", \"\\\\overleftarrow\", \"\\\\Overrightarrow\", \"\\\\overleftrightarrow\", \"\\\\overgroup\", \"\\\\overlinesegment\", \"\\\\overleftharpoon\", \"\\\\overrightharpoon\"],\n props: {\n numArgs: 1\n },\n handler: (context, args) => {\n var base = normalizeArgument(args[0]);\n var isStretchy = !NON_STRETCHY_ACCENT_REGEX.test(context.funcName);\n var isShifty = !isStretchy || context.funcName === \"\\\\widehat\" || context.funcName === \"\\\\widetilde\" || context.funcName === \"\\\\widecheck\";\n return {\n type: \"accent\",\n mode: context.parser.mode,\n label: context.funcName,\n isStretchy: isStretchy,\n isShifty: isShifty,\n base: base\n };\n },\n htmlBuilder: htmlBuilder$a,\n mathmlBuilder: mathmlBuilder$9\n}); // Text-mode accents\n\ndefineFunction({\n type: \"accent\",\n names: [\"\\\\'\", \"\\\\`\", \"\\\\^\", \"\\\\~\", \"\\\\=\", \"\\\\u\", \"\\\\.\", '\\\\\"', \"\\\\c\", \"\\\\r\", \"\\\\H\", \"\\\\v\", \"\\\\textcircled\"],\n props: {\n numArgs: 1,\n allowedInText: true,\n allowedInMath: true,\n // unless in strict mode\n argTypes: [\"primitive\"]\n },\n handler: (context, args) => {\n var base = args[0];\n var mode = context.parser.mode;\n\n if (mode === \"math\") {\n context.parser.settings.reportNonstrict(\"mathVsTextAccents\", \"LaTeX's accent \" + context.funcName + \" works only in text mode\");\n mode = \"text\";\n }\n\n return {\n type: \"accent\",\n mode: mode,\n label: context.funcName,\n isStretchy: false,\n isShifty: true,\n base: base\n };\n },\n htmlBuilder: htmlBuilder$a,\n mathmlBuilder: mathmlBuilder$9\n});\n\n// Horizontal overlap functions\ndefineFunction({\n type: \"accentUnder\",\n names: [\"\\\\underleftarrow\", \"\\\\underrightarrow\", \"\\\\underleftrightarrow\", \"\\\\undergroup\", \"\\\\underlinesegment\", \"\\\\utilde\"],\n props: {\n numArgs: 1\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var base = args[0];\n return {\n type: \"accentUnder\",\n mode: parser.mode,\n label: funcName,\n base: base\n };\n },\n htmlBuilder: (group, options) => {\n // Treat under accents much like underlines.\n var innerGroup = buildGroup$1(group.base, options);\n var accentBody = stretchy.svgSpan(group, options);\n var kern = group.label === \"\\\\utilde\" ? 0.12 : 0; // Generate the vlist, with the appropriate kerns\n\n var vlist = buildCommon.makeVList({\n positionType: \"top\",\n positionData: innerGroup.height,\n children: [{\n type: \"elem\",\n elem: accentBody,\n wrapperClasses: [\"svg-align\"]\n }, {\n type: \"kern\",\n size: kern\n }, {\n type: \"elem\",\n elem: innerGroup\n }]\n }, options);\n return buildCommon.makeSpan([\"mord\", \"accentunder\"], [vlist], options);\n },\n mathmlBuilder: (group, options) => {\n var accentNode = stretchy.mathMLnode(group.label);\n var node = new mathMLTree.MathNode(\"munder\", [buildGroup(group.base, options), accentNode]);\n node.setAttribute(\"accentunder\", \"true\");\n return node;\n }\n});\n\n// Helper function\nvar paddedNode = group => {\n var node = new mathMLTree.MathNode(\"mpadded\", group ? [group] : []);\n node.setAttribute(\"width\", \"+0.6em\");\n node.setAttribute(\"lspace\", \"0.3em\");\n return node;\n}; // Stretchy arrows with an optional argument\n\n\ndefineFunction({\n type: \"xArrow\",\n names: [\"\\\\xleftarrow\", \"\\\\xrightarrow\", \"\\\\xLeftarrow\", \"\\\\xRightarrow\", \"\\\\xleftrightarrow\", \"\\\\xLeftrightarrow\", \"\\\\xhookleftarrow\", \"\\\\xhookrightarrow\", \"\\\\xmapsto\", \"\\\\xrightharpoondown\", \"\\\\xrightharpoonup\", \"\\\\xleftharpoondown\", \"\\\\xleftharpoonup\", \"\\\\xrightleftharpoons\", \"\\\\xleftrightharpoons\", \"\\\\xlongequal\", \"\\\\xtwoheadrightarrow\", \"\\\\xtwoheadleftarrow\", \"\\\\xtofrom\", // The next 3 functions are here to support the mhchem extension.\n // Direct use of these functions is discouraged and may break someday.\n \"\\\\xrightleftarrows\", \"\\\\xrightequilibrium\", \"\\\\xleftequilibrium\", // The next 3 functions are here only to support the {CD} environment.\n \"\\\\\\\\cdrightarrow\", \"\\\\\\\\cdleftarrow\", \"\\\\\\\\cdlongequal\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser,\n funcName\n } = _ref;\n return {\n type: \"xArrow\",\n mode: parser.mode,\n label: funcName,\n body: args[0],\n below: optArgs[0]\n };\n },\n\n // Flow is unable to correctly infer the type of `group`, even though it's\n // unambiguously determined from the passed-in `type` above.\n htmlBuilder(group, options) {\n var style = options.style; // Build the argument groups in the appropriate style.\n // Ref: amsmath.dtx: \\hbox{$\\scriptstyle\\mkern#3mu{#6}\\mkern#4mu$}%\n // Some groups can return document fragments. Handle those by wrapping\n // them in a span.\n\n var newOptions = options.havingStyle(style.sup());\n var upperGroup = buildCommon.wrapFragment(buildGroup$1(group.body, newOptions, options), options);\n var arrowPrefix = group.label.slice(0, 2) === \"\\\\x\" ? \"x\" : \"cd\";\n upperGroup.classes.push(arrowPrefix + \"-arrow-pad\");\n var lowerGroup;\n\n if (group.below) {\n // Build the lower group\n newOptions = options.havingStyle(style.sub());\n lowerGroup = buildCommon.wrapFragment(buildGroup$1(group.below, newOptions, options), options);\n lowerGroup.classes.push(arrowPrefix + \"-arrow-pad\");\n }\n\n var arrowBody = stretchy.svgSpan(group, options); // Re shift: Note that stretchy.svgSpan returned arrowBody.depth = 0.\n // The point we want on the math axis is at 0.5 * arrowBody.height.\n\n var arrowShift = -options.fontMetrics().axisHeight + 0.5 * arrowBody.height; // 2 mu kern. Ref: amsmath.dtx: #7\\if0#2\\else\\mkern#2mu\\fi\n\n var upperShift = -options.fontMetrics().axisHeight - 0.5 * arrowBody.height - 0.111; // 0.111 em = 2 mu\n\n if (upperGroup.depth > 0.25 || group.label === \"\\\\xleftequilibrium\") {\n upperShift -= upperGroup.depth; // shift up if depth encroaches\n } // Generate the vlist\n\n\n var vlist;\n\n if (lowerGroup) {\n var lowerShift = -options.fontMetrics().axisHeight + lowerGroup.height + 0.5 * arrowBody.height + 0.111;\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: upperGroup,\n shift: upperShift\n }, {\n type: \"elem\",\n elem: arrowBody,\n shift: arrowShift\n }, {\n type: \"elem\",\n elem: lowerGroup,\n shift: lowerShift\n }]\n }, options);\n } else {\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: upperGroup,\n shift: upperShift\n }, {\n type: \"elem\",\n elem: arrowBody,\n shift: arrowShift\n }]\n }, options);\n } // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n\n vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n return buildCommon.makeSpan([\"mrel\", \"x-arrow\"], [vlist], options);\n },\n\n mathmlBuilder(group, options) {\n var arrowNode = stretchy.mathMLnode(group.label);\n arrowNode.setAttribute(\"minsize\", group.label.charAt(0) === \"x\" ? \"1.75em\" : \"3.0em\");\n var node;\n\n if (group.body) {\n var upperNode = paddedNode(buildGroup(group.body, options));\n\n if (group.below) {\n var lowerNode = paddedNode(buildGroup(group.below, options));\n node = new mathMLTree.MathNode(\"munderover\", [arrowNode, lowerNode, upperNode]);\n } else {\n node = new mathMLTree.MathNode(\"mover\", [arrowNode, upperNode]);\n }\n } else if (group.below) {\n var _lowerNode = paddedNode(buildGroup(group.below, options));\n\n node = new mathMLTree.MathNode(\"munder\", [arrowNode, _lowerNode]);\n } else {\n // This should never happen.\n // Parser.js throws an error if there is no argument.\n node = paddedNode();\n node = new mathMLTree.MathNode(\"mover\", [arrowNode, node]);\n }\n\n return node;\n }\n\n});\n\nvar makeSpan = buildCommon.makeSpan;\n\nfunction htmlBuilder$9(group, options) {\n var elements = buildExpression$1(group.body, options, true);\n return makeSpan([group.mclass], elements, options);\n}\n\nfunction mathmlBuilder$8(group, options) {\n var node;\n var inner = buildExpression(group.body, options);\n\n if (group.mclass === \"minner\") {\n node = new mathMLTree.MathNode(\"mpadded\", inner);\n } else if (group.mclass === \"mord\") {\n if (group.isCharacterBox) {\n node = inner[0];\n node.type = \"mi\";\n } else {\n node = new mathMLTree.MathNode(\"mi\", inner);\n }\n } else {\n if (group.isCharacterBox) {\n node = inner[0];\n node.type = \"mo\";\n } else {\n node = new mathMLTree.MathNode(\"mo\", inner);\n } // Set spacing based on what is the most likely adjacent atom type.\n // See TeXbook p170.\n\n\n if (group.mclass === \"mbin\") {\n node.attributes.lspace = \"0.22em\"; // medium space\n\n node.attributes.rspace = \"0.22em\";\n } else if (group.mclass === \"mpunct\") {\n node.attributes.lspace = \"0em\";\n node.attributes.rspace = \"0.17em\"; // thinspace\n } else if (group.mclass === \"mopen\" || group.mclass === \"mclose\") {\n node.attributes.lspace = \"0em\";\n node.attributes.rspace = \"0em\";\n } else if (group.mclass === \"minner\") {\n node.attributes.lspace = \"0.0556em\"; // 1 mu is the most likely option\n\n node.attributes.width = \"+0.1111em\";\n } // MathML default space is 5/18 em, so needs no action.\n // Ref: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo\n\n }\n\n return node;\n} // Math class commands except \\mathop\n\n\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\mathord\", \"\\\\mathbin\", \"\\\\mathrel\", \"\\\\mathopen\", \"\\\\mathclose\", \"\\\\mathpunct\", \"\\\\mathinner\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass: \"m\" + funcName.slice(5),\n // TODO(kevinb): don't prefix with 'm'\n body: ordargument(body),\n isCharacterBox: utils.isCharacterBox(body)\n };\n },\n\n htmlBuilder: htmlBuilder$9,\n mathmlBuilder: mathmlBuilder$8\n});\nvar binrelClass = arg => {\n // \\binrel@ spacing varies with (bin|rel|ord) of the atom in the argument.\n // (by rendering separately and with {}s before and after, and measuring\n // the change in spacing). We'll do roughly the same by detecting the\n // atom type directly.\n var atom = arg.type === \"ordgroup\" && arg.body.length ? arg.body[0] : arg;\n\n if (atom.type === \"atom\" && (atom.family === \"bin\" || atom.family === \"rel\")) {\n return \"m\" + atom.family;\n } else {\n return \"mord\";\n }\n}; // \\@binrel{x}{y} renders like y but as mbin/mrel/mord if x is mbin/mrel/mord.\n// This is equivalent to \\binrel@{x}\\binrel@@{y} in AMSTeX.\n\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\@binrel\"],\n props: {\n numArgs: 2\n },\n\n handler(_ref2, args) {\n var {\n parser\n } = _ref2;\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass: binrelClass(args[0]),\n body: ordargument(args[1]),\n isCharacterBox: utils.isCharacterBox(args[1])\n };\n }\n\n}); // Build a relation or stacked op by placing one symbol on top of another\n\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\stackrel\", \"\\\\overset\", \"\\\\underset\"],\n props: {\n numArgs: 2\n },\n\n handler(_ref3, args) {\n var {\n parser,\n funcName\n } = _ref3;\n var baseArg = args[1];\n var shiftedArg = args[0];\n var mclass;\n\n if (funcName !== \"\\\\stackrel\") {\n // LaTeX applies \\binrel spacing to \\overset and \\underset.\n mclass = binrelClass(baseArg);\n } else {\n mclass = \"mrel\"; // for \\stackrel\n }\n\n var baseOp = {\n type: \"op\",\n mode: baseArg.mode,\n limits: true,\n alwaysHandleSupSub: true,\n parentIsSupSub: false,\n symbol: false,\n suppressBaseShift: funcName !== \"\\\\stackrel\",\n body: ordargument(baseArg)\n };\n var supsub = {\n type: \"supsub\",\n mode: shiftedArg.mode,\n base: baseOp,\n sup: funcName === \"\\\\underset\" ? null : shiftedArg,\n sub: funcName === \"\\\\underset\" ? shiftedArg : null\n };\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass,\n body: [supsub],\n isCharacterBox: utils.isCharacterBox(supsub)\n };\n },\n\n htmlBuilder: htmlBuilder$9,\n mathmlBuilder: mathmlBuilder$8\n});\n\n// \\pmb is a simulation of bold font.\n// The version of \\pmb in ambsy.sty works by typesetting three copies\n// with small offsets. We use CSS text-shadow.\n// It's a hack. Not as good as a real bold font. Better than nothing.\ndefineFunction({\n type: \"pmb\",\n names: [\"\\\\pmb\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"pmb\",\n mode: parser.mode,\n mclass: binrelClass(args[0]),\n body: ordargument(args[0])\n };\n },\n\n htmlBuilder(group, options) {\n var elements = buildExpression$1(group.body, options, true);\n var node = buildCommon.makeSpan([group.mclass], elements, options);\n node.style.textShadow = \"0.02em 0.01em 0.04px\";\n return node;\n },\n\n mathmlBuilder(group, style) {\n var inner = buildExpression(group.body, style); // Wrap with an element.\n\n var node = new mathMLTree.MathNode(\"mstyle\", inner);\n node.setAttribute(\"style\", \"text-shadow: 0.02em 0.01em 0.04px\");\n return node;\n }\n\n});\n\nvar cdArrowFunctionName = {\n \">\": \"\\\\\\\\cdrightarrow\",\n \"<\": \"\\\\\\\\cdleftarrow\",\n \"=\": \"\\\\\\\\cdlongequal\",\n \"A\": \"\\\\uparrow\",\n \"V\": \"\\\\downarrow\",\n \"|\": \"\\\\Vert\",\n \".\": \"no arrow\"\n};\n\nvar newCell = () => {\n // Create an empty cell, to be filled below with parse nodes.\n // The parseTree from this module must be constructed like the\n // one created by parseArray(), so an empty CD cell must\n // be a ParseNode<\"styling\">. And CD is always displaystyle.\n // So these values are fixed and flow can do implicit typing.\n return {\n type: \"styling\",\n body: [],\n mode: \"math\",\n style: \"display\"\n };\n};\n\nvar isStartOfArrow = node => {\n return node.type === \"textord\" && node.text === \"@\";\n};\n\nvar isLabelEnd = (node, endChar) => {\n return (node.type === \"mathord\" || node.type === \"atom\") && node.text === endChar;\n};\n\nfunction cdArrow(arrowChar, labels, parser) {\n // Return a parse tree of an arrow and its labels.\n // This acts in a way similar to a macro expansion.\n var funcName = cdArrowFunctionName[arrowChar];\n\n switch (funcName) {\n case \"\\\\\\\\cdrightarrow\":\n case \"\\\\\\\\cdleftarrow\":\n return parser.callFunction(funcName, [labels[0]], [labels[1]]);\n\n case \"\\\\uparrow\":\n case \"\\\\downarrow\":\n {\n var leftLabel = parser.callFunction(\"\\\\\\\\cdleft\", [labels[0]], []);\n var bareArrow = {\n type: \"atom\",\n text: funcName,\n mode: \"math\",\n family: \"rel\"\n };\n var sizedArrow = parser.callFunction(\"\\\\Big\", [bareArrow], []);\n var rightLabel = parser.callFunction(\"\\\\\\\\cdright\", [labels[1]], []);\n var arrowGroup = {\n type: \"ordgroup\",\n mode: \"math\",\n body: [leftLabel, sizedArrow, rightLabel]\n };\n return parser.callFunction(\"\\\\\\\\cdparent\", [arrowGroup], []);\n }\n\n case \"\\\\\\\\cdlongequal\":\n return parser.callFunction(\"\\\\\\\\cdlongequal\", [], []);\n\n case \"\\\\Vert\":\n {\n var arrow = {\n type: \"textord\",\n text: \"\\\\Vert\",\n mode: \"math\"\n };\n return parser.callFunction(\"\\\\Big\", [arrow], []);\n }\n\n default:\n return {\n type: \"textord\",\n text: \" \",\n mode: \"math\"\n };\n }\n}\n\nfunction parseCD(parser) {\n // Get the array's parse nodes with \\\\ temporarily mapped to \\cr.\n var parsedRows = [];\n parser.gullet.beginGroup();\n parser.gullet.macros.set(\"\\\\cr\", \"\\\\\\\\\\\\relax\");\n parser.gullet.beginGroup();\n\n while (true) {\n // eslint-disable-line no-constant-condition\n // Get the parse nodes for the next row.\n parsedRows.push(parser.parseExpression(false, \"\\\\\\\\\"));\n parser.gullet.endGroup();\n parser.gullet.beginGroup();\n var next = parser.fetch().text;\n\n if (next === \"&\" || next === \"\\\\\\\\\") {\n parser.consume();\n } else if (next === \"\\\\end\") {\n if (parsedRows[parsedRows.length - 1].length === 0) {\n parsedRows.pop(); // final row ended in \\\\\n }\n\n break;\n } else {\n throw new ParseError(\"Expected \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n }\n\n var row = [];\n var body = [row]; // Loop thru the parse nodes. Collect them into cells and arrows.\n\n for (var i = 0; i < parsedRows.length; i++) {\n // Start a new row.\n var rowNodes = parsedRows[i]; // Create the first cell.\n\n var cell = newCell();\n\n for (var j = 0; j < rowNodes.length; j++) {\n if (!isStartOfArrow(rowNodes[j])) {\n // If a parseNode is not an arrow, it goes into a cell.\n cell.body.push(rowNodes[j]);\n } else {\n // Parse node j is an \"@\", the start of an arrow.\n // Before starting on the arrow, push the cell into `row`.\n row.push(cell); // Now collect parseNodes into an arrow.\n // The character after \"@\" defines the arrow type.\n\n j += 1;\n var arrowChar = assertSymbolNodeType(rowNodes[j]).text; // Create two empty label nodes. We may or may not use them.\n\n var labels = new Array(2);\n labels[0] = {\n type: \"ordgroup\",\n mode: \"math\",\n body: []\n };\n labels[1] = {\n type: \"ordgroup\",\n mode: \"math\",\n body: []\n }; // Process the arrow.\n\n if (\"=|.\".indexOf(arrowChar) > -1) ; else if (\"<>AV\".indexOf(arrowChar) > -1) {\n // Four arrows, `@>>>`, `@<<<`, `@AAA`, and `@VVV`, each take\n // two optional labels. E.g. the right-point arrow syntax is\n // really: @>{optional label}>{optional label}>\n // Collect parseNodes into labels.\n for (var labelNum = 0; labelNum < 2; labelNum++) {\n var inLabel = true;\n\n for (var k = j + 1; k < rowNodes.length; k++) {\n if (isLabelEnd(rowNodes[k], arrowChar)) {\n inLabel = false;\n j = k;\n break;\n }\n\n if (isStartOfArrow(rowNodes[k])) {\n throw new ParseError(\"Missing a \" + arrowChar + \" character to complete a CD arrow.\", rowNodes[k]);\n }\n\n labels[labelNum].body.push(rowNodes[k]);\n }\n\n if (inLabel) {\n // isLabelEnd never returned a true.\n throw new ParseError(\"Missing a \" + arrowChar + \" character to complete a CD arrow.\", rowNodes[j]);\n }\n }\n } else {\n throw new ParseError(\"Expected one of \\\"<>AV=|.\\\" after @\", rowNodes[j]);\n } // Now join the arrow to its labels.\n\n\n var arrow = cdArrow(arrowChar, labels, parser); // Wrap the arrow in ParseNode<\"styling\">.\n // This is done to match parseArray() behavior.\n\n var wrappedArrow = {\n type: \"styling\",\n body: [arrow],\n mode: \"math\",\n style: \"display\" // CD is always displaystyle.\n\n };\n row.push(wrappedArrow); // In CD's syntax, cells are implicit. That is, everything that\n // is not an arrow gets collected into a cell. So create an empty\n // cell now. It will collect upcoming parseNodes.\n\n cell = newCell();\n }\n }\n\n if (i % 2 === 0) {\n // Even-numbered rows consist of: cell, arrow, cell, arrow, ... cell\n // The last cell is not yet pushed into `row`, so:\n row.push(cell);\n } else {\n // Odd-numbered rows consist of: vert arrow, empty cell, ... vert arrow\n // Remove the empty cell that was placed at the beginning of `row`.\n row.shift();\n }\n\n row = [];\n body.push(row);\n } // End row group\n\n\n parser.gullet.endGroup(); // End array group defining \\\\\n\n parser.gullet.endGroup(); // define column separation.\n\n var cols = new Array(body[0].length).fill({\n type: \"align\",\n align: \"c\",\n pregap: 0.25,\n // CD package sets \\enskip between columns.\n postgap: 0.25 // So pre and post each get half an \\enskip, i.e. 0.25em.\n\n });\n return {\n type: \"array\",\n mode: \"math\",\n body,\n arraystretch: 1,\n addJot: true,\n rowGaps: [null],\n cols,\n colSeparationType: \"CD\",\n hLinesBeforeRow: new Array(body.length + 1).fill([])\n };\n} // The functions below are not available for general use.\n// They are here only for internal use by the {CD} environment in placing labels\n// next to vertical arrows.\n// We don't need any such functions for horizontal arrows because we can reuse\n// the functionality that already exists for extensible arrows.\n\ndefineFunction({\n type: \"cdlabel\",\n names: [\"\\\\\\\\cdleft\", \"\\\\\\\\cdright\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n return {\n type: \"cdlabel\",\n mode: parser.mode,\n side: funcName.slice(4),\n label: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n var newOptions = options.havingStyle(options.style.sup());\n var label = buildCommon.wrapFragment(buildGroup$1(group.label, newOptions, options), options);\n label.classes.push(\"cd-label-\" + group.side);\n label.style.bottom = makeEm(0.8 - label.depth); // Zero out label height & depth, so vertical align of arrow is set\n // by the arrow height, not by the label.\n\n label.height = 0;\n label.depth = 0;\n return label;\n },\n\n mathmlBuilder(group, options) {\n var label = new mathMLTree.MathNode(\"mrow\", [buildGroup(group.label, options)]);\n label = new mathMLTree.MathNode(\"mpadded\", [label]);\n label.setAttribute(\"width\", \"0\");\n\n if (group.side === \"left\") {\n label.setAttribute(\"lspace\", \"-1width\");\n } // We have to guess at vertical alignment. We know the arrow is 1.8em tall,\n // But we don't know the height or depth of the label.\n\n\n label.setAttribute(\"voffset\", \"0.7em\");\n label = new mathMLTree.MathNode(\"mstyle\", [label]);\n label.setAttribute(\"displaystyle\", \"false\");\n label.setAttribute(\"scriptlevel\", \"1\");\n return label;\n }\n\n});\ndefineFunction({\n type: \"cdlabelparent\",\n names: [\"\\\\\\\\cdparent\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref2, args) {\n var {\n parser\n } = _ref2;\n return {\n type: \"cdlabelparent\",\n mode: parser.mode,\n fragment: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n // Wrap the vertical arrow and its labels.\n // The parent gets position: relative. The child gets position: absolute.\n // So CSS can locate the label correctly.\n var parent = buildCommon.wrapFragment(buildGroup$1(group.fragment, options), options);\n parent.classes.push(\"cd-vert-arrow\");\n return parent;\n },\n\n mathmlBuilder(group, options) {\n return new mathMLTree.MathNode(\"mrow\", [buildGroup(group.fragment, options)]);\n }\n\n});\n\n// {123} and converts into symbol with code 123. It is used by the *macro*\n// \\char defined in macros.js.\n\ndefineFunction({\n type: \"textord\",\n names: [\"\\\\@char\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var arg = assertNodeType(args[0], \"ordgroup\");\n var group = arg.body;\n var number = \"\";\n\n for (var i = 0; i < group.length; i++) {\n var node = assertNodeType(group[i], \"textord\");\n number += node.text;\n }\n\n var code = parseInt(number);\n var text;\n\n if (isNaN(code)) {\n throw new ParseError(\"\\\\@char has non-numeric argument \" + number); // If we drop IE support, the following code could be replaced with\n // text = String.fromCodePoint(code)\n } else if (code < 0 || code >= 0x10ffff) {\n throw new ParseError(\"\\\\@char with invalid code point \" + number);\n } else if (code <= 0xffff) {\n text = String.fromCharCode(code);\n } else {\n // Astral code point; split into surrogate halves\n code -= 0x10000;\n text = String.fromCharCode((code >> 10) + 0xd800, (code & 0x3ff) + 0xdc00);\n }\n\n return {\n type: \"textord\",\n mode: parser.mode,\n text: text\n };\n }\n\n});\n\nvar htmlBuilder$8 = (group, options) => {\n var elements = buildExpression$1(group.body, options.withColor(group.color), false); // \\color isn't supposed to affect the type of the elements it contains.\n // To accomplish this, we wrap the results in a fragment, so the inner\n // elements will be able to directly interact with their neighbors. For\n // example, `\\color{red}{2 +} 3` has the same spacing as `2 + 3`\n\n return buildCommon.makeFragment(elements);\n};\n\nvar mathmlBuilder$7 = (group, options) => {\n var inner = buildExpression(group.body, options.withColor(group.color));\n var node = new mathMLTree.MathNode(\"mstyle\", inner);\n node.setAttribute(\"mathcolor\", group.color);\n return node;\n};\n\ndefineFunction({\n type: \"color\",\n names: [\"\\\\textcolor\"],\n props: {\n numArgs: 2,\n allowedInText: true,\n argTypes: [\"color\", \"original\"]\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var color = assertNodeType(args[0], \"color-token\").color;\n var body = args[1];\n return {\n type: \"color\",\n mode: parser.mode,\n color,\n body: ordargument(body)\n };\n },\n\n htmlBuilder: htmlBuilder$8,\n mathmlBuilder: mathmlBuilder$7\n});\ndefineFunction({\n type: \"color\",\n names: [\"\\\\color\"],\n props: {\n numArgs: 1,\n allowedInText: true,\n argTypes: [\"color\"]\n },\n\n handler(_ref2, args) {\n var {\n parser,\n breakOnTokenText\n } = _ref2;\n var color = assertNodeType(args[0], \"color-token\").color; // Set macro \\current@color in current namespace to store the current\n // color, mimicking the behavior of color.sty.\n // This is currently used just to correctly color a \\right\n // that follows a \\color command.\n\n parser.gullet.macros.set(\"\\\\current@color\", color); // Parse out the implicit body that should be colored.\n\n var body = parser.parseExpression(true, breakOnTokenText);\n return {\n type: \"color\",\n mode: parser.mode,\n color,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$8,\n mathmlBuilder: mathmlBuilder$7\n});\n\n// Row breaks within tabular environments, and line breaks at top level\n\ndefineFunction({\n type: \"cr\",\n names: [\"\\\\\\\\\"],\n props: {\n numArgs: 0,\n numOptionalArgs: 0,\n allowedInText: true\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser\n } = _ref;\n var size = parser.gullet.future().text === \"[\" ? parser.parseSizeGroup(true) : null;\n var newLine = !parser.settings.displayMode || !parser.settings.useStrictBehavior(\"newLineInDisplayMode\", \"In LaTeX, \\\\\\\\ or \\\\newline \" + \"does nothing in display mode\");\n return {\n type: \"cr\",\n mode: parser.mode,\n newLine,\n size: size && assertNodeType(size, \"size\").value\n };\n },\n\n // The following builders are called only at the top level,\n // not within tabular/array environments.\n htmlBuilder(group, options) {\n var span = buildCommon.makeSpan([\"mspace\"], [], options);\n\n if (group.newLine) {\n span.classes.push(\"newline\");\n\n if (group.size) {\n span.style.marginTop = makeEm(calculateSize(group.size, options));\n }\n }\n\n return span;\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mspace\");\n\n if (group.newLine) {\n node.setAttribute(\"linebreak\", \"newline\");\n\n if (group.size) {\n node.setAttribute(\"height\", makeEm(calculateSize(group.size, options)));\n }\n }\n\n return node;\n }\n\n});\n\nvar globalMap = {\n \"\\\\global\": \"\\\\global\",\n \"\\\\long\": \"\\\\\\\\globallong\",\n \"\\\\\\\\globallong\": \"\\\\\\\\globallong\",\n \"\\\\def\": \"\\\\gdef\",\n \"\\\\gdef\": \"\\\\gdef\",\n \"\\\\edef\": \"\\\\xdef\",\n \"\\\\xdef\": \"\\\\xdef\",\n \"\\\\let\": \"\\\\\\\\globallet\",\n \"\\\\futurelet\": \"\\\\\\\\globalfuture\"\n};\n\nvar checkControlSequence = tok => {\n var name = tok.text;\n\n if (/^(?:[\\\\{}$&#^_]|EOF)$/.test(name)) {\n throw new ParseError(\"Expected a control sequence\", tok);\n }\n\n return name;\n};\n\nvar getRHS = parser => {\n var tok = parser.gullet.popToken();\n\n if (tok.text === \"=\") {\n // consume optional equals\n tok = parser.gullet.popToken();\n\n if (tok.text === \" \") {\n // consume one optional space\n tok = parser.gullet.popToken();\n }\n }\n\n return tok;\n};\n\nvar letCommand = (parser, name, tok, global) => {\n var macro = parser.gullet.macros.get(tok.text);\n\n if (macro == null) {\n // don't expand it later even if a macro with the same name is defined\n // e.g., \\let\\foo=\\frac \\def\\frac{\\relax} \\frac12\n tok.noexpand = true;\n macro = {\n tokens: [tok],\n numArgs: 0,\n // reproduce the same behavior in expansion\n unexpandable: !parser.gullet.isExpandable(tok.text)\n };\n }\n\n parser.gullet.macros.set(name, macro, global);\n}; // -> |\n// -> |\\global\n// -> |\n// -> \\global|\\long|\\outer\n\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\global\", \"\\\\long\", \"\\\\\\\\globallong\" // can\u2019t be entered directly\n ],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n\n handler(_ref) {\n var {\n parser,\n funcName\n } = _ref;\n parser.consumeSpaces();\n var token = parser.fetch();\n\n if (globalMap[token.text]) {\n // KaTeX doesn't have \\par, so ignore \\long\n if (funcName === \"\\\\global\" || funcName === \"\\\\\\\\globallong\") {\n token.text = globalMap[token.text];\n }\n\n return assertNodeType(parser.parseFunction(), \"internal\");\n }\n\n throw new ParseError(\"Invalid token after macro prefix\", token);\n }\n\n}); // Basic support for macro definitions: \\def, \\gdef, \\edef, \\xdef\n// -> \n// -> \\def|\\gdef|\\edef|\\xdef\n// -> \n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\def\", \"\\\\gdef\", \"\\\\edef\", \"\\\\xdef\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref2) {\n var {\n parser,\n funcName\n } = _ref2;\n var tok = parser.gullet.popToken();\n var name = tok.text;\n\n if (/^(?:[\\\\{}$&#^_]|EOF)$/.test(name)) {\n throw new ParseError(\"Expected a control sequence\", tok);\n }\n\n var numArgs = 0;\n var insert;\n var delimiters = [[]]; // contains no braces\n\n while (parser.gullet.future().text !== \"{\") {\n tok = parser.gullet.popToken();\n\n if (tok.text === \"#\") {\n // If the very last character of the is #, so that\n // this # is immediately followed by {, TeX will behave as if the {\n // had been inserted at the right end of both the parameter text\n // and the replacement text.\n if (parser.gullet.future().text === \"{\") {\n insert = parser.gullet.future();\n delimiters[numArgs].push(\"{\");\n break;\n } // A parameter, the first appearance of # must be followed by 1,\n // the next by 2, and so on; up to nine #\u2019s are allowed\n\n\n tok = parser.gullet.popToken();\n\n if (!/^[1-9]$/.test(tok.text)) {\n throw new ParseError(\"Invalid argument number \\\"\" + tok.text + \"\\\"\");\n }\n\n if (parseInt(tok.text) !== numArgs + 1) {\n throw new ParseError(\"Argument number \\\"\" + tok.text + \"\\\" out of order\");\n }\n\n numArgs++;\n delimiters.push([]);\n } else if (tok.text === \"EOF\") {\n throw new ParseError(\"Expected a macro definition\");\n } else {\n delimiters[numArgs].push(tok.text);\n }\n } // replacement text, enclosed in '{' and '}' and properly nested\n\n\n var {\n tokens\n } = parser.gullet.consumeArg();\n\n if (insert) {\n tokens.unshift(insert);\n }\n\n if (funcName === \"\\\\edef\" || funcName === \"\\\\xdef\") {\n tokens = parser.gullet.expandTokens(tokens);\n tokens.reverse(); // to fit in with stack order\n } // Final arg is the expansion of the macro\n\n\n parser.gullet.macros.set(name, {\n tokens,\n numArgs,\n delimiters\n }, funcName === globalMap[funcName]);\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n}); // -> \n// -> \\futurelet\n// | \\let\n// -> |=\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\let\", \"\\\\\\\\globallet\" // can\u2019t be entered directly\n ],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref3) {\n var {\n parser,\n funcName\n } = _ref3;\n var name = checkControlSequence(parser.gullet.popToken());\n parser.gullet.consumeSpaces();\n var tok = getRHS(parser);\n letCommand(parser, name, tok, funcName === \"\\\\\\\\globallet\");\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n}); // ref: https://www.tug.org/TUGboat/tb09-3/tb22bechtolsheim.pdf\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\futurelet\", \"\\\\\\\\globalfuture\" // can\u2019t be entered directly\n ],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref4) {\n var {\n parser,\n funcName\n } = _ref4;\n var name = checkControlSequence(parser.gullet.popToken());\n var middle = parser.gullet.popToken();\n var tok = parser.gullet.popToken();\n letCommand(parser, name, tok, funcName === \"\\\\\\\\globalfuture\");\n parser.gullet.pushToken(tok);\n parser.gullet.pushToken(middle);\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n});\n\n/**\n * This file deals with creating delimiters of various sizes. The TeXbook\n * discusses these routines on page 441-442, in the \"Another subroutine sets box\n * x to a specified variable delimiter\" paragraph.\n *\n * There are three main routines here. `makeSmallDelim` makes a delimiter in the\n * normal font, but in either text, script, or scriptscript style.\n * `makeLargeDelim` makes a delimiter in textstyle, but in one of the Size1,\n * Size2, Size3, or Size4 fonts. `makeStackedDelim` makes a delimiter out of\n * smaller pieces that are stacked on top of one another.\n *\n * The functions take a parameter `center`, which determines if the delimiter\n * should be centered around the axis.\n *\n * Then, there are three exposed functions. `sizedDelim` makes a delimiter in\n * one of the given sizes. This is used for things like `\\bigl`.\n * `customSizedDelim` makes a delimiter with a given total height+depth. It is\n * called in places like `\\sqrt`. `leftRightDelim` makes an appropriate\n * delimiter which surrounds an expression of a given height an depth. It is\n * used in `\\left` and `\\right`.\n */\n\n/**\n * Get the metrics for a given symbol and font, after transformation (i.e.\n * after following replacement from symbols.js)\n */\nvar getMetrics = function getMetrics(symbol, font, mode) {\n var replace = symbols.math[symbol] && symbols.math[symbol].replace;\n var metrics = getCharacterMetrics(replace || symbol, font, mode);\n\n if (!metrics) {\n throw new Error(\"Unsupported symbol \" + symbol + \" and font size \" + font + \".\");\n }\n\n return metrics;\n};\n/**\n * Puts a delimiter span in a given style, and adds appropriate height, depth,\n * and maxFontSizes.\n */\n\n\nvar styleWrap = function styleWrap(delim, toStyle, options, classes) {\n var newOptions = options.havingBaseStyle(toStyle);\n var span = buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)), [delim], options);\n var delimSizeMultiplier = newOptions.sizeMultiplier / options.sizeMultiplier;\n span.height *= delimSizeMultiplier;\n span.depth *= delimSizeMultiplier;\n span.maxFontSize = newOptions.sizeMultiplier;\n return span;\n};\n\nvar centerSpan = function centerSpan(span, options, style) {\n var newOptions = options.havingBaseStyle(style);\n var shift = (1 - options.sizeMultiplier / newOptions.sizeMultiplier) * options.fontMetrics().axisHeight;\n span.classes.push(\"delimcenter\");\n span.style.top = makeEm(shift);\n span.height -= shift;\n span.depth += shift;\n};\n/**\n * Makes a small delimiter. This is a delimiter that comes in the Main-Regular\n * font, but is restyled to either be in textstyle, scriptstyle, or\n * scriptscriptstyle.\n */\n\n\nvar makeSmallDelim = function makeSmallDelim(delim, style, center, options, mode, classes) {\n var text = buildCommon.makeSymbol(delim, \"Main-Regular\", mode, options);\n var span = styleWrap(text, style, options, classes);\n\n if (center) {\n centerSpan(span, options, style);\n }\n\n return span;\n};\n/**\n * Builds a symbol in the given font size (note size is an integer)\n */\n\n\nvar mathrmSize = function mathrmSize(value, size, mode, options) {\n return buildCommon.makeSymbol(value, \"Size\" + size + \"-Regular\", mode, options);\n};\n/**\n * Makes a large delimiter. This is a delimiter that comes in the Size1, Size2,\n * Size3, or Size4 fonts. It is always rendered in textstyle.\n */\n\n\nvar makeLargeDelim = function makeLargeDelim(delim, size, center, options, mode, classes) {\n var inner = mathrmSize(delim, size, mode, options);\n var span = styleWrap(buildCommon.makeSpan([\"delimsizing\", \"size\" + size], [inner], options), Style$1.TEXT, options, classes);\n\n if (center) {\n centerSpan(span, options, Style$1.TEXT);\n }\n\n return span;\n};\n/**\n * Make a span from a font glyph with the given offset and in the given font.\n * This is used in makeStackedDelim to make the stacking pieces for the delimiter.\n */\n\n\nvar makeGlyphSpan = function makeGlyphSpan(symbol, font, mode) {\n var sizeClass; // Apply the correct CSS class to choose the right font.\n\n if (font === \"Size1-Regular\") {\n sizeClass = \"delim-size1\";\n } else\n /* if (font === \"Size4-Regular\") */\n {\n sizeClass = \"delim-size4\";\n }\n\n var corner = buildCommon.makeSpan([\"delimsizinginner\", sizeClass], [buildCommon.makeSpan([], [buildCommon.makeSymbol(symbol, font, mode)])]); // Since this will be passed into `makeVList` in the end, wrap the element\n // in the appropriate tag that VList uses.\n\n return {\n type: \"elem\",\n elem: corner\n };\n};\n\nvar makeInner = function makeInner(ch, height, options) {\n // Create a span with inline SVG for the inner part of a tall stacked delimiter.\n var width = fontMetricsData['Size4-Regular'][ch.charCodeAt(0)] ? fontMetricsData['Size4-Regular'][ch.charCodeAt(0)][4] : fontMetricsData['Size1-Regular'][ch.charCodeAt(0)][4];\n var path = new PathNode(\"inner\", innerPath(ch, Math.round(1000 * height)));\n var svgNode = new SvgNode([path], {\n \"width\": makeEm(width),\n \"height\": makeEm(height),\n // Override CSS rule `.katex svg { width: 100% }`\n \"style\": \"width:\" + makeEm(width),\n \"viewBox\": \"0 0 \" + 1000 * width + \" \" + Math.round(1000 * height),\n \"preserveAspectRatio\": \"xMinYMin\"\n });\n var span = buildCommon.makeSvgSpan([], [svgNode], options);\n span.height = height;\n span.style.height = makeEm(height);\n span.style.width = makeEm(width);\n return {\n type: \"elem\",\n elem: span\n };\n}; // Helpers for makeStackedDelim\n\n\nvar lapInEms = 0.008;\nvar lap = {\n type: \"kern\",\n size: -1 * lapInEms\n};\nvar verts = [\"|\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\vert\"];\nvar doubleVerts = [\"\\\\|\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\Vert\"];\n/**\n * Make a stacked delimiter out of a given delimiter, with the total height at\n * least `heightTotal`. This routine is mentioned on page 442 of the TeXbook.\n */\n\nvar makeStackedDelim = function makeStackedDelim(delim, heightTotal, center, options, mode, classes) {\n // There are four parts, the top, an optional middle, a repeated part, and a\n // bottom.\n var top;\n var middle;\n var repeat;\n var bottom;\n var svgLabel = \"\";\n var viewBoxWidth = 0;\n top = repeat = bottom = delim;\n middle = null; // Also keep track of what font the delimiters are in\n\n var font = \"Size1-Regular\"; // We set the parts and font based on the symbol. Note that we use\n // '\\u23d0' instead of '|' and '\\u2016' instead of '\\\\|' for the\n // repeats of the arrows\n\n if (delim === \"\\\\uparrow\") {\n repeat = bottom = \"\\u23d0\";\n } else if (delim === \"\\\\Uparrow\") {\n repeat = bottom = \"\\u2016\";\n } else if (delim === \"\\\\downarrow\") {\n top = repeat = \"\\u23d0\";\n } else if (delim === \"\\\\Downarrow\") {\n top = repeat = \"\\u2016\";\n } else if (delim === \"\\\\updownarrow\") {\n top = \"\\\\uparrow\";\n repeat = \"\\u23d0\";\n bottom = \"\\\\downarrow\";\n } else if (delim === \"\\\\Updownarrow\") {\n top = \"\\\\Uparrow\";\n repeat = \"\\u2016\";\n bottom = \"\\\\Downarrow\";\n } else if (utils.contains(verts, delim)) {\n repeat = \"\\u2223\";\n svgLabel = \"vert\";\n viewBoxWidth = 333;\n } else if (utils.contains(doubleVerts, delim)) {\n repeat = \"\\u2225\";\n svgLabel = \"doublevert\";\n viewBoxWidth = 556;\n } else if (delim === \"[\" || delim === \"\\\\lbrack\") {\n top = \"\\u23a1\";\n repeat = \"\\u23a2\";\n bottom = \"\\u23a3\";\n font = \"Size4-Regular\";\n svgLabel = \"lbrack\";\n viewBoxWidth = 667;\n } else if (delim === \"]\" || delim === \"\\\\rbrack\") {\n top = \"\\u23a4\";\n repeat = \"\\u23a5\";\n bottom = \"\\u23a6\";\n font = \"Size4-Regular\";\n svgLabel = \"rbrack\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\lfloor\" || delim === \"\\u230a\") {\n repeat = top = \"\\u23a2\";\n bottom = \"\\u23a3\";\n font = \"Size4-Regular\";\n svgLabel = \"lfloor\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\lceil\" || delim === \"\\u2308\") {\n top = \"\\u23a1\";\n repeat = bottom = \"\\u23a2\";\n font = \"Size4-Regular\";\n svgLabel = \"lceil\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\rfloor\" || delim === \"\\u230b\") {\n repeat = top = \"\\u23a5\";\n bottom = \"\\u23a6\";\n font = \"Size4-Regular\";\n svgLabel = \"rfloor\";\n viewBoxWidth = 667;\n } else if (delim === \"\\\\rceil\" || delim === \"\\u2309\") {\n top = \"\\u23a4\";\n repeat = bottom = \"\\u23a5\";\n font = \"Size4-Regular\";\n svgLabel = \"rceil\";\n viewBoxWidth = 667;\n } else if (delim === \"(\" || delim === \"\\\\lparen\") {\n top = \"\\u239b\";\n repeat = \"\\u239c\";\n bottom = \"\\u239d\";\n font = \"Size4-Regular\";\n svgLabel = \"lparen\";\n viewBoxWidth = 875;\n } else if (delim === \")\" || delim === \"\\\\rparen\") {\n top = \"\\u239e\";\n repeat = \"\\u239f\";\n bottom = \"\\u23a0\";\n font = \"Size4-Regular\";\n svgLabel = \"rparen\";\n viewBoxWidth = 875;\n } else if (delim === \"\\\\{\" || delim === \"\\\\lbrace\") {\n top = \"\\u23a7\";\n middle = \"\\u23a8\";\n bottom = \"\\u23a9\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\}\" || delim === \"\\\\rbrace\") {\n top = \"\\u23ab\";\n middle = \"\\u23ac\";\n bottom = \"\\u23ad\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\lgroup\" || delim === \"\\u27ee\") {\n top = \"\\u23a7\";\n bottom = \"\\u23a9\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\rgroup\" || delim === \"\\u27ef\") {\n top = \"\\u23ab\";\n bottom = \"\\u23ad\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\lmoustache\" || delim === \"\\u23b0\") {\n top = \"\\u23a7\";\n bottom = \"\\u23ad\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } else if (delim === \"\\\\rmoustache\" || delim === \"\\u23b1\") {\n top = \"\\u23ab\";\n bottom = \"\\u23a9\";\n repeat = \"\\u23aa\";\n font = \"Size4-Regular\";\n } // Get the metrics of the four sections\n\n\n var topMetrics = getMetrics(top, font, mode);\n var topHeightTotal = topMetrics.height + topMetrics.depth;\n var repeatMetrics = getMetrics(repeat, font, mode);\n var repeatHeightTotal = repeatMetrics.height + repeatMetrics.depth;\n var bottomMetrics = getMetrics(bottom, font, mode);\n var bottomHeightTotal = bottomMetrics.height + bottomMetrics.depth;\n var middleHeightTotal = 0;\n var middleFactor = 1;\n\n if (middle !== null) {\n var middleMetrics = getMetrics(middle, font, mode);\n middleHeightTotal = middleMetrics.height + middleMetrics.depth;\n middleFactor = 2; // repeat symmetrically above and below middle\n } // Calculate the minimal height that the delimiter can have.\n // It is at least the size of the top, bottom, and optional middle combined.\n\n\n var minHeight = topHeightTotal + bottomHeightTotal + middleHeightTotal; // Compute the number of copies of the repeat symbol we will need\n\n var repeatCount = Math.max(0, Math.ceil((heightTotal - minHeight) / (middleFactor * repeatHeightTotal))); // Compute the total height of the delimiter including all the symbols\n\n var realHeightTotal = minHeight + repeatCount * middleFactor * repeatHeightTotal; // The center of the delimiter is placed at the center of the axis. Note\n // that in this context, \"center\" means that the delimiter should be\n // centered around the axis in the current style, while normally it is\n // centered around the axis in textstyle.\n\n var axisHeight = options.fontMetrics().axisHeight;\n\n if (center) {\n axisHeight *= options.sizeMultiplier;\n } // Calculate the depth\n\n\n var depth = realHeightTotal / 2 - axisHeight; // Now, we start building the pieces that will go into the vlist\n // Keep a list of the pieces of the stacked delimiter\n\n var stack = [];\n\n if (svgLabel.length > 0) {\n // Instead of stacking glyphs, create a single SVG.\n // This evades browser problems with imprecise positioning of spans.\n var midHeight = realHeightTotal - topHeightTotal - bottomHeightTotal;\n var viewBoxHeight = Math.round(realHeightTotal * 1000);\n var pathStr = tallDelim(svgLabel, Math.round(midHeight * 1000));\n var path = new PathNode(svgLabel, pathStr);\n var width = (viewBoxWidth / 1000).toFixed(3) + \"em\";\n var height = (viewBoxHeight / 1000).toFixed(3) + \"em\";\n var svg = new SvgNode([path], {\n \"width\": width,\n \"height\": height,\n \"viewBox\": \"0 0 \" + viewBoxWidth + \" \" + viewBoxHeight\n });\n var wrapper = buildCommon.makeSvgSpan([], [svg], options);\n wrapper.height = viewBoxHeight / 1000;\n wrapper.style.width = width;\n wrapper.style.height = height;\n stack.push({\n type: \"elem\",\n elem: wrapper\n });\n } else {\n // Stack glyphs\n // Start by adding the bottom symbol\n stack.push(makeGlyphSpan(bottom, font, mode));\n stack.push(lap); // overlap\n\n if (middle === null) {\n // The middle section will be an SVG. Make it an extra 0.016em tall.\n // We'll overlap by 0.008em at top and bottom.\n var innerHeight = realHeightTotal - topHeightTotal - bottomHeightTotal + 2 * lapInEms;\n stack.push(makeInner(repeat, innerHeight, options));\n } else {\n // When there is a middle bit, we need the middle part and two repeated\n // sections\n var _innerHeight = (realHeightTotal - topHeightTotal - bottomHeightTotal - middleHeightTotal) / 2 + 2 * lapInEms;\n\n stack.push(makeInner(repeat, _innerHeight, options)); // Now insert the middle of the brace.\n\n stack.push(lap);\n stack.push(makeGlyphSpan(middle, font, mode));\n stack.push(lap);\n stack.push(makeInner(repeat, _innerHeight, options));\n } // Add the top symbol\n\n\n stack.push(lap);\n stack.push(makeGlyphSpan(top, font, mode));\n } // Finally, build the vlist\n\n\n var newOptions = options.havingBaseStyle(Style$1.TEXT);\n var inner = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: depth,\n children: stack\n }, newOptions);\n return styleWrap(buildCommon.makeSpan([\"delimsizing\", \"mult\"], [inner], newOptions), Style$1.TEXT, options, classes);\n}; // All surds have 0.08em padding above the vinculum inside the SVG.\n// That keeps browser span height rounding error from pinching the line.\n\n\nvar vbPad = 80; // padding above the surd, measured inside the viewBox.\n\nvar emPad = 0.08; // padding, in ems, measured in the document.\n\nvar sqrtSvg = function sqrtSvg(sqrtName, height, viewBoxHeight, extraVinculum, options) {\n var path = sqrtPath(sqrtName, extraVinculum, viewBoxHeight);\n var pathNode = new PathNode(sqrtName, path);\n var svg = new SvgNode([pathNode], {\n // Note: 1000:1 ratio of viewBox to document em width.\n \"width\": \"400em\",\n \"height\": makeEm(height),\n \"viewBox\": \"0 0 400000 \" + viewBoxHeight,\n \"preserveAspectRatio\": \"xMinYMin slice\"\n });\n return buildCommon.makeSvgSpan([\"hide-tail\"], [svg], options);\n};\n/**\n * Make a sqrt image of the given height,\n */\n\n\nvar makeSqrtImage = function makeSqrtImage(height, options) {\n // Define a newOptions that removes the effect of size changes such as \\Huge.\n // We don't pick different a height surd for \\Huge. For it, we scale up.\n var newOptions = options.havingBaseSizing(); // Pick the desired surd glyph from a sequence of surds.\n\n var delim = traverseSequence(\"\\\\surd\", height * newOptions.sizeMultiplier, stackLargeDelimiterSequence, newOptions);\n var sizeMultiplier = newOptions.sizeMultiplier; // default\n // The standard sqrt SVGs each have a 0.04em thick vinculum.\n // If Settings.minRuleThickness is larger than that, we add extraVinculum.\n\n var extraVinculum = Math.max(0, options.minRuleThickness - options.fontMetrics().sqrtRuleThickness); // Create a span containing an SVG image of a sqrt symbol.\n\n var span;\n var spanHeight = 0;\n var texHeight = 0;\n var viewBoxHeight = 0;\n var advanceWidth; // We create viewBoxes with 80 units of \"padding\" above each surd.\n // Then browser rounding error on the parent span height will not\n // encroach on the ink of the vinculum. But that padding is not\n // included in the TeX-like `height` used for calculation of\n // vertical alignment. So texHeight = span.height < span.style.height.\n\n if (delim.type === \"small\") {\n // Get an SVG that is derived from glyph U+221A in font KaTeX-Main.\n // 1000 unit normal glyph height.\n viewBoxHeight = 1000 + 1000 * extraVinculum + vbPad;\n\n if (height < 1.0) {\n sizeMultiplier = 1.0; // mimic a \\textfont radical\n } else if (height < 1.4) {\n sizeMultiplier = 0.7; // mimic a \\scriptfont radical\n }\n\n spanHeight = (1.0 + extraVinculum + emPad) / sizeMultiplier;\n texHeight = (1.00 + extraVinculum) / sizeMultiplier;\n span = sqrtSvg(\"sqrtMain\", spanHeight, viewBoxHeight, extraVinculum, options);\n span.style.minWidth = \"0.853em\";\n advanceWidth = 0.833 / sizeMultiplier; // from the font.\n } else if (delim.type === \"large\") {\n // These SVGs come from fonts: KaTeX_Size1, _Size2, etc.\n viewBoxHeight = (1000 + vbPad) * sizeToMaxHeight[delim.size];\n texHeight = (sizeToMaxHeight[delim.size] + extraVinculum) / sizeMultiplier;\n spanHeight = (sizeToMaxHeight[delim.size] + extraVinculum + emPad) / sizeMultiplier;\n span = sqrtSvg(\"sqrtSize\" + delim.size, spanHeight, viewBoxHeight, extraVinculum, options);\n span.style.minWidth = \"1.02em\";\n advanceWidth = 1.0 / sizeMultiplier; // 1.0 from the font.\n } else {\n // Tall sqrt. In TeX, this would be stacked using multiple glyphs.\n // We'll use a single SVG to accomplish the same thing.\n spanHeight = height + extraVinculum + emPad;\n texHeight = height + extraVinculum;\n viewBoxHeight = Math.floor(1000 * height + extraVinculum) + vbPad;\n span = sqrtSvg(\"sqrtTall\", spanHeight, viewBoxHeight, extraVinculum, options);\n span.style.minWidth = \"0.742em\";\n advanceWidth = 1.056;\n }\n\n span.height = texHeight;\n span.style.height = makeEm(spanHeight);\n return {\n span,\n advanceWidth,\n // Calculate the actual line width.\n // This actually should depend on the chosen font -- e.g. \\boldmath\n // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and\n // have thicker rules.\n ruleWidth: (options.fontMetrics().sqrtRuleThickness + extraVinculum) * sizeMultiplier\n };\n}; // There are three kinds of delimiters, delimiters that stack when they become\n// too large\n\n\nvar stackLargeDelimiters = [\"(\", \"\\\\lparen\", \")\", \"\\\\rparen\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\u230a\", \"\\u230b\", \"\\\\lceil\", \"\\\\rceil\", \"\\u2308\", \"\\u2309\", \"\\\\surd\"]; // delimiters that always stack\n\nvar stackAlwaysDelimiters = [\"\\\\uparrow\", \"\\\\downarrow\", \"\\\\updownarrow\", \"\\\\Uparrow\", \"\\\\Downarrow\", \"\\\\Updownarrow\", \"|\", \"\\\\|\", \"\\\\vert\", \"\\\\Vert\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\u27ee\", \"\\u27ef\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"\\u23b0\", \"\\u23b1\"]; // and delimiters that never stack\n\nvar stackNeverDelimiters = [\"<\", \">\", \"\\\\langle\", \"\\\\rangle\", \"/\", \"\\\\backslash\", \"\\\\lt\", \"\\\\gt\"]; // Metrics of the different sizes. Found by looking at TeX's output of\n// $\\bigl| // \\Bigl| \\biggl| \\Biggl| \\showlists$\n// Used to create stacked delimiters of appropriate sizes in makeSizedDelim.\n\nvar sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3.0];\n/**\n * Used to create a delimiter of a specific size, where `size` is 1, 2, 3, or 4.\n */\n\nvar makeSizedDelim = function makeSizedDelim(delim, size, options, mode, classes) {\n // < and > turn into \\langle and \\rangle in delimiters\n if (delim === \"<\" || delim === \"\\\\lt\" || delim === \"\\u27e8\") {\n delim = \"\\\\langle\";\n } else if (delim === \">\" || delim === \"\\\\gt\" || delim === \"\\u27e9\") {\n delim = \"\\\\rangle\";\n } // Sized delimiters are never centered.\n\n\n if (utils.contains(stackLargeDelimiters, delim) || utils.contains(stackNeverDelimiters, delim)) {\n return makeLargeDelim(delim, size, false, options, mode, classes);\n } else if (utils.contains(stackAlwaysDelimiters, delim)) {\n return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);\n } else {\n throw new ParseError(\"Illegal delimiter: '\" + delim + \"'\");\n }\n};\n/**\n * There are three different sequences of delimiter sizes that the delimiters\n * follow depending on the kind of delimiter. This is used when creating custom\n * sized delimiters to decide whether to create a small, large, or stacked\n * delimiter.\n *\n * In real TeX, these sequences aren't explicitly defined, but are instead\n * defined inside the font metrics. Since there are only three sequences that\n * are possible for the delimiters that TeX defines, it is easier to just encode\n * them explicitly here.\n */\n\n\n// Delimiters that never stack try small delimiters and large delimiters only\nvar stackNeverDelimiterSequence = [{\n type: \"small\",\n style: Style$1.SCRIPTSCRIPT\n}, {\n type: \"small\",\n style: Style$1.SCRIPT\n}, {\n type: \"small\",\n style: Style$1.TEXT\n}, {\n type: \"large\",\n size: 1\n}, {\n type: \"large\",\n size: 2\n}, {\n type: \"large\",\n size: 3\n}, {\n type: \"large\",\n size: 4\n}]; // Delimiters that always stack try the small delimiters first, then stack\n\nvar stackAlwaysDelimiterSequence = [{\n type: \"small\",\n style: Style$1.SCRIPTSCRIPT\n}, {\n type: \"small\",\n style: Style$1.SCRIPT\n}, {\n type: \"small\",\n style: Style$1.TEXT\n}, {\n type: \"stack\"\n}]; // Delimiters that stack when large try the small and then large delimiters, and\n// stack afterwards\n\nvar stackLargeDelimiterSequence = [{\n type: \"small\",\n style: Style$1.SCRIPTSCRIPT\n}, {\n type: \"small\",\n style: Style$1.SCRIPT\n}, {\n type: \"small\",\n style: Style$1.TEXT\n}, {\n type: \"large\",\n size: 1\n}, {\n type: \"large\",\n size: 2\n}, {\n type: \"large\",\n size: 3\n}, {\n type: \"large\",\n size: 4\n}, {\n type: \"stack\"\n}];\n/**\n * Get the font used in a delimiter based on what kind of delimiter it is.\n * TODO(#963) Use more specific font family return type once that is introduced.\n */\n\nvar delimTypeToFont = function delimTypeToFont(type) {\n if (type.type === \"small\") {\n return \"Main-Regular\";\n } else if (type.type === \"large\") {\n return \"Size\" + type.size + \"-Regular\";\n } else if (type.type === \"stack\") {\n return \"Size4-Regular\";\n } else {\n throw new Error(\"Add support for delim type '\" + type.type + \"' here.\");\n }\n};\n/**\n * Traverse a sequence of types of delimiters to decide what kind of delimiter\n * should be used to create a delimiter of the given height+depth.\n */\n\n\nvar traverseSequence = function traverseSequence(delim, height, sequence, options) {\n // Here, we choose the index we should start at in the sequences. In smaller\n // sizes (which correspond to larger numbers in style.size) we start earlier\n // in the sequence. Thus, scriptscript starts at index 3-3=0, script starts\n // at index 3-2=1, text starts at 3-1=2, and display starts at min(2,3-0)=2\n var start = Math.min(2, 3 - options.style.size);\n\n for (var i = start; i < sequence.length; i++) {\n if (sequence[i].type === \"stack\") {\n // This is always the last delimiter, so we just break the loop now.\n break;\n }\n\n var metrics = getMetrics(delim, delimTypeToFont(sequence[i]), \"math\");\n var heightDepth = metrics.height + metrics.depth; // Small delimiters are scaled down versions of the same font, so we\n // account for the style change size.\n\n if (sequence[i].type === \"small\") {\n var newOptions = options.havingBaseStyle(sequence[i].style);\n heightDepth *= newOptions.sizeMultiplier;\n } // Check if the delimiter at this size works for the given height.\n\n\n if (heightDepth > height) {\n return sequence[i];\n }\n } // If we reached the end of the sequence, return the last sequence element.\n\n\n return sequence[sequence.length - 1];\n};\n/**\n * Make a delimiter of a given height+depth, with optional centering. Here, we\n * traverse the sequences, and create a delimiter that the sequence tells us to.\n */\n\n\nvar makeCustomSizedDelim = function makeCustomSizedDelim(delim, height, center, options, mode, classes) {\n if (delim === \"<\" || delim === \"\\\\lt\" || delim === \"\\u27e8\") {\n delim = \"\\\\langle\";\n } else if (delim === \">\" || delim === \"\\\\gt\" || delim === \"\\u27e9\") {\n delim = \"\\\\rangle\";\n } // Decide what sequence to use\n\n\n var sequence;\n\n if (utils.contains(stackNeverDelimiters, delim)) {\n sequence = stackNeverDelimiterSequence;\n } else if (utils.contains(stackLargeDelimiters, delim)) {\n sequence = stackLargeDelimiterSequence;\n } else {\n sequence = stackAlwaysDelimiterSequence;\n } // Look through the sequence\n\n\n var delimType = traverseSequence(delim, height, sequence, options); // Get the delimiter from font glyphs.\n // Depending on the sequence element we decided on, call the\n // appropriate function.\n\n if (delimType.type === \"small\") {\n return makeSmallDelim(delim, delimType.style, center, options, mode, classes);\n } else if (delimType.type === \"large\") {\n return makeLargeDelim(delim, delimType.size, center, options, mode, classes);\n } else\n /* if (delimType.type === \"stack\") */\n {\n return makeStackedDelim(delim, height, center, options, mode, classes);\n }\n};\n/**\n * Make a delimiter for use with `\\left` and `\\right`, given a height and depth\n * of an expression that the delimiters surround.\n */\n\n\nvar makeLeftRightDelim = function makeLeftRightDelim(delim, height, depth, options, mode, classes) {\n // We always center \\left/\\right delimiters, so the axis is always shifted\n var axisHeight = options.fontMetrics().axisHeight * options.sizeMultiplier; // Taken from TeX source, tex.web, function make_left_right\n\n var delimiterFactor = 901;\n var delimiterExtend = 5.0 / options.fontMetrics().ptPerEm;\n var maxDistFromAxis = Math.max(height - axisHeight, depth + axisHeight);\n var totalHeight = Math.max( // In real TeX, calculations are done using integral values which are\n // 65536 per pt, or 655360 per em. So, the division here truncates in\n // TeX but doesn't here, producing different results. If we wanted to\n // exactly match TeX's calculation, we could do\n // Math.floor(655360 * maxDistFromAxis / 500) *\n // delimiterFactor / 655360\n // (To see the difference, compare\n // x^{x^{\\left(\\rule{0.1em}{0.68em}\\right)}}\n // in TeX and KaTeX)\n maxDistFromAxis / 500 * delimiterFactor, 2 * maxDistFromAxis - delimiterExtend); // Finally, we defer to `makeCustomSizedDelim` with our calculated total\n // height\n\n return makeCustomSizedDelim(delim, totalHeight, true, options, mode, classes);\n};\n\nvar delimiter = {\n sqrtImage: makeSqrtImage,\n sizedDelim: makeSizedDelim,\n sizeToMaxHeight: sizeToMaxHeight,\n customSizedDelim: makeCustomSizedDelim,\n leftRightDelim: makeLeftRightDelim\n};\n\n// Extra data needed for the delimiter handler down below\nvar delimiterSizes = {\n \"\\\\bigl\": {\n mclass: \"mopen\",\n size: 1\n },\n \"\\\\Bigl\": {\n mclass: \"mopen\",\n size: 2\n },\n \"\\\\biggl\": {\n mclass: \"mopen\",\n size: 3\n },\n \"\\\\Biggl\": {\n mclass: \"mopen\",\n size: 4\n },\n \"\\\\bigr\": {\n mclass: \"mclose\",\n size: 1\n },\n \"\\\\Bigr\": {\n mclass: \"mclose\",\n size: 2\n },\n \"\\\\biggr\": {\n mclass: \"mclose\",\n size: 3\n },\n \"\\\\Biggr\": {\n mclass: \"mclose\",\n size: 4\n },\n \"\\\\bigm\": {\n mclass: \"mrel\",\n size: 1\n },\n \"\\\\Bigm\": {\n mclass: \"mrel\",\n size: 2\n },\n \"\\\\biggm\": {\n mclass: \"mrel\",\n size: 3\n },\n \"\\\\Biggm\": {\n mclass: \"mrel\",\n size: 4\n },\n \"\\\\big\": {\n mclass: \"mord\",\n size: 1\n },\n \"\\\\Big\": {\n mclass: \"mord\",\n size: 2\n },\n \"\\\\bigg\": {\n mclass: \"mord\",\n size: 3\n },\n \"\\\\Bigg\": {\n mclass: \"mord\",\n size: 4\n }\n};\nvar delimiters = [\"(\", \"\\\\lparen\", \")\", \"\\\\rparen\", \"[\", \"\\\\lbrack\", \"]\", \"\\\\rbrack\", \"\\\\{\", \"\\\\lbrace\", \"\\\\}\", \"\\\\rbrace\", \"\\\\lfloor\", \"\\\\rfloor\", \"\\u230a\", \"\\u230b\", \"\\\\lceil\", \"\\\\rceil\", \"\\u2308\", \"\\u2309\", \"<\", \">\", \"\\\\langle\", \"\\u27e8\", \"\\\\rangle\", \"\\u27e9\", \"\\\\lt\", \"\\\\gt\", \"\\\\lvert\", \"\\\\rvert\", \"\\\\lVert\", \"\\\\rVert\", \"\\\\lgroup\", \"\\\\rgroup\", \"\\u27ee\", \"\\u27ef\", \"\\\\lmoustache\", \"\\\\rmoustache\", \"\\u23b0\", \"\\u23b1\", \"/\", \"\\\\backslash\", \"|\", \"\\\\vert\", \"\\\\|\", \"\\\\Vert\", \"\\\\uparrow\", \"\\\\Uparrow\", \"\\\\downarrow\", \"\\\\Downarrow\", \"\\\\updownarrow\", \"\\\\Updownarrow\", \".\"];\n\n// Delimiter functions\nfunction checkDelimiter(delim, context) {\n var symDelim = checkSymbolNodeType(delim);\n\n if (symDelim && utils.contains(delimiters, symDelim.text)) {\n return symDelim;\n } else if (symDelim) {\n throw new ParseError(\"Invalid delimiter '\" + symDelim.text + \"' after '\" + context.funcName + \"'\", delim);\n } else {\n throw new ParseError(\"Invalid delimiter type '\" + delim.type + \"'\", delim);\n }\n}\n\ndefineFunction({\n type: \"delimsizing\",\n names: [\"\\\\bigl\", \"\\\\Bigl\", \"\\\\biggl\", \"\\\\Biggl\", \"\\\\bigr\", \"\\\\Bigr\", \"\\\\biggr\", \"\\\\Biggr\", \"\\\\bigm\", \"\\\\Bigm\", \"\\\\biggm\", \"\\\\Biggm\", \"\\\\big\", \"\\\\Big\", \"\\\\bigg\", \"\\\\Bigg\"],\n props: {\n numArgs: 1,\n argTypes: [\"primitive\"]\n },\n handler: (context, args) => {\n var delim = checkDelimiter(args[0], context);\n return {\n type: \"delimsizing\",\n mode: context.parser.mode,\n size: delimiterSizes[context.funcName].size,\n mclass: delimiterSizes[context.funcName].mclass,\n delim: delim.text\n };\n },\n htmlBuilder: (group, options) => {\n if (group.delim === \".\") {\n // Empty delimiters still count as elements, even though they don't\n // show anything.\n return buildCommon.makeSpan([group.mclass]);\n } // Use delimiter.sizedDelim to generate the delimiter.\n\n\n return delimiter.sizedDelim(group.delim, group.size, options, group.mode, [group.mclass]);\n },\n mathmlBuilder: group => {\n var children = [];\n\n if (group.delim !== \".\") {\n children.push(makeText(group.delim, group.mode));\n }\n\n var node = new mathMLTree.MathNode(\"mo\", children);\n\n if (group.mclass === \"mopen\" || group.mclass === \"mclose\") {\n // Only some of the delimsizing functions act as fences, and they\n // return \"mopen\" or \"mclose\" mclass.\n node.setAttribute(\"fence\", \"true\");\n } else {\n // Explicitly disable fencing if it's not a fence, to override the\n // defaults.\n node.setAttribute(\"fence\", \"false\");\n }\n\n node.setAttribute(\"stretchy\", \"true\");\n var size = makeEm(delimiter.sizeToMaxHeight[group.size]);\n node.setAttribute(\"minsize\", size);\n node.setAttribute(\"maxsize\", size);\n return node;\n }\n});\n\nfunction assertParsed(group) {\n if (!group.body) {\n throw new Error(\"Bug: The leftright ParseNode wasn't fully parsed.\");\n }\n}\n\ndefineFunction({\n type: \"leftright-right\",\n names: [\"\\\\right\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (context, args) => {\n // \\left case below triggers parsing of \\right in\n // `const right = parser.parseFunction();`\n // uses this return value.\n var color = context.parser.gullet.macros.get(\"\\\\current@color\");\n\n if (color && typeof color !== \"string\") {\n throw new ParseError(\"\\\\current@color set to non-string in \\\\right\");\n }\n\n return {\n type: \"leftright-right\",\n mode: context.parser.mode,\n delim: checkDelimiter(args[0], context).text,\n color // undefined if not set via \\color\n\n };\n }\n});\ndefineFunction({\n type: \"leftright\",\n names: [\"\\\\left\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (context, args) => {\n var delim = checkDelimiter(args[0], context);\n var parser = context.parser; // Parse out the implicit body\n\n ++parser.leftrightDepth; // parseExpression stops before '\\\\right'\n\n var body = parser.parseExpression(false);\n --parser.leftrightDepth; // Check the next token\n\n parser.expect(\"\\\\right\", false);\n var right = assertNodeType(parser.parseFunction(), \"leftright-right\");\n return {\n type: \"leftright\",\n mode: parser.mode,\n body,\n left: delim.text,\n right: right.delim,\n rightColor: right.color\n };\n },\n htmlBuilder: (group, options) => {\n assertParsed(group); // Build the inner expression\n\n var inner = buildExpression$1(group.body, options, true, [\"mopen\", \"mclose\"]);\n var innerHeight = 0;\n var innerDepth = 0;\n var hadMiddle = false; // Calculate its height and depth\n\n for (var i = 0; i < inner.length; i++) {\n // Property `isMiddle` not defined on `span`. See comment in\n // \"middle\"'s htmlBuilder.\n // $FlowFixMe\n if (inner[i].isMiddle) {\n hadMiddle = true;\n } else {\n innerHeight = Math.max(inner[i].height, innerHeight);\n innerDepth = Math.max(inner[i].depth, innerDepth);\n }\n } // The size of delimiters is the same, regardless of what style we are\n // in. Thus, to correctly calculate the size of delimiter we need around\n // a group, we scale down the inner size based on the size.\n\n\n innerHeight *= options.sizeMultiplier;\n innerDepth *= options.sizeMultiplier;\n var leftDelim;\n\n if (group.left === \".\") {\n // Empty delimiters in \\left and \\right make null delimiter spaces.\n leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n } else {\n // Otherwise, use leftRightDelim to generate the correct sized\n // delimiter.\n leftDelim = delimiter.leftRightDelim(group.left, innerHeight, innerDepth, options, group.mode, [\"mopen\"]);\n } // Add it to the beginning of the expression\n\n\n inner.unshift(leftDelim); // Handle middle delimiters\n\n if (hadMiddle) {\n for (var _i = 1; _i < inner.length; _i++) {\n var middleDelim = inner[_i]; // Property `isMiddle` not defined on `span`. See comment in\n // \"middle\"'s htmlBuilder.\n // $FlowFixMe\n\n var isMiddle = middleDelim.isMiddle;\n\n if (isMiddle) {\n // Apply the options that were active when \\middle was called\n inner[_i] = delimiter.leftRightDelim(isMiddle.delim, innerHeight, innerDepth, isMiddle.options, group.mode, []);\n }\n }\n }\n\n var rightDelim; // Same for the right delimiter, but using color specified by \\color\n\n if (group.right === \".\") {\n rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n } else {\n var colorOptions = group.rightColor ? options.withColor(group.rightColor) : options;\n rightDelim = delimiter.leftRightDelim(group.right, innerHeight, innerDepth, colorOptions, group.mode, [\"mclose\"]);\n } // Add it to the end of the expression.\n\n\n inner.push(rightDelim);\n return buildCommon.makeSpan([\"minner\"], inner, options);\n },\n mathmlBuilder: (group, options) => {\n assertParsed(group);\n var inner = buildExpression(group.body, options);\n\n if (group.left !== \".\") {\n var leftNode = new mathMLTree.MathNode(\"mo\", [makeText(group.left, group.mode)]);\n leftNode.setAttribute(\"fence\", \"true\");\n inner.unshift(leftNode);\n }\n\n if (group.right !== \".\") {\n var rightNode = new mathMLTree.MathNode(\"mo\", [makeText(group.right, group.mode)]);\n rightNode.setAttribute(\"fence\", \"true\");\n\n if (group.rightColor) {\n rightNode.setAttribute(\"mathcolor\", group.rightColor);\n }\n\n inner.push(rightNode);\n }\n\n return makeRow(inner);\n }\n});\ndefineFunction({\n type: \"middle\",\n names: [\"\\\\middle\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (context, args) => {\n var delim = checkDelimiter(args[0], context);\n\n if (!context.parser.leftrightDepth) {\n throw new ParseError(\"\\\\middle without preceding \\\\left\", delim);\n }\n\n return {\n type: \"middle\",\n mode: context.parser.mode,\n delim: delim.text\n };\n },\n htmlBuilder: (group, options) => {\n var middleDelim;\n\n if (group.delim === \".\") {\n middleDelim = makeNullDelimiter(options, []);\n } else {\n middleDelim = delimiter.sizedDelim(group.delim, 1, options, group.mode, []);\n var isMiddle = {\n delim: group.delim,\n options\n }; // Property `isMiddle` not defined on `span`. It is only used in\n // this file above.\n // TODO: Fix this violation of the `span` type and possibly rename\n // things since `isMiddle` sounds like a boolean, but is a struct.\n // $FlowFixMe\n\n middleDelim.isMiddle = isMiddle;\n }\n\n return middleDelim;\n },\n mathmlBuilder: (group, options) => {\n // A Firefox \\middle will stretch a character vertically only if it\n // is in the fence part of the operator dictionary at:\n // https://www.w3.org/TR/MathML3/appendixc.html.\n // So we need to avoid U+2223 and use plain \"|\" instead.\n var textNode = group.delim === \"\\\\vert\" || group.delim === \"|\" ? makeText(\"|\", \"text\") : makeText(group.delim, group.mode);\n var middleNode = new mathMLTree.MathNode(\"mo\", [textNode]);\n middleNode.setAttribute(\"fence\", \"true\"); // MathML gives 5/18em spacing to each element.\n // \\middle should get delimiter spacing instead.\n\n middleNode.setAttribute(\"lspace\", \"0.05em\");\n middleNode.setAttribute(\"rspace\", \"0.05em\");\n return middleNode;\n }\n});\n\nvar htmlBuilder$7 = (group, options) => {\n // \\cancel, \\bcancel, \\xcancel, \\sout, \\fbox, \\colorbox, \\fcolorbox, \\phase\n // Some groups can return document fragments. Handle those by wrapping\n // them in a span.\n var inner = buildCommon.wrapFragment(buildGroup$1(group.body, options), options);\n var label = group.label.slice(1);\n var scale = options.sizeMultiplier;\n var img;\n var imgShift = 0; // In the LaTeX cancel package, line geometry is slightly different\n // depending on whether the subject is wider than it is tall, or vice versa.\n // We don't know the width of a group, so as a proxy, we test if\n // the subject is a single character. This captures most of the\n // subjects that should get the \"tall\" treatment.\n\n var isSingleChar = utils.isCharacterBox(group.body);\n\n if (label === \"sout\") {\n img = buildCommon.makeSpan([\"stretchy\", \"sout\"]);\n img.height = options.fontMetrics().defaultRuleThickness / scale;\n imgShift = -0.5 * options.fontMetrics().xHeight;\n } else if (label === \"phase\") {\n // Set a couple of dimensions from the steinmetz package.\n var lineWeight = calculateSize({\n number: 0.6,\n unit: \"pt\"\n }, options);\n var clearance = calculateSize({\n number: 0.35,\n unit: \"ex\"\n }, options); // Prevent size changes like \\Huge from affecting line thickness\n\n var newOptions = options.havingBaseSizing();\n scale = scale / newOptions.sizeMultiplier;\n var angleHeight = inner.height + inner.depth + lineWeight + clearance; // Reserve a left pad for the angle.\n\n inner.style.paddingLeft = makeEm(angleHeight / 2 + lineWeight); // Create an SVG\n\n var viewBoxHeight = Math.floor(1000 * angleHeight * scale);\n var path = phasePath(viewBoxHeight);\n var svgNode = new SvgNode([new PathNode(\"phase\", path)], {\n \"width\": \"400em\",\n \"height\": makeEm(viewBoxHeight / 1000),\n \"viewBox\": \"0 0 400000 \" + viewBoxHeight,\n \"preserveAspectRatio\": \"xMinYMin slice\"\n }); // Wrap it in a span with overflow: hidden.\n\n img = buildCommon.makeSvgSpan([\"hide-tail\"], [svgNode], options);\n img.style.height = makeEm(angleHeight);\n imgShift = inner.depth + lineWeight + clearance;\n } else {\n // Add horizontal padding\n if (/cancel/.test(label)) {\n if (!isSingleChar) {\n inner.classes.push(\"cancel-pad\");\n }\n } else if (label === \"angl\") {\n inner.classes.push(\"anglpad\");\n } else {\n inner.classes.push(\"boxpad\");\n } // Add vertical padding\n\n\n var topPad = 0;\n var bottomPad = 0;\n var ruleThickness = 0; // ref: cancel package: \\advance\\totalheight2\\p@ % \"+2\"\n\n if (/box/.test(label)) {\n ruleThickness = Math.max(options.fontMetrics().fboxrule, // default\n options.minRuleThickness // User override.\n );\n topPad = options.fontMetrics().fboxsep + (label === \"colorbox\" ? 0 : ruleThickness);\n bottomPad = topPad;\n } else if (label === \"angl\") {\n ruleThickness = Math.max(options.fontMetrics().defaultRuleThickness, options.minRuleThickness);\n topPad = 4 * ruleThickness; // gap = 3 \u00D7 line, plus the line itself.\n\n bottomPad = Math.max(0, 0.25 - inner.depth);\n } else {\n topPad = isSingleChar ? 0.2 : 0;\n bottomPad = topPad;\n }\n\n img = stretchy.encloseSpan(inner, label, topPad, bottomPad, options);\n\n if (/fbox|boxed|fcolorbox/.test(label)) {\n img.style.borderStyle = \"solid\";\n img.style.borderWidth = makeEm(ruleThickness);\n } else if (label === \"angl\" && ruleThickness !== 0.049) {\n img.style.borderTopWidth = makeEm(ruleThickness);\n img.style.borderRightWidth = makeEm(ruleThickness);\n }\n\n imgShift = inner.depth + bottomPad;\n\n if (group.backgroundColor) {\n img.style.backgroundColor = group.backgroundColor;\n\n if (group.borderColor) {\n img.style.borderColor = group.borderColor;\n }\n }\n }\n\n var vlist;\n\n if (group.backgroundColor) {\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [// Put the color background behind inner;\n {\n type: \"elem\",\n elem: img,\n shift: imgShift\n }, {\n type: \"elem\",\n elem: inner,\n shift: 0\n }]\n }, options);\n } else {\n var classes = /cancel|phase/.test(label) ? [\"svg-align\"] : [];\n vlist = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [// Write the \\cancel stroke on top of inner.\n {\n type: \"elem\",\n elem: inner,\n shift: 0\n }, {\n type: \"elem\",\n elem: img,\n shift: imgShift,\n wrapperClasses: classes\n }]\n }, options);\n }\n\n if (/cancel/.test(label)) {\n // The cancel package documentation says that cancel lines add their height\n // to the expression, but tests show that isn't how it actually works.\n vlist.height = inner.height;\n vlist.depth = inner.depth;\n }\n\n if (/cancel/.test(label) && !isSingleChar) {\n // cancel does not create horiz space for its line extension.\n return buildCommon.makeSpan([\"mord\", \"cancel-lap\"], [vlist], options);\n } else {\n return buildCommon.makeSpan([\"mord\"], [vlist], options);\n }\n};\n\nvar mathmlBuilder$6 = (group, options) => {\n var fboxsep = 0;\n var node = new mathMLTree.MathNode(group.label.indexOf(\"colorbox\") > -1 ? \"mpadded\" : \"menclose\", [buildGroup(group.body, options)]);\n\n switch (group.label) {\n case \"\\\\cancel\":\n node.setAttribute(\"notation\", \"updiagonalstrike\");\n break;\n\n case \"\\\\bcancel\":\n node.setAttribute(\"notation\", \"downdiagonalstrike\");\n break;\n\n case \"\\\\phase\":\n node.setAttribute(\"notation\", \"phasorangle\");\n break;\n\n case \"\\\\sout\":\n node.setAttribute(\"notation\", \"horizontalstrike\");\n break;\n\n case \"\\\\fbox\":\n node.setAttribute(\"notation\", \"box\");\n break;\n\n case \"\\\\angl\":\n node.setAttribute(\"notation\", \"actuarial\");\n break;\n\n case \"\\\\fcolorbox\":\n case \"\\\\colorbox\":\n // doesn't have a good notation option. So use \n // instead. Set some attributes that come included with .\n fboxsep = options.fontMetrics().fboxsep * options.fontMetrics().ptPerEm;\n node.setAttribute(\"width\", \"+\" + 2 * fboxsep + \"pt\");\n node.setAttribute(\"height\", \"+\" + 2 * fboxsep + \"pt\");\n node.setAttribute(\"lspace\", fboxsep + \"pt\"); //\n\n node.setAttribute(\"voffset\", fboxsep + \"pt\");\n\n if (group.label === \"\\\\fcolorbox\") {\n var thk = Math.max(options.fontMetrics().fboxrule, // default\n options.minRuleThickness // user override\n );\n node.setAttribute(\"style\", \"border: \" + thk + \"em solid \" + String(group.borderColor));\n }\n\n break;\n\n case \"\\\\xcancel\":\n node.setAttribute(\"notation\", \"updiagonalstrike downdiagonalstrike\");\n break;\n }\n\n if (group.backgroundColor) {\n node.setAttribute(\"mathbackground\", group.backgroundColor);\n }\n\n return node;\n};\n\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\colorbox\"],\n props: {\n numArgs: 2,\n allowedInText: true,\n argTypes: [\"color\", \"text\"]\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser,\n funcName\n } = _ref;\n var color = assertNodeType(args[0], \"color-token\").color;\n var body = args[1];\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: funcName,\n backgroundColor: color,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$7,\n mathmlBuilder: mathmlBuilder$6\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\fcolorbox\"],\n props: {\n numArgs: 3,\n allowedInText: true,\n argTypes: [\"color\", \"color\", \"text\"]\n },\n\n handler(_ref2, args, optArgs) {\n var {\n parser,\n funcName\n } = _ref2;\n var borderColor = assertNodeType(args[0], \"color-token\").color;\n var backgroundColor = assertNodeType(args[1], \"color-token\").color;\n var body = args[2];\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: funcName,\n backgroundColor,\n borderColor,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$7,\n mathmlBuilder: mathmlBuilder$6\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\fbox\"],\n props: {\n numArgs: 1,\n argTypes: [\"hbox\"],\n allowedInText: true\n },\n\n handler(_ref3, args) {\n var {\n parser\n } = _ref3;\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: \"\\\\fbox\",\n body: args[0]\n };\n }\n\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\cancel\", \"\\\\bcancel\", \"\\\\xcancel\", \"\\\\sout\", \"\\\\phase\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref4, args) {\n var {\n parser,\n funcName\n } = _ref4;\n var body = args[0];\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: funcName,\n body\n };\n },\n\n htmlBuilder: htmlBuilder$7,\n mathmlBuilder: mathmlBuilder$6\n});\ndefineFunction({\n type: \"enclose\",\n names: [\"\\\\angl\"],\n props: {\n numArgs: 1,\n argTypes: [\"hbox\"],\n allowedInText: false\n },\n\n handler(_ref5, args) {\n var {\n parser\n } = _ref5;\n return {\n type: \"enclose\",\n mode: parser.mode,\n label: \"\\\\angl\",\n body: args[0]\n };\n }\n\n});\n\n/**\n * All registered environments.\n * `environments.js` exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary via `environments.js`.\n */\nvar _environments = {};\nfunction defineEnvironment(_ref) {\n var {\n type,\n names,\n props,\n handler,\n htmlBuilder,\n mathmlBuilder\n } = _ref;\n // Set default values of environments.\n var data = {\n type,\n numArgs: props.numArgs || 0,\n allowedInText: false,\n numOptionalArgs: 0,\n handler\n };\n\n for (var i = 0; i < names.length; ++i) {\n // TODO: The value type of _environments should be a type union of all\n // possible `EnvSpec<>` possibilities instead of `EnvSpec<*>`, which is\n // an existential type.\n _environments[names[i]] = data;\n }\n\n if (htmlBuilder) {\n _htmlGroupBuilders[type] = htmlBuilder;\n }\n\n if (mathmlBuilder) {\n _mathmlGroupBuilders[type] = mathmlBuilder;\n }\n}\n\n/**\n * All registered global/built-in macros.\n * `macros.js` exports this same dictionary again and makes it public.\n * `Parser.js` requires this dictionary via `macros.js`.\n */\nvar _macros = {}; // This function might one day accept an additional argument and do more things.\n\nfunction defineMacro(name, body) {\n _macros[name] = body;\n}\n\n// Helper functions\nfunction getHLines(parser) {\n // Return an array. The array length = number of hlines.\n // Each element in the array tells if the line is dashed.\n var hlineInfo = [];\n parser.consumeSpaces();\n var nxt = parser.fetch().text;\n\n if (nxt === \"\\\\relax\") {\n // \\relax is an artifact of the \\cr macro below\n parser.consume();\n parser.consumeSpaces();\n nxt = parser.fetch().text;\n }\n\n while (nxt === \"\\\\hline\" || nxt === \"\\\\hdashline\") {\n parser.consume();\n hlineInfo.push(nxt === \"\\\\hdashline\");\n parser.consumeSpaces();\n nxt = parser.fetch().text;\n }\n\n return hlineInfo;\n}\n\nvar validateAmsEnvironmentContext = context => {\n var settings = context.parser.settings;\n\n if (!settings.displayMode) {\n throw new ParseError(\"{\" + context.envName + \"} can be used only in\" + \" display mode.\");\n }\n}; // autoTag (an argument to parseArray) can be one of three values:\n// * undefined: Regular (not-top-level) array; no tags on each row\n// * true: Automatic equation numbering, overridable by \\tag\n// * false: Tags allowed on each row, but no automatic numbering\n// This function *doesn't* work with the \"split\" environment name.\n\n\nfunction getAutoTag(name) {\n if (name.indexOf(\"ed\") === -1) {\n return name.indexOf(\"*\") === -1;\n } // return undefined;\n\n}\n/**\n * Parse the body of the environment, with rows delimited by \\\\ and\n * columns delimited by &, and create a nested list in row-major order\n * with one group per cell. If given an optional argument style\n * (\"text\", \"display\", etc.), then each cell is cast into that style.\n */\n\n\nfunction parseArray(parser, _ref, style) {\n var {\n hskipBeforeAndAfter,\n addJot,\n cols,\n arraystretch,\n colSeparationType,\n autoTag,\n singleRow,\n emptySingleRow,\n maxNumCols,\n leqno\n } = _ref;\n parser.gullet.beginGroup();\n\n if (!singleRow) {\n // \\cr is equivalent to \\\\ without the optional size argument (see below)\n // TODO: provide helpful error when \\cr is used outside array environment\n parser.gullet.macros.set(\"\\\\cr\", \"\\\\\\\\\\\\relax\");\n } // Get current arraystretch if it's not set by the environment\n\n\n if (!arraystretch) {\n var stretch = parser.gullet.expandMacroAsText(\"\\\\arraystretch\");\n\n if (stretch == null) {\n // Default \\arraystretch from lttab.dtx\n arraystretch = 1;\n } else {\n arraystretch = parseFloat(stretch);\n\n if (!arraystretch || arraystretch < 0) {\n throw new ParseError(\"Invalid \\\\arraystretch: \" + stretch);\n }\n }\n } // Start group for first cell\n\n\n parser.gullet.beginGroup();\n var row = [];\n var body = [row];\n var rowGaps = [];\n var hLinesBeforeRow = [];\n var tags = autoTag != null ? [] : undefined; // amsmath uses \\global\\@eqnswtrue and \\global\\@eqnswfalse to represent\n // whether this row should have an equation number. Simulate this with\n // a \\@eqnsw macro set to 1 or 0.\n\n function beginRow() {\n if (autoTag) {\n parser.gullet.macros.set(\"\\\\@eqnsw\", \"1\", true);\n }\n }\n\n function endRow() {\n if (tags) {\n if (parser.gullet.macros.get(\"\\\\df@tag\")) {\n tags.push(parser.subparse([new Token(\"\\\\df@tag\")]));\n parser.gullet.macros.set(\"\\\\df@tag\", undefined, true);\n } else {\n tags.push(Boolean(autoTag) && parser.gullet.macros.get(\"\\\\@eqnsw\") === \"1\");\n }\n }\n }\n\n beginRow(); // Test for \\hline at the top of the array.\n\n hLinesBeforeRow.push(getHLines(parser));\n\n while (true) {\n // eslint-disable-line no-constant-condition\n // Parse each cell in its own group (namespace)\n var cell = parser.parseExpression(false, singleRow ? \"\\\\end\" : \"\\\\\\\\\");\n parser.gullet.endGroup();\n parser.gullet.beginGroup();\n cell = {\n type: \"ordgroup\",\n mode: parser.mode,\n body: cell\n };\n\n if (style) {\n cell = {\n type: \"styling\",\n mode: parser.mode,\n style,\n body: [cell]\n };\n }\n\n row.push(cell);\n var next = parser.fetch().text;\n\n if (next === \"&\") {\n if (maxNumCols && row.length === maxNumCols) {\n if (singleRow || colSeparationType) {\n // {equation} or {split}\n throw new ParseError(\"Too many tab characters: &\", parser.nextToken);\n } else {\n // {array} environment\n parser.settings.reportNonstrict(\"textEnv\", \"Too few columns \" + \"specified in the {array} column argument.\");\n }\n }\n\n parser.consume();\n } else if (next === \"\\\\end\") {\n endRow(); // Arrays terminate newlines with `\\crcr` which consumes a `\\cr` if\n // the last line is empty. However, AMS environments keep the\n // empty row if it's the only one.\n // NOTE: Currently, `cell` is the last item added into `row`.\n\n if (row.length === 1 && cell.type === \"styling\" && cell.body[0].body.length === 0 && (body.length > 1 || !emptySingleRow)) {\n body.pop();\n }\n\n if (hLinesBeforeRow.length < body.length + 1) {\n hLinesBeforeRow.push([]);\n }\n\n break;\n } else if (next === \"\\\\\\\\\") {\n parser.consume();\n var size = void 0; // \\def\\Let@{\\let\\\\\\math@cr}\n // \\def\\math@cr{...\\math@cr@}\n // \\def\\math@cr@{\\new@ifnextchar[\\math@cr@@{\\math@cr@@[\\z@]}}\n // \\def\\math@cr@@[#1]{...\\math@cr@@@...}\n // \\def\\math@cr@@@{\\cr}\n\n if (parser.gullet.future().text !== \" \") {\n size = parser.parseSizeGroup(true);\n }\n\n rowGaps.push(size ? size.value : null);\n endRow(); // check for \\hline(s) following the row separator\n\n hLinesBeforeRow.push(getHLines(parser));\n row = [];\n body.push(row);\n beginRow();\n } else {\n throw new ParseError(\"Expected & or \\\\\\\\ or \\\\cr or \\\\end\", parser.nextToken);\n }\n } // End cell group\n\n\n parser.gullet.endGroup(); // End array group defining \\cr\n\n parser.gullet.endGroup();\n return {\n type: \"array\",\n mode: parser.mode,\n addJot,\n arraystretch,\n body,\n cols,\n rowGaps,\n hskipBeforeAndAfter,\n hLinesBeforeRow,\n colSeparationType,\n tags,\n leqno\n };\n} // Decides on a style for cells in an array according to whether the given\n// environment name starts with the letter 'd'.\n\n\nfunction dCellStyle(envName) {\n if (envName.slice(0, 1) === \"d\") {\n return \"display\";\n } else {\n return \"text\";\n }\n}\n\nvar htmlBuilder$6 = function htmlBuilder(group, options) {\n var r;\n var c;\n var nr = group.body.length;\n var hLinesBeforeRow = group.hLinesBeforeRow;\n var nc = 0;\n var body = new Array(nr);\n var hlines = [];\n var ruleThickness = Math.max( // From LaTeX \\showthe\\arrayrulewidth. Equals 0.04 em.\n options.fontMetrics().arrayRuleWidth, options.minRuleThickness // User override.\n ); // Horizontal spacing\n\n var pt = 1 / options.fontMetrics().ptPerEm;\n var arraycolsep = 5 * pt; // default value, i.e. \\arraycolsep in article.cls\n\n if (group.colSeparationType && group.colSeparationType === \"small\") {\n // We're in a {smallmatrix}. Default column space is \\thickspace,\n // i.e. 5/18em = 0.2778em, per amsmath.dtx for {smallmatrix}.\n // But that needs adjustment because LaTeX applies \\scriptstyle to the\n // entire array, including the colspace, but this function applies\n // \\scriptstyle only inside each element.\n var localMultiplier = options.havingStyle(Style$1.SCRIPT).sizeMultiplier;\n arraycolsep = 0.2778 * (localMultiplier / options.sizeMultiplier);\n } // Vertical spacing\n\n\n var baselineskip = group.colSeparationType === \"CD\" ? calculateSize({\n number: 3,\n unit: \"ex\"\n }, options) : 12 * pt; // see size10.clo\n // Default \\jot from ltmath.dtx\n // TODO(edemaine): allow overriding \\jot via \\setlength (#687)\n\n var jot = 3 * pt;\n var arrayskip = group.arraystretch * baselineskip;\n var arstrutHeight = 0.7 * arrayskip; // \\strutbox in ltfsstrc.dtx and\n\n var arstrutDepth = 0.3 * arrayskip; // \\@arstrutbox in lttab.dtx\n\n var totalHeight = 0; // Set a position for \\hline(s) at the top of the array, if any.\n\n function setHLinePos(hlinesInGap) {\n for (var i = 0; i < hlinesInGap.length; ++i) {\n if (i > 0) {\n totalHeight += 0.25;\n }\n\n hlines.push({\n pos: totalHeight,\n isDashed: hlinesInGap[i]\n });\n }\n }\n\n setHLinePos(hLinesBeforeRow[0]);\n\n for (r = 0; r < group.body.length; ++r) {\n var inrow = group.body[r];\n var height = arstrutHeight; // \\@array adds an \\@arstrut\n\n var depth = arstrutDepth; // to each tow (via the template)\n\n if (nc < inrow.length) {\n nc = inrow.length;\n }\n\n var outrow = new Array(inrow.length);\n\n for (c = 0; c < inrow.length; ++c) {\n var elt = buildGroup$1(inrow[c], options);\n\n if (depth < elt.depth) {\n depth = elt.depth;\n }\n\n if (height < elt.height) {\n height = elt.height;\n }\n\n outrow[c] = elt;\n }\n\n var rowGap = group.rowGaps[r];\n var gap = 0;\n\n if (rowGap) {\n gap = calculateSize(rowGap, options);\n\n if (gap > 0) {\n // \\@argarraycr\n gap += arstrutDepth;\n\n if (depth < gap) {\n depth = gap; // \\@xargarraycr\n }\n\n gap = 0;\n }\n } // In AMS multiline environments such as aligned and gathered, rows\n // correspond to lines that have additional \\jot added to the\n // \\baselineskip via \\openup.\n\n\n if (group.addJot) {\n depth += jot;\n }\n\n outrow.height = height;\n outrow.depth = depth;\n totalHeight += height;\n outrow.pos = totalHeight;\n totalHeight += depth + gap; // \\@yargarraycr\n\n body[r] = outrow; // Set a position for \\hline(s), if any.\n\n setHLinePos(hLinesBeforeRow[r + 1]);\n }\n\n var offset = totalHeight / 2 + options.fontMetrics().axisHeight;\n var colDescriptions = group.cols || [];\n var cols = [];\n var colSep;\n var colDescrNum;\n var tagSpans = [];\n\n if (group.tags && group.tags.some(tag => tag)) {\n // An environment with manual tags and/or automatic equation numbers.\n // Create node(s), the latter of which trigger CSS counter increment.\n for (r = 0; r < nr; ++r) {\n var rw = body[r];\n var shift = rw.pos - offset;\n var tag = group.tags[r];\n var tagSpan = void 0;\n\n if (tag === true) {\n // automatic numbering\n tagSpan = buildCommon.makeSpan([\"eqn-num\"], [], options);\n } else if (tag === false) {\n // \\nonumber/\\notag or starred environment\n tagSpan = buildCommon.makeSpan([], [], options);\n } else {\n // manual \\tag\n tagSpan = buildCommon.makeSpan([], buildExpression$1(tag, options, true), options);\n }\n\n tagSpan.depth = rw.depth;\n tagSpan.height = rw.height;\n tagSpans.push({\n type: \"elem\",\n elem: tagSpan,\n shift\n });\n }\n }\n\n for (c = 0, colDescrNum = 0; // Continue while either there are more columns or more column\n // descriptions, so trailing separators don't get lost.\n c < nc || colDescrNum < colDescriptions.length; ++c, ++colDescrNum) {\n var colDescr = colDescriptions[colDescrNum] || {};\n var firstSeparator = true;\n\n while (colDescr.type === \"separator\") {\n // If there is more than one separator in a row, add a space\n // between them.\n if (!firstSeparator) {\n colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n colSep.style.width = makeEm(options.fontMetrics().doubleRuleSep);\n cols.push(colSep);\n }\n\n if (colDescr.separator === \"|\" || colDescr.separator === \":\") {\n var lineType = colDescr.separator === \"|\" ? \"solid\" : \"dashed\";\n var separator = buildCommon.makeSpan([\"vertical-separator\"], [], options);\n separator.style.height = makeEm(totalHeight);\n separator.style.borderRightWidth = makeEm(ruleThickness);\n separator.style.borderRightStyle = lineType;\n separator.style.margin = \"0 \" + makeEm(-ruleThickness / 2);\n\n var _shift = totalHeight - offset;\n\n if (_shift) {\n separator.style.verticalAlign = makeEm(-_shift);\n }\n\n cols.push(separator);\n } else {\n throw new ParseError(\"Invalid separator type: \" + colDescr.separator);\n }\n\n colDescrNum++;\n colDescr = colDescriptions[colDescrNum] || {};\n firstSeparator = false;\n }\n\n if (c >= nc) {\n continue;\n }\n\n var sepwidth = void 0;\n\n if (c > 0 || group.hskipBeforeAndAfter) {\n sepwidth = utils.deflt(colDescr.pregap, arraycolsep);\n\n if (sepwidth !== 0) {\n colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n colSep.style.width = makeEm(sepwidth);\n cols.push(colSep);\n }\n }\n\n var col = [];\n\n for (r = 0; r < nr; ++r) {\n var row = body[r];\n var elem = row[c];\n\n if (!elem) {\n continue;\n }\n\n var _shift2 = row.pos - offset;\n\n elem.depth = row.depth;\n elem.height = row.height;\n col.push({\n type: \"elem\",\n elem: elem,\n shift: _shift2\n });\n }\n\n col = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: col\n }, options);\n col = buildCommon.makeSpan([\"col-align-\" + (colDescr.align || \"c\")], [col]);\n cols.push(col);\n\n if (c < nc - 1 || group.hskipBeforeAndAfter) {\n sepwidth = utils.deflt(colDescr.postgap, arraycolsep);\n\n if (sepwidth !== 0) {\n colSep = buildCommon.makeSpan([\"arraycolsep\"], []);\n colSep.style.width = makeEm(sepwidth);\n cols.push(colSep);\n }\n }\n }\n\n body = buildCommon.makeSpan([\"mtable\"], cols); // Add \\hline(s), if any.\n\n if (hlines.length > 0) {\n var line = buildCommon.makeLineSpan(\"hline\", options, ruleThickness);\n var dashes = buildCommon.makeLineSpan(\"hdashline\", options, ruleThickness);\n var vListElems = [{\n type: \"elem\",\n elem: body,\n shift: 0\n }];\n\n while (hlines.length > 0) {\n var hline = hlines.pop();\n var lineShift = hline.pos - offset;\n\n if (hline.isDashed) {\n vListElems.push({\n type: \"elem\",\n elem: dashes,\n shift: lineShift\n });\n } else {\n vListElems.push({\n type: \"elem\",\n elem: line,\n shift: lineShift\n });\n }\n }\n\n body = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: vListElems\n }, options);\n }\n\n if (tagSpans.length === 0) {\n return buildCommon.makeSpan([\"mord\"], [body], options);\n } else {\n var eqnNumCol = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: tagSpans\n }, options);\n eqnNumCol = buildCommon.makeSpan([\"tag\"], [eqnNumCol], options);\n return buildCommon.makeFragment([body, eqnNumCol]);\n }\n};\n\nvar alignMap = {\n c: \"center \",\n l: \"left \",\n r: \"right \"\n};\n\nvar mathmlBuilder$5 = function mathmlBuilder(group, options) {\n var tbl = [];\n var glue = new mathMLTree.MathNode(\"mtd\", [], [\"mtr-glue\"]);\n var tag = new mathMLTree.MathNode(\"mtd\", [], [\"mml-eqn-num\"]);\n\n for (var i = 0; i < group.body.length; i++) {\n var rw = group.body[i];\n var row = [];\n\n for (var j = 0; j < rw.length; j++) {\n row.push(new mathMLTree.MathNode(\"mtd\", [buildGroup(rw[j], options)]));\n }\n\n if (group.tags && group.tags[i]) {\n row.unshift(glue);\n row.push(glue);\n\n if (group.leqno) {\n row.unshift(tag);\n } else {\n row.push(tag);\n }\n }\n\n tbl.push(new mathMLTree.MathNode(\"mtr\", row));\n }\n\n var table = new mathMLTree.MathNode(\"mtable\", tbl); // Set column alignment, row spacing, column spacing, and\n // array lines by setting attributes on the table element.\n // Set the row spacing. In MathML, we specify a gap distance.\n // We do not use rowGap[] because MathML automatically increases\n // cell height with the height/depth of the element content.\n // LaTeX \\arraystretch multiplies the row baseline-to-baseline distance.\n // We simulate this by adding (arraystretch - 1)em to the gap. This\n // does a reasonable job of adjusting arrays containing 1 em tall content.\n // The 0.16 and 0.09 values are found empirically. They produce an array\n // similar to LaTeX and in which content does not interfere with \\hlines.\n\n var gap = group.arraystretch === 0.5 ? 0.1 // {smallmatrix}, {subarray}\n : 0.16 + group.arraystretch - 1 + (group.addJot ? 0.09 : 0);\n table.setAttribute(\"rowspacing\", makeEm(gap)); // MathML table lines go only between cells.\n // To place a line on an edge we'll use , if necessary.\n\n var menclose = \"\";\n var align = \"\";\n\n if (group.cols && group.cols.length > 0) {\n // Find column alignment, column spacing, and vertical lines.\n var cols = group.cols;\n var columnLines = \"\";\n var prevTypeWasAlign = false;\n var iStart = 0;\n var iEnd = cols.length;\n\n if (cols[0].type === \"separator\") {\n menclose += \"top \";\n iStart = 1;\n }\n\n if (cols[cols.length - 1].type === \"separator\") {\n menclose += \"bottom \";\n iEnd -= 1;\n }\n\n for (var _i = iStart; _i < iEnd; _i++) {\n if (cols[_i].type === \"align\") {\n align += alignMap[cols[_i].align];\n\n if (prevTypeWasAlign) {\n columnLines += \"none \";\n }\n\n prevTypeWasAlign = true;\n } else if (cols[_i].type === \"separator\") {\n // MathML accepts only single lines between cells.\n // So we read only the first of consecutive separators.\n if (prevTypeWasAlign) {\n columnLines += cols[_i].separator === \"|\" ? \"solid \" : \"dashed \";\n prevTypeWasAlign = false;\n }\n }\n }\n\n table.setAttribute(\"columnalign\", align.trim());\n\n if (/[sd]/.test(columnLines)) {\n table.setAttribute(\"columnlines\", columnLines.trim());\n }\n } // Set column spacing.\n\n\n if (group.colSeparationType === \"align\") {\n var _cols = group.cols || [];\n\n var spacing = \"\";\n\n for (var _i2 = 1; _i2 < _cols.length; _i2++) {\n spacing += _i2 % 2 ? \"0em \" : \"1em \";\n }\n\n table.setAttribute(\"columnspacing\", spacing.trim());\n } else if (group.colSeparationType === \"alignat\" || group.colSeparationType === \"gather\") {\n table.setAttribute(\"columnspacing\", \"0em\");\n } else if (group.colSeparationType === \"small\") {\n table.setAttribute(\"columnspacing\", \"0.2778em\");\n } else if (group.colSeparationType === \"CD\") {\n table.setAttribute(\"columnspacing\", \"0.5em\");\n } else {\n table.setAttribute(\"columnspacing\", \"1em\");\n } // Address \\hline and \\hdashline\n\n\n var rowLines = \"\";\n var hlines = group.hLinesBeforeRow;\n menclose += hlines[0].length > 0 ? \"left \" : \"\";\n menclose += hlines[hlines.length - 1].length > 0 ? \"right \" : \"\";\n\n for (var _i3 = 1; _i3 < hlines.length - 1; _i3++) {\n rowLines += hlines[_i3].length === 0 ? \"none \" // MathML accepts only a single line between rows. Read one element.\n : hlines[_i3][0] ? \"dashed \" : \"solid \";\n }\n\n if (/[sd]/.test(rowLines)) {\n table.setAttribute(\"rowlines\", rowLines.trim());\n }\n\n if (menclose !== \"\") {\n table = new mathMLTree.MathNode(\"menclose\", [table]);\n table.setAttribute(\"notation\", menclose.trim());\n }\n\n if (group.arraystretch && group.arraystretch < 1) {\n // A small array. Wrap in scriptstyle so row gap is not too large.\n table = new mathMLTree.MathNode(\"mstyle\", [table]);\n table.setAttribute(\"scriptlevel\", \"1\");\n }\n\n return table;\n}; // Convenience function for align, align*, aligned, alignat, alignat*, alignedat.\n\n\nvar alignedHandler = function alignedHandler(context, args) {\n if (context.envName.indexOf(\"ed\") === -1) {\n validateAmsEnvironmentContext(context);\n }\n\n var cols = [];\n var separationType = context.envName.indexOf(\"at\") > -1 ? \"alignat\" : \"align\";\n var isSplit = context.envName === \"split\";\n var res = parseArray(context.parser, {\n cols,\n addJot: true,\n autoTag: isSplit ? undefined : getAutoTag(context.envName),\n emptySingleRow: true,\n colSeparationType: separationType,\n maxNumCols: isSplit ? 2 : undefined,\n leqno: context.parser.settings.leqno\n }, \"display\"); // Determining number of columns.\n // 1. If the first argument is given, we use it as a number of columns,\n // and makes sure that each row doesn't exceed that number.\n // 2. Otherwise, just count number of columns = maximum number\n // of cells in each row (\"aligned\" mode -- isAligned will be true).\n //\n // At the same time, prepend empty group {} at beginning of every second\n // cell in each row (starting with second cell) so that operators become\n // binary. This behavior is implemented in amsmath's \\start@aligned.\n\n var numMaths;\n var numCols = 0;\n var emptyGroup = {\n type: \"ordgroup\",\n mode: context.mode,\n body: []\n };\n\n if (args[0] && args[0].type === \"ordgroup\") {\n var arg0 = \"\";\n\n for (var i = 0; i < args[0].body.length; i++) {\n var textord = assertNodeType(args[0].body[i], \"textord\");\n arg0 += textord.text;\n }\n\n numMaths = Number(arg0);\n numCols = numMaths * 2;\n }\n\n var isAligned = !numCols;\n res.body.forEach(function (row) {\n for (var _i4 = 1; _i4 < row.length; _i4 += 2) {\n // Modify ordgroup node within styling node\n var styling = assertNodeType(row[_i4], \"styling\");\n var ordgroup = assertNodeType(styling.body[0], \"ordgroup\");\n ordgroup.body.unshift(emptyGroup);\n }\n\n if (!isAligned) {\n // Case 1\n var curMaths = row.length / 2;\n\n if (numMaths < curMaths) {\n throw new ParseError(\"Too many math in a row: \" + (\"expected \" + numMaths + \", but got \" + curMaths), row[0]);\n }\n } else if (numCols < row.length) {\n // Case 2\n numCols = row.length;\n }\n }); // Adjusting alignment.\n // In aligned mode, we add one \\qquad between columns;\n // otherwise we add nothing.\n\n for (var _i5 = 0; _i5 < numCols; ++_i5) {\n var align = \"r\";\n var pregap = 0;\n\n if (_i5 % 2 === 1) {\n align = \"l\";\n } else if (_i5 > 0 && isAligned) {\n // \"aligned\" mode.\n pregap = 1; // add one \\quad\n }\n\n cols[_i5] = {\n type: \"align\",\n align: align,\n pregap: pregap,\n postgap: 0\n };\n }\n\n res.colSeparationType = isAligned ? \"align\" : \"alignat\";\n return res;\n}; // Arrays are part of LaTeX, defined in lttab.dtx so its documentation\n// is part of the source2e.pdf file of LaTeX2e source documentation.\n// {darray} is an {array} environment where cells are set in \\displaystyle,\n// as defined in nccmath.sty.\n\n\ndefineEnvironment({\n type: \"array\",\n names: [\"array\", \"darray\"],\n props: {\n numArgs: 1\n },\n\n handler(context, args) {\n // Since no types are specified above, the two possibilities are\n // - The argument is wrapped in {} or [], in which case Parser's\n // parseGroup() returns an \"ordgroup\" wrapping some symbol node.\n // - The argument is a bare symbol node.\n var symNode = checkSymbolNodeType(args[0]);\n var colalign = symNode ? [args[0]] : assertNodeType(args[0], \"ordgroup\").body;\n var cols = colalign.map(function (nde) {\n var node = assertSymbolNodeType(nde);\n var ca = node.text;\n\n if (\"lcr\".indexOf(ca) !== -1) {\n return {\n type: \"align\",\n align: ca\n };\n } else if (ca === \"|\") {\n return {\n type: \"separator\",\n separator: \"|\"\n };\n } else if (ca === \":\") {\n return {\n type: \"separator\",\n separator: \":\"\n };\n }\n\n throw new ParseError(\"Unknown column alignment: \" + ca, nde);\n });\n var res = {\n cols,\n hskipBeforeAndAfter: true,\n // \\@preamble in lttab.dtx\n maxNumCols: cols.length\n };\n return parseArray(context.parser, res, dCellStyle(context.envName));\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // The matrix environments of amsmath builds on the array environment\n// of LaTeX, which is discussed above.\n// The mathtools package adds starred versions of the same environments.\n// These have an optional argument to choose left|center|right justification.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"matrix\", \"pmatrix\", \"bmatrix\", \"Bmatrix\", \"vmatrix\", \"Vmatrix\", \"matrix*\", \"pmatrix*\", \"bmatrix*\", \"Bmatrix*\", \"vmatrix*\", \"Vmatrix*\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n var delimiters = {\n \"matrix\": null,\n \"pmatrix\": [\"(\", \")\"],\n \"bmatrix\": [\"[\", \"]\"],\n \"Bmatrix\": [\"\\\\{\", \"\\\\}\"],\n \"vmatrix\": [\"|\", \"|\"],\n \"Vmatrix\": [\"\\\\Vert\", \"\\\\Vert\"]\n }[context.envName.replace(\"*\", \"\")]; // \\hskip -\\arraycolsep in amsmath\n\n var colAlign = \"c\";\n var payload = {\n hskipBeforeAndAfter: false,\n cols: [{\n type: \"align\",\n align: colAlign\n }]\n };\n\n if (context.envName.charAt(context.envName.length - 1) === \"*\") {\n // It's one of the mathtools starred functions.\n // Parse the optional alignment argument.\n var parser = context.parser;\n parser.consumeSpaces();\n\n if (parser.fetch().text === \"[\") {\n parser.consume();\n parser.consumeSpaces();\n colAlign = parser.fetch().text;\n\n if (\"lcr\".indexOf(colAlign) === -1) {\n throw new ParseError(\"Expected l or c or r\", parser.nextToken);\n }\n\n parser.consume();\n parser.consumeSpaces();\n parser.expect(\"]\");\n parser.consume();\n payload.cols = [{\n type: \"align\",\n align: colAlign\n }];\n }\n }\n\n var res = parseArray(context.parser, payload, dCellStyle(context.envName)); // Populate cols with the correct number of column alignment specs.\n\n var numCols = Math.max(0, ...res.body.map(row => row.length));\n res.cols = new Array(numCols).fill({\n type: \"align\",\n align: colAlign\n });\n return delimiters ? {\n type: \"leftright\",\n mode: context.mode,\n body: [res],\n left: delimiters[0],\n right: delimiters[1],\n rightColor: undefined // \\right uninfluenced by \\color in array\n\n } : res;\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"smallmatrix\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n var payload = {\n arraystretch: 0.5\n };\n var res = parseArray(context.parser, payload, \"script\");\n res.colSeparationType = \"small\";\n return res;\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"subarray\"],\n props: {\n numArgs: 1\n },\n\n handler(context, args) {\n // Parsing of {subarray} is similar to {array}\n var symNode = checkSymbolNodeType(args[0]);\n var colalign = symNode ? [args[0]] : assertNodeType(args[0], \"ordgroup\").body;\n var cols = colalign.map(function (nde) {\n var node = assertSymbolNodeType(nde);\n var ca = node.text; // {subarray} only recognizes \"l\" & \"c\"\n\n if (\"lc\".indexOf(ca) !== -1) {\n return {\n type: \"align\",\n align: ca\n };\n }\n\n throw new ParseError(\"Unknown column alignment: \" + ca, nde);\n });\n\n if (cols.length > 1) {\n throw new ParseError(\"{subarray} can contain only one column\");\n }\n\n var res = {\n cols,\n hskipBeforeAndAfter: false,\n arraystretch: 0.5\n };\n res = parseArray(context.parser, res, \"script\");\n\n if (res.body.length > 0 && res.body[0].length > 1) {\n throw new ParseError(\"{subarray} can contain only one column\");\n }\n\n return res;\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // A cases environment (in amsmath.sty) is almost equivalent to\n// \\def\\arraystretch{1.2}%\n// \\left\\{\\begin{array}{@{}l@{\\quad}l@{}} \u2026 \\end{array}\\right.\n// {dcases} is a {cases} environment where cells are set in \\displaystyle,\n// as defined in mathtools.sty.\n// {rcases} is another mathtools environment. It's brace is on the right side.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"cases\", \"dcases\", \"rcases\", \"drcases\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n var payload = {\n arraystretch: 1.2,\n cols: [{\n type: \"align\",\n align: \"l\",\n pregap: 0,\n // TODO(kevinb) get the current style.\n // For now we use the metrics for TEXT style which is what we were\n // doing before. Before attempting to get the current style we\n // should look at TeX's behavior especially for \\over and matrices.\n postgap: 1.0\n /* 1em quad */\n\n }, {\n type: \"align\",\n align: \"l\",\n pregap: 0,\n postgap: 0\n }]\n };\n var res = parseArray(context.parser, payload, dCellStyle(context.envName));\n return {\n type: \"leftright\",\n mode: context.mode,\n body: [res],\n left: context.envName.indexOf(\"r\") > -1 ? \".\" : \"\\\\{\",\n right: context.envName.indexOf(\"r\") > -1 ? \"\\\\}\" : \".\",\n rightColor: undefined\n };\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // In the align environment, one uses ampersands, &, to specify number of\n// columns in each row, and to locate spacing between each column.\n// align gets automatic numbering. align* and aligned do not.\n// The alignedat environment can be used in math mode.\n// Note that we assume \\nomallineskiplimit to be zero,\n// so that \\strut@ is the same as \\strut.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"align\", \"align*\", \"aligned\", \"split\"],\n props: {\n numArgs: 0\n },\n handler: alignedHandler,\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // A gathered environment is like an array environment with one centered\n// column, but where rows are considered lines so get \\jot line spacing\n// and contents are set in \\displaystyle.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"gathered\", \"gather\", \"gather*\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n if (utils.contains([\"gather\", \"gather*\"], context.envName)) {\n validateAmsEnvironmentContext(context);\n }\n\n var res = {\n cols: [{\n type: \"align\",\n align: \"c\"\n }],\n addJot: true,\n colSeparationType: \"gather\",\n autoTag: getAutoTag(context.envName),\n emptySingleRow: true,\n leqno: context.parser.settings.leqno\n };\n return parseArray(context.parser, res, \"display\");\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n}); // alignat environment is like an align environment, but one must explicitly\n// specify maximum number of columns in each row, and can adjust spacing between\n// each columns.\n\ndefineEnvironment({\n type: \"array\",\n names: [\"alignat\", \"alignat*\", \"alignedat\"],\n props: {\n numArgs: 1\n },\n handler: alignedHandler,\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"equation\", \"equation*\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n validateAmsEnvironmentContext(context);\n var res = {\n autoTag: getAutoTag(context.envName),\n emptySingleRow: true,\n singleRow: true,\n maxNumCols: 1,\n leqno: context.parser.settings.leqno\n };\n return parseArray(context.parser, res, \"display\");\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineEnvironment({\n type: \"array\",\n names: [\"CD\"],\n props: {\n numArgs: 0\n },\n\n handler(context) {\n validateAmsEnvironmentContext(context);\n return parseCD(context.parser);\n },\n\n htmlBuilder: htmlBuilder$6,\n mathmlBuilder: mathmlBuilder$5\n});\ndefineMacro(\"\\\\nonumber\", \"\\\\gdef\\\\@eqnsw{0}\");\ndefineMacro(\"\\\\notag\", \"\\\\nonumber\"); // Catch \\hline outside array environment\n\ndefineFunction({\n type: \"text\",\n // Doesn't matter what this is.\n names: [\"\\\\hline\", \"\\\\hdashline\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n allowedInMath: true\n },\n\n handler(context, args) {\n throw new ParseError(context.funcName + \" valid only within array environment\");\n }\n\n});\n\nvar environments = _environments;\n\n// defineEnvironment definitions.\n\ndefineFunction({\n type: \"environment\",\n names: [\"\\\\begin\", \"\\\\end\"],\n props: {\n numArgs: 1,\n argTypes: [\"text\"]\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var nameGroup = args[0];\n\n if (nameGroup.type !== \"ordgroup\") {\n throw new ParseError(\"Invalid environment name\", nameGroup);\n }\n\n var envName = \"\";\n\n for (var i = 0; i < nameGroup.body.length; ++i) {\n envName += assertNodeType(nameGroup.body[i], \"textord\").text;\n }\n\n if (funcName === \"\\\\begin\") {\n // begin...end is similar to left...right\n if (!environments.hasOwnProperty(envName)) {\n throw new ParseError(\"No such environment: \" + envName, nameGroup);\n } // Build the environment object. Arguments and other information will\n // be made available to the begin and end methods using properties.\n\n\n var env = environments[envName];\n var {\n args: _args,\n optArgs\n } = parser.parseArguments(\"\\\\begin{\" + envName + \"}\", env);\n var context = {\n mode: parser.mode,\n envName,\n parser\n };\n var result = env.handler(context, _args, optArgs);\n parser.expect(\"\\\\end\", false);\n var endNameToken = parser.nextToken;\n var end = assertNodeType(parser.parseFunction(), \"environment\");\n\n if (end.name !== envName) {\n throw new ParseError(\"Mismatch: \\\\begin{\" + envName + \"} matched by \\\\end{\" + end.name + \"}\", endNameToken);\n } // $FlowFixMe, \"environment\" handler returns an environment ParseNode\n\n\n return result;\n }\n\n return {\n type: \"environment\",\n mode: parser.mode,\n name: envName,\n nameGroup\n };\n }\n\n});\n\n// TODO(kevinb): implement \\\\sl and \\\\sc\n\nvar htmlBuilder$5 = (group, options) => {\n var font = group.font;\n var newOptions = options.withFont(font);\n return buildGroup$1(group.body, newOptions);\n};\n\nvar mathmlBuilder$4 = (group, options) => {\n var font = group.font;\n var newOptions = options.withFont(font);\n return buildGroup(group.body, newOptions);\n};\n\nvar fontAliases = {\n \"\\\\Bbb\": \"\\\\mathbb\",\n \"\\\\bold\": \"\\\\mathbf\",\n \"\\\\frak\": \"\\\\mathfrak\",\n \"\\\\bm\": \"\\\\boldsymbol\"\n};\ndefineFunction({\n type: \"font\",\n names: [// styles, except \\boldsymbol defined below\n \"\\\\mathrm\", \"\\\\mathit\", \"\\\\mathbf\", \"\\\\mathnormal\", // families\n \"\\\\mathbb\", \"\\\\mathcal\", \"\\\\mathfrak\", \"\\\\mathscr\", \"\\\\mathsf\", \"\\\\mathtt\", // aliases, except \\bm defined below\n \"\\\\Bbb\", \"\\\\bold\", \"\\\\frak\"],\n props: {\n numArgs: 1,\n allowedInArgument: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var body = normalizeArgument(args[0]);\n var func = funcName;\n\n if (func in fontAliases) {\n func = fontAliases[func];\n }\n\n return {\n type: \"font\",\n mode: parser.mode,\n font: func.slice(1),\n body\n };\n },\n htmlBuilder: htmlBuilder$5,\n mathmlBuilder: mathmlBuilder$4\n});\ndefineFunction({\n type: \"mclass\",\n names: [\"\\\\boldsymbol\", \"\\\\bm\"],\n props: {\n numArgs: 1\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var body = args[0];\n var isCharacterBox = utils.isCharacterBox(body); // amsbsy.sty's \\boldsymbol uses \\binrel spacing to inherit the\n // argument's bin|rel|ord status\n\n return {\n type: \"mclass\",\n mode: parser.mode,\n mclass: binrelClass(body),\n body: [{\n type: \"font\",\n mode: parser.mode,\n font: \"boldsymbol\",\n body\n }],\n isCharacterBox: isCharacterBox\n };\n }\n}); // Old font changing functions\n\ndefineFunction({\n type: \"font\",\n names: [\"\\\\rm\", \"\\\\sf\", \"\\\\tt\", \"\\\\bf\", \"\\\\it\", \"\\\\cal\"],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n handler: (_ref3, args) => {\n var {\n parser,\n funcName,\n breakOnTokenText\n } = _ref3;\n var {\n mode\n } = parser;\n var body = parser.parseExpression(true, breakOnTokenText);\n var style = \"math\" + funcName.slice(1);\n return {\n type: \"font\",\n mode: mode,\n font: style,\n body: {\n type: \"ordgroup\",\n mode: parser.mode,\n body\n }\n };\n },\n htmlBuilder: htmlBuilder$5,\n mathmlBuilder: mathmlBuilder$4\n});\n\nvar adjustStyle = (size, originalStyle) => {\n // Figure out what style this fraction should be in based on the\n // function used\n var style = originalStyle;\n\n if (size === \"display\") {\n // Get display style as a default.\n // If incoming style is sub/sup, use style.text() to get correct size.\n style = style.id >= Style$1.SCRIPT.id ? style.text() : Style$1.DISPLAY;\n } else if (size === \"text\" && style.size === Style$1.DISPLAY.size) {\n // We're in a \\tfrac but incoming style is displaystyle, so:\n style = Style$1.TEXT;\n } else if (size === \"script\") {\n style = Style$1.SCRIPT;\n } else if (size === \"scriptscript\") {\n style = Style$1.SCRIPTSCRIPT;\n }\n\n return style;\n};\n\nvar htmlBuilder$4 = (group, options) => {\n // Fractions are handled in the TeXbook on pages 444-445, rules 15(a-e).\n var style = adjustStyle(group.size, options.style);\n var nstyle = style.fracNum();\n var dstyle = style.fracDen();\n var newOptions;\n newOptions = options.havingStyle(nstyle);\n var numerm = buildGroup$1(group.numer, newOptions, options);\n\n if (group.continued) {\n // \\cfrac inserts a \\strut into the numerator.\n // Get \\strut dimensions from TeXbook page 353.\n var hStrut = 8.5 / options.fontMetrics().ptPerEm;\n var dStrut = 3.5 / options.fontMetrics().ptPerEm;\n numerm.height = numerm.height < hStrut ? hStrut : numerm.height;\n numerm.depth = numerm.depth < dStrut ? dStrut : numerm.depth;\n }\n\n newOptions = options.havingStyle(dstyle);\n var denomm = buildGroup$1(group.denom, newOptions, options);\n var rule;\n var ruleWidth;\n var ruleSpacing;\n\n if (group.hasBarLine) {\n if (group.barSize) {\n ruleWidth = calculateSize(group.barSize, options);\n rule = buildCommon.makeLineSpan(\"frac-line\", options, ruleWidth);\n } else {\n rule = buildCommon.makeLineSpan(\"frac-line\", options);\n }\n\n ruleWidth = rule.height;\n ruleSpacing = rule.height;\n } else {\n rule = null;\n ruleWidth = 0;\n ruleSpacing = options.fontMetrics().defaultRuleThickness;\n } // Rule 15b\n\n\n var numShift;\n var clearance;\n var denomShift;\n\n if (style.size === Style$1.DISPLAY.size || group.size === \"display\") {\n numShift = options.fontMetrics().num1;\n\n if (ruleWidth > 0) {\n clearance = 3 * ruleSpacing;\n } else {\n clearance = 7 * ruleSpacing;\n }\n\n denomShift = options.fontMetrics().denom1;\n } else {\n if (ruleWidth > 0) {\n numShift = options.fontMetrics().num2;\n clearance = ruleSpacing;\n } else {\n numShift = options.fontMetrics().num3;\n clearance = 3 * ruleSpacing;\n }\n\n denomShift = options.fontMetrics().denom2;\n }\n\n var frac;\n\n if (!rule) {\n // Rule 15c\n var candidateClearance = numShift - numerm.depth - (denomm.height - denomShift);\n\n if (candidateClearance < clearance) {\n numShift += 0.5 * (clearance - candidateClearance);\n denomShift += 0.5 * (clearance - candidateClearance);\n }\n\n frac = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: denomm,\n shift: denomShift\n }, {\n type: \"elem\",\n elem: numerm,\n shift: -numShift\n }]\n }, options);\n } else {\n // Rule 15d\n var axisHeight = options.fontMetrics().axisHeight;\n\n if (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth) < clearance) {\n numShift += clearance - (numShift - numerm.depth - (axisHeight + 0.5 * ruleWidth));\n }\n\n if (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift) < clearance) {\n denomShift += clearance - (axisHeight - 0.5 * ruleWidth - (denomm.height - denomShift));\n }\n\n var midShift = -(axisHeight - 0.5 * ruleWidth);\n frac = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: denomm,\n shift: denomShift\n }, {\n type: \"elem\",\n elem: rule,\n shift: midShift\n }, {\n type: \"elem\",\n elem: numerm,\n shift: -numShift\n }]\n }, options);\n } // Since we manually change the style sometimes (with \\dfrac or \\tfrac),\n // account for the possible size change here.\n\n\n newOptions = options.havingStyle(style);\n frac.height *= newOptions.sizeMultiplier / options.sizeMultiplier;\n frac.depth *= newOptions.sizeMultiplier / options.sizeMultiplier; // Rule 15e\n\n var delimSize;\n\n if (style.size === Style$1.DISPLAY.size) {\n delimSize = options.fontMetrics().delim1;\n } else if (style.size === Style$1.SCRIPTSCRIPT.size) {\n delimSize = options.havingStyle(Style$1.SCRIPT).fontMetrics().delim2;\n } else {\n delimSize = options.fontMetrics().delim2;\n }\n\n var leftDelim;\n var rightDelim;\n\n if (group.leftDelim == null) {\n leftDelim = makeNullDelimiter(options, [\"mopen\"]);\n } else {\n leftDelim = delimiter.customSizedDelim(group.leftDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mopen\"]);\n }\n\n if (group.continued) {\n rightDelim = buildCommon.makeSpan([]); // zero width for \\cfrac\n } else if (group.rightDelim == null) {\n rightDelim = makeNullDelimiter(options, [\"mclose\"]);\n } else {\n rightDelim = delimiter.customSizedDelim(group.rightDelim, delimSize, true, options.havingStyle(style), group.mode, [\"mclose\"]);\n }\n\n return buildCommon.makeSpan([\"mord\"].concat(newOptions.sizingClasses(options)), [leftDelim, buildCommon.makeSpan([\"mfrac\"], [frac]), rightDelim], options);\n};\n\nvar mathmlBuilder$3 = (group, options) => {\n var node = new mathMLTree.MathNode(\"mfrac\", [buildGroup(group.numer, options), buildGroup(group.denom, options)]);\n\n if (!group.hasBarLine) {\n node.setAttribute(\"linethickness\", \"0px\");\n } else if (group.barSize) {\n var ruleWidth = calculateSize(group.barSize, options);\n node.setAttribute(\"linethickness\", makeEm(ruleWidth));\n }\n\n var style = adjustStyle(group.size, options.style);\n\n if (style.size !== options.style.size) {\n node = new mathMLTree.MathNode(\"mstyle\", [node]);\n var isDisplay = style.size === Style$1.DISPLAY.size ? \"true\" : \"false\";\n node.setAttribute(\"displaystyle\", isDisplay);\n node.setAttribute(\"scriptlevel\", \"0\");\n }\n\n if (group.leftDelim != null || group.rightDelim != null) {\n var withDelims = [];\n\n if (group.leftDelim != null) {\n var leftOp = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(group.leftDelim.replace(\"\\\\\", \"\"))]);\n leftOp.setAttribute(\"fence\", \"true\");\n withDelims.push(leftOp);\n }\n\n withDelims.push(node);\n\n if (group.rightDelim != null) {\n var rightOp = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(group.rightDelim.replace(\"\\\\\", \"\"))]);\n rightOp.setAttribute(\"fence\", \"true\");\n withDelims.push(rightOp);\n }\n\n return makeRow(withDelims);\n }\n\n return node;\n};\n\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\dfrac\", \"\\\\frac\", \"\\\\tfrac\", \"\\\\dbinom\", \"\\\\binom\", \"\\\\tbinom\", \"\\\\\\\\atopfrac\", // can\u2019t be entered directly\n \"\\\\\\\\bracefrac\", \"\\\\\\\\brackfrac\" // ditto\n ],\n props: {\n numArgs: 2,\n allowedInArgument: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var numer = args[0];\n var denom = args[1];\n var hasBarLine;\n var leftDelim = null;\n var rightDelim = null;\n var size = \"auto\";\n\n switch (funcName) {\n case \"\\\\dfrac\":\n case \"\\\\frac\":\n case \"\\\\tfrac\":\n hasBarLine = true;\n break;\n\n case \"\\\\\\\\atopfrac\":\n hasBarLine = false;\n break;\n\n case \"\\\\dbinom\":\n case \"\\\\binom\":\n case \"\\\\tbinom\":\n hasBarLine = false;\n leftDelim = \"(\";\n rightDelim = \")\";\n break;\n\n case \"\\\\\\\\bracefrac\":\n hasBarLine = false;\n leftDelim = \"\\\\{\";\n rightDelim = \"\\\\}\";\n break;\n\n case \"\\\\\\\\brackfrac\":\n hasBarLine = false;\n leftDelim = \"[\";\n rightDelim = \"]\";\n break;\n\n default:\n throw new Error(\"Unrecognized genfrac command\");\n }\n\n switch (funcName) {\n case \"\\\\dfrac\":\n case \"\\\\dbinom\":\n size = \"display\";\n break;\n\n case \"\\\\tfrac\":\n case \"\\\\tbinom\":\n size = \"text\";\n break;\n }\n\n return {\n type: \"genfrac\",\n mode: parser.mode,\n continued: false,\n numer,\n denom,\n hasBarLine,\n leftDelim,\n rightDelim,\n size,\n barSize: null\n };\n },\n htmlBuilder: htmlBuilder$4,\n mathmlBuilder: mathmlBuilder$3\n});\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\cfrac\"],\n props: {\n numArgs: 2\n },\n handler: (_ref2, args) => {\n var {\n parser,\n funcName\n } = _ref2;\n var numer = args[0];\n var denom = args[1];\n return {\n type: \"genfrac\",\n mode: parser.mode,\n continued: true,\n numer,\n denom,\n hasBarLine: true,\n leftDelim: null,\n rightDelim: null,\n size: \"display\",\n barSize: null\n };\n }\n}); // Infix generalized fractions -- these are not rendered directly, but replaced\n// immediately by one of the variants above.\n\ndefineFunction({\n type: \"infix\",\n names: [\"\\\\over\", \"\\\\choose\", \"\\\\atop\", \"\\\\brace\", \"\\\\brack\"],\n props: {\n numArgs: 0,\n infix: true\n },\n\n handler(_ref3) {\n var {\n parser,\n funcName,\n token\n } = _ref3;\n var replaceWith;\n\n switch (funcName) {\n case \"\\\\over\":\n replaceWith = \"\\\\frac\";\n break;\n\n case \"\\\\choose\":\n replaceWith = \"\\\\binom\";\n break;\n\n case \"\\\\atop\":\n replaceWith = \"\\\\\\\\atopfrac\";\n break;\n\n case \"\\\\brace\":\n replaceWith = \"\\\\\\\\bracefrac\";\n break;\n\n case \"\\\\brack\":\n replaceWith = \"\\\\\\\\brackfrac\";\n break;\n\n default:\n throw new Error(\"Unrecognized infix genfrac command\");\n }\n\n return {\n type: \"infix\",\n mode: parser.mode,\n replaceWith,\n token\n };\n }\n\n});\nvar stylArray = [\"display\", \"text\", \"script\", \"scriptscript\"];\n\nvar delimFromValue = function delimFromValue(delimString) {\n var delim = null;\n\n if (delimString.length > 0) {\n delim = delimString;\n delim = delim === \".\" ? null : delim;\n }\n\n return delim;\n};\n\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\genfrac\"],\n props: {\n numArgs: 6,\n allowedInArgument: true,\n argTypes: [\"math\", \"math\", \"size\", \"text\", \"math\", \"math\"]\n },\n\n handler(_ref4, args) {\n var {\n parser\n } = _ref4;\n var numer = args[4];\n var denom = args[5]; // Look into the parse nodes to get the desired delimiters.\n\n var leftNode = normalizeArgument(args[0]);\n var leftDelim = leftNode.type === \"atom\" && leftNode.family === \"open\" ? delimFromValue(leftNode.text) : null;\n var rightNode = normalizeArgument(args[1]);\n var rightDelim = rightNode.type === \"atom\" && rightNode.family === \"close\" ? delimFromValue(rightNode.text) : null;\n var barNode = assertNodeType(args[2], \"size\");\n var hasBarLine;\n var barSize = null;\n\n if (barNode.isBlank) {\n // \\genfrac acts differently than \\above.\n // \\genfrac treats an empty size group as a signal to use a\n // standard bar size. \\above would see size = 0 and omit the bar.\n hasBarLine = true;\n } else {\n barSize = barNode.value;\n hasBarLine = barSize.number > 0;\n } // Find out if we want displaystyle, textstyle, etc.\n\n\n var size = \"auto\";\n var styl = args[3];\n\n if (styl.type === \"ordgroup\") {\n if (styl.body.length > 0) {\n var textOrd = assertNodeType(styl.body[0], \"textord\");\n size = stylArray[Number(textOrd.text)];\n }\n } else {\n styl = assertNodeType(styl, \"textord\");\n size = stylArray[Number(styl.text)];\n }\n\n return {\n type: \"genfrac\",\n mode: parser.mode,\n numer,\n denom,\n continued: false,\n hasBarLine,\n barSize,\n leftDelim,\n rightDelim,\n size\n };\n },\n\n htmlBuilder: htmlBuilder$4,\n mathmlBuilder: mathmlBuilder$3\n}); // \\above is an infix fraction that also defines a fraction bar size.\n\ndefineFunction({\n type: \"infix\",\n names: [\"\\\\above\"],\n props: {\n numArgs: 1,\n argTypes: [\"size\"],\n infix: true\n },\n\n handler(_ref5, args) {\n var {\n parser,\n funcName,\n token\n } = _ref5;\n return {\n type: \"infix\",\n mode: parser.mode,\n replaceWith: \"\\\\\\\\abovefrac\",\n size: assertNodeType(args[0], \"size\").value,\n token\n };\n }\n\n});\ndefineFunction({\n type: \"genfrac\",\n names: [\"\\\\\\\\abovefrac\"],\n props: {\n numArgs: 3,\n argTypes: [\"math\", \"size\", \"math\"]\n },\n handler: (_ref6, args) => {\n var {\n parser,\n funcName\n } = _ref6;\n var numer = args[0];\n var barSize = assert(assertNodeType(args[1], \"infix\").size);\n var denom = args[2];\n var hasBarLine = barSize.number > 0;\n return {\n type: \"genfrac\",\n mode: parser.mode,\n numer,\n denom,\n continued: false,\n hasBarLine,\n barSize,\n leftDelim: null,\n rightDelim: null,\n size: \"auto\"\n };\n },\n htmlBuilder: htmlBuilder$4,\n mathmlBuilder: mathmlBuilder$3\n});\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only \"horizBrace\", but\n// also \"supsub\" since an over/underbrace can affect super/subscripting.\nvar htmlBuilder$3 = (grp, options) => {\n var style = options.style; // Pull out the `ParseNode<\"horizBrace\">` if `grp` is a \"supsub\" node.\n\n var supSubGroup;\n var group;\n\n if (grp.type === \"supsub\") {\n // Ref: LaTeX source2e: }}}}\\limits}\n // i.e. LaTeX treats the brace similar to an op and passes it\n // with \\limits, so we need to assign supsub style.\n supSubGroup = grp.sup ? buildGroup$1(grp.sup, options.havingStyle(style.sup()), options) : buildGroup$1(grp.sub, options.havingStyle(style.sub()), options);\n group = assertNodeType(grp.base, \"horizBrace\");\n } else {\n group = assertNodeType(grp, \"horizBrace\");\n } // Build the base group\n\n\n var body = buildGroup$1(group.base, options.havingBaseStyle(Style$1.DISPLAY)); // Create the stretchy element\n\n var braceBody = stretchy.svgSpan(group, options); // Generate the vlist, with the appropriate kerns \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n // This first vlist contains the content and the brace: equation\n\n var vlist;\n\n if (group.isOver) {\n vlist = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: body\n }, {\n type: \"kern\",\n size: 0.1\n }, {\n type: \"elem\",\n elem: braceBody\n }]\n }, options); // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n vlist.children[0].children[0].children[1].classes.push(\"svg-align\");\n } else {\n vlist = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: body.depth + 0.1 + braceBody.height,\n children: [{\n type: \"elem\",\n elem: braceBody\n }, {\n type: \"kern\",\n size: 0.1\n }, {\n type: \"elem\",\n elem: body\n }]\n }, options); // $FlowFixMe: Replace this with passing \"svg-align\" into makeVList.\n\n vlist.children[0].children[0].children[0].classes.push(\"svg-align\");\n }\n\n if (supSubGroup) {\n // To write the supsub, wrap the first vlist in another vlist:\n // They can't all go in the same vlist, because the note might be\n // wider than the equation. We want the equation to control the\n // brace width.\n // note long note long note\n // \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 or \u250F\u2501\u2501\u2501\u2513 not \u250F\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n // equation eqn eqn\n var vSpan = buildCommon.makeSpan([\"mord\", group.isOver ? \"mover\" : \"munder\"], [vlist], options);\n\n if (group.isOver) {\n vlist = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: vSpan\n }, {\n type: \"kern\",\n size: 0.2\n }, {\n type: \"elem\",\n elem: supSubGroup\n }]\n }, options);\n } else {\n vlist = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: vSpan.depth + 0.2 + supSubGroup.height + supSubGroup.depth,\n children: [{\n type: \"elem\",\n elem: supSubGroup\n }, {\n type: \"kern\",\n size: 0.2\n }, {\n type: \"elem\",\n elem: vSpan\n }]\n }, options);\n }\n }\n\n return buildCommon.makeSpan([\"mord\", group.isOver ? \"mover\" : \"munder\"], [vlist], options);\n};\n\nvar mathmlBuilder$2 = (group, options) => {\n var accentNode = stretchy.mathMLnode(group.label);\n return new mathMLTree.MathNode(group.isOver ? \"mover\" : \"munder\", [buildGroup(group.base, options), accentNode]);\n}; // Horizontal stretchy braces\n\n\ndefineFunction({\n type: \"horizBrace\",\n names: [\"\\\\overbrace\", \"\\\\underbrace\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n return {\n type: \"horizBrace\",\n mode: parser.mode,\n label: funcName,\n isOver: /^\\\\over/.test(funcName),\n base: args[0]\n };\n },\n\n htmlBuilder: htmlBuilder$3,\n mathmlBuilder: mathmlBuilder$2\n});\n\ndefineFunction({\n type: \"href\",\n names: [\"\\\\href\"],\n props: {\n numArgs: 2,\n argTypes: [\"url\", \"original\"],\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n var body = args[1];\n var href = assertNodeType(args[0], \"url\").url;\n\n if (!parser.settings.isTrusted({\n command: \"\\\\href\",\n url: href\n })) {\n return parser.formatUnsupportedCmd(\"\\\\href\");\n }\n\n return {\n type: \"href\",\n mode: parser.mode,\n href,\n body: ordargument(body)\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.body, options, false);\n return buildCommon.makeAnchor(group.href, [], elements, options);\n },\n mathmlBuilder: (group, options) => {\n var math = buildExpressionRow(group.body, options);\n\n if (!(math instanceof MathNode)) {\n math = new MathNode(\"mrow\", [math]);\n }\n\n math.setAttribute(\"href\", group.href);\n return math;\n }\n});\ndefineFunction({\n type: \"href\",\n names: [\"\\\\url\"],\n props: {\n numArgs: 1,\n argTypes: [\"url\"],\n allowedInText: true\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var href = assertNodeType(args[0], \"url\").url;\n\n if (!parser.settings.isTrusted({\n command: \"\\\\url\",\n url: href\n })) {\n return parser.formatUnsupportedCmd(\"\\\\url\");\n }\n\n var chars = [];\n\n for (var i = 0; i < href.length; i++) {\n var c = href[i];\n\n if (c === \"~\") {\n c = \"\\\\textasciitilde\";\n }\n\n chars.push({\n type: \"textord\",\n mode: \"text\",\n text: c\n });\n }\n\n var body = {\n type: \"text\",\n mode: parser.mode,\n font: \"\\\\texttt\",\n body: chars\n };\n return {\n type: \"href\",\n mode: parser.mode,\n href,\n body: ordargument(body)\n };\n }\n});\n\n// In LaTeX, \\vcenter can act only on a box, as in\n// \\vcenter{\\hbox{$\\frac{a+b}{\\dfrac{c}{d}}$}}\n// This function by itself doesn't do anything but prevent a soft line break.\n\ndefineFunction({\n type: \"hbox\",\n names: [\"\\\\hbox\"],\n props: {\n numArgs: 1,\n argTypes: [\"text\"],\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"hbox\",\n mode: parser.mode,\n body: ordargument(args[0])\n };\n },\n\n htmlBuilder(group, options) {\n var elements = buildExpression$1(group.body, options, false);\n return buildCommon.makeFragment(elements);\n },\n\n mathmlBuilder(group, options) {\n return new mathMLTree.MathNode(\"mrow\", buildExpression(group.body, options));\n }\n\n});\n\ndefineFunction({\n type: \"html\",\n names: [\"\\\\htmlClass\", \"\\\\htmlId\", \"\\\\htmlStyle\", \"\\\\htmlData\"],\n props: {\n numArgs: 2,\n argTypes: [\"raw\", \"original\"],\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName,\n token\n } = _ref;\n var value = assertNodeType(args[0], \"raw\").string;\n var body = args[1];\n\n if (parser.settings.strict) {\n parser.settings.reportNonstrict(\"htmlExtension\", \"HTML extension is disabled on strict mode\");\n }\n\n var trustContext;\n var attributes = {};\n\n switch (funcName) {\n case \"\\\\htmlClass\":\n attributes.class = value;\n trustContext = {\n command: \"\\\\htmlClass\",\n class: value\n };\n break;\n\n case \"\\\\htmlId\":\n attributes.id = value;\n trustContext = {\n command: \"\\\\htmlId\",\n id: value\n };\n break;\n\n case \"\\\\htmlStyle\":\n attributes.style = value;\n trustContext = {\n command: \"\\\\htmlStyle\",\n style: value\n };\n break;\n\n case \"\\\\htmlData\":\n {\n var data = value.split(\",\");\n\n for (var i = 0; i < data.length; i++) {\n var keyVal = data[i].split(\"=\");\n\n if (keyVal.length !== 2) {\n throw new ParseError(\"Error parsing key-value for \\\\htmlData\");\n }\n\n attributes[\"data-\" + keyVal[0].trim()] = keyVal[1].trim();\n }\n\n trustContext = {\n command: \"\\\\htmlData\",\n attributes\n };\n break;\n }\n\n default:\n throw new Error(\"Unrecognized html command\");\n }\n\n if (!parser.settings.isTrusted(trustContext)) {\n return parser.formatUnsupportedCmd(funcName);\n }\n\n return {\n type: \"html\",\n mode: parser.mode,\n attributes,\n body: ordargument(body)\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.body, options, false);\n var classes = [\"enclosing\"];\n\n if (group.attributes.class) {\n classes.push(...group.attributes.class.trim().split(/\\s+/));\n }\n\n var span = buildCommon.makeSpan(classes, elements, options);\n\n for (var attr in group.attributes) {\n if (attr !== \"class\" && group.attributes.hasOwnProperty(attr)) {\n span.setAttribute(attr, group.attributes[attr]);\n }\n }\n\n return span;\n },\n mathmlBuilder: (group, options) => {\n return buildExpressionRow(group.body, options);\n }\n});\n\ndefineFunction({\n type: \"htmlmathml\",\n names: [\"\\\\html@mathml\"],\n props: {\n numArgs: 2,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n return {\n type: \"htmlmathml\",\n mode: parser.mode,\n html: ordargument(args[0]),\n mathml: ordargument(args[1])\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.html, options, false);\n return buildCommon.makeFragment(elements);\n },\n mathmlBuilder: (group, options) => {\n return buildExpressionRow(group.mathml, options);\n }\n});\n\nvar sizeData = function sizeData(str) {\n if (/^[-+]? *(\\d+(\\.\\d*)?|\\.\\d+)$/.test(str)) {\n // str is a number with no unit specified.\n // default unit is bp, per graphix package.\n return {\n number: +str,\n unit: \"bp\"\n };\n } else {\n var match = /([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(str);\n\n if (!match) {\n throw new ParseError(\"Invalid size: '\" + str + \"' in \\\\includegraphics\");\n }\n\n var data = {\n number: +(match[1] + match[2]),\n // sign + magnitude, cast to number\n unit: match[3]\n };\n\n if (!validUnit(data)) {\n throw new ParseError(\"Invalid unit: '\" + data.unit + \"' in \\\\includegraphics.\");\n }\n\n return data;\n }\n};\n\ndefineFunction({\n type: \"includegraphics\",\n names: [\"\\\\includegraphics\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1,\n argTypes: [\"raw\", \"url\"],\n allowedInText: false\n },\n handler: (_ref, args, optArgs) => {\n var {\n parser\n } = _ref;\n var width = {\n number: 0,\n unit: \"em\"\n };\n var height = {\n number: 0.9,\n unit: \"em\"\n }; // sorta character sized.\n\n var totalheight = {\n number: 0,\n unit: \"em\"\n };\n var alt = \"\";\n\n if (optArgs[0]) {\n var attributeStr = assertNodeType(optArgs[0], \"raw\").string; // Parser.js does not parse key/value pairs. We get a string.\n\n var attributes = attributeStr.split(\",\");\n\n for (var i = 0; i < attributes.length; i++) {\n var keyVal = attributes[i].split(\"=\");\n\n if (keyVal.length === 2) {\n var str = keyVal[1].trim();\n\n switch (keyVal[0].trim()) {\n case \"alt\":\n alt = str;\n break;\n\n case \"width\":\n width = sizeData(str);\n break;\n\n case \"height\":\n height = sizeData(str);\n break;\n\n case \"totalheight\":\n totalheight = sizeData(str);\n break;\n\n default:\n throw new ParseError(\"Invalid key: '\" + keyVal[0] + \"' in \\\\includegraphics.\");\n }\n }\n }\n }\n\n var src = assertNodeType(args[0], \"url\").url;\n\n if (alt === \"\") {\n // No alt given. Use the file name. Strip away the path.\n alt = src;\n alt = alt.replace(/^.*[\\\\/]/, '');\n alt = alt.substring(0, alt.lastIndexOf('.'));\n }\n\n if (!parser.settings.isTrusted({\n command: \"\\\\includegraphics\",\n url: src\n })) {\n return parser.formatUnsupportedCmd(\"\\\\includegraphics\");\n }\n\n return {\n type: \"includegraphics\",\n mode: parser.mode,\n alt: alt,\n width: width,\n height: height,\n totalheight: totalheight,\n src: src\n };\n },\n htmlBuilder: (group, options) => {\n var height = calculateSize(group.height, options);\n var depth = 0;\n\n if (group.totalheight.number > 0) {\n depth = calculateSize(group.totalheight, options) - height;\n }\n\n var width = 0;\n\n if (group.width.number > 0) {\n width = calculateSize(group.width, options);\n }\n\n var style = {\n height: makeEm(height + depth)\n };\n\n if (width > 0) {\n style.width = makeEm(width);\n }\n\n if (depth > 0) {\n style.verticalAlign = makeEm(-depth);\n }\n\n var node = new Img(group.src, group.alt, style);\n node.height = height;\n node.depth = depth;\n return node;\n },\n mathmlBuilder: (group, options) => {\n var node = new mathMLTree.MathNode(\"mglyph\", []);\n node.setAttribute(\"alt\", group.alt);\n var height = calculateSize(group.height, options);\n var depth = 0;\n\n if (group.totalheight.number > 0) {\n depth = calculateSize(group.totalheight, options) - height;\n node.setAttribute(\"valign\", makeEm(-depth));\n }\n\n node.setAttribute(\"height\", makeEm(height + depth));\n\n if (group.width.number > 0) {\n var width = calculateSize(group.width, options);\n node.setAttribute(\"width\", makeEm(width));\n }\n\n node.setAttribute(\"src\", group.src);\n return node;\n }\n});\n\n// Horizontal spacing commands\n\ndefineFunction({\n type: \"kern\",\n names: [\"\\\\kern\", \"\\\\mkern\", \"\\\\hskip\", \"\\\\mskip\"],\n props: {\n numArgs: 1,\n argTypes: [\"size\"],\n primitive: true,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var size = assertNodeType(args[0], \"size\");\n\n if (parser.settings.strict) {\n var mathFunction = funcName[1] === 'm'; // \\mkern, \\mskip\n\n var muUnit = size.value.unit === 'mu';\n\n if (mathFunction) {\n if (!muUnit) {\n parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" supports only mu units, \" + (\"not \" + size.value.unit + \" units\"));\n }\n\n if (parser.mode !== \"math\") {\n parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" works only in math mode\");\n }\n } else {\n // !mathFunction\n if (muUnit) {\n parser.settings.reportNonstrict(\"mathVsTextUnits\", \"LaTeX's \" + funcName + \" doesn't support mu units\");\n }\n }\n }\n\n return {\n type: \"kern\",\n mode: parser.mode,\n dimension: size.value\n };\n },\n\n htmlBuilder(group, options) {\n return buildCommon.makeGlue(group.dimension, options);\n },\n\n mathmlBuilder(group, options) {\n var dimension = calculateSize(group.dimension, options);\n return new mathMLTree.SpaceNode(dimension);\n }\n\n});\n\n// Horizontal overlap functions\ndefineFunction({\n type: \"lap\",\n names: [\"\\\\mathllap\", \"\\\\mathrlap\", \"\\\\mathclap\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"lap\",\n mode: parser.mode,\n alignment: funcName.slice(5),\n body\n };\n },\n htmlBuilder: (group, options) => {\n // mathllap, mathrlap, mathclap\n var inner;\n\n if (group.alignment === \"clap\") {\n // ref: https://www.math.lsu.edu/~aperlis/publications/mathclap/\n inner = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]); // wrap, since CSS will center a .clap > .inner > span\n\n inner = buildCommon.makeSpan([\"inner\"], [inner], options);\n } else {\n inner = buildCommon.makeSpan([\"inner\"], [buildGroup$1(group.body, options)]);\n }\n\n var fix = buildCommon.makeSpan([\"fix\"], []);\n var node = buildCommon.makeSpan([group.alignment], [inner, fix], options); // At this point, we have correctly set horizontal alignment of the\n // two items involved in the lap.\n // Next, use a strut to set the height of the HTML bounding box.\n // Otherwise, a tall argument may be misplaced.\n // This code resolved issue #1153\n\n var strut = buildCommon.makeSpan([\"strut\"]);\n strut.style.height = makeEm(node.height + node.depth);\n\n if (node.depth) {\n strut.style.verticalAlign = makeEm(-node.depth);\n }\n\n node.children.unshift(strut); // Next, prevent vertical misplacement when next to something tall.\n // This code resolves issue #1234\n\n node = buildCommon.makeSpan([\"thinbox\"], [node], options);\n return buildCommon.makeSpan([\"mord\", \"vbox\"], [node], options);\n },\n mathmlBuilder: (group, options) => {\n // mathllap, mathrlap, mathclap\n var node = new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)]);\n\n if (group.alignment !== \"rlap\") {\n var offset = group.alignment === \"llap\" ? \"-1\" : \"-0.5\";\n node.setAttribute(\"lspace\", offset + \"width\");\n }\n\n node.setAttribute(\"width\", \"0px\");\n return node;\n }\n});\n\ndefineFunction({\n type: \"styling\",\n names: [\"\\\\(\", \"$\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n allowedInMath: false\n },\n\n handler(_ref, args) {\n var {\n funcName,\n parser\n } = _ref;\n var outerMode = parser.mode;\n parser.switchMode(\"math\");\n var close = funcName === \"\\\\(\" ? \"\\\\)\" : \"$\";\n var body = parser.parseExpression(false, close);\n parser.expect(close);\n parser.switchMode(outerMode);\n return {\n type: \"styling\",\n mode: parser.mode,\n style: \"text\",\n body\n };\n }\n\n}); // Check for extra closing math delimiters\n\ndefineFunction({\n type: \"text\",\n // Doesn't matter what this is.\n names: [\"\\\\)\", \"\\\\]\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n allowedInMath: false\n },\n\n handler(context, args) {\n throw new ParseError(\"Mismatched \" + context.funcName);\n }\n\n});\n\nvar chooseMathStyle = (group, options) => {\n switch (options.style.size) {\n case Style$1.DISPLAY.size:\n return group.display;\n\n case Style$1.TEXT.size:\n return group.text;\n\n case Style$1.SCRIPT.size:\n return group.script;\n\n case Style$1.SCRIPTSCRIPT.size:\n return group.scriptscript;\n\n default:\n return group.text;\n }\n};\n\ndefineFunction({\n type: \"mathchoice\",\n names: [\"\\\\mathchoice\"],\n props: {\n numArgs: 4,\n primitive: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n return {\n type: \"mathchoice\",\n mode: parser.mode,\n display: ordargument(args[0]),\n text: ordargument(args[1]),\n script: ordargument(args[2]),\n scriptscript: ordargument(args[3])\n };\n },\n htmlBuilder: (group, options) => {\n var body = chooseMathStyle(group, options);\n var elements = buildExpression$1(body, options, false);\n return buildCommon.makeFragment(elements);\n },\n mathmlBuilder: (group, options) => {\n var body = chooseMathStyle(group, options);\n return buildExpressionRow(body, options);\n }\n});\n\nvar assembleSupSub = (base, supGroup, subGroup, options, style, slant, baseShift) => {\n base = buildCommon.makeSpan([], [base]);\n var subIsSingleCharacter = subGroup && utils.isCharacterBox(subGroup);\n var sub;\n var sup; // We manually have to handle the superscripts and subscripts. This,\n // aside from the kern calculations, is copied from supsub.\n\n if (supGroup) {\n var elem = buildGroup$1(supGroup, options.havingStyle(style.sup()), options);\n sup = {\n elem,\n kern: Math.max(options.fontMetrics().bigOpSpacing1, options.fontMetrics().bigOpSpacing3 - elem.depth)\n };\n }\n\n if (subGroup) {\n var _elem = buildGroup$1(subGroup, options.havingStyle(style.sub()), options);\n\n sub = {\n elem: _elem,\n kern: Math.max(options.fontMetrics().bigOpSpacing2, options.fontMetrics().bigOpSpacing4 - _elem.height)\n };\n } // Build the final group as a vlist of the possible subscript, base,\n // and possible superscript.\n\n\n var finalGroup;\n\n if (sup && sub) {\n var bottom = options.fontMetrics().bigOpSpacing5 + sub.elem.height + sub.elem.depth + sub.kern + base.depth + baseShift;\n finalGroup = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: bottom,\n children: [{\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }, {\n type: \"elem\",\n elem: sub.elem,\n marginLeft: makeEm(-slant)\n }, {\n type: \"kern\",\n size: sub.kern\n }, {\n type: \"elem\",\n elem: base\n }, {\n type: \"kern\",\n size: sup.kern\n }, {\n type: \"elem\",\n elem: sup.elem,\n marginLeft: makeEm(slant)\n }, {\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }]\n }, options);\n } else if (sub) {\n var top = base.height - baseShift; // Shift the limits by the slant of the symbol. Note\n // that we are supposed to shift the limits by 1/2 of the slant,\n // but since we are centering the limits adding a full slant of\n // margin will shift by 1/2 that.\n\n finalGroup = buildCommon.makeVList({\n positionType: \"top\",\n positionData: top,\n children: [{\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }, {\n type: \"elem\",\n elem: sub.elem,\n marginLeft: makeEm(-slant)\n }, {\n type: \"kern\",\n size: sub.kern\n }, {\n type: \"elem\",\n elem: base\n }]\n }, options);\n } else if (sup) {\n var _bottom = base.depth + baseShift;\n\n finalGroup = buildCommon.makeVList({\n positionType: \"bottom\",\n positionData: _bottom,\n children: [{\n type: \"elem\",\n elem: base\n }, {\n type: \"kern\",\n size: sup.kern\n }, {\n type: \"elem\",\n elem: sup.elem,\n marginLeft: makeEm(slant)\n }, {\n type: \"kern\",\n size: options.fontMetrics().bigOpSpacing5\n }]\n }, options);\n } else {\n // This case probably shouldn't occur (this would mean the\n // supsub was sending us a group with no superscript or\n // subscript) but be safe.\n return base;\n }\n\n var parts = [finalGroup];\n\n if (sub && slant !== 0 && !subIsSingleCharacter) {\n // A negative margin-left was applied to the lower limit.\n // Avoid an overlap by placing a spacer on the left on the group.\n var spacer = buildCommon.makeSpan([\"mspace\"], [], options);\n spacer.style.marginRight = makeEm(slant);\n parts.unshift(spacer);\n }\n\n return buildCommon.makeSpan([\"mop\", \"op-limits\"], parts, options);\n};\n\n// Limits, symbols\n// Most operators have a large successor symbol, but these don't.\nvar noSuccessor = [\"\\\\smallint\"]; // NOTE: Unlike most `htmlBuilder`s, this one handles not only \"op\", but also\n// \"supsub\" since some of them (like \\int) can affect super/subscripting.\n\nvar htmlBuilder$2 = (grp, options) => {\n // Operators are handled in the TeXbook pg. 443-444, rule 13(a).\n var supGroup;\n var subGroup;\n var hasLimits = false;\n var group;\n\n if (grp.type === \"supsub\") {\n // If we have limits, supsub will pass us its group to handle. Pull\n // out the superscript and subscript and set the group to the op in\n // its base.\n supGroup = grp.sup;\n subGroup = grp.sub;\n group = assertNodeType(grp.base, \"op\");\n hasLimits = true;\n } else {\n group = assertNodeType(grp, \"op\");\n }\n\n var style = options.style;\n var large = false;\n\n if (style.size === Style$1.DISPLAY.size && group.symbol && !utils.contains(noSuccessor, group.name)) {\n // Most symbol operators get larger in displaystyle (rule 13)\n large = true;\n }\n\n var base;\n\n if (group.symbol) {\n // If this is a symbol, create the symbol.\n var fontName = large ? \"Size2-Regular\" : \"Size1-Regular\";\n var stash = \"\";\n\n if (group.name === \"\\\\oiint\" || group.name === \"\\\\oiiint\") {\n // No font glyphs yet, so use a glyph w/o the oval.\n // TODO: When font glyphs are available, delete this code.\n stash = group.name.slice(1);\n group.name = stash === \"oiint\" ? \"\\\\iint\" : \"\\\\iiint\";\n }\n\n base = buildCommon.makeSymbol(group.name, fontName, \"math\", options, [\"mop\", \"op-symbol\", large ? \"large-op\" : \"small-op\"]);\n\n if (stash.length > 0) {\n // We're in \\oiint or \\oiiint. Overlay the oval.\n // TODO: When font glyphs are available, delete this code.\n var italic = base.italic;\n var oval = buildCommon.staticSvg(stash + \"Size\" + (large ? \"2\" : \"1\"), options);\n base = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: [{\n type: \"elem\",\n elem: base,\n shift: 0\n }, {\n type: \"elem\",\n elem: oval,\n shift: large ? 0.08 : 0\n }]\n }, options);\n group.name = \"\\\\\" + stash;\n base.classes.unshift(\"mop\"); // $FlowFixMe\n\n base.italic = italic;\n }\n } else if (group.body) {\n // If this is a list, compose that list.\n var inner = buildExpression$1(group.body, options, true);\n\n if (inner.length === 1 && inner[0] instanceof SymbolNode) {\n base = inner[0];\n base.classes[0] = \"mop\"; // replace old mclass\n } else {\n base = buildCommon.makeSpan([\"mop\"], inner, options);\n }\n } else {\n // Otherwise, this is a text operator. Build the text from the\n // operator's name.\n var output = [];\n\n for (var i = 1; i < group.name.length; i++) {\n output.push(buildCommon.mathsym(group.name[i], group.mode, options));\n }\n\n base = buildCommon.makeSpan([\"mop\"], output, options);\n } // If content of op is a single symbol, shift it vertically.\n\n\n var baseShift = 0;\n var slant = 0;\n\n if ((base instanceof SymbolNode || group.name === \"\\\\oiint\" || group.name === \"\\\\oiiint\") && !group.suppressBaseShift) {\n // We suppress the shift of the base of \\overset and \\underset. Otherwise,\n // shift the symbol so its center lies on the axis (rule 13). It\n // appears that our fonts have the centers of the symbols already\n // almost on the axis, so these numbers are very small. Note we\n // don't actually apply this here, but instead it is used either in\n // the vlist creation or separately when there are no limits.\n baseShift = (base.height - base.depth) / 2 - options.fontMetrics().axisHeight; // The slant of the symbol is just its italic correction.\n // $FlowFixMe\n\n slant = base.italic;\n }\n\n if (hasLimits) {\n return assembleSupSub(base, supGroup, subGroup, options, style, slant, baseShift);\n } else {\n if (baseShift) {\n base.style.position = \"relative\";\n base.style.top = makeEm(baseShift);\n }\n\n return base;\n }\n};\n\nvar mathmlBuilder$1 = (group, options) => {\n var node;\n\n if (group.symbol) {\n // This is a symbol. Just add the symbol.\n node = new MathNode(\"mo\", [makeText(group.name, group.mode)]);\n\n if (utils.contains(noSuccessor, group.name)) {\n node.setAttribute(\"largeop\", \"false\");\n }\n } else if (group.body) {\n // This is an operator with children. Add them.\n node = new MathNode(\"mo\", buildExpression(group.body, options));\n } else {\n // This is a text operator. Add all of the characters from the\n // operator's name.\n node = new MathNode(\"mi\", [new TextNode(group.name.slice(1))]); // Append an .\n // ref: https://www.w3.org/TR/REC-MathML/chap3_2.html#sec3.2.4\n\n var operator = new MathNode(\"mo\", [makeText(\"\\u2061\", \"text\")]);\n\n if (group.parentIsSupSub) {\n node = new MathNode(\"mrow\", [node, operator]);\n } else {\n node = newDocumentFragment([node, operator]);\n }\n }\n\n return node;\n};\n\nvar singleCharBigOps = {\n \"\\u220F\": \"\\\\prod\",\n \"\\u2210\": \"\\\\coprod\",\n \"\\u2211\": \"\\\\sum\",\n \"\\u22c0\": \"\\\\bigwedge\",\n \"\\u22c1\": \"\\\\bigvee\",\n \"\\u22c2\": \"\\\\bigcap\",\n \"\\u22c3\": \"\\\\bigcup\",\n \"\\u2a00\": \"\\\\bigodot\",\n \"\\u2a01\": \"\\\\bigoplus\",\n \"\\u2a02\": \"\\\\bigotimes\",\n \"\\u2a04\": \"\\\\biguplus\",\n \"\\u2a06\": \"\\\\bigsqcup\"\n};\ndefineFunction({\n type: \"op\",\n names: [\"\\\\coprod\", \"\\\\bigvee\", \"\\\\bigwedge\", \"\\\\biguplus\", \"\\\\bigcap\", \"\\\\bigcup\", \"\\\\intop\", \"\\\\prod\", \"\\\\sum\", \"\\\\bigotimes\", \"\\\\bigoplus\", \"\\\\bigodot\", \"\\\\bigsqcup\", \"\\\\smallint\", \"\\u220F\", \"\\u2210\", \"\\u2211\", \"\\u22c0\", \"\\u22c1\", \"\\u22c2\", \"\\u22c3\", \"\\u2a00\", \"\\u2a01\", \"\\u2a02\", \"\\u2a04\", \"\\u2a06\"],\n props: {\n numArgs: 0\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var fName = funcName;\n\n if (fName.length === 1) {\n fName = singleCharBigOps[fName];\n }\n\n return {\n type: \"op\",\n mode: parser.mode,\n limits: true,\n parentIsSupSub: false,\n symbol: true,\n name: fName\n };\n },\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // Note: calling defineFunction with a type that's already been defined only\n// works because the same htmlBuilder and mathmlBuilder are being used.\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\mathop\"],\n props: {\n numArgs: 1,\n primitive: true\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var body = args[0];\n return {\n type: \"op\",\n mode: parser.mode,\n limits: false,\n parentIsSupSub: false,\n symbol: false,\n body: ordargument(body)\n };\n },\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // There are 2 flags for operators; whether they produce limits in\n// displaystyle, and whether they are symbols and should grow in\n// displaystyle. These four groups cover the four possible choices.\n\nvar singleCharIntegrals = {\n \"\\u222b\": \"\\\\int\",\n \"\\u222c\": \"\\\\iint\",\n \"\\u222d\": \"\\\\iiint\",\n \"\\u222e\": \"\\\\oint\",\n \"\\u222f\": \"\\\\oiint\",\n \"\\u2230\": \"\\\\oiiint\"\n}; // No limits, not symbols\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\arcsin\", \"\\\\arccos\", \"\\\\arctan\", \"\\\\arctg\", \"\\\\arcctg\", \"\\\\arg\", \"\\\\ch\", \"\\\\cos\", \"\\\\cosec\", \"\\\\cosh\", \"\\\\cot\", \"\\\\cotg\", \"\\\\coth\", \"\\\\csc\", \"\\\\ctg\", \"\\\\cth\", \"\\\\deg\", \"\\\\dim\", \"\\\\exp\", \"\\\\hom\", \"\\\\ker\", \"\\\\lg\", \"\\\\ln\", \"\\\\log\", \"\\\\sec\", \"\\\\sin\", \"\\\\sinh\", \"\\\\sh\", \"\\\\tan\", \"\\\\tanh\", \"\\\\tg\", \"\\\\th\"],\n props: {\n numArgs: 0\n },\n\n handler(_ref3) {\n var {\n parser,\n funcName\n } = _ref3;\n return {\n type: \"op\",\n mode: parser.mode,\n limits: false,\n parentIsSupSub: false,\n symbol: false,\n name: funcName\n };\n },\n\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // Limits, not symbols\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\det\", \"\\\\gcd\", \"\\\\inf\", \"\\\\lim\", \"\\\\max\", \"\\\\min\", \"\\\\Pr\", \"\\\\sup\"],\n props: {\n numArgs: 0\n },\n\n handler(_ref4) {\n var {\n parser,\n funcName\n } = _ref4;\n return {\n type: \"op\",\n mode: parser.mode,\n limits: true,\n parentIsSupSub: false,\n symbol: false,\n name: funcName\n };\n },\n\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n}); // No limits, symbols\n\ndefineFunction({\n type: \"op\",\n names: [\"\\\\int\", \"\\\\iint\", \"\\\\iiint\", \"\\\\oint\", \"\\\\oiint\", \"\\\\oiiint\", \"\\u222b\", \"\\u222c\", \"\\u222d\", \"\\u222e\", \"\\u222f\", \"\\u2230\"],\n props: {\n numArgs: 0\n },\n\n handler(_ref5) {\n var {\n parser,\n funcName\n } = _ref5;\n var fName = funcName;\n\n if (fName.length === 1) {\n fName = singleCharIntegrals[fName];\n }\n\n return {\n type: \"op\",\n mode: parser.mode,\n limits: false,\n parentIsSupSub: false,\n symbol: true,\n name: fName\n };\n },\n\n htmlBuilder: htmlBuilder$2,\n mathmlBuilder: mathmlBuilder$1\n});\n\n// NOTE: Unlike most `htmlBuilder`s, this one handles not only\n// \"operatorname\", but also \"supsub\" since \\operatorname* can\n// affect super/subscripting.\nvar htmlBuilder$1 = (grp, options) => {\n // Operators are handled in the TeXbook pg. 443-444, rule 13(a).\n var supGroup;\n var subGroup;\n var hasLimits = false;\n var group;\n\n if (grp.type === \"supsub\") {\n // If we have limits, supsub will pass us its group to handle. Pull\n // out the superscript and subscript and set the group to the op in\n // its base.\n supGroup = grp.sup;\n subGroup = grp.sub;\n group = assertNodeType(grp.base, \"operatorname\");\n hasLimits = true;\n } else {\n group = assertNodeType(grp, \"operatorname\");\n }\n\n var base;\n\n if (group.body.length > 0) {\n var body = group.body.map(child => {\n // $FlowFixMe: Check if the node has a string `text` property.\n var childText = child.text;\n\n if (typeof childText === \"string\") {\n return {\n type: \"textord\",\n mode: child.mode,\n text: childText\n };\n } else {\n return child;\n }\n }); // Consolidate function names into symbol characters.\n\n var expression = buildExpression$1(body, options.withFont(\"mathrm\"), true);\n\n for (var i = 0; i < expression.length; i++) {\n var child = expression[i];\n\n if (child instanceof SymbolNode) {\n // Per amsopn package,\n // change minus to hyphen and \\ast to asterisk\n child.text = child.text.replace(/\\u2212/, \"-\").replace(/\\u2217/, \"*\");\n }\n }\n\n base = buildCommon.makeSpan([\"mop\"], expression, options);\n } else {\n base = buildCommon.makeSpan([\"mop\"], [], options);\n }\n\n if (hasLimits) {\n return assembleSupSub(base, supGroup, subGroup, options, options.style, 0, 0);\n } else {\n return base;\n }\n};\n\nvar mathmlBuilder = (group, options) => {\n // The steps taken here are similar to the html version.\n var expression = buildExpression(group.body, options.withFont(\"mathrm\")); // Is expression a string or has it something like a fraction?\n\n var isAllString = true; // default\n\n for (var i = 0; i < expression.length; i++) {\n var node = expression[i];\n\n if (node instanceof mathMLTree.SpaceNode) ; else if (node instanceof mathMLTree.MathNode) {\n switch (node.type) {\n case \"mi\":\n case \"mn\":\n case \"ms\":\n case \"mspace\":\n case \"mtext\":\n break;\n // Do nothing yet.\n\n case \"mo\":\n {\n var child = node.children[0];\n\n if (node.children.length === 1 && child instanceof mathMLTree.TextNode) {\n child.text = child.text.replace(/\\u2212/, \"-\").replace(/\\u2217/, \"*\");\n } else {\n isAllString = false;\n }\n\n break;\n }\n\n default:\n isAllString = false;\n }\n } else {\n isAllString = false;\n }\n }\n\n if (isAllString) {\n // Write a single TextNode instead of multiple nested tags.\n var word = expression.map(node => node.toText()).join(\"\");\n expression = [new mathMLTree.TextNode(word)];\n }\n\n var identifier = new mathMLTree.MathNode(\"mi\", expression);\n identifier.setAttribute(\"mathvariant\", \"normal\"); // \\u2061 is the same as ⁡\n // ref: https://www.w3schools.com/charsets/ref_html_entities_a.asp\n\n var operator = new mathMLTree.MathNode(\"mo\", [makeText(\"\\u2061\", \"text\")]);\n\n if (group.parentIsSupSub) {\n return new mathMLTree.MathNode(\"mrow\", [identifier, operator]);\n } else {\n return mathMLTree.newDocumentFragment([identifier, operator]);\n }\n}; // \\operatorname\n// amsopn.dtx: \\mathop{#1\\kern\\z@\\operator@font#3}\\newmcodes@\n\n\ndefineFunction({\n type: \"operatorname\",\n names: [\"\\\\operatorname@\", \"\\\\operatornamewithlimits\"],\n props: {\n numArgs: 1\n },\n handler: (_ref, args) => {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"operatorname\",\n mode: parser.mode,\n body: ordargument(body),\n alwaysHandleSupSub: funcName === \"\\\\operatornamewithlimits\",\n limits: false,\n parentIsSupSub: false\n };\n },\n htmlBuilder: htmlBuilder$1,\n mathmlBuilder\n});\ndefineMacro(\"\\\\operatorname\", \"\\\\@ifstar\\\\operatornamewithlimits\\\\operatorname@\");\n\ndefineFunctionBuilders({\n type: \"ordgroup\",\n\n htmlBuilder(group, options) {\n if (group.semisimple) {\n return buildCommon.makeFragment(buildExpression$1(group.body, options, false));\n }\n\n return buildCommon.makeSpan([\"mord\"], buildExpression$1(group.body, options, true), options);\n },\n\n mathmlBuilder(group, options) {\n return buildExpressionRow(group.body, options, true);\n }\n\n});\n\ndefineFunction({\n type: \"overline\",\n names: [\"\\\\overline\"],\n props: {\n numArgs: 1\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var body = args[0];\n return {\n type: \"overline\",\n mode: parser.mode,\n body\n };\n },\n\n htmlBuilder(group, options) {\n // Overlines are handled in the TeXbook pg 443, Rule 9.\n // Build the inner group in the cramped style.\n var innerGroup = buildGroup$1(group.body, options.havingCrampedStyle()); // Create the line above the body\n\n var line = buildCommon.makeLineSpan(\"overline-line\", options); // Generate the vlist, with the appropriate kerns\n\n var defaultRuleThickness = options.fontMetrics().defaultRuleThickness;\n var vlist = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: innerGroup\n }, {\n type: \"kern\",\n size: 3 * defaultRuleThickness\n }, {\n type: \"elem\",\n elem: line\n }, {\n type: \"kern\",\n size: defaultRuleThickness\n }]\n }, options);\n return buildCommon.makeSpan([\"mord\", \"overline\"], [vlist], options);\n },\n\n mathmlBuilder(group, options) {\n var operator = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(\"\\u203e\")]);\n operator.setAttribute(\"stretchy\", \"true\");\n var node = new mathMLTree.MathNode(\"mover\", [buildGroup(group.body, options), operator]);\n node.setAttribute(\"accent\", \"true\");\n return node;\n }\n\n});\n\ndefineFunction({\n type: \"phantom\",\n names: [\"\\\\phantom\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n parser\n } = _ref;\n var body = args[0];\n return {\n type: \"phantom\",\n mode: parser.mode,\n body: ordargument(body)\n };\n },\n htmlBuilder: (group, options) => {\n var elements = buildExpression$1(group.body, options.withPhantom(), false); // \\phantom isn't supposed to affect the elements it contains.\n // See \"color\" for more details.\n\n return buildCommon.makeFragment(elements);\n },\n mathmlBuilder: (group, options) => {\n var inner = buildExpression(group.body, options);\n return new mathMLTree.MathNode(\"mphantom\", inner);\n }\n});\ndefineFunction({\n type: \"hphantom\",\n names: [\"\\\\hphantom\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref2, args) => {\n var {\n parser\n } = _ref2;\n var body = args[0];\n return {\n type: \"hphantom\",\n mode: parser.mode,\n body\n };\n },\n htmlBuilder: (group, options) => {\n var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options.withPhantom())]);\n node.height = 0;\n node.depth = 0;\n\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].height = 0;\n node.children[i].depth = 0;\n }\n } // See smash for comment re: use of makeVList\n\n\n node = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: node\n }]\n }, options); // For spacing, TeX treats \\smash as a math group (same spacing as ord).\n\n return buildCommon.makeSpan([\"mord\"], [node], options);\n },\n mathmlBuilder: (group, options) => {\n var inner = buildExpression(ordargument(group.body), options);\n var phantom = new mathMLTree.MathNode(\"mphantom\", inner);\n var node = new mathMLTree.MathNode(\"mpadded\", [phantom]);\n node.setAttribute(\"height\", \"0px\");\n node.setAttribute(\"depth\", \"0px\");\n return node;\n }\n});\ndefineFunction({\n type: \"vphantom\",\n names: [\"\\\\vphantom\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n handler: (_ref3, args) => {\n var {\n parser\n } = _ref3;\n var body = args[0];\n return {\n type: \"vphantom\",\n mode: parser.mode,\n body\n };\n },\n htmlBuilder: (group, options) => {\n var inner = buildCommon.makeSpan([\"inner\"], [buildGroup$1(group.body, options.withPhantom())]);\n var fix = buildCommon.makeSpan([\"fix\"], []);\n return buildCommon.makeSpan([\"mord\", \"rlap\"], [inner, fix], options);\n },\n mathmlBuilder: (group, options) => {\n var inner = buildExpression(ordargument(group.body), options);\n var phantom = new mathMLTree.MathNode(\"mphantom\", inner);\n var node = new mathMLTree.MathNode(\"mpadded\", [phantom]);\n node.setAttribute(\"width\", \"0px\");\n return node;\n }\n});\n\ndefineFunction({\n type: \"raisebox\",\n names: [\"\\\\raisebox\"],\n props: {\n numArgs: 2,\n argTypes: [\"size\", \"hbox\"],\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n var amount = assertNodeType(args[0], \"size\").value;\n var body = args[1];\n return {\n type: \"raisebox\",\n mode: parser.mode,\n dy: amount,\n body\n };\n },\n\n htmlBuilder(group, options) {\n var body = buildGroup$1(group.body, options);\n var dy = calculateSize(group.dy, options);\n return buildCommon.makeVList({\n positionType: \"shift\",\n positionData: -dy,\n children: [{\n type: \"elem\",\n elem: body\n }]\n }, options);\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)]);\n var dy = group.dy.number + group.dy.unit;\n node.setAttribute(\"voffset\", dy);\n return node;\n }\n\n});\n\ndefineFunction({\n type: \"internal\",\n names: [\"\\\\relax\"],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n\n handler(_ref) {\n var {\n parser\n } = _ref;\n return {\n type: \"internal\",\n mode: parser.mode\n };\n }\n\n});\n\ndefineFunction({\n type: \"rule\",\n names: [\"\\\\rule\"],\n props: {\n numArgs: 2,\n numOptionalArgs: 1,\n argTypes: [\"size\", \"size\", \"size\"]\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser\n } = _ref;\n var shift = optArgs[0];\n var width = assertNodeType(args[0], \"size\");\n var height = assertNodeType(args[1], \"size\");\n return {\n type: \"rule\",\n mode: parser.mode,\n shift: shift && assertNodeType(shift, \"size\").value,\n width: width.value,\n height: height.value\n };\n },\n\n htmlBuilder(group, options) {\n // Make an empty span for the rule\n var rule = buildCommon.makeSpan([\"mord\", \"rule\"], [], options); // Calculate the shift, width, and height of the rule, and account for units\n\n var width = calculateSize(group.width, options);\n var height = calculateSize(group.height, options);\n var shift = group.shift ? calculateSize(group.shift, options) : 0; // Style the rule to the right size\n\n rule.style.borderRightWidth = makeEm(width);\n rule.style.borderTopWidth = makeEm(height);\n rule.style.bottom = makeEm(shift); // Record the height and width\n\n rule.width = width;\n rule.height = height + shift;\n rule.depth = -shift; // Font size is the number large enough that the browser will\n // reserve at least `absHeight` space above the baseline.\n // The 1.125 factor was empirically determined\n\n rule.maxFontSize = height * 1.125 * options.sizeMultiplier;\n return rule;\n },\n\n mathmlBuilder(group, options) {\n var width = calculateSize(group.width, options);\n var height = calculateSize(group.height, options);\n var shift = group.shift ? calculateSize(group.shift, options) : 0;\n var color = options.color && options.getColor() || \"black\";\n var rule = new mathMLTree.MathNode(\"mspace\");\n rule.setAttribute(\"mathbackground\", color);\n rule.setAttribute(\"width\", makeEm(width));\n rule.setAttribute(\"height\", makeEm(height));\n var wrapper = new mathMLTree.MathNode(\"mpadded\", [rule]);\n\n if (shift >= 0) {\n wrapper.setAttribute(\"height\", makeEm(shift));\n } else {\n wrapper.setAttribute(\"height\", makeEm(shift));\n wrapper.setAttribute(\"depth\", makeEm(-shift));\n }\n\n wrapper.setAttribute(\"voffset\", makeEm(shift));\n return wrapper;\n }\n\n});\n\nfunction sizingGroup(value, options, baseOptions) {\n var inner = buildExpression$1(value, options, false);\n var multiplier = options.sizeMultiplier / baseOptions.sizeMultiplier; // Add size-resetting classes to the inner list and set maxFontSize\n // manually. Handle nested size changes.\n\n for (var i = 0; i < inner.length; i++) {\n var pos = inner[i].classes.indexOf(\"sizing\");\n\n if (pos < 0) {\n Array.prototype.push.apply(inner[i].classes, options.sizingClasses(baseOptions));\n } else if (inner[i].classes[pos + 1] === \"reset-size\" + options.size) {\n // This is a nested size change: e.g., inner[i] is the \"b\" in\n // `\\Huge a \\small b`. Override the old size (the `reset-` class)\n // but not the new size.\n inner[i].classes[pos + 1] = \"reset-size\" + baseOptions.size;\n }\n\n inner[i].height *= multiplier;\n inner[i].depth *= multiplier;\n }\n\n return buildCommon.makeFragment(inner);\n}\nvar sizeFuncs = [\"\\\\tiny\", \"\\\\sixptsize\", \"\\\\scriptsize\", \"\\\\footnotesize\", \"\\\\small\", \"\\\\normalsize\", \"\\\\large\", \"\\\\Large\", \"\\\\LARGE\", \"\\\\huge\", \"\\\\Huge\"];\nvar htmlBuilder = (group, options) => {\n // Handle sizing operators like \\Huge. Real TeX doesn't actually allow\n // these functions inside of math expressions, so we do some special\n // handling.\n var newOptions = options.havingSize(group.size);\n return sizingGroup(group.body, newOptions, options);\n};\ndefineFunction({\n type: \"sizing\",\n names: sizeFuncs,\n props: {\n numArgs: 0,\n allowedInText: true\n },\n handler: (_ref, args) => {\n var {\n breakOnTokenText,\n funcName,\n parser\n } = _ref;\n var body = parser.parseExpression(false, breakOnTokenText);\n return {\n type: \"sizing\",\n mode: parser.mode,\n // Figure out what size to use based on the list of functions above\n size: sizeFuncs.indexOf(funcName) + 1,\n body\n };\n },\n htmlBuilder,\n mathmlBuilder: (group, options) => {\n var newOptions = options.havingSize(group.size);\n var inner = buildExpression(group.body, newOptions);\n var node = new mathMLTree.MathNode(\"mstyle\", inner); // TODO(emily): This doesn't produce the correct size for nested size\n // changes, because we don't keep state of what style we're currently\n // in, so we can't reset the size to normal before changing it. Now\n // that we're passing an options parameter we should be able to fix\n // this.\n\n node.setAttribute(\"mathsize\", makeEm(newOptions.sizeMultiplier));\n return node;\n }\n});\n\n// smash, with optional [tb], as in AMS\ndefineFunction({\n type: \"smash\",\n names: [\"\\\\smash\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1,\n allowedInText: true\n },\n handler: (_ref, args, optArgs) => {\n var {\n parser\n } = _ref;\n var smashHeight = false;\n var smashDepth = false;\n var tbArg = optArgs[0] && assertNodeType(optArgs[0], \"ordgroup\");\n\n if (tbArg) {\n // Optional [tb] argument is engaged.\n // ref: amsmath: \\renewcommand{\\smash}[1][tb]{%\n // def\\mb@t{\\ht}\\def\\mb@b{\\dp}\\def\\mb@tb{\\ht\\z@\\z@\\dp}%\n var letter = \"\";\n\n for (var i = 0; i < tbArg.body.length; ++i) {\n var node = tbArg.body[i]; // $FlowFixMe: Not every node type has a `text` property.\n\n letter = node.text;\n\n if (letter === \"t\") {\n smashHeight = true;\n } else if (letter === \"b\") {\n smashDepth = true;\n } else {\n smashHeight = false;\n smashDepth = false;\n break;\n }\n }\n } else {\n smashHeight = true;\n smashDepth = true;\n }\n\n var body = args[0];\n return {\n type: \"smash\",\n mode: parser.mode,\n body,\n smashHeight,\n smashDepth\n };\n },\n htmlBuilder: (group, options) => {\n var node = buildCommon.makeSpan([], [buildGroup$1(group.body, options)]);\n\n if (!group.smashHeight && !group.smashDepth) {\n return node;\n }\n\n if (group.smashHeight) {\n node.height = 0; // In order to influence makeVList, we have to reset the children.\n\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].height = 0;\n }\n }\n }\n\n if (group.smashDepth) {\n node.depth = 0;\n\n if (node.children) {\n for (var _i = 0; _i < node.children.length; _i++) {\n node.children[_i].depth = 0;\n }\n }\n } // At this point, we've reset the TeX-like height and depth values.\n // But the span still has an HTML line height.\n // makeVList applies \"display: table-cell\", which prevents the browser\n // from acting on that line height. So we'll call makeVList now.\n\n\n var smashedNode = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: node\n }]\n }, options); // For spacing, TeX treats \\hphantom as a math group (same spacing as ord).\n\n return buildCommon.makeSpan([\"mord\"], [smashedNode], options);\n },\n mathmlBuilder: (group, options) => {\n var node = new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)]);\n\n if (group.smashHeight) {\n node.setAttribute(\"height\", \"0px\");\n }\n\n if (group.smashDepth) {\n node.setAttribute(\"depth\", \"0px\");\n }\n\n return node;\n }\n});\n\ndefineFunction({\n type: \"sqrt\",\n names: [\"\\\\sqrt\"],\n props: {\n numArgs: 1,\n numOptionalArgs: 1\n },\n\n handler(_ref, args, optArgs) {\n var {\n parser\n } = _ref;\n var index = optArgs[0];\n var body = args[0];\n return {\n type: \"sqrt\",\n mode: parser.mode,\n body,\n index\n };\n },\n\n htmlBuilder(group, options) {\n // Square roots are handled in the TeXbook pg. 443, Rule 11.\n // First, we do the same steps as in overline to build the inner group\n // and line\n var inner = buildGroup$1(group.body, options.havingCrampedStyle());\n\n if (inner.height === 0) {\n // Render a small surd.\n inner.height = options.fontMetrics().xHeight;\n } // Some groups can return document fragments. Handle those by wrapping\n // them in a span.\n\n\n inner = buildCommon.wrapFragment(inner, options); // Calculate the minimum size for the \\surd delimiter\n\n var metrics = options.fontMetrics();\n var theta = metrics.defaultRuleThickness;\n var phi = theta;\n\n if (options.style.id < Style$1.TEXT.id) {\n phi = options.fontMetrics().xHeight;\n } // Calculate the clearance between the body and line\n\n\n var lineClearance = theta + phi / 4;\n var minDelimiterHeight = inner.height + inner.depth + lineClearance + theta; // Create a sqrt SVG of the required minimum size\n\n var {\n span: img,\n ruleWidth,\n advanceWidth\n } = delimiter.sqrtImage(minDelimiterHeight, options);\n var delimDepth = img.height - ruleWidth; // Adjust the clearance based on the delimiter size\n\n if (delimDepth > inner.height + inner.depth + lineClearance) {\n lineClearance = (lineClearance + delimDepth - inner.height - inner.depth) / 2;\n } // Shift the sqrt image\n\n\n var imgShift = img.height - inner.height - lineClearance - ruleWidth;\n inner.style.paddingLeft = makeEm(advanceWidth); // Overlay the image and the argument.\n\n var body = buildCommon.makeVList({\n positionType: \"firstBaseline\",\n children: [{\n type: \"elem\",\n elem: inner,\n wrapperClasses: [\"svg-align\"]\n }, {\n type: \"kern\",\n size: -(inner.height + imgShift)\n }, {\n type: \"elem\",\n elem: img\n }, {\n type: \"kern\",\n size: ruleWidth\n }]\n }, options);\n\n if (!group.index) {\n return buildCommon.makeSpan([\"mord\", \"sqrt\"], [body], options);\n } else {\n // Handle the optional root index\n // The index is always in scriptscript style\n var newOptions = options.havingStyle(Style$1.SCRIPTSCRIPT);\n var rootm = buildGroup$1(group.index, newOptions, options); // The amount the index is shifted by. This is taken from the TeX\n // source, in the definition of `\\r@@t`.\n\n var toShift = 0.6 * (body.height - body.depth); // Build a VList with the superscript shifted up correctly\n\n var rootVList = buildCommon.makeVList({\n positionType: \"shift\",\n positionData: -toShift,\n children: [{\n type: \"elem\",\n elem: rootm\n }]\n }, options); // Add a class surrounding it so we can add on the appropriate\n // kerning\n\n var rootVListWrap = buildCommon.makeSpan([\"root\"], [rootVList]);\n return buildCommon.makeSpan([\"mord\", \"sqrt\"], [rootVListWrap, body], options);\n }\n },\n\n mathmlBuilder(group, options) {\n var {\n body,\n index\n } = group;\n return index ? new mathMLTree.MathNode(\"mroot\", [buildGroup(body, options), buildGroup(index, options)]) : new mathMLTree.MathNode(\"msqrt\", [buildGroup(body, options)]);\n }\n\n});\n\nvar styleMap = {\n \"display\": Style$1.DISPLAY,\n \"text\": Style$1.TEXT,\n \"script\": Style$1.SCRIPT,\n \"scriptscript\": Style$1.SCRIPTSCRIPT\n};\ndefineFunction({\n type: \"styling\",\n names: [\"\\\\displaystyle\", \"\\\\textstyle\", \"\\\\scriptstyle\", \"\\\\scriptscriptstyle\"],\n props: {\n numArgs: 0,\n allowedInText: true,\n primitive: true\n },\n\n handler(_ref, args) {\n var {\n breakOnTokenText,\n funcName,\n parser\n } = _ref;\n // parse out the implicit body\n var body = parser.parseExpression(true, breakOnTokenText); // TODO: Refactor to avoid duplicating styleMap in multiple places (e.g.\n // here and in buildHTML and de-dupe the enumeration of all the styles).\n // $FlowFixMe: The names above exactly match the styles.\n\n var style = funcName.slice(1, funcName.length - 5);\n return {\n type: \"styling\",\n mode: parser.mode,\n // Figure out what style to use by pulling out the style from\n // the function name\n style,\n body\n };\n },\n\n htmlBuilder(group, options) {\n // Style changes are handled in the TeXbook on pg. 442, Rule 3.\n var newStyle = styleMap[group.style];\n var newOptions = options.havingStyle(newStyle).withFont('');\n return sizingGroup(group.body, newOptions, options);\n },\n\n mathmlBuilder(group, options) {\n // Figure out what style we're changing to.\n var newStyle = styleMap[group.style];\n var newOptions = options.havingStyle(newStyle);\n var inner = buildExpression(group.body, newOptions);\n var node = new mathMLTree.MathNode(\"mstyle\", inner);\n var styleAttributes = {\n \"display\": [\"0\", \"true\"],\n \"text\": [\"0\", \"false\"],\n \"script\": [\"1\", \"false\"],\n \"scriptscript\": [\"2\", \"false\"]\n };\n var attr = styleAttributes[group.style];\n node.setAttribute(\"scriptlevel\", attr[0]);\n node.setAttribute(\"displaystyle\", attr[1]);\n return node;\n }\n\n});\n\n/**\n * Sometimes, groups perform special rules when they have superscripts or\n * subscripts attached to them. This function lets the `supsub` group know that\n * Sometimes, groups perform special rules when they have superscripts or\n * its inner element should handle the superscripts and subscripts instead of\n * handling them itself.\n */\nvar htmlBuilderDelegate = function htmlBuilderDelegate(group, options) {\n var base = group.base;\n\n if (!base) {\n return null;\n } else if (base.type === \"op\") {\n // Operators handle supsubs differently when they have limits\n // (e.g. `\\displaystyle\\sum_2^3`)\n var delegate = base.limits && (options.style.size === Style$1.DISPLAY.size || base.alwaysHandleSupSub);\n return delegate ? htmlBuilder$2 : null;\n } else if (base.type === \"operatorname\") {\n var _delegate = base.alwaysHandleSupSub && (options.style.size === Style$1.DISPLAY.size || base.limits);\n\n return _delegate ? htmlBuilder$1 : null;\n } else if (base.type === \"accent\") {\n return utils.isCharacterBox(base.base) ? htmlBuilder$a : null;\n } else if (base.type === \"horizBrace\") {\n var isSup = !group.sub;\n return isSup === base.isOver ? htmlBuilder$3 : null;\n } else {\n return null;\n }\n}; // Super scripts and subscripts, whose precise placement can depend on other\n// functions that precede them.\n\n\ndefineFunctionBuilders({\n type: \"supsub\",\n\n htmlBuilder(group, options) {\n // Superscript and subscripts are handled in the TeXbook on page\n // 445-446, rules 18(a-f).\n // Here is where we defer to the inner group if it should handle\n // superscripts and subscripts itself.\n var builderDelegate = htmlBuilderDelegate(group, options);\n\n if (builderDelegate) {\n return builderDelegate(group, options);\n }\n\n var {\n base: valueBase,\n sup: valueSup,\n sub: valueSub\n } = group;\n var base = buildGroup$1(valueBase, options);\n var supm;\n var subm;\n var metrics = options.fontMetrics(); // Rule 18a\n\n var supShift = 0;\n var subShift = 0;\n var isCharacterBox = valueBase && utils.isCharacterBox(valueBase);\n\n if (valueSup) {\n var newOptions = options.havingStyle(options.style.sup());\n supm = buildGroup$1(valueSup, newOptions, options);\n\n if (!isCharacterBox) {\n supShift = base.height - newOptions.fontMetrics().supDrop * newOptions.sizeMultiplier / options.sizeMultiplier;\n }\n }\n\n if (valueSub) {\n var _newOptions = options.havingStyle(options.style.sub());\n\n subm = buildGroup$1(valueSub, _newOptions, options);\n\n if (!isCharacterBox) {\n subShift = base.depth + _newOptions.fontMetrics().subDrop * _newOptions.sizeMultiplier / options.sizeMultiplier;\n }\n } // Rule 18c\n\n\n var minSupShift;\n\n if (options.style === Style$1.DISPLAY) {\n minSupShift = metrics.sup1;\n } else if (options.style.cramped) {\n minSupShift = metrics.sup3;\n } else {\n minSupShift = metrics.sup2;\n } // scriptspace is a font-size-independent size, so scale it\n // appropriately for use as the marginRight.\n\n\n var multiplier = options.sizeMultiplier;\n var marginRight = makeEm(0.5 / metrics.ptPerEm / multiplier);\n var marginLeft = null;\n\n if (subm) {\n // Subscripts shouldn't be shifted by the base's italic correction.\n // Account for that by shifting the subscript back the appropriate\n // amount. Note we only do this when the base is a single symbol.\n var isOiint = group.base && group.base.type === \"op\" && group.base.name && (group.base.name === \"\\\\oiint\" || group.base.name === \"\\\\oiiint\");\n\n if (base instanceof SymbolNode || isOiint) {\n // $FlowFixMe\n marginLeft = makeEm(-base.italic);\n }\n }\n\n var supsub;\n\n if (supm && subm) {\n supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n subShift = Math.max(subShift, metrics.sub2);\n var ruleWidth = metrics.defaultRuleThickness; // Rule 18e\n\n var maxWidth = 4 * ruleWidth;\n\n if (supShift - supm.depth - (subm.height - subShift) < maxWidth) {\n subShift = maxWidth - (supShift - supm.depth) + subm.height;\n var psi = 0.8 * metrics.xHeight - (supShift - supm.depth);\n\n if (psi > 0) {\n supShift += psi;\n subShift -= psi;\n }\n }\n\n var vlistElem = [{\n type: \"elem\",\n elem: subm,\n shift: subShift,\n marginRight,\n marginLeft\n }, {\n type: \"elem\",\n elem: supm,\n shift: -supShift,\n marginRight\n }];\n supsub = buildCommon.makeVList({\n positionType: \"individualShift\",\n children: vlistElem\n }, options);\n } else if (subm) {\n // Rule 18b\n subShift = Math.max(subShift, metrics.sub1, subm.height - 0.8 * metrics.xHeight);\n var _vlistElem = [{\n type: \"elem\",\n elem: subm,\n marginLeft,\n marginRight\n }];\n supsub = buildCommon.makeVList({\n positionType: \"shift\",\n positionData: subShift,\n children: _vlistElem\n }, options);\n } else if (supm) {\n // Rule 18c, d\n supShift = Math.max(supShift, minSupShift, supm.depth + 0.25 * metrics.xHeight);\n supsub = buildCommon.makeVList({\n positionType: \"shift\",\n positionData: -supShift,\n children: [{\n type: \"elem\",\n elem: supm,\n marginRight\n }]\n }, options);\n } else {\n throw new Error(\"supsub must have either sup or sub.\");\n } // Wrap the supsub vlist in a span.msupsub to reset text-align.\n\n\n var mclass = getTypeOfDomTree(base, \"right\") || \"mord\";\n return buildCommon.makeSpan([mclass], [base, buildCommon.makeSpan([\"msupsub\"], [supsub])], options);\n },\n\n mathmlBuilder(group, options) {\n // Is the inner group a relevant horizonal brace?\n var isBrace = false;\n var isOver;\n var isSup;\n\n if (group.base && group.base.type === \"horizBrace\") {\n isSup = !!group.sup;\n\n if (isSup === group.base.isOver) {\n isBrace = true;\n isOver = group.base.isOver;\n }\n }\n\n if (group.base && (group.base.type === \"op\" || group.base.type === \"operatorname\")) {\n group.base.parentIsSupSub = true;\n }\n\n var children = [buildGroup(group.base, options)];\n\n if (group.sub) {\n children.push(buildGroup(group.sub, options));\n }\n\n if (group.sup) {\n children.push(buildGroup(group.sup, options));\n }\n\n var nodeType;\n\n if (isBrace) {\n nodeType = isOver ? \"mover\" : \"munder\";\n } else if (!group.sub) {\n var base = group.base;\n\n if (base && base.type === \"op\" && base.limits && (options.style === Style$1.DISPLAY || base.alwaysHandleSupSub)) {\n nodeType = \"mover\";\n } else if (base && base.type === \"operatorname\" && base.alwaysHandleSupSub && (base.limits || options.style === Style$1.DISPLAY)) {\n nodeType = \"mover\";\n } else {\n nodeType = \"msup\";\n }\n } else if (!group.sup) {\n var _base = group.base;\n\n if (_base && _base.type === \"op\" && _base.limits && (options.style === Style$1.DISPLAY || _base.alwaysHandleSupSub)) {\n nodeType = \"munder\";\n } else if (_base && _base.type === \"operatorname\" && _base.alwaysHandleSupSub && (_base.limits || options.style === Style$1.DISPLAY)) {\n nodeType = \"munder\";\n } else {\n nodeType = \"msub\";\n }\n } else {\n var _base2 = group.base;\n\n if (_base2 && _base2.type === \"op\" && _base2.limits && options.style === Style$1.DISPLAY) {\n nodeType = \"munderover\";\n } else if (_base2 && _base2.type === \"operatorname\" && _base2.alwaysHandleSupSub && (options.style === Style$1.DISPLAY || _base2.limits)) {\n nodeType = \"munderover\";\n } else {\n nodeType = \"msubsup\";\n }\n }\n\n return new mathMLTree.MathNode(nodeType, children);\n }\n\n});\n\ndefineFunctionBuilders({\n type: \"atom\",\n\n htmlBuilder(group, options) {\n return buildCommon.mathsym(group.text, group.mode, options, [\"m\" + group.family]);\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mo\", [makeText(group.text, group.mode)]);\n\n if (group.family === \"bin\") {\n var variant = getVariant(group, options);\n\n if (variant === \"bold-italic\") {\n node.setAttribute(\"mathvariant\", variant);\n }\n } else if (group.family === \"punct\") {\n node.setAttribute(\"separator\", \"true\");\n } else if (group.family === \"open\" || group.family === \"close\") {\n // Delims built here should not stretch vertically.\n // See delimsizing.js for stretchy delims.\n node.setAttribute(\"stretchy\", \"false\");\n }\n\n return node;\n }\n\n});\n\n// \"mathord\" and \"textord\" ParseNodes created in Parser.js from symbol Groups in\n// src/symbols.js.\nvar defaultVariant = {\n \"mi\": \"italic\",\n \"mn\": \"normal\",\n \"mtext\": \"normal\"\n};\ndefineFunctionBuilders({\n type: \"mathord\",\n\n htmlBuilder(group, options) {\n return buildCommon.makeOrd(group, options, \"mathord\");\n },\n\n mathmlBuilder(group, options) {\n var node = new mathMLTree.MathNode(\"mi\", [makeText(group.text, group.mode, options)]);\n var variant = getVariant(group, options) || \"italic\";\n\n if (variant !== defaultVariant[node.type]) {\n node.setAttribute(\"mathvariant\", variant);\n }\n\n return node;\n }\n\n});\ndefineFunctionBuilders({\n type: \"textord\",\n\n htmlBuilder(group, options) {\n return buildCommon.makeOrd(group, options, \"textord\");\n },\n\n mathmlBuilder(group, options) {\n var text = makeText(group.text, group.mode, options);\n var variant = getVariant(group, options) || \"normal\";\n var node;\n\n if (group.mode === 'text') {\n node = new mathMLTree.MathNode(\"mtext\", [text]);\n } else if (/[0-9]/.test(group.text)) {\n node = new mathMLTree.MathNode(\"mn\", [text]);\n } else if (group.text === \"\\\\prime\") {\n node = new mathMLTree.MathNode(\"mo\", [text]);\n } else {\n node = new mathMLTree.MathNode(\"mi\", [text]);\n }\n\n if (variant !== defaultVariant[node.type]) {\n node.setAttribute(\"mathvariant\", variant);\n }\n\n return node;\n }\n\n});\n\nvar cssSpace = {\n \"\\\\nobreak\": \"nobreak\",\n \"\\\\allowbreak\": \"allowbreak\"\n}; // A lookup table to determine whether a spacing function/symbol should be\n// treated like a regular space character. If a symbol or command is a key\n// in this table, then it should be a regular space character. Furthermore,\n// the associated value may have a `className` specifying an extra CSS class\n// to add to the created `span`.\n\nvar regularSpace = {\n \" \": {},\n \"\\\\ \": {},\n \"~\": {\n className: \"nobreak\"\n },\n \"\\\\space\": {},\n \"\\\\nobreakspace\": {\n className: \"nobreak\"\n }\n}; // ParseNode<\"spacing\"> created in Parser.js from the \"spacing\" symbol Groups in\n// src/symbols.js.\n\ndefineFunctionBuilders({\n type: \"spacing\",\n\n htmlBuilder(group, options) {\n if (regularSpace.hasOwnProperty(group.text)) {\n var className = regularSpace[group.text].className || \"\"; // Spaces are generated by adding an actual space. Each of these\n // things has an entry in the symbols table, so these will be turned\n // into appropriate outputs.\n\n if (group.mode === \"text\") {\n var ord = buildCommon.makeOrd(group, options, \"textord\");\n ord.classes.push(className);\n return ord;\n } else {\n return buildCommon.makeSpan([\"mspace\", className], [buildCommon.mathsym(group.text, group.mode, options)], options);\n }\n } else if (cssSpace.hasOwnProperty(group.text)) {\n // Spaces based on just a CSS class.\n return buildCommon.makeSpan([\"mspace\", cssSpace[group.text]], [], options);\n } else {\n throw new ParseError(\"Unknown type of space \\\"\" + group.text + \"\\\"\");\n }\n },\n\n mathmlBuilder(group, options) {\n var node;\n\n if (regularSpace.hasOwnProperty(group.text)) {\n node = new mathMLTree.MathNode(\"mtext\", [new mathMLTree.TextNode(\"\\u00a0\")]);\n } else if (cssSpace.hasOwnProperty(group.text)) {\n // CSS-based MathML spaces (\\nobreak, \\allowbreak) are ignored\n return new mathMLTree.MathNode(\"mspace\");\n } else {\n throw new ParseError(\"Unknown type of space \\\"\" + group.text + \"\\\"\");\n }\n\n return node;\n }\n\n});\n\nvar pad = () => {\n var padNode = new mathMLTree.MathNode(\"mtd\", []);\n padNode.setAttribute(\"width\", \"50%\");\n return padNode;\n};\n\ndefineFunctionBuilders({\n type: \"tag\",\n\n mathmlBuilder(group, options) {\n var table = new mathMLTree.MathNode(\"mtable\", [new mathMLTree.MathNode(\"mtr\", [pad(), new mathMLTree.MathNode(\"mtd\", [buildExpressionRow(group.body, options)]), pad(), new mathMLTree.MathNode(\"mtd\", [buildExpressionRow(group.tag, options)])])]);\n table.setAttribute(\"width\", \"100%\");\n return table; // TODO: Left-aligned tags.\n // Currently, the group and options passed here do not contain\n // enough info to set tag alignment. `leqno` is in Settings but it is\n // not passed to Options. On the HTML side, leqno is\n // set by a CSS class applied in buildTree.js. That would have worked\n // in MathML if browsers supported . Since they don't, we\n // need to rewrite the way this function is called.\n }\n\n});\n\nvar textFontFamilies = {\n \"\\\\text\": undefined,\n \"\\\\textrm\": \"textrm\",\n \"\\\\textsf\": \"textsf\",\n \"\\\\texttt\": \"texttt\",\n \"\\\\textnormal\": \"textrm\"\n};\nvar textFontWeights = {\n \"\\\\textbf\": \"textbf\",\n \"\\\\textmd\": \"textmd\"\n};\nvar textFontShapes = {\n \"\\\\textit\": \"textit\",\n \"\\\\textup\": \"textup\"\n};\n\nvar optionsWithFont = (group, options) => {\n var font = group.font; // Checks if the argument is a font family or a font style.\n\n if (!font) {\n return options;\n } else if (textFontFamilies[font]) {\n return options.withTextFontFamily(textFontFamilies[font]);\n } else if (textFontWeights[font]) {\n return options.withTextFontWeight(textFontWeights[font]);\n } else if (font === \"\\\\emph\") {\n return options.fontShape === \"textit\" ? options.withTextFontShape(\"textup\") : options.withTextFontShape(\"textit\");\n }\n\n return options.withTextFontShape(textFontShapes[font]);\n};\n\ndefineFunction({\n type: \"text\",\n names: [// Font families\n \"\\\\text\", \"\\\\textrm\", \"\\\\textsf\", \"\\\\texttt\", \"\\\\textnormal\", // Font weights\n \"\\\\textbf\", \"\\\\textmd\", // Font Shapes\n \"\\\\textit\", \"\\\\textup\", \"\\\\emph\"],\n props: {\n numArgs: 1,\n argTypes: [\"text\"],\n allowedInArgument: true,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser,\n funcName\n } = _ref;\n var body = args[0];\n return {\n type: \"text\",\n mode: parser.mode,\n body: ordargument(body),\n font: funcName\n };\n },\n\n htmlBuilder(group, options) {\n var newOptions = optionsWithFont(group, options);\n var inner = buildExpression$1(group.body, newOptions, true);\n return buildCommon.makeSpan([\"mord\", \"text\"], inner, newOptions);\n },\n\n mathmlBuilder(group, options) {\n var newOptions = optionsWithFont(group, options);\n return buildExpressionRow(group.body, newOptions);\n }\n\n});\n\ndefineFunction({\n type: \"underline\",\n names: [\"\\\\underline\"],\n props: {\n numArgs: 1,\n allowedInText: true\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"underline\",\n mode: parser.mode,\n body: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n // Underlines are handled in the TeXbook pg 443, Rule 10.\n // Build the inner group.\n var innerGroup = buildGroup$1(group.body, options); // Create the line to go below the body\n\n var line = buildCommon.makeLineSpan(\"underline-line\", options); // Generate the vlist, with the appropriate kerns\n\n var defaultRuleThickness = options.fontMetrics().defaultRuleThickness;\n var vlist = buildCommon.makeVList({\n positionType: \"top\",\n positionData: innerGroup.height,\n children: [{\n type: \"kern\",\n size: defaultRuleThickness\n }, {\n type: \"elem\",\n elem: line\n }, {\n type: \"kern\",\n size: 3 * defaultRuleThickness\n }, {\n type: \"elem\",\n elem: innerGroup\n }]\n }, options);\n return buildCommon.makeSpan([\"mord\", \"underline\"], [vlist], options);\n },\n\n mathmlBuilder(group, options) {\n var operator = new mathMLTree.MathNode(\"mo\", [new mathMLTree.TextNode(\"\\u203e\")]);\n operator.setAttribute(\"stretchy\", \"true\");\n var node = new mathMLTree.MathNode(\"munder\", [buildGroup(group.body, options), operator]);\n node.setAttribute(\"accentunder\", \"true\");\n return node;\n }\n\n});\n\ndefineFunction({\n type: \"vcenter\",\n names: [\"\\\\vcenter\"],\n props: {\n numArgs: 1,\n argTypes: [\"original\"],\n // In LaTeX, \\vcenter can act only on a box.\n allowedInText: false\n },\n\n handler(_ref, args) {\n var {\n parser\n } = _ref;\n return {\n type: \"vcenter\",\n mode: parser.mode,\n body: args[0]\n };\n },\n\n htmlBuilder(group, options) {\n var body = buildGroup$1(group.body, options);\n var axisHeight = options.fontMetrics().axisHeight;\n var dy = 0.5 * (body.height - axisHeight - (body.depth + axisHeight));\n return buildCommon.makeVList({\n positionType: \"shift\",\n positionData: dy,\n children: [{\n type: \"elem\",\n elem: body\n }]\n }, options);\n },\n\n mathmlBuilder(group, options) {\n // There is no way to do this in MathML.\n // Write a class as a breadcrumb in case some post-processor wants\n // to perform a vcenter adjustment.\n return new mathMLTree.MathNode(\"mpadded\", [buildGroup(group.body, options)], [\"vcenter\"]);\n }\n\n});\n\ndefineFunction({\n type: \"verb\",\n names: [\"\\\\verb\"],\n props: {\n numArgs: 0,\n allowedInText: true\n },\n\n handler(context, args, optArgs) {\n // \\verb and \\verb* are dealt with directly in Parser.js.\n // If we end up here, it's because of a failure to match the two delimiters\n // in the regex in Lexer.js. LaTeX raises the following error when \\verb is\n // terminated by end of line (or file).\n throw new ParseError(\"\\\\verb ended by end of line instead of matching delimiter\");\n },\n\n htmlBuilder(group, options) {\n var text = makeVerb(group);\n var body = []; // \\verb enters text mode and therefore is sized like \\textstyle\n\n var newOptions = options.havingStyle(options.style.text());\n\n for (var i = 0; i < text.length; i++) {\n var c = text[i];\n\n if (c === '~') {\n c = '\\\\textasciitilde';\n }\n\n body.push(buildCommon.makeSymbol(c, \"Typewriter-Regular\", group.mode, newOptions, [\"mord\", \"texttt\"]));\n }\n\n return buildCommon.makeSpan([\"mord\", \"text\"].concat(newOptions.sizingClasses(options)), buildCommon.tryCombineChars(body), newOptions);\n },\n\n mathmlBuilder(group, options) {\n var text = new mathMLTree.TextNode(makeVerb(group));\n var node = new mathMLTree.MathNode(\"mtext\", [text]);\n node.setAttribute(\"mathvariant\", \"monospace\");\n return node;\n }\n\n});\n/**\n * Converts verb group into body string.\n *\n * \\verb* replaces each space with an open box \\u2423\n * \\verb replaces each space with a no-break space \\xA0\n */\n\nvar makeVerb = group => group.body.replace(/ /g, group.star ? '\\u2423' : '\\xA0');\n\n/** Include this to ensure that all functions are defined. */\nvar functions = _functions;\n\n/**\n * The Lexer class handles tokenizing the input in various ways. Since our\n * parser expects us to be able to backtrack, the lexer allows lexing from any\n * given starting point.\n *\n * Its main exposed function is the `lex` function, which takes a position to\n * lex from and a type of token to lex. It defers to the appropriate `_innerLex`\n * function.\n *\n * The various `_innerLex` functions perform the actual lexing of different\n * kinds.\n */\n\n/* The following tokenRegex\n * - matches typical whitespace (but not NBSP etc.) using its first group\n * - does not match any control character \\x00-\\x1f except whitespace\n * - does not match a bare backslash\n * - matches any ASCII character except those just mentioned\n * - does not match the BMP private use area \\uE000-\\uF8FF\n * - does not match bare surrogate code units\n * - matches any BMP character except for those just described\n * - matches any valid Unicode surrogate pair\n * - matches a backslash followed by one or more whitespace characters\n * - matches a backslash followed by one or more letters then whitespace\n * - matches a backslash followed by any BMP character\n * Capturing groups:\n * [1] regular whitespace\n * [2] backslash followed by whitespace\n * [3] anything else, which may include:\n * [4] left character of \\verb*\n * [5] left character of \\verb\n * [6] backslash followed by word, excluding any trailing whitespace\n * Just because the Lexer matches something doesn't mean it's valid input:\n * If there is no matching function or symbol definition, the Parser will\n * still reject the input.\n */\nvar spaceRegexString = \"[ \\r\\n\\t]\";\nvar controlWordRegexString = \"\\\\\\\\[a-zA-Z@]+\";\nvar controlSymbolRegexString = \"\\\\\\\\[^\\uD800-\\uDFFF]\";\nvar controlWordWhitespaceRegexString = \"(\" + controlWordRegexString + \")\" + spaceRegexString + \"*\";\nvar controlSpaceRegexString = \"\\\\\\\\(\\n|[ \\r\\t]+\\n?)[ \\r\\t]*\";\nvar combiningDiacriticalMarkString = \"[\\u0300-\\u036f]\";\nvar combiningDiacriticalMarksEndRegex = new RegExp(combiningDiacriticalMarkString + \"+$\");\nvar tokenRegexString = \"(\" + spaceRegexString + \"+)|\" + ( // whitespace\ncontrolSpaceRegexString + \"|\") + // \\whitespace\n\"([!-\\\\[\\\\]-\\u2027\\u202A-\\uD7FF\\uF900-\\uFFFF]\" + ( // single codepoint\ncombiningDiacriticalMarkString + \"*\") + // ...plus accents\n\"|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\" + ( // surrogate pair\ncombiningDiacriticalMarkString + \"*\") + // ...plus accents\n\"|\\\\\\\\verb\\\\*([^]).*?\\\\4\" + // \\verb*\n\"|\\\\\\\\verb([^*a-zA-Z]).*?\\\\5\" + ( // \\verb unstarred\n\"|\" + controlWordWhitespaceRegexString) + ( // \\macroName + spaces\n\"|\" + controlSymbolRegexString + \")\"); // \\\\, \\', etc.\n\n/** Main Lexer class */\n\nclass Lexer {\n // Category codes. The lexer only supports comment characters (14) for now.\n // MacroExpander additionally distinguishes active (13).\n constructor(input, settings) {\n this.input = void 0;\n this.settings = void 0;\n this.tokenRegex = void 0;\n this.catcodes = void 0;\n // Separate accents from characters\n this.input = input;\n this.settings = settings;\n this.tokenRegex = new RegExp(tokenRegexString, 'g');\n this.catcodes = {\n \"%\": 14,\n // comment character\n \"~\": 13 // active character\n\n };\n }\n\n setCatcode(char, code) {\n this.catcodes[char] = code;\n }\n /**\n * This function lexes a single token.\n */\n\n\n lex() {\n var input = this.input;\n var pos = this.tokenRegex.lastIndex;\n\n if (pos === input.length) {\n return new Token(\"EOF\", new SourceLocation(this, pos, pos));\n }\n\n var match = this.tokenRegex.exec(input);\n\n if (match === null || match.index !== pos) {\n throw new ParseError(\"Unexpected character: '\" + input[pos] + \"'\", new Token(input[pos], new SourceLocation(this, pos, pos + 1)));\n }\n\n var text = match[6] || match[3] || (match[2] ? \"\\\\ \" : \" \");\n\n if (this.catcodes[text] === 14) {\n // comment character\n var nlIndex = input.indexOf('\\n', this.tokenRegex.lastIndex);\n\n if (nlIndex === -1) {\n this.tokenRegex.lastIndex = input.length; // EOF\n\n this.settings.reportNonstrict(\"commentAtEnd\", \"% comment has no terminating newline; LaTeX would \" + \"fail because of commenting the end of math mode (e.g. $)\");\n } else {\n this.tokenRegex.lastIndex = nlIndex + 1;\n }\n\n return this.lex();\n }\n\n return new Token(text, new SourceLocation(this, pos, this.tokenRegex.lastIndex));\n }\n\n}\n\n/**\n * A `Namespace` refers to a space of nameable things like macros or lengths,\n * which can be `set` either globally or local to a nested group, using an\n * undo stack similar to how TeX implements this functionality.\n * Performance-wise, `get` and local `set` take constant time, while global\n * `set` takes time proportional to the depth of group nesting.\n */\nclass Namespace {\n /**\n * Both arguments are optional. The first argument is an object of\n * built-in mappings which never change. The second argument is an object\n * of initial (global-level) mappings, which will constantly change\n * according to any global/top-level `set`s done.\n */\n constructor(builtins, globalMacros) {\n if (builtins === void 0) {\n builtins = {};\n }\n\n if (globalMacros === void 0) {\n globalMacros = {};\n }\n\n this.current = void 0;\n this.builtins = void 0;\n this.undefStack = void 0;\n this.current = globalMacros;\n this.builtins = builtins;\n this.undefStack = [];\n }\n /**\n * Start a new nested group, affecting future local `set`s.\n */\n\n\n beginGroup() {\n this.undefStack.push({});\n }\n /**\n * End current nested group, restoring values before the group began.\n */\n\n\n endGroup() {\n if (this.undefStack.length === 0) {\n throw new ParseError(\"Unbalanced namespace destruction: attempt \" + \"to pop global namespace; please report this as a bug\");\n }\n\n var undefs = this.undefStack.pop();\n\n for (var undef in undefs) {\n if (undefs.hasOwnProperty(undef)) {\n if (undefs[undef] == null) {\n delete this.current[undef];\n } else {\n this.current[undef] = undefs[undef];\n }\n }\n }\n }\n /**\n * Ends all currently nested groups (if any), restoring values before the\n * groups began. Useful in case of an error in the middle of parsing.\n */\n\n\n endGroups() {\n while (this.undefStack.length > 0) {\n this.endGroup();\n }\n }\n /**\n * Detect whether `name` has a definition. Equivalent to\n * `get(name) != null`.\n */\n\n\n has(name) {\n return this.current.hasOwnProperty(name) || this.builtins.hasOwnProperty(name);\n }\n /**\n * Get the current value of a name, or `undefined` if there is no value.\n *\n * Note: Do not use `if (namespace.get(...))` to detect whether a macro\n * is defined, as the definition may be the empty string which evaluates\n * to `false` in JavaScript. Use `if (namespace.get(...) != null)` or\n * `if (namespace.has(...))`.\n */\n\n\n get(name) {\n if (this.current.hasOwnProperty(name)) {\n return this.current[name];\n } else {\n return this.builtins[name];\n }\n }\n /**\n * Set the current value of a name, and optionally set it globally too.\n * Local set() sets the current value and (when appropriate) adds an undo\n * operation to the undo stack. Global set() may change the undo\n * operation at every level, so takes time linear in their number.\n * A value of undefined means to delete existing definitions.\n */\n\n\n set(name, value, global) {\n if (global === void 0) {\n global = false;\n }\n\n if (global) {\n // Global set is equivalent to setting in all groups. Simulate this\n // by destroying any undos currently scheduled for this name,\n // and adding an undo with the *new* value (in case it later gets\n // locally reset within this environment).\n for (var i = 0; i < this.undefStack.length; i++) {\n delete this.undefStack[i][name];\n }\n\n if (this.undefStack.length > 0) {\n this.undefStack[this.undefStack.length - 1][name] = value;\n }\n } else {\n // Undo this set at end of this group (possibly to `undefined`),\n // unless an undo is already in place, in which case that older\n // value is the correct one.\n var top = this.undefStack[this.undefStack.length - 1];\n\n if (top && !top.hasOwnProperty(name)) {\n top[name] = this.current[name];\n }\n }\n\n if (value == null) {\n delete this.current[name];\n } else {\n this.current[name] = value;\n }\n }\n\n}\n\n/**\n * Predefined macros for KaTeX.\n * This can be used to define some commands in terms of others.\n */\nvar macros = _macros;\n// macro tools\n\ndefineMacro(\"\\\\noexpand\", function (context) {\n // The expansion is the token itself; but that token is interpreted\n // as if its meaning were \u2018\\relax\u2019 if it is a control sequence that\n // would ordinarily be expanded by TeX\u2019s expansion rules.\n var t = context.popToken();\n\n if (context.isExpandable(t.text)) {\n t.noexpand = true;\n t.treatAsRelax = true;\n }\n\n return {\n tokens: [t],\n numArgs: 0\n };\n});\ndefineMacro(\"\\\\expandafter\", function (context) {\n // TeX first reads the token that comes immediately after \\expandafter,\n // without expanding it; let\u2019s call this token t. Then TeX reads the\n // token that comes after t (and possibly more tokens, if that token\n // has an argument), replacing it by its expansion. Finally TeX puts\n // t back in front of that expansion.\n var t = context.popToken();\n context.expandOnce(true); // expand only an expandable token\n\n return {\n tokens: [t],\n numArgs: 0\n };\n}); // LaTeX's \\@firstoftwo{#1}{#2} expands to #1, skipping #2\n// TeX source: \\long\\def\\@firstoftwo#1#2{#1}\n\ndefineMacro(\"\\\\@firstoftwo\", function (context) {\n var args = context.consumeArgs(2);\n return {\n tokens: args[0],\n numArgs: 0\n };\n}); // LaTeX's \\@secondoftwo{#1}{#2} expands to #2, skipping #1\n// TeX source: \\long\\def\\@secondoftwo#1#2{#2}\n\ndefineMacro(\"\\\\@secondoftwo\", function (context) {\n var args = context.consumeArgs(2);\n return {\n tokens: args[1],\n numArgs: 0\n };\n}); // LaTeX's \\@ifnextchar{#1}{#2}{#3} looks ahead to the next (unexpanded)\n// symbol that isn't a space, consuming any spaces but not consuming the\n// first nonspace character. If that nonspace character matches #1, then\n// the macro expands to #2; otherwise, it expands to #3.\n\ndefineMacro(\"\\\\@ifnextchar\", function (context) {\n var args = context.consumeArgs(3); // symbol, if, else\n\n context.consumeSpaces();\n var nextToken = context.future();\n\n if (args[0].length === 1 && args[0][0].text === nextToken.text) {\n return {\n tokens: args[1],\n numArgs: 0\n };\n } else {\n return {\n tokens: args[2],\n numArgs: 0\n };\n }\n}); // LaTeX's \\@ifstar{#1}{#2} looks ahead to the next (unexpanded) symbol.\n// If it is `*`, then it consumes the symbol, and the macro expands to #1;\n// otherwise, the macro expands to #2 (without consuming the symbol).\n// TeX source: \\def\\@ifstar#1{\\@ifnextchar *{\\@firstoftwo{#1}}}\n\ndefineMacro(\"\\\\@ifstar\", \"\\\\@ifnextchar *{\\\\@firstoftwo{#1}}\"); // LaTeX's \\TextOrMath{#1}{#2} expands to #1 in text mode, #2 in math mode\n\ndefineMacro(\"\\\\TextOrMath\", function (context) {\n var args = context.consumeArgs(2);\n\n if (context.mode === 'text') {\n return {\n tokens: args[0],\n numArgs: 0\n };\n } else {\n return {\n tokens: args[1],\n numArgs: 0\n };\n }\n}); // Lookup table for parsing numbers in base 8 through 16\n\nvar digitToNumber = {\n \"0\": 0,\n \"1\": 1,\n \"2\": 2,\n \"3\": 3,\n \"4\": 4,\n \"5\": 5,\n \"6\": 6,\n \"7\": 7,\n \"8\": 8,\n \"9\": 9,\n \"a\": 10,\n \"A\": 10,\n \"b\": 11,\n \"B\": 11,\n \"c\": 12,\n \"C\": 12,\n \"d\": 13,\n \"D\": 13,\n \"e\": 14,\n \"E\": 14,\n \"f\": 15,\n \"F\": 15\n}; // TeX \\char makes a literal character (catcode 12) using the following forms:\n// (see The TeXBook, p. 43)\n// \\char123 -- decimal\n// \\char'123 -- octal\n// \\char\"123 -- hex\n// \\char`x -- character that can be written (i.e. isn't active)\n// \\char`\\x -- character that cannot be written (e.g. %)\n// These all refer to characters from the font, so we turn them into special\n// calls to a function \\@char dealt with in the Parser.\n\ndefineMacro(\"\\\\char\", function (context) {\n var token = context.popToken();\n var base;\n var number = '';\n\n if (token.text === \"'\") {\n base = 8;\n token = context.popToken();\n } else if (token.text === '\"') {\n base = 16;\n token = context.popToken();\n } else if (token.text === \"`\") {\n token = context.popToken();\n\n if (token.text[0] === \"\\\\\") {\n number = token.text.charCodeAt(1);\n } else if (token.text === \"EOF\") {\n throw new ParseError(\"\\\\char` missing argument\");\n } else {\n number = token.text.charCodeAt(0);\n }\n } else {\n base = 10;\n }\n\n if (base) {\n // Parse a number in the given base, starting with first `token`.\n number = digitToNumber[token.text];\n\n if (number == null || number >= base) {\n throw new ParseError(\"Invalid base-\" + base + \" digit \" + token.text);\n }\n\n var digit;\n\n while ((digit = digitToNumber[context.future().text]) != null && digit < base) {\n number *= base;\n number += digit;\n context.popToken();\n }\n }\n\n return \"\\\\@char{\" + number + \"}\";\n}); // \\newcommand{\\macro}[args]{definition}\n// \\renewcommand{\\macro}[args]{definition}\n// TODO: Optional arguments: \\newcommand{\\macro}[args][default]{definition}\n\nvar newcommand = (context, existsOK, nonexistsOK) => {\n var arg = context.consumeArg().tokens;\n\n if (arg.length !== 1) {\n throw new ParseError(\"\\\\newcommand's first argument must be a macro name\");\n }\n\n var name = arg[0].text;\n var exists = context.isDefined(name);\n\n if (exists && !existsOK) {\n throw new ParseError(\"\\\\newcommand{\" + name + \"} attempting to redefine \" + (name + \"; use \\\\renewcommand\"));\n }\n\n if (!exists && !nonexistsOK) {\n throw new ParseError(\"\\\\renewcommand{\" + name + \"} when command \" + name + \" \" + \"does not yet exist; use \\\\newcommand\");\n }\n\n var numArgs = 0;\n arg = context.consumeArg().tokens;\n\n if (arg.length === 1 && arg[0].text === \"[\") {\n var argText = '';\n var token = context.expandNextToken();\n\n while (token.text !== \"]\" && token.text !== \"EOF\") {\n // TODO: Should properly expand arg, e.g., ignore {}s\n argText += token.text;\n token = context.expandNextToken();\n }\n\n if (!argText.match(/^\\s*[0-9]+\\s*$/)) {\n throw new ParseError(\"Invalid number of arguments: \" + argText);\n }\n\n numArgs = parseInt(argText);\n arg = context.consumeArg().tokens;\n } // Final arg is the expansion of the macro\n\n\n context.macros.set(name, {\n tokens: arg,\n numArgs\n });\n return '';\n};\n\ndefineMacro(\"\\\\newcommand\", context => newcommand(context, false, true));\ndefineMacro(\"\\\\renewcommand\", context => newcommand(context, true, false));\ndefineMacro(\"\\\\providecommand\", context => newcommand(context, true, true)); // terminal (console) tools\n\ndefineMacro(\"\\\\message\", context => {\n var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console\n\n console.log(arg.reverse().map(token => token.text).join(\"\"));\n return '';\n});\ndefineMacro(\"\\\\errmessage\", context => {\n var arg = context.consumeArgs(1)[0]; // eslint-disable-next-line no-console\n\n console.error(arg.reverse().map(token => token.text).join(\"\"));\n return '';\n});\ndefineMacro(\"\\\\show\", context => {\n var tok = context.popToken();\n var name = tok.text; // eslint-disable-next-line no-console\n\n console.log(tok, context.macros.get(name), functions[name], symbols.math[name], symbols.text[name]);\n return '';\n}); //////////////////////////////////////////////////////////////////////\n// Grouping\n// \\let\\bgroup={ \\let\\egroup=}\n\ndefineMacro(\"\\\\bgroup\", \"{\");\ndefineMacro(\"\\\\egroup\", \"}\"); // Symbols from latex.ltx:\n// \\def~{\\nobreakspace{}}\n// \\def\\lq{`}\n// \\def\\rq{'}\n// \\def \\aa {\\r a}\n// \\def \\AA {\\r A}\n\ndefineMacro(\"~\", \"\\\\nobreakspace\");\ndefineMacro(\"\\\\lq\", \"`\");\ndefineMacro(\"\\\\rq\", \"'\");\ndefineMacro(\"\\\\aa\", \"\\\\r a\");\ndefineMacro(\"\\\\AA\", \"\\\\r A\"); // Copyright (C) and registered (R) symbols. Use raw symbol in MathML.\n// \\DeclareTextCommandDefault{\\textcopyright}{\\textcircled{c}}\n// \\DeclareTextCommandDefault{\\textregistered}{\\textcircled{%\n// \\check@mathfonts\\fontsize\\sf@size\\z@\\math@fontsfalse\\selectfont R}}\n// \\DeclareRobustCommand{\\copyright}{%\n// \\ifmmode{\\nfss@text{\\textcopyright}}\\else\\textcopyright\\fi}\n\ndefineMacro(\"\\\\textcopyright\", \"\\\\html@mathml{\\\\textcircled{c}}{\\\\char`\u00A9}\");\ndefineMacro(\"\\\\copyright\", \"\\\\TextOrMath{\\\\textcopyright}{\\\\text{\\\\textcopyright}}\");\ndefineMacro(\"\\\\textregistered\", \"\\\\html@mathml{\\\\textcircled{\\\\scriptsize R}}{\\\\char`\u00AE}\"); // Characters omitted from Unicode range 1D400\u20131D7FF\n\ndefineMacro(\"\\u212C\", \"\\\\mathscr{B}\"); // script\n\ndefineMacro(\"\\u2130\", \"\\\\mathscr{E}\");\ndefineMacro(\"\\u2131\", \"\\\\mathscr{F}\");\ndefineMacro(\"\\u210B\", \"\\\\mathscr{H}\");\ndefineMacro(\"\\u2110\", \"\\\\mathscr{I}\");\ndefineMacro(\"\\u2112\", \"\\\\mathscr{L}\");\ndefineMacro(\"\\u2133\", \"\\\\mathscr{M}\");\ndefineMacro(\"\\u211B\", \"\\\\mathscr{R}\");\ndefineMacro(\"\\u212D\", \"\\\\mathfrak{C}\"); // Fraktur\n\ndefineMacro(\"\\u210C\", \"\\\\mathfrak{H}\");\ndefineMacro(\"\\u2128\", \"\\\\mathfrak{Z}\"); // Define \\Bbbk with a macro that works in both HTML and MathML.\n\ndefineMacro(\"\\\\Bbbk\", \"\\\\Bbb{k}\"); // Unicode middle dot\n// The KaTeX fonts do not contain U+00B7. Instead, \\cdotp displays\n// the dot at U+22C5 and gives it punct spacing.\n\ndefineMacro(\"\\u00b7\", \"\\\\cdotp\"); // \\llap and \\rlap render their contents in text mode\n\ndefineMacro(\"\\\\llap\", \"\\\\mathllap{\\\\textrm{#1}}\");\ndefineMacro(\"\\\\rlap\", \"\\\\mathrlap{\\\\textrm{#1}}\");\ndefineMacro(\"\\\\clap\", \"\\\\mathclap{\\\\textrm{#1}}\"); // \\mathstrut from the TeXbook, p 360\n\ndefineMacro(\"\\\\mathstrut\", \"\\\\vphantom{(}\"); // \\underbar from TeXbook p 353\n\ndefineMacro(\"\\\\underbar\", \"\\\\underline{\\\\text{#1}}\"); // \\not is defined by base/fontmath.ltx via\n// \\DeclareMathSymbol{\\not}{\\mathrel}{symbols}{\"36}\n// It's thus treated like a \\mathrel, but defined by a symbol that has zero\n// width but extends to the right. We use \\rlap to get that spacing.\n// For MathML we write U+0338 here. buildMathML.js will then do the overlay.\n\ndefineMacro(\"\\\\not\", '\\\\html@mathml{\\\\mathrel{\\\\mathrlap\\\\@not}}{\\\\char\"338}'); // Negated symbols from base/fontmath.ltx:\n// \\def\\neq{\\not=} \\let\\ne=\\neq\n// \\DeclareRobustCommand\n// \\notin{\\mathrel{\\m@th\\mathpalette\\c@ncel\\in}}\n// \\def\\c@ncel#1#2{\\m@th\\ooalign{$\\hfil#1\\mkern1mu/\\hfil$\\crcr$#1#2$}}\n\ndefineMacro(\"\\\\neq\", \"\\\\html@mathml{\\\\mathrel{\\\\not=}}{\\\\mathrel{\\\\char`\u2260}}\");\ndefineMacro(\"\\\\ne\", \"\\\\neq\");\ndefineMacro(\"\\u2260\", \"\\\\neq\");\ndefineMacro(\"\\\\notin\", \"\\\\html@mathml{\\\\mathrel{{\\\\in}\\\\mathllap{/\\\\mskip1mu}}}\" + \"{\\\\mathrel{\\\\char`\u2209}}\");\ndefineMacro(\"\\u2209\", \"\\\\notin\"); // Unicode stacked relations\n\ndefineMacro(\"\\u2258\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\kern{-1em}\\\\raisebox{0.4em}{$\\\\scriptsize\\\\frown$}}\" + \"}{\\\\mathrel{\\\\char`\\u2258}}\");\ndefineMacro(\"\\u2259\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\wedge}{=}}{\\\\mathrel{\\\\char`\\u2258}}\");\ndefineMacro(\"\\u225A\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\vee}{=}}{\\\\mathrel{\\\\char`\\u225A}}\");\ndefineMacro(\"\\u225B\", \"\\\\html@mathml{\\\\stackrel{\\\\scriptsize\\\\star}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225B}}\");\ndefineMacro(\"\\u225D\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{def}}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225D}}\");\ndefineMacro(\"\\u225E\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny\\\\mathrm{m}}{=}}\" + \"{\\\\mathrel{\\\\char`\\u225E}}\");\ndefineMacro(\"\\u225F\", \"\\\\html@mathml{\\\\stackrel{\\\\tiny?}{=}}{\\\\mathrel{\\\\char`\\u225F}}\"); // Misc Unicode\n\ndefineMacro(\"\\u27C2\", \"\\\\perp\");\ndefineMacro(\"\\u203C\", \"\\\\mathclose{!\\\\mkern-0.8mu!}\");\ndefineMacro(\"\\u220C\", \"\\\\notni\");\ndefineMacro(\"\\u231C\", \"\\\\ulcorner\");\ndefineMacro(\"\\u231D\", \"\\\\urcorner\");\ndefineMacro(\"\\u231E\", \"\\\\llcorner\");\ndefineMacro(\"\\u231F\", \"\\\\lrcorner\");\ndefineMacro(\"\\u00A9\", \"\\\\copyright\");\ndefineMacro(\"\\u00AE\", \"\\\\textregistered\");\ndefineMacro(\"\\uFE0F\", \"\\\\textregistered\"); // The KaTeX fonts have corners at codepoints that don't match Unicode.\n// For MathML purposes, use the Unicode code point.\n\ndefineMacro(\"\\\\ulcorner\", \"\\\\html@mathml{\\\\@ulcorner}{\\\\mathop{\\\\char\\\"231c}}\");\ndefineMacro(\"\\\\urcorner\", \"\\\\html@mathml{\\\\@urcorner}{\\\\mathop{\\\\char\\\"231d}}\");\ndefineMacro(\"\\\\llcorner\", \"\\\\html@mathml{\\\\@llcorner}{\\\\mathop{\\\\char\\\"231e}}\");\ndefineMacro(\"\\\\lrcorner\", \"\\\\html@mathml{\\\\@lrcorner}{\\\\mathop{\\\\char\\\"231f}}\"); //////////////////////////////////////////////////////////////////////\n// LaTeX_2\u03B5\n// \\vdots{\\vbox{\\baselineskip4\\p@ \\lineskiplimit\\z@\n// \\kern6\\p@\\hbox{.}\\hbox{.}\\hbox{.}}}\n// We'll call \\varvdots, which gets a glyph from symbols.js.\n// The zero-width rule gets us an equivalent to the vertical 6pt kern.\n\ndefineMacro(\"\\\\vdots\", \"\\\\mathord{\\\\varvdots\\\\rule{0pt}{15pt}}\");\ndefineMacro(\"\\u22ee\", \"\\\\vdots\"); //////////////////////////////////////////////////////////////////////\n// amsmath.sty\n// http://mirrors.concertpass.com/tex-archive/macros/latex/required/amsmath/amsmath.pdf\n// Italic Greek capital letters. AMS defines these with \\DeclareMathSymbol,\n// but they are equivalent to \\mathit{\\Letter}.\n\ndefineMacro(\"\\\\varGamma\", \"\\\\mathit{\\\\Gamma}\");\ndefineMacro(\"\\\\varDelta\", \"\\\\mathit{\\\\Delta}\");\ndefineMacro(\"\\\\varTheta\", \"\\\\mathit{\\\\Theta}\");\ndefineMacro(\"\\\\varLambda\", \"\\\\mathit{\\\\Lambda}\");\ndefineMacro(\"\\\\varXi\", \"\\\\mathit{\\\\Xi}\");\ndefineMacro(\"\\\\varPi\", \"\\\\mathit{\\\\Pi}\");\ndefineMacro(\"\\\\varSigma\", \"\\\\mathit{\\\\Sigma}\");\ndefineMacro(\"\\\\varUpsilon\", \"\\\\mathit{\\\\Upsilon}\");\ndefineMacro(\"\\\\varPhi\", \"\\\\mathit{\\\\Phi}\");\ndefineMacro(\"\\\\varPsi\", \"\\\\mathit{\\\\Psi}\");\ndefineMacro(\"\\\\varOmega\", \"\\\\mathit{\\\\Omega}\"); //\\newcommand{\\substack}[1]{\\subarray{c}#1\\endsubarray}\n\ndefineMacro(\"\\\\substack\", \"\\\\begin{subarray}{c}#1\\\\end{subarray}\"); // \\renewcommand{\\colon}{\\nobreak\\mskip2mu\\mathpunct{}\\nonscript\n// \\mkern-\\thinmuskip{:}\\mskip6muplus1mu\\relax}\n\ndefineMacro(\"\\\\colon\", \"\\\\nobreak\\\\mskip2mu\\\\mathpunct{}\" + \"\\\\mathchoice{\\\\mkern-3mu}{\\\\mkern-3mu}{}{}{:}\\\\mskip6mu\\\\relax\"); // \\newcommand{\\boxed}[1]{\\fbox{\\m@th$\\displaystyle#1$}}\n\ndefineMacro(\"\\\\boxed\", \"\\\\fbox{$\\\\displaystyle{#1}$}\"); // \\def\\iff{\\DOTSB\\;\\Longleftrightarrow\\;}\n// \\def\\implies{\\DOTSB\\;\\Longrightarrow\\;}\n// \\def\\impliedby{\\DOTSB\\;\\Longleftarrow\\;}\n\ndefineMacro(\"\\\\iff\", \"\\\\DOTSB\\\\;\\\\Longleftrightarrow\\\\;\");\ndefineMacro(\"\\\\implies\", \"\\\\DOTSB\\\\;\\\\Longrightarrow\\\\;\");\ndefineMacro(\"\\\\impliedby\", \"\\\\DOTSB\\\\;\\\\Longleftarrow\\\\;\"); // AMSMath's automatic \\dots, based on \\mdots@@ macro.\n\nvar dotsByToken = {\n ',': '\\\\dotsc',\n '\\\\not': '\\\\dotsb',\n // \\keybin@ checks for the following:\n '+': '\\\\dotsb',\n '=': '\\\\dotsb',\n '<': '\\\\dotsb',\n '>': '\\\\dotsb',\n '-': '\\\\dotsb',\n '*': '\\\\dotsb',\n ':': '\\\\dotsb',\n // Symbols whose definition starts with \\DOTSB:\n '\\\\DOTSB': '\\\\dotsb',\n '\\\\coprod': '\\\\dotsb',\n '\\\\bigvee': '\\\\dotsb',\n '\\\\bigwedge': '\\\\dotsb',\n '\\\\biguplus': '\\\\dotsb',\n '\\\\bigcap': '\\\\dotsb',\n '\\\\bigcup': '\\\\dotsb',\n '\\\\prod': '\\\\dotsb',\n '\\\\sum': '\\\\dotsb',\n '\\\\bigotimes': '\\\\dotsb',\n '\\\\bigoplus': '\\\\dotsb',\n '\\\\bigodot': '\\\\dotsb',\n '\\\\bigsqcup': '\\\\dotsb',\n '\\\\And': '\\\\dotsb',\n '\\\\longrightarrow': '\\\\dotsb',\n '\\\\Longrightarrow': '\\\\dotsb',\n '\\\\longleftarrow': '\\\\dotsb',\n '\\\\Longleftarrow': '\\\\dotsb',\n '\\\\longleftrightarrow': '\\\\dotsb',\n '\\\\Longleftrightarrow': '\\\\dotsb',\n '\\\\mapsto': '\\\\dotsb',\n '\\\\longmapsto': '\\\\dotsb',\n '\\\\hookrightarrow': '\\\\dotsb',\n '\\\\doteq': '\\\\dotsb',\n // Symbols whose definition starts with \\mathbin:\n '\\\\mathbin': '\\\\dotsb',\n // Symbols whose definition starts with \\mathrel:\n '\\\\mathrel': '\\\\dotsb',\n '\\\\relbar': '\\\\dotsb',\n '\\\\Relbar': '\\\\dotsb',\n '\\\\xrightarrow': '\\\\dotsb',\n '\\\\xleftarrow': '\\\\dotsb',\n // Symbols whose definition starts with \\DOTSI:\n '\\\\DOTSI': '\\\\dotsi',\n '\\\\int': '\\\\dotsi',\n '\\\\oint': '\\\\dotsi',\n '\\\\iint': '\\\\dotsi',\n '\\\\iiint': '\\\\dotsi',\n '\\\\iiiint': '\\\\dotsi',\n '\\\\idotsint': '\\\\dotsi',\n // Symbols whose definition starts with \\DOTSX:\n '\\\\DOTSX': '\\\\dotsx'\n};\ndefineMacro(\"\\\\dots\", function (context) {\n // TODO: If used in text mode, should expand to \\textellipsis.\n // However, in KaTeX, \\textellipsis and \\ldots behave the same\n // (in text mode), and it's unlikely we'd see any of the math commands\n // that affect the behavior of \\dots when in text mode. So fine for now\n // (until we support \\ifmmode ... \\else ... \\fi).\n var thedots = '\\\\dotso';\n var next = context.expandAfterFuture().text;\n\n if (next in dotsByToken) {\n thedots = dotsByToken[next];\n } else if (next.slice(0, 4) === '\\\\not') {\n thedots = '\\\\dotsb';\n } else if (next in symbols.math) {\n if (utils.contains(['bin', 'rel'], symbols.math[next].group)) {\n thedots = '\\\\dotsb';\n }\n }\n\n return thedots;\n});\nvar spaceAfterDots = {\n // \\rightdelim@ checks for the following:\n ')': true,\n ']': true,\n '\\\\rbrack': true,\n '\\\\}': true,\n '\\\\rbrace': true,\n '\\\\rangle': true,\n '\\\\rceil': true,\n '\\\\rfloor': true,\n '\\\\rgroup': true,\n '\\\\rmoustache': true,\n '\\\\right': true,\n '\\\\bigr': true,\n '\\\\biggr': true,\n '\\\\Bigr': true,\n '\\\\Biggr': true,\n // \\extra@ also tests for the following:\n '$': true,\n // \\extrap@ checks for the following:\n ';': true,\n '.': true,\n ',': true\n};\ndefineMacro(\"\\\\dotso\", function (context) {\n var next = context.future().text;\n\n if (next in spaceAfterDots) {\n return \"\\\\ldots\\\\,\";\n } else {\n return \"\\\\ldots\";\n }\n});\ndefineMacro(\"\\\\dotsc\", function (context) {\n var next = context.future().text; // \\dotsc uses \\extra@ but not \\extrap@, instead specially checking for\n // ';' and '.', but doesn't check for ','.\n\n if (next in spaceAfterDots && next !== ',') {\n return \"\\\\ldots\\\\,\";\n } else {\n return \"\\\\ldots\";\n }\n});\ndefineMacro(\"\\\\cdots\", function (context) {\n var next = context.future().text;\n\n if (next in spaceAfterDots) {\n return \"\\\\@cdots\\\\,\";\n } else {\n return \"\\\\@cdots\";\n }\n});\ndefineMacro(\"\\\\dotsb\", \"\\\\cdots\");\ndefineMacro(\"\\\\dotsm\", \"\\\\cdots\");\ndefineMacro(\"\\\\dotsi\", \"\\\\!\\\\cdots\"); // amsmath doesn't actually define \\dotsx, but \\dots followed by a macro\n// starting with \\DOTSX implies \\dotso, and then \\extra@ detects this case\n// and forces the added `\\,`.\n\ndefineMacro(\"\\\\dotsx\", \"\\\\ldots\\\\,\"); // \\let\\DOTSI\\relax\n// \\let\\DOTSB\\relax\n// \\let\\DOTSX\\relax\n\ndefineMacro(\"\\\\DOTSI\", \"\\\\relax\");\ndefineMacro(\"\\\\DOTSB\", \"\\\\relax\");\ndefineMacro(\"\\\\DOTSX\", \"\\\\relax\"); // Spacing, based on amsmath.sty's override of LaTeX defaults\n// \\DeclareRobustCommand{\\tmspace}[3]{%\n// \\ifmmode\\mskip#1#2\\else\\kern#1#3\\fi\\relax}\n\ndefineMacro(\"\\\\tmspace\", \"\\\\TextOrMath{\\\\kern#1#3}{\\\\mskip#1#2}\\\\relax\"); // \\renewcommand{\\,}{\\tmspace+\\thinmuskip{.1667em}}\n// TODO: math mode should use \\thinmuskip\n\ndefineMacro(\"\\\\,\", \"\\\\tmspace+{3mu}{.1667em}\"); // \\let\\thinspace\\,\n\ndefineMacro(\"\\\\thinspace\", \"\\\\,\"); // \\def\\>{\\mskip\\medmuskip}\n// \\renewcommand{\\:}{\\tmspace+\\medmuskip{.2222em}}\n// TODO: \\> and math mode of \\: should use \\medmuskip = 4mu plus 2mu minus 4mu\n\ndefineMacro(\"\\\\>\", \"\\\\mskip{4mu}\");\ndefineMacro(\"\\\\:\", \"\\\\tmspace+{4mu}{.2222em}\"); // \\let\\medspace\\:\n\ndefineMacro(\"\\\\medspace\", \"\\\\:\"); // \\renewcommand{\\;}{\\tmspace+\\thickmuskip{.2777em}}\n// TODO: math mode should use \\thickmuskip = 5mu plus 5mu\n\ndefineMacro(\"\\\\;\", \"\\\\tmspace+{5mu}{.2777em}\"); // \\let\\thickspace\\;\n\ndefineMacro(\"\\\\thickspace\", \"\\\\;\"); // \\renewcommand{\\!}{\\tmspace-\\thinmuskip{.1667em}}\n// TODO: math mode should use \\thinmuskip\n\ndefineMacro(\"\\\\!\", \"\\\\tmspace-{3mu}{.1667em}\"); // \\let\\negthinspace\\!\n\ndefineMacro(\"\\\\negthinspace\", \"\\\\!\"); // \\newcommand{\\negmedspace}{\\tmspace-\\medmuskip{.2222em}}\n// TODO: math mode should use \\medmuskip\n\ndefineMacro(\"\\\\negmedspace\", \"\\\\tmspace-{4mu}{.2222em}\"); // \\newcommand{\\negthickspace}{\\tmspace-\\thickmuskip{.2777em}}\n// TODO: math mode should use \\thickmuskip\n\ndefineMacro(\"\\\\negthickspace\", \"\\\\tmspace-{5mu}{.277em}\"); // \\def\\enspace{\\kern.5em }\n\ndefineMacro(\"\\\\enspace\", \"\\\\kern.5em \"); // \\def\\enskip{\\hskip.5em\\relax}\n\ndefineMacro(\"\\\\enskip\", \"\\\\hskip.5em\\\\relax\"); // \\def\\quad{\\hskip1em\\relax}\n\ndefineMacro(\"\\\\quad\", \"\\\\hskip1em\\\\relax\"); // \\def\\qquad{\\hskip2em\\relax}\n\ndefineMacro(\"\\\\qquad\", \"\\\\hskip2em\\\\relax\"); // \\tag@in@display form of \\tag\n\ndefineMacro(\"\\\\tag\", \"\\\\@ifstar\\\\tag@literal\\\\tag@paren\");\ndefineMacro(\"\\\\tag@paren\", \"\\\\tag@literal{({#1})}\");\ndefineMacro(\"\\\\tag@literal\", context => {\n if (context.macros.get(\"\\\\df@tag\")) {\n throw new ParseError(\"Multiple \\\\tag\");\n }\n\n return \"\\\\gdef\\\\df@tag{\\\\text{#1}}\";\n}); // \\renewcommand{\\bmod}{\\nonscript\\mskip-\\medmuskip\\mkern5mu\\mathbin\n// {\\operator@font mod}\\penalty900\n// \\mkern5mu\\nonscript\\mskip-\\medmuskip}\n// \\newcommand{\\pod}[1]{\\allowbreak\n// \\if@display\\mkern18mu\\else\\mkern8mu\\fi(#1)}\n// \\renewcommand{\\pmod}[1]{\\pod{{\\operator@font mod}\\mkern6mu#1}}\n// \\newcommand{\\mod}[1]{\\allowbreak\\if@display\\mkern18mu\n// \\else\\mkern12mu\\fi{\\operator@font mod}\\,\\,#1}\n// TODO: math mode should use \\medmuskip = 4mu plus 2mu minus 4mu\n\ndefineMacro(\"\\\\bmod\", \"\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\" + \"\\\\mathbin{\\\\rm mod}\" + \"\\\\mathchoice{\\\\mskip1mu}{\\\\mskip1mu}{\\\\mskip5mu}{\\\\mskip5mu}\");\ndefineMacro(\"\\\\pod\", \"\\\\allowbreak\" + \"\\\\mathchoice{\\\\mkern18mu}{\\\\mkern8mu}{\\\\mkern8mu}{\\\\mkern8mu}(#1)\");\ndefineMacro(\"\\\\pmod\", \"\\\\pod{{\\\\rm mod}\\\\mkern6mu#1}\");\ndefineMacro(\"\\\\mod\", \"\\\\allowbreak\" + \"\\\\mathchoice{\\\\mkern18mu}{\\\\mkern12mu}{\\\\mkern12mu}{\\\\mkern12mu}\" + \"{\\\\rm mod}\\\\,\\\\,#1\"); //////////////////////////////////////////////////////////////////////\n// LaTeX source2e\n// \\expandafter\\let\\expandafter\\@normalcr\n// \\csname\\expandafter\\@gobble\\string\\\\ \\endcsname\n// \\DeclareRobustCommand\\newline{\\@normalcr\\relax}\n\ndefineMacro(\"\\\\newline\", \"\\\\\\\\\\\\relax\"); // \\def\\TeX{T\\kern-.1667em\\lower.5ex\\hbox{E}\\kern-.125emX\\@}\n// TODO: Doesn't normally work in math mode because \\@ fails. KaTeX doesn't\n// support \\@ yet, so that's omitted, and we add \\text so that the result\n// doesn't look funny in math mode.\n\ndefineMacro(\"\\\\TeX\", \"\\\\textrm{\\\\html@mathml{\" + \"T\\\\kern-.1667em\\\\raisebox{-.5ex}{E}\\\\kern-.125emX\" + \"}{TeX}}\"); // \\DeclareRobustCommand{\\LaTeX}{L\\kern-.36em%\n// {\\sbox\\z@ T%\n// \\vbox to\\ht\\z@{\\hbox{\\check@mathfonts\n// \\fontsize\\sf@size\\z@\n// \\math@fontsfalse\\selectfont\n// A}%\n// \\vss}%\n// }%\n// \\kern-.15em%\n// \\TeX}\n// This code aligns the top of the A with the T (from the perspective of TeX's\n// boxes, though visually the A appears to extend above slightly).\n// We compute the corresponding \\raisebox when A is rendered in \\normalsize\n// \\scriptstyle, which has a scale factor of 0.7 (see Options.js).\n\nvar latexRaiseA = makeEm(fontMetricsData['Main-Regular'][\"T\".charCodeAt(0)][1] - 0.7 * fontMetricsData['Main-Regular'][\"A\".charCodeAt(0)][1]);\ndefineMacro(\"\\\\LaTeX\", \"\\\\textrm{\\\\html@mathml{\" + (\"L\\\\kern-.36em\\\\raisebox{\" + latexRaiseA + \"}{\\\\scriptstyle A}\") + \"\\\\kern-.15em\\\\TeX}{LaTeX}}\"); // New KaTeX logo based on tweaking LaTeX logo\n\ndefineMacro(\"\\\\KaTeX\", \"\\\\textrm{\\\\html@mathml{\" + (\"K\\\\kern-.17em\\\\raisebox{\" + latexRaiseA + \"}{\\\\scriptstyle A}\") + \"\\\\kern-.15em\\\\TeX}{KaTeX}}\"); // \\DeclareRobustCommand\\hspace{\\@ifstar\\@hspacer\\@hspace}\n// \\def\\@hspace#1{\\hskip #1\\relax}\n// \\def\\@hspacer#1{\\vrule \\@width\\z@\\nobreak\n// \\hskip #1\\hskip \\z@skip}\n\ndefineMacro(\"\\\\hspace\", \"\\\\@ifstar\\\\@hspacer\\\\@hspace\");\ndefineMacro(\"\\\\@hspace\", \"\\\\hskip #1\\\\relax\");\ndefineMacro(\"\\\\@hspacer\", \"\\\\rule{0pt}{0pt}\\\\hskip #1\\\\relax\"); //////////////////////////////////////////////////////////////////////\n// mathtools.sty\n//\\providecommand\\ordinarycolon{:}\n\ndefineMacro(\"\\\\ordinarycolon\", \":\"); //\\def\\vcentcolon{\\mathrel{\\mathop\\ordinarycolon}}\n//TODO(edemaine): Not yet centered. Fix via \\raisebox or #726\n\ndefineMacro(\"\\\\vcentcolon\", \"\\\\mathrel{\\\\mathop\\\\ordinarycolon}\"); // \\providecommand*\\dblcolon{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}\n\ndefineMacro(\"\\\\dblcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-.9mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2237}}\"); // \\providecommand*\\coloneqq{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}\n\ndefineMacro(\"\\\\coloneqq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}=}}\" + \"{\\\\mathop{\\\\char\\\"2254}}\"); // \u2254\n// \\providecommand*\\Coloneqq{\\dblcolon\\mathrel{\\mkern-1.2mu}=}\n\ndefineMacro(\"\\\\Coloneqq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}=}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"3d}}\"); // \\providecommand*\\coloneq{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\n\ndefineMacro(\"\\\\coloneq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"2212}}\"); // \\providecommand*\\Coloneq{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}\n\ndefineMacro(\"\\\\Coloneq\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\mathrel{-}}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"2212}}\"); // \\providecommand*\\eqqcolon{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}\n\ndefineMacro(\"\\\\eqqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2255}}\"); // \u2255\n// \\providecommand*\\Eqqcolon{=\\mathrel{\\mkern-1.2mu}\\dblcolon}\n\ndefineMacro(\"\\\\Eqqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{=\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}\" + \"{\\\\mathop{\\\\char\\\"3d\\\\char\\\"2237}}\"); // \\providecommand*\\eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}\n\ndefineMacro(\"\\\\eqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}}\" + \"{\\\\mathop{\\\\char\\\"2239}}\"); // \\providecommand*\\Eqcolon{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}\n\ndefineMacro(\"\\\\Eqcolon\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\mathrel{-}\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}}\" + \"{\\\\mathop{\\\\char\\\"2212\\\\char\\\"2237}}\"); // \\providecommand*\\colonapprox{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}\n\ndefineMacro(\"\\\\colonapprox\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"2248}}\"); // \\providecommand*\\Colonapprox{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}\n\ndefineMacro(\"\\\\Colonapprox\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\approx}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"2248}}\"); // \\providecommand*\\colonsim{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}\n\ndefineMacro(\"\\\\colonsim\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\vcentcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}\" + \"{\\\\mathop{\\\\char\\\"3a\\\\char\\\"223c}}\"); // \\providecommand*\\Colonsim{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}\n\ndefineMacro(\"\\\\Colonsim\", \"\\\\html@mathml{\" + \"\\\\mathrel{\\\\dblcolon\\\\mathrel{\\\\mkern-1.2mu}\\\\sim}}\" + \"{\\\\mathop{\\\\char\\\"2237\\\\char\\\"223c}}\"); // Some Unicode characters are implemented with macros to mathtools functions.\n\ndefineMacro(\"\\u2237\", \"\\\\dblcolon\"); // ::\n\ndefineMacro(\"\\u2239\", \"\\\\eqcolon\"); // -:\n\ndefineMacro(\"\\u2254\", \"\\\\coloneqq\"); // :=\n\ndefineMacro(\"\\u2255\", \"\\\\eqqcolon\"); // =:\n\ndefineMacro(\"\\u2A74\", \"\\\\Coloneqq\"); // ::=\n//////////////////////////////////////////////////////////////////////\n// colonequals.sty\n// Alternate names for mathtools's macros:\n\ndefineMacro(\"\\\\ratio\", \"\\\\vcentcolon\");\ndefineMacro(\"\\\\coloncolon\", \"\\\\dblcolon\");\ndefineMacro(\"\\\\colonequals\", \"\\\\coloneqq\");\ndefineMacro(\"\\\\coloncolonequals\", \"\\\\Coloneqq\");\ndefineMacro(\"\\\\equalscolon\", \"\\\\eqqcolon\");\ndefineMacro(\"\\\\equalscoloncolon\", \"\\\\Eqqcolon\");\ndefineMacro(\"\\\\colonminus\", \"\\\\coloneq\");\ndefineMacro(\"\\\\coloncolonminus\", \"\\\\Coloneq\");\ndefineMacro(\"\\\\minuscolon\", \"\\\\eqcolon\");\ndefineMacro(\"\\\\minuscoloncolon\", \"\\\\Eqcolon\"); // \\colonapprox name is same in mathtools and colonequals.\n\ndefineMacro(\"\\\\coloncolonapprox\", \"\\\\Colonapprox\"); // \\colonsim name is same in mathtools and colonequals.\n\ndefineMacro(\"\\\\coloncolonsim\", \"\\\\Colonsim\"); // Additional macros, implemented by analogy with mathtools definitions:\n\ndefineMacro(\"\\\\simcolon\", \"\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}\");\ndefineMacro(\"\\\\simcoloncolon\", \"\\\\mathrel{\\\\sim\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}\");\ndefineMacro(\"\\\\approxcolon\", \"\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\vcentcolon}\");\ndefineMacro(\"\\\\approxcoloncolon\", \"\\\\mathrel{\\\\approx\\\\mathrel{\\\\mkern-1.2mu}\\\\dblcolon}\"); // Present in newtxmath, pxfonts and txfonts\n\ndefineMacro(\"\\\\notni\", \"\\\\html@mathml{\\\\not\\\\ni}{\\\\mathrel{\\\\char`\\u220C}}\");\ndefineMacro(\"\\\\limsup\", \"\\\\DOTSB\\\\operatorname*{lim\\\\,sup}\");\ndefineMacro(\"\\\\liminf\", \"\\\\DOTSB\\\\operatorname*{lim\\\\,inf}\"); //////////////////////////////////////////////////////////////////////\n// From amsopn.sty\n\ndefineMacro(\"\\\\injlim\", \"\\\\DOTSB\\\\operatorname*{inj\\\\,lim}\");\ndefineMacro(\"\\\\projlim\", \"\\\\DOTSB\\\\operatorname*{proj\\\\,lim}\");\ndefineMacro(\"\\\\varlimsup\", \"\\\\DOTSB\\\\operatorname*{\\\\overline{lim}}\");\ndefineMacro(\"\\\\varliminf\", \"\\\\DOTSB\\\\operatorname*{\\\\underline{lim}}\");\ndefineMacro(\"\\\\varinjlim\", \"\\\\DOTSB\\\\operatorname*{\\\\underrightarrow{lim}}\");\ndefineMacro(\"\\\\varprojlim\", \"\\\\DOTSB\\\\operatorname*{\\\\underleftarrow{lim}}\"); //////////////////////////////////////////////////////////////////////\n// MathML alternates for KaTeX glyphs in the Unicode private area\n\ndefineMacro(\"\\\\gvertneqq\", \"\\\\html@mathml{\\\\@gvertneqq}{\\u2269}\");\ndefineMacro(\"\\\\lvertneqq\", \"\\\\html@mathml{\\\\@lvertneqq}{\\u2268}\");\ndefineMacro(\"\\\\ngeqq\", \"\\\\html@mathml{\\\\@ngeqq}{\\u2271}\");\ndefineMacro(\"\\\\ngeqslant\", \"\\\\html@mathml{\\\\@ngeqslant}{\\u2271}\");\ndefineMacro(\"\\\\nleqq\", \"\\\\html@mathml{\\\\@nleqq}{\\u2270}\");\ndefineMacro(\"\\\\nleqslant\", \"\\\\html@mathml{\\\\@nleqslant}{\\u2270}\");\ndefineMacro(\"\\\\nshortmid\", \"\\\\html@mathml{\\\\@nshortmid}{\u2224}\");\ndefineMacro(\"\\\\nshortparallel\", \"\\\\html@mathml{\\\\@nshortparallel}{\u2226}\");\ndefineMacro(\"\\\\nsubseteqq\", \"\\\\html@mathml{\\\\@nsubseteqq}{\\u2288}\");\ndefineMacro(\"\\\\nsupseteqq\", \"\\\\html@mathml{\\\\@nsupseteqq}{\\u2289}\");\ndefineMacro(\"\\\\varsubsetneq\", \"\\\\html@mathml{\\\\@varsubsetneq}{\u228A}\");\ndefineMacro(\"\\\\varsubsetneqq\", \"\\\\html@mathml{\\\\@varsubsetneqq}{\u2ACB}\");\ndefineMacro(\"\\\\varsupsetneq\", \"\\\\html@mathml{\\\\@varsupsetneq}{\u228B}\");\ndefineMacro(\"\\\\varsupsetneqq\", \"\\\\html@mathml{\\\\@varsupsetneqq}{\u2ACC}\");\ndefineMacro(\"\\\\imath\", \"\\\\html@mathml{\\\\@imath}{\\u0131}\");\ndefineMacro(\"\\\\jmath\", \"\\\\html@mathml{\\\\@jmath}{\\u0237}\"); //////////////////////////////////////////////////////////////////////\n// stmaryrd and semantic\n// The stmaryrd and semantic packages render the next four items by calling a\n// glyph. Those glyphs do not exist in the KaTeX fonts. Hence the macros.\n\ndefineMacro(\"\\\\llbracket\", \"\\\\html@mathml{\" + \"\\\\mathopen{[\\\\mkern-3.2mu[}}\" + \"{\\\\mathopen{\\\\char`\\u27e6}}\");\ndefineMacro(\"\\\\rrbracket\", \"\\\\html@mathml{\" + \"\\\\mathclose{]\\\\mkern-3.2mu]}}\" + \"{\\\\mathclose{\\\\char`\\u27e7}}\");\ndefineMacro(\"\\u27e6\", \"\\\\llbracket\"); // blackboard bold [\n\ndefineMacro(\"\\u27e7\", \"\\\\rrbracket\"); // blackboard bold ]\n\ndefineMacro(\"\\\\lBrace\", \"\\\\html@mathml{\" + \"\\\\mathopen{\\\\{\\\\mkern-3.2mu[}}\" + \"{\\\\mathopen{\\\\char`\\u2983}}\");\ndefineMacro(\"\\\\rBrace\", \"\\\\html@mathml{\" + \"\\\\mathclose{]\\\\mkern-3.2mu\\\\}}}\" + \"{\\\\mathclose{\\\\char`\\u2984}}\");\ndefineMacro(\"\\u2983\", \"\\\\lBrace\"); // blackboard bold {\n\ndefineMacro(\"\\u2984\", \"\\\\rBrace\"); // blackboard bold }\n// TODO: Create variable sized versions of the last two items. I believe that\n// will require new font glyphs.\n// The stmaryrd function `\\minuso` provides a \"Plimsoll\" symbol that\n// superimposes the characters \\circ and \\mathminus. Used in chemistry.\n\ndefineMacro(\"\\\\minuso\", \"\\\\mathbin{\\\\html@mathml{\" + \"{\\\\mathrlap{\\\\mathchoice{\\\\kern{0.145em}}{\\\\kern{0.145em}}\" + \"{\\\\kern{0.1015em}}{\\\\kern{0.0725em}}\\\\circ}{-}}}\" + \"{\\\\char`\u29B5}}\");\ndefineMacro(\"\u29B5\", \"\\\\minuso\"); //////////////////////////////////////////////////////////////////////\n// texvc.sty\n// The texvc package contains macros available in mediawiki pages.\n// We omit the functions deprecated at\n// https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax\n// We also omit texvc's \\O, which conflicts with \\text{\\O}\n\ndefineMacro(\"\\\\darr\", \"\\\\downarrow\");\ndefineMacro(\"\\\\dArr\", \"\\\\Downarrow\");\ndefineMacro(\"\\\\Darr\", \"\\\\Downarrow\");\ndefineMacro(\"\\\\lang\", \"\\\\langle\");\ndefineMacro(\"\\\\rang\", \"\\\\rangle\");\ndefineMacro(\"\\\\uarr\", \"\\\\uparrow\");\ndefineMacro(\"\\\\uArr\", \"\\\\Uparrow\");\ndefineMacro(\"\\\\Uarr\", \"\\\\Uparrow\");\ndefineMacro(\"\\\\N\", \"\\\\mathbb{N}\");\ndefineMacro(\"\\\\R\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Z\", \"\\\\mathbb{Z}\");\ndefineMacro(\"\\\\alef\", \"\\\\aleph\");\ndefineMacro(\"\\\\alefsym\", \"\\\\aleph\");\ndefineMacro(\"\\\\Alpha\", \"\\\\mathrm{A}\");\ndefineMacro(\"\\\\Beta\", \"\\\\mathrm{B}\");\ndefineMacro(\"\\\\bull\", \"\\\\bullet\");\ndefineMacro(\"\\\\Chi\", \"\\\\mathrm{X}\");\ndefineMacro(\"\\\\clubs\", \"\\\\clubsuit\");\ndefineMacro(\"\\\\cnums\", \"\\\\mathbb{C}\");\ndefineMacro(\"\\\\Complex\", \"\\\\mathbb{C}\");\ndefineMacro(\"\\\\Dagger\", \"\\\\ddagger\");\ndefineMacro(\"\\\\diamonds\", \"\\\\diamondsuit\");\ndefineMacro(\"\\\\empty\", \"\\\\emptyset\");\ndefineMacro(\"\\\\Epsilon\", \"\\\\mathrm{E}\");\ndefineMacro(\"\\\\Eta\", \"\\\\mathrm{H}\");\ndefineMacro(\"\\\\exist\", \"\\\\exists\");\ndefineMacro(\"\\\\harr\", \"\\\\leftrightarrow\");\ndefineMacro(\"\\\\hArr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Harr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\hearts\", \"\\\\heartsuit\");\ndefineMacro(\"\\\\image\", \"\\\\Im\");\ndefineMacro(\"\\\\infin\", \"\\\\infty\");\ndefineMacro(\"\\\\Iota\", \"\\\\mathrm{I}\");\ndefineMacro(\"\\\\isin\", \"\\\\in\");\ndefineMacro(\"\\\\Kappa\", \"\\\\mathrm{K}\");\ndefineMacro(\"\\\\larr\", \"\\\\leftarrow\");\ndefineMacro(\"\\\\lArr\", \"\\\\Leftarrow\");\ndefineMacro(\"\\\\Larr\", \"\\\\Leftarrow\");\ndefineMacro(\"\\\\lrarr\", \"\\\\leftrightarrow\");\ndefineMacro(\"\\\\lrArr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Lrarr\", \"\\\\Leftrightarrow\");\ndefineMacro(\"\\\\Mu\", \"\\\\mathrm{M}\");\ndefineMacro(\"\\\\natnums\", \"\\\\mathbb{N}\");\ndefineMacro(\"\\\\Nu\", \"\\\\mathrm{N}\");\ndefineMacro(\"\\\\Omicron\", \"\\\\mathrm{O}\");\ndefineMacro(\"\\\\plusmn\", \"\\\\pm\");\ndefineMacro(\"\\\\rarr\", \"\\\\rightarrow\");\ndefineMacro(\"\\\\rArr\", \"\\\\Rightarrow\");\ndefineMacro(\"\\\\Rarr\", \"\\\\Rightarrow\");\ndefineMacro(\"\\\\real\", \"\\\\Re\");\ndefineMacro(\"\\\\reals\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Reals\", \"\\\\mathbb{R}\");\ndefineMacro(\"\\\\Rho\", \"\\\\mathrm{P}\");\ndefineMacro(\"\\\\sdot\", \"\\\\cdot\");\ndefineMacro(\"\\\\sect\", \"\\\\S\");\ndefineMacro(\"\\\\spades\", \"\\\\spadesuit\");\ndefineMacro(\"\\\\sub\", \"\\\\subset\");\ndefineMacro(\"\\\\sube\", \"\\\\subseteq\");\ndefineMacro(\"\\\\supe\", \"\\\\supseteq\");\ndefineMacro(\"\\\\Tau\", \"\\\\mathrm{T}\");\ndefineMacro(\"\\\\thetasym\", \"\\\\vartheta\"); // TODO: defineMacro(\"\\\\varcoppa\", \"\\\\\\mbox{\\\\coppa}\");\n\ndefineMacro(\"\\\\weierp\", \"\\\\wp\");\ndefineMacro(\"\\\\Zeta\", \"\\\\mathrm{Z}\"); //////////////////////////////////////////////////////////////////////\n// statmath.sty\n// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf\n\ndefineMacro(\"\\\\argmin\", \"\\\\DOTSB\\\\operatorname*{arg\\\\,min}\");\ndefineMacro(\"\\\\argmax\", \"\\\\DOTSB\\\\operatorname*{arg\\\\,max}\");\ndefineMacro(\"\\\\plim\", \"\\\\DOTSB\\\\mathop{\\\\operatorname{plim}}\\\\limits\"); //////////////////////////////////////////////////////////////////////\n// braket.sty\n// http://ctan.math.washington.edu/tex-archive/macros/latex/contrib/braket/braket.pdf\n\ndefineMacro(\"\\\\bra\", \"\\\\mathinner{\\\\langle{#1}|}\");\ndefineMacro(\"\\\\ket\", \"\\\\mathinner{|{#1}\\\\rangle}\");\ndefineMacro(\"\\\\braket\", \"\\\\mathinner{\\\\langle{#1}\\\\rangle}\");\ndefineMacro(\"\\\\Bra\", \"\\\\left\\\\langle#1\\\\right|\");\ndefineMacro(\"\\\\Ket\", \"\\\\left|#1\\\\right\\\\rangle\");\n\nvar braketHelper = one => context => {\n var left = context.consumeArg().tokens;\n var middle = context.consumeArg().tokens;\n var middleDouble = context.consumeArg().tokens;\n var right = context.consumeArg().tokens;\n var oldMiddle = context.macros.get(\"|\");\n var oldMiddleDouble = context.macros.get(\"\\\\|\");\n context.macros.beginGroup();\n\n var midMacro = double => context => {\n if (one) {\n // Only modify the first instance of | or \\|\n context.macros.set(\"|\", oldMiddle);\n\n if (middleDouble.length) {\n context.macros.set(\"\\\\|\", oldMiddleDouble);\n }\n }\n\n var doubled = double;\n\n if (!double && middleDouble.length) {\n // Mimic \\@ifnextchar\n var nextToken = context.future();\n\n if (nextToken.text === \"|\") {\n context.popToken();\n doubled = true;\n }\n }\n\n return {\n tokens: doubled ? middleDouble : middle,\n numArgs: 0\n };\n };\n\n context.macros.set(\"|\", midMacro(false));\n\n if (middleDouble.length) {\n context.macros.set(\"\\\\|\", midMacro(true));\n }\n\n var arg = context.consumeArg().tokens;\n var expanded = context.expandTokens([...right, ...arg, ...left // reversed\n ]);\n context.macros.endGroup();\n return {\n tokens: expanded.reverse(),\n numArgs: 0\n };\n};\n\ndefineMacro(\"\\\\bra@ket\", braketHelper(false));\ndefineMacro(\"\\\\bra@set\", braketHelper(true));\ndefineMacro(\"\\\\Braket\", \"\\\\bra@ket{\\\\left\\\\langle}\" + \"{\\\\,\\\\middle\\\\vert\\\\,}{\\\\,\\\\middle\\\\vert\\\\,}{\\\\right\\\\rangle}\");\ndefineMacro(\"\\\\Set\", \"\\\\bra@set{\\\\left\\\\{\\\\:}\" + \"{\\\\;\\\\middle\\\\vert\\\\;}{\\\\;\\\\middle\\\\Vert\\\\;}{\\\\:\\\\right\\\\}}\");\ndefineMacro(\"\\\\set\", \"\\\\bra@set{\\\\{\\\\,}{\\\\mid}{}{\\\\,\\\\}}\"); // has no support for special || or \\|\n//////////////////////////////////////////////////////////////////////\n// actuarialangle.dtx\n\ndefineMacro(\"\\\\angln\", \"{\\\\angl n}\"); // Custom Khan Academy colors, should be moved to an optional package\n\ndefineMacro(\"\\\\blue\", \"\\\\textcolor{##6495ed}{#1}\");\ndefineMacro(\"\\\\orange\", \"\\\\textcolor{##ffa500}{#1}\");\ndefineMacro(\"\\\\pink\", \"\\\\textcolor{##ff00af}{#1}\");\ndefineMacro(\"\\\\red\", \"\\\\textcolor{##df0030}{#1}\");\ndefineMacro(\"\\\\green\", \"\\\\textcolor{##28ae7b}{#1}\");\ndefineMacro(\"\\\\gray\", \"\\\\textcolor{gray}{#1}\");\ndefineMacro(\"\\\\purple\", \"\\\\textcolor{##9d38bd}{#1}\");\ndefineMacro(\"\\\\blueA\", \"\\\\textcolor{##ccfaff}{#1}\");\ndefineMacro(\"\\\\blueB\", \"\\\\textcolor{##80f6ff}{#1}\");\ndefineMacro(\"\\\\blueC\", \"\\\\textcolor{##63d9ea}{#1}\");\ndefineMacro(\"\\\\blueD\", \"\\\\textcolor{##11accd}{#1}\");\ndefineMacro(\"\\\\blueE\", \"\\\\textcolor{##0c7f99}{#1}\");\ndefineMacro(\"\\\\tealA\", \"\\\\textcolor{##94fff5}{#1}\");\ndefineMacro(\"\\\\tealB\", \"\\\\textcolor{##26edd5}{#1}\");\ndefineMacro(\"\\\\tealC\", \"\\\\textcolor{##01d1c1}{#1}\");\ndefineMacro(\"\\\\tealD\", \"\\\\textcolor{##01a995}{#1}\");\ndefineMacro(\"\\\\tealE\", \"\\\\textcolor{##208170}{#1}\");\ndefineMacro(\"\\\\greenA\", \"\\\\textcolor{##b6ffb0}{#1}\");\ndefineMacro(\"\\\\greenB\", \"\\\\textcolor{##8af281}{#1}\");\ndefineMacro(\"\\\\greenC\", \"\\\\textcolor{##74cf70}{#1}\");\ndefineMacro(\"\\\\greenD\", \"\\\\textcolor{##1fab54}{#1}\");\ndefineMacro(\"\\\\greenE\", \"\\\\textcolor{##0d923f}{#1}\");\ndefineMacro(\"\\\\goldA\", \"\\\\textcolor{##ffd0a9}{#1}\");\ndefineMacro(\"\\\\goldB\", \"\\\\textcolor{##ffbb71}{#1}\");\ndefineMacro(\"\\\\goldC\", \"\\\\textcolor{##ff9c39}{#1}\");\ndefineMacro(\"\\\\goldD\", \"\\\\textcolor{##e07d10}{#1}\");\ndefineMacro(\"\\\\goldE\", \"\\\\textcolor{##a75a05}{#1}\");\ndefineMacro(\"\\\\redA\", \"\\\\textcolor{##fca9a9}{#1}\");\ndefineMacro(\"\\\\redB\", \"\\\\textcolor{##ff8482}{#1}\");\ndefineMacro(\"\\\\redC\", \"\\\\textcolor{##f9685d}{#1}\");\ndefineMacro(\"\\\\redD\", \"\\\\textcolor{##e84d39}{#1}\");\ndefineMacro(\"\\\\redE\", \"\\\\textcolor{##bc2612}{#1}\");\ndefineMacro(\"\\\\maroonA\", \"\\\\textcolor{##ffbde0}{#1}\");\ndefineMacro(\"\\\\maroonB\", \"\\\\textcolor{##ff92c6}{#1}\");\ndefineMacro(\"\\\\maroonC\", \"\\\\textcolor{##ed5fa6}{#1}\");\ndefineMacro(\"\\\\maroonD\", \"\\\\textcolor{##ca337c}{#1}\");\ndefineMacro(\"\\\\maroonE\", \"\\\\textcolor{##9e034e}{#1}\");\ndefineMacro(\"\\\\purpleA\", \"\\\\textcolor{##ddd7ff}{#1}\");\ndefineMacro(\"\\\\purpleB\", \"\\\\textcolor{##c6b9fc}{#1}\");\ndefineMacro(\"\\\\purpleC\", \"\\\\textcolor{##aa87ff}{#1}\");\ndefineMacro(\"\\\\purpleD\", \"\\\\textcolor{##7854ab}{#1}\");\ndefineMacro(\"\\\\purpleE\", \"\\\\textcolor{##543b78}{#1}\");\ndefineMacro(\"\\\\mintA\", \"\\\\textcolor{##f5f9e8}{#1}\");\ndefineMacro(\"\\\\mintB\", \"\\\\textcolor{##edf2df}{#1}\");\ndefineMacro(\"\\\\mintC\", \"\\\\textcolor{##e0e5cc}{#1}\");\ndefineMacro(\"\\\\grayA\", \"\\\\textcolor{##f6f7f7}{#1}\");\ndefineMacro(\"\\\\grayB\", \"\\\\textcolor{##f0f1f2}{#1}\");\ndefineMacro(\"\\\\grayC\", \"\\\\textcolor{##e3e5e6}{#1}\");\ndefineMacro(\"\\\\grayD\", \"\\\\textcolor{##d6d8da}{#1}\");\ndefineMacro(\"\\\\grayE\", \"\\\\textcolor{##babec2}{#1}\");\ndefineMacro(\"\\\\grayF\", \"\\\\textcolor{##888d93}{#1}\");\ndefineMacro(\"\\\\grayG\", \"\\\\textcolor{##626569}{#1}\");\ndefineMacro(\"\\\\grayH\", \"\\\\textcolor{##3b3e40}{#1}\");\ndefineMacro(\"\\\\grayI\", \"\\\\textcolor{##21242c}{#1}\");\ndefineMacro(\"\\\\kaBlue\", \"\\\\textcolor{##314453}{#1}\");\ndefineMacro(\"\\\\kaGreen\", \"\\\\textcolor{##71B307}{#1}\");\n\n/**\n * This file contains the \u201Cgullet\u201D where macros are expanded\n * until only non-macro tokens remain.\n */\n// List of commands that act like macros but aren't defined as a macro,\n// function, or symbol. Used in `isDefined`.\nvar implicitCommands = {\n \"^\": true,\n // Parser.js\n \"_\": true,\n // Parser.js\n \"\\\\limits\": true,\n // Parser.js\n \"\\\\nolimits\": true // Parser.js\n\n};\nclass MacroExpander {\n constructor(input, settings, mode) {\n this.settings = void 0;\n this.expansionCount = void 0;\n this.lexer = void 0;\n this.macros = void 0;\n this.stack = void 0;\n this.mode = void 0;\n this.settings = settings;\n this.expansionCount = 0;\n this.feed(input); // Make new global namespace\n\n this.macros = new Namespace(macros, settings.macros);\n this.mode = mode;\n this.stack = []; // contains tokens in REVERSE order\n }\n /**\n * Feed a new input string to the same MacroExpander\n * (with existing macros etc.).\n */\n\n\n feed(input) {\n this.lexer = new Lexer(input, this.settings);\n }\n /**\n * Switches between \"text\" and \"math\" modes.\n */\n\n\n switchMode(newMode) {\n this.mode = newMode;\n }\n /**\n * Start a new group nesting within all namespaces.\n */\n\n\n beginGroup() {\n this.macros.beginGroup();\n }\n /**\n * End current group nesting within all namespaces.\n */\n\n\n endGroup() {\n this.macros.endGroup();\n }\n /**\n * Ends all currently nested groups (if any), restoring values before the\n * groups began. Useful in case of an error in the middle of parsing.\n */\n\n\n endGroups() {\n this.macros.endGroups();\n }\n /**\n * Returns the topmost token on the stack, without expanding it.\n * Similar in behavior to TeX's `\\futurelet`.\n */\n\n\n future() {\n if (this.stack.length === 0) {\n this.pushToken(this.lexer.lex());\n }\n\n return this.stack[this.stack.length - 1];\n }\n /**\n * Remove and return the next unexpanded token.\n */\n\n\n popToken() {\n this.future(); // ensure non-empty stack\n\n return this.stack.pop();\n }\n /**\n * Add a given token to the token stack. In particular, this get be used\n * to put back a token returned from one of the other methods.\n */\n\n\n pushToken(token) {\n this.stack.push(token);\n }\n /**\n * Append an array of tokens to the token stack.\n */\n\n\n pushTokens(tokens) {\n this.stack.push(...tokens);\n }\n /**\n * Find an macro argument without expanding tokens and append the array of\n * tokens to the token stack. Uses Token as a container for the result.\n */\n\n\n scanArgument(isOptional) {\n var start;\n var end;\n var tokens;\n\n if (isOptional) {\n this.consumeSpaces(); // \\@ifnextchar gobbles any space following it\n\n if (this.future().text !== \"[\") {\n return null;\n }\n\n start = this.popToken(); // don't include [ in tokens\n\n ({\n tokens,\n end\n } = this.consumeArg([\"]\"]));\n } else {\n ({\n tokens,\n start,\n end\n } = this.consumeArg());\n } // indicate the end of an argument\n\n\n this.pushToken(new Token(\"EOF\", end.loc));\n this.pushTokens(tokens);\n return start.range(end, \"\");\n }\n /**\n * Consume all following space tokens, without expansion.\n */\n\n\n consumeSpaces() {\n for (;;) {\n var token = this.future();\n\n if (token.text === \" \") {\n this.stack.pop();\n } else {\n break;\n }\n }\n }\n /**\n * Consume an argument from the token stream, and return the resulting array\n * of tokens and start/end token.\n */\n\n\n consumeArg(delims) {\n // The argument for a delimited parameter is the shortest (possibly\n // empty) sequence of tokens with properly nested {...} groups that is\n // followed ... by this particular list of non-parameter tokens.\n // The argument for an undelimited parameter is the next nonblank\n // token, unless that token is \u2018{\u2019, when the argument will be the\n // entire {...} group that follows.\n var tokens = [];\n var isDelimited = delims && delims.length > 0;\n\n if (!isDelimited) {\n // Ignore spaces between arguments. As the TeXbook says:\n // \"After you have said \u2018\\def\\row#1#2{...}\u2019, you are allowed to\n // put spaces between the arguments (e.g., \u2018\\row x n\u2019), because\n // TeX doesn\u2019t use single spaces as undelimited arguments.\"\n this.consumeSpaces();\n }\n\n var start = this.future();\n var tok;\n var depth = 0;\n var match = 0;\n\n do {\n tok = this.popToken();\n tokens.push(tok);\n\n if (tok.text === \"{\") {\n ++depth;\n } else if (tok.text === \"}\") {\n --depth;\n\n if (depth === -1) {\n throw new ParseError(\"Extra }\", tok);\n }\n } else if (tok.text === \"EOF\") {\n throw new ParseError(\"Unexpected end of input in a macro argument\" + \", expected '\" + (delims && isDelimited ? delims[match] : \"}\") + \"'\", tok);\n }\n\n if (delims && isDelimited) {\n if ((depth === 0 || depth === 1 && delims[match] === \"{\") && tok.text === delims[match]) {\n ++match;\n\n if (match === delims.length) {\n // don't include delims in tokens\n tokens.splice(-match, match);\n break;\n }\n } else {\n match = 0;\n }\n }\n } while (depth !== 0 || isDelimited); // If the argument found ... has the form \u2018{}\u2019,\n // ... the outermost braces enclosing the argument are removed\n\n\n if (start.text === \"{\" && tokens[tokens.length - 1].text === \"}\") {\n tokens.pop();\n tokens.shift();\n }\n\n tokens.reverse(); // to fit in with stack order\n\n return {\n tokens,\n start,\n end: tok\n };\n }\n /**\n * Consume the specified number of (delimited) arguments from the token\n * stream and return the resulting array of arguments.\n */\n\n\n consumeArgs(numArgs, delimiters) {\n if (delimiters) {\n if (delimiters.length !== numArgs + 1) {\n throw new ParseError(\"The length of delimiters doesn't match the number of args!\");\n }\n\n var delims = delimiters[0];\n\n for (var i = 0; i < delims.length; i++) {\n var tok = this.popToken();\n\n if (delims[i] !== tok.text) {\n throw new ParseError(\"Use of the macro doesn't match its definition\", tok);\n }\n }\n }\n\n var args = [];\n\n for (var _i = 0; _i < numArgs; _i++) {\n args.push(this.consumeArg(delimiters && delimiters[_i + 1]).tokens);\n }\n\n return args;\n }\n /**\n * Increment `expansionCount` by the specified amount.\n * Throw an error if it exceeds `maxExpand`.\n */\n\n\n countExpansion(amount) {\n this.expansionCount += amount;\n\n if (this.expansionCount > this.settings.maxExpand) {\n throw new ParseError(\"Too many expansions: infinite loop or \" + \"need to increase maxExpand setting\");\n }\n }\n /**\n * Expand the next token only once if possible.\n *\n * If the token is expanded, the resulting tokens will be pushed onto\n * the stack in reverse order, and the number of such tokens will be\n * returned. This number might be zero or positive.\n *\n * If not, the return value is `false`, and the next token remains at the\n * top of the stack.\n *\n * In either case, the next token will be on the top of the stack,\n * or the stack will be empty (in case of empty expansion\n * and no other tokens).\n *\n * Used to implement `expandAfterFuture` and `expandNextToken`.\n *\n * If expandableOnly, only expandable tokens are expanded and\n * an undefined control sequence results in an error.\n */\n\n\n expandOnce(expandableOnly) {\n var topToken = this.popToken();\n var name = topToken.text;\n var expansion = !topToken.noexpand ? this._getExpansion(name) : null;\n\n if (expansion == null || expandableOnly && expansion.unexpandable) {\n if (expandableOnly && expansion == null && name[0] === \"\\\\\" && !this.isDefined(name)) {\n throw new ParseError(\"Undefined control sequence: \" + name);\n }\n\n this.pushToken(topToken);\n return false;\n }\n\n this.countExpansion(1);\n var tokens = expansion.tokens;\n var args = this.consumeArgs(expansion.numArgs, expansion.delimiters);\n\n if (expansion.numArgs) {\n // paste arguments in place of the placeholders\n tokens = tokens.slice(); // make a shallow copy\n\n for (var i = tokens.length - 1; i >= 0; --i) {\n var tok = tokens[i];\n\n if (tok.text === \"#\") {\n if (i === 0) {\n throw new ParseError(\"Incomplete placeholder at end of macro body\", tok);\n }\n\n tok = tokens[--i]; // next token on stack\n\n if (tok.text === \"#\") {\n // ## \u2192 #\n tokens.splice(i + 1, 1); // drop first #\n } else if (/^[1-9]$/.test(tok.text)) {\n // replace the placeholder with the indicated argument\n tokens.splice(i, 2, ...args[+tok.text - 1]);\n } else {\n throw new ParseError(\"Not a valid argument number\", tok);\n }\n }\n }\n } // Concatenate expansion onto top of stack.\n\n\n this.pushTokens(tokens);\n return tokens.length;\n }\n /**\n * Expand the next token only once (if possible), and return the resulting\n * top token on the stack (without removing anything from the stack).\n * Similar in behavior to TeX's `\\expandafter\\futurelet`.\n * Equivalent to expandOnce() followed by future().\n */\n\n\n expandAfterFuture() {\n this.expandOnce();\n return this.future();\n }\n /**\n * Recursively expand first token, then return first non-expandable token.\n */\n\n\n expandNextToken() {\n for (;;) {\n if (this.expandOnce() === false) {\n // fully expanded\n var token = this.stack.pop(); // the token after \\noexpand is interpreted as if its meaning\n // were \u2018\\relax\u2019\n\n if (token.treatAsRelax) {\n token.text = \"\\\\relax\";\n }\n\n return token;\n }\n } // Flow unable to figure out that this pathway is impossible.\n // https://github.com/facebook/flow/issues/4808\n\n\n throw new Error(); // eslint-disable-line no-unreachable\n }\n /**\n * Fully expand the given macro name and return the resulting list of\n * tokens, or return `undefined` if no such macro is defined.\n */\n\n\n expandMacro(name) {\n return this.macros.has(name) ? this.expandTokens([new Token(name)]) : undefined;\n }\n /**\n * Fully expand the given token stream and return the resulting list of\n * tokens. Note that the input tokens are in reverse order, but the\n * output tokens are in forward order.\n */\n\n\n expandTokens(tokens) {\n var output = [];\n var oldStackLength = this.stack.length;\n this.pushTokens(tokens);\n\n while (this.stack.length > oldStackLength) {\n // Expand only expandable tokens\n if (this.expandOnce(true) === false) {\n // fully expanded\n var token = this.stack.pop();\n\n if (token.treatAsRelax) {\n // the expansion of \\noexpand is the token itself\n token.noexpand = false;\n token.treatAsRelax = false;\n }\n\n output.push(token);\n }\n } // Count all of these tokens as additional expansions, to prevent\n // exponential blowup from linearly many \\edef's.\n\n\n this.countExpansion(output.length);\n return output;\n }\n /**\n * Fully expand the given macro name and return the result as a string,\n * or return `undefined` if no such macro is defined.\n */\n\n\n expandMacroAsText(name) {\n var tokens = this.expandMacro(name);\n\n if (tokens) {\n return tokens.map(token => token.text).join(\"\");\n } else {\n return tokens;\n }\n }\n /**\n * Returns the expanded macro as a reversed array of tokens and a macro\n * argument count. Or returns `null` if no such macro.\n */\n\n\n _getExpansion(name) {\n var definition = this.macros.get(name);\n\n if (definition == null) {\n // mainly checking for undefined here\n return definition;\n } // If a single character has an associated catcode other than 13\n // (active character), then don't expand it.\n\n\n if (name.length === 1) {\n var catcode = this.lexer.catcodes[name];\n\n if (catcode != null && catcode !== 13) {\n return;\n }\n }\n\n var expansion = typeof definition === \"function\" ? definition(this) : definition;\n\n if (typeof expansion === \"string\") {\n var numArgs = 0;\n\n if (expansion.indexOf(\"#\") !== -1) {\n var stripped = expansion.replace(/##/g, \"\");\n\n while (stripped.indexOf(\"#\" + (numArgs + 1)) !== -1) {\n ++numArgs;\n }\n }\n\n var bodyLexer = new Lexer(expansion, this.settings);\n var tokens = [];\n var tok = bodyLexer.lex();\n\n while (tok.text !== \"EOF\") {\n tokens.push(tok);\n tok = bodyLexer.lex();\n }\n\n tokens.reverse(); // to fit in with stack using push and pop\n\n var expanded = {\n tokens,\n numArgs\n };\n return expanded;\n }\n\n return expansion;\n }\n /**\n * Determine whether a command is currently \"defined\" (has some\n * functionality), meaning that it's a macro (in the current group),\n * a function, a symbol, or one of the special commands listed in\n * `implicitCommands`.\n */\n\n\n isDefined(name) {\n return this.macros.has(name) || functions.hasOwnProperty(name) || symbols.math.hasOwnProperty(name) || symbols.text.hasOwnProperty(name) || implicitCommands.hasOwnProperty(name);\n }\n /**\n * Determine whether a command is expandable.\n */\n\n\n isExpandable(name) {\n var macro = this.macros.get(name);\n return macro != null ? typeof macro === \"string\" || typeof macro === \"function\" || !macro.unexpandable : functions.hasOwnProperty(name) && !functions[name].primitive;\n }\n\n}\n\n// Helpers for Parser.js handling of Unicode (sub|super)script characters.\nvar unicodeSubRegEx = /^[\u208A\u208B\u208C\u208D\u208E\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1D62\u2C7C\u2096\u2097\u2098\u2099\u2092\u209A\u1D63\u209B\u209C\u1D64\u1D65\u2093\u1D66\u1D67\u1D68\u1D69\u1D6A]/;\nvar uSubsAndSups = Object.freeze({\n '\u208A': '+',\n '\u208B': '-',\n '\u208C': '=',\n '\u208D': '(',\n '\u208E': ')',\n '\u2080': '0',\n '\u2081': '1',\n '\u2082': '2',\n '\u2083': '3',\n '\u2084': '4',\n '\u2085': '5',\n '\u2086': '6',\n '\u2087': '7',\n '\u2088': '8',\n '\u2089': '9',\n '\\u2090': 'a',\n '\\u2091': 'e',\n '\\u2095': 'h',\n '\\u1D62': 'i',\n '\\u2C7C': 'j',\n '\\u2096': 'k',\n '\\u2097': 'l',\n '\\u2098': 'm',\n '\\u2099': 'n',\n '\\u2092': 'o',\n '\\u209A': 'p',\n '\\u1D63': 'r',\n '\\u209B': 's',\n '\\u209C': 't',\n '\\u1D64': 'u',\n '\\u1D65': 'v',\n '\\u2093': 'x',\n '\\u1D66': '\u03B2',\n '\\u1D67': '\u03B3',\n '\\u1D68': '\u03C1',\n '\\u1D69': '\\u03d5',\n '\\u1D6A': '\u03C7',\n '\u207A': '+',\n '\u207B': '-',\n '\u207C': '=',\n '\u207D': '(',\n '\u207E': ')',\n '\u2070': '0',\n '\u00B9': '1',\n '\u00B2': '2',\n '\u00B3': '3',\n '\u2074': '4',\n '\u2075': '5',\n '\u2076': '6',\n '\u2077': '7',\n '\u2078': '8',\n '\u2079': '9',\n '\\u1D2C': 'A',\n '\\u1D2E': 'B',\n '\\u1D30': 'D',\n '\\u1D31': 'E',\n '\\u1D33': 'G',\n '\\u1D34': 'H',\n '\\u1D35': 'I',\n '\\u1D36': 'J',\n '\\u1D37': 'K',\n '\\u1D38': 'L',\n '\\u1D39': 'M',\n '\\u1D3A': 'N',\n '\\u1D3C': 'O',\n '\\u1D3E': 'P',\n '\\u1D3F': 'R',\n '\\u1D40': 'T',\n '\\u1D41': 'U',\n '\\u2C7D': 'V',\n '\\u1D42': 'W',\n '\\u1D43': 'a',\n '\\u1D47': 'b',\n '\\u1D9C': 'c',\n '\\u1D48': 'd',\n '\\u1D49': 'e',\n '\\u1DA0': 'f',\n '\\u1D4D': 'g',\n '\\u02B0': 'h',\n '\\u2071': 'i',\n '\\u02B2': 'j',\n '\\u1D4F': 'k',\n '\\u02E1': 'l',\n '\\u1D50': 'm',\n '\\u207F': 'n',\n '\\u1D52': 'o',\n '\\u1D56': 'p',\n '\\u02B3': 'r',\n '\\u02E2': 's',\n '\\u1D57': 't',\n '\\u1D58': 'u',\n '\\u1D5B': 'v',\n '\\u02B7': 'w',\n '\\u02E3': 'x',\n '\\u02B8': 'y',\n '\\u1DBB': 'z',\n '\\u1D5D': '\u03B2',\n '\\u1D5E': '\u03B3',\n '\\u1D5F': '\u03B4',\n '\\u1D60': '\\u03d5',\n '\\u1D61': '\u03C7',\n '\\u1DBF': '\u03B8'\n});\n\n/* eslint no-constant-condition:0 */\n\nvar unicodeAccents = {\n \"\u0301\": {\n \"text\": \"\\\\'\",\n \"math\": \"\\\\acute\"\n },\n \"\u0300\": {\n \"text\": \"\\\\`\",\n \"math\": \"\\\\grave\"\n },\n \"\u0308\": {\n \"text\": \"\\\\\\\"\",\n \"math\": \"\\\\ddot\"\n },\n \"\u0303\": {\n \"text\": \"\\\\~\",\n \"math\": \"\\\\tilde\"\n },\n \"\u0304\": {\n \"text\": \"\\\\=\",\n \"math\": \"\\\\bar\"\n },\n \"\u0306\": {\n \"text\": \"\\\\u\",\n \"math\": \"\\\\breve\"\n },\n \"\u030C\": {\n \"text\": \"\\\\v\",\n \"math\": \"\\\\check\"\n },\n \"\u0302\": {\n \"text\": \"\\\\^\",\n \"math\": \"\\\\hat\"\n },\n \"\u0307\": {\n \"text\": \"\\\\.\",\n \"math\": \"\\\\dot\"\n },\n \"\u030A\": {\n \"text\": \"\\\\r\",\n \"math\": \"\\\\mathring\"\n },\n \"\u030B\": {\n \"text\": \"\\\\H\"\n },\n \"\u0327\": {\n \"text\": \"\\\\c\"\n }\n};\nvar unicodeSymbols = {\n \"\u00E1\": \"a\u0301\",\n \"\u00E0\": \"a\u0300\",\n \"\u00E4\": \"a\u0308\",\n \"\u01DF\": \"a\u0308\u0304\",\n \"\u00E3\": \"a\u0303\",\n \"\u0101\": \"a\u0304\",\n \"\u0103\": \"a\u0306\",\n \"\u1EAF\": \"a\u0306\u0301\",\n \"\u1EB1\": \"a\u0306\u0300\",\n \"\u1EB5\": \"a\u0306\u0303\",\n \"\u01CE\": \"a\u030C\",\n \"\u00E2\": \"a\u0302\",\n \"\u1EA5\": \"a\u0302\u0301\",\n \"\u1EA7\": \"a\u0302\u0300\",\n \"\u1EAB\": \"a\u0302\u0303\",\n \"\u0227\": \"a\u0307\",\n \"\u01E1\": \"a\u0307\u0304\",\n \"\u00E5\": \"a\u030A\",\n \"\u01FB\": \"a\u030A\u0301\",\n \"\u1E03\": \"b\u0307\",\n \"\u0107\": \"c\u0301\",\n \"\u1E09\": \"c\u0327\u0301\",\n \"\u010D\": \"c\u030C\",\n \"\u0109\": \"c\u0302\",\n \"\u010B\": \"c\u0307\",\n \"\u00E7\": \"c\u0327\",\n \"\u010F\": \"d\u030C\",\n \"\u1E0B\": \"d\u0307\",\n \"\u1E11\": \"d\u0327\",\n \"\u00E9\": \"e\u0301\",\n \"\u00E8\": \"e\u0300\",\n \"\u00EB\": \"e\u0308\",\n \"\u1EBD\": \"e\u0303\",\n \"\u0113\": \"e\u0304\",\n \"\u1E17\": \"e\u0304\u0301\",\n \"\u1E15\": \"e\u0304\u0300\",\n \"\u0115\": \"e\u0306\",\n \"\u1E1D\": \"e\u0327\u0306\",\n \"\u011B\": \"e\u030C\",\n \"\u00EA\": \"e\u0302\",\n \"\u1EBF\": \"e\u0302\u0301\",\n \"\u1EC1\": \"e\u0302\u0300\",\n \"\u1EC5\": \"e\u0302\u0303\",\n \"\u0117\": \"e\u0307\",\n \"\u0229\": \"e\u0327\",\n \"\u1E1F\": \"f\u0307\",\n \"\u01F5\": \"g\u0301\",\n \"\u1E21\": \"g\u0304\",\n \"\u011F\": \"g\u0306\",\n \"\u01E7\": \"g\u030C\",\n \"\u011D\": \"g\u0302\",\n \"\u0121\": \"g\u0307\",\n \"\u0123\": \"g\u0327\",\n \"\u1E27\": \"h\u0308\",\n \"\u021F\": \"h\u030C\",\n \"\u0125\": \"h\u0302\",\n \"\u1E23\": \"h\u0307\",\n \"\u1E29\": \"h\u0327\",\n \"\u00ED\": \"i\u0301\",\n \"\u00EC\": \"i\u0300\",\n \"\u00EF\": \"i\u0308\",\n \"\u1E2F\": \"i\u0308\u0301\",\n \"\u0129\": \"i\u0303\",\n \"\u012B\": \"i\u0304\",\n \"\u012D\": \"i\u0306\",\n \"\u01D0\": \"i\u030C\",\n \"\u00EE\": \"i\u0302\",\n \"\u01F0\": \"j\u030C\",\n \"\u0135\": \"j\u0302\",\n \"\u1E31\": \"k\u0301\",\n \"\u01E9\": \"k\u030C\",\n \"\u0137\": \"k\u0327\",\n \"\u013A\": \"l\u0301\",\n \"\u013E\": \"l\u030C\",\n \"\u013C\": \"l\u0327\",\n \"\u1E3F\": \"m\u0301\",\n \"\u1E41\": \"m\u0307\",\n \"\u0144\": \"n\u0301\",\n \"\u01F9\": \"n\u0300\",\n \"\u00F1\": \"n\u0303\",\n \"\u0148\": \"n\u030C\",\n \"\u1E45\": \"n\u0307\",\n \"\u0146\": \"n\u0327\",\n \"\u00F3\": \"o\u0301\",\n \"\u00F2\": \"o\u0300\",\n \"\u00F6\": \"o\u0308\",\n \"\u022B\": \"o\u0308\u0304\",\n \"\u00F5\": \"o\u0303\",\n \"\u1E4D\": \"o\u0303\u0301\",\n \"\u1E4F\": \"o\u0303\u0308\",\n \"\u022D\": \"o\u0303\u0304\",\n \"\u014D\": \"o\u0304\",\n \"\u1E53\": \"o\u0304\u0301\",\n \"\u1E51\": \"o\u0304\u0300\",\n \"\u014F\": \"o\u0306\",\n \"\u01D2\": \"o\u030C\",\n \"\u00F4\": \"o\u0302\",\n \"\u1ED1\": \"o\u0302\u0301\",\n \"\u1ED3\": \"o\u0302\u0300\",\n \"\u1ED7\": \"o\u0302\u0303\",\n \"\u022F\": \"o\u0307\",\n \"\u0231\": \"o\u0307\u0304\",\n \"\u0151\": \"o\u030B\",\n \"\u1E55\": \"p\u0301\",\n \"\u1E57\": \"p\u0307\",\n \"\u0155\": \"r\u0301\",\n \"\u0159\": \"r\u030C\",\n \"\u1E59\": \"r\u0307\",\n \"\u0157\": \"r\u0327\",\n \"\u015B\": \"s\u0301\",\n \"\u1E65\": \"s\u0301\u0307\",\n \"\u0161\": \"s\u030C\",\n \"\u1E67\": \"s\u030C\u0307\",\n \"\u015D\": \"s\u0302\",\n \"\u1E61\": \"s\u0307\",\n \"\u015F\": \"s\u0327\",\n \"\u1E97\": \"t\u0308\",\n \"\u0165\": \"t\u030C\",\n \"\u1E6B\": \"t\u0307\",\n \"\u0163\": \"t\u0327\",\n \"\u00FA\": \"u\u0301\",\n \"\u00F9\": \"u\u0300\",\n \"\u00FC\": \"u\u0308\",\n \"\u01D8\": \"u\u0308\u0301\",\n \"\u01DC\": \"u\u0308\u0300\",\n \"\u01D6\": \"u\u0308\u0304\",\n \"\u01DA\": \"u\u0308\u030C\",\n \"\u0169\": \"u\u0303\",\n \"\u1E79\": \"u\u0303\u0301\",\n \"\u016B\": \"u\u0304\",\n \"\u1E7B\": \"u\u0304\u0308\",\n \"\u016D\": \"u\u0306\",\n \"\u01D4\": \"u\u030C\",\n \"\u00FB\": \"u\u0302\",\n \"\u016F\": \"u\u030A\",\n \"\u0171\": \"u\u030B\",\n \"\u1E7D\": \"v\u0303\",\n \"\u1E83\": \"w\u0301\",\n \"\u1E81\": \"w\u0300\",\n \"\u1E85\": \"w\u0308\",\n \"\u0175\": \"w\u0302\",\n \"\u1E87\": \"w\u0307\",\n \"\u1E98\": \"w\u030A\",\n \"\u1E8D\": \"x\u0308\",\n \"\u1E8B\": \"x\u0307\",\n \"\u00FD\": \"y\u0301\",\n \"\u1EF3\": \"y\u0300\",\n \"\u00FF\": \"y\u0308\",\n \"\u1EF9\": \"y\u0303\",\n \"\u0233\": \"y\u0304\",\n \"\u0177\": \"y\u0302\",\n \"\u1E8F\": \"y\u0307\",\n \"\u1E99\": \"y\u030A\",\n \"\u017A\": \"z\u0301\",\n \"\u017E\": \"z\u030C\",\n \"\u1E91\": \"z\u0302\",\n \"\u017C\": \"z\u0307\",\n \"\u00C1\": \"A\u0301\",\n \"\u00C0\": \"A\u0300\",\n \"\u00C4\": \"A\u0308\",\n \"\u01DE\": \"A\u0308\u0304\",\n \"\u00C3\": \"A\u0303\",\n \"\u0100\": \"A\u0304\",\n \"\u0102\": \"A\u0306\",\n \"\u1EAE\": \"A\u0306\u0301\",\n \"\u1EB0\": \"A\u0306\u0300\",\n \"\u1EB4\": \"A\u0306\u0303\",\n \"\u01CD\": \"A\u030C\",\n \"\u00C2\": \"A\u0302\",\n \"\u1EA4\": \"A\u0302\u0301\",\n \"\u1EA6\": \"A\u0302\u0300\",\n \"\u1EAA\": \"A\u0302\u0303\",\n \"\u0226\": \"A\u0307\",\n \"\u01E0\": \"A\u0307\u0304\",\n \"\u00C5\": \"A\u030A\",\n \"\u01FA\": \"A\u030A\u0301\",\n \"\u1E02\": \"B\u0307\",\n \"\u0106\": \"C\u0301\",\n \"\u1E08\": \"C\u0327\u0301\",\n \"\u010C\": \"C\u030C\",\n \"\u0108\": \"C\u0302\",\n \"\u010A\": \"C\u0307\",\n \"\u00C7\": \"C\u0327\",\n \"\u010E\": \"D\u030C\",\n \"\u1E0A\": \"D\u0307\",\n \"\u1E10\": \"D\u0327\",\n \"\u00C9\": \"E\u0301\",\n \"\u00C8\": \"E\u0300\",\n \"\u00CB\": \"E\u0308\",\n \"\u1EBC\": \"E\u0303\",\n \"\u0112\": \"E\u0304\",\n \"\u1E16\": \"E\u0304\u0301\",\n \"\u1E14\": \"E\u0304\u0300\",\n \"\u0114\": \"E\u0306\",\n \"\u1E1C\": \"E\u0327\u0306\",\n \"\u011A\": \"E\u030C\",\n \"\u00CA\": \"E\u0302\",\n \"\u1EBE\": \"E\u0302\u0301\",\n \"\u1EC0\": \"E\u0302\u0300\",\n \"\u1EC4\": \"E\u0302\u0303\",\n \"\u0116\": \"E\u0307\",\n \"\u0228\": \"E\u0327\",\n \"\u1E1E\": \"F\u0307\",\n \"\u01F4\": \"G\u0301\",\n \"\u1E20\": \"G\u0304\",\n \"\u011E\": \"G\u0306\",\n \"\u01E6\": \"G\u030C\",\n \"\u011C\": \"G\u0302\",\n \"\u0120\": \"G\u0307\",\n \"\u0122\": \"G\u0327\",\n \"\u1E26\": \"H\u0308\",\n \"\u021E\": \"H\u030C\",\n \"\u0124\": \"H\u0302\",\n \"\u1E22\": \"H\u0307\",\n \"\u1E28\": \"H\u0327\",\n \"\u00CD\": \"I\u0301\",\n \"\u00CC\": \"I\u0300\",\n \"\u00CF\": \"I\u0308\",\n \"\u1E2E\": \"I\u0308\u0301\",\n \"\u0128\": \"I\u0303\",\n \"\u012A\": \"I\u0304\",\n \"\u012C\": \"I\u0306\",\n \"\u01CF\": \"I\u030C\",\n \"\u00CE\": \"I\u0302\",\n \"\u0130\": \"I\u0307\",\n \"\u0134\": \"J\u0302\",\n \"\u1E30\": \"K\u0301\",\n \"\u01E8\": \"K\u030C\",\n \"\u0136\": \"K\u0327\",\n \"\u0139\": \"L\u0301\",\n \"\u013D\": \"L\u030C\",\n \"\u013B\": \"L\u0327\",\n \"\u1E3E\": \"M\u0301\",\n \"\u1E40\": \"M\u0307\",\n \"\u0143\": \"N\u0301\",\n \"\u01F8\": \"N\u0300\",\n \"\u00D1\": \"N\u0303\",\n \"\u0147\": \"N\u030C\",\n \"\u1E44\": \"N\u0307\",\n \"\u0145\": \"N\u0327\",\n \"\u00D3\": \"O\u0301\",\n \"\u00D2\": \"O\u0300\",\n \"\u00D6\": \"O\u0308\",\n \"\u022A\": \"O\u0308\u0304\",\n \"\u00D5\": \"O\u0303\",\n \"\u1E4C\": \"O\u0303\u0301\",\n \"\u1E4E\": \"O\u0303\u0308\",\n \"\u022C\": \"O\u0303\u0304\",\n \"\u014C\": \"O\u0304\",\n \"\u1E52\": \"O\u0304\u0301\",\n \"\u1E50\": \"O\u0304\u0300\",\n \"\u014E\": \"O\u0306\",\n \"\u01D1\": \"O\u030C\",\n \"\u00D4\": \"O\u0302\",\n \"\u1ED0\": \"O\u0302\u0301\",\n \"\u1ED2\": \"O\u0302\u0300\",\n \"\u1ED6\": \"O\u0302\u0303\",\n \"\u022E\": \"O\u0307\",\n \"\u0230\": \"O\u0307\u0304\",\n \"\u0150\": \"O\u030B\",\n \"\u1E54\": \"P\u0301\",\n \"\u1E56\": \"P\u0307\",\n \"\u0154\": \"R\u0301\",\n \"\u0158\": \"R\u030C\",\n \"\u1E58\": \"R\u0307\",\n \"\u0156\": \"R\u0327\",\n \"\u015A\": \"S\u0301\",\n \"\u1E64\": \"S\u0301\u0307\",\n \"\u0160\": \"S\u030C\",\n \"\u1E66\": \"S\u030C\u0307\",\n \"\u015C\": \"S\u0302\",\n \"\u1E60\": \"S\u0307\",\n \"\u015E\": \"S\u0327\",\n \"\u0164\": \"T\u030C\",\n \"\u1E6A\": \"T\u0307\",\n \"\u0162\": \"T\u0327\",\n \"\u00DA\": \"U\u0301\",\n \"\u00D9\": \"U\u0300\",\n \"\u00DC\": \"U\u0308\",\n \"\u01D7\": \"U\u0308\u0301\",\n \"\u01DB\": \"U\u0308\u0300\",\n \"\u01D5\": \"U\u0308\u0304\",\n \"\u01D9\": \"U\u0308\u030C\",\n \"\u0168\": \"U\u0303\",\n \"\u1E78\": \"U\u0303\u0301\",\n \"\u016A\": \"U\u0304\",\n \"\u1E7A\": \"U\u0304\u0308\",\n \"\u016C\": \"U\u0306\",\n \"\u01D3\": \"U\u030C\",\n \"\u00DB\": \"U\u0302\",\n \"\u016E\": \"U\u030A\",\n \"\u0170\": \"U\u030B\",\n \"\u1E7C\": \"V\u0303\",\n \"\u1E82\": \"W\u0301\",\n \"\u1E80\": \"W\u0300\",\n \"\u1E84\": \"W\u0308\",\n \"\u0174\": \"W\u0302\",\n \"\u1E86\": \"W\u0307\",\n \"\u1E8C\": \"X\u0308\",\n \"\u1E8A\": \"X\u0307\",\n \"\u00DD\": \"Y\u0301\",\n \"\u1EF2\": \"Y\u0300\",\n \"\u0178\": \"Y\u0308\",\n \"\u1EF8\": \"Y\u0303\",\n \"\u0232\": \"Y\u0304\",\n \"\u0176\": \"Y\u0302\",\n \"\u1E8E\": \"Y\u0307\",\n \"\u0179\": \"Z\u0301\",\n \"\u017D\": \"Z\u030C\",\n \"\u1E90\": \"Z\u0302\",\n \"\u017B\": \"Z\u0307\",\n \"\u03AC\": \"\u03B1\u0301\",\n \"\u1F70\": \"\u03B1\u0300\",\n \"\u1FB1\": \"\u03B1\u0304\",\n \"\u1FB0\": \"\u03B1\u0306\",\n \"\u03AD\": \"\u03B5\u0301\",\n \"\u1F72\": \"\u03B5\u0300\",\n \"\u03AE\": \"\u03B7\u0301\",\n \"\u1F74\": \"\u03B7\u0300\",\n \"\u03AF\": \"\u03B9\u0301\",\n \"\u1F76\": \"\u03B9\u0300\",\n \"\u03CA\": \"\u03B9\u0308\",\n \"\u0390\": \"\u03B9\u0308\u0301\",\n \"\u1FD2\": \"\u03B9\u0308\u0300\",\n \"\u1FD1\": \"\u03B9\u0304\",\n \"\u1FD0\": \"\u03B9\u0306\",\n \"\u03CC\": \"\u03BF\u0301\",\n \"\u1F78\": \"\u03BF\u0300\",\n \"\u03CD\": \"\u03C5\u0301\",\n \"\u1F7A\": \"\u03C5\u0300\",\n \"\u03CB\": \"\u03C5\u0308\",\n \"\u03B0\": \"\u03C5\u0308\u0301\",\n \"\u1FE2\": \"\u03C5\u0308\u0300\",\n \"\u1FE1\": \"\u03C5\u0304\",\n \"\u1FE0\": \"\u03C5\u0306\",\n \"\u03CE\": \"\u03C9\u0301\",\n \"\u1F7C\": \"\u03C9\u0300\",\n \"\u038E\": \"\u03A5\u0301\",\n \"\u1FEA\": \"\u03A5\u0300\",\n \"\u03AB\": \"\u03A5\u0308\",\n \"\u1FE9\": \"\u03A5\u0304\",\n \"\u1FE8\": \"\u03A5\u0306\",\n \"\u038F\": \"\u03A9\u0301\",\n \"\u1FFA\": \"\u03A9\u0300\"\n};\n\n/**\n * This file contains the parser used to parse out a TeX expression from the\n * input. Since TeX isn't context-free, standard parsers don't work particularly\n * well.\n *\n * The strategy of this parser is as such:\n *\n * The main functions (the `.parse...` ones) take a position in the current\n * parse string to parse tokens from. The lexer (found in Lexer.js, stored at\n * this.gullet.lexer) also supports pulling out tokens at arbitrary places. When\n * individual tokens are needed at a position, the lexer is called to pull out a\n * token, which is then used.\n *\n * The parser has a property called \"mode\" indicating the mode that\n * the parser is currently in. Currently it has to be one of \"math\" or\n * \"text\", which denotes whether the current environment is a math-y\n * one or a text-y one (e.g. inside \\text). Currently, this serves to\n * limit the functions which can be used in text mode.\n *\n * The main functions then return an object which contains the useful data that\n * was parsed at its given point, and a new position at the end of the parsed\n * data. The main functions can call each other and continue the parsing by\n * using the returned position as a new starting point.\n *\n * There are also extra `.handle...` functions, which pull out some reused\n * functionality into self-contained functions.\n *\n * The functions return ParseNodes.\n */\nclass Parser {\n constructor(input, settings) {\n this.mode = void 0;\n this.gullet = void 0;\n this.settings = void 0;\n this.leftrightDepth = void 0;\n this.nextToken = void 0;\n // Start in math mode\n this.mode = \"math\"; // Create a new macro expander (gullet) and (indirectly via that) also a\n // new lexer (mouth) for this parser (stomach, in the language of TeX)\n\n this.gullet = new MacroExpander(input, settings, this.mode); // Store the settings for use in parsing\n\n this.settings = settings; // Count leftright depth (for \\middle errors)\n\n this.leftrightDepth = 0;\n }\n /**\n * Checks a result to make sure it has the right type, and throws an\n * appropriate error otherwise.\n */\n\n\n expect(text, consume) {\n if (consume === void 0) {\n consume = true;\n }\n\n if (this.fetch().text !== text) {\n throw new ParseError(\"Expected '\" + text + \"', got '\" + this.fetch().text + \"'\", this.fetch());\n }\n\n if (consume) {\n this.consume();\n }\n }\n /**\n * Discards the current lookahead token, considering it consumed.\n */\n\n\n consume() {\n this.nextToken = null;\n }\n /**\n * Return the current lookahead token, or if there isn't one (at the\n * beginning, or if the previous lookahead token was consume()d),\n * fetch the next token as the new lookahead token and return it.\n */\n\n\n fetch() {\n if (this.nextToken == null) {\n this.nextToken = this.gullet.expandNextToken();\n }\n\n return this.nextToken;\n }\n /**\n * Switches between \"text\" and \"math\" modes.\n */\n\n\n switchMode(newMode) {\n this.mode = newMode;\n this.gullet.switchMode(newMode);\n }\n /**\n * Main parsing function, which parses an entire input.\n */\n\n\n parse() {\n if (!this.settings.globalGroup) {\n // Create a group namespace for the math expression.\n // (LaTeX creates a new group for every $...$, $$...$$, \\[...\\].)\n this.gullet.beginGroup();\n } // Use old \\color behavior (same as LaTeX's \\textcolor) if requested.\n // We do this within the group for the math expression, so it doesn't\n // pollute settings.macros.\n\n\n if (this.settings.colorIsTextColor) {\n this.gullet.macros.set(\"\\\\color\", \"\\\\textcolor\");\n }\n\n try {\n // Try to parse the input\n var parse = this.parseExpression(false); // If we succeeded, make sure there's an EOF at the end\n\n this.expect(\"EOF\"); // End the group namespace for the expression\n\n if (!this.settings.globalGroup) {\n this.gullet.endGroup();\n }\n\n return parse; // Close any leftover groups in case of a parse error.\n } finally {\n this.gullet.endGroups();\n }\n }\n /**\n * Fully parse a separate sequence of tokens as a separate job.\n * Tokens should be specified in reverse order, as in a MacroDefinition.\n */\n\n\n subparse(tokens) {\n // Save the next token from the current job.\n var oldToken = this.nextToken;\n this.consume(); // Run the new job, terminating it with an excess '}'\n\n this.gullet.pushToken(new Token(\"}\"));\n this.gullet.pushTokens(tokens);\n var parse = this.parseExpression(false);\n this.expect(\"}\"); // Restore the next token from the current job.\n\n this.nextToken = oldToken;\n return parse;\n }\n\n /**\n * Parses an \"expression\", which is a list of atoms.\n *\n * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This\n * happens when functions have higher precedence han infix\n * nodes in implicit parses.\n *\n * `breakOnTokenText`: The text of the token that the expression should end\n * with, or `null` if something else should end the\n * expression.\n */\n parseExpression(breakOnInfix, breakOnTokenText) {\n var body = []; // Keep adding atoms to the body until we can't parse any more atoms (either\n // we reached the end, a }, or a \\right)\n\n while (true) {\n // Ignore spaces in math mode\n if (this.mode === \"math\") {\n this.consumeSpaces();\n }\n\n var lex = this.fetch();\n\n if (Parser.endOfExpression.indexOf(lex.text) !== -1) {\n break;\n }\n\n if (breakOnTokenText && lex.text === breakOnTokenText) {\n break;\n }\n\n if (breakOnInfix && functions[lex.text] && functions[lex.text].infix) {\n break;\n }\n\n var atom = this.parseAtom(breakOnTokenText);\n\n if (!atom) {\n break;\n } else if (atom.type === \"internal\") {\n continue;\n }\n\n body.push(atom);\n }\n\n if (this.mode === \"text\") {\n this.formLigatures(body);\n }\n\n return this.handleInfixNodes(body);\n }\n /**\n * Rewrites infix operators such as \\over with corresponding commands such\n * as \\frac.\n *\n * There can only be one infix operator per group. If there's more than one\n * then the expression is ambiguous. This can be resolved by adding {}.\n */\n\n\n handleInfixNodes(body) {\n var overIndex = -1;\n var funcName;\n\n for (var i = 0; i < body.length; i++) {\n if (body[i].type === \"infix\") {\n if (overIndex !== -1) {\n throw new ParseError(\"only one infix operator per group\", body[i].token);\n }\n\n overIndex = i;\n funcName = body[i].replaceWith;\n }\n }\n\n if (overIndex !== -1 && funcName) {\n var numerNode;\n var denomNode;\n var numerBody = body.slice(0, overIndex);\n var denomBody = body.slice(overIndex + 1);\n\n if (numerBody.length === 1 && numerBody[0].type === \"ordgroup\") {\n numerNode = numerBody[0];\n } else {\n numerNode = {\n type: \"ordgroup\",\n mode: this.mode,\n body: numerBody\n };\n }\n\n if (denomBody.length === 1 && denomBody[0].type === \"ordgroup\") {\n denomNode = denomBody[0];\n } else {\n denomNode = {\n type: \"ordgroup\",\n mode: this.mode,\n body: denomBody\n };\n }\n\n var node;\n\n if (funcName === \"\\\\\\\\abovefrac\") {\n node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);\n } else {\n node = this.callFunction(funcName, [numerNode, denomNode], []);\n }\n\n return [node];\n } else {\n return body;\n }\n }\n /**\n * Handle a subscript or superscript with nice errors.\n */\n\n\n handleSupSubscript(name // For error reporting.\n ) {\n var symbolToken = this.fetch();\n var symbol = symbolToken.text;\n this.consume();\n this.consumeSpaces(); // ignore spaces before sup/subscript argument\n\n var group = this.parseGroup(name);\n\n if (!group) {\n throw new ParseError(\"Expected group after '\" + symbol + \"'\", symbolToken);\n }\n\n return group;\n }\n /**\n * Converts the textual input of an unsupported command into a text node\n * contained within a color node whose color is determined by errorColor\n */\n\n\n formatUnsupportedCmd(text) {\n var textordArray = [];\n\n for (var i = 0; i < text.length; i++) {\n textordArray.push({\n type: \"textord\",\n mode: \"text\",\n text: text[i]\n });\n }\n\n var textNode = {\n type: \"text\",\n mode: this.mode,\n body: textordArray\n };\n var colorNode = {\n type: \"color\",\n mode: this.mode,\n color: this.settings.errorColor,\n body: [textNode]\n };\n return colorNode;\n }\n /**\n * Parses a group with optional super/subscripts.\n */\n\n\n parseAtom(breakOnTokenText) {\n // The body of an atom is an implicit group, so that things like\n // \\left(x\\right)^2 work correctly.\n var base = this.parseGroup(\"atom\", breakOnTokenText); // In text mode, we don't have superscripts or subscripts\n\n if (this.mode === \"text\") {\n return base;\n } // Note that base may be empty (i.e. null) at this point.\n\n\n var superscript;\n var subscript;\n\n while (true) {\n // Guaranteed in math mode, so eat any spaces first.\n this.consumeSpaces(); // Lex the first token\n\n var lex = this.fetch();\n\n if (lex.text === \"\\\\limits\" || lex.text === \"\\\\nolimits\") {\n // We got a limit control\n if (base && base.type === \"op\") {\n var limits = lex.text === \"\\\\limits\";\n base.limits = limits;\n base.alwaysHandleSupSub = true;\n } else if (base && base.type === \"operatorname\") {\n if (base.alwaysHandleSupSub) {\n base.limits = lex.text === \"\\\\limits\";\n }\n } else {\n throw new ParseError(\"Limit controls must follow a math operator\", lex);\n }\n\n this.consume();\n } else if (lex.text === \"^\") {\n // We got a superscript start\n if (superscript) {\n throw new ParseError(\"Double superscript\", lex);\n }\n\n superscript = this.handleSupSubscript(\"superscript\");\n } else if (lex.text === \"_\") {\n // We got a subscript start\n if (subscript) {\n throw new ParseError(\"Double subscript\", lex);\n }\n\n subscript = this.handleSupSubscript(\"subscript\");\n } else if (lex.text === \"'\") {\n // We got a prime\n if (superscript) {\n throw new ParseError(\"Double superscript\", lex);\n }\n\n var prime = {\n type: \"textord\",\n mode: this.mode,\n text: \"\\\\prime\"\n }; // Many primes can be grouped together, so we handle this here\n\n var primes = [prime];\n this.consume(); // Keep lexing tokens until we get something that's not a prime\n\n while (this.fetch().text === \"'\") {\n // For each one, add another prime to the list\n primes.push(prime);\n this.consume();\n } // If there's a superscript following the primes, combine that\n // superscript in with the primes.\n\n\n if (this.fetch().text === \"^\") {\n primes.push(this.handleSupSubscript(\"superscript\"));\n } // Put everything into an ordgroup as the superscript\n\n\n superscript = {\n type: \"ordgroup\",\n mode: this.mode,\n body: primes\n };\n } else if (uSubsAndSups[lex.text]) {\n // A Unicode subscript or superscript character.\n // We treat these similarly to the unicode-math package.\n // So we render a string of Unicode (sub|super)scripts the\n // same as a (sub|super)script of regular characters.\n var isSub = unicodeSubRegEx.test(lex.text);\n var subsupTokens = [];\n subsupTokens.push(new Token(uSubsAndSups[lex.text]));\n this.consume(); // Continue fetching tokens to fill out the string.\n\n while (true) {\n var token = this.fetch().text;\n\n if (!uSubsAndSups[token]) {\n break;\n }\n\n if (unicodeSubRegEx.test(token) !== isSub) {\n break;\n }\n\n subsupTokens.unshift(new Token(uSubsAndSups[token]));\n this.consume();\n } // Now create a (sub|super)script.\n\n\n var body = this.subparse(subsupTokens);\n\n if (isSub) {\n subscript = {\n type: \"ordgroup\",\n mode: \"math\",\n body\n };\n } else {\n superscript = {\n type: \"ordgroup\",\n mode: \"math\",\n body\n };\n }\n } else {\n // If it wasn't ^, _, or ', stop parsing super/subscripts\n break;\n }\n } // Base must be set if superscript or subscript are set per logic above,\n // but need to check here for type check to pass.\n\n\n if (superscript || subscript) {\n // If we got either a superscript or subscript, create a supsub\n return {\n type: \"supsub\",\n mode: this.mode,\n base: base,\n sup: superscript,\n sub: subscript\n };\n } else {\n // Otherwise return the original body\n return base;\n }\n }\n /**\n * Parses an entire function, including its base and all of its arguments.\n */\n\n\n parseFunction(breakOnTokenText, name // For determining its context\n ) {\n var token = this.fetch();\n var func = token.text;\n var funcData = functions[func];\n\n if (!funcData) {\n return null;\n }\n\n this.consume(); // consume command token\n\n if (name && name !== \"atom\" && !funcData.allowedInArgument) {\n throw new ParseError(\"Got function '\" + func + \"' with no arguments\" + (name ? \" as \" + name : \"\"), token);\n } else if (this.mode === \"text\" && !funcData.allowedInText) {\n throw new ParseError(\"Can't use function '\" + func + \"' in text mode\", token);\n } else if (this.mode === \"math\" && funcData.allowedInMath === false) {\n throw new ParseError(\"Can't use function '\" + func + \"' in math mode\", token);\n }\n\n var {\n args,\n optArgs\n } = this.parseArguments(func, funcData);\n return this.callFunction(func, args, optArgs, token, breakOnTokenText);\n }\n /**\n * Call a function handler with a suitable context and arguments.\n */\n\n\n callFunction(name, args, optArgs, token, breakOnTokenText) {\n var context = {\n funcName: name,\n parser: this,\n token,\n breakOnTokenText\n };\n var func = functions[name];\n\n if (func && func.handler) {\n return func.handler(context, args, optArgs);\n } else {\n throw new ParseError(\"No function handler for \" + name);\n }\n }\n /**\n * Parses the arguments of a function or environment\n */\n\n\n parseArguments(func, // Should look like \"\\name\" or \"\\begin{name}\".\n funcData) {\n var totalArgs = funcData.numArgs + funcData.numOptionalArgs;\n\n if (totalArgs === 0) {\n return {\n args: [],\n optArgs: []\n };\n }\n\n var args = [];\n var optArgs = [];\n\n for (var i = 0; i < totalArgs; i++) {\n var argType = funcData.argTypes && funcData.argTypes[i];\n var isOptional = i < funcData.numOptionalArgs;\n\n if (funcData.primitive && argType == null || // \\sqrt expands into primitive if optional argument doesn't exist\n funcData.type === \"sqrt\" && i === 1 && optArgs[0] == null) {\n argType = \"primitive\";\n }\n\n var arg = this.parseGroupOfType(\"argument to '\" + func + \"'\", argType, isOptional);\n\n if (isOptional) {\n optArgs.push(arg);\n } else if (arg != null) {\n args.push(arg);\n } else {\n // should be unreachable\n throw new ParseError(\"Null argument, please report this as a bug\");\n }\n }\n\n return {\n args,\n optArgs\n };\n }\n /**\n * Parses a group when the mode is changing.\n */\n\n\n parseGroupOfType(name, type, optional) {\n switch (type) {\n case \"color\":\n return this.parseColorGroup(optional);\n\n case \"size\":\n return this.parseSizeGroup(optional);\n\n case \"url\":\n return this.parseUrlGroup(optional);\n\n case \"math\":\n case \"text\":\n return this.parseArgumentGroup(optional, type);\n\n case \"hbox\":\n {\n // hbox argument type wraps the argument in the equivalent of\n // \\hbox, which is like \\text but switching to \\textstyle size.\n var group = this.parseArgumentGroup(optional, \"text\");\n return group != null ? {\n type: \"styling\",\n mode: group.mode,\n body: [group],\n style: \"text\" // simulate \\textstyle\n\n } : null;\n }\n\n case \"raw\":\n {\n var token = this.parseStringGroup(\"raw\", optional);\n return token != null ? {\n type: \"raw\",\n mode: \"text\",\n string: token.text\n } : null;\n }\n\n case \"primitive\":\n {\n if (optional) {\n throw new ParseError(\"A primitive argument cannot be optional\");\n }\n\n var _group = this.parseGroup(name);\n\n if (_group == null) {\n throw new ParseError(\"Expected group as \" + name, this.fetch());\n }\n\n return _group;\n }\n\n case \"original\":\n case null:\n case undefined:\n return this.parseArgumentGroup(optional);\n\n default:\n throw new ParseError(\"Unknown group type as \" + name, this.fetch());\n }\n }\n /**\n * Discard any space tokens, fetching the next non-space token.\n */\n\n\n consumeSpaces() {\n while (this.fetch().text === \" \") {\n this.consume();\n }\n }\n /**\n * Parses a group, essentially returning the string formed by the\n * brace-enclosed tokens plus some position information.\n */\n\n\n parseStringGroup(modeName, // Used to describe the mode in error messages.\n optional) {\n var argToken = this.gullet.scanArgument(optional);\n\n if (argToken == null) {\n return null;\n }\n\n var str = \"\";\n var nextToken;\n\n while ((nextToken = this.fetch()).text !== \"EOF\") {\n str += nextToken.text;\n this.consume();\n }\n\n this.consume(); // consume the end of the argument\n\n argToken.text = str;\n return argToken;\n }\n /**\n * Parses a regex-delimited group: the largest sequence of tokens\n * whose concatenated strings match `regex`. Returns the string\n * formed by the tokens plus some position information.\n */\n\n\n parseRegexGroup(regex, modeName // Used to describe the mode in error messages.\n ) {\n var firstToken = this.fetch();\n var lastToken = firstToken;\n var str = \"\";\n var nextToken;\n\n while ((nextToken = this.fetch()).text !== \"EOF\" && regex.test(str + nextToken.text)) {\n lastToken = nextToken;\n str += lastToken.text;\n this.consume();\n }\n\n if (str === \"\") {\n throw new ParseError(\"Invalid \" + modeName + \": '\" + firstToken.text + \"'\", firstToken);\n }\n\n return firstToken.range(lastToken, str);\n }\n /**\n * Parses a color description.\n */\n\n\n parseColorGroup(optional) {\n var res = this.parseStringGroup(\"color\", optional);\n\n if (res == null) {\n return null;\n }\n\n var match = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);\n\n if (!match) {\n throw new ParseError(\"Invalid color: '\" + res.text + \"'\", res);\n }\n\n var color = match[0];\n\n if (/^[0-9a-f]{6}$/i.test(color)) {\n // We allow a 6-digit HTML color spec without a leading \"#\".\n // This follows the xcolor package's HTML color model.\n // Predefined color names are all missed by this RegEx pattern.\n color = \"#\" + color;\n }\n\n return {\n type: \"color-token\",\n mode: this.mode,\n color\n };\n }\n /**\n * Parses a size specification, consisting of magnitude and unit.\n */\n\n\n parseSizeGroup(optional) {\n var res;\n var isBlank = false; // don't expand before parseStringGroup\n\n this.gullet.consumeSpaces();\n\n if (!optional && this.gullet.future().text !== \"{\") {\n res = this.parseRegexGroup(/^[-+]? *(?:$|\\d+|\\d+\\.\\d*|\\.\\d*) *[a-z]{0,2} *$/, \"size\");\n } else {\n res = this.parseStringGroup(\"size\", optional);\n }\n\n if (!res) {\n return null;\n }\n\n if (!optional && res.text.length === 0) {\n // Because we've tested for what is !optional, this block won't\n // affect \\kern, \\hspace, etc. It will capture the mandatory arguments\n // to \\genfrac and \\above.\n res.text = \"0pt\"; // Enable \\above{}\n\n isBlank = true; // This is here specifically for \\genfrac\n }\n\n var match = /([-+]?) *(\\d+(?:\\.\\d*)?|\\.\\d+) *([a-z]{2})/.exec(res.text);\n\n if (!match) {\n throw new ParseError(\"Invalid size: '\" + res.text + \"'\", res);\n }\n\n var data = {\n number: +(match[1] + match[2]),\n // sign + magnitude, cast to number\n unit: match[3]\n };\n\n if (!validUnit(data)) {\n throw new ParseError(\"Invalid unit: '\" + data.unit + \"'\", res);\n }\n\n return {\n type: \"size\",\n mode: this.mode,\n value: data,\n isBlank\n };\n }\n /**\n * Parses an URL, checking escaped letters and allowed protocols,\n * and setting the catcode of % as an active character (as in \\hyperref).\n */\n\n\n parseUrlGroup(optional) {\n this.gullet.lexer.setCatcode(\"%\", 13); // active character\n\n this.gullet.lexer.setCatcode(\"~\", 12); // other character\n\n var res = this.parseStringGroup(\"url\", optional);\n this.gullet.lexer.setCatcode(\"%\", 14); // comment character\n\n this.gullet.lexer.setCatcode(\"~\", 13); // active character\n\n if (res == null) {\n return null;\n } // hyperref package allows backslashes alone in href, but doesn't\n // generate valid links in such cases; we interpret this as\n // \"undefined\" behaviour, and keep them as-is. Some browser will\n // replace backslashes with forward slashes.\n\n\n var url = res.text.replace(/\\\\([#$%&~_^{}])/g, '$1');\n return {\n type: \"url\",\n mode: this.mode,\n url\n };\n }\n /**\n * Parses an argument with the mode specified.\n */\n\n\n parseArgumentGroup(optional, mode) {\n var argToken = this.gullet.scanArgument(optional);\n\n if (argToken == null) {\n return null;\n }\n\n var outerMode = this.mode;\n\n if (mode) {\n // Switch to specified mode\n this.switchMode(mode);\n }\n\n this.gullet.beginGroup();\n var expression = this.parseExpression(false, \"EOF\"); // TODO: find an alternative way to denote the end\n\n this.expect(\"EOF\"); // expect the end of the argument\n\n this.gullet.endGroup();\n var result = {\n type: \"ordgroup\",\n mode: this.mode,\n loc: argToken.loc,\n body: expression\n };\n\n if (mode) {\n // Switch mode back\n this.switchMode(outerMode);\n }\n\n return result;\n }\n /**\n * Parses an ordinary group, which is either a single nucleus (like \"x\")\n * or an expression in braces (like \"{x+y}\") or an implicit group, a group\n * that starts at the current position, and ends right before a higher explicit\n * group ends, or at EOF.\n */\n\n\n parseGroup(name, // For error reporting.\n breakOnTokenText) {\n var firstToken = this.fetch();\n var text = firstToken.text;\n var result; // Try to parse an open brace or \\begingroup\n\n if (text === \"{\" || text === \"\\\\begingroup\") {\n this.consume();\n var groupEnd = text === \"{\" ? \"}\" : \"\\\\endgroup\";\n this.gullet.beginGroup(); // If we get a brace, parse an expression\n\n var expression = this.parseExpression(false, groupEnd);\n var lastToken = this.fetch();\n this.expect(groupEnd); // Check that we got a matching closing brace\n\n this.gullet.endGroup();\n result = {\n type: \"ordgroup\",\n mode: this.mode,\n loc: SourceLocation.range(firstToken, lastToken),\n body: expression,\n // A group formed by \\begingroup...\\endgroup is a semi-simple group\n // which doesn't affect spacing in math mode, i.e., is transparent.\n // https://tex.stackexchange.com/questions/1930/when-should-one-\n // use-begingroup-instead-of-bgroup\n semisimple: text === \"\\\\begingroup\" || undefined\n };\n } else {\n // If there exists a function with this name, parse the function.\n // Otherwise, just return a nucleus\n result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol();\n\n if (result == null && text[0] === \"\\\\\" && !implicitCommands.hasOwnProperty(text)) {\n if (this.settings.throwOnError) {\n throw new ParseError(\"Undefined control sequence: \" + text, firstToken);\n }\n\n result = this.formatUnsupportedCmd(text);\n this.consume();\n }\n }\n\n return result;\n }\n /**\n * Form ligature-like combinations of characters for text mode.\n * This includes inputs like \"--\", \"---\", \"``\" and \"''\".\n * The result will simply replace multiple textord nodes with a single\n * character in each value by a single textord node having multiple\n * characters in its value. The representation is still ASCII source.\n * The group will be modified in place.\n */\n\n\n formLigatures(group) {\n var n = group.length - 1;\n\n for (var i = 0; i < n; ++i) {\n var a = group[i]; // $FlowFixMe: Not every node type has a `text` property.\n\n var v = a.text;\n\n if (v === \"-\" && group[i + 1].text === \"-\") {\n if (i + 1 < n && group[i + 2].text === \"-\") {\n group.splice(i, 3, {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(a, group[i + 2]),\n text: \"---\"\n });\n n -= 2;\n } else {\n group.splice(i, 2, {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(a, group[i + 1]),\n text: \"--\"\n });\n n -= 1;\n }\n }\n\n if ((v === \"'\" || v === \"`\") && group[i + 1].text === v) {\n group.splice(i, 2, {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(a, group[i + 1]),\n text: v + v\n });\n n -= 1;\n }\n }\n }\n /**\n * Parse a single symbol out of the string. Here, we handle single character\n * symbols and special functions like \\verb.\n */\n\n\n parseSymbol() {\n var nucleus = this.fetch();\n var text = nucleus.text;\n\n if (/^\\\\verb[^a-zA-Z]/.test(text)) {\n this.consume();\n var arg = text.slice(5);\n var star = arg.charAt(0) === \"*\";\n\n if (star) {\n arg = arg.slice(1);\n } // Lexer's tokenRegex is constructed to always have matching\n // first/last characters.\n\n\n if (arg.length < 2 || arg.charAt(0) !== arg.slice(-1)) {\n throw new ParseError(\"\\\\verb assertion failed --\\n please report what input caused this bug\");\n }\n\n arg = arg.slice(1, -1); // remove first and last char\n\n return {\n type: \"verb\",\n mode: \"text\",\n body: arg,\n star\n };\n } // At this point, we should have a symbol, possibly with accents.\n // First expand any accented base symbol according to unicodeSymbols.\n\n\n if (unicodeSymbols.hasOwnProperty(text[0]) && !symbols[this.mode][text[0]]) {\n // This behavior is not strict (XeTeX-compatible) in math mode.\n if (this.settings.strict && this.mode === \"math\") {\n this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Accented Unicode text character \\\"\" + text[0] + \"\\\" used in \" + \"math mode\", nucleus);\n }\n\n text = unicodeSymbols[text[0]] + text.slice(1);\n } // Strip off any combining characters\n\n\n var match = combiningDiacriticalMarksEndRegex.exec(text);\n\n if (match) {\n text = text.substring(0, match.index);\n\n if (text === 'i') {\n text = '\\u0131'; // dotless i, in math and text mode\n } else if (text === 'j') {\n text = '\\u0237'; // dotless j, in math and text mode\n }\n } // Recognize base symbol\n\n\n var symbol;\n\n if (symbols[this.mode][text]) {\n if (this.settings.strict && this.mode === 'math' && extraLatin.indexOf(text) >= 0) {\n this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Latin-1/Unicode text character \\\"\" + text[0] + \"\\\" used in \" + \"math mode\", nucleus);\n }\n\n var group = symbols[this.mode][text].group;\n var loc = SourceLocation.range(nucleus);\n var s;\n\n if (ATOMS.hasOwnProperty(group)) {\n // $FlowFixMe\n var family = group;\n s = {\n type: \"atom\",\n mode: this.mode,\n family,\n loc,\n text\n };\n } else {\n // $FlowFixMe\n s = {\n type: group,\n mode: this.mode,\n loc,\n text\n };\n } // $FlowFixMe\n\n\n symbol = s;\n } else if (text.charCodeAt(0) >= 0x80) {\n // no symbol for e.g. ^\n if (this.settings.strict) {\n if (!supportedCodepoint(text.charCodeAt(0))) {\n this.settings.reportNonstrict(\"unknownSymbol\", \"Unrecognized Unicode character \\\"\" + text[0] + \"\\\"\" + (\" (\" + text.charCodeAt(0) + \")\"), nucleus);\n } else if (this.mode === \"math\") {\n this.settings.reportNonstrict(\"unicodeTextInMathMode\", \"Unicode text character \\\"\" + text[0] + \"\\\" used in math mode\", nucleus);\n }\n } // All nonmathematical Unicode characters are rendered as if they\n // are in text mode (wrapped in \\text) because that's what it\n // takes to render them in LaTeX. Setting `mode: this.mode` is\n // another natural choice (the user requested math mode), but\n // this makes it more difficult for getCharacterMetrics() to\n // distinguish Unicode characters without metrics and those for\n // which we want to simulate the letter M.\n\n\n symbol = {\n type: \"textord\",\n mode: \"text\",\n loc: SourceLocation.range(nucleus),\n text\n };\n } else {\n return null; // EOF, ^, _, {, }, etc.\n }\n\n this.consume(); // Transform combining characters into accents\n\n if (match) {\n for (var i = 0; i < match[0].length; i++) {\n var accent = match[0][i];\n\n if (!unicodeAccents[accent]) {\n throw new ParseError(\"Unknown accent ' \" + accent + \"'\", nucleus);\n }\n\n var command = unicodeAccents[accent][this.mode] || unicodeAccents[accent].text;\n\n if (!command) {\n throw new ParseError(\"Accent \" + accent + \" unsupported in \" + this.mode + \" mode\", nucleus);\n }\n\n symbol = {\n type: \"accent\",\n mode: this.mode,\n loc: SourceLocation.range(nucleus),\n label: command,\n isStretchy: false,\n isShifty: true,\n // $FlowFixMe\n base: symbol\n };\n }\n } // $FlowFixMe\n\n\n return symbol;\n }\n\n}\nParser.endOfExpression = [\"}\", \"\\\\endgroup\", \"\\\\end\", \"\\\\right\", \"&\"];\n\n/**\n * Provides a single function for parsing an expression using a Parser\n * TODO(emily): Remove this\n */\n\n/**\n * Parses an expression using a Parser, then returns the parsed result.\n */\nvar parseTree = function parseTree(toParse, settings) {\n if (!(typeof toParse === 'string' || toParse instanceof String)) {\n throw new TypeError('KaTeX can only parse string typed expression');\n }\n\n var parser = new Parser(toParse, settings); // Blank out any \\df@tag to avoid spurious \"Duplicate \\tag\" errors\n\n delete parser.gullet.macros.current[\"\\\\df@tag\"];\n var tree = parser.parse(); // Prevent a color definition from persisting between calls to katex.render().\n\n delete parser.gullet.macros.current[\"\\\\current@color\"];\n delete parser.gullet.macros.current[\"\\\\color\"]; // If the input used \\tag, it will set the \\df@tag macro to the tag.\n // In this case, we separately parse the tag and wrap the tree.\n\n if (parser.gullet.macros.get(\"\\\\df@tag\")) {\n if (!settings.displayMode) {\n throw new ParseError(\"\\\\tag works only in display equations\");\n }\n\n tree = [{\n type: \"tag\",\n mode: \"text\",\n body: tree,\n tag: parser.subparse([new Token(\"\\\\df@tag\")])\n }];\n }\n\n return tree;\n};\n\n/* eslint no-console:0 */\n\n/**\n * Parse and build an expression, and place that expression in the DOM node\n * given.\n */\nvar render = function render(expression, baseNode, options) {\n baseNode.textContent = \"\";\n var node = renderToDomTree(expression, options).toNode();\n baseNode.appendChild(node);\n}; // KaTeX's styles don't work properly in quirks mode. Print out an error, and\n// disable rendering.\n\n\nif (typeof document !== \"undefined\") {\n if (document.compatMode !== \"CSS1Compat\") {\n typeof console !== \"undefined\" && console.warn(\"Warning: KaTeX doesn't work in quirks mode. Make sure your \" + \"website has a suitable doctype.\");\n\n render = function render() {\n throw new ParseError(\"KaTeX doesn't work in quirks mode.\");\n };\n }\n}\n/**\n * Parse and build an expression, and return the markup for that.\n */\n\n\nvar renderToString = function renderToString(expression, options) {\n var markup = renderToDomTree(expression, options).toMarkup();\n return markup;\n};\n/**\n * Parse an expression and return the parse tree.\n */\n\n\nvar generateParseTree = function generateParseTree(expression, options) {\n var settings = new Settings(options);\n return parseTree(expression, settings);\n};\n/**\n * If the given error is a KaTeX ParseError and options.throwOnError is false,\n * renders the invalid LaTeX as a span with hover title giving the KaTeX\n * error message. Otherwise, simply throws the error.\n */\n\n\nvar renderError = function renderError(error, expression, options) {\n if (options.throwOnError || !(error instanceof ParseError)) {\n throw error;\n }\n\n var node = buildCommon.makeSpan([\"katex-error\"], [new SymbolNode(expression)]);\n node.setAttribute(\"title\", error.toString());\n node.setAttribute(\"style\", \"color:\" + options.errorColor);\n return node;\n};\n/**\n * Generates and returns the katex build tree. This is used for advanced\n * use cases (like rendering to custom output).\n */\n\n\nvar renderToDomTree = function renderToDomTree(expression, options) {\n var settings = new Settings(options);\n\n try {\n var tree = parseTree(expression, settings);\n return buildTree(tree, expression, settings);\n } catch (error) {\n return renderError(error, expression, settings);\n }\n};\n/**\n * Generates and returns the katex build tree, with just HTML (no MathML).\n * This is used for advanced use cases (like rendering to custom output).\n */\n\n\nvar renderToHTMLTree = function renderToHTMLTree(expression, options) {\n var settings = new Settings(options);\n\n try {\n var tree = parseTree(expression, settings);\n return buildHTMLTree(tree, expression, settings);\n } catch (error) {\n return renderError(error, expression, settings);\n }\n};\n\nvar katex = {\n /**\n * Current KaTeX version\n */\n version: \"0.16.11\",\n\n /**\n * Renders the given LaTeX into an HTML+MathML combination, and adds\n * it as a child to the specified DOM node.\n */\n render,\n\n /**\n * Renders the given LaTeX into an HTML+MathML combination string,\n * for sending to the client.\n */\n renderToString,\n\n /**\n * KaTeX error, usually during parsing.\n */\n ParseError,\n\n /**\n * The shema of Settings\n */\n SETTINGS_SCHEMA,\n\n /**\n * Parses the given LaTeX into KaTeX's internal parse tree structure,\n * without rendering to HTML or MathML.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __parse: generateParseTree,\n\n /**\n * Renders the given LaTeX into an HTML+MathML internal DOM tree\n * representation, without flattening that representation to a string.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __renderToDomTree: renderToDomTree,\n\n /**\n * Renders the given LaTeX into an HTML internal DOM tree representation,\n * without MathML and without flattening that representation to a string.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __renderToHTMLTree: renderToHTMLTree,\n\n /**\n * extends internal font metrics object with a new object\n * each key in the new object represents a font name\n */\n __setFontMetrics: setFontMetrics,\n\n /**\n * adds a new symbol to builtin symbols table\n */\n __defineSymbol: defineSymbol,\n\n /**\n * adds a new function to builtin function list,\n * which directly produce parse tree elements\n * and have their own html/mathml builders\n */\n __defineFunction: defineFunction,\n\n /**\n * adds a new macro to builtin macro list\n */\n __defineMacro: defineMacro,\n\n /**\n * Expose the dom tree node types, which can be useful for type checking nodes.\n *\n * NOTE: This method is not currently recommended for public use.\n * The internal tree representation is unstable and is very likely\n * to change. Use at your own risk.\n */\n __domTree: {\n Span,\n Anchor,\n SymbolNode,\n SvgNode,\n PathNode,\n LineNode\n }\n};\n\nexport { katex as default };\n", "import DOMPurify from 'dompurify';\nimport type { MermaidConfig } from '../../config.type.js';\n\n// Remove and ignore br:s\nexport const lineBreakRegex = //gi;\n\n/**\n * Gets the rows of lines in a string\n *\n * @param s - The string to check the lines for\n * @returns The rows in that string\n */\nexport const getRows = (s?: string): string[] => {\n if (!s) {\n return [''];\n }\n const str = breakToPlaceholder(s).replace(/\\\\n/g, '#br#');\n return str.split('#br#');\n};\n\nconst setupDompurifyHooksIfNotSetup = (() => {\n let setup = false;\n\n return () => {\n if (!setup) {\n setupDompurifyHooks();\n setup = true;\n }\n };\n})();\n\nfunction setupDompurifyHooks() {\n const TEMPORARY_ATTRIBUTE = 'data-temp-href-target';\n\n DOMPurify.addHook('beforeSanitizeAttributes', (node: Element) => {\n if (node.tagName === 'A' && node.hasAttribute('target')) {\n node.setAttribute(TEMPORARY_ATTRIBUTE, node.getAttribute('target') ?? '');\n }\n });\n\n DOMPurify.addHook('afterSanitizeAttributes', (node: Element) => {\n if (node.tagName === 'A' && node.hasAttribute(TEMPORARY_ATTRIBUTE)) {\n node.setAttribute('target', node.getAttribute(TEMPORARY_ATTRIBUTE) ?? '');\n node.removeAttribute(TEMPORARY_ATTRIBUTE);\n if (node.getAttribute('target') === '_blank') {\n node.setAttribute('rel', 'noopener');\n }\n }\n });\n}\n\n/**\n * Removes script tags from a text\n *\n * @param txt - The text to sanitize\n * @returns The safer text\n */\nexport const removeScript = (txt: string): string => {\n setupDompurifyHooksIfNotSetup();\n\n const sanitizedText = DOMPurify.sanitize(txt);\n\n return sanitizedText;\n};\n\nconst sanitizeMore = (text: string, config: MermaidConfig) => {\n if (config.flowchart?.htmlLabels !== false) {\n const level = config.securityLevel;\n if (level === 'antiscript' || level === 'strict') {\n text = removeScript(text);\n } else if (level !== 'loose') {\n text = breakToPlaceholder(text);\n text = text.replace(//g, '>');\n text = text.replace(/=/g, '=');\n text = placeholderToBreak(text);\n }\n }\n return text;\n};\n\nexport const sanitizeText = (text: string, config: MermaidConfig): string => {\n if (!text) {\n return text;\n }\n if (config.dompurifyConfig) {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n text = DOMPurify.sanitize(sanitizeMore(text, config), config.dompurifyConfig).toString();\n } else {\n text = DOMPurify.sanitize(sanitizeMore(text, config), {\n FORBID_TAGS: ['style'],\n }).toString();\n }\n return text;\n};\n\nexport const sanitizeTextOrArray = (\n a: string | string[] | string[][],\n config: MermaidConfig\n): string | string[] => {\n if (typeof a === 'string') {\n return sanitizeText(a, config);\n }\n // TODO: Refactor to avoid flat.\n return a.flat().map((x: string) => sanitizeText(x, config));\n};\n\n/**\n * Whether or not a text has any line breaks\n *\n * @param text - The text to test\n * @returns Whether or not the text has breaks\n */\nexport const hasBreaks = (text: string): boolean => {\n return lineBreakRegex.test(text);\n};\n\n/**\n * Splits on
    tags\n *\n * @param text - Text to split\n * @returns List of lines as strings\n */\nexport const splitBreaks = (text: string): string[] => {\n return text.split(lineBreakRegex);\n};\n\n/**\n * Converts placeholders to line breaks in HTML\n *\n * @param s - HTML with placeholders\n * @returns HTML with breaks instead of placeholders\n */\nconst placeholderToBreak = (s: string): string => {\n return s.replace(/#br#/g, '
    ');\n};\n\n/**\n * Opposite of `placeholderToBreak`, converts breaks to placeholders\n *\n * @param s - HTML string\n * @returns String with placeholders\n */\nconst breakToPlaceholder = (s: string): string => {\n return s.replace(lineBreakRegex, '#br#');\n};\n\n/**\n * Gets the current URL\n *\n * @param useAbsolute - Whether to return the absolute URL or not\n * @returns The current URL\n */\nconst getUrl = (useAbsolute: boolean): string => {\n let url = '';\n if (useAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replaceAll(/\\(/g, '\\\\(');\n url = url.replaceAll(/\\)/g, '\\\\)');\n }\n\n return url;\n};\n\n/**\n * Converts a string/boolean into a boolean\n *\n * @param val - String or boolean to convert\n * @returns The result from the input\n */\nexport const evaluate = (val?: string | boolean): boolean =>\n val === false || ['false', 'null', '0'].includes(String(val).trim().toLowerCase()) ? false : true;\n\n/**\n * Wrapper around Math.max which removes non-numeric values\n * Returns the larger of a set of supplied numeric expressions.\n * @param values - Numeric expressions to be evaluated\n * @returns The smaller value\n */\nexport const getMax = function (...values: number[]): number {\n const newValues: number[] = values.filter((value) => {\n return !isNaN(value);\n });\n return Math.max(...newValues);\n};\n\n/**\n * Wrapper around Math.min which removes non-numeric values\n * Returns the smaller of a set of supplied numeric expressions.\n * @param values - Numeric expressions to be evaluated\n * @returns The smaller value\n */\nexport const getMin = function (...values: number[]): number {\n const newValues: number[] = values.filter((value) => {\n return !isNaN(value);\n });\n return Math.min(...newValues);\n};\n\n/**\n * Makes generics in typescript syntax\n *\n * @example\n * Array of array of strings in typescript syntax\n *\n * ```js\n * // returns \"Array>\"\n * parseGenericTypes('Array~Array~string~~');\n * ```\n * @param text - The text to convert\n * @returns The converted string\n */\nexport const parseGenericTypes = function (input: string): string {\n const inputSets = input.split(/(,)/);\n const output = [];\n\n for (let i = 0; i < inputSets.length; i++) {\n let thisSet = inputSets[i];\n\n // if the original input included a value such as \"~K, V~\"\", these will be split into\n // an array of [\"~K\",\",\",\" V~\"].\n // This means that on each call of processSet, there will only be 1 ~ present\n // To account for this, if we encounter a \",\", we are checking the previous and next sets in the array\n // to see if they contain matching ~'s\n // in which case we are assuming that they should be rejoined and sent to be processed\n if (thisSet === ',' && i > 0 && i + 1 < inputSets.length) {\n const previousSet = inputSets[i - 1];\n const nextSet = inputSets[i + 1];\n\n if (shouldCombineSets(previousSet, nextSet)) {\n thisSet = previousSet + ',' + nextSet;\n i++; // Move the index forward to skip the next iteration since we're combining sets\n output.pop();\n }\n }\n\n output.push(processSet(thisSet));\n }\n\n return output.join('');\n};\n\nexport const countOccurrence = (string: string, substring: string): number => {\n return Math.max(0, string.split(substring).length - 1);\n};\n\nconst shouldCombineSets = (previousSet: string, nextSet: string): boolean => {\n const prevCount = countOccurrence(previousSet, '~');\n const nextCount = countOccurrence(nextSet, '~');\n\n return prevCount === 1 && nextCount === 1;\n};\n\nconst processSet = (input: string): string => {\n const tildeCount = countOccurrence(input, '~');\n let hasStartingTilde = false;\n\n if (tildeCount <= 1) {\n return input;\n }\n\n // If there is an odd number of tildes, and the input starts with a tilde, we need to remove it and add it back in later\n if (tildeCount % 2 !== 0 && input.startsWith('~')) {\n input = input.substring(1);\n hasStartingTilde = true;\n }\n\n const chars = [...input];\n\n let first = chars.indexOf('~');\n let last = chars.lastIndexOf('~');\n\n while (first !== -1 && last !== -1 && first !== last) {\n chars[first] = '<';\n chars[last] = '>';\n\n first = chars.indexOf('~');\n last = chars.lastIndexOf('~');\n }\n\n // Add the starting tilde back in if we removed it\n if (hasStartingTilde) {\n chars.unshift('~');\n }\n\n return chars.join('');\n};\n\n// TODO: find a better method for detecting support. This interface was added in the MathML 4 spec.\n// Firefox versions between [4,71] (0.47%) and Safari versions between [5,13.4] (0.17%) don't have this interface implemented but MathML is supported\nexport const isMathMLSupported = () => window.MathMLElement !== undefined;\n\nexport const katexRegex = /\\$\\$(.*)\\$\\$/g;\n\n/**\n * Whether or not a text has KaTeX delimiters\n *\n * @param text - The text to test\n * @returns Whether or not the text has KaTeX delimiters\n */\nexport const hasKatex = (text: string): boolean => (text.match(katexRegex)?.length ?? 0) > 0;\n\n/**\n * Computes the minimum dimensions needed to display a div containing MathML\n *\n * @param text - The text to test\n * @param config - Configuration for Mermaid\n * @returns Object containing \\{width, height\\}\n */\nexport const calculateMathMLDimensions = async (text: string, config: MermaidConfig) => {\n text = await renderKatex(text, config);\n const divElem = document.createElement('div');\n divElem.innerHTML = text;\n divElem.id = 'katex-temp';\n divElem.style.visibility = 'hidden';\n divElem.style.position = 'absolute';\n divElem.style.top = '0';\n const body = document.querySelector('body');\n body?.insertAdjacentElement('beforeend', divElem);\n const dim = { width: divElem.clientWidth, height: divElem.clientHeight };\n divElem.remove();\n return dim;\n};\n\n/**\n * Attempts to render and return the KaTeX portion of a string with MathML\n *\n * @param text - The text to test\n * @param config - Configuration for Mermaid\n * @returns String containing MathML if KaTeX is supported, or an error message if it is not and stylesheets aren't present\n */\nexport const renderKatex = async (text: string, config: MermaidConfig): Promise => {\n if (!hasKatex(text)) {\n return text;\n }\n\n if (!(isMathMLSupported() || config.legacyMathML || config.forceLegacyMathML)) {\n return text.replace(katexRegex, 'MathML is unsupported in this environment.');\n }\n\n const { default: katex } = await import('katex');\n const outputMode =\n config.forceLegacyMathML || (!isMathMLSupported() && config.legacyMathML)\n ? 'htmlAndMathml'\n : 'mathml';\n return text\n .split(lineBreakRegex)\n .map((line) =>\n hasKatex(line)\n ? `
    ${line}
    `\n : `
    ${line}
    `\n )\n .join('')\n .replace(katexRegex, (_, c) =>\n katex\n .renderToString(c, {\n throwOnError: true,\n displayMode: true,\n output: outputMode,\n })\n .replace(/\\n/g, ' ')\n .replace(//g, '')\n );\n};\n\nexport default {\n getRows,\n sanitizeText,\n sanitizeTextOrArray,\n hasBreaks,\n splitBreaks,\n lineBreakRegex,\n removeScript,\n getUrl,\n evaluate,\n getMax,\n getMin,\n};\n", "import { log } from './logger.js';\n\n/**\n * Applies d3 attributes\n *\n * @param {any} d3Elem D3 Element to apply the attributes onto\n * @param {[string, string][]} attrs Object.keys equivalent format of key to value mapping of attributes\n */\nconst d3Attrs = function (d3Elem, attrs) {\n for (let attr of attrs) {\n d3Elem.attr(attr[0], attr[1]);\n }\n};\n\n/**\n * Gives attributes for an SVG's size given arguments\n *\n * @param {number} height The height of the SVG\n * @param {number} width The width of the SVG\n * @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%\n * @returns {Map<'height' | 'width' | 'style', string>} Attributes for the SVG\n */\nexport const calculateSvgSizeAttrs = function (height, width, useMaxWidth) {\n let attrs = new Map();\n if (useMaxWidth) {\n attrs.set('width', '100%');\n attrs.set('style', `max-width: ${width}px;`);\n } else {\n attrs.set('height', height);\n attrs.set('width', width);\n }\n return attrs;\n};\n\n/**\n * Applies attributes from `calculateSvgSizeAttrs`\n *\n * @param {import('./diagram-api/types.js').SVG} svgElem The SVG Element to configure\n * @param {number} height The height of the SVG\n * @param {number} width The width of the SVG\n * @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%\n */\nexport const configureSvgSize = function (svgElem, height, width, useMaxWidth) {\n const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);\n d3Attrs(svgElem, attrs);\n};\n\n// TODO v11: Remove the graph parameter. It is not used.\nexport const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) {\n const svgBounds = svgElem.node().getBBox();\n const sWidth = svgBounds.width;\n const sHeight = svgBounds.height;\n\n log.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds);\n\n let width = 0;\n let height = 0;\n log.info(`Graph bounds: ${width}x${height}`, graph);\n\n width = sWidth + padding * 2;\n height = sHeight + padding * 2;\n\n log.info(`Calculated bounds: ${width}x${height}`);\n configureSvgSize(svgElem, height, width, useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${\n svgBounds.width + 2 * padding\n } ${svgBounds.height + 2 * padding}`;\n\n svgElem.attr('viewBox', vBox);\n};\n", "import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js';\nimport { log } from './logger.js';\nimport type { DiagramStylesProvider } from './diagram-api/types.js';\n\nconst themes: Record = {};\n\nconst getStyles = (\n type: string,\n userStyles: string,\n options: {\n fontFamily: string;\n fontSize: string;\n textColor: string;\n errorBkgColor: string;\n errorTextColor: string;\n lineColor: string;\n } & FlowChartStyleOptions\n) => {\n let diagramStyles = '';\n if (type in themes && themes[type]) {\n diagramStyles = themes[type](options);\n } else {\n log.warn(`No theme found for ${type}`);\n }\n return ` & {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n fill: ${options.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${options.errorBkgColor};\n }\n & .error-text {\n fill: ${options.errorTextColor};\n stroke: ${options.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n }\n & .marker.cross {\n stroke: ${options.lineColor};\n }\n\n & svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${diagramStyles}\n\n ${userStyles}\n`;\n};\n\nexport const addStylesForDiagram = (type: string, diagramTheme?: DiagramStylesProvider): void => {\n if (diagramTheme !== undefined) {\n themes[type] = diagramTheme;\n }\n};\n\nexport default getStyles;\n", "import { sanitizeText as _sanitizeText } from './common.js';\nimport { getConfig } from '../../config.js';\n\nlet accTitle = '';\nlet diagramTitle = '';\nlet accDescription = '';\n\nconst sanitizeText = (txt: string): string => _sanitizeText(txt, getConfig());\n\nexport const clear = (): void => {\n accTitle = '';\n accDescription = '';\n diagramTitle = '';\n};\n\nexport const setAccTitle = (txt: string): void => {\n accTitle = sanitizeText(txt).replace(/^\\s+/g, '');\n};\n\nexport const getAccTitle = (): string => accTitle;\n\nexport const setAccDescription = (txt: string): void => {\n accDescription = sanitizeText(txt).replace(/\\n\\s+/g, '\\n');\n};\n\nexport const getAccDescription = (): string => accDescription;\n\nexport const setDiagramTitle = (txt: string): void => {\n diagramTitle = sanitizeText(txt);\n};\n\nexport const getDiagramTitle = (): string => diagramTitle;\n", "import { addDetector } from './detectType.js';\nimport { log as _log, setLogLevel as _setLogLevel } from '../logger.js';\nimport {\n getConfig as _getConfig,\n setConfig as _setConfig,\n defaultConfig as _defaultConfig,\n setSiteConfig as _setSiteConfig,\n} from '../config.js';\nimport { sanitizeText as _sanitizeText } from '../diagrams/common/common.js';\nimport { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox.js';\nimport { addStylesForDiagram } from '../styles.js';\nimport type { DiagramDefinition, DiagramDetector } from './types.js';\nimport * as _commonDb from '../diagrams/common/commonDb.js';\n\n/*\n Packaging and exposing resources for external diagrams so that they can import\n diagramAPI and have access to select parts of mermaid common code required to\n create diagrams working like the internal diagrams.\n*/\nexport const log = _log;\nexport const setLogLevel = _setLogLevel;\nexport const getConfig = _getConfig;\nexport const setConfig = _setConfig;\nexport const defaultConfig = _defaultConfig;\nexport const setSiteConfig = _setSiteConfig;\nexport const sanitizeText = (text: string) => _sanitizeText(text, getConfig());\nexport const setupGraphViewbox = _setupGraphViewbox;\nexport const getCommonDb = () => {\n return _commonDb;\n};\n\nconst diagrams: Record = {};\nexport type Detectors = Record;\n\n/**\n * Registers the given diagram with Mermaid.\n *\n * Can be used for third-party custom diagrams.\n *\n * @param id - A unique ID for the given diagram.\n * @param diagram - The diagram definition.\n * @param detector - Function that returns `true` if a given mermaid text is this diagram definition.\n */\nexport const registerDiagram = (\n id: string,\n diagram: DiagramDefinition,\n detector?: DiagramDetector\n) => {\n if (diagrams[id]) {\n log.warn(`Diagram with id ${id} already registered. Overwriting.`);\n }\n diagrams[id] = diagram;\n if (detector) {\n addDetector(id, detector);\n }\n addStylesForDiagram(id, diagram.styles);\n\n diagram.injectUtils?.(\n log,\n setLogLevel,\n getConfig,\n sanitizeText,\n setupGraphViewbox,\n getCommonDb(),\n () => {\n // parseDirective is removed in https://github.com/mermaid-js/mermaid/pull/4759.\n // This is a no-op for legacy support.\n }\n );\n};\n\nexport const getDiagram = (name: string): DiagramDefinition => {\n if (name in diagrams) {\n return diagrams[name];\n }\n throw new DiagramNotFoundError(name);\n};\n\nexport class DiagramNotFoundError extends Error {\n constructor(name: string) {\n super(`Diagram ${name} not found.`);\n }\n}\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n} from '../common/commonDb.js';\n\nlet c4ShapeArray = [];\nlet boundaryParseStack = [''];\nlet currentBoundaryParse = 'global';\nlet parentBoundaryParse = '';\nlet boundaries = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n];\nlet rels = [];\nlet title = '';\nlet wrapEnabled = false;\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\nvar c4Type;\n\nexport const getC4Type = function () {\n return c4Type;\n};\n\nexport const setC4Type = function (c4TypeParam) {\n let sanitizedText = sanitizeText(c4TypeParam, getConfig());\n c4Type = sanitizedText;\n};\n\n//type, from, to, label, ?techn, ?descr, ?sprite, ?tags, $link\nexport const addRel = function (type, from, to, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (\n type === undefined ||\n type === null ||\n from === undefined ||\n from === null ||\n to === undefined ||\n to === null ||\n label === undefined ||\n label === null\n ) {\n return;\n }\n\n let rel = {};\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old) {\n rel = old;\n } else {\n rels.push(rel);\n }\n\n rel.type = type;\n rel.from = from;\n rel.to = to;\n rel.label = { text: label };\n\n if (techn === undefined || techn === null) {\n rel.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n rel[key] = { text: value };\n } else {\n rel.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n rel.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n rel[key] = { text: value };\n } else {\n rel.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n rel[key] = value;\n } else {\n rel.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n rel[key] = value;\n } else {\n rel.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n rel[key] = value;\n } else {\n rel.link = link;\n }\n rel.wrap = autoWrap();\n};\n\n//type, alias, label, ?descr, ?sprite, ?tags, $link\nexport const addPersonOrSystem = function (typeC4Shape, alias, label, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let personOrSystem = {};\n const old = c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n if (old && alias === old.alias) {\n personOrSystem = old;\n } else {\n personOrSystem.alias = alias;\n c4ShapeArray.push(personOrSystem);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n personOrSystem.label = { text: '' };\n } else {\n personOrSystem.label = { text: label };\n }\n\n if (descr === undefined || descr === null) {\n personOrSystem.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n personOrSystem[key] = { text: value };\n } else {\n personOrSystem.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.link = link;\n }\n personOrSystem.typeC4Shape = { text: typeC4Shape };\n personOrSystem.parentBoundary = currentBoundaryParse;\n personOrSystem.wrap = autoWrap();\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addContainer = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let container = {};\n const old = c4ShapeArray.find((container) => container.alias === alias);\n if (old && alias === old.alias) {\n container = old;\n } else {\n container.alias = alias;\n c4ShapeArray.push(container);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n container.label = { text: '' };\n } else {\n container.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n container.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n container[key] = { text: value };\n } else {\n container.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n container.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n container[key] = { text: value };\n } else {\n container.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n container[key] = value;\n } else {\n container.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n container[key] = value;\n } else {\n container.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n container[key] = value;\n } else {\n container.link = link;\n }\n container.wrap = autoWrap();\n container.typeC4Shape = { text: typeC4Shape };\n container.parentBoundary = currentBoundaryParse;\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addComponent = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let component = {};\n const old = c4ShapeArray.find((component) => component.alias === alias);\n if (old && alias === old.alias) {\n component = old;\n } else {\n component.alias = alias;\n c4ShapeArray.push(component);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n component.label = { text: '' };\n } else {\n component.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n component.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n component[key] = { text: value };\n } else {\n component.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n component.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n component[key] = { text: value };\n } else {\n component.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n component[key] = value;\n } else {\n component.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n component[key] = value;\n } else {\n component.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n component[key] = value;\n } else {\n component.link = link;\n }\n component.wrap = autoWrap();\n component.typeC4Shape = { text: typeC4Shape };\n component.parentBoundary = currentBoundaryParse;\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addPersonOrSystemBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundaries.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'system' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addContainerBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundaries.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'container' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?descr, ?sprite, ?tags, $link\nexport const addDeploymentNode = function (\n nodeType,\n alias,\n label,\n type,\n descr,\n sprite,\n tags,\n link\n) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) {\n return;\n }\n\n let boundary = {};\n const old = boundaries.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'node' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (descr === undefined || descr === null) {\n boundary.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n boundary[key] = { text: value };\n } else {\n boundary.descr = { text: descr };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.nodeType = nodeType;\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\nexport const popBoundaryParseStack = function () {\n currentBoundaryParse = parentBoundaryParse;\n boundaryParseStack.pop();\n parentBoundaryParse = boundaryParseStack.pop();\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite\nexport const updateElStyle = function (\n typeC4Shape,\n elementName,\n bgColor,\n fontColor,\n borderColor,\n shadowing,\n shape,\n sprite,\n techn,\n legendText,\n legendSprite\n) {\n let old = c4ShapeArray.find((element) => element.alias === elementName);\n if (old === undefined) {\n old = boundaries.find((element) => element.alias === elementName);\n if (old === undefined) {\n return;\n }\n }\n if (bgColor !== undefined && bgColor !== null) {\n if (typeof bgColor === 'object') {\n let [key, value] = Object.entries(bgColor)[0];\n old[key] = value;\n } else {\n old.bgColor = bgColor;\n }\n }\n if (fontColor !== undefined && fontColor !== null) {\n if (typeof fontColor === 'object') {\n let [key, value] = Object.entries(fontColor)[0];\n old[key] = value;\n } else {\n old.fontColor = fontColor;\n }\n }\n if (borderColor !== undefined && borderColor !== null) {\n if (typeof borderColor === 'object') {\n let [key, value] = Object.entries(borderColor)[0];\n old[key] = value;\n } else {\n old.borderColor = borderColor;\n }\n }\n if (shadowing !== undefined && shadowing !== null) {\n if (typeof shadowing === 'object') {\n let [key, value] = Object.entries(shadowing)[0];\n old[key] = value;\n } else {\n old.shadowing = shadowing;\n }\n }\n if (shape !== undefined && shape !== null) {\n if (typeof shape === 'object') {\n let [key, value] = Object.entries(shape)[0];\n old[key] = value;\n } else {\n old.shape = shape;\n }\n }\n if (sprite !== undefined && sprite !== null) {\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n old[key] = value;\n } else {\n old.sprite = sprite;\n }\n }\n if (techn !== undefined && techn !== null) {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n old[key] = value;\n } else {\n old.techn = techn;\n }\n }\n if (legendText !== undefined && legendText !== null) {\n if (typeof legendText === 'object') {\n let [key, value] = Object.entries(legendText)[0];\n old[key] = value;\n } else {\n old.legendText = legendText;\n }\n }\n if (legendSprite !== undefined && legendSprite !== null) {\n if (typeof legendSprite === 'object') {\n let [key, value] = Object.entries(legendSprite)[0];\n old[key] = value;\n } else {\n old.legendSprite = legendSprite;\n }\n }\n};\n\n//textColor, lineColor, ?offsetX, ?offsetY\nexport const updateRelStyle = function (\n typeC4Shape,\n from,\n to,\n textColor,\n lineColor,\n offsetX,\n offsetY\n) {\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old === undefined) {\n return;\n }\n if (textColor !== undefined && textColor !== null) {\n if (typeof textColor === 'object') {\n let [key, value] = Object.entries(textColor)[0];\n old[key] = value;\n } else {\n old.textColor = textColor;\n }\n }\n if (lineColor !== undefined && lineColor !== null) {\n if (typeof lineColor === 'object') {\n let [key, value] = Object.entries(lineColor)[0];\n old[key] = value;\n } else {\n old.lineColor = lineColor;\n }\n }\n if (offsetX !== undefined && offsetX !== null) {\n if (typeof offsetX === 'object') {\n let [key, value] = Object.entries(offsetX)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetX = parseInt(offsetX);\n }\n }\n if (offsetY !== undefined && offsetY !== null) {\n if (typeof offsetY === 'object') {\n let [key, value] = Object.entries(offsetY)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetY = parseInt(offsetY);\n }\n }\n};\n\n//?c4ShapeInRow, ?c4BoundaryInRow\nexport const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {\n let c4ShapeInRowValue = c4ShapeInRow;\n let c4BoundaryInRowValue = c4BoundaryInRow;\n\n if (typeof c4ShapeInRowParam === 'object') {\n const value = Object.values(c4ShapeInRowParam)[0];\n c4ShapeInRowValue = parseInt(value);\n } else {\n c4ShapeInRowValue = parseInt(c4ShapeInRowParam);\n }\n if (typeof c4BoundaryInRowParam === 'object') {\n const value = Object.values(c4BoundaryInRowParam)[0];\n c4BoundaryInRowValue = parseInt(value);\n } else {\n c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);\n }\n\n if (c4ShapeInRowValue >= 1) {\n c4ShapeInRow = c4ShapeInRowValue;\n }\n if (c4BoundaryInRowValue >= 1) {\n c4BoundaryInRow = c4BoundaryInRowValue;\n }\n};\n\nexport const getC4ShapeInRow = function () {\n return c4ShapeInRow;\n};\nexport const getC4BoundaryInRow = function () {\n return c4BoundaryInRow;\n};\nexport const getCurrentBoundaryParse = function () {\n return currentBoundaryParse;\n};\n\nexport const getParentBoundaryParse = function () {\n return parentBoundaryParse;\n};\n\nexport const getC4ShapeArray = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) {\n return c4ShapeArray;\n } else {\n return c4ShapeArray.filter((personOrSystem) => {\n return personOrSystem.parentBoundary === parentBoundary;\n });\n }\n};\nexport const getC4Shape = function (alias) {\n return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n};\nexport const getC4ShapeKeys = function (parentBoundary) {\n return Object.keys(getC4ShapeArray(parentBoundary));\n};\n\nexport const getBoundaries = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) {\n return boundaries;\n } else {\n return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);\n }\n};\n\n/**\n * @deprecated Use {@link getBoundaries} instead\n */\nexport const getBoundarys = getBoundaries;\n\nexport const getRels = function () {\n return rels;\n};\n\nexport const getTitle = function () {\n return title;\n};\n\nexport const setWrap = function (wrapSetting) {\n wrapEnabled = wrapSetting;\n};\n\nexport const autoWrap = function () {\n return wrapEnabled;\n};\n\nexport const clear = function () {\n c4ShapeArray = [];\n boundaries = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n ];\n parentBoundaryParse = '';\n currentBoundaryParse = 'global';\n boundaryParseStack = [''];\n rels = [];\n\n boundaryParseStack = [''];\n title = '';\n wrapEnabled = false;\n c4ShapeInRow = 4;\n c4BoundaryInRow = 2;\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const setTitle = function (txt) {\n let sanitizedText = sanitizeText(txt, getConfig());\n title = sanitizedText;\n};\n\nexport default {\n addPersonOrSystem,\n addPersonOrSystemBoundary,\n addContainer,\n addContainerBoundary,\n addComponent,\n addDeploymentNode,\n popBoundaryParseStack,\n addRel,\n updateElStyle,\n updateRelStyle,\n updateLayoutConfig,\n autoWrap,\n setWrap,\n getC4ShapeArray,\n getC4Shape,\n getC4ShapeKeys,\n getBoundaries,\n getBoundarys,\n getCurrentBoundaryParse,\n getParentBoundaryParse,\n getRels,\n getTitle,\n getC4Type,\n getC4ShapeInRow,\n getC4BoundaryInRow,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n getConfig: () => getConfig().c4,\n clear,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n setTitle,\n setC4Type,\n // apply,\n};\n", "export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n", "import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can\u2019t do this\n // for a comparator (except for specific, known comparators) because we can\u2019t\n // tell if the comparator is symmetric, and an asymmetric comparator can\u2019t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n", "export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n", "import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n", "export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n", "const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n", "export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n", "export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n", "export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n", "export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {blur, blur2, blurImage} from \"./blur.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median, medianIndex} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as mode} from \"./mode.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileIndex, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as rank} from \"./rank.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n", "export default function(x) {\n return x;\n}\n", "import identity from \"./identity.js\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n if (scale.round()) offset = Math.round(offset);\n return d => +scale(d) + offset;\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + offset,\n range1 = +range[range.length - 1] + offset,\n position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient === right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = Array.from(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n axis.offset = function(_) {\n return arguments.length ? (offset = +_, axis) : offset;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n", "export {\n axisTop,\n axisRight,\n axisBottom,\n axisLeft\n} from \"./axis.js\";\n", "var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n", "export {default as dispatch} from \"./dispatch.js\";\n", "export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n", "import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n", "import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n", "function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don\u2019t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n", "function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n", "import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n", "export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n", "import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n", "import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n", "export default function(update) {\n return new Array(update.length);\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n", "export default function(x) {\n return function() {\n return x;\n };\n}\n", "import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don\u2019t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn\u2019t worried about \u201Clive\u201D collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don\u2019t; we\u2019d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n", "import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n", "export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n", "import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n", "export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n", "export default function() {\n return Array.from(this);\n}\n", "export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n", "export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n", "export default function() {\n return !this.node();\n}\n", "export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n", "import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n", "export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n", "import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n", "function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n", "function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n", "function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n", "function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n", "function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n", "function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n", "import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n", "import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n", "function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n", "function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n", "export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n", "function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n", "import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n", "export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n", "import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n", "import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n", "export {default as create} from \"./create.js\";\nexport {default as creator} from \"./creator.js\";\nexport {default as local} from \"./local.js\";\nexport {default as matcher} from \"./matcher.js\";\nexport {default as namespace} from \"./namespace.js\";\nexport {default as namespaces} from \"./namespaces.js\";\nexport {default as pointer} from \"./pointer.js\";\nexport {default as pointers} from \"./pointers.js\";\nexport {default as select} from \"./select.js\";\nexport {default as selectAll} from \"./selectAll.js\";\nexport {default as selection} from \"./selection/index.js\";\nexport {default as selector} from \"./selector.js\";\nexport {default as selectorAll} from \"./selectorAll.js\";\nexport {styleValue as style} from \"./selection/style.js\";\nexport {default as window} from \"./window.js\";\n", "export {default as drag} from \"./drag.js\";\nexport {default as dragDisable, yesdrag as dragEnable} from \"./nodrag.js\";\n", "export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n", "import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n", "export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n", "import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb() {\n return hcl2lab(this).rgb();\n }\n}));\n", "export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n", "export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n", "export default x => () => x;\n", "import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n", "import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n", "export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n", "import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n", "export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n", "import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n", "import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n", "import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n", "export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n", "var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n", "import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n", "import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n", "import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n", "export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n", "var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we\u2019ve set an alarm, if we haven\u2019t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n", "import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n", "export {\n now,\n timer,\n timerFlush\n} from \"./timer.js\";\n\nexport {\n default as timeout\n} from \"./timeout.js\";\n\nexport {\n default as interval\n} from \"./interval.js\";\n", "import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n", "import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n", "import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we\u2019re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we\u2019re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n", "import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n", "import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n", "import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n", "import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n", "import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n", "import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n", "import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n", "import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n", "import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n", "function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n", "import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n", "import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n", "import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n", "function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n", "import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n", "function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n", "import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n", "import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we\u2019re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n", "import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n", "export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n", "export {\n linear as easeLinear\n} from \"./linear.js\";\n\nexport {\n quadInOut as easeQuad,\n quadIn as easeQuadIn,\n quadOut as easeQuadOut,\n quadInOut as easeQuadInOut\n} from \"./quad.js\";\n\nexport {\n cubicInOut as easeCubic,\n cubicIn as easeCubicIn,\n cubicOut as easeCubicOut,\n cubicInOut as easeCubicInOut\n} from \"./cubic.js\";\n\nexport {\n polyInOut as easePoly,\n polyIn as easePolyIn,\n polyOut as easePolyOut,\n polyInOut as easePolyInOut\n} from \"./poly.js\";\n\nexport {\n sinInOut as easeSin,\n sinIn as easeSinIn,\n sinOut as easeSinOut,\n sinInOut as easeSinInOut\n} from \"./sin.js\";\n\nexport {\n expInOut as easeExp,\n expIn as easeExpIn,\n expOut as easeExpOut,\n expInOut as easeExpInOut\n} from \"./exp.js\";\n\nexport {\n circleInOut as easeCircle,\n circleIn as easeCircleIn,\n circleOut as easeCircleOut,\n circleInOut as easeCircleInOut\n} from \"./circle.js\";\n\nexport {\n bounceOut as easeBounce,\n bounceIn as easeBounceIn,\n bounceOut as easeBounceOut,\n bounceInOut as easeBounceInOut\n} from \"./bounce.js\";\n\nexport {\n backInOut as easeBack,\n backIn as easeBackIn,\n backOut as easeBackOut,\n backInOut as easeBackInOut\n} from \"./back.js\";\n\nexport {\n elasticOut as easeElastic,\n elasticIn as easeElasticIn,\n elasticOut as easeElasticOut,\n elasticInOut as easeElasticInOut\n} from \"./elastic.js\";\n", "import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n", "import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n", "import \"./selection/index.js\";\nexport {default as transition} from \"./transition/index.js\";\nexport {default as active} from \"./active.js\";\nexport {default as interrupt} from \"./interrupt.js\";\n", "export default x => () => x;\n", "export default function BrushEvent(type, {\n sourceEvent,\n target,\n selection,\n mode,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n selection: {value: selection, enumerable: true, configurable: true},\n mode: {value: mode, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n", "export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name \u201C__brush\u201D rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection, event) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start(event).brush(event).end(event);\n });\n }\n };\n\n brush.clear = function(group, event) {\n brush.move(group, null, event);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move(event);\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n\n function keydowned(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move(event);\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move(event);\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n", "export {\n default as brush,\n brushX,\n brushY,\n brushSelection\n} from \"./brush.js\";\n", "const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We\u2019re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n", "export {Path, path, pathRound} from \"./path.js\";\n", "export {default as chord, chordTranspose, chordDirected} from \"./chord.js\";\nexport {default as ribbon, ribbonArrow} from \"./ribbon.js\";\n", "export {default as contours} from \"./contours.js\";\nexport {default as contourDensity} from \"./density.js\";\n", "export {default as Delaunay} from \"./delaunay.js\";\nexport {default as Voronoi} from \"./voronoi.js\";\n", "export {default as dsvFormat} from \"./dsv.js\";\nexport {csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue} from \"./csv.js\";\nexport {tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue} from \"./tsv.js\";\nexport {default as autoType} from \"./autoType.js\";\n", "export {default as blob} from \"./blob.js\";\nexport {default as buffer} from \"./buffer.js\";\nexport {default as dsv, csv, tsv} from \"./dsv.js\";\nexport {default as image} from \"./image.js\";\nexport {default as json} from \"./json.js\";\nexport {default as text} from \"./text.js\";\nexport {default as xml, html, svg} from \"./xml.js\";\n", "export {default as quadtree} from \"./quadtree.js\";\n", "export {default as forceCenter} from \"./center.js\";\nexport {default as forceCollide} from \"./collide.js\";\nexport {default as forceLink} from \"./link.js\";\nexport {default as forceManyBody} from \"./manyBody.js\";\nexport {default as forceRadial} from \"./radial.js\";\nexport {default as forceSimulation} from \"./simulation.js\";\nexport {default as forceX} from \"./x.js\";\nexport {default as forceY} from \"./y.js\";\n", "export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, \u00B1Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n", "export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n", "export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n", "// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n", "// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n", "import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n", "import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n", "export default function(x) {\n return x;\n}\n", "import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"\u00B5\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"\u2212\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer \u201Cvalue\u201D part that can be\n // grouped, and fractional or exponential \u201Csuffix\u201D part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n", "import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n", "export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n", "export {default as geoArea} from \"./area.js\";\nexport {default as geoBounds} from \"./bounds.js\";\nexport {default as geoCentroid} from \"./centroid.js\";\nexport {default as geoCircle} from \"./circle.js\";\nexport {default as geoClipAntimeridian} from \"./clip/antimeridian.js\";\nexport {default as geoClipCircle} from \"./clip/circle.js\";\nexport {default as geoClipExtent} from \"./clip/extent.js\"; // DEPRECATED! Use d3.geoIdentity().clipExtent(\u2026).\nexport {default as geoClipRectangle} from \"./clip/rectangle.js\";\nexport {default as geoContains} from \"./contains.js\";\nexport {default as geoDistance} from \"./distance.js\";\nexport {default as geoGraticule, graticule10 as geoGraticule10} from \"./graticule.js\";\nexport {default as geoInterpolate} from \"./interpolate.js\";\nexport {default as geoLength} from \"./length.js\";\nexport {default as geoPath} from \"./path/index.js\";\nexport {default as geoAlbers} from \"./projection/albers.js\";\nexport {default as geoAlbersUsa} from \"./projection/albersUsa.js\";\nexport {default as geoAzimuthalEqualArea, azimuthalEqualAreaRaw as geoAzimuthalEqualAreaRaw} from \"./projection/azimuthalEqualArea.js\";\nexport {default as geoAzimuthalEquidistant, azimuthalEquidistantRaw as geoAzimuthalEquidistantRaw} from \"./projection/azimuthalEquidistant.js\";\nexport {default as geoConicConformal, conicConformalRaw as geoConicConformalRaw} from \"./projection/conicConformal.js\";\nexport {default as geoConicEqualArea, conicEqualAreaRaw as geoConicEqualAreaRaw} from \"./projection/conicEqualArea.js\";\nexport {default as geoConicEquidistant, conicEquidistantRaw as geoConicEquidistantRaw} from \"./projection/conicEquidistant.js\";\nexport {default as geoEqualEarth, equalEarthRaw as geoEqualEarthRaw} from \"./projection/equalEarth.js\";\nexport {default as geoEquirectangular, equirectangularRaw as geoEquirectangularRaw} from \"./projection/equirectangular.js\";\nexport {default as geoGnomonic, gnomonicRaw as geoGnomonicRaw} from \"./projection/gnomonic.js\";\nexport {default as geoIdentity} from \"./projection/identity.js\";\nexport {default as geoProjection, projectionMutator as geoProjectionMutator} from \"./projection/index.js\";\nexport {default as geoMercator, mercatorRaw as geoMercatorRaw} from \"./projection/mercator.js\";\nexport {default as geoNaturalEarth1, naturalEarth1Raw as geoNaturalEarth1Raw} from \"./projection/naturalEarth1.js\";\nexport {default as geoOrthographic, orthographicRaw as geoOrthographicRaw} from \"./projection/orthographic.js\";\nexport {default as geoStereographic, stereographicRaw as geoStereographicRaw} from \"./projection/stereographic.js\";\nexport {default as geoTransverseMercator, transverseMercatorRaw as geoTransverseMercatorRaw} from \"./projection/transverseMercator.js\";\nexport {default as geoRotation} from \"./rotation.js\";\nexport {default as geoStream} from \"./stream.js\";\nexport {default as geoTransform} from \"./transform.js\";\n", "export {default as cluster} from \"./cluster.js\";\nexport {default as hierarchy, Node} from \"./hierarchy/index.js\";\nexport {default as pack} from \"./pack/index.js\";\nexport {default as packSiblings} from \"./pack/siblings.js\";\nexport {default as packEnclose} from \"./pack/enclose.js\";\nexport {default as partition} from \"./partition.js\";\nexport {default as stratify} from \"./stratify.js\";\nexport {default as tree} from \"./tree.js\";\nexport {default as treemap} from \"./treemap/index.js\";\nexport {default as treemapBinary} from \"./treemap/binary.js\";\nexport {default as treemapDice} from \"./treemap/dice.js\";\nexport {default as treemapSlice} from \"./treemap/slice.js\";\nexport {default as treemapSliceDice} from \"./treemap/sliceDice.js\";\nexport {default as treemapSquarify} from \"./treemap/squarify.js\";\nexport {default as treemapResquarify} from \"./treemap/resquarify.js\";\n", "export {default as polygonArea} from \"./area.js\";\nexport {default as polygonCentroid} from \"./centroid.js\";\nexport {default as polygonHull} from \"./hull.js\";\nexport {default as polygonContains} from \"./contains.js\";\nexport {default as polygonLength} from \"./length.js\";\n", "export {default as randomUniform} from \"./uniform.js\";\nexport {default as randomInt} from \"./int.js\";\nexport {default as randomNormal} from \"./normal.js\";\nexport {default as randomLogNormal} from \"./logNormal.js\";\nexport {default as randomBates} from \"./bates.js\";\nexport {default as randomIrwinHall} from \"./irwinHall.js\";\nexport {default as randomExponential} from \"./exponential.js\";\nexport {default as randomPareto} from \"./pareto.js\";\nexport {default as randomBernoulli} from \"./bernoulli.js\";\nexport {default as randomGeometric} from \"./geometric.js\";\nexport {default as randomBinomial} from \"./binomial.js\";\nexport {default as randomGamma} from \"./gamma.js\";\nexport {default as randomBeta} from \"./beta.js\";\nexport {default as randomWeibull} from \"./weibull.js\";\nexport {default as randomCauchy} from \"./cauchy.js\";\nexport {default as randomLogistic} from \"./logistic.js\";\nexport {default as randomPoisson} from \"./poisson.js\";\nexport {default as randomLcg} from \"./lcg.js\";\n", "export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n", "import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n", "import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function(i) { return start + step * i; });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n\n scale.rangeRound = function(_) {\n return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n };\n\n scale.bandwidth = function() {\n return bandwidth;\n };\n\n scale.step = function() {\n return step;\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function(_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function(_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function() {\n return band(domain(), [r0, r1])\n .round(round)\n .paddingInner(paddingInner)\n .paddingOuter(paddingOuter)\n .align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function() {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}\n", "export default function constants(x) {\n return function() {\n return x;\n };\n}\n", "export default function number(x) {\n return +x;\n}\n", "import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n", "import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n", "import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n", "export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n", "const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n", "import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n", "import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n", "import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n", "import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n", "export {\n timeInterval\n} from \"./interval.js\";\n\nexport {\n millisecond as utcMillisecond,\n milliseconds as utcMilliseconds,\n millisecond as timeMillisecond,\n milliseconds as timeMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n second as utcSecond,\n seconds as utcSeconds,\n second as timeSecond,\n seconds as timeSeconds\n} from \"./second.js\";\n\nexport {\n timeMinute,\n timeMinutes,\n utcMinute,\n utcMinutes\n} from \"./minute.js\";\n\nexport {\n timeHour,\n timeHours,\n utcHour,\n utcHours\n} from \"./hour.js\";\n\nexport {\n timeDay,\n timeDays,\n utcDay,\n utcDays,\n unixDay,\n unixDays\n} from \"./day.js\";\n\nexport {\n timeSunday as timeWeek,\n timeSundays as timeWeeks,\n timeSunday,\n timeSundays,\n timeMonday,\n timeMondays,\n timeTuesday,\n timeTuesdays,\n timeWednesday,\n timeWednesdays,\n timeThursday,\n timeThursdays,\n timeFriday,\n timeFridays,\n timeSaturday,\n timeSaturdays,\n utcSunday as utcWeek,\n utcSundays as utcWeeks,\n utcSunday,\n utcSundays,\n utcMonday,\n utcMondays,\n utcTuesday,\n utcTuesdays,\n utcWednesday,\n utcWednesdays,\n utcThursday,\n utcThursdays,\n utcFriday,\n utcFridays,\n utcSaturday,\n utcSaturdays\n} from \"./week.js\";\n\nexport {\n timeMonth,\n timeMonths,\n utcMonth,\n utcMonths\n} from \"./month.js\";\n\nexport {\n timeYear,\n timeYears,\n utcYear,\n utcYears\n} from \"./year.js\";\n\nexport {\n utcTicks,\n utcTickInterval,\n timeTicks,\n timeTickInterval\n} from \"./ticks.js\";\n", "import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n", "import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n", "export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n", "import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n", "export {\n default as scaleBand,\n point as scalePoint\n} from \"./band.js\";\n\nexport {\n default as scaleIdentity\n} from \"./identity.js\";\n\nexport {\n default as scaleLinear\n} from \"./linear.js\";\n\nexport {\n default as scaleLog\n} from \"./log.js\";\n\nexport {\n default as scaleSymlog\n} from \"./symlog.js\";\n\nexport {\n default as scaleOrdinal,\n implicit as scaleImplicit\n} from \"./ordinal.js\";\n\nexport {\n default as scalePow,\n sqrt as scaleSqrt\n} from \"./pow.js\";\n\nexport {\n default as scaleRadial\n} from \"./radial.js\";\n\nexport {\n default as scaleQuantile\n} from \"./quantile.js\";\n\nexport {\n default as scaleQuantize\n} from \"./quantize.js\";\n\nexport {\n default as scaleThreshold\n} from \"./threshold.js\";\n\nexport {\n default as scaleTime\n} from \"./time.js\";\n\nexport {\n default as scaleUtc\n} from \"./utcTime.js\";\n\nexport {\n default as scaleSequential,\n sequentialLog as scaleSequentialLog,\n sequentialPow as scaleSequentialPow,\n sequentialSqrt as scaleSequentialSqrt,\n sequentialSymlog as scaleSequentialSymlog\n} from \"./sequential.js\";\n\nexport {\n default as scaleSequentialQuantile\n} from \"./sequentialQuantile.js\";\n\nexport {\n default as scaleDiverging,\n divergingLog as scaleDivergingLog,\n divergingPow as scaleDivergingPow,\n divergingSqrt as scaleDivergingSqrt,\n divergingSymlog as scaleDivergingSymlog\n} from \"./diverging.js\";\n\nexport {\n default as tickFormat\n} from \"./tickFormat.js\";\n", "export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n", "import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n", "export {default as schemeCategory10} from \"./categorical/category10.js\";\nexport {default as schemeAccent} from \"./categorical/Accent.js\";\nexport {default as schemeDark2} from \"./categorical/Dark2.js\";\nexport {default as schemeObservable10} from \"./categorical/observable10.js\";\nexport {default as schemePaired} from \"./categorical/Paired.js\";\nexport {default as schemePastel1} from \"./categorical/Pastel1.js\";\nexport {default as schemePastel2} from \"./categorical/Pastel2.js\";\nexport {default as schemeSet1} from \"./categorical/Set1.js\";\nexport {default as schemeSet2} from \"./categorical/Set2.js\";\nexport {default as schemeSet3} from \"./categorical/Set3.js\";\nexport {default as schemeTableau10} from \"./categorical/Tableau10.js\";\nexport {default as interpolateBrBG, scheme as schemeBrBG} from \"./diverging/BrBG.js\";\nexport {default as interpolatePRGn, scheme as schemePRGn} from \"./diverging/PRGn.js\";\nexport {default as interpolatePiYG, scheme as schemePiYG} from \"./diverging/PiYG.js\";\nexport {default as interpolatePuOr, scheme as schemePuOr} from \"./diverging/PuOr.js\";\nexport {default as interpolateRdBu, scheme as schemeRdBu} from \"./diverging/RdBu.js\";\nexport {default as interpolateRdGy, scheme as schemeRdGy} from \"./diverging/RdGy.js\";\nexport {default as interpolateRdYlBu, scheme as schemeRdYlBu} from \"./diverging/RdYlBu.js\";\nexport {default as interpolateRdYlGn, scheme as schemeRdYlGn} from \"./diverging/RdYlGn.js\";\nexport {default as interpolateSpectral, scheme as schemeSpectral} from \"./diverging/Spectral.js\";\nexport {default as interpolateBuGn, scheme as schemeBuGn} from \"./sequential-multi/BuGn.js\";\nexport {default as interpolateBuPu, scheme as schemeBuPu} from \"./sequential-multi/BuPu.js\";\nexport {default as interpolateGnBu, scheme as schemeGnBu} from \"./sequential-multi/GnBu.js\";\nexport {default as interpolateOrRd, scheme as schemeOrRd} from \"./sequential-multi/OrRd.js\";\nexport {default as interpolatePuBuGn, scheme as schemePuBuGn} from \"./sequential-multi/PuBuGn.js\";\nexport {default as interpolatePuBu, scheme as schemePuBu} from \"./sequential-multi/PuBu.js\";\nexport {default as interpolatePuRd, scheme as schemePuRd} from \"./sequential-multi/PuRd.js\";\nexport {default as interpolateRdPu, scheme as schemeRdPu} from \"./sequential-multi/RdPu.js\";\nexport {default as interpolateYlGnBu, scheme as schemeYlGnBu} from \"./sequential-multi/YlGnBu.js\";\nexport {default as interpolateYlGn, scheme as schemeYlGn} from \"./sequential-multi/YlGn.js\";\nexport {default as interpolateYlOrBr, scheme as schemeYlOrBr} from \"./sequential-multi/YlOrBr.js\";\nexport {default as interpolateYlOrRd, scheme as schemeYlOrRd} from \"./sequential-multi/YlOrRd.js\";\nexport {default as interpolateBlues, scheme as schemeBlues} from \"./sequential-single/Blues.js\";\nexport {default as interpolateGreens, scheme as schemeGreens} from \"./sequential-single/Greens.js\";\nexport {default as interpolateGreys, scheme as schemeGreys} from \"./sequential-single/Greys.js\";\nexport {default as interpolatePurples, scheme as schemePurples} from \"./sequential-single/Purples.js\";\nexport {default as interpolateReds, scheme as schemeReds} from \"./sequential-single/Reds.js\";\nexport {default as interpolateOranges, scheme as schemeOranges} from \"./sequential-single/Oranges.js\";\nexport {default as interpolateCividis} from \"./sequential-multi/cividis.js\";\nexport {default as interpolateCubehelixDefault} from \"./sequential-multi/cubehelix.js\";\nexport {default as interpolateRainbow, warm as interpolateWarm, cool as interpolateCool} from \"./sequential-multi/rainbow.js\";\nexport {default as interpolateSinebow} from \"./sequential-multi/sinebow.js\";\nexport {default as interpolateTurbo} from \"./sequential-multi/turbo.js\";\nexport {default as interpolateViridis, magma as interpolateMagma, inferno as interpolateInferno, plasma as interpolatePlasma} from \"./sequential-multi/viridis.js\";\n", "export default function(x) {\n return function constant() {\n return x;\n };\n}\n", "export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n", "import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n", "import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 \u2265 r0, da1 \u2265 da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it\u2019s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector\u2019s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it\u2019s a circular sector?\n // Or perhaps it\u2019s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector\u2019s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n", "export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n", "function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n", "export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n", "import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n", "export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n", "export default function(d) {\n return d;\n}\n", "import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n", "import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n", "export default function() {}\n", "export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n", "import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n", "import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n", "import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n", "export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n", "import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n", "import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n", "function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic B\u00E9zier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n", "function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n", "function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n", "export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {link, linkHorizontal, linkVertical, linkRadial} from \"./link.js\";\n\nexport {default as symbol, symbolsStroke, symbolsFill, symbolsFill as symbols} from \"./symbol.js\";\nexport {default as symbolAsterisk} from \"./symbol/asterisk.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolDiamond2} from \"./symbol/diamond2.js\";\nexport {default as symbolPlus} from \"./symbol/plus.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolSquare2} from \"./symbol/square2.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolTriangle2} from \"./symbol/triangle2.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\nexport {default as symbolTimes, default as symbolX} from \"./symbol/times.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {bumpX as curveBumpX, bumpY as curveBumpY} from \"./curve/bump.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n", "export default x => () => x;\n", "export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n", "export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n", "export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n", "import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won\u2019t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n", "export {default as zoom} from \"./zoom.js\";\nexport {default as zoomTransform, identity as zoomIdentity, Transform as ZoomTransform} from \"./transform.js\";\n", "export * from \"d3-array\";\nexport * from \"d3-axis\";\nexport * from \"d3-brush\";\nexport * from \"d3-chord\";\nexport * from \"d3-color\";\nexport * from \"d3-contour\";\nexport * from \"d3-delaunay\";\nexport * from \"d3-dispatch\";\nexport * from \"d3-drag\";\nexport * from \"d3-dsv\";\nexport * from \"d3-ease\";\nexport * from \"d3-fetch\";\nexport * from \"d3-force\";\nexport * from \"d3-format\";\nexport * from \"d3-geo\";\nexport * from \"d3-hierarchy\";\nexport * from \"d3-interpolate\";\nexport * from \"d3-path\";\nexport * from \"d3-polygon\";\nexport * from \"d3-quadtree\";\nexport * from \"d3-random\";\nexport * from \"d3-scale\";\nexport * from \"d3-scale-chromatic\";\nexport * from \"d3-selection\";\nexport * from \"d3-shape\";\nexport * from \"d3-time\";\nexport * from \"d3-time-format\";\nexport * from \"d3-timer\";\nexport * from \"d3-transition\";\nexport * from \"d3-zoom\";\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BLANK_URL = exports.relativeFirstCharacters = exports.whitespaceEscapeCharsRegex = exports.urlSchemeRegex = exports.ctrlCharactersRegex = exports.htmlCtrlEntityRegex = exports.htmlEntitiesRegex = exports.invalidProtocolRegex = void 0;\nexports.invalidProtocolRegex = /^([^\\w]*)(javascript|data|vbscript)/im;\nexports.htmlEntitiesRegex = /&#(\\w+)(^\\w|;)?/g;\nexports.htmlCtrlEntityRegex = /&(newline|tab);/gi;\nexports.ctrlCharactersRegex = /[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim;\nexports.urlSchemeRegex = /^.+(:|:)/gim;\nexports.whitespaceEscapeCharsRegex = /(\\\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;\nexports.relativeFirstCharacters = [\".\", \"/\"];\nexports.BLANK_URL = \"about:blank\";\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sanitizeUrl = void 0;\nvar constants_1 = require(\"./constants\");\nfunction isRelativeUrlWithoutProtocol(url) {\n return constants_1.relativeFirstCharacters.indexOf(url[0]) > -1;\n}\nfunction decodeHtmlCharacters(str) {\n var removedNullByte = str.replace(constants_1.ctrlCharactersRegex, \"\");\n return removedNullByte.replace(constants_1.htmlEntitiesRegex, function (match, dec) {\n return String.fromCharCode(dec);\n });\n}\nfunction isValidUrl(url) {\n return URL.canParse(url);\n}\nfunction decodeURI(uri) {\n try {\n return decodeURIComponent(uri);\n }\n catch (e) {\n // Ignoring error\n // It is possible that the URI contains a `%` not associated\n // with URI/URL-encoding.\n return uri;\n }\n}\nfunction sanitizeUrl(url) {\n if (!url) {\n return constants_1.BLANK_URL;\n }\n var charsToDecode;\n var decodedUrl = decodeURI(url.trim());\n do {\n decodedUrl = decodeHtmlCharacters(decodedUrl)\n .replace(constants_1.htmlCtrlEntityRegex, \"\")\n .replace(constants_1.ctrlCharactersRegex, \"\")\n .replace(constants_1.whitespaceEscapeCharsRegex, \"\")\n .trim();\n decodedUrl = decodeURI(decodedUrl);\n charsToDecode =\n decodedUrl.match(constants_1.ctrlCharactersRegex) ||\n decodedUrl.match(constants_1.htmlEntitiesRegex) ||\n decodedUrl.match(constants_1.htmlCtrlEntityRegex) ||\n decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);\n } while (charsToDecode && charsToDecode.length > 0);\n var sanitizedUrl = decodedUrl;\n if (!sanitizedUrl) {\n return constants_1.BLANK_URL;\n }\n if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {\n return sanitizedUrl;\n }\n // Remove any leading whitespace before checking the URL scheme\n var trimmedUrl = sanitizedUrl.trimStart();\n var urlSchemeParseResults = trimmedUrl.match(constants_1.urlSchemeRegex);\n if (!urlSchemeParseResults) {\n return sanitizedUrl;\n }\n var urlScheme = urlSchemeParseResults[0].toLowerCase().trim();\n if (constants_1.invalidProtocolRegex.test(urlScheme)) {\n return constants_1.BLANK_URL;\n }\n var backSanitized = trimmedUrl.replace(/\\\\/g, \"/\");\n // Handle special cases for mailto: and custom deep-link protocols\n if (urlScheme === \"mailto:\" || urlScheme.includes(\"://\")) {\n return backSanitized;\n }\n // For http and https URLs, perform additional validation\n if (urlScheme === \"http:\" || urlScheme === \"https:\") {\n if (!isValidUrl(backSanitized)) {\n return constants_1.BLANK_URL;\n }\n var url_1 = new URL(backSanitized);\n url_1.protocol = url_1.protocol.toLowerCase();\n url_1.hostname = url_1.hostname.toLowerCase();\n return url_1.toString();\n }\n return backSanitized;\n}\nexports.sanitizeUrl = sanitizeUrl;\n", "import { sanitizeUrl } from '@braintree/sanitize-url';\nimport type { SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { lineBreakRegex } from './common.js';\nimport type {\n Bound,\n D3ImageElement,\n D3RectElement,\n D3TSpanElement,\n D3TextElement,\n D3UseElement,\n RectData,\n TextData,\n TextObject,\n} from './commonTypes.js';\n\nexport const drawRect = (element: SVG | SVGGroup, rectData: RectData): D3RectElement => {\n const rectElement: D3RectElement = element.append('rect');\n rectElement.attr('x', rectData.x);\n rectElement.attr('y', rectData.y);\n rectElement.attr('fill', rectData.fill);\n rectElement.attr('stroke', rectData.stroke);\n rectElement.attr('width', rectData.width);\n rectElement.attr('height', rectData.height);\n if (rectData.name) {\n rectElement.attr('name', rectData.name);\n }\n if (rectData.rx) {\n rectElement.attr('rx', rectData.rx);\n }\n if (rectData.ry) {\n rectElement.attr('ry', rectData.ry);\n }\n\n if (rectData.attrs !== undefined) {\n for (const attrKey in rectData.attrs) {\n rectElement.attr(attrKey, rectData.attrs[attrKey]);\n }\n }\n\n if (rectData.class) {\n rectElement.attr('class', rectData.class);\n }\n\n return rectElement;\n};\n\n/**\n * Draws a background rectangle\n *\n * @param element - Diagram (reference for bounds)\n * @param bounds - Shape of the rectangle\n */\nexport const drawBackgroundRect = (element: SVG | SVGGroup, bounds: Bound): void => {\n const rectData: RectData = {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n stroke: bounds.stroke,\n class: 'rect',\n };\n const rectElement: D3RectElement = drawRect(element, rectData);\n rectElement.lower();\n};\n\nexport const drawText = (element: SVG | SVGGroup, textData: TextData): D3TextElement => {\n const nText: string = textData.text.replace(lineBreakRegex, ' ');\n\n const textElem: D3TextElement = element.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n if (textData.class) {\n textElem.attr('class', textData.class);\n }\n\n const tspan: D3TSpanElement = textElem.append('tspan');\n tspan.attr('x', textData.x + textData.textMargin * 2);\n tspan.text(nText);\n\n return textElem;\n};\n\nexport const drawImage = (elem: SVG | SVGGroup, x: number, y: number, link: string): void => {\n const imageElement: D3ImageElement = elem.append('image');\n imageElement.attr('x', x);\n imageElement.attr('y', y);\n const sanitizedLink: string = sanitizeUrl(link);\n imageElement.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawEmbeddedImage = (\n element: SVG | SVGGroup,\n x: number,\n y: number,\n link: string\n): void => {\n const imageElement: D3UseElement = element.append('use');\n imageElement.attr('x', x);\n imageElement.attr('y', y);\n const sanitizedLink: string = sanitizeUrl(link);\n imageElement.attr('xlink:href', `#${sanitizedLink}`);\n};\n\nexport const getNoteRect = (): RectData => {\n const noteRectData: RectData = {\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n fill: '#EDF2AE',\n stroke: '#666',\n anchor: 'start',\n rx: 0,\n ry: 0,\n };\n return noteRectData;\n};\n\nexport const getTextObj = (): TextObject => {\n const testObject: TextObject = {\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n 'text-anchor': 'start',\n style: '#666',\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n };\n return testObject;\n};\n", "import common from '../common/common.js';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nexport const drawRect = function (elem, rectData) {\n return svgDrawCommon.drawRect(elem, rectData);\n};\n\nexport const drawImage = function (elem, width, height, x, y, link) {\n const imageElem = elem.append('image');\n imageElem.attr('width', width);\n imageElem.attr('height', height);\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n let sanitizedLink = link.startsWith('data:image/png;base64') ? link : sanitizeUrl(link);\n imageElem.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawRels = (elem, rels, conf) => {\n const relsElem = elem.append('g');\n let i = 0;\n for (let rel of rels) {\n let textColor = rel.textColor ? rel.textColor : '#444444';\n let strokeColor = rel.lineColor ? rel.lineColor : '#444444';\n let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;\n let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;\n\n let url = '';\n if (i === 0) {\n let line = relsElem.append('line');\n line.attr('x1', rel.startPoint.x);\n line.attr('y1', rel.startPoint.y);\n line.attr('x2', rel.endPoint.x);\n line.attr('y2', rel.endPoint.y);\n\n line.attr('stroke-width', '1');\n line.attr('stroke', strokeColor);\n line.style('fill', 'none');\n if (rel.type !== 'rel_b') {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (rel.type === 'birel' || rel.type === 'rel_b') {\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n i = -1;\n } else {\n let line = relsElem.append('path');\n line\n .attr('fill', 'none')\n .attr('stroke-width', '1')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,starty Qcontrolx,controly stopx,stopy '\n .replaceAll('startx', rel.startPoint.x)\n .replaceAll('starty', rel.startPoint.y)\n .replaceAll(\n 'controlx',\n rel.startPoint.x +\n (rel.endPoint.x - rel.startPoint.x) / 2 -\n (rel.endPoint.x - rel.startPoint.x) / 4\n )\n .replaceAll('controly', rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2)\n .replaceAll('stopx', rel.endPoint.x)\n .replaceAll('stopy', rel.endPoint.y)\n );\n if (rel.type !== 'rel_b') {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (rel.type === 'birel' || rel.type === 'rel_b') {\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n }\n\n let messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n rel.label.text,\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n offsetY,\n rel.label.width,\n rel.label.height,\n { fill: textColor },\n messageConf\n );\n\n if (rel.techn && rel.techn.text !== '') {\n messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n '[' + rel.techn.text + ']',\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n conf.messageFontSize +\n 5 +\n offsetY,\n Math.max(rel.label.width, rel.techn.width),\n rel.techn.height,\n { fill: textColor, 'font-style': 'italic' },\n messageConf\n );\n }\n }\n};\n\n/**\n * Draws an boundary in the diagram\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} boundary - The boundary to draw.\n * @param {any} conf - DrawText implementation discriminator object\n */\nconst drawBoundary = function (elem, boundary, conf) {\n const boundaryElem = elem.append('g');\n\n let fillColor = boundary.bgColor ? boundary.bgColor : 'none';\n let strokeColor = boundary.borderColor ? boundary.borderColor : '#444444';\n let fontColor = boundary.fontColor ? boundary.fontColor : 'black';\n\n let attrsValue = { 'stroke-width': 1.0, 'stroke-dasharray': '7.0,7.0' };\n if (boundary.nodeType) {\n attrsValue = { 'stroke-width': 1.0 };\n }\n let rectData = {\n x: boundary.x,\n y: boundary.y,\n fill: fillColor,\n stroke: strokeColor,\n width: boundary.width,\n height: boundary.height,\n rx: 2.5,\n ry: 2.5,\n attrs: attrsValue,\n };\n\n drawRect(boundaryElem, rectData);\n\n // draw label\n let boundaryConf = conf.boundaryFont();\n boundaryConf.fontWeight = 'bold';\n boundaryConf.fontSize = boundaryConf.fontSize + 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.label.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.label.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n\n // draw type\n if (boundary.type && boundary.type.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.type.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.type.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n\n // draw descr\n if (boundary.descr && boundary.descr.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontSize = boundaryConf.fontSize - 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.descr.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.descr.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n};\n\nexport const drawC4Shape = function (elem, c4Shape, conf) {\n let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf[c4Shape.typeC4Shape.text + '_bg_color'];\n let strokeColor = c4Shape.borderColor\n ? c4Shape.borderColor\n : conf[c4Shape.typeC4Shape.text + '_border_color'];\n let fontColor = c4Shape.fontColor ? c4Shape.fontColor : '#FFFFFF';\n\n let personImg =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=';\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n personImg =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD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jGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=';\n break;\n }\n\n const c4ShapeElem = elem.append('g');\n c4ShapeElem.attr('class', 'person-man');\n\n // \n // draw rect of c4Shape\n const rect = svgDrawCommon.getNoteRect();\n\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n case 'system':\n case 'external_system':\n case 'container':\n case 'external_container':\n case 'component':\n case 'external_component':\n rect.x = c4Shape.x;\n rect.y = c4Shape.y;\n rect.fill = fillColor;\n rect.width = c4Shape.width;\n rect.height = c4Shape.height;\n rect.stroke = strokeColor;\n rect.rx = 2.5;\n rect.ry = 2.5;\n rect.attrs = { 'stroke-width': 0.5 };\n drawRect(c4ShapeElem, rect);\n break;\n case 'system_db':\n case 'external_system_db':\n case 'container_db':\n case 'external_container_db':\n case 'component_db':\n case 'external_component_db':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n .replaceAll('height', c4Shape.height)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n );\n break;\n case 'system_queue':\n case 'external_system_queue':\n case 'container_queue':\n case 'external_container_queue':\n case 'component_queue':\n case 'external_component_queue':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('width', c4Shape.width)\n .replaceAll('half', c4Shape.height / 2)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half'\n .replaceAll('startx', c4Shape.x + c4Shape.width)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.height / 2)\n );\n break;\n }\n\n // draw type of c4Shape\n let c4ShapeFontConf = getC4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeElem\n .append('text')\n .attr('fill', fontColor)\n .attr('font-family', c4ShapeFontConf.fontFamily)\n .attr('font-size', c4ShapeFontConf.fontSize - 2)\n .attr('font-style', 'italic')\n .attr('lengthAdjust', 'spacing')\n .attr('textLength', c4Shape.typeC4Shape.width)\n .attr('x', c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2)\n .attr('y', c4Shape.y + c4Shape.typeC4Shape.Y)\n .text('<<' + c4Shape.typeC4Shape.text + '>>');\n\n // draw image/sprite\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n drawImage(\n c4ShapeElem,\n 48,\n 48,\n c4Shape.x + c4Shape.width / 2 - 24,\n c4Shape.y + c4Shape.image.Y,\n personImg\n );\n break;\n }\n\n // draw label\n let textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontWeight = 'bold';\n textFontConf.fontSize = textFontConf.fontSize + 2;\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.label.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.label.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n\n // draw techn/type\n textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontColor = fontColor;\n\n if (c4Shape.techn && c4Shape.techn?.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.techn.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.techn.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n } else if (c4Shape.type && c4Shape.type.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.type.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.type.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n }\n\n // draw descr\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n textFontConf = conf.personFont();\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.descr.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.descr.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n }\n\n return c4Shape.height;\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\n\nexport const insertArrowEnd = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowend')\n .attr('refX', 1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 10 0 L 0 5 L 10 10 z'); // this is actual shape for arrowhead\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertDynamicNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 16)\n .attr('refY', 4);\n\n // The arrow\n marker\n .append('path')\n .attr('fill', 'black')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 9,2 V 6 L16,4 Z');\n\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');\n // this is actual shape for arrowhead\n};\n\nconst getC4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { fontSize, fontFamily, fontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * fontSize - (fontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n text\n .append('tspan')\n // .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i])\n // .attr('y', y + height / 2)\n .attr('alignment-baseline', 'mathematical');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawBoundary,\n drawC4Shape,\n drawRels,\n drawImage,\n insertArrowHead,\n insertArrowEnd,\n insertArrowFilledHead,\n insertDynamicNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n};\n\n// cspell:ignoreRegExp /'Mstartx.*/g\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n", "import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n", "import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n", "import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n", "import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n", "import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n", "import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n", "import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n", "import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n", "import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n", "import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n", "import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n", "import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n", "import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n", "import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n", "import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n", "import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n", "import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n", "import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n", "import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n", "import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n", "import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n", "import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n", "import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n", "import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n", "import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n", "import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n", "import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n", "import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n", "import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n", "import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n", "import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n", "import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n", "import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n", "import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n", "import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n", "import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n", "import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n", "import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n", "/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n", "import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n", "import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n", "import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n", "import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n", "import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n", "import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n", "import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n", "import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n", "import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n", "import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n", "import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n", "import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n", "import { sanitizeUrl } from '@braintree/sanitize-url';\nimport type { CurveFactory } from 'd3';\nimport {\n curveBasis,\n curveBasisClosed,\n curveBasisOpen,\n curveBumpX,\n curveBumpY,\n curveBundle,\n curveCardinalClosed,\n curveCardinalOpen,\n curveCardinal,\n curveCatmullRomClosed,\n curveCatmullRomOpen,\n curveCatmullRom,\n curveLinear,\n curveLinearClosed,\n curveMonotoneX,\n curveMonotoneY,\n curveNatural,\n curveStep,\n curveStepAfter,\n curveStepBefore,\n select,\n} from 'd3';\nimport common from './diagrams/common/common.js';\nimport { sanitizeDirective } from './utils/sanitizeDirective.js';\nimport { log } from './logger.js';\nimport { detectType } from './diagram-api/detectType.js';\nimport assignWithDepth from './assignWithDepth.js';\nimport type { MermaidConfig } from './config.type.js';\nimport memoize from 'lodash-es/memoize.js';\nimport merge from 'lodash-es/merge.js';\nimport { directiveRegex } from './diagram-api/regexes.js';\nimport type { D3Element, Point, TextDimensionConfig, TextDimensions } from './types.js';\n\nexport const ZERO_WIDTH_SPACE = '\\u200b';\n\n// Effectively an enum of the supported curve types, accessible by name\nconst d3CurveTypes = {\n curveBasis: curveBasis,\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveBumpX: curveBumpX,\n curveBumpY: curveBumpY,\n curveBundle: curveBundle,\n curveCardinalClosed: curveCardinalClosed,\n curveCardinalOpen: curveCardinalOpen,\n curveCardinal: curveCardinal,\n curveCatmullRomClosed: curveCatmullRomClosed,\n curveCatmullRomOpen: curveCatmullRomOpen,\n curveCatmullRom: curveCatmullRom,\n curveLinear: curveLinear,\n curveLinearClosed: curveLinearClosed,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore,\n} as const;\n\nconst directiveWithoutOpen =\n /\\s*(?:(\\w+)(?=:):|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi;\n/**\n * Detects the init config object from the text\n *\n * @param text - The text defining the graph. For example:\n *\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * Or\n *\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param config - Optional mermaid configuration object.\n * @returns The json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function (\n text: string,\n config?: MermaidConfig\n): MermaidConfig | undefined {\n const inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n let results: MermaidConfig & { config?: unknown } = {};\n\n if (Array.isArray(inits)) {\n const args = inits.map((init) => init.args);\n sanitizeDirective(args);\n results = assignWithDepth(results, [...args]);\n } else {\n results = inits.args as MermaidConfig;\n }\n\n if (!results) {\n return;\n }\n\n let type = detectType(text, config);\n\n // Move the `config` value to appropriate diagram type value\n const prop = 'config';\n if (results[prop] !== undefined) {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n results[type as keyof MermaidConfig] = results[prop];\n delete results[prop];\n }\n\n return results;\n};\n\ninterface Directive {\n type?: string;\n args?: unknown;\n}\n/**\n * Detects the directive from the text.\n *\n * Text can be single line or multiline. If type is null or omitted,\n * the first directive encountered in text will be returned\n *\n * ```mermaid\n * graph LR\n * %%{someDirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param text - The text defining the graph\n * @param type - The directive to return (default: `null`)\n * @returns An object or Array representing the directive(s) matched by the input type.\n * If a single directive was found, that directive object will be returned.\n */\nexport const detectDirective = function (\n text: string,\n type: string | RegExp | null = null\n): Directive | Directive[] {\n try {\n const commentWithoutDirectives = new RegExp(\n `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*\\n`,\n 'ig'\n );\n text = text.trim().replace(commentWithoutDirectives, '').replace(/'/gm, '\"');\n log.debug(\n `Detecting diagram directive${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n let match: RegExpExecArray | null;\n const result: Directive[] = [];\n while ((match = directiveRegex.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directiveRegex.lastIndex) {\n directiveRegex.lastIndex++;\n }\n if ((match && !type) || (type && match[1]?.match(type)) || (type && match[2]?.match(type))) {\n const type = match[1] ? match[1] : match[2];\n const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({ type, args });\n }\n }\n if (result.length === 0) {\n return { type: text, args: null };\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n log.error(\n `ERROR: ${\n (error as Error).message\n } - Unable to parse directive type: '${type}' based on the text: '${text}'`\n );\n return { type: undefined, args: null };\n }\n};\n\nexport const removeDirectives = function (text: string): string {\n return text.replace(directiveRegex, '');\n};\n\n/**\n * Detects whether a substring in present in a given array\n *\n * @param str - The substring to detect\n * @param arr - The array to search\n * @returns The array index containing the substring or -1 if not present\n */\nexport const isSubstringInArray = function (str: string, arr: string[]): number {\n for (const [i, element] of arr.entries()) {\n if (element.match(str)) {\n return i;\n }\n }\n return -1;\n};\n\n/**\n * Returns a d3 curve given a curve name\n *\n * @param interpolate - The interpolation name\n * @param defaultCurve - The default curve to return\n * @returns The curve factory to use\n */\nexport function interpolateToCurve(\n interpolate: string | undefined,\n defaultCurve: CurveFactory\n): CurveFactory {\n if (!interpolate) {\n return defaultCurve;\n }\n const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n\n // @ts-ignore TODO: Fix issue with curve type\n return d3CurveTypes[curveName as keyof typeof d3CurveTypes] ?? defaultCurve;\n}\n\n/**\n * Formats a URL string\n *\n * @param linkStr - String of the URL\n * @param config - Configuration passed to MermaidJS\n * @returns The formatted URL or `undefined`.\n */\nexport function formatUrl(linkStr: string, config: MermaidConfig): string | undefined {\n const url = linkStr.trim();\n\n if (!url) {\n return undefined;\n }\n\n if (config.securityLevel !== 'loose') {\n return sanitizeUrl(url);\n }\n\n return url;\n}\n\n/**\n * Runs a function\n *\n * @param functionName - A dot separated path to the function relative to the `window`\n * @param params - Parameters to pass to the function\n */\nexport const runFunc = (functionName: string, ...params: unknown[]) => {\n const arrPaths = functionName.split('.');\n\n const len = arrPaths.length - 1;\n const fnName = arrPaths[len];\n\n let obj = window;\n for (let i = 0; i < len; i++) {\n obj = obj[arrPaths[i] as keyof typeof obj];\n if (!obj) {\n log.error(`Function name: ${functionName} not found in window`);\n return;\n }\n }\n\n obj[fnName as keyof typeof obj](...params);\n};\n\n/**\n * Finds the distance between two points using the Distance Formula\n *\n * @param p1 - The first point\n * @param p2 - The second point\n * @returns The distance between the two points.\n */\nfunction distance(p1?: Point, p2?: Point): number {\n if (!p1 || !p2) {\n return 0;\n }\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\n/**\n * TODO: Give this a description\n *\n * @param points - List of points\n */\nfunction traverseEdge(points: Point[]): Point {\n let prevPoint: Point | undefined;\n let totalDistance = 0;\n\n points.forEach((point) => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse half of total distance along points\n const remainingDistance = totalDistance / 2;\n return calculatePoint(points, remainingDistance);\n}\n\n/**\n * {@inheritdoc traverseEdge}\n */\nfunction calcLabelPosition(points: Point[]): Point {\n if (points.length === 1) {\n return points[0];\n }\n return traverseEdge(points);\n}\n\nexport const roundNumber = (num: number, precision = 2) => {\n const factor = Math.pow(10, precision);\n return Math.round(num * factor) / factor;\n};\n\nexport const calculatePoint = (points: Point[], distanceToTraverse: number): Point => {\n let prevPoint: Point | undefined = undefined;\n let remainingDistance = distanceToTraverse;\n for (const point of points) {\n if (prevPoint) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) {\n return prevPoint;\n }\n if (distanceRatio >= 1) {\n return { x: point.x, y: point.y };\n }\n if (distanceRatio > 0 && distanceRatio < 1) {\n return {\n x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, 5),\n y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point.y, 5),\n };\n }\n }\n }\n prevPoint = point;\n }\n throw new Error('Could not find a suitable point for the given distance');\n};\n\nconst calcCardinalityPosition = (\n isRelationTypePresent: boolean,\n points: Point[],\n initialPosition: Point\n) => {\n log.info(`our points ${JSON.stringify(points)}`);\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25;\n const center = calculatePoint(points, distanceToCardinalityPoint);\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n const d = isRelationTypePresent ? 10 : 5;\n //Calculate Angle for x and y axis\n const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n const cardinalityPosition = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but perpendicular and with offset-distance\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n};\n\n/**\n * Calculates the terminal label position.\n *\n * @param terminalMarkerSize - Terminal marker size.\n * @param position - Position of label relative to points.\n * @param _points - Array of points.\n * @returns - The `cardinalityPosition`.\n */\nfunction calcTerminalLabelPosition(\n terminalMarkerSize: number,\n position: 'start_left' | 'start_right' | 'end_left' | 'end_right',\n _points: Point[]\n): Point {\n const points = structuredClone(_points);\n log.info('our points', points);\n if (position !== 'start_left' && position !== 'start_right') {\n points.reverse();\n }\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25 + terminalMarkerSize;\n const center = calculatePoint(points, distanceToCardinalityPoint);\n\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n const d = 10 + terminalMarkerSize * 0.5;\n //Calculate Angle for x and y axis\n const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n\n const cardinalityPosition: Point = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but perpendicular and with offset-distance\n\n if (position === 'start_left') {\n cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;\n } else if (position === 'end_right') {\n cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;\n } else if (position === 'end_left') {\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;\n } else {\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n }\n return cardinalityPosition;\n}\n\n/**\n * Gets styles from an array of declarations\n *\n * @param arr - Declarations\n * @returns The styles grouped as strings\n */\nexport function getStylesFromArray(arr: string[]): { style: string; labelStyle: string } {\n let style = '';\n let labelStyle = '';\n\n for (const element of arr) {\n if (element !== undefined) {\n // add text properties to label style definition\n if (element.startsWith('color:') || element.startsWith('text-align:')) {\n labelStyle = labelStyle + element + ';';\n } else {\n style = style + element + ';';\n }\n }\n }\n\n return { style, labelStyle };\n}\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\n/**\n * Generates a random hexadecimal id of the given length.\n *\n * @param length - Length of string.\n * @returns The generated string.\n */\nfunction makeRandomHex(length: number): string {\n let result = '';\n const characters = '0123456789abcdef';\n const charactersLength = characters.length;\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n\nexport const random = (options: { length: number }) => {\n return makeRandomHex(options.length);\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined,\n text: '',\n };\n};\n\n/**\n * Adds text to an element\n *\n * @param elem - SVG Element to add text to\n * @param textData - Text options.\n * @returns Text element with given styling and content\n */\nexport const drawSimpleText = function (\n elem: SVGElement,\n textData: {\n text: string;\n x: number;\n y: number;\n anchor: 'start' | 'middle' | 'end';\n fontFamily: string;\n fontSize: string | number;\n fontWeight: string | number;\n fill: string;\n class: string | undefined;\n textMargin: number;\n }\n): SVGTextElement {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const [, _fontSizePx] = parseFontSize(textData.fontSize);\n\n const textElem = elem.append('text') as any;\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', _fontSizePx);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\ninterface WrapLabelConfig {\n fontSize: number;\n fontFamily: string;\n fontWeight: number;\n joinWith: string;\n}\n\nexport const wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfig) => string =\n memoize(\n (label: string, maxWidth: number, config: WrapLabelConfig): string => {\n if (!label) {\n return label;\n }\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: '
    ' },\n config\n );\n if (common.lineBreakRegex.test(label)) {\n return label;\n }\n const words = label.split(' ').filter(Boolean);\n const completedLines: string[] = [];\n let nextLine = '';\n words.forEach((word, index) => {\n const wordLength = calculateTextWidth(`${word} `, config);\n const nextLineLength = calculateTextWidth(nextLine, config);\n if (wordLength > maxWidth) {\n const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, '-', config);\n completedLines.push(nextLine, ...hyphenatedStrings);\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n const currentWord = index + 1;\n const isLastWord = currentWord === words.length;\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter((line) => line !== '').join(config.joinWith);\n },\n (label, maxWidth, config) =>\n `${label}${maxWidth}${config.fontSize}${config.fontWeight}${config.fontFamily}${config.joinWith}`\n );\n\ninterface BreakStringOutput {\n hyphenatedStrings: string[];\n remainingWord: string;\n}\n\nconst breakString: (\n word: string,\n maxWidth: number,\n hyphenCharacter: string,\n config: WrapLabelConfig\n) => BreakStringOutput = memoize(\n (\n word: string,\n maxWidth: number,\n hyphenCharacter = '-',\n config: WrapLabelConfig\n ): BreakStringOutput => {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n config\n );\n const characters = [...word];\n const lines: string[] = [];\n let currentLine = '';\n characters.forEach((character, index) => {\n const nextLine = `${currentLine}${character}`;\n const lineWidth = calculateTextWidth(nextLine, config);\n if (lineWidth >= maxWidth) {\n const currentCharacter = index + 1;\n const isLastLine = characters.length === currentCharacter;\n const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return { hyphenatedStrings: lines, remainingWord: currentLine };\n },\n (word, maxWidth, hyphenCharacter = '-', config) =>\n `${word}${maxWidth}${hyphenCharacter}${config.fontSize}${config.fontWeight}${config.fontFamily}`\n);\n\n/**\n * This calculates the text's height, taking into account the wrap breaks and both the statically\n * configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's value won't overflow.\n *\n * @param text - The text to measure\n * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the\n * resulting size\n * @returns The height for the given text\n */\nexport function calculateTextHeight(\n text: Parameters[0],\n config: Parameters[1]\n): ReturnType['height'] {\n return calculateTextDimensions(text, config).height;\n}\n\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @param text - The text to calculate the width of\n * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the\n * resulting size\n * @returns The width for the given text\n */\nexport function calculateTextWidth(\n text: Parameters[0],\n config: Parameters[1]\n): ReturnType['width'] {\n return calculateTextDimensions(text, config).width;\n}\n\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and\n * margins.\n *\n * @param text - The text to calculate the width of\n * @param config - The config for fontSize, fontFamily, fontWeight, and margin all impacting\n * the resulting size\n * @returns The dimensions for the given text\n */\nexport const calculateTextDimensions: (\n text: string,\n config: TextDimensionConfig\n) => TextDimensions = memoize(\n (text: string, config: TextDimensionConfig): TextDimensions => {\n const { fontSize = 12, fontFamily = 'Arial', fontWeight = 400 } = config;\n if (!text) {\n return { width: 0, height: 0 };\n }\n\n const [, _fontSizePx] = parseFontSize(fontSize);\n\n // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n const fontFamilies = ['sans-serif', fontFamily];\n const lines = text.split(common.lineBreakRegex);\n const dims = [];\n\n const body = select('body');\n // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n if (!body.remove) {\n return { width: 0, height: 0, lineHeight: 0 };\n }\n\n const g = body.append('svg');\n\n for (const fontFamily of fontFamilies) {\n let cHeight = 0;\n const dim = { width: 0, height: 0, lineHeight: 0 };\n for (const line of lines) {\n const textObj = getTextObj();\n textObj.text = line || ZERO_WIDTH_SPACE;\n // @ts-ignore TODO: Fix D3 types\n const textElem = drawSimpleText(g, textObj)\n // @ts-ignore TODO: Fix D3 types\n .style('font-size', _fontSizePx)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n\n const bBox = (textElem._groups || textElem)[0][0].getBBox();\n if (bBox.width === 0 && bBox.height === 0) {\n throw new Error('svg element not in render tree');\n }\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cHeight = Math.round(bBox.height);\n dim.height += cHeight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cHeight));\n }\n dims.push(dim);\n }\n\n g.remove();\n\n const index =\n isNaN(dims[1].height) ||\n isNaN(dims[1].width) ||\n isNaN(dims[1].lineHeight) ||\n (dims[0].height > dims[1].height &&\n dims[0].width > dims[1].width &&\n dims[0].lineHeight > dims[1].lineHeight)\n ? 0\n : 1;\n return dims[index];\n },\n (text, config) => `${text}${config.fontSize}${config.fontWeight}${config.fontFamily}`\n);\n\nexport class InitIDGenerator {\n private count = 0;\n public next: () => number;\n constructor(deterministic = false, seed?: string) {\n // TODO: Seed is only used for length?\n // v11: Use the actual value of seed string to generate an initial value for count.\n this.count = seed ? seed.length : 0;\n this.next = deterministic ? () => this.count++ : () => Date.now();\n }\n}\n\nlet decoder: HTMLDivElement;\n\n/**\n * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js}\n *\n * @param html - HTML as a string\n * @returns Unescaped HTML\n */\nexport const entityDecode = function (html: string): string {\n decoder = decoder || document.createElement('div');\n // Escape HTML before decoding for HTML Entities\n html = escape(html).replace(/%26/g, '&').replace(/%23/g, '#').replace(/%3B/g, ';');\n decoder.innerHTML = html;\n\n return unescape(decoder.textContent!);\n};\n\nexport interface DetailedError {\n str: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hash: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error?: any;\n message?: string;\n}\n\n/** @param error - The error to check */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isDetailedError(error: any): error is DetailedError {\n return 'str' in error;\n}\n\n/** @param error - The error to convert to an error message */\nexport function getErrorMessage(error: unknown): string {\n if (error instanceof Error) {\n return error.message;\n }\n return String(error);\n}\n\n/**\n * Appends element with the given title and css class.\n *\n * @param parent - d3 svg object to append title to\n * @param cssClass - CSS class for the element containing the title\n * @param titleTopMargin - Margin in pixels between title and rest of the graph\n * @param title - The title. If empty, returns immediately.\n */\nexport const insertTitle = (\n parent: D3Element,\n cssClass: string,\n titleTopMargin: number,\n title?: string\n): void => {\n if (!title) {\n return;\n }\n const bounds = parent.node()?.getBBox();\n if (!bounds) {\n return;\n }\n parent\n .append('text')\n .text(title)\n .attr('x', bounds.x + bounds.width / 2)\n .attr('y', -titleTopMargin)\n .attr('class', cssClass);\n};\n\n/**\n * Parses a raw fontSize configuration value into a number and string value.\n *\n * @param fontSize - a string or number font size configuration value\n *\n * @returns parsed number and string style font size values, or nulls if a number value can't\n * be parsed from an input string.\n */\nexport const parseFontSize = (fontSize: string | number | undefined): [number?, string?] => {\n // if the font size is a number, assume a px string representation\n if (typeof fontSize === 'number') {\n return [fontSize, fontSize + 'px'];\n }\n\n const fontSizeNumber = parseInt(fontSize ?? '', 10);\n if (Number.isNaN(fontSizeNumber)) {\n // if a number value can't be parsed, return null for both values\n return [undefined, undefined];\n } else if (fontSize === String(fontSizeNumber)) {\n // if a string input doesn't contain any units, assume px units\n return [fontSizeNumber, fontSize + 'px'];\n } else {\n return [fontSizeNumber, fontSize];\n }\n};\n\nexport function cleanAndMerge(defaultData: T, data?: Partial): T {\n return merge({}, defaultData, data);\n}\n\nexport default {\n assignWithDepth,\n wrapLabel,\n calculateTextHeight,\n calculateTextWidth,\n calculateTextDimensions,\n cleanAndMerge,\n detectInit,\n detectDirective,\n isSubstringInArray,\n interpolateToCurve,\n calcLabelPosition,\n calcCardinalityPosition,\n calcTerminalLabelPosition,\n formatUrl,\n getStylesFromArray,\n generateId,\n random,\n runFunc,\n entityDecode,\n insertTitle,\n parseFontSize,\n InitIDGenerator,\n};\n\n/**\n * @param text - text to be encoded\n * @returns\n */\nexport const encodeEntities = function (text: string): string {\n let txt = text;\n\n txt = txt.replace(/style.*:\\S*#.*;/g, function (s): string {\n return s.substring(0, s.length - 1);\n });\n txt = txt.replace(/classDef.*:\\S*#.*;/g, function (s): string {\n return s.substring(0, s.length - 1);\n });\n\n txt = txt.replace(/#\\w+;/g, function (s) {\n const innerTxt = s.substring(1, s.length - 1);\n\n const isInt = /^\\+?\\d+$/.test(innerTxt);\n if (isInt) {\n return '\uFB02\u00B0\u00B0' + innerTxt + '\u00B6\u00DF';\n } else {\n return '\uFB02\u00B0' + innerTxt + '\u00B6\u00DF';\n }\n });\n\n return txt;\n};\n\n/**\n *\n * @param text - text to be decoded\n * @returns\n */\nexport const decodeEntities = function (text: string): string {\n return text.replace(/\uFB02\u00B0\u00B0/g, '&#').replace(/\uFB02\u00B0/g, '&').replace(/\u00B6\u00DF/g, ';');\n};\n\nexport const isString = (value: unknown): value is string => {\n return typeof value === 'string';\n};\n\nexport const getEdgeId = (\n from: string,\n to: string,\n {\n counter = 0,\n prefix,\n suffix,\n }: {\n counter?: number;\n prefix?: string;\n suffix?: string;\n }\n) => {\n return `${prefix ? `${prefix}_` : ''}${from}_${to}_${counter}${suffix ? `_${suffix}` : ''}`;\n};\n", "import { select } from 'd3';\nimport svgDraw from './svgDraw.js';\nimport { log } from '../../logger.js';\nimport { parser } from './parser/c4Diagram.jison';\nimport common from '../common/common.js';\nimport c4Db from './c4Db.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport assignWithDepth from '../../assignWithDepth.js';\nimport { wrapLabel, calculateTextWidth, calculateTextHeight } from '../../utils.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\nlet globalBoundaryMaxX = 0,\n globalBoundaryMaxY = 0;\n\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\n\nparser.yy = c4Db;\n\nlet conf = {};\n\nclass Bounds {\n constructor(diagObj) {\n this.name = '';\n this.data = {};\n this.data.startx = undefined;\n this.data.stopx = undefined;\n this.data.starty = undefined;\n this.data.stopy = undefined;\n this.data.widthLimit = undefined;\n\n this.nextData = {};\n this.nextData.startx = undefined;\n this.nextData.stopx = undefined;\n this.nextData.starty = undefined;\n this.nextData.stopy = undefined;\n this.nextData.cnt = 0;\n\n setConf(diagObj.db.getConfig());\n }\n\n setData(startx, stopx, starty, stopy) {\n this.nextData.startx = this.data.startx = startx;\n this.nextData.stopx = this.data.stopx = stopx;\n this.nextData.starty = this.data.starty = starty;\n this.nextData.stopy = this.data.stopy = stopy;\n }\n\n updateVal(obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n }\n\n insert(c4Shape) {\n this.nextData.cnt = this.nextData.cnt + 1;\n let _startx =\n this.nextData.startx === this.nextData.stopx\n ? this.nextData.stopx + c4Shape.margin\n : this.nextData.stopx + c4Shape.margin * 2;\n let _stopx = _startx + c4Shape.width;\n let _starty = this.nextData.starty + c4Shape.margin * 2;\n let _stopy = _starty + c4Shape.height;\n if (\n _startx >= this.data.widthLimit ||\n _stopx >= this.data.widthLimit ||\n this.nextData.cnt > c4ShapeInRow\n ) {\n _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;\n _starty = this.nextData.stopy + c4Shape.margin * 2;\n\n this.nextData.stopx = _stopx = _startx + c4Shape.width;\n this.nextData.starty = this.nextData.stopy;\n this.nextData.stopy = _stopy = _starty + c4Shape.height;\n this.nextData.cnt = 1;\n }\n\n c4Shape.x = _startx;\n c4Shape.y = _starty;\n\n this.updateVal(this.data, 'startx', _startx, Math.min);\n this.updateVal(this.data, 'starty', _starty, Math.min);\n this.updateVal(this.data, 'stopx', _stopx, Math.max);\n this.updateVal(this.data, 'stopy', _stopy, Math.max);\n\n this.updateVal(this.nextData, 'startx', _startx, Math.min);\n this.updateVal(this.nextData, 'starty', _starty, Math.min);\n this.updateVal(this.nextData, 'stopx', _stopx, Math.max);\n this.updateVal(this.nextData, 'stopy', _stopy, Math.max);\n }\n\n init(diagObj) {\n this.name = '';\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n widthLimit: undefined,\n };\n this.nextData = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n cnt: 0,\n };\n setConf(diagObj.db.getConfig());\n }\n\n bumpLastMargin(margin) {\n this.data.stopx += margin;\n this.data.stopy += margin;\n }\n}\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst c4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst boundaryFont = (cnf) => {\n return {\n fontFamily: cnf.boundaryFontFamily,\n fontSize: cnf.boundaryFontSize,\n fontWeight: cnf.boundaryFontWeight,\n };\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\n\n/**\n * @param textType\n * @param c4Shape\n * @param c4ShapeTextWrap\n * @param textConf\n * @param textLimitWidth\n */\nfunction calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {\n if (!c4Shape[textType].width) {\n if (c4ShapeTextWrap) {\n c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);\n c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length;\n // c4Shape[textType].width = calculateTextWidth(c4Shape[textType].text, textConf);\n c4Shape[textType].width = textLimitWidth;\n // c4Shape[textType].height = c4Shape[textType].textLines * textConf.fontSize;\n c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);\n } else {\n let lines = c4Shape[textType].text.split(common.lineBreakRegex);\n c4Shape[textType].textLines = lines.length;\n let lineHeight = 0;\n c4Shape[textType].height = 0;\n c4Shape[textType].width = 0;\n for (const line of lines) {\n c4Shape[textType].width = Math.max(\n calculateTextWidth(line, textConf),\n c4Shape[textType].width\n );\n lineHeight = calculateTextHeight(line, textConf);\n c4Shape[textType].height = c4Shape[textType].height + lineHeight;\n }\n // c4Shapes[textType].height = c4Shapes[textType].textLines * textConf.fontSize;\n }\n }\n}\n\nexport const drawBoundary = function (diagram, boundary, bounds) {\n boundary.x = bounds.data.startx;\n boundary.y = bounds.data.starty;\n boundary.width = bounds.data.stopx - bounds.data.startx;\n boundary.height = bounds.data.stopy - bounds.data.starty;\n\n boundary.label.y = conf.c4ShapeMargin - 35;\n\n let boundaryTextWrap = boundary.wrap && conf.wrap;\n let boundaryLabelConf = boundaryFont(conf);\n boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;\n boundaryLabelConf.fontWeight = 'bold';\n let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);\n calcC4ShapeTextWH('label', boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);\n\n svgDraw.drawBoundary(diagram, boundary, conf);\n};\n\nexport const drawC4ShapeArray = function (currentBounds, diagram, c4ShapeArray, c4ShapeKeys) {\n // Upper Y is relative point\n let Y = 0;\n // Draw the c4ShapeArray\n for (const c4ShapeKey of c4ShapeKeys) {\n Y = 0;\n const c4Shape = c4ShapeArray[c4ShapeKey];\n\n // calc c4 shape type width and height\n\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;\n c4Shape.typeC4Shape.width = calculateTextWidth(\n '\u00AB' + c4Shape.typeC4Shape.text + '\u00BB',\n c4ShapeTypeConf\n );\n c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;\n c4Shape.typeC4Shape.Y = conf.c4ShapePadding;\n Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;\n\n // set image width and height c4Shape.x + c4Shape.width / 2 - 24, c4Shape.y + 28\n // let imageWidth = 0,\n // imageHeight = 0,\n // imageY = 0;\n //\n c4Shape.image = { width: 0, height: 0, Y: 0 };\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n break;\n }\n if (c4Shape.sprite) {\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n }\n\n // Y = conf.c4ShapePadding + c4Shape.image.height;\n\n let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;\n let textLimitWidth = conf.width - conf.c4ShapePadding * 2;\n\n let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;\n c4ShapeLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH('label', c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);\n c4Shape.label.Y = Y + 8;\n Y = c4Shape.label.Y + c4Shape.label.height;\n\n if (c4Shape.type && c4Shape.type.text !== '') {\n c4Shape.type.text = '[' + c4Shape.type.text + ']';\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('type', c4Shape, c4ShapeTextWrap, c4ShapeTypeConf, textLimitWidth);\n c4Shape.type.Y = Y + 5;\n Y = c4Shape.type.Y + c4Shape.type.height;\n } else if (c4Shape.techn && c4Shape.techn.text !== '') {\n c4Shape.techn.text = '[' + c4Shape.techn.text + ']';\n let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);\n calcC4ShapeTextWH('techn', c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);\n c4Shape.techn.Y = Y + 5;\n Y = c4Shape.techn.Y + c4Shape.techn.height;\n }\n\n let rectHeight = Y;\n let rectWidth = c4Shape.label.width;\n\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('descr', c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);\n c4Shape.descr.Y = Y + 20;\n Y = c4Shape.descr.Y + c4Shape.descr.height;\n\n rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);\n rectHeight = Y - c4Shape.descr.textLines * 5;\n }\n\n rectWidth = rectWidth + conf.c4ShapePadding;\n // let rectHeight =\n\n c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);\n c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);\n c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;\n\n currentBounds.insert(c4Shape);\n\n svgDraw.drawC4Shape(diagram, c4Shape, conf);\n }\n\n currentBounds.bumpLastMargin(conf.c4ShapeMargin);\n};\n\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\n\n/* * *\n * Get the intersection of the line between the center point of a rectangle and a point outside the rectangle.\n * Algorithm idea.\n * Using a point outside the rectangle as the coordinate origin, the graph is divided into four quadrants, and each quadrant is divided into two cases, with separate treatment on the coordinate axes\n * 1. The case of coordinate axes.\n * 1. The case of the negative x-axis\n * 2. The case of the positive x-axis\n * 3. The case of the positive y-axis\n * 4. The negative y-axis case\n * 2. Quadrant cases.\n * 2.1. first quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the lower side of the rectangle\n * 2.2. second quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the lower edge of the rectangle\n * 2.3. third quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the upper edge of the rectangle\n * 2.4. fourth quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the upper side of the rectangle\n *\n */\nlet getIntersectPoint = function (fromNode, endPoint) {\n let x1 = fromNode.x;\n\n let y1 = fromNode.y;\n\n let x2 = endPoint.x;\n\n let y2 = endPoint.y;\n\n let fromCenterX = x1 + fromNode.width / 2;\n\n let fromCenterY = y1 + fromNode.height / 2;\n\n let dx = Math.abs(x1 - x2);\n\n let dy = Math.abs(y1 - y2);\n\n let tanDYX = dy / dx;\n\n let fromDYX = fromNode.height / fromNode.width;\n\n let returnPoint = null;\n\n if (y1 == y2 && x1 < x2) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY);\n } else if (y1 == y2 && x1 > x2) {\n returnPoint = new Point(x1, fromCenterY);\n } else if (x1 == x2 && y1 < y2) {\n returnPoint = new Point(fromCenterX, y1 + fromNode.height);\n } else if (x1 == x2 && y1 > y2) {\n returnPoint = new Point(fromCenterX, y1);\n }\n\n if (x1 > x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX - ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 < y2) {\n //\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX + ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY - (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(fromCenterX + ((fromNode.height / 2) * dx) / dy, y1);\n }\n } else if (x1 > x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY - (fromNode.width / 2) * tanDYX);\n } else {\n returnPoint = new Point(fromCenterX - ((fromNode.height / 2) * dx) / dy, y1);\n }\n }\n return returnPoint;\n};\n\nlet getIntersectPoints = function (fromNode, endNode) {\n let endIntersectPoint = { x: 0, y: 0 };\n endIntersectPoint.x = endNode.x + endNode.width / 2;\n endIntersectPoint.y = endNode.y + endNode.height / 2;\n let startPoint = getIntersectPoint(fromNode, endIntersectPoint);\n\n endIntersectPoint.x = fromNode.x + fromNode.width / 2;\n endIntersectPoint.y = fromNode.y + fromNode.height / 2;\n let endPoint = getIntersectPoint(endNode, endIntersectPoint);\n return { startPoint: startPoint, endPoint: endPoint };\n};\n\nexport const drawRels = function (diagram, rels, getC4ShapeObj, diagObj) {\n let i = 0;\n for (let rel of rels) {\n i = i + 1;\n let relTextWrap = rel.wrap && conf.wrap;\n let relConf = messageFont(conf);\n let diagramType = diagObj.db.getC4Type();\n if (diagramType === 'C4Dynamic') {\n rel.label.text = i + ': ' + rel.label.text;\n }\n let textLimitWidth = calculateTextWidth(rel.label.text, relConf);\n calcC4ShapeTextWH('label', rel, relTextWrap, relConf, textLimitWidth);\n\n if (rel.techn && rel.techn.text !== '') {\n textLimitWidth = calculateTextWidth(rel.techn.text, relConf);\n calcC4ShapeTextWH('techn', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n if (rel.descr && rel.descr.text !== '') {\n textLimitWidth = calculateTextWidth(rel.descr.text, relConf);\n calcC4ShapeTextWH('descr', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n let fromNode = getC4ShapeObj(rel.from);\n let endNode = getC4ShapeObj(rel.to);\n let points = getIntersectPoints(fromNode, endNode);\n rel.startPoint = points.startPoint;\n rel.endPoint = points.endPoint;\n }\n svgDraw.drawRels(diagram, rels, conf);\n};\n\n/**\n * @param diagram\n * @param parentBoundaryAlias\n * @param parentBounds\n * @param currentBoundaries\n * @param diagObj\n */\nfunction drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n parentBounds,\n currentBoundaries,\n diagObj\n) {\n let currentBounds = new Bounds(diagObj);\n // Calculate the width limit of the boundary. label/type \u7684\u957F\u5EA6\uFF0C\n currentBounds.data.widthLimit =\n parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundaries.length);\n // Math.min(\n // conf.width * conf.c4ShapeInRow + conf.c4ShapeMargin * conf.c4ShapeInRow * 2,\n // parentBounds.data.widthLimit / Math.min(conf.c4BoundaryInRow, currentBoundaries.length)\n // );\n for (let [i, currentBoundary] of currentBoundaries.entries()) {\n let Y = 0;\n currentBoundary.image = { width: 0, height: 0, Y: 0 };\n if (currentBoundary.sprite) {\n currentBoundary.image.width = 48;\n currentBoundary.image.height = 48;\n currentBoundary.image.Y = Y;\n Y = currentBoundary.image.Y + currentBoundary.image.height;\n }\n\n let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;\n\n let currentBoundaryLabelConf = boundaryFont(conf);\n currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;\n currentBoundaryLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH(\n 'label',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryLabelConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.label.Y = Y + 8;\n Y = currentBoundary.label.Y + currentBoundary.label.height;\n\n if (currentBoundary.type && currentBoundary.type.text !== '') {\n currentBoundary.type.text = '[' + currentBoundary.type.text + ']';\n let currentBoundaryTypeConf = boundaryFont(conf);\n calcC4ShapeTextWH(\n 'type',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryTypeConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.type.Y = Y + 5;\n Y = currentBoundary.type.Y + currentBoundary.type.height;\n }\n\n if (currentBoundary.descr && currentBoundary.descr.text !== '') {\n let currentBoundaryDescrConf = boundaryFont(conf);\n currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;\n calcC4ShapeTextWH(\n 'descr',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryDescrConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.descr.Y = Y + 20;\n Y = currentBoundary.descr.Y + currentBoundary.descr.height;\n }\n\n if (i == 0 || i % c4BoundaryInRow === 0) {\n // Calculate the drawing start point of the currentBoundaries.\n let _x = parentBounds.data.startx + conf.diagramMarginX;\n let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;\n\n currentBounds.setData(_x, _x, _y, _y);\n } else {\n // Calculate the drawing start point of the currentBoundaries.\n let _x =\n currentBounds.data.stopx !== currentBounds.data.startx\n ? currentBounds.data.stopx + conf.diagramMarginX\n : currentBounds.data.startx;\n let _y = currentBounds.data.starty;\n\n currentBounds.setData(_x, _x, _y, _y);\n }\n currentBounds.name = currentBoundary.alias;\n let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);\n let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);\n\n if (currentPersonOrSystemKeys.length > 0) {\n drawC4ShapeArray(\n currentBounds,\n diagram,\n currentPersonOrSystemArray,\n currentPersonOrSystemKeys\n );\n }\n parentBoundaryAlias = currentBoundary.alias;\n let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias);\n\n if (nextCurrentBoundaries.length > 0) {\n // draw boundary inside currentBoundary\n drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n currentBounds,\n nextCurrentBoundaries,\n diagObj\n );\n }\n // draw boundary\n if (currentBoundary.alias !== 'global') {\n drawBoundary(diagram, currentBoundary, currentBounds);\n }\n parentBounds.data.stopy = Math.max(\n currentBounds.data.stopy + conf.c4ShapeMargin,\n parentBounds.data.stopy\n );\n parentBounds.data.stopx = Math.max(\n currentBounds.data.stopx + conf.c4ShapeMargin,\n parentBounds.data.stopx\n );\n globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);\n globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);\n }\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param {any} _text\n * @param {any} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (_text, id, _version, diagObj) {\n conf = getConfig().c4;\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n let db = diagObj.db;\n\n diagObj.db.setWrap(conf.wrap);\n\n c4ShapeInRow = db.getC4ShapeInRow();\n c4BoundaryInRow = db.getC4BoundaryInRow();\n\n log.debug(`C:${JSON.stringify(conf, null, 2)}`);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n let screenBounds = new Bounds(diagObj);\n\n screenBounds.setData(\n conf.diagramMarginX,\n conf.diagramMarginX,\n conf.diagramMarginY,\n conf.diagramMarginY\n );\n\n screenBounds.data.widthLimit = screen.availWidth;\n globalBoundaryMaxX = conf.diagramMarginX;\n globalBoundaryMaxY = conf.diagramMarginY;\n\n const title = diagObj.db.getTitle();\n let currentBoundaries = diagObj.db.getBoundarys('');\n // switch (c4type) {\n // case 'C4Context':\n drawInsideBoundary(diagram, '', screenBounds, currentBoundaries, diagObj);\n // break;\n // }\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowEnd(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n\n drawRels(diagram, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);\n\n screenBounds.data.stopx = globalBoundaryMaxX;\n screenBounds.data.stopy = globalBoundaryMaxY;\n\n const box = screenBounds.data;\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX)\n .attr('y', box.starty + conf.diagramMarginY);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 60 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n log.debug(`models:`, box);\n};\n\nexport default {\n drawPersonOrSystemArray: drawC4ShapeArray,\n drawBoundary,\n setConf,\n draw,\n};\n", "const getStyles = (options) =>\n `.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n }\n`;\n\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/c4Diagram.jison';\nimport db from './c4Db.js';\nimport renderer from './c4Renderer.js';\nimport styles from './styles.js';\nimport type { MermaidConfig } from '../../config.type.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: ({ c4, wrap }: MermaidConfig) => {\n renderer.setConf(c4);\n db.setWrap(wrap);\n },\n};\n", "import { select } from 'd3';\nimport utils, { getEdgeId } from '../../utils.js';\nimport { getConfig, defaultConfig } from '../../diagram-api/diagramAPI.js';\nimport common from '../common/common.js';\nimport type { Node, Edge } from '../../rendering-util/types.js';\nimport { log } from '../../logger.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport type { FlowVertex, FlowClass, FlowSubGraph, FlowText, FlowEdge, FlowLink } from './types.js';\n\nconst MERMAID_DOM_ID_PREFIX = 'flowchart-';\nlet vertexCounter = 0;\nlet config = getConfig();\nlet vertices = new Map();\nlet edges: FlowEdge[] & { defaultInterpolate?: string; defaultStyle?: string[] } = [];\nlet classes = new Map();\nlet subGraphs: FlowSubGraph[] = [];\nlet subGraphLookup = new Map();\nlet tooltips = new Map();\nlet subCount = 0;\nlet firstGraphFlag = true;\nlet direction: string;\n\nlet version: string; // As in graph\n\n// Functions to be run after graph rendering\nlet funs: ((element: Element) => void)[] = []; // cspell:ignore funs\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, config);\n\n/**\n * Function to lookup domId from id in the graph definition.\n *\n * @param id - id of the node\n */\nexport const lookUpDomId = function (id: string) {\n for (const vertex of vertices.values()) {\n if (vertex.id === id) {\n return vertex.domId;\n }\n }\n return id;\n};\n\n/**\n * Function called by parser when a node definition has been found\n *\n */\nexport const addVertex = function (\n id: string,\n textObj: FlowText,\n type: 'group',\n style: string[],\n classes: string[],\n dir: string,\n props = {}\n) {\n if (!id || id.trim().length === 0) {\n return;\n }\n let txt;\n\n let vertex = vertices.get(id);\n if (vertex === undefined) {\n vertex = {\n id,\n labelType: 'text',\n domId: MERMAID_DOM_ID_PREFIX + id + '-' + vertexCounter,\n styles: [],\n classes: [],\n };\n vertices.set(id, vertex);\n }\n vertexCounter++;\n\n if (textObj !== undefined) {\n config = getConfig();\n txt = sanitizeText(textObj.text.trim());\n vertex.labelType = textObj.type;\n // strip quotes if string starts and ends with a quote\n if (txt.startsWith('\"') && txt.endsWith('\"')) {\n txt = txt.substring(1, txt.length - 1);\n }\n vertex.text = txt;\n } else {\n if (vertex.text === undefined) {\n vertex.text = id;\n }\n }\n if (type !== undefined) {\n vertex.type = type;\n }\n if (style !== undefined && style !== null) {\n style.forEach(function (s) {\n vertex.styles.push(s);\n });\n }\n if (classes !== undefined && classes !== null) {\n classes.forEach(function (s) {\n vertex.classes.push(s);\n });\n }\n if (dir !== undefined) {\n vertex.dir = dir;\n }\n if (vertex.props === undefined) {\n vertex.props = props;\n } else if (props !== undefined) {\n Object.assign(vertex.props, props);\n }\n};\n\n/**\n * Function called by parser when a link/edge definition has been found\n *\n */\nexport const addSingleLink = function (_start: string, _end: string, type: any) {\n const start = _start;\n const end = _end;\n\n const edge: FlowEdge = { start: start, end: end, type: undefined, text: '', labelType: 'text' };\n log.info('abc78 Got edge...', edge);\n const linkTextObj = type.text;\n\n if (linkTextObj !== undefined) {\n edge.text = sanitizeText(linkTextObj.text.trim());\n\n // strip quotes if string starts and ends with a quote\n if (edge.text.startsWith('\"') && edge.text.endsWith('\"')) {\n edge.text = edge.text.substring(1, edge.text.length - 1);\n }\n edge.labelType = linkTextObj.type;\n }\n\n if (type !== undefined) {\n edge.type = type.type;\n edge.stroke = type.stroke;\n edge.length = type.length > 10 ? 10 : type.length;\n }\n\n if (edges.length < (config.maxEdges ?? 500)) {\n log.info('Pushing edge...');\n edges.push(edge);\n } else {\n throw new Error(\n `Edge limit exceeded. ${edges.length} edges found, but the limit is ${config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`\n );\n }\n};\n\nexport const addLink = function (_start: string[], _end: string[], type: unknown) {\n log.info('addLink', _start, _end, type);\n for (const start of _start) {\n for (const end of _end) {\n addSingleLink(start, end, type);\n }\n }\n};\n\n/**\n * Updates a link's line interpolation algorithm\n *\n */\nexport const updateLinkInterpolate = function (\n positions: ('default' | number)[],\n interpolate: string\n) {\n positions.forEach(function (pos) {\n if (pos === 'default') {\n edges.defaultInterpolate = interpolate;\n } else {\n edges[pos].interpolate = interpolate;\n }\n });\n};\n\n/**\n * Updates a link with a style\n *\n */\nexport const updateLink = function (positions: ('default' | number)[], style: string[]) {\n positions.forEach(function (pos) {\n if (typeof pos === 'number' && pos >= edges.length) {\n throw new Error(\n `The index ${pos} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${\n edges.length - 1\n }. (Help: Ensure that the index is within the range of existing edges.)`\n );\n }\n if (pos === 'default') {\n edges.defaultStyle = style;\n } else {\n // if (utils.isSubstringInArray('fill', style) === -1) {\n // style.push('fill:none');\n // }\n edges[pos].style = style;\n // if edges[pos].style does have fill not set, set it to none\n if (\n (edges[pos]?.style?.length ?? 0) > 0 &&\n !edges[pos]?.style?.some((s) => s?.startsWith('fill'))\n ) {\n edges[pos]?.style?.push('fill:none');\n }\n }\n });\n};\n\nexport const addClass = function (ids: string, style: string[]) {\n ids.split(',').forEach(function (id) {\n let classNode = classes.get(id);\n if (classNode === undefined) {\n classNode = { id, styles: [], textStyles: [] };\n classes.set(id, classNode);\n }\n\n if (style !== undefined && style !== null) {\n style.forEach(function (s) {\n if (/color/.exec(s)) {\n const newStyle = s.replace('fill', 'bgFill'); // .replace('color', 'fill');\n classNode.textStyles.push(newStyle);\n }\n classNode.styles.push(s);\n });\n }\n });\n};\n\n/**\n * Called by parser when a graph definition is found, stores the direction of the chart.\n *\n */\nexport const setDirection = function (dir: string) {\n direction = dir;\n if (/.*/.exec(direction)) {\n direction = 'LR';\n }\n if (/.*v/.exec(direction)) {\n direction = 'TB';\n }\n if (direction === 'TD') {\n direction = 'TB';\n }\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids - Comma separated list of ids\n * @param className - Class to add\n */\nexport const setClass = function (ids: string, className: string) {\n for (const id of ids.split(',')) {\n const vertex = vertices.get(id);\n if (vertex) {\n vertex.classes.push(className);\n }\n const subGraph = subGraphLookup.get(id);\n if (subGraph) {\n subGraph.classes.push(className);\n }\n }\n};\n\nconst setTooltip = function (ids: string, tooltip: string) {\n if (tooltip === undefined) {\n return;\n }\n tooltip = sanitizeText(tooltip);\n for (const id of ids.split(',')) {\n tooltips.set(version === 'gen-1' ? lookUpDomId(id) : id, tooltip);\n }\n};\n\nconst setClickFun = function (id: string, functionName: string, functionArgs: string) {\n const domId = lookUpDomId(id);\n // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (getConfig().securityLevel !== 'loose') {\n return;\n }\n if (functionName === undefined) {\n return;\n }\n let argList: string[] = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n const vertex = vertices.get(id);\n if (vertex) {\n vertex.haveCallback = true;\n funs.push(function () {\n const elem = document.querySelector(`[id=\"${domId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids - Comma separated list of ids\n * @param linkStr - URL to create a link for\n * @param target - Target attribute for the link\n */\nexport const setLink = function (ids: string, linkStr: string, target: string) {\n ids.split(',').forEach(function (id) {\n const vertex = vertices.get(id);\n if (vertex !== undefined) {\n vertex.link = utils.formatUrl(linkStr, config);\n vertex.linkTarget = target;\n }\n });\n setClass(ids, 'clickable');\n};\n\nexport const getTooltip = function (id: string) {\n return tooltips.get(id);\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids - Comma separated list of ids\n * @param functionName - Function to be called on click\n * @param functionArgs - Arguments to be passed to the function\n */\nexport const setClickEvent = function (ids: string, functionName: string, functionArgs: string) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\nexport const bindFunctions = function (element: Element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\nexport const getDirection = function () {\n return direction.trim();\n};\n/**\n * Retrieval function for fetching the found nodes after parsing has completed.\n *\n */\nexport const getVertices = function () {\n return vertices;\n};\n\n/**\n * Retrieval function for fetching the found links after parsing has completed.\n *\n */\nexport const getEdges = function () {\n return edges;\n};\n\n/**\n * Retrieval function for fetching the found class definitions after parsing has completed.\n *\n */\nexport const getClasses = function () {\n return classes;\n};\n\nconst setupToolTips = function (element: Element) {\n let tooltipElem = select('.mermaidTooltip');\n // @ts-ignore TODO: fix this\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n // @ts-ignore TODO: fix this\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n\n // Don't try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n const rect = (this as Element)?.getBoundingClientRect();\n\n // @ts-ignore TODO: fix this\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .text(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.bottom + 'px');\n tooltipElem.html(tooltipElem.html().replace(/<br\\/>/g, '
    '));\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n // @ts-ignore TODO: fix this\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfuns.push(setupToolTips);\n\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n *\n */\nexport const clear = function (ver = 'gen-1') {\n vertices = new Map();\n classes = new Map();\n edges = [];\n funs = [setupToolTips];\n subGraphs = [];\n subGraphLookup = new Map();\n subCount = 0;\n tooltips = new Map();\n firstGraphFlag = true;\n version = ver;\n config = getConfig();\n commonClear();\n};\n\nexport const setGen = (ver: string) => {\n version = ver || 'gen-2';\n};\n\nexport const defaultStyle = function () {\n return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';\n};\n\nexport const addSubGraph = function (\n _id: { text: string },\n list: string[],\n _title: { text: string; type: string }\n) {\n let id: string | undefined = _id.text.trim();\n let title = _title.text;\n if (_id === _title && /\\s/.exec(_title.text)) {\n id = undefined;\n }\n\n function uniq(a: any[]) {\n const prims: any = { boolean: {}, number: {}, string: {} };\n const objs: any[] = [];\n\n let dir; // = undefined; direction.trim();\n const nodeList = a.filter(function (item) {\n const type = typeof item;\n if (item.stmt && item.stmt === 'dir') {\n dir = item.value;\n return false;\n }\n if (item.trim() === '') {\n return false;\n }\n if (type in prims) {\n return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);\n } else {\n return objs.includes(item) ? false : objs.push(item);\n }\n });\n return { nodeList, dir };\n }\n\n const { nodeList, dir } = uniq(list.flat());\n if (version === 'gen-1') {\n for (let i = 0; i < nodeList.length; i++) {\n nodeList[i] = lookUpDomId(nodeList[i]);\n }\n }\n\n id = id ?? 'subGraph' + subCount;\n title = title || '';\n title = sanitizeText(title);\n subCount = subCount + 1;\n const subGraph = {\n id: id,\n nodes: nodeList,\n title: title.trim(),\n classes: [],\n dir,\n labelType: _title.type,\n };\n\n log.info('Adding', subGraph.id, subGraph.nodes, subGraph.dir);\n\n // Remove the members in the new subgraph if they already belong to another subgraph\n subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;\n subGraphs.push(subGraph);\n subGraphLookup.set(id, subGraph);\n return id;\n};\n\nconst getPosForId = function (id: string) {\n for (const [i, subGraph] of subGraphs.entries()) {\n if (subGraph.id === id) {\n return i;\n }\n }\n return -1;\n};\nlet secCount = -1;\nconst posCrossRef: number[] = [];\nconst indexNodes2 = function (id: string, pos: number): { result: boolean; count: number } {\n const nodes = subGraphs[pos].nodes;\n secCount = secCount + 1;\n if (secCount > 2000) {\n return {\n result: false,\n count: 0,\n };\n }\n posCrossRef[secCount] = pos;\n // Check if match\n if (subGraphs[pos].id === id) {\n return {\n result: true,\n count: 0,\n };\n }\n\n let count = 0;\n let posCount = 1;\n while (count < nodes.length) {\n const childPos = getPosForId(nodes[count]);\n // Ignore regular nodes (pos will be -1)\n if (childPos >= 0) {\n const res = indexNodes2(id, childPos);\n if (res.result) {\n return {\n result: true,\n count: posCount + res.count,\n };\n } else {\n posCount = posCount + res.count;\n }\n }\n count = count + 1;\n }\n\n return {\n result: false,\n count: posCount,\n };\n};\n\nexport const getDepthFirstPos = function (pos: number) {\n return posCrossRef[pos];\n};\nexport const indexNodes = function () {\n secCount = -1;\n if (subGraphs.length > 0) {\n indexNodes2('none', subGraphs.length - 1);\n }\n};\n\nexport const getSubGraphs = function () {\n return subGraphs;\n};\n\nexport const firstGraph = () => {\n if (firstGraphFlag) {\n firstGraphFlag = false;\n return true;\n }\n return false;\n};\n\nconst destructStartLink = (_str: string): FlowLink => {\n let str = _str.trim();\n let type = 'arrow_open';\n\n switch (str[0]) {\n case '<':\n type = 'arrow_point';\n str = str.slice(1);\n break;\n case 'x':\n type = 'arrow_cross';\n str = str.slice(1);\n break;\n case 'o':\n type = 'arrow_circle';\n str = str.slice(1);\n break;\n }\n\n let stroke = 'normal';\n\n if (str.includes('=')) {\n stroke = 'thick';\n }\n\n if (str.includes('.')) {\n stroke = 'dotted';\n }\n\n return { type, stroke };\n};\n\nconst countChar = (char: string, str: string) => {\n const length = str.length;\n let count = 0;\n for (let i = 0; i < length; ++i) {\n if (str[i] === char) {\n ++count;\n }\n }\n return count;\n};\n\nconst destructEndLink = (_str: string) => {\n const str = _str.trim();\n let line = str.slice(0, -1);\n let type = 'arrow_open';\n\n switch (str.slice(-1)) {\n case 'x':\n type = 'arrow_cross';\n if (str.startsWith('x')) {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n case '>':\n type = 'arrow_point';\n if (str.startsWith('<')) {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n case 'o':\n type = 'arrow_circle';\n if (str.startsWith('o')) {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n }\n\n let stroke = 'normal';\n let length = line.length - 1;\n\n if (line.startsWith('=')) {\n stroke = 'thick';\n }\n\n if (line.startsWith('~')) {\n stroke = 'invisible';\n }\n\n const dots = countChar('.', line);\n\n if (dots) {\n stroke = 'dotted';\n length = dots;\n }\n\n return { type, stroke, length };\n};\n\nexport const destructLink = (_str: string, _startStr: string) => {\n const info = destructEndLink(_str);\n let startInfo;\n if (_startStr) {\n startInfo = destructStartLink(_startStr);\n\n if (startInfo.stroke !== info.stroke) {\n return { type: 'INVALID', stroke: 'INVALID' };\n }\n\n if (startInfo.type === 'arrow_open') {\n // -- xyz --> - take arrow type from ending\n startInfo.type = info.type;\n } else {\n // x-- xyz --> - not supported\n if (startInfo.type !== info.type) {\n return { type: 'INVALID', stroke: 'INVALID' };\n }\n\n startInfo.type = 'double_' + startInfo.type;\n }\n\n if (startInfo.type === 'double_arrow') {\n startInfo.type = 'double_arrow_point';\n }\n\n startInfo.length = info.length;\n return startInfo;\n }\n\n return info;\n};\n\n// Todo optimizer this by caching existing nodes\nconst exists = (allSgs: FlowSubGraph[], _id: string) => {\n for (const sg of allSgs) {\n if (sg.nodes.includes(_id)) {\n return true;\n }\n }\n return false;\n};\n/**\n * Deletes an id from all subgraphs\n *\n */\nconst makeUniq = (sg: FlowSubGraph, allSubgraphs: FlowSubGraph[]) => {\n const res: string[] = [];\n sg.nodes.forEach((_id, pos) => {\n if (!exists(allSubgraphs, _id)) {\n res.push(sg.nodes[pos]);\n }\n });\n return { nodes: res };\n};\n\nexport const lex = {\n firstGraph,\n};\n\nconst getTypeFromVertex = (vertex: FlowVertex) => {\n if (vertex.type === 'square') {\n return 'squareRect';\n }\n if (vertex.type === 'round') {\n return 'roundedRect';\n }\n\n return vertex.type ?? 'squareRect';\n};\n\nconst findNode = (nodes: Node[], id: string) => nodes.find((node) => node.id === id);\nconst destructEdgeType = (type: string | undefined) => {\n let arrowTypeStart = 'none';\n let arrowTypeEnd = 'arrow_point';\n switch (type) {\n case 'arrow_point':\n case 'arrow_circle':\n case 'arrow_cross':\n arrowTypeEnd = type;\n break;\n\n case 'double_arrow_point':\n case 'double_arrow_circle':\n case 'double_arrow_cross':\n arrowTypeStart = type.replace('double_', '');\n arrowTypeEnd = arrowTypeStart;\n break;\n }\n return { arrowTypeStart, arrowTypeEnd };\n};\n\nconst addNodeFromVertex = (\n vertex: FlowVertex,\n nodes: Node[],\n parentDB: Map,\n subGraphDB: Map,\n config: any,\n look: string\n) => {\n const parentId = parentDB.get(vertex.id);\n const isGroup = subGraphDB.get(vertex.id) ?? false;\n\n const node = findNode(nodes, vertex.id);\n if (node) {\n node.cssStyles = vertex.styles;\n node.cssCompiledStyles = getCompiledStyles(vertex.classes);\n node.cssClasses = vertex.classes.join(' ');\n } else {\n nodes.push({\n id: vertex.id,\n label: vertex.text,\n labelStyle: '',\n parentId,\n padding: config.flowchart?.padding || 8,\n cssStyles: vertex.styles,\n cssCompiledStyles: getCompiledStyles(['default', 'node', ...vertex.classes]),\n cssClasses: 'default ' + vertex.classes.join(' '),\n shape: getTypeFromVertex(vertex),\n dir: vertex.dir,\n domId: vertex.domId,\n isGroup,\n look,\n link: vertex.link,\n linkTarget: vertex.linkTarget,\n tooltip: getTooltip(vertex.id),\n });\n }\n};\n\nfunction getCompiledStyles(classDefs: string[]) {\n let compiledStyles: string[] = [];\n for (const customClass of classDefs) {\n const cssClass = classes.get(customClass);\n if (cssClass?.styles) {\n compiledStyles = [...compiledStyles, ...(cssClass.styles ?? [])].map((s) => s.trim());\n }\n if (cssClass?.textStyles) {\n compiledStyles = [...compiledStyles, ...(cssClass.textStyles ?? [])].map((s) => s.trim());\n }\n }\n return compiledStyles;\n}\n\nexport const getData = () => {\n const config = getConfig();\n const nodes: Node[] = [];\n const edges: Edge[] = [];\n\n const subGraphs = getSubGraphs();\n const parentDB = new Map();\n const subGraphDB = new Map();\n\n // Setup the subgraph data for adding nodes\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n const subGraph = subGraphs[i];\n if (subGraph.nodes.length > 0) {\n subGraphDB.set(subGraph.id, true);\n }\n for (const id of subGraph.nodes) {\n parentDB.set(id, subGraph.id);\n }\n }\n\n // Data is setup, add the nodes\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n const subGraph = subGraphs[i];\n nodes.push({\n id: subGraph.id,\n label: subGraph.title,\n labelStyle: '',\n parentId: parentDB.get(subGraph.id),\n padding: 8,\n cssCompiledStyles: getCompiledStyles(subGraph.classes),\n cssClasses: subGraph.classes.join(' '),\n shape: 'rect',\n dir: subGraph.dir,\n isGroup: true,\n look: config.look,\n });\n }\n\n const n = getVertices();\n n.forEach((vertex) => {\n addNodeFromVertex(vertex, nodes, parentDB, subGraphDB, config, config.look || 'classic');\n });\n\n const e = getEdges();\n e.forEach((rawEdge, index) => {\n const { arrowTypeStart, arrowTypeEnd } = destructEdgeType(rawEdge.type);\n const styles = [...(e.defaultStyle ?? [])];\n\n if (rawEdge.style) {\n styles.push(...rawEdge.style);\n }\n const edge: Edge = {\n id: getEdgeId(rawEdge.start, rawEdge.end, { counter: index, prefix: 'L' }),\n start: rawEdge.start,\n end: rawEdge.end,\n type: rawEdge.type ?? 'normal',\n label: rawEdge.text,\n labelpos: 'c',\n thickness: rawEdge.stroke,\n minlen: rawEdge.length,\n classes:\n rawEdge?.stroke === 'invisible'\n ? ''\n : 'edge-thickness-normal edge-pattern-solid flowchart-link',\n arrowTypeStart: rawEdge?.stroke === 'invisible' ? 'none' : arrowTypeStart,\n arrowTypeEnd: rawEdge?.stroke === 'invisible' ? 'none' : arrowTypeEnd,\n arrowheadStyle: 'fill: #333',\n labelStyle: styles,\n style: styles,\n pattern: rawEdge.stroke,\n look: config.look,\n };\n edges.push(edge);\n });\n\n return { nodes, edges, other: {}, config };\n};\n\nexport default {\n defaultConfig: () => defaultConfig.flowchart,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n getData,\n setAccDescription,\n addVertex,\n lookUpDomId,\n addLink,\n updateLinkInterpolate,\n updateLink,\n addClass,\n setDirection,\n setClass,\n setTooltip,\n getTooltip,\n setClickEvent,\n setLink,\n bindFunctions,\n getDirection,\n getVertices,\n getEdges,\n getClasses,\n clear,\n setGen,\n defaultStyle,\n addSubGraph,\n getDepthFirstPos,\n indexNodes,\n getSubGraphs,\n destructLink,\n lex,\n exists,\n makeUniq,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "import type { Direction } from '../../src/diagrams/block/blockTypes.js';\n\nconst expandAndDeduplicateDirections = (directions: Direction[]) => {\n const uniqueDirections = new Set();\n\n for (const direction of directions) {\n switch (direction) {\n case 'x':\n uniqueDirections.add('right');\n uniqueDirections.add('left');\n break;\n case 'y':\n uniqueDirections.add('up');\n uniqueDirections.add('down');\n break;\n default:\n uniqueDirections.add(direction);\n break;\n }\n }\n\n return uniqueDirections;\n};\nexport const getArrowPoints = (\n duplicatedDirections: Direction[],\n bbox: { width: number; height: number },\n node: any\n) => {\n // Expand and deduplicate the provided directions.\n // for instance: x, right => right, left\n const directions = expandAndDeduplicateDirections(duplicatedDirections);\n\n // Factor to divide height for some calculations.\n const f = 2;\n\n // Calculated height of the bounding box, accounting for node padding.\n const height = bbox.height + 2 * node.padding;\n // Midpoint calculation based on height.\n const midpoint = height / f;\n // Calculated width of the bounding box, accounting for additional width and node padding.\n const width = bbox.width + 2 * midpoint + node.padding;\n // Padding to use, half of the node padding.\n const padding = node.padding / 2;\n\n if (\n directions.has('right') &&\n directions.has('left') &&\n directions.has('up') &&\n directions.has('down')\n ) {\n // SQUARE\n return [\n // Bottom\n { x: 0, y: 0 },\n { x: midpoint, y: 0 },\n { x: width / 2, y: 2 * padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: 0 },\n\n // Right\n { x: width, y: -height / 3 },\n { x: width + 2 * padding, y: -height / 2 },\n { x: width, y: (-2 * height) / 3 },\n { x: width, y: -height },\n\n // Top\n { x: width - midpoint, y: -height },\n { x: width / 2, y: -height - 2 * padding },\n { x: midpoint, y: -height },\n\n // Left\n { x: 0, y: -height },\n { x: 0, y: (-2 * height) / 3 },\n { x: -2 * padding, y: -height / 2 },\n { x: 0, y: -height / 3 },\n ];\n }\n if (directions.has('right') && directions.has('left') && directions.has('up')) {\n // RECTANGLE_VERTICAL (Top Open)\n return [\n { x: midpoint, y: 0 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('right') && directions.has('left') && directions.has('down')) {\n // RECTANGLE_VERTICAL (Bottom Open)\n return [\n { x: 0, y: 0 },\n { x: midpoint, y: -height },\n { x: width - midpoint, y: -height },\n { x: width, y: 0 },\n ];\n }\n if (directions.has('right') && directions.has('up') && directions.has('down')) {\n // RECTANGLE_HORIZONTAL (Right Open)\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: width, y: -height + midpoint },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('up') && directions.has('down')) {\n // RECTANGLE_HORIZONTAL (Left Open)\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: 0, y: -height + midpoint },\n { x: width, y: -height },\n ];\n }\n if (directions.has('right') && directions.has('left')) {\n // HORIZONTAL_LINE\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('up') && directions.has('down')) {\n // VERTICAL_LINE\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding },\n ];\n }\n if (directions.has('right') && directions.has('up')) {\n // ANGLE_RT\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('right') && directions.has('down')) {\n // ANGLE_RB\n return [\n { x: 0, y: 0 },\n { x: width, y: 0 },\n { x: 0, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('up')) {\n // ANGLE_LT\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: width, y: -height },\n ];\n }\n if (directions.has('left') && directions.has('down')) {\n // ANGLE_LB\n return [\n { x: width, y: 0 },\n { x: 0, y: 0 },\n { x: width, y: -height },\n ];\n }\n if (directions.has('right')) {\n // ARROW_RIGHT\n return [\n { x: midpoint, y: -padding },\n { x: midpoint, y: -padding },\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding },\n // top left corner of arrow\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n ];\n }\n if (directions.has('left')) {\n // ARROW_LEFT\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding },\n // Two points, the right corners\n { x: width - midpoint, y: -padding },\n { x: width - midpoint, y: -height + padding },\n { x: midpoint, y: -height + padding },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 },\n ];\n }\n if (directions.has('up')) {\n // ARROW_TOP\n return [\n // Bottom center\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: 0, y: -height + padding },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n ];\n }\n if (directions.has('down')) {\n // ARROW_BOTTOM\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding },\n { x: midpoint, y: -padding },\n // Left top over vertical section\n { x: midpoint, y: -height + padding },\n { x: width - midpoint, y: -height + padding },\n { x: width - midpoint, y: -padding },\n { x: width, y: -padding },\n ];\n }\n\n // POINT\n return [{ x: 0, y: 0 }];\n};\n", "/**\n * Gets the original marked default options.\n */\nexport function _getDefaults() {\n return {\n async: false,\n breaks: false,\n extensions: null,\n gfm: true,\n hooks: null,\n pedantic: false,\n renderer: null,\n silent: false,\n tokenizer: null,\n walkTokens: null,\n };\n}\nexport let _defaults = _getDefaults();\nexport function changeDefaults(newDefaults) {\n _defaults = newDefaults;\n}\n", "/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nexport function escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n }\n else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\nexport function unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon')\n return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\nconst caret = /(^|[^\\[])\\^/g;\nexport function edit(regex, opt) {\n let source = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n let valSource = typeof val === 'string' ? val : val.source;\n valSource = valSource.replace(caret, '$1');\n source = source.replace(name, valSource);\n return obj;\n },\n getRegex: () => {\n return new RegExp(source, opt);\n },\n };\n return obj;\n}\nexport function cleanUrl(href) {\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n }\n catch {\n return null;\n }\n return href;\n}\nexport const noopTest = { exec: () => null };\nexport function splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false;\n let curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\')\n escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n }\n else {\n // add space before unescaped |\n return ' |';\n }\n }), cells = row.split(/ \\|/);\n let i = 0;\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) {\n cells.shift();\n }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n cells.pop();\n }\n if (count) {\n if (cells.length > count) {\n cells.splice(count);\n }\n else {\n while (cells.length < count)\n cells.push('');\n }\n }\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nexport function rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n }\n else if (currChar !== c && invert) {\n suffLen++;\n }\n else {\n break;\n }\n }\n return str.slice(0, l - suffLen);\n}\nexport function findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n let level = 0;\n for (let i = 0; i < str.length; i++) {\n if (str[i] === '\\\\') {\n i++;\n }\n else if (str[i] === b[0]) {\n level++;\n }\n else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\n", "import { _defaults } from './defaults.ts';\nimport { rtrim, splitCells, escape, findClosingBracket, } from './helpers.ts';\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text),\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape(text),\n };\n}\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n if (matchIndentToCode === null) {\n return text;\n }\n const indentToCode = matchIndentToCode[1];\n return text\n .split('\\n')\n .map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n const [indentInNode] = matchIndentInNode;\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n return node;\n })\n .join('\\n');\n}\n/**\n * Tokenizer\n */\nexport class _Tokenizer {\n options;\n rules; // set by the lexer\n lexer; // set by the lexer\n constructor(options) {\n this.options = options || _defaults;\n }\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0],\n };\n }\n }\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic\n ? rtrim(text, '\\n')\n : text,\n };\n }\n }\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n text,\n };\n }\n }\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n }\n else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text),\n };\n }\n }\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: rtrim(cap[0], '\\n'),\n };\n }\n }\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n let lines = rtrim(cap[0], '\\n').split('\\n');\n let raw = '';\n let text = '';\n const tokens = [];\n while (lines.length > 0) {\n let inBlockquote = false;\n const currentLines = [];\n let i;\n for (i = 0; i < lines.length; i++) {\n // get lines up to a continuation\n if (/^ {0,3}>/.test(lines[i])) {\n currentLines.push(lines[i]);\n inBlockquote = true;\n }\n else if (!inBlockquote) {\n currentLines.push(lines[i]);\n }\n else {\n break;\n }\n }\n lines = lines.slice(i);\n const currentRaw = currentLines.join('\\n');\n const currentText = currentRaw\n // precede setext continuation with 4 spaces so it isn't a setext\n .replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g, '\\n $1')\n .replace(/^ {0,3}>[ \\t]?/gm, '');\n raw = raw ? `${raw}\\n${currentRaw}` : currentRaw;\n text = text ? `${text}\\n${currentText}` : currentText;\n // parse blockquote lines as top level tokens\n // merge paragraphs if this is a continuation\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n this.lexer.blockTokens(currentText, tokens, true);\n this.lexer.state.top = top;\n // if there is no continuation then we are done\n if (lines.length === 0) {\n break;\n }\n const lastToken = tokens[tokens.length - 1];\n if (lastToken?.type === 'code') {\n // blockquote continuation cannot be preceded by a code block\n break;\n }\n else if (lastToken?.type === 'blockquote') {\n // include continuation in nested blockquote\n const oldToken = lastToken;\n const newText = oldToken.raw + '\\n' + lines.join('\\n');\n const newToken = this.blockquote(newText);\n tokens[tokens.length - 1] = newToken;\n raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;\n text = text.substring(0, text.length - oldToken.text.length) + newToken.text;\n break;\n }\n else if (lastToken?.type === 'list') {\n // include continuation in nested list\n const oldToken = lastToken;\n const newText = oldToken.raw + '\\n' + lines.join('\\n');\n const newToken = this.list(newText);\n tokens[tokens.length - 1] = newToken;\n raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;\n text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;\n lines = newText.substring(tokens[tokens.length - 1].raw.length).split('\\n');\n continue;\n }\n }\n return {\n type: 'blockquote',\n raw,\n tokens,\n text,\n };\n }\n }\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: [],\n };\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n let endsWithBlankLine = false;\n // Check if current bullet point can start a new List Item\n while (src) {\n let endEarly = false;\n let raw = '';\n let itemContents = '';\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n raw = cap[0];\n src = src.substring(raw.length);\n let line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n let nextLine = src.split('\\n', 1)[0];\n let blankLine = !line.trim();\n let indent = 0;\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimStart();\n }\n else if (blankLine) {\n indent = cap[1].length + 1;\n }\n else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n if (blankLine && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n // Check if following lines should be included in List Item\n while (src) {\n const rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n }\n else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) { // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n itemContents += '\\n' + nextLine;\n }\n if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n blankLine = true;\n }\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n }\n else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n let istask = null;\n let ischecked;\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents,\n tokens: [],\n });\n list.raw += raw;\n }\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = list.items[list.items.length - 1].raw.trimEnd();\n list.items[list.items.length - 1].text = list.items[list.items.length - 1].text.trimEnd();\n list.raw = list.raw.trimEnd();\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (let i = 0; i < list.items.length; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n list.loose = hasMultipleLineBreaks;\n }\n }\n // Set all items to loose if list is loose\n if (list.loose) {\n for (let i = 0; i < list.items.length; i++) {\n list.items[i].loose = true;\n }\n }\n return list;\n }\n }\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n block: true,\n raw: cap[0],\n pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n text: cap[0],\n };\n return token;\n }\n }\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title,\n };\n }\n }\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (!cap) {\n return;\n }\n if (!/[:|]/.test(cap[2])) {\n // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n return;\n }\n const headers = splitCells(cap[1]);\n const aligns = cap[2].replace(/^\\||\\| *$/g, '').split('|');\n const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : [];\n const item = {\n type: 'table',\n raw: cap[0],\n header: [],\n align: [],\n rows: [],\n };\n if (headers.length !== aligns.length) {\n // header and align columns must be equal, rows can be different.\n return;\n }\n for (const align of aligns) {\n if (/^ *-+: *$/.test(align)) {\n item.align.push('right');\n }\n else if (/^ *:-+: *$/.test(align)) {\n item.align.push('center');\n }\n else if (/^ *:-+ *$/.test(align)) {\n item.align.push('left');\n }\n else {\n item.align.push(null);\n }\n }\n for (let i = 0; i < headers.length; i++) {\n item.header.push({\n text: headers[i],\n tokens: this.lexer.inline(headers[i]),\n header: true,\n align: item.align[i],\n });\n }\n for (const row of rows) {\n item.rows.push(splitCells(row, item.header.length).map((cell, i) => {\n return {\n text: cell,\n tokens: this.lexer.inline(cell),\n header: false,\n align: item.align[i],\n };\n }));\n }\n return item;\n }\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1]),\n };\n }\n }\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n ? cap[1].slice(0, -1)\n : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text),\n };\n }\n }\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0]),\n };\n }\n }\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1]),\n };\n }\n }\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n }\n else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n return {\n type: 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n block: false,\n text: cap[0],\n };\n }\n }\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl))) {\n return;\n }\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n }\n else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n if (link) {\n href = link[1];\n title = link[3];\n }\n }\n else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim();\n if (/^$/.test(trimmedUrl))) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n }\n else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title,\n }, cap[0], this.lexer);\n }\n }\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src))\n || (cap = this.rules.inline.nolink.exec(src))) {\n const linkString = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n const link = links[linkString.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text,\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrongLDelim.exec(src);\n if (!match)\n return;\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u))\n return;\n const nextChar = match[1] || match[2] || '';\n if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n const lLength = [...match[0]].length - 1;\n let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n endReg.lastIndex = 0;\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim)\n continue; // skip single * in __abc*abc__\n rLength = [...rDelim].length;\n if (match[3] || match[4]) { // found another Left Delim\n delimTotal += rLength;\n continue;\n }\n else if (match[5] || match[6]) { // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n delimTotal -= rLength;\n if (delimTotal > 0)\n continue; // Haven't found enough closing delimiters\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n // char length can be >1 for unicode characters;\n const lastCharLength = [...match[0]][0].length;\n const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text),\n };\n }\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text),\n };\n }\n }\n }\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text,\n };\n }\n }\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0],\n };\n }\n }\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2]),\n };\n }\n }\n autolink(src) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(cap[1]);\n href = 'mailto:' + text;\n }\n else {\n text = escape(cap[1]);\n href = text;\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text,\n },\n ],\n };\n }\n }\n url(src) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(cap[0]);\n href = 'mailto:' + text;\n }\n else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n }\n else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [\n {\n type: 'text',\n raw: text,\n text,\n },\n ],\n };\n }\n }\n inlineText(src) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = cap[0];\n }\n else {\n text = escape(cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text,\n };\n }\n }\n}\n", "import { edit, noopTest, } from './helpers.ts';\n/**\n * Block-Level Grammar\n */\nconst newline = /^(?: *(?:\\n|$))+/;\nconst blockCode = /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nconst lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/)\n .replace(/bull/g, bullet) // lists can interrupt\n .replace(/blockCode/g, / {4}/) // indented code blocks can interrupt\n .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n .replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt\n .replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n .getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/)\n .replace('label', _blockLabel)\n .replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/)\n .getRegex();\nconst list = edit(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/)\n .replace(/bull/g, bullet)\n .getRegex();\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n + '|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title'\n + '|tr|track|ul';\nconst _comment = /|$))/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')', 'i')\n .replace('comment', _comment)\n .replace('tag', _tag)\n .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n .getRegex();\nconst paragraph = edit(_paragraph)\n .replace('hr', hr)\n .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n .replace('|table', '')\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n .getRegex();\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/)\n .replace('paragraph', paragraph)\n .getRegex();\n/**\n * Normal Block Grammar\n */\nconst blockNormal = {\n blockquote,\n code: blockCode,\n def,\n fences,\n heading,\n hr,\n html,\n lheading,\n list,\n newline,\n paragraph,\n table: noopTest,\n text: blockText,\n};\n/**\n * GFM Block Grammar\n */\nconst gfmTable = edit('^ *([^\\\\n ].*)\\\\n' // Header\n + ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n .replace('hr', hr)\n .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n .replace('blockquote', ' {0,3}>')\n .replace('code', ' {4}[^\\\\n]')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n .getRegex();\nconst blockGfm = {\n ...blockNormal,\n table: gfmTable,\n paragraph: edit(_paragraph)\n .replace('hr', hr)\n .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n .replace('table', gfmTable) // interrupt paragraphs with table\n .replace('blockquote', ' {0,3}>')\n .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n .replace('html', ')|<(?:script|pre|style|textarea|!--)')\n .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n .getRegex(),\n};\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\nconst blockPedantic = {\n ...blockNormal,\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)'\n + '|<(tag)[\\\\s\\\\S]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n .replace('comment', _comment)\n .replace(/tag/g, '(?!(?:'\n + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n .getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest, // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(_paragraph)\n .replace('hr', hr)\n .replace('heading', ' *#{1,6} *[^\\n]')\n .replace('lheading', lheading)\n .replace('|table', '')\n .replace('blockquote', ' {0,3}>')\n .replace('|fences', '')\n .replace('|list', '')\n .replace('|html', '')\n .replace('|tag', '')\n .getRegex(),\n};\n/**\n * Inline-Level Grammar\n */\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\\nconst blockSkip = /\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g;\nconst emStrongLDelim = edit(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/, 'u')\n .replace(/punct/g, _punctuation)\n .getRegex();\nconst emStrongRDelimAst = edit('^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n + '|[^*]+(?=[^*])' // Consume to delim\n + '|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n + '|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)' // (2) a***#, a*** can only be a Right Delimiter\n + '|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])' // (3) #***a, ***a can only be Left Delimiter\n + '|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])' // (4) ***# can only be Left Delimiter\n + '|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])' // (5) #***# can be either Left or Right Delimiter\n + '|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])', 'gu') // (6) a***a can be either Left or Right Delimiter\n .replace(/punct/g, _punctuation)\n .getRegex();\n// (6) Not allowed for _\nconst emStrongRDelimUnd = edit('^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n + '|[^_]+(?=[^_])' // Consume to delim\n + '|(?!_)[punct](_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n + '|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)' // (2) a___#, a___ can only be a Right Delimiter\n + '|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])' // (3) #___a, ___a can only be Left Delimiter\n + '|[\\\\s](_+)(?!_)(?=[punct])' // (4) ___# can only be Left Delimiter\n + '|(?!_)[punct](_+)(?!_)(?=[punct])', 'gu') // (5) #___# can be either Left or Right Delimiter\n .replace(/punct/g, _punctuation)\n .getRegex();\nconst anyPunctuation = edit(/\\\\([punct])/, 'gu')\n .replace(/punct/g, _punctuation)\n .getRegex();\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/)\n .replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/)\n .replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/)\n .getRegex();\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit('^comment'\n + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^') // CDATA section\n .replace('comment', _inlineComment)\n .replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/)\n .getRegex();\nconst _inlineLabel = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/)\n .replace('label', _inlineLabel)\n .replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/)\n .replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/)\n .getRegex();\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/)\n .replace('label', _inlineLabel)\n .replace('ref', _blockLabel)\n .getRegex();\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/)\n .replace('ref', _blockLabel)\n .getRegex();\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g')\n .replace('reflink', reflink)\n .replace('nolink', nolink)\n .getRegex();\n/**\n * Normal Inline Grammar\n */\nconst inlineNormal = {\n _backpedal: noopTest, // only used for GFM url\n anyPunctuation,\n autolink,\n blockSkip,\n br,\n code: inlineCode,\n del: noopTest,\n emStrongLDelim,\n emStrongRDelimAst,\n emStrongRDelimUnd,\n escape,\n link,\n nolink,\n punctuation,\n reflink,\n reflinkSearch,\n tag,\n text: inlineText,\n url: noopTest,\n};\n/**\n * Pedantic Inline Grammar\n */\nconst inlinePedantic = {\n ...inlineNormal,\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n .replace('label', _inlineLabel)\n .getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n .replace('label', _inlineLabel)\n .getRegex(),\n};\n/**\n * GFM Inline Grammar\n */\nconst inlineGfm = {\n ...inlineNormal,\n escape: edit(escape).replace('])', '~|])').getRegex(),\n url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/, 'i')\n .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)\n .getRegex(),\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ {\n return leading + ' '.repeat(tabs.length);\n });\n }\n let token;\n let lastToken;\n let cutSrc;\n while (src) {\n if (this.options.extensions\n && this.options.extensions.block\n && this.options.extensions.block.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unnecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title,\n };\n }\n continue;\n }\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach((getStartIndex) => {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken?.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else {\n tokens.push(token);\n }\n lastParagraphClipped = (cutSrc.length !== src.length);\n src = src.substring(token.raw.length);\n continue;\n }\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n }\n else {\n throw new Error(errMsg);\n }\n }\n }\n this.state.top = true;\n return tokens;\n }\n inline(src, tokens = []) {\n this.inlineQueue.push({ src, tokens });\n return tokens;\n }\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n // Mask out escaped characters\n while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);\n }\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n // extensions\n if (this.options.extensions\n && this.options.extensions.inline\n && this.options.extensions.inline.some((extTokenizer) => {\n if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // autolink\n if (token = this.tokenizer.autolink(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach((getStartIndex) => {\n tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n }\n else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n }\n else {\n throw new Error(errMsg);\n }\n }\n }\n return tokens;\n }\n}\n", "import { _defaults } from './defaults.ts';\nimport { cleanUrl, escape, } from './helpers.ts';\n/**\n * Renderer\n */\nexport class _Renderer {\n options;\n parser; // set by the parser\n constructor(options) {\n this.options = options || _defaults;\n }\n space(token) {\n return '';\n }\n code({ text, lang, escaped }) {\n const langString = (lang || '').match(/^\\S*/)?.[0];\n const code = text.replace(/\\n$/, '') + '\\n';\n if (!langString) {\n return '
    '\n                + (escaped ? code : escape(code, true))\n                + '
    \\n';\n }\n return '
    '\n            + (escaped ? code : escape(code, true))\n            + '
    \\n';\n }\n blockquote({ tokens }) {\n const body = this.parser.parse(tokens);\n return `
    \\n${body}
    \\n`;\n }\n html({ text }) {\n return text;\n }\n heading({ tokens, depth }) {\n return `${this.parser.parseInline(tokens)}\\n`;\n }\n hr(token) {\n return '
    \\n';\n }\n list(token) {\n const ordered = token.ordered;\n const start = token.start;\n let body = '';\n for (let j = 0; j < token.items.length; j++) {\n const item = token.items[j];\n body += this.listitem(item);\n }\n const type = ordered ? 'ol' : 'ul';\n const startAttr = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n return '<' + type + startAttr + '>\\n' + body + '\\n';\n }\n listitem(item) {\n let itemBody = '';\n if (item.task) {\n const checkbox = this.checkbox({ checked: !!item.checked });\n if (item.loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n }\n else {\n item.tokens.unshift({\n type: 'text',\n raw: checkbox + ' ',\n text: checkbox + ' ',\n });\n }\n }\n else {\n itemBody += checkbox + ' ';\n }\n }\n itemBody += this.parser.parse(item.tokens, !!item.loose);\n return `
  • ${itemBody}
  • \\n`;\n }\n checkbox({ checked }) {\n return '';\n }\n paragraph({ tokens }) {\n return `

    ${this.parser.parseInline(tokens)}

    \\n`;\n }\n table(token) {\n let header = '';\n // header\n let cell = '';\n for (let j = 0; j < token.header.length; j++) {\n cell += this.tablecell(token.header[j]);\n }\n header += this.tablerow({ text: cell });\n let body = '';\n for (let j = 0; j < token.rows.length; j++) {\n const row = token.rows[j];\n cell = '';\n for (let k = 0; k < row.length; k++) {\n cell += this.tablecell(row[k]);\n }\n body += this.tablerow({ text: cell });\n }\n if (body)\n body = `${body}`;\n return '\\n'\n + '\\n'\n + header\n + '\\n'\n + body\n + '
    \\n';\n }\n tablerow({ text }) {\n return `\\n${text}\\n`;\n }\n tablecell(token) {\n const content = this.parser.parseInline(token.tokens);\n const type = token.header ? 'th' : 'td';\n const tag = token.align\n ? `<${type} align=\"${token.align}\">`\n : `<${type}>`;\n return tag + content + `\\n`;\n }\n /**\n * span level renderer\n */\n strong({ tokens }) {\n return `${this.parser.parseInline(tokens)}`;\n }\n em({ tokens }) {\n return `${this.parser.parseInline(tokens)}`;\n }\n codespan({ text }) {\n return `${text}`;\n }\n br(token) {\n return '
    ';\n }\n del({ tokens }) {\n return `${this.parser.parseInline(tokens)}`;\n }\n link({ href, title, tokens }) {\n const text = this.parser.parseInline(tokens);\n const cleanHref = cleanUrl(href);\n if (cleanHref === null) {\n return text;\n }\n href = cleanHref;\n let out = '
    ';\n return out;\n }\n image({ href, title, text }) {\n const cleanHref = cleanUrl(href);\n if (cleanHref === null) {\n return text;\n }\n href = cleanHref;\n let out = `\"${text}\"`;\n {\n const tokens = genericToken[childTokens].flat(Infinity);\n values = values.concat(this.walkTokens(tokens, callback));\n });\n }\n else if (genericToken.tokens) {\n values = values.concat(this.walkTokens(genericToken.tokens, callback));\n }\n }\n }\n }\n return values;\n }\n use(...args) {\n const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };\n args.forEach((pack) => {\n // copy options to new object\n const opts = { ...pack };\n // set async to true if it was set to true before\n opts.async = this.defaults.async || opts.async || false;\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach((ext) => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if ('renderer' in ext) { // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function (...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n }\n else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if ('tokenizer' in ext) { // Tokenizer Extensions\n if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n const extLevel = extensions[ext.level];\n if (extLevel) {\n extLevel.unshift(ext.tokenizer);\n }\n else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) { // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n }\n else {\n extensions.startBlock = [ext.start];\n }\n }\n else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n }\n else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if ('childTokens' in ext && ext.childTokens) { // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = this.defaults.renderer || new _Renderer(this.defaults);\n for (const prop in pack.renderer) {\n if (!(prop in renderer)) {\n throw new Error(`renderer '${prop}' does not exist`);\n }\n if (['options', 'parser'].includes(prop)) {\n // ignore options property\n continue;\n }\n const rendererProp = prop;\n let rendererFunc = pack.renderer[rendererProp];\n if (!pack.useNewRenderer) {\n // TODO: Remove this in next major version\n rendererFunc = this.#convertRendererFunction(rendererFunc, rendererProp, renderer);\n }\n const prevRenderer = renderer[rendererProp];\n // Replace renderer with func to run extension, but fall back if false\n renderer[rendererProp] = (...args) => {\n let ret = rendererFunc.apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret || '';\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);\n for (const prop in pack.tokenizer) {\n if (!(prop in tokenizer)) {\n throw new Error(`tokenizer '${prop}' does not exist`);\n }\n if (['options', 'rules', 'lexer'].includes(prop)) {\n // ignore options, rules, and lexer properties\n continue;\n }\n const tokenizerProp = prop;\n const tokenizerFunc = pack.tokenizer[tokenizerProp];\n const prevTokenizer = tokenizer[tokenizerProp];\n // Replace tokenizer with func to run extension, but fall back if false\n // @ts-expect-error cannot type tokenizer function dynamically\n tokenizer[tokenizerProp] = (...args) => {\n let ret = tokenizerFunc.apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = this.defaults.hooks || new _Hooks();\n for (const prop in pack.hooks) {\n if (!(prop in hooks)) {\n throw new Error(`hook '${prop}' does not exist`);\n }\n if (prop === 'options') {\n // ignore options property\n continue;\n }\n const hooksProp = prop;\n const hooksFunc = pack.hooks[hooksProp];\n const prevHook = hooks[hooksProp];\n if (_Hooks.passThroughHooks.has(prop)) {\n // @ts-expect-error cannot type hook function dynamically\n hooks[hooksProp] = (arg) => {\n if (this.defaults.async) {\n return Promise.resolve(hooksFunc.call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n const ret = hooksFunc.call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n }\n else {\n // @ts-expect-error cannot type hook function dynamically\n hooks[hooksProp] = (...args) => {\n let ret = hooksFunc.apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = this.defaults.walkTokens;\n const packWalktokens = pack.walkTokens;\n opts.walkTokens = function (token) {\n let values = [];\n values.push(packWalktokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n this.defaults = { ...this.defaults, ...opts };\n });\n return this;\n }\n // TODO: Remove this in next major release\n #convertRendererFunction(func, prop, renderer) {\n switch (prop) {\n case 'heading':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, renderer.parser.parseInline(token.tokens), token.depth, unescape(renderer.parser.parseInline(token.tokens, renderer.parser.textRenderer)));\n };\n case 'code':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text, token.lang, !!token.escaped);\n };\n case 'table':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n let header = '';\n // header\n let cell = '';\n for (let j = 0; j < token.header.length; j++) {\n cell += this.tablecell({\n text: token.header[j].text,\n tokens: token.header[j].tokens,\n header: true,\n align: token.align[j],\n });\n }\n header += this.tablerow({ text: cell });\n let body = '';\n for (let j = 0; j < token.rows.length; j++) {\n const row = token.rows[j];\n cell = '';\n for (let k = 0; k < row.length; k++) {\n cell += this.tablecell({\n text: row[k].text,\n tokens: row[k].tokens,\n header: false,\n align: token.align[k],\n });\n }\n body += this.tablerow({ text: cell });\n }\n return func.call(this, header, body);\n };\n case 'blockquote':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n const body = this.parser.parse(token.tokens);\n return func.call(this, body);\n };\n case 'list':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n const ordered = token.ordered;\n const start = token.start;\n const loose = token.loose;\n let body = '';\n for (let j = 0; j < token.items.length; j++) {\n const item = token.items[j];\n const checked = item.checked;\n const task = item.task;\n let itemBody = '';\n if (item.task) {\n const checkbox = this.checkbox({ checked: !!checked });\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n }\n else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox + ' ',\n });\n }\n }\n else {\n itemBody += checkbox + ' ';\n }\n }\n itemBody += this.parser.parse(item.tokens, loose);\n body += this.listitem({\n type: 'list_item',\n raw: itemBody,\n text: itemBody,\n task,\n checked: !!checked,\n loose,\n tokens: item.tokens,\n });\n }\n return func.call(this, body, ordered, start);\n };\n case 'html':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text, token.block);\n };\n case 'paragraph':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'escape':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text);\n };\n case 'link':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.href, token.title, this.parser.parseInline(token.tokens));\n };\n case 'image':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.href, token.title, token.text);\n };\n case 'strong':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'em':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'codespan':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text);\n };\n case 'del':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, this.parser.parseInline(token.tokens));\n };\n case 'text':\n return function (token) {\n if (!token.type || token.type !== prop) {\n // @ts-ignore\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n return func.call(this, token.text);\n };\n default:\n // do nothing\n }\n return func;\n }\n setOptions(opt) {\n this.defaults = { ...this.defaults, ...opt };\n return this;\n }\n lexer(src, options) {\n return _Lexer.lex(src, options ?? this.defaults);\n }\n parser(tokens, options) {\n return _Parser.parse(tokens, options ?? this.defaults);\n }\n #parseMarkdown(lexer, parser) {\n return (src, options) => {\n const origOpt = { ...options };\n const opt = { ...this.defaults, ...origOpt };\n // Show warning if an extension set async to true but the parse was called with async: false\n if (this.defaults.async === true && origOpt.async === false) {\n if (!opt.silent) {\n console.warn('marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.');\n }\n opt.async = true;\n }\n const throwError = this.#onError(!!opt.silent, !!opt.async);\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected'));\n }\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n .then(src => lexer(src, opt))\n .then(tokens => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens)\n .then(tokens => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n .then(tokens => parser(tokens, opt))\n .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n .catch(throwError);\n }\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n let tokens = lexer(src, opt);\n if (opt.hooks) {\n tokens = opt.hooks.processAllTokens(tokens);\n }\n if (opt.walkTokens) {\n this.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n }\n catch (e) {\n return throwError(e);\n }\n };\n }\n #onError(silent, async) {\n return (e) => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if (silent) {\n const msg = '

    An error occurred:

    '\n                    + escape(e.message + '', true)\n                    + '
    ';\n if (async) {\n return Promise.resolve(msg);\n }\n return msg;\n }\n if (async) {\n return Promise.reject(e);\n }\n throw e;\n };\n }\n}\n", "import { _Lexer } from './Lexer.ts';\nimport { _Parser } from './Parser.ts';\nimport { _Tokenizer } from './Tokenizer.ts';\nimport { _Renderer } from './Renderer.ts';\nimport { _TextRenderer } from './TextRenderer.ts';\nimport { _Hooks } from './Hooks.ts';\nimport { Marked } from './Instance.ts';\nimport { _getDefaults, changeDefaults, _defaults, } from './defaults.ts';\nconst markedInstance = new Marked();\nexport function marked(src, opt) {\n return markedInstance.parse(src, opt);\n}\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options =\n marked.setOptions = function (options) {\n markedInstance.setOptions(options);\n marked.defaults = markedInstance.defaults;\n changeDefaults(marked.defaults);\n return marked;\n };\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\nmarked.defaults = _defaults;\n/**\n * Use Extension\n */\nmarked.use = function (...args) {\n markedInstance.use(...args);\n marked.defaults = markedInstance.defaults;\n changeDefaults(marked.defaults);\n return marked;\n};\n/**\n * Run callback for every token\n */\nmarked.walkTokens = function (tokens, callback) {\n return markedInstance.walkTokens(tokens, callback);\n};\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\nexport const options = marked.options;\nexport const setOptions = marked.setOptions;\nexport const use = marked.use;\nexport const walkTokens = marked.walkTokens;\nexport const parseInline = marked.parseInline;\nexport const parse = marked;\nexport const parser = _Parser.parse;\nexport const lexer = _Lexer.lex;\nexport { _defaults as defaults, _getDefaults as getDefaults } from './defaults.ts';\nexport { _Lexer as Lexer } from './Lexer.ts';\nexport { _Parser as Parser } from './Parser.ts';\nexport { _Tokenizer as Tokenizer } from './Tokenizer.ts';\nexport { _Renderer as Renderer } from './Renderer.ts';\nexport { _TextRenderer as TextRenderer } from './TextRenderer.ts';\nexport { _Hooks as Hooks } from './Hooks.ts';\nexport { Marked } from './Instance.ts';\n", "import type { MarkedToken, Token } from 'marked';\nimport { marked } from 'marked';\nimport { dedent } from 'ts-dedent';\nimport type { MarkdownLine, MarkdownWordType } from './types.js';\nimport type { MermaidConfig } from '../config.type.js';\n\n/**\n * @param markdown - markdown to process\n * @returns processed markdown\n */\nfunction preprocessMarkdown(markdown: string, { markdownAutoWrap }: MermaidConfig): string {\n //Replace
    with \\n\n const withoutBR = markdown.replace(//g, '\\n');\n // Replace multiple newlines with a single newline\n const withoutMultipleNewlines = withoutBR.replace(/\\n{2,}/g, '\\n');\n // Remove extra spaces at the beginning of each line\n const withoutExtraSpaces = dedent(withoutMultipleNewlines);\n if (markdownAutoWrap === false) {\n return withoutExtraSpaces.replace(/ /g, ' ');\n }\n return withoutExtraSpaces;\n}\n\n/**\n * @param markdown - markdown to split into lines\n */\nexport function markdownToLines(markdown: string, config: MermaidConfig = {}): MarkdownLine[] {\n const preprocessedMarkdown = preprocessMarkdown(markdown, config);\n const nodes = marked.lexer(preprocessedMarkdown);\n const lines: MarkdownLine[] = [[]];\n let currentLine = 0;\n\n function processNode(node: MarkedToken, parentType: MarkdownWordType = 'normal') {\n if (node.type === 'text') {\n const textLines = node.text.split('\\n');\n textLines.forEach((textLine, index) => {\n if (index !== 0) {\n currentLine++;\n lines.push([]);\n }\n textLine.split(' ').forEach((word) => {\n if (word) {\n lines[currentLine].push({ content: word, type: parentType });\n }\n });\n });\n } else if (node.type === 'strong' || node.type === 'em') {\n node.tokens.forEach((contentNode) => {\n processNode(contentNode as MarkedToken, node.type);\n });\n } else if (node.type === 'html') {\n lines[currentLine].push({ content: node.text, type: 'normal' });\n }\n }\n\n nodes.forEach((treeNode) => {\n if (treeNode.type === 'paragraph') {\n treeNode.tokens?.forEach((contentNode) => {\n processNode(contentNode as MarkedToken);\n });\n } else if (treeNode.type === 'html') {\n lines[currentLine].push({ content: treeNode.text, type: 'normal' });\n }\n });\n\n return lines;\n}\n\nexport function markdownToHTML(markdown: string, { markdownAutoWrap }: MermaidConfig = {}) {\n const nodes = marked.lexer(markdown);\n\n function output(node: Token): string {\n if (node.type === 'text') {\n if (markdownAutoWrap === false) {\n return node.text.replace(/\\n */g, '
    ').replace(/ /g, ' ');\n }\n return node.text.replace(/\\n */g, '
    ');\n } else if (node.type === 'strong') {\n return `${node.tokens?.map(output).join('')}`;\n } else if (node.type === 'em') {\n return `${node.tokens?.map(output).join('')}`;\n } else if (node.type === 'paragraph') {\n return `

    ${node.tokens?.map(output).join('')}

    `;\n } else if (node.type === 'space') {\n return '';\n } else if (node.type === 'html') {\n return `${node.text}`;\n }\n return `Unsupported markdown: ${node.type}`;\n }\n\n return nodes.map(output).join('');\n}\n", "import type { CheckFitFunction, MarkdownLine, MarkdownWord, MarkdownWordType } from './types.js';\n\n/**\n * Splits a string into graphemes if available, otherwise characters.\n */\nexport function splitTextToChars(text: string): string[] {\n if (Intl.Segmenter) {\n return [...new Intl.Segmenter().segment(text)].map((s) => s.segment);\n }\n return [...text];\n}\n\n/**\n * Splits a string into words by using `Intl.Segmenter` if available, or splitting by ' '.\n * `Intl.Segmenter` uses the default locale, which might be different across browsers.\n */\nexport function splitLineToWords(text: string): string[] {\n if (Intl.Segmenter) {\n return [...new Intl.Segmenter(undefined, { granularity: 'word' }).segment(text)].map(\n (s) => s.segment\n );\n }\n // Split by ' ' removes the ' 's from the result.\n const words = text.split(' ');\n // Add the ' 's back to the result.\n const wordsWithSpaces = words.flatMap((s) => [s, ' ']).filter((s) => s);\n // Remove last space.\n wordsWithSpaces.pop();\n return wordsWithSpaces;\n}\n\n/**\n * Splits a word into two parts, the first part fits the width and the remaining part.\n * @param checkFit - Function to check if word fits\n * @param word - Word to split\n * @returns [first part of word that fits, rest of word]\n */\nexport function splitWordToFitWidth(\n checkFit: CheckFitFunction,\n word: MarkdownWord\n): [MarkdownWord, MarkdownWord] {\n const characters = splitTextToChars(word.content);\n return splitWordToFitWidthRecursion(checkFit, [], characters, word.type);\n}\n\nfunction splitWordToFitWidthRecursion(\n checkFit: CheckFitFunction,\n usedChars: string[],\n remainingChars: string[],\n type: MarkdownWordType\n): [MarkdownWord, MarkdownWord] {\n if (remainingChars.length === 0) {\n return [\n { content: usedChars.join(''), type },\n { content: '', type },\n ];\n }\n const [nextChar, ...rest] = remainingChars;\n const newWord = [...usedChars, nextChar];\n if (checkFit([{ content: newWord.join(''), type }])) {\n return splitWordToFitWidthRecursion(checkFit, newWord, rest, type);\n }\n if (usedChars.length === 0 && nextChar) {\n // If the first character does not fit, split it anyway\n usedChars.push(nextChar);\n remainingChars.shift();\n }\n return [\n { content: usedChars.join(''), type },\n { content: remainingChars.join(''), type },\n ];\n}\n\n/**\n * Splits a line into multiple lines that satisfy the checkFit function.\n * @param line - Line to split\n * @param checkFit - Function to check if line fits\n * @returns Array of lines that fit\n */\nexport function splitLineToFitWidth(\n line: MarkdownLine,\n checkFit: CheckFitFunction\n): MarkdownLine[] {\n if (line.some(({ content }) => content.includes('\\n'))) {\n throw new Error('splitLineToFitWidth does not support newlines in the line');\n }\n return splitLineToFitWidthRecursion(line, checkFit);\n}\n\nfunction splitLineToFitWidthRecursion(\n words: MarkdownWord[],\n checkFit: CheckFitFunction,\n lines: MarkdownLine[] = [],\n newLine: MarkdownLine = []\n): MarkdownLine[] {\n // Return if there is nothing left to split\n if (words.length === 0) {\n // If there is a new line, add it to the lines\n if (newLine.length > 0) {\n lines.push(newLine);\n }\n return lines.length > 0 ? lines : [];\n }\n let joiner = '';\n if (words[0].content === ' ') {\n joiner = ' ';\n words.shift();\n }\n const nextWord: MarkdownWord = words.shift() ?? { content: ' ', type: 'normal' };\n const lineWithNextWord: MarkdownLine = [...newLine];\n if (joiner !== '') {\n lineWithNextWord.push({ content: joiner, type: 'normal' });\n }\n lineWithNextWord.push(nextWord);\n\n if (checkFit(lineWithNextWord)) {\n // nextWord fits, so we can add it to the new line and continue\n return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord);\n }\n\n // nextWord doesn't fit, so we need to split it\n if (newLine.length > 0) {\n // There was text in newLine, so add it to lines and push nextWord back into words.\n lines.push(newLine);\n words.unshift(nextWord);\n } else if (nextWord.content) {\n // There was no text in newLine, so we need to split nextWord\n const [line, rest] = splitWordToFitWidth(checkFit, nextWord);\n lines.push([line]);\n if (rest.content) {\n words.unshift(rest);\n }\n }\n return splitLineToFitWidthRecursion(words, checkFit, lines);\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n// @ts-nocheck TODO: Fix types\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport common, { hasKatex, renderKatex } from '$root/diagrams/common/common.js';\nimport { select } from 'd3';\nimport type { MermaidConfig } from '../config.type.js';\nimport type { SVGGroup } from '../diagram-api/types.js';\nimport type { D3TSpanElement, D3TextElement } from '../diagrams/common/commonTypes.js';\nimport { log } from '../logger.js';\nimport { markdownToHTML, markdownToLines } from '../rendering-util/handle-markdown-text.js';\nimport { decodeEntities } from '../utils.js';\nimport { splitLineToFitWidth } from './splitText.js';\nimport type { MarkdownLine, MarkdownWord } from './types.js';\n\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\nasync function addHtmlSpan(element, node, width, classes, addBackground = false) {\n const fo = element.append('foreignObject');\n const div = fo.append('xhtml:div');\n let label = node.label;\n if (node.label && hasKatex(node.label)) {\n label = await renderKatex(node.label.replace(common.lineBreakRegex, '\\n'), getConfig());\n }\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n const span = div.append('span');\n span.html(label);\n applyStyle(span, node.labelStyle);\n span.attr('class', `${labelClass} ${classes}`);\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'table-cell');\n div.style('white-space', 'nowrap');\n div.style('line-height', '1.5');\n div.style('max-width', width + 'px');\n div.style('text-align', 'center');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n if (addBackground) {\n div.attr('class', 'labelBkg');\n }\n\n let bbox = div.node().getBoundingClientRect();\n if (bbox.width === width) {\n div.style('display', 'table');\n div.style('white-space', 'break-spaces');\n div.style('width', width + 'px');\n bbox = div.node().getBoundingClientRect();\n }\n\n // fo.style('width', bbox.width);\n // fo.style('height', bbox.height);\n\n return fo.node();\n}\n\n/**\n * Creates a tspan element with the specified attributes for text positioning.\n *\n * @param textElement - The parent text element to append the tspan element.\n * @param lineIndex - The index of the current line in the structuredText array.\n * @param lineHeight - The line height value for the text.\n * @returns The created tspan element.\n */\nfunction createTspan(textElement: any, lineIndex: number, lineHeight: number) {\n return textElement\n .append('tspan')\n .attr('class', 'text-outer-tspan')\n .attr('x', 0)\n .attr('y', lineIndex * lineHeight - 0.1 + 'em')\n .attr('dy', lineHeight + 'em');\n}\n\nfunction computeWidthOfText(parentNode: any, lineHeight: number, line: MarkdownLine): number {\n const testElement = parentNode.append('text');\n const testSpan = createTspan(testElement, 1, lineHeight);\n updateTextContentAndStyles(testSpan, line);\n const textLength = testSpan.node().getComputedTextLength();\n testElement.remove();\n return textLength;\n}\n\nexport function computeDimensionOfText(\n parentNode: SVGGroup,\n lineHeight: number,\n text: string\n): DOMRect | undefined {\n const testElement: D3TextElement = parentNode.append('text');\n const testSpan: D3TSpanElement = createTspan(testElement, 1, lineHeight);\n updateTextContentAndStyles(testSpan, [{ content: text, type: 'normal' }]);\n const textDimension: DOMRect | undefined = testSpan.node()?.getBoundingClientRect();\n if (textDimension) {\n testElement.remove();\n }\n return textDimension;\n}\n\n/**\n * Creates a formatted text element by breaking lines and applying styles based on\n * the given structuredText.\n *\n * @param width - The maximum allowed width of the text.\n * @param g - The parent group element to append the formatted text.\n * @param structuredText - The structured text data to format.\n * @param addBackground - Whether to add a background to the text.\n */\nfunction createFormattedText(\n width: number,\n g: any,\n structuredText: MarkdownWord[][],\n addBackground = false\n) {\n const lineHeight = 1.1;\n const labelGroup = g.append('g');\n const bkg = labelGroup.insert('rect').attr('class', 'background').attr('style', 'stroke: none');\n const textElement = labelGroup.append('text').attr('y', '-10.1');\n let lineIndex = 0;\n for (const line of structuredText) {\n /**\n * Preprocess raw string content of line data\n * Creating an array of strings pre-split to satisfy width limit\n */\n const checkWidth = (line: MarkdownLine) =>\n computeWidthOfText(labelGroup, lineHeight, line) <= width;\n const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth);\n /** Add each prepared line as a tspan to the parent node */\n for (const preparedLine of linesUnderWidth) {\n const tspan = createTspan(textElement, lineIndex, lineHeight);\n updateTextContentAndStyles(tspan, preparedLine);\n lineIndex++;\n }\n }\n if (addBackground) {\n const bbox = textElement.node().getBBox();\n const padding = 2;\n bkg\n .attr('x', -padding)\n .attr('y', -padding)\n .attr('width', bbox.width + 2 * padding)\n .attr('height', bbox.height + 2 * padding);\n\n return labelGroup.node();\n } else {\n return textElement.node();\n }\n}\n\n/**\n * Updates the text content and styles of the given tspan element based on the\n * provided wrappedLine data.\n *\n * @param tspan - The tspan element to update.\n * @param wrappedLine - The line data to apply to the tspan element.\n */\nfunction updateTextContentAndStyles(tspan: any, wrappedLine: MarkdownWord[]) {\n tspan.text('');\n\n wrappedLine.forEach((word, index) => {\n const innerTspan = tspan\n .append('tspan')\n .attr('font-style', word.type === 'em' ? 'italic' : 'normal')\n .attr('class', 'text-inner-tspan')\n .attr('font-weight', word.type === 'strong' ? 'bold' : 'normal');\n if (index === 0) {\n innerTspan.text(word.content);\n } else {\n // TODO: check what joiner to use.\n innerTspan.text(' ' + word.content);\n }\n });\n}\n\n/**\n * Convert fontawesome labels into fontawesome icons by using a regex pattern\n * @param text - The raw string to convert\n * @returns string with fontawesome icons as i tags\n */\nexport function replaceIconSubstring(text: string) {\n // The letters 'bklrs' stand for possible endings of the fontawesome prefix (e.g. 'fab' for brands, 'fak' for fa-kit) // cspell: disable-line\n return text.replace(\n /fa[bklrs]?:fa-[\\w-]+/g, // cspell: disable-line\n (s) => ``\n );\n}\n\n// Note when using from flowcharts converting the API isNode means classes should be set accordingly. When using htmlLabels => to sett classes to'nodeLabel' when isNode=true otherwise 'edgeLabel'\n// When not using htmlLabels => to set classes to 'title-row' when isTitle=true otherwise 'title-row'\nexport const createText = async (\n el,\n text = '',\n {\n style = '',\n isTitle = false,\n classes = '',\n useHtmlLabels = true,\n isNode = true,\n width = 200,\n addSvgBackground = false,\n } = {},\n config: MermaidConfig\n) => {\n log.info(\n 'XYZ createText',\n text,\n style,\n isTitle,\n classes,\n useHtmlLabels,\n isNode,\n 'addSvgBackground: ',\n addSvgBackground\n );\n if (useHtmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n\n const htmlText = markdownToHTML(text, config);\n const decodedReplacedText = replaceIconSubstring(decodeEntities(htmlText));\n\n //for Katex the text could contain escaped characters, \\\\relax that should be transformed to \\relax\n const inputForKatex = text.replace(/\\\\\\\\/g, '\\\\');\n\n const node = {\n isNode,\n label: hasKatex(text) ? inputForKatex : decodedReplacedText,\n labelStyle: style.replace('fill:', 'color:'),\n };\n const vertexNode = await addHtmlSpan(el, node, width, classes, addSvgBackground);\n return vertexNode;\n } else {\n //sometimes the user might add br tags with 1 or more spaces in between, so we need to replace them with
    \n const sanitizeBR = text.replace(//g, '
    ');\n const structuredText = markdownToLines(sanitizeBR.replace('
    ', '
    '), config);\n const svgLabel = createFormattedText(\n width,\n el,\n structuredText,\n text ? addSvgBackground : false\n );\n if (isNode) {\n if (/stroke:/.exec(style)) {\n style = style.replace('stroke:', 'lineColor:');\n }\n\n const nodeLabelTextStyle = style\n .replace(/stroke:[^;]+;?/g, '')\n .replace(/stroke-width:[^;]+;?/g, '')\n .replace(/fill:[^;]+;?/g, '')\n .replace(/color:/g, 'fill:');\n select(svgLabel).attr('style', nodeLabelTextStyle);\n // svgLabel.setAttribute('style', style);\n } else {\n //On style, assume `stroke`, `stroke-width` are used for edge path, so remove them\n // remove `fill`\n // use `background` as `fill` for label rect,\n\n const edgeLabelRectStyle = style\n .replace(/stroke:[^;]+;?/g, '')\n .replace(/stroke-width:[^;]+;?/g, '')\n .replace(/fill:[^;]+;?/g, '')\n .replace(/background:/g, 'fill:');\n select(svgLabel)\n .select('rect')\n .attr('style', edgeLabelRectStyle.replace(/background:/g, 'fill:'));\n\n // for text, update fill color with `color`\n const edgeLabelTextStyle = style\n .replace(/stroke:[^;]+;?/g, '')\n .replace(/stroke-width:[^;]+;?/g, '')\n .replace(/fill:[^;]+;?/g, '')\n .replace(/color:/g, 'fill:');\n select(svgLabel).select('text').attr('style', edgeLabelTextStyle);\n }\n return svgLabel;\n }\n};\n", "import { select } from 'd3';\nimport { log } from '../logger.js';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { decodeEntities } from '../utils.js';\nimport { replaceIconSubstring } from '../rendering-util/createText.js';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\n/**\n * @param {any} node\n * @returns {SVGForeignObjectElement} Node\n */\nfunction addHtmlLabel(node) {\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n const span = div.append('span');\n span.html(label);\n applyStyle(span, node.labelStyle);\n span.attr('class', labelClass);\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n/**\n * @param _vertexText\n * @param style\n * @param isTitle\n * @param isNode\n * @deprecated svg-util/createText instead\n */\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') {\n vertexText = vertexText[0];\n }\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
    ');\n log.debug('vertexText' + vertexText);\n const node = {\n isNode,\n label: replaceIconSubstring(decodeEntities(vertexText)),\n labelStyle: style.replace('fill:', 'color:'),\n };\n let vertexNode = addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (const row of rows) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n", "/**\n * @param node\n * @param point\n */\nfunction intersectNode(node, point) {\n // console.info('Intersect Node');\n return node.intersect(point);\n}\n\nexport default intersectNode;\n", "/**\n * @param node\n * @param rx\n * @param ry\n * @param point\n */\nfunction intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n", "import intersectEllipse from './intersect-ellipse.js';\n\n/**\n * @param node\n * @param rx\n * @param point\n */\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n", "/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n *\n * @param p1\n * @param p2\n * @param q1\n * @param q2\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\n/**\n * @param r1\n * @param r2\n */\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n", "/* eslint \"no-console\": off */\n\nimport intersectLine from './intersect-line.js';\n\nexport default intersectPolygon;\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n *\n * @param node\n * @param polyPoints\n * @param point\n */\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n\n var intersections = [];\n\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n", "const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n", "/*\n * Borrowed with love from dagre-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n", "import createLabel from '../createLabel.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport { evaluate, sanitizeText } from '../../diagrams/common/common.js';\nimport { decodeEntities } from '../../utils.js';\n\nexport const labelHelper = async (parent, node, _classes, isNode) => {\n const config = getConfig();\n let classes;\n const useHtmlLabels = node.useHtmlLabels || evaluate(config.flowchart.htmlLabels);\n if (!_classes) {\n classes = 'node default';\n } else {\n classes = _classes;\n }\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n\n // Replace labelText with default value if undefined\n let labelText;\n if (node.labelText === undefined) {\n labelText = '';\n } else {\n labelText = typeof node.labelText === 'string' ? node.labelText : node.labelText[0];\n }\n\n const textNode = label.node();\n let text;\n if (node.labelType === 'markdown') {\n // text = textNode;\n text = createText(\n label,\n sanitizeText(decodeEntities(labelText), config),\n {\n useHtmlLabels,\n width: node.width || config.flowchart.wrappingWidth,\n classes: 'markdown-node-label',\n },\n config\n );\n } else {\n text = textNode.appendChild(\n createLabel(sanitizeText(decodeEntities(labelText), config), node.labelStyle, false, isNode)\n );\n }\n // Get the size of the label\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n\n if (evaluate(config.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n\n // if there are images, need to wait for them to load before getting the bounding box\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = labelText.replace(/]*>/g, '').trim() === '';\n\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n /**\n *\n */\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize = config.fontSize\n ? config.fontSize\n : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center the label\n if (useHtmlLabels) {\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n } else {\n label.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n }\n if (node.centerLabel) {\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n }\n label.insert('rect', ':first-child');\n\n return { shapeSvg, bbox, halfPadding, label };\n};\n\nexport const updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\n/**\n * @param parent\n * @param w\n * @param h\n * @param points\n */\nexport function insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n", "import { updateNodeBounds, labelHelper } from './util.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport intersect from '../intersect/index.js';\n\nconst note = async (parent, node) => {\n const useHtmlLabels = node.useHtmlLabels || getConfig().flowchart.htmlLabels;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes,\n true\n );\n\n log.info('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nexport default note;\n", "import { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { log } from '../logger.js';\nimport { getArrowPoints } from './blockArrowHelper.js';\nimport createLabel from './createLabel.js';\nimport intersect from './intersect/index.js';\nimport note from './shapes/note.js';\nimport { insertPolygonShape, labelHelper, updateNodeBounds } from './shapes/util.js';\n\nconst formatClass = (str) => {\n if (str) {\n return ' ' + str;\n }\n return '';\n};\nconst getClassesFromNode = (node, otherClasses) => {\n return `${otherClasses ? otherClasses : 'node default'}${formatClass(node.classes)} ${formatClass(\n node.class\n )}`;\n};\n\nconst question = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n log.info('Question main (Circle)');\n\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr('style', node.style);\n updateNodeBounds(node, questionElem);\n\n node.intersect = function (point) {\n log.warn('Intersect called');\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst choice = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n const choice = shapeSvg.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n );\n // center the circle around its coordinate\n choice.attr('class', 'state-start').attr('r', 7).attr('width', 28).attr('height', 28);\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.circle(node, 14, point);\n };\n\n return shapeSvg;\n};\n\nconst hexagon = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr('style', node.style);\n updateNodeBounds(node, hex);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst block_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, undefined, true);\n\n const f = 2;\n const h = bbox.height + 2 * node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n\n const points = getArrowPoints(node.directions, bbox, node);\n\n const blockArrow = insertPolygonShape(shapeSvg, w, h, points);\n blockArrow.attr('style', node.style);\n updateNodeBounds(node, blockArrow);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_left_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n\n node.width = w + h;\n node.height = h;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_right = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_left = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst inv_trapezoid = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_right_inv_arrow = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst cylinder = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const el = shapeSvg\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('style', node.style)\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjusted value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - node.y > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n};\n\nconst rect = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes + ' ' + node.class,\n true\n );\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // console.log('Rect node:', node, 'bbox:', bbox, 'halfPadding:', halfPadding, 'node.padding:', node.padding);\n // const totalWidth = bbox.width + node.padding * 2;\n // const totalHeight = bbox.height + node.padding * 2;\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect\n .attr('class', 'basic label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst composite = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n 'node ' + node.classes,\n true\n );\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // const totalWidth = bbox.width + node.padding * 2;\n // const totalHeight = bbox.height + node.padding * 2;\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect\n .attr('class', 'basic cluster composite label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst labelRect = async (parent, node) => {\n const { shapeSvg } = await labelHelper(parent, node, 'label', true);\n\n log.trace('Classes = ', node.class);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0;\n const totalHeight = 0;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * @param rect\n * @param borders\n * @param totalWidth\n * @param totalHeight\n */\nfunction applyNodePropertyBorders(rect, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = (length) => {\n strokeDashArray.push(length, 0);\n };\n const skipBorder = (length) => {\n strokeDashArray.push(0, length);\n };\n if (borders.includes('t')) {\n log.debug('add top border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('r')) {\n log.debug('add right border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes('b')) {\n log.debug('add bottom border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('l')) {\n log.debug('add left border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect.attr('stroke-dasharray', strokeDashArray.join(' '));\n}\n\nconst rectWithTitle = (parent, node) => {\n // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n // const innerRect = shapeSvg.insert('rect');\n const innerLine = shapeSvg.insert('line');\n\n const label = shapeSvg.insert('g').attr('class', 'label');\n\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n // const text2 = typeof text2prim === 'object' ? text2prim[0] : text2prim;\n\n let title = '';\n if (typeof text2 === 'object') {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info('Label text abc79', title, text2, typeof text2 === 'object');\n\n const text = label.node().appendChild(createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label\n .node()\n .appendChild(\n createLabel(textRows.join ? textRows.join('
    ') : textRows, node.labelStyle, true, true)\n );\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n // bbox = label.getBBox();\n // log.info(descr);\n const halfPadding = node.padding / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node().getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst stadium = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n // add the rect\n const rect = shapeSvg\n .insert('rect', ':first-child')\n .attr('style', node.style)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst circle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('Circle main');\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point);\n };\n\n return shapeSvg;\n};\n\nconst doublecircle = async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n const gap = 5;\n const circleGroup = shapeSvg.insert('g', ':first-child');\n const outerCircle = circleGroup.insert('circle');\n const innerCircle = circleGroup.insert('circle');\n\n circleGroup.attr('class', node.class);\n\n // center the circle around its coordinate\n outerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding + gap)\n .attr('width', bbox.width + node.padding + gap * 2)\n .attr('height', bbox.height + node.padding + gap * 2);\n\n innerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('DoubleCircle main');\n\n updateNodeBounds(node, outerCircle);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, bbox.width / 2 + halfPadding + gap, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point);\n };\n\n return shapeSvg;\n};\n\nconst subroutine = async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, undefined),\n true\n );\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst start = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let width = 70;\n let height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n\n const shape = shapeSvg\n .append('rect')\n .attr('x', (-1 * width) / 2)\n .attr('y', (-1 * height) / 2)\n .attr('width', width)\n .attr('height', height)\n .attr('class', 'fork-join');\n\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst end = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const innerCircle = shapeSvg.insert('circle', ':first-child');\n const circle = shapeSvg.insert('circle', ':first-child');\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n const topLine = shapeSvg.insert('line');\n const bottomLine = shapeSvg.insert('line');\n let maxWidth = 0;\n let maxHeight = rowPadding;\n\n const labelContainer = shapeSvg.insert('g').attr('class', 'label');\n let verticalPos = 0;\n const hasInterface = node.classData.annotations?.[0];\n\n // 1. Create the labels\n const interfaceLabelText = node.classData.annotations[0]\n ? '\u00AB' + node.classData.annotations[0] + '\u00BB'\n : '';\n const interfaceLabel = labelContainer\n .node()\n .appendChild(createLabel(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr('width', interfaceBBox.width);\n dv.attr('height', interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n\n let classTitleString = node.classData.label;\n\n if (node.classData.type !== undefined && node.classData.type !== '') {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += '<' + node.classData.type + '>';\n } else {\n classTitleString += '<' + node.classData.type + '>';\n }\n }\n const classTitleLabel = labelContainer\n .node()\n .appendChild(createLabel(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr('class', 'classTitle');\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr('width', classTitleBBox.width);\n dv.attr('height', classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let parsedText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n const classMethods = [];\n node.classData.methods.forEach((member) => {\n const parsedInfo = member.getDisplayDetails();\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n\n classMethods.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n // 2. Position the labels\n\n // position the interface label\n if (hasInterface) {\n let diffX = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n 'transform',\n 'translate( ' + ((-1 * maxWidth) / 2 + diffX) + ', ' + (-1 * maxHeight) / 2 + ')'\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n // Position the class title label\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n 'transform',\n 'translate( ' +\n ((-1 * maxWidth) / 2 + diffX) +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n\n topLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' +\n -maxWidth / 2 +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos + lineHeight / 2) +\n ')'\n );\n //get the height of the bounding box of each member if exists\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n\n verticalPos += lineHeight;\n bottomLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'\n );\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n\n rect\n .attr('style', node.style)\n .attr('class', 'outer title-state')\n .attr('x', -maxWidth / 2 - halfPadding)\n .attr('y', -(maxHeight / 2) - halfPadding)\n .attr('width', maxWidth + node.padding)\n .attr('height', maxHeight + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = {\n rhombus: question,\n composite,\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle,\n doublecircle,\n stadium,\n hexagon,\n block_arrow,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box,\n};\n\nlet nodeElems = {};\n\nexport const insertNode = async (elem, node, dir) => {\n let newEl;\n let el;\n\n // Add link when appropriate\n if (node.link) {\n let target;\n if (getConfig().securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', target);\n el = await shapes[node.shape](newEl, node, dir);\n } else {\n el = await shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n if (node.class) {\n el.attr('class', 'node default ' + node.class);\n }\n\n nodeElems[node.id] = newEl;\n\n if (node.haveCallback) {\n nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n }\n return newEl;\n};\nexport const setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nexport const clear = () => {\n nodeElems = {};\n};\n\nexport const positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n", "import { select } from 'd3';\nimport { insertNode } from '../dagre-wrapper/nodes.js';\n\nexport const getDiagramElement = (id, securityLevel) => {\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n\n return svg;\n};\n\nexport function insertElementsForSize(el, data) {\n const nodesElem = el.insert('g').attr('class', 'nodes');\n el.insert('g').attr('class', 'edges');\n data.nodes.forEach(async (item) => {\n item.shape = 'rect';\n await insertNode(nodesElem, {\n ...item,\n class: 'default flowchart-label',\n labelStyle: '',\n x: 0,\n y: 0,\n width: 100,\n rx: 0,\n ry: 0,\n height: 100,\n shape: 'rect',\n padding: 8,\n });\n // Create a new DOM element\n // const element = document.createElement('div');\n\n // // Set the content of the element to the name of the item\n // element.textContent = item.name;\n\n // // Set the size of the element to the size of the item\n // element.style.width = `${item.size}px`;\n // element.style.height = `${item.size}px`;\n\n // Append the element to the body of the document\n // document.body.appendChild(element);\n });\n}\n", "import type { FlowchartDiagramConfig } from '../config.type.js';\n\nexport const getSubGraphTitleMargins = ({\n flowchart,\n}: {\n flowchart: FlowchartDiagramConfig;\n}): {\n subGraphTitleTopMargin: number;\n subGraphTitleBottomMargin: number;\n subGraphTitleTotalMargin: number;\n} => {\n const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0;\n const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0;\n const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;\n\n return {\n subGraphTitleTopMargin,\n subGraphTitleBottomMargin,\n subGraphTitleTotalMargin,\n };\n};\n", "function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&\"number\"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;ei);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:\"fillSketch\",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:\"fillSketch\",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;tn%2?t+s:t+e));a.push({key:\"C\",data:t}),e=t[4],s=t[5];break}case\"Q\":a.push({key:\"Q\",data:[...r]}),e=r[2],s=r[3];break;case\"q\":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:\"Q\",data:t}),e=t[2],s=t[3];break}case\"A\":a.push({key:\"A\",data:[...r]}),e=r[5],s=r[6];break;case\"a\":e+=r[5],s+=r[6],a.push({key:\"A\",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case\"H\":a.push({key:\"H\",data:[...r]}),e=r[0];break;case\"h\":e+=r[0],a.push({key:\"H\",data:[e]});break;case\"V\":a.push({key:\"V\",data:[...r]}),s=r[0];break;case\"v\":s+=r[0],a.push({key:\"V\",data:[s]});break;case\"S\":a.push({key:\"S\",data:[...r]}),e=r[2],s=r[3];break;case\"s\":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:\"S\",data:t}),e=t[2],s=t[3];break}case\"T\":a.push({key:\"T\",data:[...r]}),e=r[0],s=r[1];break;case\"t\":e+=r[0],s+=r[1],a.push({key:\"T\",data:[e,s]});break;case\"Z\":case\"z\":a.push({key:\"Z\",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s=\"\",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case\"M\":e.push({key:\"M\",data:[...l]}),[n,o]=l,[a,h]=l;break;case\"C\":e.push({key:\"C\",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case\"L\":e.push({key:\"L\",data:[...l]}),[n,o]=l;break;case\"H\":n=l[0],e.push({key:\"L\",data:[n,o]});break;case\"V\":o=l[0],e.push({key:\"L\",data:[n,o]});break;case\"S\":{let t=0,a=0;\"C\"===s||\"S\"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:\"C\",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case\"T\":{const[t,a]=l;let h=0,c=0;\"Q\"===s||\"T\"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:\"C\",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case\"Q\":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:\"C\",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case\"A\":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:\"C\",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:\"C\",data:t})})),n=i,o=c}break}case\"Z\":e.push({key:\"Z\",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),td&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e2){const o=[];for(let e=0;e2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:\"lineTo\",data:[c,l]},{op:\"lineTo\",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:\"path\",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case\"M\":a=[h[0],h[1]],o=[h[0],h[1]];break;case\"L\":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case\"C\":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case\"Z\":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:\"path\",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:\"move\",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:\"move\",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:\"move\",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:\"bcurveTo\",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:\"bcurveTo\",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o3){const a=[],h=1-s.curveTightness;o.push({op:\"move\",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;ni&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s0?X(n,0,n.length,s):n}const tt=\"none\";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:\"#000\",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:\"hachure\",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d(\"line\",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];\"solid\"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d(\"rectangle\",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if(\"solid\"===a.fillStyle){const s=D(t,e,a,r).opset;s.type=\"fillPath\",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d(\"ellipse\",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape=\"circle\",o}linearPath(t,e){const s=this._o(e);return this._d(\"linearPath\",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if(\"solid\"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type=\"fillPath\",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d(\"arc\",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if(\"solid\"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:\"fillPath\",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t=\"number\"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d(\"curve\",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&(\"solid\"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d(\"polygon\",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d(\"path\",n,s);t=(t||\"\").replace(/\\n/g,\" \").replace(/(-\\s)/g,\"-\").replace(\"/(ss)/g\",\" \");const o=s.fill&&\"transparent\"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case\"M\":c(),h=[e[0],e[1]],a.push(h);break;case\"L\":i(),a.push([e[0],e[1]]);break;case\"C\":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case\"Z\":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if(\"solid\"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:\"fillPath\",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d(\"path\",n,s)}opsToPath(t,e){let s=\"\";for(const n of t.ops){const t=\"number\"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case\"move\":s+=`M${t[0]} ${t[1]} `;break;case\"bcurveTo\":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case\"lineTo\":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case\"path\":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case\"fillPath\":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case\"fillSketch\":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||\"move\"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext(\"2d\"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case\"path\":n.save(),n.strokeStyle=\"none\"===s.stroke?\"transparent\":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case\"fillPath\":{n.save(),n.fillStyle=s.fill||\"\";const e=\"curve\"===t.shape||\"polygon\"===t.shape||\"path\"===t.shape?\"evenodd\":\"nonzero\";this._drawToContext(n,a,o,e),n.restore();break}case\"fillSketch\":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||\"\",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n=\"nonzero\"){t.beginPath();for(const n of e.ops){const e=\"number\"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case\"move\":t.moveTo(e[0],e[1]);break;case\"bcurveTo\":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case\"lineTo\":t.lineTo(e[0],e[1])}}\"fillPath\"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt=\"http://www.w3.org/2000/svg\";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,\"g\"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case\"path\":e=n.createElementNS(nt,\"path\"),e.setAttribute(\"d\",this.opsToPath(h,a)),e.setAttribute(\"stroke\",s.stroke),e.setAttribute(\"stroke-width\",s.strokeWidth+\"\"),e.setAttribute(\"fill\",\"none\"),s.strokeLineDash&&e.setAttribute(\"stroke-dasharray\",s.strokeLineDash.join(\" \").trim()),s.strokeLineDashOffset&&e.setAttribute(\"stroke-dashoffset\",`${s.strokeLineDashOffset}`);break;case\"fillPath\":e=n.createElementNS(nt,\"path\"),e.setAttribute(\"d\",this.opsToPath(h,a)),e.setAttribute(\"stroke\",\"none\"),e.setAttribute(\"stroke-width\",\"0\"),e.setAttribute(\"fill\",s.fill||\"\"),\"curve\"!==t.shape&&\"polygon\"!==t.shape||e.setAttribute(\"fill-rule\",\"evenodd\");break;case\"fillSketch\":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,\"path\");return o.setAttribute(\"d\",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute(\"stroke\",s.fill||\"\"),o.setAttribute(\"stroke-width\",n+\"\"),o.setAttribute(\"fill\",\"none\"),s.fillLineDash&&o.setAttribute(\"stroke-dasharray\",s.fillLineDash.join(\" \").trim()),s.fillLineDashOffset&&o.setAttribute(\"stroke-dashoffset\",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}var at={canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()};export{at as default};\n", "const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n", "import { select } from 'd3';\nimport { log } from '$root/logger.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport common, { evaluate, renderKatex, hasKatex } from '$root/diagrams/common/common.js';\nimport { decodeEntities } from '$root/utils.js';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\n/**\n * @param {any} node\n * @returns {Promise} Node\n */\nasync function addHtmlLabel(node) {\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n let label = node.label;\n if (node.label && hasKatex(node.label)) {\n label = await renderKatex(node.label.replace(common.lineBreakRegex, '\\n'), getConfig());\n }\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html(\n '' +\n label +\n ''\n );\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n div.style('padding-right', '1px');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n/**\n * @param _vertexText\n * @param style\n * @param isTitle\n * @param isNode\n * @deprecated svg-util/createText instead\n */\nconst createLabel = async (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') {\n vertexText = vertexText[0];\n }\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
    ');\n log.info('vertexText' + vertexText);\n const node = {\n isNode,\n label: decodeEntities(vertexText).replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n labelStyle: style ? style.replace('fill:', 'color:') : style,\n };\n let vertexNode = await addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (const row of rows) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n", "export const createRoundedRectPathD = (\n x: number,\n y: number,\n totalWidth: number,\n totalHeight: number,\n radius: number\n) =>\n [\n 'M',\n x + radius,\n y, // Move to the first point\n 'H',\n x + totalWidth - radius, // Draw horizontal line to the beginning of the right corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius, // Draw arc to the right top corner\n 'V',\n y + totalHeight - radius, // Draw vertical line down to the beginning of the right bottom corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight, // Draw arc to the right bottom corner\n 'H',\n x + radius, // Draw horizontal line to the beginning of the left bottom corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + totalHeight - radius, // Draw arc to the left bottom corner\n 'V',\n y + radius, // Draw vertical line up to the beginning of the left top corner\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + radius,\n y, // Draw arc to the left top corner\n 'Z', // Close the path\n ].join(' ');\n", "import { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\n\n// Striped fill like start or fork nodes in state diagrams\nexport const solidStateFill = (color: string) => {\n const { handDrawnSeed } = getConfig();\n return {\n fill: color,\n hachureAngle: 120, // angle of hachure,\n hachureGap: 4,\n fillWeight: 2,\n roughness: 0.7,\n stroke: color,\n seed: handDrawnSeed,\n };\n};\n\nexport const compileStyles = (node: Node) => {\n // node.cssCompiledStyles is an array of strings in the form of 'key: value' where jey is the css property and value is the value\n // the array is the styles of node node from the classes it is using\n // node.cssStyles is an array of styles directly set on the node\n // concat the arrays and remove duplicates such that the values from node.cssStyles are used if there are duplicates\n const stylesMap = styles2Map([...(node.cssCompiledStyles || []), ...(node.cssStyles || [])]);\n return { stylesMap, stylesArray: [...stylesMap] };\n};\n\nexport const styles2Map = (styles: string[]) => {\n const styleMap = new Map();\n styles.forEach((style) => {\n const [key, value] = style.split(':');\n styleMap.set(key.trim(), value?.trim());\n });\n return styleMap;\n};\n\nexport const styles2String = (node: Node) => {\n const { stylesArray } = compileStyles(node);\n const labelStyles: string[] = [];\n const nodeStyles: string[] = [];\n const borderStyles: string[] = [];\n const backgroundStyles: string[] = [];\n\n stylesArray.forEach((style) => {\n const key = style[0];\n if (\n key === 'color' ||\n key === 'font-size' ||\n key === 'font-family' ||\n key === 'font-weight' ||\n key === 'font-style' ||\n key === 'text-decoration' ||\n key === 'text-align' ||\n key === 'text-transform' ||\n key === 'line-height' ||\n key === 'letter-spacing' ||\n key === 'word-spacing' ||\n key === 'text-shadow' ||\n key === 'text-overflow' ||\n key === 'white-space' ||\n key === 'word-wrap' ||\n key === 'word-break' ||\n key === 'overflow-wrap' ||\n key === 'hyphens'\n ) {\n labelStyles.push(style.join(':') + ' !important');\n } else {\n nodeStyles.push(style.join(':') + ' !important');\n if (key.includes('stroke')) {\n borderStyles.push(style.join(':') + ' !important');\n }\n if (key === 'fill') {\n backgroundStyles.push(style.join(':') + ' !important');\n }\n }\n });\n\n return {\n labelStyles: labelStyles.join(';'),\n nodeStyles: nodeStyles.join(';'),\n stylesArray,\n borderStyles,\n backgroundStyles,\n };\n};\n\n// Striped fill like start or fork nodes in state diagrams\n// TODO remove any\nexport const userNodeOverrides = (node: Node, options: any) => {\n const { themeVariables, handDrawnSeed } = getConfig();\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n\n // index the style array to a map object\n const result = Object.assign(\n {\n roughness: 0.7,\n fill: stylesMap.get('fill') || mainBkg,\n fillStyle: 'hachure', // solid fill\n fillWeight: 4,\n stroke: stylesMap.get('stroke') || nodeBorder,\n seed: handDrawnSeed,\n strokeWidth: 1.3,\n },\n options\n );\n return result;\n};\n", "import { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport { evaluate } from '$root/diagrams/common/common.js';\nimport { log } from '$root/logger.js';\nimport { getSubGraphTitleMargins } from '$root/utils/subGraphTitleMargins.js';\nimport { select } from 'd3';\nimport rough from 'roughjs';\nimport { createText } from '../createText.ts';\nimport intersectRect from '../rendering-elements/intersect/intersect-rect.js';\nimport createLabel from './createLabel.js';\nimport { createRoundedRectPathD } from './shapes/roundedRectPath.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\n\nconst rect = async (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster ' + node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg.insert('g').attr('class', 'cluster-label ');\n\n const text = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n });\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n\n log.trace('Data ', node, JSON.stringify(node));\n let rect;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 3,\n seed: handDrawnSeed,\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, 0), options);\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n // Should we affect the options instead of doing this?\n rect.select('path:nth-child(2)').attr('style', borderStyles.join(';'));\n rect.select('path').attr('style', backgroundStyles.join(';').replace('fill', 'stroke'));\n } else {\n // add the rect\n rect = shapeSvg.insert('rect', ':first-child');\n // center the rect around its coordinate\n rect\n .attr('style', nodeStyles)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n\n if (labelStyles) {\n const span = labelEl.select('span');\n if (span) {\n span.attr('style', labelStyles);\n }\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\n\n/**\n * Non visible cluster where the note is group with its\n *\n * @param {any} parent\n * @param {any} node\n * @returns {any} ShapeSvg\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: { width: 0, height: 0 } };\n};\n\nconst roundedWithTitle = async (parent, node) => {\n const siteConfig = getConfig();\n\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { altBackground, compositeBackground, compositeTitleBackground, nodeBorder } =\n themeVariables;\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.cssClasses)\n .attr('id', node.id)\n .attr('data-id', node.id)\n .attr('data-look', node.look);\n\n // add the rect\n const outerRectG = shapeSvg.insert('g', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n let innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(await createLabel(node.label, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Rounded With Title\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width =\n (node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width) + padding;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n\n const height = node.height + padding;\n // const height = node.height + padding;\n const innerHeight = node.height + padding - bbox.height - 6;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n const innerY = node.y - node.height / 2 - halfPadding + bbox.height + 2;\n\n // add the rect\n let rect;\n if (node.look === 'handDrawn') {\n const isAlt = node.cssClasses.includes('statediagram-cluster-alt');\n const rc = rough.svg(shapeSvg);\n const roughOuterNode =\n node.rx || node.ry\n ? rc.path(createRoundedRectPathD(x, y, width, height, 10), {\n roughness: 0.7,\n fill: compositeTitleBackground,\n fillStyle: 'solid',\n stroke: nodeBorder,\n seed: handDrawnSeed,\n })\n : rc.rectangle(x, y, width, height, { seed: handDrawnSeed });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n const roughInnerNode = rc.rectangle(x, innerY, width, innerHeight, {\n fill: isAlt ? altBackground : compositeBackground,\n fillStyle: isAlt ? 'hachure' : 'solid',\n stroke: nodeBorder,\n seed: handDrawnSeed,\n });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n innerRect = shapeSvg.insert(() => roughInnerNode);\n } else {\n rect = outerRectG.insert('rect', ':first-child');\n const outerRectClass = 'outer';\n\n // center the rect around its coordinate\n rect\n .attr('class', outerRectClass)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('data-look', node.look);\n innerRect\n .attr('class', 'inner')\n .attr('x', x)\n .attr('y', innerY)\n .attr('width', width)\n .attr('height', innerHeight);\n }\n\n label.attr(\n 'transform',\n `translate(${node.x - bbox.width / 2}, ${y + 1 - (evaluate(siteConfig.flowchart.htmlLabels) ? 0 : 3)})`\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n // Used by layout engine to position subgraph in parent\n node.offsetY = bbox.height - node.padding / 2;\n node.labelBBox = bbox;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: bbox };\n};\nconst divider = (parent, node) => {\n const siteConfig = getConfig();\n\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { nodeBorder } = themeVariables;\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', node.cssClasses)\n .attr('id', node.id)\n .attr('data-look', node.look);\n\n // add the rect\n const outerRectG = shapeSvg.insert('g', ':first-child');\n\n const padding = 0 * node.padding;\n\n const width = node.width + padding;\n\n node.diff = -node.padding;\n\n const height = node.height + padding;\n // const height = node.height + padding;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n\n // add the rect\n let rect;\n if (node.look === 'handDrawn') {\n const rc = rough.svg(shapeSvg);\n const roughOuterNode = rc.rectangle(x, y, width, height, {\n fill: 'lightgrey',\n roughness: 0.5,\n strokeLineDash: [5],\n stroke: nodeBorder,\n seed: handDrawnSeed,\n });\n\n rect = shapeSvg.insert(() => roughOuterNode, ':first-child');\n } else {\n rect = outerRectG.insert('rect', ':first-child');\n const outerRectClass = 'divider';\n\n // center the rect around its coordinate\n rect\n .attr('class', outerRectClass)\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('data-look', node.look);\n }\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n // Used by layout engine to position subgraph in parent\n node.offsetY = 0;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return { cluster: shapeSvg, labelBBox: {} };\n};\n\nconst squareRect = rect;\nconst shapes = {\n rect,\n squareRect,\n roundedWithTitle,\n noteGroup,\n divider,\n};\n\nlet clusterElems = new Map();\n\nexport const insertCluster = async (elem, node) => {\n const shape = node.shape || 'rect';\n const cluster = await shapes[shape](elem, node);\n clusterElems.set(node.id, cluster);\n return cluster;\n};\n\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.label, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = new Map();\n};\n\nexport const positionCluster = (node) => {\n log.info(\n 'Position cluster (' +\n node.id +\n ', ' +\n node.x +\n ', ' +\n node.y +\n ') (' +\n node?.width +\n ', ' +\n node?.height +\n ')',\n clusterElems.get(node.id)\n );\n const el = clusterElems.get(node.id);\n el.cluster.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n", "import type { EdgeData, Point } from '../types.js';\n\n// We need to draw the lines a bit shorter to avoid drawing\n// under any transparent markers.\n// The offsets are calculated from the markers' dimensions.\nconst markerOffsets = {\n aggregation: 18,\n extension: 18,\n composition: 18,\n dependency: 6,\n lollipop: 13.5,\n arrow_point: 4,\n} as const;\n\n/**\n * Calculate the deltas and angle between two points\n * @param point1 - First point\n * @param point2 - Second point\n * @returns The angle, deltaX and deltaY\n */\nfunction calculateDeltaAndAngle(\n point1?: Point | [number, number],\n point2?: Point | [number, number]\n): { angle: number; deltaX: number; deltaY: number } {\n if (point1 === undefined || point2 === undefined) {\n return { angle: 0, deltaX: 0, deltaY: 0 };\n }\n point1 = pointTransformer(point1);\n point2 = pointTransformer(point2);\n const [x1, y1] = [point1.x, point1.y];\n const [x2, y2] = [point2.x, point2.y];\n const deltaX = x2 - x1;\n const deltaY = y2 - y1;\n return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY };\n}\n\nconst pointTransformer = (data: Point | [number, number]) => {\n if (Array.isArray(data)) {\n return { x: data[0], y: data[1] };\n }\n return data;\n};\n\nexport const getLineFunctionsWithOffset = (\n edge: Pick\n) => {\n return {\n x: function (\n this: void,\n d: Point | [number, number],\n i: number,\n data: (Point | [number, number])[]\n ) {\n let offset = 0;\n if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n // Handle first point\n // Calculate the angle and delta between the first two points\n const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]);\n // Calculate the offset based on the angle and the marker's dimensions\n offset =\n markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets] *\n Math.cos(angle) *\n (deltaX >= 0 ? 1 : -1);\n } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n // Handle last point\n // Calculate the angle and delta between the last two points\n const { angle, deltaX } = calculateDeltaAndAngle(\n data[data.length - 1],\n data[data.length - 2]\n );\n offset =\n markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets] *\n Math.cos(angle) *\n (deltaX >= 0 ? 1 : -1);\n }\n return pointTransformer(d).x + offset;\n },\n y: function (\n this: void,\n d: Point | [number, number],\n i: number,\n data: (Point | [number, number])[]\n ) {\n // Same handling as X above\n let offset = 0;\n if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]);\n offset =\n markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets] *\n Math.abs(Math.sin(angle)) *\n (deltaY >= 0 ? 1 : -1);\n } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n const { angle, deltaY } = calculateDeltaAndAngle(\n data[data.length - 1],\n data[data.length - 2]\n );\n offset =\n markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets] *\n Math.abs(Math.sin(angle)) *\n (deltaY >= 0 ? 1 : -1);\n }\n return pointTransformer(d).y + offset;\n },\n };\n};\n\nif (import.meta.vitest) {\n const { it, expect, describe } = import.meta.vitest;\n describe('calculateDeltaAndAngle', () => {\n it('should calculate the angle and deltas between two points', () => {\n expect(calculateDeltaAndAngle([0, 0], [0, 1])).toStrictEqual({\n angle: 1.5707963267948966,\n deltaX: 0,\n deltaY: 1,\n });\n expect(calculateDeltaAndAngle([1, 0], [0, -1])).toStrictEqual({\n angle: 0.7853981633974483,\n deltaX: -1,\n deltaY: -1,\n });\n expect(calculateDeltaAndAngle({ x: 1, y: 0 }, [0, -1])).toStrictEqual({\n angle: 0.7853981633974483,\n deltaX: -1,\n deltaY: -1,\n });\n expect(calculateDeltaAndAngle({ x: 1, y: 0 }, { x: 1, y: 0 })).toStrictEqual({\n angle: NaN,\n deltaX: 0,\n deltaY: 0,\n });\n });\n\n it('should calculate the angle and deltas if one point in undefined', () => {\n expect(calculateDeltaAndAngle(undefined, [0, 1])).toStrictEqual({\n angle: 0,\n deltaX: 0,\n deltaY: 0,\n });\n expect(calculateDeltaAndAngle([0, 1], undefined)).toStrictEqual({\n angle: 0,\n deltaX: 0,\n deltaY: 0,\n });\n });\n });\n}\n", "import type { SVG } from '$root/diagram-api/types.js';\nimport { log } from '$root/logger.js';\nimport type { EdgeData } from '$root/types.js';\n/**\n * Adds SVG markers to a path element based on the arrow types specified in the edge.\n *\n * @param svgPath - The SVG path element to add markers to.\n * @param edge - The edge data object containing the arrow types.\n * @param url - The URL of the SVG marker definitions.\n * @param id - The ID prefix for the SVG marker definitions.\n * @param diagramType - The type of diagram being rendered.\n */\nexport const addEdgeMarkers = (\n svgPath: SVG,\n edge: Pick,\n url: string,\n id: string,\n diagramType: string\n) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType);\n }\n};\n\nconst arrowTypesMap = {\n arrow_cross: 'cross',\n arrow_point: 'point',\n arrow_barb: 'barb',\n arrow_circle: 'circle',\n aggregation: 'aggregation',\n extension: 'extension',\n composition: 'composition',\n dependency: 'dependency',\n lollipop: 'lollipop',\n} as const;\n\nconst addEdgeMarker = (\n svgPath: SVG,\n position: 'start' | 'end',\n arrowType: string,\n url: string,\n id: string,\n diagramType: string\n) => {\n const endMarkerType = arrowTypesMap[arrowType as keyof typeof arrowTypesMap];\n\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return; // unknown arrow type, ignore\n }\n\n const suffix = position === 'start' ? 'Start' : 'End';\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n};\n", "import { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport { evaluate } from '$root/diagrams/common/common.js';\nimport { log } from '$root/logger.js';\nimport { createText } from '$root/rendering-util/createText.ts';\nimport utils from '$root/utils.js';\nimport { getLineFunctionsWithOffset } from '$root/utils/lineWithOffset.js';\nimport { getSubGraphTitleMargins } from '$root/utils/subGraphTitleMargins.js';\nimport { curveBasis, line, select } from 'd3';\nimport rough from 'roughjs';\nimport createLabel from './createLabel.js';\nimport { addEdgeMarkers } from './edgeMarker.ts';\n\nconst edgeLabels = new Map();\nconst terminalLabels = new Map();\n\nexport const clear = () => {\n edgeLabels.clear();\n terminalLabels.clear();\n};\n\nexport const getLabelStyles = (styleArray) => {\n let styles = styleArray ? styleArray.reduce((acc, style) => acc + ';' + style, '') : '';\n return styles;\n};\n\nexport const insertEdgeLabel = async (elem, edge) => {\n let useHtmlLabels = evaluate(getConfig().flowchart.htmlLabels);\n\n const labelElement = await createText(elem, edge.label, {\n style: getLabelStyles(edge.labelStyle),\n useHtmlLabels,\n addSvgBackground: true,\n isNode: false,\n });\n log.info('abc82', edge, edge.labelType);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels.set(edge.id, edgeLabel);\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = await createLabel(\n edge.startLabelLeft,\n getLabelStyles(edge.labelStyle)\n );\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = await createLabel(\n edge.startLabelRight,\n getLabelStyles(edge.labelStyle)\n );\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = await createLabel(edge.endLabelLeft, getLabelStyles(edge.labelStyle));\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = await createLabel(edge.endLabelRight, getLabelStyles(edge.labelStyle));\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels.get(edge.id)) {\n terminalLabels.set(edge.id, {});\n }\n terminalLabels.get(edge.id).endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + 'px';\n fo.style.height = '12px';\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels.get(edge.id), paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels.get(edge.id);\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcLabelPosition(path);\n log.debug(\n 'Moving label ' + edge.label + ' from (',\n x,\n ',',\n y,\n ') to (',\n pos.x,\n ',',\n pos.y,\n ') abc88'\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr('transform', `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n\n if (edge.startLabelLeft) {\n const el = terminalLabels.get(edge.id).startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels.get(edge.id).startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n 'start_right',\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels.get(edge.id).endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels.get(edge.id).endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n};\n\nconst outsideNode = (node, point) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n return dx >= w || dy >= h;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // Intersection is top or bottom of rect.\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.debug(`abc89 top/bottom calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n\n return res;\n } else {\n // Intersection on sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n log.warn('abc88 cutPathAtIntersect', _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n log.info('abc88 checking point', point, boundaryNode);\n\n if (!outsideNode(boundaryNode, point) && !isInside) {\n const inter = intersection(boundaryNode, lastPointOutside, point);\n log.debug('abc88 inside', point, lastPointOutside, inter);\n log.debug('abc88 intersection', inter, boundaryNode);\n\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n } else {\n log.warn('abc88 no intersect', inter, points);\n }\n isInside = true;\n } else {\n log.warn('abc88 outside', point, lastPointOutside);\n lastPointOutside = point;\n if (!isInside) {\n points.push(point);\n }\n }\n });\n log.debug('returning points', points);\n return points;\n};\n\nfunction extractCornerPoints(points) {\n const cornerPoints = [];\n const cornerPointPositions = [];\n for (let i = 1; i < points.length - 1; i++) {\n const prev = points[i - 1];\n const curr = points[i];\n const next = points[i + 1];\n if (\n prev.x === curr.x &&\n curr.y === next.y &&\n Math.abs(curr.x - next.x) > 5 &&\n Math.abs(curr.y - prev.y) > 5\n ) {\n cornerPoints.push(curr);\n cornerPointPositions.push(i);\n } else if (\n prev.y === curr.y &&\n curr.x === next.x &&\n Math.abs(curr.x - prev.x) > 5 &&\n Math.abs(curr.y - next.y) > 5\n ) {\n cornerPoints.push(curr);\n cornerPointPositions.push(i);\n }\n }\n return { cornerPoints, cornerPointPositions };\n}\n\nconst findAdjacentPoint = function (pointA, pointB, distance) {\n const xDiff = pointB.x - pointA.x;\n const yDiff = pointB.y - pointA.y;\n const length = Math.sqrt(xDiff * xDiff + yDiff * yDiff);\n const ratio = distance / length;\n return { x: pointB.x - ratio * xDiff, y: pointB.y - ratio * yDiff };\n};\n\nconst fixCorners = function (lineData) {\n const { cornerPointPositions } = extractCornerPoints(lineData);\n const newLineData = [];\n for (let i = 0; i < lineData.length; i++) {\n if (cornerPointPositions.includes(i)) {\n const prevPoint = lineData[i - 1];\n const nextPoint = lineData[i + 1];\n const cornerPoint = lineData[i];\n\n const newPrevPoint = findAdjacentPoint(prevPoint, cornerPoint, 5);\n const newNextPoint = findAdjacentPoint(nextPoint, cornerPoint, 5);\n\n const xDiff = newNextPoint.x - newPrevPoint.x;\n const yDiff = newNextPoint.y - newPrevPoint.y;\n newLineData.push(newPrevPoint);\n\n const a = Math.sqrt(2) * 2;\n let newCornerPoint = { x: cornerPoint.x, y: cornerPoint.y };\n if (Math.abs(nextPoint.x - prevPoint.x) > 10 && Math.abs(nextPoint.y - prevPoint.y) >= 10) {\n log.debug(\n 'Corner point fixing',\n Math.abs(nextPoint.x - prevPoint.x),\n Math.abs(nextPoint.y - prevPoint.y)\n );\n const r = 5;\n if (cornerPoint.x === newPrevPoint.x) {\n newCornerPoint = {\n x: xDiff < 0 ? newPrevPoint.x - r + a : newPrevPoint.x + r - a,\n y: yDiff < 0 ? newPrevPoint.y - a : newPrevPoint.y + a,\n };\n } else {\n newCornerPoint = {\n x: xDiff < 0 ? newPrevPoint.x - a : newPrevPoint.x + a,\n y: yDiff < 0 ? newPrevPoint.y - r + a : newPrevPoint.y + r - a,\n };\n }\n } else {\n log.debug(\n 'Corner point skipping fixing',\n Math.abs(nextPoint.x - prevPoint.x),\n Math.abs(nextPoint.y - prevPoint.y)\n );\n }\n newLineData.push(newCornerPoint, newNextPoint);\n } else {\n newLineData.push(lineData[i]);\n }\n }\n return newLineData;\n};\n\nexport const insertEdge = function (elem, edge, clusterDb, diagramType, startNode, endNode, id) {\n const { handDrawnSeed } = getConfig();\n let points = edge.points;\n let pointsHasChanged = false;\n const tail = startNode;\n var head = endNode;\n\n if (head.intersect && tail.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n log.debug(\n 'Last point APA12',\n edge.start,\n '-->',\n edge.end,\n points[points.length - 1],\n head,\n head.intersect(points[points.length - 1])\n );\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.info('to cluster abc88', clusterDb.get(edge.toCluster));\n points = cutPathAtIntersect(edge.points, clusterDb.get(edge.toCluster).node);\n\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.debug(\n 'from cluster abc88',\n clusterDb.get(edge.fromCluster),\n JSON.stringify(points, null, 2)\n );\n points = cutPathAtIntersect(points.reverse(), clusterDb.get(edge.fromCluster).node).reverse();\n\n pointsHasChanged = true;\n }\n\n let lineData = points.filter((p) => !Number.isNaN(p.y));\n lineData = fixCorners(lineData);\n let lastPoint = lineData[lineData.length - 1];\n if (lineData.length > 1) {\n lastPoint = lineData[lineData.length - 1];\n const secondLastPoint = lineData[lineData.length - 2];\n const diffX = (lastPoint.x - secondLastPoint.x) / 2;\n const diffY = (lastPoint.y - secondLastPoint.y) / 2;\n const midPoint = { x: secondLastPoint.x + diffX, y: secondLastPoint.y + diffY };\n lineData.splice(-1, 0, midPoint);\n }\n let curve = curveBasis;\n if (edge.curve) {\n curve = edge.curve;\n }\n\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n case 'invisible':\n strokeClasses = 'edge-thickness-invisible';\n break;\n default:\n strokeClasses = 'edge-thickness-normal';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n default:\n strokeClasses += ' edge-pattern-solid';\n }\n let svgPath;\n let linePath = lineFunction(lineData);\n const edgeStyles = Array.isArray(edge.style) ? edge.style : [edge.style];\n if (edge.look === 'handDrawn') {\n const rc = rough.svg(elem);\n Object.assign([], lineData);\n\n const svgPathNode = rc.path(linePath, {\n roughness: 0.3,\n seed: handDrawnSeed,\n });\n\n strokeClasses += ' transition';\n\n svgPath = select(svgPathNode)\n .select('path')\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edgeStyles ? edgeStyles.reduce((acc, style) => acc + ';' + style, '') : '');\n let d = svgPath.attr('d');\n svgPath.attr('d', d);\n elem.node().appendChild(svgPath.node());\n } else {\n svgPath = elem\n .append('path')\n .attr('d', linePath)\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edgeStyles ? edgeStyles.reduce((acc, style) => acc + ';' + style, '') : '');\n }\n\n // DEBUG code, DO NOT REMOVE\n // adds a red circle at each edge coordinate\n // cornerPoints.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 3)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // lineData.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 3)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(').replace(/\\)/g, '\\\\)');\n }\n log.info('arrowTypeStart', edge.arrowTypeStart);\n log.info('arrowTypeEnd', edge.arrowTypeEnd);\n\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n", "/** Setup arrow head and define the marker. The result is appended to the svg. */\nimport { log } from '$root/logger.js';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 6)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst lollipop = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopStart')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopEnd')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n};\nconst point = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 8)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 4.5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 8)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semantic free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n", "import { createText } from '$root/rendering-util/createText.ts';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport { evaluate, sanitizeText } from '$root/diagrams/common/common.js';\nimport { decodeEntities } from '$root/utils.js';\n\nexport const labelHelper = async (parent, node, _classes) => {\n let cssClasses;\n const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig().flowchart.htmlLabels);\n if (!_classes) {\n cssClasses = 'node default';\n } else {\n cssClasses = _classes;\n }\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', cssClasses)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const labelEl = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n\n // Replace label with default value if undefined\n let label;\n if (node.label === undefined) {\n label = '';\n } else {\n label = typeof node.label === 'string' ? node.label : node.label[0];\n }\n\n let text;\n text = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig()), {\n useHtmlLabels,\n width: node.width || getConfig().flowchart.wrappingWidth,\n cssClasses: 'markdown-node-label',\n style: node.labelStyle,\n });\n // Get the size of the label\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n\n // if there are images, need to wait for them to load before getting the bounding box\n const images = div.getElementsByTagName('img');\n if (images) {\n const noImgText = label.replace(/]*>/g, '').trim() === '';\n\n await Promise.all(\n [...images].map(\n (img) =>\n new Promise((res) => {\n /**\n *\n */\n function setupImage() {\n img.style.display = 'flex';\n img.style.flexDirection = 'column';\n\n if (noImgText) {\n // default size if no text\n const bodyFontSize = getConfig().fontSize\n ? getConfig().fontSize\n : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = '100%';\n }\n res(img);\n }\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener('error', setupImage);\n img.addEventListener('load', setupImage);\n })\n )\n );\n }\n\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n // Center the label\n if (useHtmlLabels) {\n labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n } else {\n labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n }\n if (node.centerLabel) {\n labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n }\n labelEl.insert('rect', ':first-child');\n return { shapeSvg, bbox, halfPadding, label: labelEl };\n};\n\nexport const updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\n/**\n * @param parent\n * @param w\n * @param h\n * @param points\n */\nexport function insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\nexport const getNodeClasses = (node, extra) =>\n (node.look === 'handDrawn' ? 'rough-node' : 'node') + ' ' + node.cssClasses + ' ' + (extra || '');\n", "function intersectNode(node, point) {\n return node.intersect(point);\n}\n\nexport default intersectNode;\n", "function intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n", "import intersectEllipse from './intersect-ellipse.js';\n\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n", "/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DON'T_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n", "import intersectLine from './intersect-line.js';\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n */\nfunction intersectPolygon(node, polyPoints, point) {\n let x1 = node.x;\n let y1 = node.y;\n\n let intersections = [];\n\n let minX = Number.POSITIVE_INFINITY;\n let minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n let left = x1 - node.width / 2 - minX;\n let top = y1 - node.height / 2 - minY;\n\n for (let i = 0; i < polyPoints.length; i++) {\n let p1 = polyPoints[i];\n let p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n let intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n let pdx = p.x - point.x;\n let pdy = p.y - point.y;\n let distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n let qdx = q.x - point.x;\n let qdy = q.y - point.y;\n let distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n\nexport default intersectPolygon;\n", "/*\n * Borrowed with love from from dagre-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, RectOptions } from '$root/rendering-util/types.d.ts';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport {\n userNodeOverrides,\n styles2String,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nexport const drawRect = async (parent: SVGAElement, node: Node, options: RectOptions) => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n // console.log('IPI labelStyles:', labelStyles);\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const totalWidth = Math.max(bbox.width + options.labelPaddingX * 2, node?.width || 0);\n const totalHeight = Math.max(bbox.height + options.labelPaddingY * 2, node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n\n // log.info('IPI node = ', node);\n\n let rect;\n let { rx, ry } = node;\n const { cssStyles } = node;\n\n //use options rx, ry overrides if present\n if (options?.rx && options.ry) {\n rx = options.rx;\n ry = options.ry;\n }\n\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const roughNode =\n rx || ry\n ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', cssStyles);\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('rx', rx)\n .attr('data-id', 'abc')\n .attr('data-et', 'node')\n .attr('ry', ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n", "import type { Node, RectOptions } from '$root/rendering-util/types.d.ts';\nimport { drawRect } from './drawRect.js';\n\nexport const state = async (parent: SVGAElement, node: Node) => {\n const options = {\n rx: 5,\n ry: 5,\n classes: 'flowchart-node',\n } as RectOptions;\n return drawRect(parent, node, options);\n};\n", "import type { Node, RectOptions } from '$root/rendering-util/types.d.ts';\nimport { drawRect } from './drawRect.js';\n\nexport const roundedRect = async (parent: SVGAElement, node: Node) => {\n const options = {\n rx: 5,\n ry: 5,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 1,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n\n return drawRect(parent, node, options);\n};\n", "import type { Node, RectOptions } from '$root/rendering-util/types.d.ts';\nimport { drawRect } from './drawRect.js';\n\nexport const squareRect = async (parent: SVGAElement, node: Node) => {\n const options = {\n rx: 0,\n ry: 0,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 2,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n return drawRect(parent, node, options);\n};\n", "import { updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport type { SVG } from '$root/diagram-api/types.js';\nimport rough from 'roughjs';\nimport { solidStateFill } from './handDrawnShapeStyles.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\n\nexport const stateStart = (parent: SVG, node: Node) => {\n const { themeVariables } = getConfig();\n const { lineColor } = themeVariables;\n\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let circle;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const roughNode = rc.circle(0, 0, 14, solidStateFill(lineColor));\n circle = shapeSvg.insert(() => roughNode);\n } else {\n circle = shapeSvg.insert('circle', ':first-child');\n }\n\n // center the circle around its coordinate\n // @ts-ignore TODO: Fix typings\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n", "import { updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport type { SVG } from '$root/diagram-api/types.js';\nimport rough from 'roughjs';\nimport { solidStateFill } from './handDrawnShapeStyles.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\n\nexport const stateEnd = (parent: SVG, node: Node) => {\n const { themeVariables } = getConfig();\n const { lineColor } = themeVariables;\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let circle;\n let innerCircle;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const roughNode = rc.circle(0, 0, 14, { ...solidStateFill(lineColor), roughness: 0.5 });\n const roughInnerNode = rc.circle(0, 0, 5, { ...solidStateFill(lineColor), fillStyle: 'solid' });\n circle = shapeSvg.insert(() => roughNode);\n innerCircle = shapeSvg.insert(() => roughInnerNode);\n } else {\n innerCircle = shapeSvg.insert('circle', ':first-child');\n circle = shapeSvg.insert('circle', ':first-child');\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n }\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n", "import { updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport type { SVG } from '$root/diagram-api/types.js';\nimport rough from 'roughjs';\nimport { solidStateFill } from './handDrawnShapeStyles.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\n\nexport const forkJoin = (parent: SVG, node: Node, dir: string) => {\n const { themeVariables } = getConfig();\n const { lineColor } = themeVariables;\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let width = 70;\n let height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n const x = (-1 * width) / 2;\n const y = (-1 * height) / 2;\n\n let shape;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const roughNode = rc.rectangle(x, y, width, height, solidStateFill(lineColor));\n shape = shapeSvg.insert(() => roughNode);\n } else {\n shape = shapeSvg\n .append('rect')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('class', 'fork-join');\n }\n\n updateNodeBounds(node, shape);\n let nodeHeight = 0;\n let nodeWidth = 0;\n let nodePadding = 10;\n if (node.height) {\n nodeHeight = node.height;\n }\n if (node.width) {\n nodeWidth = node.width;\n }\n\n if (node.padding) {\n nodePadding = node.padding;\n }\n\n node.height = nodeHeight + nodePadding / 2;\n node.width = nodeWidth + nodePadding / 2;\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n", "import intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport type { SVG } from '$root/diagram-api/types.js';\n// @ts-ignore TODO: Fix rough typings\nimport rough from 'roughjs';\nimport { solidStateFill, styles2String } from './handDrawnShapeStyles.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\n\nexport const choice = (parent: SVG, node: Node) => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { themeVariables } = getConfig();\n const { lineColor } = themeVariables;\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n let choice;\n if (node.look === 'handDrawn') {\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const pointArr = points.map(function (d) {\n return [d.x, d.y];\n });\n const roughNode = rc.polygon(pointArr, solidStateFill(lineColor));\n choice = shapeSvg.insert(() => roughNode);\n } else {\n choice = shapeSvg.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n );\n }\n\n // center the circle around its coordinate\n choice\n .attr('class', 'state-start')\n // @ts-ignore TODO: Fix rough typings\n .attr('r', 7)\n .attr('width', 28)\n .attr('height', 28)\n .attr('style', nodeStyles);\n\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.circle(node, 14, point);\n };\n\n return shapeSvg;\n};\n", "import { log } from '$root/logger.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport rough from 'roughjs';\n\nexport const note = async (parent: SVGAElement, node: Node) => {\n const { themeVariables, handDrawnSeed } = getConfig();\n const { noteBorderColor, noteBkgColor } = themeVariables;\n\n const useHtmlLabels = node.useHtmlLabels;\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, 'node ' + node.cssClasses);\n\n log.info('Classes = ', node.cssClasses);\n const { cssStyles } = node;\n let rect;\n const totalWidth = bbox.width + node.padding;\n const totalHeight = bbox.height + node.padding;\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n\n if (node.look === 'handDrawn') {\n // add the rect\n // @ts-ignore TODO: Fix rough typings\n const rc = rough.svg(shapeSvg);\n const roughNode = rc.rectangle(x, y, totalWidth, totalHeight, {\n roughness: 0.7,\n fill: noteBkgColor,\n fillWeight: 3,\n seed: handDrawnSeed,\n // fillStyle: 'solid', // solid fill'\n stroke: noteBorderColor,\n });\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', cssStyles);\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', x)\n .attr('y', y)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\n\nexport const createStadiumPathD = (\n x: number,\n y: number,\n totalWidth: number,\n totalHeight: number\n) => {\n const radius = totalHeight / 2;\n return [\n 'M',\n x + radius,\n y, // Move to the start of the top-left arc\n 'H',\n x + totalWidth - radius, // Draw horizontal line to the start of the top-right arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius, // Draw top-right arc\n 'H',\n x, // Draw horizontal line to the start of the bottom-right arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight, // Draw bottom-right arc\n 'H',\n x + radius, // Draw horizontal line to the start of the bottom-left arc\n 'A',\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + radius, // Draw bottom-left arc\n 'Z', // Close the path\n ].join(' ');\n};\n\nexport const stadium = async (parent: SVGAElement, node: Node) => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n let rect;\n const { cssStyles } = node;\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const pathData = createRoundedRectPathD(-w / 2, -h / 2, w, h, h / 2);\n const roughNode = rc.path(pathData, options);\n\n rect = shapeSvg.insert(() => roughNode, ':first-child');\n rect.attr('class', 'basic label-container').attr('style', cssStyles);\n } else {\n rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n", "import type { Node } from '$root/rendering-util/types.d.ts';\nimport { select } from 'd3';\nimport { evaluate } from '$root/diagrams/common/common.js';\nimport { updateNodeBounds } from './util.js';\nimport createLabel from '../createLabel.js';\nimport intersect from '../intersect/index.js';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { log } from '$root/logger.js';\n\nexport const rectWithTitle = async (parent: SVGElement, node: Node) => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n let classes;\n if (!node.cssClasses) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.cssClasses;\n }\n\n // Add outer g element\n const shapeSvg = parent\n // @ts-ignore - d3 typings are not correct\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const g = shapeSvg.insert('g');\n\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', nodeStyles);\n\n const description = node.description;\n\n const title = node.label;\n\n const text = label.node().appendChild(await createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', description);\n const textRows = description || [];\n const titleBox = text.getBBox();\n const descr = label\n .node()\n .appendChild(\n await createLabel(\n textRows.join ? textRows.join('
    ') : textRows,\n node.labelStyle,\n true,\n true\n )\n );\n\n //if (evaluate(getConfig()?.flowchart?.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n // }\n\n const halfPadding = (node.padding || 0) / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node().getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n const totalWidth = bbox.width + (node.padding || 0);\n const totalHeight = bbox.height + (node.padding || 0);\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n let rect;\n let innerLine;\n if (node.look === 'handDrawn') {\n // @ts-ignore No typings for rough\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.path(\n createRoundedRectPathD(x, y, totalWidth, totalHeight, node.rx || 0),\n options\n );\n\n const roughLine = rc.line(\n -bbox.width / 2 - halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n bbox.width / 2 + halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n options\n );\n\n innerLine = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughLine;\n }, ':first-child');\n rect = shapeSvg.insert(() => {\n log.debug('Rough node insert CXC', roughNode);\n return roughNode;\n }, ':first-child');\n } else {\n rect = g.insert('rect', ':first-child');\n innerLine = g.insert('line');\n rect\n .attr('class', 'outer title-state')\n .attr('style', nodeStyles)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + (node.padding || 0))\n .attr('height', bbox.height + (node.padding || 0));\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n }\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n", "export function insertPolygonShape(\n parent: any,\n w: number,\n h: number,\n points: { x: number; y: number }[]\n) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createSubroutinePathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n const offset = 8;\n return [\n `M${x - offset},${y}`,\n `H${x + width + offset}`,\n `V${y + height}`,\n `H${x - offset}`,\n `V${y}`,\n 'M',\n x,\n y,\n 'H',\n x + width,\n 'V',\n y + height,\n 'H',\n x,\n 'Z',\n ].join(' ');\n};\n\nexport const subroutine = async (parent: SVGAElement, node: Node) => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const halfPadding = (node?.padding || 0) / 2;\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n\n const roughNode = rc.rectangle(x - 8, y, w + 16, h, options);\n const l1 = rc.line(x, y, x, y + h, options);\n const l2 = rc.line(x + w, y, x + w, y + h, options);\n\n shapeSvg.insert(() => l1, ':first-child');\n shapeSvg.insert(() => l2, ':first-child');\n const rect = shapeSvg.insert(() => roughNode, ':first-child');\n const { cssStyles } = node;\n rect.attr('class', 'basic label-container').attr('style', cssStyles);\n updateNodeBounds(node, rect);\n } else {\n const el = insertPolygonShape(shapeSvg, w, h, points);\n if (nodeStyles) {\n el.attr('style', nodeStyles);\n }\n updateNodeBounds(node, el);\n }\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nexport default subroutine;\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nexport const createCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n rx: number,\n ry: number\n): string => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\nexport const cylinder = async (parent: SVGAElement, node: Node) => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n\n let cylinder: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n\n cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n cylinder.attr('class', 'basic label-container');\n if (cssStyles) {\n cylinder.attr('style', cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n cylinder = shapeSvg\n .insert('path', ':first-child')\n .attr('d', pathData)\n .attr('class', 'basic label-container')\n .attr('style', cssStyles)\n .attr('style', nodeStyles);\n }\n\n cylinder.attr('label-offset-y', ry);\n cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n updateNodeBounds(node, cylinder);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n\n if (\n rx != 0 &&\n (Math.abs(x) < (node.width ?? 0) / 2 ||\n (Math.abs(x) == (node.width ?? 0) / 2 &&\n Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n ) {\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n};\n", "import { log } from '$root/logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nexport const circle = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n\n const radius = bbox.width / 2 + halfPadding;\n let circleElem;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.circle(0, 0, radius * 2, options);\n\n circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n circleElem.attr('class', 'basic label-container').attr('style', cssStyles);\n } else {\n circleElem = shapeSvg\n .insert('circle', ':first-child')\n .attr('class', 'basic label-container')\n .attr('style', nodeStyles)\n .attr('r', radius)\n .attr('cx', 0)\n .attr('cy', 0);\n }\n\n updateNodeBounds(node, circleElem);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, radius, point);\n return intersect.circle(node, radius, point);\n };\n\n return shapeSvg;\n};\n", "import { log } from '$root/logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nexport const doublecircle = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n const gap = 5;\n const outerRadius = bbox.width / 2 + halfPadding + gap;\n const innerRadius = bbox.width / 2 + halfPadding;\n\n let circleGroup;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const outerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 2.5 });\n\n const innerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 1.5 });\n const outerRoughNode = rc.circle(0, 0, outerRadius * 2, outerOptions);\n const innerRoughNode = rc.circle(0, 0, innerRadius * 2, innerOptions);\n\n circleGroup = shapeSvg.insert('g', ':first-child');\n // circleGroup = circleGroup.insert(() => outerRoughNode, ':first-child');\n circleGroup.attr('class', node.cssClasses).attr('style', cssStyles);\n\n circleGroup.node()?.appendChild(outerRoughNode);\n circleGroup.node()?.appendChild(innerRoughNode);\n } else {\n circleGroup = shapeSvg.insert('g', ':first-child');\n\n const outerCircle = circleGroup.insert('circle', ':first-child');\n const innerCircle = circleGroup.insert('circle');\n circleGroup.attr('class', 'basic label-container').attr('style', nodeStyles);\n\n outerCircle\n .attr('class', 'outer-circle')\n .attr('style', nodeStyles)\n .attr('r', outerRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n\n innerCircle\n .attr('class', 'inner-circle')\n .attr('style', nodeStyles)\n .attr('r', innerRadius)\n .attr('cx', 0)\n .attr('cy', 0);\n }\n\n updateNodeBounds(node, circleGroup);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, outerRadius, point);\n return intersect.circle(node, outerRadius, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createPolygonPathD = (x: number, y: number, width: number, height: number): string => {\n return [\n `M${x - height / 2},${y}`,\n `L${x + width},${y}`,\n `L${x + width},${y - height}`,\n `L${x - height / 2},${y - height}`,\n `L${x},${y - height / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport const rect_left_inv_arrow = async (\n parent: SVGAElement,\n node: Node\n): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n let polygon;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPolygonPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n node.width = w + h;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import { log } from '$root/logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createDecisionBoxPathD = (x: number, y: number, size: number): string => {\n return [\n `M${x + size / 2},${y}`,\n `L${x + size},${y - size / 2}`,\n `L${x + size / 2},${y - size}`,\n `L${x},${y - size / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport const question = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n let polygon: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createDecisionBoxPathD(0, 0, s);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-s / 2}, ${s / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, s, s, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n log.debug(\n 'APA12 Intersect called SPLIT\\npoint:',\n point,\n '\\nnode:\\n',\n node,\n '\\nres:',\n intersect.polygon(node, points, point)\n );\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createHexagonPathD = (\n x: number,\n y: number,\n width: number,\n height: number,\n m: number\n): string => {\n return [\n `M${x + m},${y}`,\n `L${x + width - m},${y}`,\n `L${x + width},${y - height / 2}`,\n `L${x + width - m},${y - height}`,\n `L${x + m},${y - height}`,\n `L${x},${y - height / 2}`,\n 'Z',\n ].join(' ');\n};\n\nexport const hexagon = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n let polygon: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createHexagonPathD(0, 0, w, h, m);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createLeanRightPathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n return [\n `M${x - (2 * height) / 6},${y}`,\n `L${x + width - height / 6},${y}`,\n `L${x + width + (2 * height) / 6},${y - height}`,\n `L${x + height / 6},${y - height}`,\n 'Z',\n ].join(' ');\n};\n\nexport const lean_right = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n let polygon: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createLeanRightPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createLeanLeftPathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n return [\n `M${x + (2 * height) / 6},${y}`,\n `L${x + width + height / 6},${y}`,\n `L${x + width - (2 * height) / 6},${y - height}`,\n `L${x - height / 6},${y - height}`,\n 'Z',\n ].join(' ');\n};\n\nexport const lean_left = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n\n let polygon: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createLeanLeftPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createTrapezoidPathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n return [\n `M${x - (2 * height) / 6},${y}`,\n `L${x + width + (2 * height) / 6},${y}`,\n `L${x + width - height / 6},${y - height}`,\n `L${x + height / 6},${y - height}`,\n 'Z',\n ].join(' ');\n};\n\nexport const trapezoid = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n let polygon: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createTrapezoidPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '$root/rendering-util/types.d.ts';\nimport {\n styles2String,\n userNodeOverrides,\n} from '$root/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\n\nexport const createInvertedTrapezoidPathD = (\n x: number,\n y: number,\n width: number,\n height: number\n): string => {\n return [\n `M${x + height / 6},${y}`,\n `L${x + width - height / 6},${y}`,\n `L${x + width + (2 * height) / 6},${y - height}`,\n `L${x - (2 * height) / 6},${y - height}`,\n 'Z',\n ].join(' ');\n};\n\nexport const inv_trapezoid = async (parent: SVGAElement, node: Node): Promise => {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n\n let polygon: d3.Selection;\n const { cssStyles } = node;\n\n if (node.look === 'handDrawn') {\n // @ts-ignore - rough is not typed\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createInvertedTrapezoidPathD(0, 0, w, h);\n const roughNode = rc.path(pathData, options);\n\n polygon = shapeSvg\n .insert(() => roughNode, ':first-child')\n .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n if (cssStyles) {\n polygon.attr('style', cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n\n if (nodeStyles) {\n polygon.attr('style', nodeStyles);\n }\n\n node.width = w;\n node.height = h;\n\n updateNodeBounds(node, polygon);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n", "import type { Node, RectOptions } from '$root/rendering-util/types.d.ts';\nimport { drawRect } from './drawRect.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\n\nexport const roundedRect = async (parent: SVGAElement, node: Node) => {\n const options = {\n rx: 5,\n ry: 5,\n classes: '',\n labelPaddingX: (node?.padding || 0) * 1,\n labelPaddingY: (node?.padding || 0) * 1,\n } as RectOptions;\n\n return drawRect(parent, node, options);\n};\n\nexport const labelRect = async (parent: SVGElement, node: Node) => {\n const { shapeSvg } = await labelHelper(parent, node, 'label');\n\n // log.trace('Classes = ', node.class);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0.1;\n const totalHeight = 0.1;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n\n // if (node.props) {\n // const propKeys = new Set(Object.keys(node.props));\n // if (node.props.borders) {\n // applyNodePropertyBorders(rect, node.borders, totalWidth, totalHeight);\n // propKeys.delete('borders');\n // }\n // propKeys.forEach((propKey) => {\n // log.warn(`Unknown node property ${propKey}`);\n // });\n // }\n\n updateNodeBounds(node, rect);\n // node.width = 1;\n // node.height = 1;\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n", "import { log } from '$root/logger.js';\nimport { state } from './shapes/state.ts';\nimport { roundedRect } from './shapes/roundedRect.ts';\nimport { squareRect } from './shapes/squareRect.ts';\nimport { stateStart } from './shapes/stateStart.ts';\nimport { stateEnd } from './shapes/stateEnd.ts';\nimport { forkJoin } from './shapes/forkJoin.ts';\nimport { choice } from './shapes/choice.ts';\nimport { note } from './shapes/note.ts';\nimport { stadium } from './shapes/stadium.js';\nimport { rectWithTitle } from './shapes/rectWithTitle.js';\nimport { getConfig } from '$root/diagram-api/diagramAPI.js';\nimport { subroutine } from './shapes/subroutine.js';\nimport { cylinder } from './shapes/cylinder.js';\nimport { circle } from './shapes/circle.js';\nimport { doublecircle } from './shapes/doubleCircle.js';\nimport { rect_left_inv_arrow } from './shapes/rectLeftInvArrow.js';\nimport { question } from './shapes/question.js';\nimport { hexagon } from './shapes/hexagon.js';\nimport { lean_right } from './shapes/leanRight.js';\nimport { lean_left } from './shapes/leanLeft.js';\nimport { trapezoid } from './shapes/trapezoid.js';\nimport { inv_trapezoid } from './shapes/invertedTrapezoid.js';\nimport { labelRect } from './shapes/labelRect.js';\n\nconst shapes = {\n state,\n stateStart,\n stateEnd,\n fork: forkJoin,\n join: forkJoin,\n choice,\n note,\n roundedRect,\n rectWithTitle,\n squareRect,\n stadium,\n subroutine,\n cylinder,\n circle,\n doublecircle,\n odd: rect_left_inv_arrow,\n diamond: question,\n hexagon,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n labelRect,\n};\n\nconst nodeElems = new Map();\n\nexport const insertNode = async (elem, node, dir) => {\n let newEl;\n let el;\n\n //special check for rect shape (with or without rounded corners)\n if (node.shape === 'rect') {\n if (node.rx && node.ry) {\n node.shape = 'roundedRect';\n } else {\n node.shape = 'squareRect';\n }\n }\n\n // Add link when appropriate\n if (node.link) {\n let target;\n if (getConfig().securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', target);\n el = await shapes[node.shape](newEl, node, dir);\n } else {\n el = await shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n\n nodeElems.set(node.id, newEl);\n\n if (node.haveCallback) {\n nodeElems.get(node.id).attr('class', nodeElems.get(node.id).attr('class') + ' clickable');\n }\n return newEl;\n};\nexport const setNodeElem = (elem, node) => {\n nodeElems.set(node.id, elem);\n};\nexport const clear = () => {\n nodeElems.clear();\n};\n\nexport const positionNode = (node) => {\n const el = nodeElems.get(node.id);\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n", "import { getConfig } from './config.js';\nimport common from './diagrams/common/common.js';\nimport { log } from './logger.js';\nimport { insertCluster } from './rendering-util/rendering-elements/clusters.js';\nimport {\n insertEdge,\n insertEdgeLabel,\n positionEdgeLabel,\n} from './rendering-util/rendering-elements/edges.js';\nimport insertMarkers from './rendering-util/rendering-elements/markers.js';\nimport { insertNode } from './rendering-util/rendering-elements/nodes.js';\nimport { labelHelper } from './rendering-util/rendering-elements/shapes/util.js';\nimport { interpolateToCurve } from './utils.js';\n\n/**\n * Internal helpers for mermaid\n * @deprecated - This should not be used by external packages, as the definitions will change without notice.\n */\nexport const internalHelpers = {\n common,\n getConfig,\n insertCluster,\n insertEdge,\n insertEdgeLabel,\n insertMarkers,\n insertNode,\n interpolateToCurve,\n labelHelper,\n log,\n positionEdgeLabel,\n};\n\nexport type InternalHelpers = typeof internalHelpers;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n", "import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n", "import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n", "import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n", "import toNumber from './toNumber.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nexport default toFinite;\n", "import toFinite from './toFinite.js';\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nexport default toInteger;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nexport default noop;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nexport default baseFindIndex;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nexport default baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nexport default strictIndexOf;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIsNaN from './_baseIsNaN.js';\nimport strictIndexOf from './_strictIndexOf.js';\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nexport default baseIndexOf;\n", "import baseIndexOf from './_baseIndexOf.js';\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nexport default arrayIncludes;\n", "import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n", "import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n", "import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n", "import assignValue from './_assignValue.js';\nimport copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport isArrayLike from './isArrayLike.js';\nimport isPrototype from './_isPrototype.js';\nimport keys from './keys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nexport default assign;\n", "import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n", "import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n", "import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n", "import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n", "import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n", "import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n", "import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n", "import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n", "import Symbol from './_Symbol.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nexport default isFlattenable;\n", "import arrayPush from './_arrayPush.js';\nimport isFlattenable from './_isFlattenable.js';\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nexport default baseFlatten;\n", "import baseFlatten from './_baseFlatten.js';\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nexport default flatten;\n", "import flatten from './flatten.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nexport default flatRest;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nexport default hasUnicode;\n", "/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nexport default arrayReduce;\n", "import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n", "import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n", "import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n", "import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n", "import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n", "import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n", "import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n", "import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n", "import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n", "import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nexport default cloneRegExp;\n", "import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n", "import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n", "import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n", "import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n", "import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n", "import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n", "import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n", "/**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\nfunction compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default compact;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n", "import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n", "import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n", "import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n", "import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n", "import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n", "import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n", "import Stack from './_Stack.js';\nimport baseIsEqual from './_baseIsEqual.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nexport default baseIsMatch;\n", "import isObject from './isObject.js';\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nexport default isStrictComparable;\n", "import isStrictComparable from './_isStrictComparable.js';\nimport keys from './keys.js';\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nexport default getMatchData;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nexport default matchesStrictComparable;\n", "import baseIsMatch from './_baseIsMatch.js';\nimport getMatchData from './_getMatchData.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nexport default baseMatches;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nexport default baseHasIn;\n", "import castPath from './_castPath.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isIndex from './_isIndex.js';\nimport isLength from './isLength.js';\nimport toKey from './_toKey.js';\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nexport default hasPath;\n", "import baseHasIn from './_baseHasIn.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nexport default hasIn;\n", "import baseIsEqual from './_baseIsEqual.js';\nimport get from './get.js';\nimport hasIn from './hasIn.js';\nimport isKey from './_isKey.js';\nimport isStrictComparable from './_isStrictComparable.js';\nimport matchesStrictComparable from './_matchesStrictComparable.js';\nimport toKey from './_toKey.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nexport default baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nexport default baseProperty;\n", "import baseGet from './_baseGet.js';\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nexport default basePropertyDeep;\n", "import baseProperty from './_baseProperty.js';\nimport basePropertyDeep from './_basePropertyDeep.js';\nimport isKey from './_isKey.js';\nimport toKey from './_toKey.js';\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nexport default property;\n", "import baseMatches from './_baseMatches.js';\nimport baseMatchesProperty from './_baseMatchesProperty.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\nimport property from './property.js';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nexport default baseIteratee;\n", "/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nexport default arrayAggregator;\n", "import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n", "import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n", "import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n", "import baseEach from './_baseEach.js';\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nexport default baseAggregator;\n", "import arrayAggregator from './_arrayAggregator.js';\nimport baseAggregator from './_baseAggregator.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nexport default createAggregator;\n", "import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n", "import baseRest from './_baseRest.js';\nimport eq from './eq.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport keysIn from './keysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nexport default defaults;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nexport default arrayIncludesWith;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseDifference;\n", "import baseDifference from './_baseDifference.js';\nimport baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nexport default difference;\n", "/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n}\n\nexport default drop;\n", "import baseSlice from './_baseSlice.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\nfunction dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nexport default dropRight;\n", "import identity from './identity.js';\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nexport default castFunction;\n", "import arrayEach from './_arrayEach.js';\nimport baseEach from './_baseEach.js';\nimport castFunction from './_castFunction.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nexport default forEach;\n", "export { default } from './forEach.js'\n", "/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nexport default arrayEvery;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nexport default baseEvery;\n", "import arrayEvery from './_arrayEvery.js';\nimport baseEvery from './_baseEvery.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default every;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nexport default baseFilter;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default filter;\n", "import baseIteratee from './_baseIteratee.js';\nimport isArrayLike from './isArrayLike.js';\nimport keys from './keys.js';\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nexport default createFind;\n", "import baseFindIndex from './_baseFindIndex.js';\nimport baseIteratee from './_baseIteratee.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nexport default findIndex;\n", "import createFind from './_createFind.js';\nimport findIndex from './findIndex.js';\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nexport default find;\n", "/**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\nfunction head(array) {\n return (array && array.length) ? array[0] : undefined;\n}\n\nexport default head;\n", "export { default } from './head.js'\n", "import baseEach from './_baseEach.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nexport default baseMap;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nexport default map;\n", "import baseFlatten from './_baseFlatten.js';\nimport map from './map.js';\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nexport default flatMap;\n", "import baseFor from './_baseFor.js';\nimport castFunction from './_castFunction.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\nfunction forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, castFunction(iteratee), keysIn);\n}\n\nexport default forIn;\n", "import baseForOwn from './_baseForOwn.js';\nimport castFunction from './_castFunction.js';\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nexport default forOwn;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport createAggregator from './_createAggregator.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n});\n\nexport default groupBy;\n", "/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nexport default baseGt;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nexport default baseHas;\n", "import baseHas from './_baseHas.js';\nimport hasPath from './_hasPath.js';\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nexport default has;\n", "import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n", "import arrayMap from './_arrayMap.js';\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nexport default baseValues;\n", "import baseValues from './_baseValues.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nexport default values;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport toInteger from './toInteger.js';\nimport values from './values.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nexport default includes;\n", "import baseIndexOf from './_baseIndexOf.js';\nimport toInteger from './toInteger.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\nfunction indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n}\n\nexport default indexOf;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n", "import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar regexpTag = '[object RegExp]';\n\n/**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\nfunction baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n}\n\nexport default baseIsRegExp;\n", "import baseIsRegExp from './_baseIsRegExp.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;\n\n/**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\nvar isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\nexport default isRegExp;\n", "/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nexport default isUndefined;\n", "/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nexport default baseLt;\n", "import baseAssignValue from './_baseAssignValue.js';\nimport baseForOwn from './_baseForOwn.js';\nimport baseIteratee from './_baseIteratee.js';\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nexport default mapValues;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nexport default baseExtremum;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseGt from './_baseGt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n}\n\nexport default max;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseLt from './_baseLt.js';\nimport identity from './identity.js';\n\n/**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nexport default min;\n", "import baseExtremum from './_baseExtremum.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseLt from './_baseLt.js';\n\n/**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nfunction minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)\n : undefined;\n}\n\nexport default minBy;\n", "/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\nfunction negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n}\n\nexport default negate;\n", "import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n", "import baseGet from './_baseGet.js';\nimport baseSet from './_baseSet.js';\nimport castPath from './_castPath.js';\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nexport default basePickBy;\n", "import arrayMap from './_arrayMap.js';\nimport baseIteratee from './_baseIteratee.js';\nimport basePickBy from './_basePickBy.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nexport default pickBy;\n", "/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nexport default baseSortBy;\n", "import isSymbol from './isSymbol.js';\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nexport default compareAscending;\n", "import compareAscending from './_compareAscending.js';\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nexport default compareMultiple;\n", "import arrayMap from './_arrayMap.js';\nimport baseGet from './_baseGet.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseMap from './_baseMap.js';\nimport baseSortBy from './_baseSortBy.js';\nimport baseUnary from './_baseUnary.js';\nimport compareMultiple from './_compareMultiple.js';\nimport identity from './identity.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nexport default baseOrderBy;\n", "import baseProperty from './_baseProperty.js';\n\n/**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nvar asciiSize = baseProperty('length');\n\nexport default asciiSize;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\nfunction unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n}\n\nexport default unicodeSize;\n", "import asciiSize from './_asciiSize.js';\nimport hasUnicode from './_hasUnicode.js';\nimport unicodeSize from './_unicodeSize.js';\n\n/**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\nfunction stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n}\n\nexport default stringSize;\n", "import basePickBy from './_basePickBy.js';\nimport hasIn from './hasIn.js';\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nexport default basePick;\n", "import basePick from './_basePick.js';\nimport flatRest from './_flatRest.js';\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nexport default pick;\n", "/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nexport default baseRange;\n", "import baseRange from './_baseRange.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toFinite from './toFinite.js';\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nexport default createRange;\n", "import createRange from './_createRange.js';\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nexport default range;\n", "/**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\nfunction baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n}\n\nexport default baseReduce;\n", "import arrayReduce from './_arrayReduce.js';\nimport baseEach from './_baseEach.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseReduce from './_baseReduce.js';\nimport isArray from './isArray.js';\n\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nexport default reduce;\n", "import arrayFilter from './_arrayFilter.js';\nimport baseFilter from './_baseFilter.js';\nimport baseIteratee from './_baseIteratee.js';\nimport isArray from './isArray.js';\nimport negate from './negate.js';\n\n/**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\nfunction reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(baseIteratee(predicate, 3)));\n}\n\nexport default reject;\n", "import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArrayLike from './isArrayLike.js';\nimport isString from './isString.js';\nimport stringSize from './_stringSize.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\nfunction size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n}\n\nexport default size;\n", "import baseEach from './_baseEach.js';\n\n/**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nexport default baseSome;\n", "import arraySome from './_arraySome.js';\nimport baseIteratee from './_baseIteratee.js';\nimport baseSome from './_baseSome.js';\nimport isArray from './isArray.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nexport default some;\n", "import baseFlatten from './_baseFlatten.js';\nimport baseOrderBy from './_baseOrderBy.js';\nimport baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nexport default sortBy;\n", "import Set from './_Set.js';\nimport noop from './noop.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nexport default createSet;\n", "import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport cacheHas from './_cacheHas.js';\nimport createSet from './_createSet.js';\nimport setToArray from './_setToArray.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseUniq;\n", "import baseFlatten from './_baseFlatten.js';\nimport baseRest from './_baseRest.js';\nimport baseUniq from './_baseUniq.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nexport default union;\n", "import baseUniq from './_baseUniq.js';\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nexport default uniq;\n", "import baseIteratee from './_baseIteratee.js';\nimport baseUniq from './_baseUniq.js';\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nexport default uniqBy;\n", "import toString from './toString.js';\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nexport default uniqueId;\n", "/**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\nfunction baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n}\n\nexport default baseZipObject;\n", "import assignValue from './_assignValue.js';\nimport baseZipObject from './_baseZipObject.js';\n\n/**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\nfunction zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n}\n\nexport default zipObject;\n", "/**\n * @license\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"es\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\nexport { default as add } from './add.js';\nexport { default as after } from './after.js';\nexport { default as ary } from './ary.js';\nexport { default as assign } from './assign.js';\nexport { default as assignIn } from './assignIn.js';\nexport { default as assignInWith } from './assignInWith.js';\nexport { default as assignWith } from './assignWith.js';\nexport { default as at } from './at.js';\nexport { default as attempt } from './attempt.js';\nexport { default as before } from './before.js';\nexport { default as bind } from './bind.js';\nexport { default as bindAll } from './bindAll.js';\nexport { default as bindKey } from './bindKey.js';\nexport { default as camelCase } from './camelCase.js';\nexport { default as capitalize } from './capitalize.js';\nexport { default as castArray } from './castArray.js';\nexport { default as ceil } from './ceil.js';\nexport { default as chain } from './chain.js';\nexport { default as chunk } from './chunk.js';\nexport { default as clamp } from './clamp.js';\nexport { default as clone } from './clone.js';\nexport { default as cloneDeep } from './cloneDeep.js';\nexport { default as cloneDeepWith } from './cloneDeepWith.js';\nexport { default as cloneWith } from './cloneWith.js';\nexport { default as commit } from './commit.js';\nexport { default as compact } from './compact.js';\nexport { default as concat } from './concat.js';\nexport { default as cond } from './cond.js';\nexport { default as conforms } from './conforms.js';\nexport { default as conformsTo } from './conformsTo.js';\nexport { default as constant } from './constant.js';\nexport { default as countBy } from './countBy.js';\nexport { default as create } from './create.js';\nexport { default as curry } from './curry.js';\nexport { default as curryRight } from './curryRight.js';\nexport { default as debounce } from './debounce.js';\nexport { default as deburr } from './deburr.js';\nexport { default as defaultTo } from './defaultTo.js';\nexport { default as defaults } from './defaults.js';\nexport { default as defaultsDeep } from './defaultsDeep.js';\nexport { default as defer } from './defer.js';\nexport { default as delay } from './delay.js';\nexport { default as difference } from './difference.js';\nexport { default as differenceBy } from './differenceBy.js';\nexport { default as differenceWith } from './differenceWith.js';\nexport { default as divide } from './divide.js';\nexport { default as drop } from './drop.js';\nexport { default as dropRight } from './dropRight.js';\nexport { default as dropRightWhile } from './dropRightWhile.js';\nexport { default as dropWhile } from './dropWhile.js';\nexport { default as each } from './each.js';\nexport { default as eachRight } from './eachRight.js';\nexport { default as endsWith } from './endsWith.js';\nexport { default as entries } from './entries.js';\nexport { default as entriesIn } from './entriesIn.js';\nexport { default as eq } from './eq.js';\nexport { default as escape } from './escape.js';\nexport { default as escapeRegExp } from './escapeRegExp.js';\nexport { default as every } from './every.js';\nexport { default as extend } from './extend.js';\nexport { default as extendWith } from './extendWith.js';\nexport { default as fill } from './fill.js';\nexport { default as filter } from './filter.js';\nexport { default as find } from './find.js';\nexport { default as findIndex } from './findIndex.js';\nexport { default as findKey } from './findKey.js';\nexport { default as findLast } from './findLast.js';\nexport { default as findLastIndex } from './findLastIndex.js';\nexport { default as findLastKey } from './findLastKey.js';\nexport { default as first } from './first.js';\nexport { default as flatMap } from './flatMap.js';\nexport { default as flatMapDeep } from './flatMapDeep.js';\nexport { default as flatMapDepth } from './flatMapDepth.js';\nexport { default as flatten } from './flatten.js';\nexport { default as flattenDeep } from './flattenDeep.js';\nexport { default as flattenDepth } from './flattenDepth.js';\nexport { default as flip } from './flip.js';\nexport { default as floor } from './floor.js';\nexport { default as flow } from './flow.js';\nexport { default as flowRight } from './flowRight.js';\nexport { default as forEach } from './forEach.js';\nexport { default as forEachRight } from './forEachRight.js';\nexport { default as forIn } from './forIn.js';\nexport { default as forInRight } from './forInRight.js';\nexport { default as forOwn } from './forOwn.js';\nexport { default as forOwnRight } from './forOwnRight.js';\nexport { default as fromPairs } from './fromPairs.js';\nexport { default as functions } from './functions.js';\nexport { default as functionsIn } from './functionsIn.js';\nexport { default as get } from './get.js';\nexport { default as groupBy } from './groupBy.js';\nexport { default as gt } from './gt.js';\nexport { default as gte } from './gte.js';\nexport { default as has } from './has.js';\nexport { default as hasIn } from './hasIn.js';\nexport { default as head } from './head.js';\nexport { default as identity } from './identity.js';\nexport { default as inRange } from './inRange.js';\nexport { default as includes } from './includes.js';\nexport { default as indexOf } from './indexOf.js';\nexport { default as initial } from './initial.js';\nexport { default as intersection } from './intersection.js';\nexport { default as intersectionBy } from './intersectionBy.js';\nexport { default as intersectionWith } from './intersectionWith.js';\nexport { default as invert } from './invert.js';\nexport { default as invertBy } from './invertBy.js';\nexport { default as invoke } from './invoke.js';\nexport { default as invokeMap } from './invokeMap.js';\nexport { default as isArguments } from './isArguments.js';\nexport { default as isArray } from './isArray.js';\nexport { default as isArrayBuffer } from './isArrayBuffer.js';\nexport { default as isArrayLike } from './isArrayLike.js';\nexport { default as isArrayLikeObject } from './isArrayLikeObject.js';\nexport { default as isBoolean } from './isBoolean.js';\nexport { default as isBuffer } from './isBuffer.js';\nexport { default as isDate } from './isDate.js';\nexport { default as isElement } from './isElement.js';\nexport { default as isEmpty } from './isEmpty.js';\nexport { default as isEqual } from './isEqual.js';\nexport { default as isEqualWith } from './isEqualWith.js';\nexport { default as isError } from './isError.js';\nexport { default as isFinite } from './isFinite.js';\nexport { default as isFunction } from './isFunction.js';\nexport { default as isInteger } from './isInteger.js';\nexport { default as isLength } from './isLength.js';\nexport { default as isMap } from './isMap.js';\nexport { default as isMatch } from './isMatch.js';\nexport { default as isMatchWith } from './isMatchWith.js';\nexport { default as isNaN } from './isNaN.js';\nexport { default as isNative } from './isNative.js';\nexport { default as isNil } from './isNil.js';\nexport { default as isNull } from './isNull.js';\nexport { default as isNumber } from './isNumber.js';\nexport { default as isObject } from './isObject.js';\nexport { default as isObjectLike } from './isObjectLike.js';\nexport { default as isPlainObject } from './isPlainObject.js';\nexport { default as isRegExp } from './isRegExp.js';\nexport { default as isSafeInteger } from './isSafeInteger.js';\nexport { default as isSet } from './isSet.js';\nexport { default as isString } from './isString.js';\nexport { default as isSymbol } from './isSymbol.js';\nexport { default as isTypedArray } from './isTypedArray.js';\nexport { default as isUndefined } from './isUndefined.js';\nexport { default as isWeakMap } from './isWeakMap.js';\nexport { default as isWeakSet } from './isWeakSet.js';\nexport { default as iteratee } from './iteratee.js';\nexport { default as join } from './join.js';\nexport { default as kebabCase } from './kebabCase.js';\nexport { default as keyBy } from './keyBy.js';\nexport { default as keys } from './keys.js';\nexport { default as keysIn } from './keysIn.js';\nexport { default as last } from './last.js';\nexport { default as lastIndexOf } from './lastIndexOf.js';\nexport { default as lodash } from './wrapperLodash.js';\nexport { default as lowerCase } from './lowerCase.js';\nexport { default as lowerFirst } from './lowerFirst.js';\nexport { default as lt } from './lt.js';\nexport { default as lte } from './lte.js';\nexport { default as map } from './map.js';\nexport { default as mapKeys } from './mapKeys.js';\nexport { default as mapValues } from './mapValues.js';\nexport { default as matches } from './matches.js';\nexport { default as matchesProperty } from './matchesProperty.js';\nexport { default as max } from './max.js';\nexport { default as maxBy } from './maxBy.js';\nexport { default as mean } from './mean.js';\nexport { default as meanBy } from './meanBy.js';\nexport { default as memoize } from './memoize.js';\nexport { default as merge } from './merge.js';\nexport { default as mergeWith } from './mergeWith.js';\nexport { default as method } from './method.js';\nexport { default as methodOf } from './methodOf.js';\nexport { default as min } from './min.js';\nexport { default as minBy } from './minBy.js';\nexport { default as mixin } from './mixin.js';\nexport { default as multiply } from './multiply.js';\nexport { default as negate } from './negate.js';\nexport { default as next } from './next.js';\nexport { default as noop } from './noop.js';\nexport { default as now } from './now.js';\nexport { default as nth } from './nth.js';\nexport { default as nthArg } from './nthArg.js';\nexport { default as omit } from './omit.js';\nexport { default as omitBy } from './omitBy.js';\nexport { default as once } from './once.js';\nexport { default as orderBy } from './orderBy.js';\nexport { default as over } from './over.js';\nexport { default as overArgs } from './overArgs.js';\nexport { default as overEvery } from './overEvery.js';\nexport { default as overSome } from './overSome.js';\nexport { default as pad } from './pad.js';\nexport { default as padEnd } from './padEnd.js';\nexport { default as padStart } from './padStart.js';\nexport { default as parseInt } from './parseInt.js';\nexport { default as partial } from './partial.js';\nexport { default as partialRight } from './partialRight.js';\nexport { default as partition } from './partition.js';\nexport { default as pick } from './pick.js';\nexport { default as pickBy } from './pickBy.js';\nexport { default as plant } from './plant.js';\nexport { default as property } from './property.js';\nexport { default as propertyOf } from './propertyOf.js';\nexport { default as pull } from './pull.js';\nexport { default as pullAll } from './pullAll.js';\nexport { default as pullAllBy } from './pullAllBy.js';\nexport { default as pullAllWith } from './pullAllWith.js';\nexport { default as pullAt } from './pullAt.js';\nexport { default as random } from './random.js';\nexport { default as range } from './range.js';\nexport { default as rangeRight } from './rangeRight.js';\nexport { default as rearg } from './rearg.js';\nexport { default as reduce } from './reduce.js';\nexport { default as reduceRight } from './reduceRight.js';\nexport { default as reject } from './reject.js';\nexport { default as remove } from './remove.js';\nexport { default as repeat } from './repeat.js';\nexport { default as replace } from './replace.js';\nexport { default as rest } from './rest.js';\nexport { default as result } from './result.js';\nexport { default as reverse } from './reverse.js';\nexport { default as round } from './round.js';\nexport { default as sample } from './sample.js';\nexport { default as sampleSize } from './sampleSize.js';\nexport { default as set } from './set.js';\nexport { default as setWith } from './setWith.js';\nexport { default as shuffle } from './shuffle.js';\nexport { default as size } from './size.js';\nexport { default as slice } from './slice.js';\nexport { default as snakeCase } from './snakeCase.js';\nexport { default as some } from './some.js';\nexport { default as sortBy } from './sortBy.js';\nexport { default as sortedIndex } from './sortedIndex.js';\nexport { default as sortedIndexBy } from './sortedIndexBy.js';\nexport { default as sortedIndexOf } from './sortedIndexOf.js';\nexport { default as sortedLastIndex } from './sortedLastIndex.js';\nexport { default as sortedLastIndexBy } from './sortedLastIndexBy.js';\nexport { default as sortedLastIndexOf } from './sortedLastIndexOf.js';\nexport { default as sortedUniq } from './sortedUniq.js';\nexport { default as sortedUniqBy } from './sortedUniqBy.js';\nexport { default as split } from './split.js';\nexport { default as spread } from './spread.js';\nexport { default as startCase } from './startCase.js';\nexport { default as startsWith } from './startsWith.js';\nexport { default as stubArray } from './stubArray.js';\nexport { default as stubFalse } from './stubFalse.js';\nexport { default as stubObject } from './stubObject.js';\nexport { default as stubString } from './stubString.js';\nexport { default as stubTrue } from './stubTrue.js';\nexport { default as subtract } from './subtract.js';\nexport { default as sum } from './sum.js';\nexport { default as sumBy } from './sumBy.js';\nexport { default as tail } from './tail.js';\nexport { default as take } from './take.js';\nexport { default as takeRight } from './takeRight.js';\nexport { default as takeRightWhile } from './takeRightWhile.js';\nexport { default as takeWhile } from './takeWhile.js';\nexport { default as tap } from './tap.js';\nexport { default as template } from './template.js';\nexport { default as templateSettings } from './templateSettings.js';\nexport { default as throttle } from './throttle.js';\nexport { default as thru } from './thru.js';\nexport { default as times } from './times.js';\nexport { default as toArray } from './toArray.js';\nexport { default as toFinite } from './toFinite.js';\nexport { default as toInteger } from './toInteger.js';\nexport { default as toIterator } from './toIterator.js';\nexport { default as toJSON } from './toJSON.js';\nexport { default as toLength } from './toLength.js';\nexport { default as toLower } from './toLower.js';\nexport { default as toNumber } from './toNumber.js';\nexport { default as toPairs } from './toPairs.js';\nexport { default as toPairsIn } from './toPairsIn.js';\nexport { default as toPath } from './toPath.js';\nexport { default as toPlainObject } from './toPlainObject.js';\nexport { default as toSafeInteger } from './toSafeInteger.js';\nexport { default as toString } from './toString.js';\nexport { default as toUpper } from './toUpper.js';\nexport { default as transform } from './transform.js';\nexport { default as trim } from './trim.js';\nexport { default as trimEnd } from './trimEnd.js';\nexport { default as trimStart } from './trimStart.js';\nexport { default as truncate } from './truncate.js';\nexport { default as unary } from './unary.js';\nexport { default as unescape } from './unescape.js';\nexport { default as union } from './union.js';\nexport { default as unionBy } from './unionBy.js';\nexport { default as unionWith } from './unionWith.js';\nexport { default as uniq } from './uniq.js';\nexport { default as uniqBy } from './uniqBy.js';\nexport { default as uniqWith } from './uniqWith.js';\nexport { default as uniqueId } from './uniqueId.js';\nexport { default as unset } from './unset.js';\nexport { default as unzip } from './unzip.js';\nexport { default as unzipWith } from './unzipWith.js';\nexport { default as update } from './update.js';\nexport { default as updateWith } from './updateWith.js';\nexport { default as upperCase } from './upperCase.js';\nexport { default as upperFirst } from './upperFirst.js';\nexport { default as value } from './value.js';\nexport { default as valueOf } from './valueOf.js';\nexport { default as values } from './values.js';\nexport { default as valuesIn } from './valuesIn.js';\nexport { default as without } from './without.js';\nexport { default as words } from './words.js';\nexport { default as wrap } from './wrap.js';\nexport { default as wrapperAt } from './wrapperAt.js';\nexport { default as wrapperChain } from './wrapperChain.js';\nexport { default as wrapperCommit } from './commit.js';\nexport { default as wrapperLodash } from './wrapperLodash.js';\nexport { default as wrapperNext } from './next.js';\nexport { default as wrapperPlant } from './plant.js';\nexport { default as wrapperReverse } from './wrapperReverse.js';\nexport { default as wrapperToIterator } from './toIterator.js';\nexport { default as wrapperValue } from './wrapperValue.js';\nexport { default as xor } from './xor.js';\nexport { default as xorBy } from './xorBy.js';\nexport { default as xorWith } from './xorWith.js';\nexport { default as zip } from './zip.js';\nexport { default as zipObject } from './zipObject.js';\nexport { default as zipObjectDeep } from './zipObjectDeep.js';\nexport { default as zipWith } from './zipWith.js';\nexport { default } from './lodash.default.js';\n", "import * as _ from 'lodash-es';\n\nvar DEFAULT_EDGE_NAME = '\\x00';\nvar GRAPH_NODE = '\\x00';\nvar EDGE_KEY_DELIM = '\\x01';\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\n// Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\nexport class Graph {\n constructor(opts = {}) {\n this._isDirected = _.has(opts, 'directed') ? opts.directed : true;\n this._isMultigraph = _.has(opts, 'multigraph') ? opts.multigraph : false;\n this._isCompound = _.has(opts, 'compound') ? opts.compound : false;\n\n // Label for the graph itself\n this._label = undefined;\n\n // Defaults to be set when creating a new node\n this._defaultNodeLabelFn = _.constant(undefined);\n\n // Defaults to be set when creating a new edge\n this._defaultEdgeLabelFn = _.constant(undefined);\n\n // v -> label\n this._nodes = {};\n\n if (this._isCompound) {\n // v -> parent\n this._parent = {};\n\n // v -> children\n this._children = {};\n this._children[GRAPH_NODE] = {};\n }\n\n // v -> edgeObj\n this._in = {};\n\n // u -> v -> Number\n this._preds = {};\n\n // v -> edgeObj\n this._out = {};\n\n // v -> w -> Number\n this._sucs = {};\n\n // e -> edgeObj\n this._edgeObjs = {};\n\n // e -> label\n this._edgeLabels = {};\n }\n /* === Graph functions ========= */\n isDirected() {\n return this._isDirected;\n }\n isMultigraph() {\n return this._isMultigraph;\n }\n isCompound() {\n return this._isCompound;\n }\n setGraph(label) {\n this._label = label;\n return this;\n }\n graph() {\n return this._label;\n }\n /* === Node functions ========== */\n setDefaultNodeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultNodeLabelFn = newDefault;\n return this;\n }\n nodeCount() {\n return this._nodeCount;\n }\n nodes() {\n return _.keys(this._nodes);\n }\n sources() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._in[v]);\n });\n }\n sinks() {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._out[v]);\n });\n }\n setNodes(vs, value) {\n var args = arguments;\n var self = this;\n _.each(vs, function (v) {\n if (args.length > 1) {\n self.setNode(v, value);\n } else {\n self.setNode(v);\n }\n });\n return this;\n }\n setNode(v, value) {\n if (_.has(this._nodes, v)) {\n if (arguments.length > 1) {\n this._nodes[v] = value;\n }\n return this;\n }\n\n // @ts-expect-error\n this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n if (this._isCompound) {\n this._parent[v] = GRAPH_NODE;\n this._children[v] = {};\n this._children[GRAPH_NODE][v] = true;\n }\n this._in[v] = {};\n this._preds[v] = {};\n this._out[v] = {};\n this._sucs[v] = {};\n ++this._nodeCount;\n return this;\n }\n node(v) {\n return this._nodes[v];\n }\n hasNode(v) {\n return _.has(this._nodes, v);\n }\n removeNode(v) {\n var self = this;\n if (_.has(this._nodes, v)) {\n var removeEdge = function (e) {\n self.removeEdge(self._edgeObjs[e]);\n };\n delete this._nodes[v];\n if (this._isCompound) {\n this._removeFromParentsChildList(v);\n delete this._parent[v];\n _.each(this.children(v), function (child) {\n self.setParent(child);\n });\n delete this._children[v];\n }\n _.each(_.keys(this._in[v]), removeEdge);\n delete this._in[v];\n delete this._preds[v];\n _.each(_.keys(this._out[v]), removeEdge);\n delete this._out[v];\n delete this._sucs[v];\n --this._nodeCount;\n }\n return this;\n }\n setParent(v, parent) {\n if (!this._isCompound) {\n throw new Error('Cannot set parent in a non-compound graph');\n }\n\n if (_.isUndefined(parent)) {\n parent = GRAPH_NODE;\n } else {\n // Coerce parent to string\n parent += '';\n for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) {\n if (ancestor === v) {\n throw new Error('Setting ' + parent + ' as parent of ' + v + ' would create a cycle');\n }\n }\n\n this.setNode(parent);\n }\n\n this.setNode(v);\n this._removeFromParentsChildList(v);\n this._parent[v] = parent;\n this._children[parent][v] = true;\n return this;\n }\n _removeFromParentsChildList(v) {\n delete this._children[this._parent[v]][v];\n }\n parent(v) {\n if (this._isCompound) {\n var parent = this._parent[v];\n if (parent !== GRAPH_NODE) {\n return parent;\n }\n }\n }\n children(v) {\n if (_.isUndefined(v)) {\n v = GRAPH_NODE;\n }\n\n if (this._isCompound) {\n var children = this._children[v];\n if (children) {\n return _.keys(children);\n }\n } else if (v === GRAPH_NODE) {\n return this.nodes();\n } else if (this.hasNode(v)) {\n return [];\n }\n }\n predecessors(v) {\n var predsV = this._preds[v];\n if (predsV) {\n return _.keys(predsV);\n }\n }\n successors(v) {\n var sucsV = this._sucs[v];\n if (sucsV) {\n return _.keys(sucsV);\n }\n }\n neighbors(v) {\n var preds = this.predecessors(v);\n if (preds) {\n return _.union(preds, this.successors(v));\n }\n }\n isLeaf(v) {\n var neighbors;\n if (this.isDirected()) {\n neighbors = this.successors(v);\n } else {\n neighbors = this.neighbors(v);\n }\n return neighbors.length === 0;\n }\n filterNodes(filter) {\n // @ts-expect-error\n var copy = new this.constructor({\n directed: this._isDirected,\n multigraph: this._isMultigraph,\n compound: this._isCompound,\n });\n\n copy.setGraph(this.graph());\n\n var self = this;\n _.each(this._nodes, function (value, v) {\n if (filter(v)) {\n copy.setNode(v, value);\n }\n });\n\n _.each(this._edgeObjs, function (e) {\n // @ts-expect-error\n if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n copy.setEdge(e, self.edge(e));\n }\n });\n\n var parents = {};\n function findParent(v) {\n var parent = self.parent(v);\n if (parent === undefined || copy.hasNode(parent)) {\n parents[v] = parent;\n return parent;\n } else if (parent in parents) {\n return parents[parent];\n } else {\n return findParent(parent);\n }\n }\n\n if (this._isCompound) {\n _.each(copy.nodes(), function (v) {\n copy.setParent(v, findParent(v));\n });\n }\n\n return copy;\n }\n /* === Edge functions ========== */\n setDefaultEdgeLabel(newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n this._defaultEdgeLabelFn = newDefault;\n return this;\n }\n edgeCount() {\n return this._edgeCount;\n }\n edges() {\n return _.values(this._edgeObjs);\n }\n setPath(vs, value) {\n var self = this;\n var args = arguments;\n _.reduce(vs, function (v, w) {\n if (args.length > 1) {\n self.setEdge(v, w, value);\n } else {\n self.setEdge(v, w);\n }\n return w;\n });\n return this;\n }\n /*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */\n setEdge() {\n var v, w, name, value;\n var valueSpecified = false;\n var arg0 = arguments[0];\n\n if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) {\n v = arg0.v;\n w = arg0.w;\n name = arg0.name;\n if (arguments.length === 2) {\n value = arguments[1];\n valueSpecified = true;\n }\n } else {\n v = arg0;\n w = arguments[1];\n name = arguments[3];\n if (arguments.length > 2) {\n value = arguments[2];\n valueSpecified = true;\n }\n }\n\n v = '' + v;\n w = '' + w;\n if (!_.isUndefined(name)) {\n name = '' + name;\n }\n\n var e = edgeArgsToId(this._isDirected, v, w, name);\n if (_.has(this._edgeLabels, e)) {\n if (valueSpecified) {\n this._edgeLabels[e] = value;\n }\n return this;\n }\n\n if (!_.isUndefined(name) && !this._isMultigraph) {\n throw new Error('Cannot set a named edge when isMultigraph = false');\n }\n\n // It didn't exist, so we need to create it.\n // First ensure the nodes exist.\n this.setNode(v);\n this.setNode(w);\n\n // @ts-expect-error\n this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n\n var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);\n // Ensure we add undirected edges in a consistent way.\n v = edgeObj.v;\n w = edgeObj.w;\n\n Object.freeze(edgeObj);\n this._edgeObjs[e] = edgeObj;\n incrementOrInitEntry(this._preds[w], v);\n incrementOrInitEntry(this._sucs[v], w);\n this._in[w][e] = edgeObj;\n this._out[v][e] = edgeObj;\n this._edgeCount++;\n return this;\n }\n edge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return this._edgeLabels[e];\n }\n hasEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n return _.has(this._edgeLabels, e);\n }\n removeEdge(v, w, name) {\n var e =\n arguments.length === 1\n ? edgeObjToId(this._isDirected, arguments[0])\n : edgeArgsToId(this._isDirected, v, w, name);\n var edge = this._edgeObjs[e];\n if (edge) {\n v = edge.v;\n w = edge.w;\n delete this._edgeLabels[e];\n delete this._edgeObjs[e];\n decrementOrRemoveEntry(this._preds[w], v);\n decrementOrRemoveEntry(this._sucs[v], w);\n delete this._in[w][e];\n delete this._out[v][e];\n this._edgeCount--;\n }\n return this;\n }\n inEdges(v, u) {\n var inV = this._in[v];\n if (inV) {\n var edges = _.values(inV);\n if (!u) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.v === u;\n });\n }\n }\n outEdges(v, w) {\n var outV = this._out[v];\n if (outV) {\n var edges = _.values(outV);\n if (!w) {\n return edges;\n }\n return _.filter(edges, function (edge) {\n return edge.w === w;\n });\n }\n }\n nodeEdges(v, w) {\n var inEdges = this.inEdges(v, w);\n if (inEdges) {\n return inEdges.concat(this.outEdges(v, w));\n }\n }\n}\n\n/* Number of nodes in the graph. Should only be changed by the implementation. */\nGraph.prototype._nodeCount = 0;\n\n/* Number of edges in the graph. Should only be changed by the implementation. */\nGraph.prototype._edgeCount = 0;\n\nfunction incrementOrInitEntry(map, k) {\n if (map[k]) {\n map[k]++;\n } else {\n map[k] = 1;\n }\n}\n\nfunction decrementOrRemoveEntry(map, k) {\n if (!--map[k]) {\n delete map[k];\n }\n}\n\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n var v = '' + v_;\n var w = '' + w_;\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n var edgeObj = { v: v, w: w };\n if (name) {\n edgeObj.name = name;\n }\n return edgeObj;\n}\n\nfunction edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\n", "// Includes only the \"core\" of graphlib\n\nimport { Graph } from './graph.js';\n\nconst version = '2.1.9-pre';\n\nexport { Graph, version };\n", "/*\n * Simple doubly linked list implementation derived from Cormen, et al.,\n * \"Introduction to Algorithms\".\n */\n\nexport { List };\n\nclass List {\n constructor() {\n var sentinel = {};\n sentinel._next = sentinel._prev = sentinel;\n this._sentinel = sentinel;\n }\n dequeue() {\n var sentinel = this._sentinel;\n var entry = sentinel._prev;\n if (entry !== sentinel) {\n unlink(entry);\n return entry;\n }\n }\n enqueue(entry) {\n var sentinel = this._sentinel;\n if (entry._prev && entry._next) {\n unlink(entry);\n }\n entry._next = sentinel._next;\n sentinel._next._prev = entry;\n sentinel._next = entry;\n entry._prev = sentinel;\n }\n toString() {\n var strs = [];\n var sentinel = this._sentinel;\n var curr = sentinel._prev;\n while (curr !== sentinel) {\n strs.push(JSON.stringify(curr, filterOutLinks));\n curr = curr._prev;\n }\n return '[' + strs.join(', ') + ']';\n }\n}\n\nfunction unlink(entry) {\n entry._prev._next = entry._next;\n entry._next._prev = entry._prev;\n delete entry._next;\n delete entry._prev;\n}\n\nfunction filterOutLinks(k, v) {\n if (k !== '_next' && k !== '_prev') {\n return v;\n }\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../graphlib/index.js';\nimport { List } from './data/list.js';\n\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */\nexport { greedyFAS };\n\nvar DEFAULT_WEIGHT_FN = _.constant(1);\n\nfunction greedyFAS(g, weightFn) {\n if (g.nodeCount() <= 1) {\n return [];\n }\n var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);\n var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);\n\n // Expand multi-edges\n return _.flatten(\n _.map(results, function (e) {\n return g.outEdges(e.v, e.w);\n })\n );\n}\n\nfunction doGreedyFAS(g, buckets, zeroIdx) {\n var results = [];\n var sources = buckets[buckets.length - 1];\n var sinks = buckets[0];\n\n var entry;\n while (g.nodeCount()) {\n while ((entry = sinks.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n while ((entry = sources.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n if (g.nodeCount()) {\n for (var i = buckets.length - 2; i > 0; --i) {\n entry = buckets[i].dequeue();\n if (entry) {\n results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));\n break;\n }\n }\n }\n }\n\n return results;\n}\n\nfunction removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {\n var results = collectPredecessors ? [] : undefined;\n\n _.forEach(g.inEdges(entry.v), function (edge) {\n var weight = g.edge(edge);\n var uEntry = g.node(edge.v);\n\n if (collectPredecessors) {\n results.push({ v: edge.v, w: edge.w });\n }\n\n uEntry.out -= weight;\n assignBucket(buckets, zeroIdx, uEntry);\n });\n\n _.forEach(g.outEdges(entry.v), function (edge) {\n var weight = g.edge(edge);\n var w = edge.w;\n var wEntry = g.node(w);\n wEntry['in'] -= weight;\n assignBucket(buckets, zeroIdx, wEntry);\n });\n\n g.removeNode(entry.v);\n\n return results;\n}\n\nfunction buildState(g, weightFn) {\n var fasGraph = new Graph();\n var maxIn = 0;\n var maxOut = 0;\n\n _.forEach(g.nodes(), function (v) {\n fasGraph.setNode(v, { v: v, in: 0, out: 0 });\n });\n\n // Aggregate weights on nodes, but also sum the weights across multi-edges\n // into a single edge for the fasGraph.\n _.forEach(g.edges(), function (e) {\n var prevWeight = fasGraph.edge(e.v, e.w) || 0;\n var weight = weightFn(e);\n var edgeWeight = prevWeight + weight;\n fasGraph.setEdge(e.v, e.w, edgeWeight);\n maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight));\n maxIn = Math.max(maxIn, (fasGraph.node(e.w)['in'] += weight));\n });\n\n var buckets = _.range(maxOut + maxIn + 3).map(function () {\n return new List();\n });\n var zeroIdx = maxIn + 1;\n\n _.forEach(fasGraph.nodes(), function (v) {\n assignBucket(buckets, zeroIdx, fasGraph.node(v));\n });\n\n return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };\n}\n\nfunction assignBucket(buckets, zeroIdx, entry) {\n if (!entry.out) {\n buckets[0].enqueue(entry);\n } else if (!entry['in']) {\n buckets[buckets.length - 1].enqueue(entry);\n } else {\n buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry);\n }\n}\n", "import * as _ from 'lodash-es';\nimport { greedyFAS } from './greedy-fas.js';\n\nexport { run, undo };\n\nfunction run(g) {\n var fas = g.graph().acyclicer === 'greedy' ? greedyFAS(g, weightFn(g)) : dfsFAS(g);\n _.forEach(fas, function (e) {\n var label = g.edge(e);\n g.removeEdge(e);\n label.forwardName = e.name;\n label.reversed = true;\n g.setEdge(e.w, e.v, label, _.uniqueId('rev'));\n });\n\n function weightFn(g) {\n return function (e) {\n return g.edge(e).weight;\n };\n }\n}\n\nfunction dfsFAS(g) {\n var fas = [];\n var stack = {};\n var visited = {};\n\n function dfs(v) {\n if (_.has(visited, v)) {\n return;\n }\n visited[v] = true;\n stack[v] = true;\n _.forEach(g.outEdges(v), function (e) {\n if (_.has(stack, e.w)) {\n fas.push(e);\n } else {\n dfs(e.w);\n }\n });\n delete stack[v];\n }\n\n _.forEach(g.nodes(), dfs);\n return fas;\n}\n\nfunction undo(g) {\n _.forEach(g.edges(), function (e) {\n var label = g.edge(e);\n if (label.reversed) {\n g.removeEdge(e);\n\n var forwardName = label.forwardName;\n delete label.reversed;\n delete label.forwardName;\n g.setEdge(e.w, e.v, label, forwardName);\n }\n });\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../graphlib/index.js';\n\nexport {\n addDummyNode,\n simplify,\n asNonCompoundGraph,\n successorWeights,\n predecessorWeights,\n intersectRect,\n buildLayerMatrix,\n normalizeRanks,\n removeEmptyRanks,\n addBorderNode,\n maxRank,\n partition,\n time,\n notime,\n};\n\n/*\n * Adds a dummy node to the graph and return v.\n */\nfunction addDummyNode(g, type, attrs, name) {\n var v;\n do {\n v = _.uniqueId(name);\n } while (g.hasNode(v));\n\n attrs.dummy = type;\n g.setNode(v, attrs);\n return v;\n}\n\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */\nfunction simplify(g) {\n var simplified = new Graph().setGraph(g.graph());\n _.forEach(g.nodes(), function (v) {\n simplified.setNode(v, g.node(v));\n });\n _.forEach(g.edges(), function (e) {\n var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };\n var label = g.edge(e);\n simplified.setEdge(e.v, e.w, {\n weight: simpleLabel.weight + label.weight,\n minlen: Math.max(simpleLabel.minlen, label.minlen),\n });\n });\n return simplified;\n}\n\nfunction asNonCompoundGraph(g) {\n var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());\n _.forEach(g.nodes(), function (v) {\n if (!g.children(v).length) {\n simplified.setNode(v, g.node(v));\n }\n });\n _.forEach(g.edges(), function (e) {\n simplified.setEdge(e, g.edge(e));\n });\n return simplified;\n}\n\nfunction successorWeights(g) {\n var weightMap = _.map(g.nodes(), function (v) {\n var sucs = {};\n _.forEach(g.outEdges(v), function (e) {\n sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;\n });\n return sucs;\n });\n return _.zipObject(g.nodes(), weightMap);\n}\n\nfunction predecessorWeights(g) {\n var weightMap = _.map(g.nodes(), function (v) {\n var preds = {};\n _.forEach(g.inEdges(v), function (e) {\n preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;\n });\n return preds;\n });\n return _.zipObject(g.nodes(), weightMap);\n}\n\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */\nfunction intersectRect(rect, point) {\n var x = rect.x;\n var y = rect.y;\n\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = rect.width / 2;\n var h = rect.height / 2;\n\n if (!dx && !dy) {\n throw new Error('Not possible to find intersection inside of the rectangle');\n }\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n}\n\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * function will produce a matrix with the ids of each node.\n */\nfunction buildLayerMatrix(g) {\n var layering = _.map(_.range(maxRank(g) + 1), function () {\n return [];\n });\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n var rank = node.rank;\n if (!_.isUndefined(rank)) {\n layering[rank][node.order] = v;\n }\n });\n return layering;\n}\n\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */\nfunction normalizeRanks(g) {\n var min = _.min(\n _.map(g.nodes(), function (v) {\n return g.node(v).rank;\n })\n );\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (_.has(node, 'rank')) {\n node.rank -= min;\n }\n });\n}\n\nfunction removeEmptyRanks(g) {\n // Ranks may not start at 0, so we need to offset them\n var offset = _.min(\n _.map(g.nodes(), function (v) {\n return g.node(v).rank;\n })\n );\n\n var layers = [];\n _.forEach(g.nodes(), function (v) {\n var rank = g.node(v).rank - offset;\n if (!layers[rank]) {\n layers[rank] = [];\n }\n layers[rank].push(v);\n });\n\n var delta = 0;\n var nodeRankFactor = g.graph().nodeRankFactor;\n _.forEach(layers, function (vs, i) {\n if (_.isUndefined(vs) && i % nodeRankFactor !== 0) {\n --delta;\n } else if (delta) {\n _.forEach(vs, function (v) {\n g.node(v).rank += delta;\n });\n }\n });\n}\n\nfunction addBorderNode(g, prefix, rank, order) {\n var node = {\n width: 0,\n height: 0,\n };\n if (arguments.length >= 4) {\n node.rank = rank;\n node.order = order;\n }\n return addDummyNode(g, 'border', node, prefix);\n}\n\nfunction maxRank(g) {\n return _.max(\n _.map(g.nodes(), function (v) {\n var rank = g.node(v).rank;\n if (!_.isUndefined(rank)) {\n return rank;\n }\n })\n );\n}\n\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * function returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */\nfunction partition(collection, fn) {\n var result = { lhs: [], rhs: [] };\n _.forEach(collection, function (value) {\n if (fn(value)) {\n result.lhs.push(value);\n } else {\n result.rhs.push(value);\n }\n });\n return result;\n}\n\n/*\n * Returns a new function that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */\nfunction time(name, fn) {\n var start = _.now();\n try {\n return fn();\n } finally {\n console.log(name + ' time: ' + (_.now() - start) + 'ms');\n }\n}\n\nfunction notime(name, fn) {\n return fn();\n}\n", "import * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { addBorderSegments };\n\nfunction addBorderSegments(g) {\n function dfs(v) {\n var children = g.children(v);\n var node = g.node(v);\n if (children.length) {\n _.forEach(children, dfs);\n }\n\n if (_.has(node, 'minRank')) {\n node.borderLeft = [];\n node.borderRight = [];\n for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) {\n addBorderNode(g, 'borderLeft', '_bl', v, node, rank);\n addBorderNode(g, 'borderRight', '_br', v, node, rank);\n }\n }\n }\n\n _.forEach(g.children(), dfs);\n}\n\nfunction addBorderNode(g, prop, prefix, sg, sgNode, rank) {\n var label = { width: 0, height: 0, rank: rank, borderType: prop };\n var prev = sgNode[prop][rank - 1];\n var curr = util.addDummyNode(g, 'border', label, prefix);\n sgNode[prop][rank] = curr;\n g.setParent(curr, sg);\n if (prev) {\n g.setEdge(prev, curr, { weight: 1 });\n }\n}\n", "import * as _ from 'lodash-es';\n\nexport { adjust, undo };\n\nfunction adjust(g) {\n var rankDir = g.graph().rankdir.toLowerCase();\n if (rankDir === 'lr' || rankDir === 'rl') {\n swapWidthHeight(g);\n }\n}\n\nfunction undo(g) {\n var rankDir = g.graph().rankdir.toLowerCase();\n if (rankDir === 'bt' || rankDir === 'rl') {\n reverseY(g);\n }\n\n if (rankDir === 'lr' || rankDir === 'rl') {\n swapXY(g);\n swapWidthHeight(g);\n }\n}\n\nfunction swapWidthHeight(g) {\n _.forEach(g.nodes(), function (v) {\n swapWidthHeightOne(g.node(v));\n });\n _.forEach(g.edges(), function (e) {\n swapWidthHeightOne(g.edge(e));\n });\n}\n\nfunction swapWidthHeightOne(attrs) {\n var w = attrs.width;\n attrs.width = attrs.height;\n attrs.height = w;\n}\n\nfunction reverseY(g) {\n _.forEach(g.nodes(), function (v) {\n reverseYOne(g.node(v));\n });\n\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n _.forEach(edge.points, reverseYOne);\n if (_.has(edge, 'y')) {\n reverseYOne(edge);\n }\n });\n}\n\nfunction reverseYOne(attrs) {\n attrs.y = -attrs.y;\n}\n\nfunction swapXY(g) {\n _.forEach(g.nodes(), function (v) {\n swapXYOne(g.node(v));\n });\n\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n _.forEach(edge.points, swapXYOne);\n if (_.has(edge, 'x')) {\n swapXYOne(edge);\n }\n });\n}\n\nfunction swapXYOne(attrs) {\n var x = attrs.x;\n attrs.x = attrs.y;\n attrs.y = x;\n}\n", "import * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { run, undo };\n\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n * 1. The input graph is a DAG.\n * 2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n * 1. All edges in the graph have a length of 1.\n * 2. Dummy nodes are added where edges have been split into segments.\n * 3. The graph is augmented with a \"dummyChains\" attribute which contains\n * the first dummy in each chain of dummy nodes produced.\n */\nfunction run(g) {\n g.graph().dummyChains = [];\n _.forEach(g.edges(), function (edge) {\n normalizeEdge(g, edge);\n });\n}\n\nfunction normalizeEdge(g, e) {\n var v = e.v;\n var vRank = g.node(v).rank;\n var w = e.w;\n var wRank = g.node(w).rank;\n var name = e.name;\n var edgeLabel = g.edge(e);\n var labelRank = edgeLabel.labelRank;\n\n if (wRank === vRank + 1) return;\n\n g.removeEdge(e);\n\n var dummy, attrs, i;\n for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {\n edgeLabel.points = [];\n attrs = {\n width: 0,\n height: 0,\n edgeLabel: edgeLabel,\n edgeObj: e,\n rank: vRank,\n };\n dummy = util.addDummyNode(g, 'edge', attrs, '_d');\n if (vRank === labelRank) {\n attrs.width = edgeLabel.width;\n attrs.height = edgeLabel.height;\n // @ts-expect-error\n attrs.dummy = 'edge-label';\n // @ts-expect-error\n attrs.labelpos = edgeLabel.labelpos;\n }\n g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);\n if (i === 0) {\n g.graph().dummyChains.push(dummy);\n }\n v = dummy;\n }\n\n g.setEdge(v, w, { weight: edgeLabel.weight }, name);\n}\n\nfunction undo(g) {\n _.forEach(g.graph().dummyChains, function (v) {\n var node = g.node(v);\n var origLabel = node.edgeLabel;\n var w;\n g.setEdge(node.edgeObj, origLabel);\n while (node.dummy) {\n w = g.successors(v)[0];\n g.removeNode(v);\n origLabel.points.push({ x: node.x, y: node.y });\n if (node.dummy === 'edge-label') {\n origLabel.x = node.x;\n origLabel.y = node.y;\n origLabel.width = node.width;\n origLabel.height = node.height;\n }\n v = w;\n node = g.node(v);\n }\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { longestPath, slack };\n\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nfunction longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(\n _.map(g.outEdges(v), function (e) {\n return dfs(e.w) - g.edge(e).minlen;\n })\n );\n\n if (\n rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null\n ) {\n // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}\n\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nfunction slack(g, e) {\n return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\nimport { slack } from './util.js';\n\nexport { feasibleTree };\n\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nfunction feasibleTree(g) {\n var t = new Graph({ directed: false });\n\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n\n var edge, delta;\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);\n shiftRanks(t, g, delta);\n }\n\n return t;\n}\n\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nfunction tightTree(t, g) {\n function dfs(v) {\n _.forEach(g.nodeEdges(v), function (e) {\n var edgeV = e.v,\n w = v === edgeV ? e.w : edgeV;\n if (!t.hasNode(w) && !slack(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n }\n\n _.forEach(t.nodes(), dfs);\n return t.nodeCount();\n}\n\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nfunction findMinSlackEdge(t, g) {\n return _.minBy(g.edges(), function (e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return slack(g, e);\n }\n });\n}\n\nfunction shiftRanks(t, g, delta) {\n _.forEach(t.nodes(), function (v) {\n g.node(v).rank += delta;\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { components };\n\nfunction components(g) {\n var visited = {};\n var cmpts = [];\n var cmpt;\n\n function dfs(v) {\n if (_.has(visited, v)) return;\n visited[v] = true;\n cmpt.push(v);\n _.each(g.successors(v), dfs);\n _.each(g.predecessors(v), dfs);\n }\n\n _.each(g.nodes(), function (v) {\n cmpt = [];\n dfs(v);\n if (cmpt.length) {\n cmpts.push(cmpt);\n }\n });\n\n return cmpts;\n}\n", "import * as _ from 'lodash-es';\n\nexport { PriorityQueue };\n\n/**\n * A min-priority queue data structure. This algorithm is derived from Cormen,\n * et al., \"Introduction to Algorithms\". The basic idea of a min-priority\n * queue is that you can efficiently (in O(1) time) get the smallest key in\n * the queue. Adding and removing elements takes O(log n) time. A key can\n * have its priority decreased in O(log n) time.\n */\nclass PriorityQueue {\n constructor() {\n this._arr = [];\n this._keyIndices = {};\n }\n /**\n * Returns the number of elements in the queue. Takes `O(1)` time.\n */\n size() {\n return this._arr.length;\n }\n /**\n * Returns the keys that are in the queue. Takes `O(n)` time.\n */\n keys() {\n return this._arr.map(function (x) {\n return x.key;\n });\n }\n /**\n * Returns `true` if **key** is in the queue and `false` if not.\n */\n has(key) {\n return _.has(this._keyIndices, key);\n }\n /**\n * Returns the priority for **key**. If **key** is not present in the queue\n * then this function returns `undefined`. Takes `O(1)` time.\n *\n * @param {Object} key\n */\n priority(key) {\n var index = this._keyIndices[key];\n if (index !== undefined) {\n return this._arr[index].priority;\n }\n }\n /**\n * Returns the key for the minimum element in this queue. If the queue is\n * empty this function throws an Error. Takes `O(1)` time.\n */\n min() {\n if (this.size() === 0) {\n throw new Error('Queue underflow');\n }\n return this._arr[0].key;\n }\n /**\n * Inserts a new key into the priority queue. If the key already exists in\n * the queue this function returns `false`; otherwise it will return `true`.\n * Takes `O(n)` time.\n *\n * @param {Object} key the key to add\n * @param {Number} priority the initial priority for the key\n */\n add(key, priority) {\n var keyIndices = this._keyIndices;\n key = String(key);\n if (!_.has(keyIndices, key)) {\n var arr = this._arr;\n var index = arr.length;\n keyIndices[key] = index;\n arr.push({ key: key, priority: priority });\n this._decrease(index);\n return true;\n }\n return false;\n }\n /**\n * Removes and returns the smallest key in the queue. Takes `O(log n)` time.\n */\n removeMin() {\n this._swap(0, this._arr.length - 1);\n var min = this._arr.pop();\n delete this._keyIndices[min.key];\n this._heapify(0);\n return min.key;\n }\n /**\n * Decreases the priority for **key** to **priority**. If the new priority is\n * greater than the previous priority, this function will throw an Error.\n *\n * @param {Object} key the key for which to raise priority\n * @param {Number} priority the new priority for the key\n */\n decrease(key, priority) {\n var index = this._keyIndices[key];\n if (priority > this._arr[index].priority) {\n throw new Error(\n 'New priority is greater than current priority. ' +\n 'Key: ' +\n key +\n ' Old: ' +\n this._arr[index].priority +\n ' New: ' +\n priority\n );\n }\n this._arr[index].priority = priority;\n this._decrease(index);\n }\n _heapify(i) {\n var arr = this._arr;\n var l = 2 * i;\n var r = l + 1;\n var largest = i;\n if (l < arr.length) {\n largest = arr[l].priority < arr[largest].priority ? l : largest;\n if (r < arr.length) {\n largest = arr[r].priority < arr[largest].priority ? r : largest;\n }\n if (largest !== i) {\n this._swap(i, largest);\n this._heapify(largest);\n }\n }\n }\n _decrease(index) {\n var arr = this._arr;\n var priority = arr[index].priority;\n var parent;\n while (index !== 0) {\n parent = index >> 1;\n if (arr[parent].priority < priority) {\n break;\n }\n this._swap(index, parent);\n index = parent;\n }\n }\n _swap(i, j) {\n var arr = this._arr;\n var keyIndices = this._keyIndices;\n var origArrI = arr[i];\n var origArrJ = arr[j];\n arr[i] = origArrJ;\n arr[j] = origArrI;\n keyIndices[origArrJ.key] = i;\n keyIndices[origArrI.key] = j;\n }\n}\n", "import * as _ from 'lodash-es';\nimport { PriorityQueue } from '../data/priority-queue.js';\n\nexport { dijkstra };\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction dijkstra(g, source, weightFn, edgeFn) {\n return runDijkstra(\n g,\n String(source),\n weightFn || DEFAULT_WEIGHT_FUNC,\n edgeFn ||\n function (v) {\n return g.outEdges(v);\n }\n );\n}\n\nfunction runDijkstra(g, source, weightFn, edgeFn) {\n var results = {};\n var pq = new PriorityQueue();\n var v, vEntry;\n\n var updateNeighbors = function (edge) {\n var w = edge.v !== v ? edge.v : edge.w;\n var wEntry = results[w];\n var weight = weightFn(edge);\n var distance = vEntry.distance + weight;\n\n if (weight < 0) {\n throw new Error(\n 'dijkstra does not allow negative edge weights. ' +\n 'Bad edge: ' +\n edge +\n ' Weight: ' +\n weight\n );\n }\n\n if (distance < wEntry.distance) {\n wEntry.distance = distance;\n wEntry.predecessor = v;\n pq.decrease(w, distance);\n }\n };\n\n g.nodes().forEach(function (v) {\n var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n results[v] = { distance: distance };\n pq.add(v, distance);\n });\n\n while (pq.size() > 0) {\n v = pq.removeMin();\n vEntry = results[v];\n if (vEntry.distance === Number.POSITIVE_INFINITY) {\n break;\n }\n\n edgeFn(v).forEach(updateNeighbors);\n }\n\n return results;\n}\n", "import * as _ from 'lodash-es';\nimport { dijkstra } from './dijkstra.js';\n\nexport { dijkstraAll };\n\nfunction dijkstraAll(g, weightFunc, edgeFunc) {\n return _.transform(\n g.nodes(),\n function (acc, v) {\n acc[v] = dijkstra(g, v, weightFunc, edgeFunc);\n },\n {}\n );\n}\n", "import * as _ from 'lodash-es';\n\nexport { tarjan };\n\nfunction tarjan(g) {\n var index = 0;\n var stack = [];\n var visited = {}; // node id -> { onStack, lowlink, index }\n var results = [];\n\n function dfs(v) {\n var entry = (visited[v] = {\n onStack: true,\n lowlink: index,\n index: index++,\n });\n stack.push(v);\n\n g.successors(v).forEach(function (w) {\n if (!_.has(visited, w)) {\n dfs(w);\n entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);\n } else if (visited[w].onStack) {\n entry.lowlink = Math.min(entry.lowlink, visited[w].index);\n }\n });\n\n if (entry.lowlink === entry.index) {\n var cmpt = [];\n var w;\n do {\n w = stack.pop();\n visited[w].onStack = false;\n cmpt.push(w);\n } while (v !== w);\n results.push(cmpt);\n }\n }\n\n g.nodes().forEach(function (v) {\n if (!_.has(visited, v)) {\n dfs(v);\n }\n });\n\n return results;\n}\n", "import * as _ from 'lodash-es';\nimport { tarjan } from './tarjan.js';\n\nexport { findCycles };\n\nfunction findCycles(g) {\n return _.filter(tarjan(g), function (cmpt) {\n return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]));\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { floydWarshall };\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction floydWarshall(g, weightFn, edgeFn) {\n return runFloydWarshall(\n g,\n weightFn || DEFAULT_WEIGHT_FUNC,\n edgeFn ||\n function (v) {\n return g.outEdges(v);\n }\n );\n}\n\nfunction runFloydWarshall(g, weightFn, edgeFn) {\n var results = {};\n var nodes = g.nodes();\n\n nodes.forEach(function (v) {\n results[v] = {};\n results[v][v] = { distance: 0 };\n nodes.forEach(function (w) {\n if (v !== w) {\n results[v][w] = { distance: Number.POSITIVE_INFINITY };\n }\n });\n edgeFn(v).forEach(function (edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var d = weightFn(edge);\n results[v][w] = { distance: d, predecessor: v };\n });\n });\n\n nodes.forEach(function (k) {\n var rowK = results[k];\n nodes.forEach(function (i) {\n var rowI = results[i];\n nodes.forEach(function (j) {\n var ik = rowI[k];\n var kj = rowK[j];\n var ij = rowI[j];\n var altDistance = ik.distance + kj.distance;\n if (altDistance < ij.distance) {\n ij.distance = altDistance;\n ij.predecessor = kj.predecessor;\n }\n });\n });\n });\n\n return results;\n}\n", "import * as _ from 'lodash-es';\n\nexport { topsort, CycleException };\n\ntopsort.CycleException = CycleException;\n\nfunction topsort(g) {\n var visited = {};\n var stack = {};\n var results = [];\n\n function visit(node) {\n if (_.has(stack, node)) {\n throw new CycleException();\n }\n\n if (!_.has(visited, node)) {\n stack[node] = true;\n visited[node] = true;\n _.each(g.predecessors(node), visit);\n delete stack[node];\n results.push(node);\n }\n }\n\n _.each(g.sinks(), visit);\n\n if (_.size(visited) !== g.nodeCount()) {\n throw new CycleException();\n }\n\n return results;\n}\n\nfunction CycleException() {}\nCycleException.prototype = new Error(); // must be an instance of Error to pass testing\n", "import { topsort, CycleException } from './topsort.js';\n\nexport { isAcyclic };\n\nfunction isAcyclic(g) {\n try {\n topsort(g);\n } catch (e) {\n if (e instanceof CycleException) {\n return false;\n }\n throw e;\n }\n return true;\n}\n", "import * as _ from 'lodash-es';\n\nexport { dfs };\n\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order they were visited. If the graph is\n * undirected then this algorithm will navigate using neighbors. If the graph\n * is directed then this algorithm will navigate using successors.\n *\n * Order must be one of \"pre\" or \"post\".\n */\nfunction dfs(g, vs, order) {\n if (!_.isArray(vs)) {\n vs = [vs];\n }\n\n var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);\n\n var acc = [];\n var visited = {};\n _.each(vs, function (v) {\n if (!g.hasNode(v)) {\n throw new Error('Graph does not have node: ' + v);\n }\n\n doDfs(g, v, order === 'post', visited, navigation, acc);\n });\n return acc;\n}\n\nfunction doDfs(g, v, postorder, visited, navigation, acc) {\n if (!_.has(visited, v)) {\n visited[v] = true;\n\n if (!postorder) {\n acc.push(v);\n }\n _.each(navigation(v), function (w) {\n doDfs(g, w, postorder, visited, navigation, acc);\n });\n if (postorder) {\n acc.push(v);\n }\n }\n}\n", "import { dfs } from './dfs.js';\n\nexport { postorder };\n\nfunction postorder(g, vs) {\n return dfs(g, vs, 'post');\n}\n", "import { dfs } from './dfs.js';\n\nexport { preorder };\n\nfunction preorder(g, vs) {\n return dfs(g, vs, 'pre');\n}\n", "import * as _ from 'lodash-es';\nimport { PriorityQueue } from '../data/priority-queue.js';\nimport { Graph } from '../graph.js';\n\nexport { prim };\n\nfunction prim(g, weightFunc) {\n var result = new Graph();\n var parents = {};\n var pq = new PriorityQueue();\n var v;\n\n function updateNeighbors(edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var pri = pq.priority(w);\n if (pri !== undefined) {\n var edgeWeight = weightFunc(edge);\n if (edgeWeight < pri) {\n parents[w] = v;\n pq.decrease(w, edgeWeight);\n }\n }\n }\n\n if (g.nodeCount() === 0) {\n return result;\n }\n\n _.each(g.nodes(), function (v) {\n pq.add(v, Number.POSITIVE_INFINITY);\n result.setNode(v);\n });\n\n // Start from an arbitrary node\n pq.decrease(g.nodes()[0], 0);\n\n var init = false;\n while (pq.size() > 0) {\n v = pq.removeMin();\n if (_.has(parents, v)) {\n result.setEdge(v, parents[v]);\n } else if (init) {\n throw new Error('Input graph is not connected: ' + g);\n } else {\n init = true;\n }\n\n g.nodeEdges(v).forEach(updateNeighbors);\n }\n\n return result;\n}\n", "import { components } from './components.js';\nimport { dijkstra } from './dijkstra.js';\nimport { dijkstraAll } from './dijkstra-all.js';\nimport { findCycles } from './find-cycles.js';\nimport { floydWarshall } from './floyd-warshall.js';\nimport { isAcyclic } from './is-acyclic.js';\nimport { postorder } from './postorder.js';\nimport { preorder } from './preorder.js';\nimport { prim } from './prim.js';\nimport { tarjan } from './tarjan.js';\nimport { topsort } from './topsort.js';\n\nexport {\n components,\n dijkstra,\n dijkstraAll,\n findCycles,\n floydWarshall,\n isAcyclic,\n postorder,\n preorder,\n prim,\n tarjan,\n topsort,\n};\n", "import * as _ from 'lodash-es';\nimport * as alg from '../../graphlib/alg/index.js';\nimport { simplify } from '../util.js';\nimport { feasibleTree } from './feasible-tree.js';\nimport { longestPath, slack } from './util.js';\n\nexport { networkSimplex };\n\n// Expose some internals for testing purposes\nnetworkSimplex.initLowLimValues = initLowLimValues;\nnetworkSimplex.initCutValues = initCutValues;\nnetworkSimplex.calcCutValue = calcCutValue;\nnetworkSimplex.leaveEdge = leaveEdge;\nnetworkSimplex.enterEdge = enterEdge;\nnetworkSimplex.exchangeEdges = exchangeEdges;\n\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nfunction networkSimplex(g) {\n g = simplify(g);\n longestPath(g);\n var t = feasibleTree(g);\n initLowLimValues(t);\n initCutValues(t, g);\n\n var e, f;\n while ((e = leaveEdge(t))) {\n f = enterEdge(t, g, e);\n exchangeEdges(t, g, e, f);\n }\n}\n\n/*\n * Initializes cut values for all edges in the tree.\n */\nfunction initCutValues(t, g) {\n var vs = alg.postorder(t, t.nodes());\n vs = vs.slice(0, vs.length - 1);\n _.forEach(vs, function (v) {\n assignCutValue(t, g, v);\n });\n}\n\nfunction assignCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n t.edge(child, parent).cutvalue = calcCutValue(t, g, child);\n}\n\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nfunction calcCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n // True if the child is on the tail end of the edge in the directed graph\n var childIsTail = true;\n // The graph's view of the tree edge we're inspecting\n var graphEdge = g.edge(child, parent);\n // The accumulated cut value for the edge between this node and its parent\n var cutValue = 0;\n\n if (!graphEdge) {\n childIsTail = false;\n graphEdge = g.edge(parent, child);\n }\n\n cutValue = graphEdge.weight;\n\n _.forEach(g.nodeEdges(child), function (e) {\n var isOutEdge = e.v === child,\n other = isOutEdge ? e.w : e.v;\n\n if (other !== parent) {\n var pointsToHead = isOutEdge === childIsTail,\n otherWeight = g.edge(e).weight;\n\n cutValue += pointsToHead ? otherWeight : -otherWeight;\n if (isTreeEdge(t, child, other)) {\n var otherCutValue = t.edge(child, other).cutvalue;\n cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n }\n }\n });\n\n return cutValue;\n}\n\nfunction initLowLimValues(tree, root) {\n if (arguments.length < 2) {\n root = tree.nodes()[0];\n }\n dfsAssignLowLim(tree, {}, 1, root);\n}\n\nfunction dfsAssignLowLim(tree, visited, nextLim, v, parent) {\n var low = nextLim;\n var label = tree.node(v);\n\n visited[v] = true;\n _.forEach(tree.neighbors(v), function (w) {\n if (!_.has(visited, w)) {\n nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);\n }\n });\n\n label.low = low;\n label.lim = nextLim++;\n if (parent) {\n label.parent = parent;\n } else {\n // TODO should be able to remove this when we incrementally update low lim\n delete label.parent;\n }\n\n return nextLim;\n}\n\nfunction leaveEdge(tree) {\n return _.find(tree.edges(), function (e) {\n return tree.edge(e).cutvalue < 0;\n });\n}\n\nfunction enterEdge(t, g, edge) {\n var v = edge.v;\n var w = edge.w;\n\n // For the rest of this function we assume that v is the tail and w is the\n // head, so if we don't have this edge in the graph we should flip it to\n // match the correct orientation.\n if (!g.hasEdge(v, w)) {\n v = edge.w;\n w = edge.v;\n }\n\n var vLabel = t.node(v);\n var wLabel = t.node(w);\n var tailLabel = vLabel;\n var flip = false;\n\n // If the root is in the tail of the edge then we need to flip the logic that\n // checks for the head and tail nodes in the candidates function below.\n if (vLabel.lim > wLabel.lim) {\n tailLabel = wLabel;\n flip = true;\n }\n\n var candidates = _.filter(g.edges(), function (edge) {\n return (\n flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n flip !== isDescendant(t, t.node(edge.w), tailLabel)\n );\n });\n\n return _.minBy(candidates, function (edge) {\n return slack(g, edge);\n });\n}\n\nfunction exchangeEdges(t, g, e, f) {\n var v = e.v;\n var w = e.w;\n t.removeEdge(v, w);\n t.setEdge(f.v, f.w, {});\n initLowLimValues(t);\n initCutValues(t, g);\n updateRanks(t, g);\n}\n\nfunction updateRanks(t, g) {\n var root = _.find(t.nodes(), function (v) {\n return !g.node(v).parent;\n });\n var vs = alg.preorder(t, root);\n vs = vs.slice(1);\n _.forEach(vs, function (v) {\n var parent = t.node(v).parent,\n edge = g.edge(v, parent),\n flipped = false;\n\n if (!edge) {\n edge = g.edge(parent, v);\n flipped = true;\n }\n\n g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n });\n}\n\n/*\n * Returns true if the edge is in the tree.\n */\nfunction isTreeEdge(tree, u, v) {\n return tree.hasEdge(u, v);\n}\n\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nfunction isDescendant(tree, vLabel, rootLabel) {\n return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n}\n", "import { feasibleTree } from './feasible-tree.js';\nimport { networkSimplex } from './network-simplex.js';\nimport { longestPath } from './util.js';\n\nexport { rank };\n\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */\nfunction rank(g) {\n switch (g.graph().ranker) {\n case 'network-simplex':\n networkSimplexRanker(g);\n break;\n case 'tight-tree':\n tightTreeRanker(g);\n break;\n case 'longest-path':\n longestPathRanker(g);\n break;\n default:\n networkSimplexRanker(g);\n }\n}\n\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = longestPath;\n\nfunction tightTreeRanker(g) {\n longestPath(g);\n feasibleTree(g);\n}\n\nfunction networkSimplexRanker(g) {\n networkSimplex(g);\n}\n", "import * as _ from 'lodash-es';\nimport * as util from './util.js';\n\nexport { run, cleanup };\n\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n * 1. Input graph is a DAG\n * 2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n * 1. Input graph is connected.\n * 2. Dummy nodes are added for the tops and bottoms of subgraphs.\n * 3. The minlen attribute for nodes is adjusted to ensure nodes do not\n * get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */\nfunction run(g) {\n var root = util.addDummyNode(g, 'root', {}, '_root');\n var depths = treeDepths(g);\n var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array\n var nodeSep = 2 * height + 1;\n\n g.graph().nestingRoot = root;\n\n // Multiply minlen by nodeSep to align nodes on non-border ranks.\n _.forEach(g.edges(), function (e) {\n g.edge(e).minlen *= nodeSep;\n });\n\n // Calculate a weight that is sufficient to keep subgraphs vertically compact\n var weight = sumWeights(g) + 1;\n\n // Create border nodes and link them up\n _.forEach(g.children(), function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n });\n\n // Save the multiplier for node layers for later removal of empty border\n // layers.\n g.graph().nodeRankFactor = nodeSep;\n}\n\nfunction dfs(g, root, nodeSep, weight, height, depths, v) {\n var children = g.children(v);\n if (!children.length) {\n if (v !== root) {\n g.setEdge(root, v, { weight: 0, minlen: nodeSep });\n }\n return;\n }\n\n var top = util.addBorderNode(g, '_bt');\n var bottom = util.addBorderNode(g, '_bb');\n var label = g.node(v);\n\n g.setParent(top, v);\n label.borderTop = top;\n g.setParent(bottom, v);\n label.borderBottom = bottom;\n\n _.forEach(children, function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n\n var childNode = g.node(child);\n var childTop = childNode.borderTop ? childNode.borderTop : child;\n var childBottom = childNode.borderBottom ? childNode.borderBottom : child;\n var thisWeight = childNode.borderTop ? weight : 2 * weight;\n var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;\n\n g.setEdge(top, childTop, {\n weight: thisWeight,\n minlen: minlen,\n nestingEdge: true,\n });\n\n g.setEdge(childBottom, bottom, {\n weight: thisWeight,\n minlen: minlen,\n nestingEdge: true,\n });\n });\n\n if (!g.parent(v)) {\n g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });\n }\n}\n\nfunction treeDepths(g) {\n var depths = {};\n function dfs(v, depth) {\n var children = g.children(v);\n if (children && children.length) {\n _.forEach(children, function (child) {\n dfs(child, depth + 1);\n });\n }\n depths[v] = depth;\n }\n _.forEach(g.children(), function (v) {\n dfs(v, 1);\n });\n return depths;\n}\n\nfunction sumWeights(g) {\n return _.reduce(\n g.edges(),\n function (acc, e) {\n return acc + g.edge(e).weight;\n },\n 0\n );\n}\n\nfunction cleanup(g) {\n var graphLabel = g.graph();\n g.removeNode(graphLabel.nestingRoot);\n delete graphLabel.nestingRoot;\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (edge.nestingEdge) {\n g.removeEdge(e);\n }\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { addSubgraphConstraints };\n\nfunction addSubgraphConstraints(g, cg, vs) {\n var prev = {},\n rootPrev;\n\n _.forEach(vs, function (v) {\n var child = g.parent(v),\n parent,\n prevChild;\n while (child) {\n parent = g.parent(child);\n if (parent) {\n prevChild = prev[parent];\n prev[parent] = child;\n } else {\n prevChild = rootPrev;\n rootPrev = child;\n }\n if (prevChild && prevChild !== child) {\n cg.setEdge(prevChild, child);\n return;\n }\n child = parent;\n }\n });\n\n /*\n function dfs(v) {\n var children = v ? g.children(v) : g.children();\n if (children.length) {\n var min = Number.POSITIVE_INFINITY,\n subgraphs = [];\n _.each(children, function(child) {\n var childMin = dfs(child);\n if (g.children(child).length) {\n subgraphs.push({ v: child, order: childMin });\n }\n min = Math.min(min, childMin);\n });\n _.reduce(_.sortBy(subgraphs, \"order\"), function(prev, curr) {\n cg.setEdge(prev.v, curr.v);\n return curr;\n });\n return min;\n }\n return g.node(v).order;\n }\n dfs(undefined);\n */\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\n\nexport { buildLayerGraph };\n\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG\n * 2. Base nodes in the input graph have a rank attribute\n * 3. Subgraph nodes in the input graph has minRank and maxRank attributes\n * 4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n * 1. Output graph has all nodes in the movable rank with preserved\n * hierarchy.\n * 2. Root nodes in the movable layer are made children of the node\n * indicated by the root attribute of the graph.\n * 3. Non-movable nodes incident on movable nodes, selected by the\n * relationship parameter, are included in the graph (without hierarchy).\n * 4. Edges incident on movable nodes, selected by the relationship\n * parameter, are added to the output graph.\n * 5. The weights for copied edges are aggregated as need, since the output\n * graph is not a multi-graph.\n */\nfunction buildLayerGraph(g, rank, relationship) {\n var root = createRootNode(g),\n result = new Graph({ compound: true })\n .setGraph({ root: root })\n .setDefaultNodeLabel(function (v) {\n return g.node(v);\n });\n\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v),\n parent = g.parent(v);\n\n if (node.rank === rank || (node.minRank <= rank && rank <= node.maxRank)) {\n result.setNode(v);\n result.setParent(v, parent || root);\n\n // This assumes we have only short edges!\n _.forEach(g[relationship](v), function (e) {\n var u = e.v === v ? e.w : e.v,\n edge = result.edge(u, v),\n weight = !_.isUndefined(edge) ? edge.weight : 0;\n result.setEdge(u, v, { weight: g.edge(e).weight + weight });\n });\n\n if (_.has(node, 'minRank')) {\n result.setNode(v, {\n borderLeft: node.borderLeft[rank],\n borderRight: node.borderRight[rank],\n });\n }\n }\n });\n\n return result;\n}\n\nfunction createRootNode(g) {\n var v;\n while (g.hasNode((v = _.uniqueId('_root'))));\n return v;\n}\n", "import * as _ from 'lodash-es';\n\nexport { crossCount };\n\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n * 1. Input graph must be simple (not a multigraph), directed, and include\n * only simple edges.\n * 2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n * 1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */\nfunction crossCount(g, layering) {\n var cc = 0;\n for (var i = 1; i < layering.length; ++i) {\n cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);\n }\n return cc;\n}\n\nfunction twoLayerCrossCount(g, northLayer, southLayer) {\n // Sort all of the edges between the north and south layers by their position\n // in the north layer and then the south. Map these edges to the position of\n // their head in the south layer.\n var southPos = _.zipObject(\n southLayer,\n _.map(southLayer, function (v, i) {\n return i;\n })\n );\n var southEntries = _.flatten(\n _.map(northLayer, function (v) {\n return _.sortBy(\n _.map(g.outEdges(v), function (e) {\n return { pos: southPos[e.w], weight: g.edge(e).weight };\n }),\n 'pos'\n );\n })\n );\n\n // Build the accumulator tree\n var firstIndex = 1;\n while (firstIndex < southLayer.length) firstIndex <<= 1;\n var treeSize = 2 * firstIndex - 1;\n firstIndex -= 1;\n var tree = _.map(new Array(treeSize), function () {\n return 0;\n });\n\n // Calculate the weighted crossings\n var cc = 0;\n _.forEach(\n // @ts-expect-error\n southEntries.forEach(function (entry) {\n var index = entry.pos + firstIndex;\n tree[index] += entry.weight;\n var weightSum = 0;\n // @ts-expect-error\n while (index > 0) {\n // @ts-expect-error\n if (index % 2) {\n weightSum += tree[index + 1];\n }\n // @ts-expect-error\n index = (index - 1) >> 1;\n tree[index] += entry.weight;\n }\n cc += entry.weight * weightSum;\n })\n );\n\n return cc;\n}\n", "import * as _ from 'lodash-es';\n\nexport { initOrder };\n\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */\nfunction initOrder(g) {\n var visited = {};\n var simpleNodes = _.filter(g.nodes(), function (v) {\n return !g.children(v).length;\n });\n var maxRank = _.max(\n _.map(simpleNodes, function (v) {\n return g.node(v).rank;\n })\n );\n var layers = _.map(_.range(maxRank + 1), function () {\n return [];\n });\n\n function dfs(v) {\n if (_.has(visited, v)) return;\n visited[v] = true;\n var node = g.node(v);\n layers[node.rank].push(v);\n _.forEach(g.successors(v), dfs);\n }\n\n var orderedVs = _.sortBy(simpleNodes, function (v) {\n return g.node(v).rank;\n });\n _.forEach(orderedVs, dfs);\n\n return layers;\n}\n", "import * as _ from 'lodash-es';\n\nexport { barycenter };\n\nfunction barycenter(g, movable) {\n return _.map(movable, function (v) {\n var inV = g.inEdges(v);\n if (!inV.length) {\n return { v: v };\n } else {\n var result = _.reduce(\n inV,\n function (acc, e) {\n var edge = g.edge(e),\n nodeU = g.node(e.v);\n return {\n sum: acc.sum + edge.weight * nodeU.order,\n weight: acc.weight + edge.weight,\n };\n },\n { sum: 0, weight: 0 }\n );\n\n return {\n v: v,\n barycenter: result.sum / result.weight,\n weight: result.weight,\n };\n }\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { resolveConflicts };\n\n/*\n * Given a list of entries of the form {v, barycenter, weight} and a\n * constraint graph this function will resolve any conflicts between the\n * constraint graph and the barycenters for the entries. If the barycenters for\n * an entry would violate a constraint in the constraint graph then we coalesce\n * the nodes in the conflict into a new node that respects the contraint and\n * aggregates barycenter and weight information.\n *\n * This implementation is based on the description in Forster, \"A Fast and\n * Simple Hueristic for Constrained Two-Level Crossing Reduction,\" thought it\n * differs in some specific details.\n *\n * Pre-conditions:\n *\n * 1. Each entry has the form {v, barycenter, weight}, or if the node has\n * no barycenter, then {v}.\n *\n * Returns:\n *\n * A new list of entries of the form {vs, i, barycenter, weight}. The list\n * `vs` may either be a singleton or it may be an aggregation of nodes\n * ordered such that they do not violate constraints from the constraint\n * graph. The property `i` is the lowest original index of any of the\n * elements in `vs`.\n */\nfunction resolveConflicts(entries, cg) {\n var mappedEntries = {};\n _.forEach(entries, function (entry, i) {\n var tmp = (mappedEntries[entry.v] = {\n indegree: 0,\n in: [],\n out: [],\n vs: [entry.v],\n i: i,\n });\n if (!_.isUndefined(entry.barycenter)) {\n // @ts-expect-error\n tmp.barycenter = entry.barycenter;\n // @ts-expect-error\n tmp.weight = entry.weight;\n }\n });\n\n _.forEach(cg.edges(), function (e) {\n var entryV = mappedEntries[e.v];\n var entryW = mappedEntries[e.w];\n if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) {\n entryW.indegree++;\n entryV.out.push(mappedEntries[e.w]);\n }\n });\n\n var sourceSet = _.filter(mappedEntries, function (entry) {\n // @ts-expect-error\n return !entry.indegree;\n });\n\n return doResolveConflicts(sourceSet);\n}\n\nfunction doResolveConflicts(sourceSet) {\n var entries = [];\n\n function handleIn(vEntry) {\n return function (uEntry) {\n if (uEntry.merged) {\n return;\n }\n if (\n _.isUndefined(uEntry.barycenter) ||\n _.isUndefined(vEntry.barycenter) ||\n uEntry.barycenter >= vEntry.barycenter\n ) {\n mergeEntries(vEntry, uEntry);\n }\n };\n }\n\n function handleOut(vEntry) {\n return function (wEntry) {\n wEntry['in'].push(vEntry);\n if (--wEntry.indegree === 0) {\n sourceSet.push(wEntry);\n }\n };\n }\n\n while (sourceSet.length) {\n var entry = sourceSet.pop();\n entries.push(entry);\n _.forEach(entry['in'].reverse(), handleIn(entry));\n _.forEach(entry.out, handleOut(entry));\n }\n\n return _.map(\n _.filter(entries, function (entry) {\n return !entry.merged;\n }),\n function (entry) {\n return _.pick(entry, ['vs', 'i', 'barycenter', 'weight']);\n }\n );\n}\n\nfunction mergeEntries(target, source) {\n var sum = 0;\n var weight = 0;\n\n if (target.weight) {\n sum += target.barycenter * target.weight;\n weight += target.weight;\n }\n\n if (source.weight) {\n sum += source.barycenter * source.weight;\n weight += source.weight;\n }\n\n target.vs = source.vs.concat(target.vs);\n target.barycenter = sum / weight;\n target.weight = weight;\n target.i = Math.min(source.i, target.i);\n source.merged = true;\n}\n", "import * as _ from 'lodash-es';\nimport * as util from '../util.js';\n\nexport { sort };\n\nfunction sort(entries, biasRight) {\n var parts = util.partition(entries, function (entry) {\n return _.has(entry, 'barycenter');\n });\n var sortable = parts.lhs,\n unsortable = _.sortBy(parts.rhs, function (entry) {\n return -entry.i;\n }),\n vs = [],\n sum = 0,\n weight = 0,\n vsIndex = 0;\n\n sortable.sort(compareWithBias(!!biasRight));\n\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n\n _.forEach(sortable, function (entry) {\n vsIndex += entry.vs.length;\n vs.push(entry.vs);\n sum += entry.barycenter * entry.weight;\n weight += entry.weight;\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n });\n\n var result = { vs: _.flatten(vs) };\n if (weight) {\n result.barycenter = sum / weight;\n result.weight = weight;\n }\n return result;\n}\n\nfunction consumeUnsortable(vs, unsortable, index) {\n var last;\n while (unsortable.length && (last = _.last(unsortable)).i <= index) {\n unsortable.pop();\n vs.push(last.vs);\n index++;\n }\n return index;\n}\n\nfunction compareWithBias(bias) {\n return function (entryV, entryW) {\n if (entryV.barycenter < entryW.barycenter) {\n return -1;\n } else if (entryV.barycenter > entryW.barycenter) {\n return 1;\n }\n\n return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;\n };\n}\n", "import * as _ from 'lodash-es';\nimport { barycenter } from './barycenter.js';\nimport { resolveConflicts } from './resolve-conflicts.js';\nimport { sort } from './sort.js';\n\nexport { sortSubgraph };\n\nfunction sortSubgraph(g, v, cg, biasRight) {\n var movable = g.children(v);\n var node = g.node(v);\n var bl = node ? node.borderLeft : undefined;\n var br = node ? node.borderRight : undefined;\n var subgraphs = {};\n\n if (bl) {\n movable = _.filter(movable, function (w) {\n return w !== bl && w !== br;\n });\n }\n\n var barycenters = barycenter(g, movable);\n _.forEach(barycenters, function (entry) {\n if (g.children(entry.v).length) {\n var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);\n subgraphs[entry.v] = subgraphResult;\n if (_.has(subgraphResult, 'barycenter')) {\n mergeBarycenters(entry, subgraphResult);\n }\n }\n });\n\n var entries = resolveConflicts(barycenters, cg);\n expandSubgraphs(entries, subgraphs);\n\n var result = sort(entries, biasRight);\n\n if (bl) {\n result.vs = _.flatten([bl, result.vs, br]);\n if (g.predecessors(bl).length) {\n var blPred = g.node(g.predecessors(bl)[0]),\n brPred = g.node(g.predecessors(br)[0]);\n if (!_.has(result, 'barycenter')) {\n result.barycenter = 0;\n result.weight = 0;\n }\n result.barycenter =\n (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2);\n result.weight += 2;\n }\n }\n\n return result;\n}\n\nfunction expandSubgraphs(entries, subgraphs) {\n _.forEach(entries, function (entry) {\n entry.vs = _.flatten(\n entry.vs.map(function (v) {\n if (subgraphs[v]) {\n return subgraphs[v].vs;\n }\n return v;\n })\n );\n });\n}\n\nfunction mergeBarycenters(target, other) {\n if (!_.isUndefined(target.barycenter)) {\n target.barycenter =\n (target.barycenter * target.weight + other.barycenter * other.weight) /\n (target.weight + other.weight);\n target.weight += other.weight;\n } else {\n target.barycenter = other.barycenter;\n target.weight = other.weight;\n }\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\nimport * as util from '../util.js';\nimport { addSubgraphConstraints } from './add-subgraph-constraints.js';\nimport { buildLayerGraph } from './build-layer-graph.js';\nimport { crossCount } from './cross-count.js';\nimport { initOrder } from './init-order.js';\nimport { sortSubgraph } from './sort-subgraph.js';\n\nexport { order };\n\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n * 1. Graph must be DAG\n * 2. Graph nodes must be objects with a \"rank\" attribute\n * 3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have an \"order\" attribute based on the results of the\n * algorithm.\n */\nfunction order(g) {\n var maxRank = util.maxRank(g),\n downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), 'inEdges'),\n upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), 'outEdges');\n\n var layering = initOrder(g);\n assignOrder(g, layering);\n\n var bestCC = Number.POSITIVE_INFINITY,\n best;\n\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);\n\n layering = util.buildLayerMatrix(g);\n var cc = crossCount(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = _.cloneDeep(layering);\n bestCC = cc;\n }\n }\n\n assignOrder(g, best);\n}\n\nfunction buildLayerGraphs(g, ranks, relationship) {\n return _.map(ranks, function (rank) {\n return buildLayerGraph(g, rank, relationship);\n });\n}\n\nfunction sweepLayerGraphs(layerGraphs, biasRight) {\n var cg = new Graph();\n _.forEach(layerGraphs, function (lg) {\n var root = lg.graph().root;\n var sorted = sortSubgraph(lg, root, cg, biasRight);\n _.forEach(sorted.vs, function (v, i) {\n lg.node(v).order = i;\n });\n addSubgraphConstraints(lg, cg, sorted.vs);\n });\n}\n\nfunction assignOrder(g, layering) {\n _.forEach(layering, function (layer) {\n _.forEach(layer, function (v, i) {\n g.node(v).order = i;\n });\n });\n}\n", "import * as _ from 'lodash-es';\n\nexport { parentDummyChains };\n\nfunction parentDummyChains(g) {\n var postorderNums = postorder(g);\n\n _.forEach(g.graph().dummyChains, function (v) {\n var node = g.node(v);\n var edgeObj = node.edgeObj;\n var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);\n var path = pathData.path;\n var lca = pathData.lca;\n var pathIdx = 0;\n var pathV = path[pathIdx];\n var ascending = true;\n\n while (v !== edgeObj.w) {\n node = g.node(v);\n\n if (ascending) {\n while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) {\n pathIdx++;\n }\n\n if (pathV === lca) {\n ascending = false;\n }\n }\n\n if (!ascending) {\n while (\n pathIdx < path.length - 1 &&\n g.node((pathV = path[pathIdx + 1])).minRank <= node.rank\n ) {\n pathIdx++;\n }\n pathV = path[pathIdx];\n }\n\n g.setParent(v, pathV);\n v = g.successors(v)[0];\n }\n });\n}\n\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nfunction findPath(g, postorderNums, v, w) {\n var vPath = [];\n var wPath = [];\n var low = Math.min(postorderNums[v].low, postorderNums[w].low);\n var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);\n var parent;\n var lca;\n\n // Traverse up from v to find the LCA\n parent = v;\n do {\n parent = g.parent(parent);\n vPath.push(parent);\n } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim));\n lca = parent;\n\n // Traverse from w to LCA\n parent = w;\n while ((parent = g.parent(parent)) !== lca) {\n wPath.push(parent);\n }\n\n return { path: vPath.concat(wPath.reverse()), lca: lca };\n}\n\nfunction postorder(g) {\n var result = {};\n var lim = 0;\n\n function dfs(v) {\n var low = lim;\n _.forEach(g.children(v), dfs);\n result[v] = { low: low, lim: lim++ };\n }\n _.forEach(g.children(), dfs);\n\n return result;\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../../graphlib/index.js';\nimport * as util from '../util.js';\n\n/*\n * This module provides coordinate assignment based on Brandes and K\u00F6pf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\n\nexport {\n positionX,\n findType1Conflicts,\n findType2Conflicts,\n addConflict,\n hasConflict,\n verticalAlignment,\n horizontalCompaction,\n alignCoordinates,\n findSmallestWidthAlignment,\n balance,\n};\n\n/*\n * Marks all edges in the graph with a type-1 conflict with the \"type1Conflict\"\n * property. A type-1 conflict is one where a non-inner segment crosses an\n * inner segment. An inner segment is an edge with both incident nodes marked\n * with the \"dummy\" property.\n *\n * This algorithm scans layer by layer, starting with the second, for type-1\n * conflicts between the current layer and the previous layer. For each layer\n * it scans the nodes from left to right until it reaches one that is incident\n * on an inner segment. It then scans predecessors to determine if they have\n * edges that cross that inner segment. At the end a final scan is done for all\n * nodes on the current rank to see if they cross the last visited inner\n * segment.\n *\n * This algorithm (safely) assumes that a dummy node will only be incident on a\n * single node in the layers being scanned.\n */\nfunction findType1Conflicts(g, layering) {\n var conflicts = {};\n\n function visitLayer(prevLayer, layer) {\n var // last visited node in the previous layer that is incident on an inner\n // segment.\n k0 = 0,\n // Tracks the last node in this layer scanned for crossings with a type-1\n // segment.\n scanPos = 0,\n prevLayerLength = prevLayer.length,\n lastNode = _.last(layer);\n\n _.forEach(layer, function (v, i) {\n var w = findOtherInnerSegmentNode(g, v),\n k1 = w ? g.node(w).order : prevLayerLength;\n\n if (w || v === lastNode) {\n _.forEach(layer.slice(scanPos, i + 1), function (scanNode) {\n _.forEach(g.predecessors(scanNode), function (u) {\n var uLabel = g.node(u),\n uPos = uLabel.order;\n if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) {\n addConflict(conflicts, u, scanNode);\n }\n });\n });\n // @ts-expect-error\n scanPos = i + 1;\n k0 = k1;\n }\n });\n\n return layer;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findType2Conflicts(g, layering) {\n var conflicts = {};\n\n function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n var v;\n _.forEach(_.range(southPos, southEnd), function (i) {\n v = south[i];\n if (g.node(v).dummy) {\n _.forEach(g.predecessors(v), function (u) {\n var uNode = g.node(u);\n if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {\n addConflict(conflicts, u, v);\n }\n });\n }\n });\n }\n\n function visitLayer(north, south) {\n var prevNorthPos = -1,\n nextNorthPos,\n southPos = 0;\n\n _.forEach(south, function (v, southLookahead) {\n if (g.node(v).dummy === 'border') {\n var predecessors = g.predecessors(v);\n if (predecessors.length) {\n nextNorthPos = g.node(predecessors[0]).order;\n scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);\n // @ts-expect-error\n southPos = southLookahead;\n prevNorthPos = nextNorthPos;\n }\n }\n scan(south, southPos, south.length, nextNorthPos, north.length);\n });\n\n return south;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findOtherInnerSegmentNode(g, v) {\n if (g.node(v).dummy) {\n return _.find(g.predecessors(v), function (u) {\n return g.node(u).dummy;\n });\n }\n}\n\nfunction addConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n var conflictsV = conflicts[v];\n if (!conflictsV) {\n conflicts[v] = conflictsV = {};\n }\n conflictsV[w] = true;\n}\n\nfunction hasConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return _.has(conflicts[v], w);\n}\n\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nfunction verticalAlignment(g, layering, conflicts, neighborFn) {\n var root = {},\n align = {},\n pos = {};\n\n // We cache the position here based on the layering because the graph and\n // layering may be out of sync. The layering matrix is manipulated to\n // generate different extreme alignments.\n _.forEach(layering, function (layer) {\n _.forEach(layer, function (v, order) {\n root[v] = v;\n align[v] = v;\n pos[v] = order;\n });\n });\n\n _.forEach(layering, function (layer) {\n var prevIdx = -1;\n _.forEach(layer, function (v) {\n var ws = neighborFn(v);\n if (ws.length) {\n ws = _.sortBy(ws, function (w) {\n return pos[w];\n });\n var mp = (ws.length - 1) / 2;\n for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n var w = ws[i];\n if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) {\n align[w] = v;\n align[v] = root[v] = root[w];\n prevIdx = pos[w];\n }\n }\n }\n });\n });\n\n return { root: root, align: align };\n}\n\nfunction horizontalCompaction(g, layering, root, align, reverseSep) {\n // This portion of the algorithm differs from BK due to a number of problems.\n // Instead of their algorithm we construct a new block graph and do two\n // sweeps. The first sweep places blocks with the smallest possible\n // coordinates. The second sweep removes unused space by moving blocks to the\n // greatest coordinates without violating separation.\n var xs = {},\n blockG = buildBlockGraph(g, layering, root, reverseSep),\n borderType = reverseSep ? 'borderLeft' : 'borderRight';\n\n function iterate(setXsFunc, nextNodesFunc) {\n var stack = blockG.nodes();\n var elem = stack.pop();\n var visited = {};\n while (elem) {\n if (visited[elem]) {\n setXsFunc(elem);\n } else {\n visited[elem] = true;\n stack.push(elem);\n stack = stack.concat(nextNodesFunc(elem));\n }\n\n elem = stack.pop();\n }\n }\n\n // First pass, assign smallest coordinates\n function pass1(elem) {\n xs[elem] = blockG.inEdges(elem).reduce(function (acc, e) {\n return Math.max(acc, xs[e.v] + blockG.edge(e));\n }, 0);\n }\n\n // Second pass, assign greatest coordinates\n function pass2(elem) {\n var min = blockG.outEdges(elem).reduce(function (acc, e) {\n return Math.min(acc, xs[e.w] - blockG.edge(e));\n }, Number.POSITIVE_INFINITY);\n\n var node = g.node(elem);\n if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n xs[elem] = Math.max(xs[elem], min);\n }\n }\n\n iterate(pass1, blockG.predecessors.bind(blockG));\n iterate(pass2, blockG.successors.bind(blockG));\n\n // Assign x coordinates to all nodes\n _.forEach(align, function (v) {\n xs[v] = xs[root[v]];\n });\n\n return xs;\n}\n\nfunction buildBlockGraph(g, layering, root, reverseSep) {\n var blockGraph = new Graph(),\n graphLabel = g.graph(),\n sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n\n _.forEach(layering, function (layer) {\n var u;\n _.forEach(layer, function (v) {\n var vRoot = root[v];\n blockGraph.setNode(vRoot);\n if (u) {\n var uRoot = root[u],\n prevMax = blockGraph.edge(uRoot, vRoot);\n blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n }\n u = v;\n });\n });\n\n return blockGraph;\n}\n\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nfunction findSmallestWidthAlignment(g, xss) {\n return _.minBy(_.values(xss), function (xs) {\n var max = Number.NEGATIVE_INFINITY;\n var min = Number.POSITIVE_INFINITY;\n\n _.forIn(xs, function (x, v) {\n var halfWidth = width(g, v) / 2;\n\n max = Math.max(x + halfWidth, max);\n min = Math.min(x - halfWidth, min);\n });\n\n return max - min;\n });\n}\n\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n var alignToVals = _.values(alignTo),\n alignToMin = _.min(alignToVals),\n alignToMax = _.max(alignToVals);\n\n _.forEach(['u', 'd'], function (vert) {\n _.forEach(['l', 'r'], function (horiz) {\n var alignment = vert + horiz,\n xs = xss[alignment],\n delta;\n if (xs === alignTo) return;\n\n var xsVals = _.values(xs);\n delta = horiz === 'l' ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);\n\n if (delta) {\n xss[alignment] = _.mapValues(xs, function (x) {\n return x + delta;\n });\n }\n });\n });\n}\n\nfunction balance(xss, align) {\n return _.mapValues(xss.ul, function (ignore, v) {\n if (align) {\n return xss[align.toLowerCase()][v];\n } else {\n var xs = _.sortBy(_.map(xss, v));\n return (xs[1] + xs[2]) / 2;\n }\n });\n}\n\nfunction positionX(g) {\n var layering = util.buildLayerMatrix(g);\n var conflicts = _.merge(findType1Conflicts(g, layering), findType2Conflicts(g, layering));\n\n var xss = {};\n var adjustedLayering;\n _.forEach(['u', 'd'], function (vert) {\n adjustedLayering = vert === 'u' ? layering : _.values(layering).reverse();\n _.forEach(['l', 'r'], function (horiz) {\n if (horiz === 'r') {\n adjustedLayering = _.map(adjustedLayering, function (inner) {\n return _.values(inner).reverse();\n });\n }\n\n var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g);\n var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);\n var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === 'r');\n if (horiz === 'r') {\n xs = _.mapValues(xs, function (x) {\n return -x;\n });\n }\n xss[vert + horiz] = xs;\n });\n });\n\n var smallestWidth = findSmallestWidthAlignment(g, xss);\n alignCoordinates(xss, smallestWidth);\n return balance(xss, g.graph().align);\n}\n\nfunction sep(nodeSep, edgeSep, reverseSep) {\n return function (g, v, w) {\n var vLabel = g.node(v);\n var wLabel = g.node(w);\n var sum = 0;\n var delta;\n\n sum += vLabel.width / 2;\n if (_.has(vLabel, 'labelpos')) {\n switch (vLabel.labelpos.toLowerCase()) {\n case 'l':\n delta = -vLabel.width / 2;\n break;\n case 'r':\n delta = vLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n\n sum += wLabel.width / 2;\n if (_.has(wLabel, 'labelpos')) {\n switch (wLabel.labelpos.toLowerCase()) {\n case 'l':\n delta = wLabel.width / 2;\n break;\n case 'r':\n delta = -wLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n return sum;\n };\n}\n\nfunction width(g, v) {\n return g.node(v).width;\n}\n", "import * as _ from 'lodash-es';\nimport * as util from '../util.js';\nimport { positionX } from './bk.js';\n\nexport { position };\n\nfunction position(g) {\n g = util.asNonCompoundGraph(g);\n\n positionY(g);\n _.forOwn(positionX(g), function (x, v) {\n g.node(v).x = x;\n });\n}\n\nfunction positionY(g) {\n var layering = util.buildLayerMatrix(g);\n var rankSep = g.graph().ranksep;\n var prevY = 0;\n _.forEach(layering, function (layer) {\n var maxHeight = _.max(\n _.map(layer, function (v) {\n return g.node(v).height;\n })\n );\n _.forEach(layer, function (v) {\n g.node(v).y = prevY + maxHeight / 2;\n });\n prevY += maxHeight + rankSep;\n });\n}\n", "import * as _ from 'lodash-es';\nimport { Graph } from '../graphlib/index.js';\nimport { addBorderSegments } from './add-border-segments.js';\nimport * as coordinateSystem from './coordinate-system.js';\nimport * as acyclic from './acyclic.js';\nimport * as normalize from './normalize.js';\nimport { rank } from './rank/index.js';\nimport * as nestingGraph from './nesting-graph.js';\nimport { order } from './order/index.js';\nimport { parentDummyChains } from './parent-dummy-chains.js';\nimport { position } from './position/index.js';\nimport * as util from './util.js';\n\nexport { layout };\n\nfunction layout(g, opts) {\n var time = opts && opts.debugTiming ? util.time : util.notime;\n time('layout', function () {\n var layoutGraph = time(' buildLayoutGraph', function () {\n return buildLayoutGraph(g);\n });\n time(' runLayout', function () {\n runLayout(layoutGraph, time);\n });\n time(' updateInputGraph', function () {\n updateInputGraph(g, layoutGraph);\n });\n });\n}\n\nfunction runLayout(g, time) {\n time(' makeSpaceForEdgeLabels', function () {\n makeSpaceForEdgeLabels(g);\n });\n time(' removeSelfEdges', function () {\n removeSelfEdges(g);\n });\n time(' acyclic', function () {\n acyclic.run(g);\n });\n time(' nestingGraph.run', function () {\n nestingGraph.run(g);\n });\n time(' rank', function () {\n rank(util.asNonCompoundGraph(g));\n });\n time(' injectEdgeLabelProxies', function () {\n injectEdgeLabelProxies(g);\n });\n time(' removeEmptyRanks', function () {\n util.removeEmptyRanks(g);\n });\n time(' nestingGraph.cleanup', function () {\n nestingGraph.cleanup(g);\n });\n time(' normalizeRanks', function () {\n util.normalizeRanks(g);\n });\n time(' assignRankMinMax', function () {\n assignRankMinMax(g);\n });\n time(' removeEdgeLabelProxies', function () {\n removeEdgeLabelProxies(g);\n });\n time(' normalize.run', function () {\n normalize.run(g);\n });\n time(' parentDummyChains', function () {\n parentDummyChains(g);\n });\n time(' addBorderSegments', function () {\n addBorderSegments(g);\n });\n time(' order', function () {\n order(g);\n });\n time(' insertSelfEdges', function () {\n insertSelfEdges(g);\n });\n time(' adjustCoordinateSystem', function () {\n coordinateSystem.adjust(g);\n });\n time(' position', function () {\n position(g);\n });\n time(' positionSelfEdges', function () {\n positionSelfEdges(g);\n });\n time(' removeBorderNodes', function () {\n removeBorderNodes(g);\n });\n time(' normalize.undo', function () {\n normalize.undo(g);\n });\n time(' fixupEdgeLabelCoords', function () {\n fixupEdgeLabelCoords(g);\n });\n time(' undoCoordinateSystem', function () {\n coordinateSystem.undo(g);\n });\n time(' translateGraph', function () {\n translateGraph(g);\n });\n time(' assignNodeIntersects', function () {\n assignNodeIntersects(g);\n });\n time(' reversePoints', function () {\n reversePointsForReversedEdges(g);\n });\n time(' acyclic.undo', function () {\n acyclic.undo(g);\n });\n}\n\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction updateInputGraph(inputGraph, layoutGraph) {\n _.forEach(inputGraph.nodes(), function (v) {\n var inputLabel = inputGraph.node(v);\n var layoutLabel = layoutGraph.node(v);\n\n if (inputLabel) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n\n if (layoutGraph.children(v).length) {\n inputLabel.width = layoutLabel.width;\n inputLabel.height = layoutLabel.height;\n }\n }\n });\n\n _.forEach(inputGraph.edges(), function (e) {\n var inputLabel = inputGraph.edge(e);\n var layoutLabel = layoutGraph.edge(e);\n\n inputLabel.points = layoutLabel.points;\n if (_.has(layoutLabel, 'x')) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n }\n });\n\n inputGraph.graph().width = layoutGraph.graph().width;\n inputGraph.graph().height = layoutGraph.graph().height;\n}\n\nvar graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy'];\nvar graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' };\nvar graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align'];\nvar nodeNumAttrs = ['width', 'height'];\nvar nodeDefaults = { width: 0, height: 0 };\nvar edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset'];\nvar edgeDefaults = {\n minlen: 1,\n weight: 1,\n width: 0,\n height: 0,\n labeloffset: 10,\n labelpos: 'r',\n};\nvar edgeAttrs = ['labelpos'];\n\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */\nfunction buildLayoutGraph(inputGraph) {\n var g = new Graph({ multigraph: true, compound: true });\n var graph = canonicalize(inputGraph.graph());\n\n g.setGraph(\n _.merge({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), _.pick(graph, graphAttrs))\n );\n\n _.forEach(inputGraph.nodes(), function (v) {\n var node = canonicalize(inputGraph.node(v));\n g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));\n g.setParent(v, inputGraph.parent(v));\n });\n\n _.forEach(inputGraph.edges(), function (e) {\n var edge = canonicalize(inputGraph.edge(e));\n g.setEdge(\n e,\n _.merge({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), _.pick(edge, edgeAttrs))\n );\n });\n\n return g;\n}\n\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */\nfunction makeSpaceForEdgeLabels(g) {\n var graph = g.graph();\n graph.ranksep /= 2;\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n edge.minlen *= 2;\n if (edge.labelpos.toLowerCase() !== 'c') {\n if (graph.rankdir === 'TB' || graph.rankdir === 'BT') {\n edge.width += edge.labeloffset;\n } else {\n edge.height += edge.labeloffset;\n }\n }\n });\n}\n\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */\nfunction injectEdgeLabelProxies(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (edge.width && edge.height) {\n var v = g.node(e.v);\n var w = g.node(e.w);\n var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };\n util.addDummyNode(g, 'edge-proxy', label, '_ep');\n }\n });\n}\n\nfunction assignRankMinMax(g) {\n var maxRank = 0;\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (node.borderTop) {\n node.minRank = g.node(node.borderTop).rank;\n node.maxRank = g.node(node.borderBottom).rank;\n // @ts-expect-error\n maxRank = _.max(maxRank, node.maxRank);\n }\n });\n g.graph().maxRank = maxRank;\n}\n\nfunction removeEdgeLabelProxies(g) {\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (node.dummy === 'edge-proxy') {\n g.edge(node.e).labelRank = node.rank;\n g.removeNode(v);\n }\n });\n}\n\nfunction translateGraph(g) {\n var minX = Number.POSITIVE_INFINITY;\n var maxX = 0;\n var minY = Number.POSITIVE_INFINITY;\n var maxY = 0;\n var graphLabel = g.graph();\n var marginX = graphLabel.marginx || 0;\n var marginY = graphLabel.marginy || 0;\n\n function getExtremes(attrs) {\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n minX = Math.min(minX, x - w / 2);\n maxX = Math.max(maxX, x + w / 2);\n minY = Math.min(minY, y - h / 2);\n maxY = Math.max(maxY, y + h / 2);\n }\n\n _.forEach(g.nodes(), function (v) {\n getExtremes(g.node(v));\n });\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (_.has(edge, 'x')) {\n getExtremes(edge);\n }\n });\n\n minX -= marginX;\n minY -= marginY;\n\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n node.x -= minX;\n node.y -= minY;\n });\n\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n _.forEach(edge.points, function (p) {\n p.x -= minX;\n p.y -= minY;\n });\n if (_.has(edge, 'x')) {\n edge.x -= minX;\n }\n if (_.has(edge, 'y')) {\n edge.y -= minY;\n }\n });\n\n graphLabel.width = maxX - minX + marginX;\n graphLabel.height = maxY - minY + marginY;\n}\n\nfunction assignNodeIntersects(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n var nodeV = g.node(e.v);\n var nodeW = g.node(e.w);\n var p1, p2;\n if (!edge.points) {\n edge.points = [];\n p1 = nodeW;\n p2 = nodeV;\n } else {\n p1 = edge.points[0];\n p2 = edge.points[edge.points.length - 1];\n }\n edge.points.unshift(util.intersectRect(nodeV, p1));\n edge.points.push(util.intersectRect(nodeW, p2));\n });\n}\n\nfunction fixupEdgeLabelCoords(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (_.has(edge, 'x')) {\n if (edge.labelpos === 'l' || edge.labelpos === 'r') {\n edge.width -= edge.labeloffset;\n }\n switch (edge.labelpos) {\n case 'l':\n edge.x -= edge.width / 2 + edge.labeloffset;\n break;\n case 'r':\n edge.x += edge.width / 2 + edge.labeloffset;\n break;\n }\n }\n });\n}\n\nfunction reversePointsForReversedEdges(g) {\n _.forEach(g.edges(), function (e) {\n var edge = g.edge(e);\n if (edge.reversed) {\n edge.points.reverse();\n }\n });\n}\n\nfunction removeBorderNodes(g) {\n _.forEach(g.nodes(), function (v) {\n if (g.children(v).length) {\n var node = g.node(v);\n var t = g.node(node.borderTop);\n var b = g.node(node.borderBottom);\n var l = g.node(_.last(node.borderLeft));\n var r = g.node(_.last(node.borderRight));\n\n node.width = Math.abs(r.x - l.x);\n node.height = Math.abs(b.y - t.y);\n node.x = l.x + node.width / 2;\n node.y = t.y + node.height / 2;\n }\n });\n\n _.forEach(g.nodes(), function (v) {\n if (g.node(v).dummy === 'border') {\n g.removeNode(v);\n }\n });\n}\n\nfunction removeSelfEdges(g) {\n _.forEach(g.edges(), function (e) {\n if (e.v === e.w) {\n var node = g.node(e.v);\n if (!node.selfEdges) {\n node.selfEdges = [];\n }\n node.selfEdges.push({ e: e, label: g.edge(e) });\n g.removeEdge(e);\n }\n });\n}\n\nfunction insertSelfEdges(g) {\n var layers = util.buildLayerMatrix(g);\n _.forEach(layers, function (layer) {\n var orderShift = 0;\n _.forEach(layer, function (v, i) {\n var node = g.node(v);\n node.order = i + orderShift;\n _.forEach(node.selfEdges, function (selfEdge) {\n util.addDummyNode(\n g,\n 'selfedge',\n {\n width: selfEdge.label.width,\n height: selfEdge.label.height,\n rank: node.rank,\n order: i + ++orderShift,\n e: selfEdge.e,\n label: selfEdge.label,\n },\n '_se'\n );\n });\n delete node.selfEdges;\n });\n });\n}\n\nfunction positionSelfEdges(g) {\n _.forEach(g.nodes(), function (v) {\n var node = g.node(v);\n if (node.dummy === 'selfedge') {\n var selfNode = g.node(node.e.v);\n var x = selfNode.x + selfNode.width / 2;\n var y = selfNode.y;\n var dx = node.x - x;\n var dy = selfNode.height / 2;\n g.setEdge(node.e, node.label);\n g.removeNode(v);\n node.label.points = [\n { x: x + (2 * dx) / 3, y: y - dy },\n { x: x + (5 * dx) / 6, y: y - dy },\n { x: x + dx, y: y },\n { x: x + (5 * dx) / 6, y: y + dy },\n { x: x + (2 * dx) / 3, y: y + dy },\n ];\n node.label.x = node.x;\n node.label.y = node.y;\n }\n });\n}\n\nfunction selectNumberAttrs(obj, attrs) {\n return _.mapValues(_.pick(obj, attrs), Number);\n}\n\nfunction canonicalize(attrs) {\n var newAttrs = {};\n _.forEach(attrs, function (v, k) {\n newAttrs[k.toLowerCase()] = v;\n });\n return newAttrs;\n}\n", "import * as acyclic from './acyclic.js';\nimport { layout } from './layout.js';\nimport * as normalize from './normalize.js';\nimport { rank } from './rank/index.js';\n\nexport { acyclic, normalize, rank, layout };\n", "import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n", "/** Decorates with functions required by mermaids dagre-wrapper. */\nimport { log } from '$root/logger.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\n\nexport let clusterDb = new Map();\nlet descendants = new Map();\nlet parents = new Map();\n\nexport const clear = () => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n};\n\nconst isDescendant = (id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace('In isDescendant', ancestorId, ' ', id, ' = ', ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info('Descendants of ', clusterId, ' is ', clusterDescendants);\n log.info('Edge is ', edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n\n if (!clusterDescendants) {\n log.debug('Tilt, ', clusterId, ',not in descendants');\n return false;\n }\n\n return (\n clusterDescendants.includes(edge.v) ||\n isDescendant(edge.v, clusterId) ||\n isDescendant(edge.w, clusterId) ||\n clusterDescendants.includes(edge.w)\n );\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\n\nexport const extractDescendants = (id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n\n return res;\n};\n\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (const edge of edges) {\n if (graph.children(edge.v).length > 0) {\n log.trace('The node ', edge.v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edge.w).length > 0) {\n log.trace('The node ', edge.w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\nconst findCommonEdges = (graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n\n return result;\n};\n\nexport const findNonClusterChild = (id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Descendants of XXX ', id, ': ', descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug('Not a cluster ', id, descendants);\n }\n });\n\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb.get(e.v),\n ' --- ',\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) && clusterDb.get(e.w) && clusterDb.get(e.v) === clusterDb.get(e.w)) {\n log.warn('Fixing and trying link to self - removing XXX', e.v, e.w, e.name);\n log.warn('Fixing and trying - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n const specialId1 = e.w + '---' + e.v + '---1';\n const specialId2 = e.w + '---' + e.v + '---2';\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n labelStyle: '',\n label: '',\n padding: 0,\n shape: 'labelRect',\n style: '',\n width: 10,\n height: 10,\n });\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n labelStyle: '',\n padding: 0,\n shape: 'labelRect',\n style: '',\n width: 10,\n height: 10,\n });\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = '';\n edge1.arrowTypeEnd = 'none';\n edge1.id = e.name + '-cyclic-special-1';\n edgeMid.arrowTypeEnd = 'none';\n edgeMid.id = e.name + '-cyclic-special-mid';\n edge2.label = '';\n edge1.fromCluster = e.v;\n edge2.toCluster = e.v;\n edge2.id = e.name + '-cyclic-special-2';\n graph.setEdge(v, specialId1, edge1, e.name + '-cyclic-special-0');\n graph.setEdge(specialId1, specialId2, edgeMid, e.name + '-cyclic-special-1');\n graph.setEdge(specialId2, w, edge2, e.name + '-cyclic-special-2');\n } else if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn('Fixing and trying - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlibJson.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n\n // Remove references to extracted cluster\n // graph.edges().forEach((edge) => {\n // if (isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlibJson.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n log.debug('Nodes = ', nodes, depth);\n for (const node of nodes) {\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug('Not a cluster', node, depth);\n } else if (\n !clusterDb.get(node).externalConnections &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn('Fixing dir', clusterDb.get(node).clusterData.dir, dir);\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlibJson.write(clusterGraph));\n log.debug('Old graph after copy', graphlibJson.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb.get(node).externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n", "import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport insertMarkers from '../../rendering-elements/markers.js';\nimport { updateNodeBounds } from '../../rendering-elements/shapes/util.js';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib.js';\nimport {\n insertNode,\n positionNode,\n clear as clearNodes,\n setNodeElem,\n} from '../../rendering-elements/nodes.js';\nimport { insertCluster, clear as clearClusters } from '../../rendering-elements/clusters.js';\nimport {\n insertEdgeLabel,\n positionEdgeLabel,\n insertEdge,\n clear as clearEdges,\n} from '../../rendering-elements/edges.js';\nimport { log } from '$root/logger.js';\nimport { getSubGraphTitleMargins } from '../../../utils/subGraphTitleMargins.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\n\nconst recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.info('Graph in recursive render: XXX', graphlibJson.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root');\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters');\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n await Promise.all(\n graph.nodes().map(async function (v) {\n const node = graph.node(v);\n if (parentCluster !== undefined) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.trace(\n 'Setting data for parent cluster XXX\\n Node.id = ',\n v,\n '\\n data=',\n data.height,\n '\\nParent cluster',\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified XBX', v, node.width, graph.node(v));\n\n // `node.graph.setGraph` applies the graph configurations such as nodeSpacing to subgraphs as without this the default values would be used\n // We override only the `ranksep` and `nodesep` configurations to allow for setting subgraph spacing while avoiding overriding other properties\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep,\n });\n\n // \"o\" will contain the full cluster not just the children\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n // node.height = o.diff;\n node.diff = o.diff || 0;\n log.info(\n 'New compound node after recursive render XAX',\n v,\n 'width',\n // node,\n node.width,\n 'height',\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recursively\n // Render as before\n log.info(\n 'Cluster - the non recursive path XBX',\n v,\n node.id,\n node,\n node.width,\n 'Graph:',\n graph\n );\n log.info(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n // insertCluster(clusters, graph.node(v));\n } else {\n log.trace('Node - the non recursive path XAX', v, node.id, node);\n await insertNode(nodes, graph.node(v), dir);\n }\n }\n })\n );\n\n const processEdges = async () => {\n const edgePromises = graph.edges().map(async function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info(\n 'Fix',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n\n await Promise.all(edgePromises);\n };\n\n await processEdges();\n\n log.info('Graph before layout:', JSON.stringify(graphlibJson.write(graph)));\n\n log.info('############################################# XXX');\n log.info('### Layout ### XXX');\n log.info('############################################# XXX');\n\n dagreLayout(graph);\n\n log.info('Graph after layout:', JSON.stringify(graphlibJson.write(graph)));\n // Move the nodes to the correct place\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function (v) {\n const node = graph.node(v);\n log.info(\n 'Position XBX => ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node?.clusterNode) {\n // Adjust for padding when on root level\n node.y += subGraphTitleTotalMargin;\n\n log.info(\n 'A tainted cluster node XBX1',\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n // A tainted cluster node\n if (graph.children(v).length > 0) {\n log.info(\n 'A pure cluster node XBX1',\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug('OffsetY', offsetY, 'labelHeight', labelHeight, 'halfPadding', halfPadding);\n await insertCluster(clusters, node);\n\n // A cluster in the non-recursive way\n clusterDb.get(node.id).node = node;\n } else {\n // Regular node\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n 'A regular node XBX1 - using the padding',\n node.id,\n 'parent',\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n 'offsetY',\n node.offsetY,\n 'parent',\n parent,\n parent?.offsetY,\n node\n );\n\n positionNode(node);\n }\n }\n })\n );\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n edge.points.forEach((point) => (point.y += subGraphTitleTotalMargin / 2));\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn('Returning from recursive render XAX', elem, diff);\n return { elem, diff };\n};\n\nexport const render = async (data4Layout, svg) => {\n const graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: data4Layout.direction,\n nodesep:\n data4Layout.config?.nodeSpacing ||\n data4Layout.config?.flowchart?.nodeSpacing ||\n data4Layout.nodeSpacing,\n ranksep:\n data4Layout.config?.rankSpacing ||\n data4Layout.config?.flowchart?.rankSpacing ||\n data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n const element = svg.select('g');\n insertMarkers(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n\n log.debug('Edges:', data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n });\n\n log.warn('Graph at first:', JSON.stringify(graphlibJson.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn('Graph after:', JSON.stringify(graphlibJson.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n undefined,\n siteConfig\n );\n};\n", "import type { SVG } from '$root/diagram-api/types.js';\nimport type { InternalHelpers } from '$root/internals.js';\nimport { internalHelpers } from '$root/internals.js';\nimport { log } from '$root/logger.js';\nimport type { LayoutData } from './types.js';\n\nexport interface RenderOptions {\n algorithm?: string;\n}\n\nexport interface LayoutAlgorithm {\n render(\n layoutData: LayoutData,\n svg: SVG,\n helpers: InternalHelpers,\n options?: RenderOptions\n ): Promise;\n}\n\nexport type LayoutLoader = () => Promise;\nexport interface LayoutLoaderDefinition {\n name: string;\n loader: LayoutLoader;\n algorithm?: string;\n}\n\nconst layoutAlgorithms: Record = {};\n\nexport const registerLayoutLoaders = (loaders: LayoutLoaderDefinition[]) => {\n for (const loader of loaders) {\n layoutAlgorithms[loader.name] = loader;\n }\n};\n\n// TODO: Should we load dagre without lazy loading?\nconst registerDefaultLayoutLoaders = () => {\n registerLayoutLoaders([\n {\n name: 'dagre',\n loader: async () => await import('./layout-algorithms/dagre/index.js'),\n },\n ]);\n};\n\nregisterDefaultLayoutLoaders();\n\nexport const render = async (data4Layout: LayoutData, svg: SVG) => {\n if (!(data4Layout.layoutAlgorithm in layoutAlgorithms)) {\n throw new Error(`Unknown layout algorithm: ${data4Layout.layoutAlgorithm}`);\n }\n\n const layoutDefinition = layoutAlgorithms[data4Layout.layoutAlgorithm];\n const layoutRenderer = await layoutDefinition.loader();\n return layoutRenderer.render(data4Layout, svg, internalHelpers, {\n algorithm: layoutDefinition.algorithm,\n });\n};\n\n/**\n * Get the registered layout algorithm. If the algorithm is not registered, use the fallback algorithm.\n */\nexport const getRegisteredLayoutAlgorithm = (algorithm = '', { fallback = 'dagre' } = {}) => {\n if (algorithm in layoutAlgorithms) {\n return algorithm;\n }\n if (fallback in layoutAlgorithms) {\n log.warn(`Layout algorithm ${algorithm} is not registered. Using ${fallback} as fallback.`);\n return fallback;\n }\n throw new Error(`Both layout algorithms ${algorithm} and ${fallback} are not registered.`);\n};\n", "import { configureSvgSize } from '$root/setupGraphViewbox.js';\nimport type { SVG } from '$root/diagram-api/types.js';\nimport { log } from '$root/logger.js';\n\nexport const setupViewPortForSVG = (\n svg: SVG,\n padding: number,\n cssDiagram: string,\n useMaxWidth: boolean\n) => {\n // Initialize the SVG element and set the diagram class\n svg.attr('class', cssDiagram);\n\n // Calculate the dimensions and position with padding\n const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);\n\n // Configure the size and aspect ratio of the SVG\n configureSvgSize(svg, height, width, useMaxWidth);\n\n // Update the viewBox to ensure all content is visible with padding\n const viewBox = createViewBox(x, y, width, height, padding);\n svg.attr('viewBox', viewBox);\n\n // Log the viewBox configuration for debugging\n log.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);\n};\n\nconst calculateDimensionsWithPadding = (svg: SVG, padding: number) => {\n const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };\n return {\n width: bounds.width + padding * 2,\n height: bounds.height + padding * 2,\n x: bounds.x,\n y: bounds.y,\n };\n};\n\nconst createViewBox = (x: number, y: number, width: number, height: number, padding: number) => {\n return `${x - padding} ${y - padding} ${width} ${height}`;\n};\n", "import { select } from 'd3';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramStyleClassDef } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { getDiagramElement } from '../../rendering-util/insertElementsForSize.js';\nimport { getRegisteredLayoutAlgorithm, render } from '../../rendering-util/render.js';\nimport { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';\nimport type { LayoutData } from '../../rendering-util/types.js';\nimport utils from '../../utils.js';\nimport { getDirection } from './flowDb.js';\n\nexport const getClasses = function (\n text: string,\n diagramObj: any\n): Map {\n return diagramObj.db.getClasses();\n};\n\nexport const draw = async function (text: string, id: string, _version: string, diag: any) {\n log.info('REF0:');\n log.info('Drawing state diagram (v2)', id);\n const { securityLevel, flowchart: conf, layout } = getConfig();\n\n // Handle root and document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n\n // @ts-ignore - document is always available\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // The getData method provided in all supported diagrams is used to extract the data from the parsed structure\n // into the Layout data format\n log.debug('Before getData: ');\n const data4Layout = diag.db.getData() as LayoutData;\n log.debug('Data: ', data4Layout);\n // Create the root SVG\n const svg = getDiagramElement(id, securityLevel);\n const direction = getDirection();\n\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);\n if (data4Layout.layoutAlgorithm === 'dagre' && layout === 'elk') {\n log.warn(\n 'flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.'\n );\n }\n data4Layout.direction = direction;\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = ['point', 'circle', 'cross'];\n\n data4Layout.diagramId = id;\n log.debug('REF1:', data4Layout);\n await render(data4Layout, svg);\n const padding = data4Layout.config.flowchart?.diagramPadding ?? 8;\n utils.insertTitle(\n svg,\n 'flowchartTitleText',\n conf?.titleTopMargin || 0,\n diag.db.getDiagramTitle()\n );\n setupViewPortForSVG(svg, padding, 'flowchart', conf?.useMaxWidth || false);\n\n // If node has a link, wrap it in an anchor SVG object.\n for (const vertex of data4Layout.nodes) {\n const node = select(`#${id} [id=\"${vertex.id}\"]`);\n if (!node || !vertex.link) {\n continue;\n }\n const link = doc.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.cssClasses);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n if (securityLevel === 'sandbox') {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', '_top');\n } else if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n const linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function () {\n return label.node();\n });\n }\n }\n};\n\nexport default {\n getClasses,\n draw,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],$V4=[2,2],$V5=[1,13],$V6=[1,14],$V7=[1,15],$V8=[1,16],$V9=[1,23],$Va=[1,25],$Vb=[1,26],$Vc=[1,27],$Vd=[1,49],$Ve=[1,48],$Vf=[1,29],$Vg=[1,30],$Vh=[1,31],$Vi=[1,32],$Vj=[1,33],$Vk=[1,44],$Vl=[1,46],$Vm=[1,42],$Vn=[1,47],$Vo=[1,43],$Vp=[1,50],$Vq=[1,45],$Vr=[1,51],$Vs=[1,52],$Vt=[1,34],$Vu=[1,35],$Vv=[1,36],$Vw=[1,37],$Vx=[1,57],$Vy=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],$Vz=[1,61],$VA=[1,60],$VB=[1,62],$VC=[8,9,11,73,75],$VD=[1,88],$VE=[1,93],$VF=[1,92],$VG=[1,89],$VH=[1,85],$VI=[1,91],$VJ=[1,87],$VK=[1,94],$VL=[1,90],$VM=[1,95],$VN=[1,86],$VO=[8,9,10,11,73,75],$VP=[8,9,10,11,44,73,75],$VQ=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],$VR=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],$VS=[42,58,86,99,102,103,106,108,111,112,113],$VT=[1,121],$VU=[1,120],$VV=[1,128],$VW=[1,142],$VX=[1,143],$VY=[1,144],$VZ=[1,145],$V_=[1,130],$V$=[1,132],$V01=[1,136],$V11=[1,137],$V21=[1,138],$V31=[1,139],$V41=[1,140],$V51=[1,141],$V61=[1,146],$V71=[1,147],$V81=[1,126],$V91=[1,127],$Va1=[1,134],$Vb1=[1,129],$Vc1=[1,133],$Vd1=[1,131],$Ve1=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],$Vf1=[1,149],$Vg1=[8,9,11],$Vh1=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],$Vi1=[1,169],$Vj1=[1,165],$Vk1=[1,166],$Vl1=[1,170],$Vm1=[1,167],$Vn1=[1,168],$Vo1=[75,113,116],$Vp1=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],$Vq1=[10,103],$Vr1=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],$Vs1=[1,235],$Vt1=[1,233],$Vu1=[1,237],$Vv1=[1,231],$Vw1=[1,232],$Vx1=[1,234],$Vy1=[1,236],$Vz1=[1,238],$VA1=[1,255],$VB1=[8,9,11,103],$VC1=[8,9,10,11,58,81,102,103,106,107,108,109];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"graphConfig\":4,\"document\":5,\"line\":6,\"statement\":7,\"SEMI\":8,\"NEWLINE\":9,\"SPACE\":10,\"EOF\":11,\"GRAPH\":12,\"NODIR\":13,\"DIR\":14,\"FirstStmtSeparator\":15,\"ending\":16,\"endToken\":17,\"spaceList\":18,\"spaceListNewline\":19,\"vertexStatement\":20,\"separator\":21,\"styleStatement\":22,\"linkStyleStatement\":23,\"classDefStatement\":24,\"classStatement\":25,\"clickStatement\":26,\"subgraph\":27,\"textNoTags\":28,\"SQS\":29,\"text\":30,\"SQE\":31,\"end\":32,\"direction\":33,\"acc_title\":34,\"acc_title_value\":35,\"acc_descr\":36,\"acc_descr_value\":37,\"acc_descr_multiline_value\":38,\"link\":39,\"node\":40,\"styledVertex\":41,\"AMP\":42,\"vertex\":43,\"STYLE_SEPARATOR\":44,\"idString\":45,\"DOUBLECIRCLESTART\":46,\"DOUBLECIRCLEEND\":47,\"PS\":48,\"PE\":49,\"(-\":50,\"-)\":51,\"STADIUMSTART\":52,\"STADIUMEND\":53,\"SUBROUTINESTART\":54,\"SUBROUTINEEND\":55,\"VERTEX_WITH_PROPS_START\":56,\"NODE_STRING[field]\":57,\"COLON\":58,\"NODE_STRING[value]\":59,\"PIPE\":60,\"CYLINDERSTART\":61,\"CYLINDEREND\":62,\"DIAMOND_START\":63,\"DIAMOND_STOP\":64,\"TAGEND\":65,\"TRAPSTART\":66,\"TRAPEND\":67,\"INVTRAPSTART\":68,\"INVTRAPEND\":69,\"linkStatement\":70,\"arrowText\":71,\"TESTSTR\":72,\"START_LINK\":73,\"edgeText\":74,\"LINK\":75,\"edgeTextToken\":76,\"STR\":77,\"MD_STR\":78,\"textToken\":79,\"keywords\":80,\"STYLE\":81,\"LINKSTYLE\":82,\"CLASSDEF\":83,\"CLASS\":84,\"CLICK\":85,\"DOWN\":86,\"UP\":87,\"textNoTagsToken\":88,\"stylesOpt\":89,\"idString[vertex]\":90,\"idString[class]\":91,\"CALLBACKNAME\":92,\"CALLBACKARGS\":93,\"HREF\":94,\"LINK_TARGET\":95,\"STR[link]\":96,\"STR[tooltip]\":97,\"alphaNum\":98,\"DEFAULT\":99,\"numList\":100,\"INTERPOLATE\":101,\"NUM\":102,\"COMMA\":103,\"style\":104,\"styleComponent\":105,\"NODE_STRING\":106,\"UNIT\":107,\"BRKT\":108,\"PCT\":109,\"idStringToken\":110,\"MINUS\":111,\"MULT\":112,\"UNICODE_TEXT\":113,\"TEXT\":114,\"TAGSTART\":115,\"EDGE_TEXT\":116,\"alphaNumToken\":117,\"direction_tb\":118,\"direction_bt\":119,\"direction_rl\":120,\"direction_lr\":121,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",8:\"SEMI\",9:\"NEWLINE\",10:\"SPACE\",11:\"EOF\",12:\"GRAPH\",13:\"NODIR\",14:\"DIR\",27:\"subgraph\",29:\"SQS\",31:\"SQE\",32:\"end\",34:\"acc_title\",35:\"acc_title_value\",36:\"acc_descr\",37:\"acc_descr_value\",38:\"acc_descr_multiline_value\",42:\"AMP\",44:\"STYLE_SEPARATOR\",46:\"DOUBLECIRCLESTART\",47:\"DOUBLECIRCLEEND\",48:\"PS\",49:\"PE\",50:\"(-\",51:\"-)\",52:\"STADIUMSTART\",53:\"STADIUMEND\",54:\"SUBROUTINESTART\",55:\"SUBROUTINEEND\",56:\"VERTEX_WITH_PROPS_START\",57:\"NODE_STRING[field]\",58:\"COLON\",59:\"NODE_STRING[value]\",60:\"PIPE\",61:\"CYLINDERSTART\",62:\"CYLINDEREND\",63:\"DIAMOND_START\",64:\"DIAMOND_STOP\",65:\"TAGEND\",66:\"TRAPSTART\",67:\"TRAPEND\",68:\"INVTRAPSTART\",69:\"INVTRAPEND\",72:\"TESTSTR\",73:\"START_LINK\",75:\"LINK\",77:\"STR\",78:\"MD_STR\",81:\"STYLE\",82:\"LINKSTYLE\",83:\"CLASSDEF\",84:\"CLASS\",85:\"CLICK\",86:\"DOWN\",87:\"UP\",90:\"idString[vertex]\",91:\"idString[class]\",92:\"CALLBACKNAME\",93:\"CALLBACKARGS\",94:\"HREF\",95:\"LINK_TARGET\",96:\"STR[link]\",97:\"STR[tooltip]\",99:\"DEFAULT\",101:\"INTERPOLATE\",102:\"NUM\",103:\"COMMA\",106:\"NODE_STRING\",107:\"UNIT\",108:\"BRKT\",109:\"PCT\",111:\"MINUS\",112:\"MULT\",113:\"UNICODE_TEXT\",114:\"TEXT\",115:\"TAGSTART\",116:\"EDGE_TEXT\",118:\"direction_tb\",119:\"direction_bt\",120:\"direction_rl\",121:\"direction_lr\"},\nproductions_: [0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 2:\n this.$ = [];\nbreak;\ncase 3:\n\n\t if(!Array.isArray($$[$0]) || $$[$0].length > 0){\n\t $$[$0-1].push($$[$0]);\n\t }\n\t this.$=$$[$0-1];\nbreak;\ncase 4: case 176:\nthis.$=$$[$0];\nbreak;\ncase 11:\n yy.setDirection('TB');this.$ = 'TB';\nbreak;\ncase 12:\n yy.setDirection($$[$0-1]);this.$ = $$[$0-1];\nbreak;\ncase 27:\n /* console.warn('finat vs', $$[$0-1].nodes); */ this.$=$$[$0-1].nodes\nbreak;\ncase 28: case 29: case 30: case 31: case 32:\nthis.$=[];\nbreak;\ncase 33:\nthis.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);\nbreak;\ncase 34:\nthis.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);\nbreak;\ncase 35:\nthis.$=yy.addSubGraph(undefined,$$[$0-1],undefined);\nbreak;\ncase 37:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 38: case 39:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 43:\n /* console.warn('vs',$$[$0-2].stmt,$$[$0]); */ yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]); this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0-2].nodes) } \nbreak;\ncase 44:\n /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */ yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) } \nbreak;\ncase 45:\n/*console.warn('noda', $$[$0-1]);*/ this.$ = {stmt: $$[$0-1], nodes:$$[$0-1] }\nbreak;\ncase 46:\n /*console.warn('noda', $$[$0]);*/ this.$ = {stmt: $$[$0], nodes:$$[$0] }\nbreak;\ncase 47:\n /* console.warn('nod', $$[$0]); */ this.$ = [$$[$0]];\nbreak;\ncase 48:\n this.$ = $$[$0-4].concat($$[$0]); /* console.warn('pip', $$[$0-4][0], $$[$0], this.$); */ \nbreak;\ncase 49:\n /* console.warn('nod', $$[$0]); */ this.$ = $$[$0];\nbreak;\ncase 50:\nthis.$ = $$[$0-2];yy.setClass($$[$0-2],$$[$0])\nbreak;\ncase 51:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');\nbreak;\ncase 52:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'doublecircle');\nbreak;\ncase 53:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');\nbreak;\ncase 54:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');\nbreak;\ncase 55:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'stadium');\nbreak;\ncase 56:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'subroutine');\nbreak;\ncase 57:\nthis.$ = $$[$0-7];yy.addVertex($$[$0-7],$$[$0-1],'rect',undefined,undefined,undefined, Object.fromEntries([[$$[$0-5], $$[$0-3]]]));\nbreak;\ncase 58:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'cylinder');\nbreak;\ncase 59:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');\nbreak;\ncase 60:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');\nbreak;\ncase 61:\nthis.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'hexagon');\nbreak;\ncase 62:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');\nbreak;\ncase 63:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');\nbreak;\ncase 64:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');\nbreak;\ncase 65:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');\nbreak;\ncase 66:\nthis.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');\nbreak;\ncase 67:\n /*console.warn('h: ', $$[$0]);*/this.$ = $$[$0];yy.addVertex($$[$0]);\nbreak;\ncase 68:\n$$[$0-1].text = $$[$0];this.$ = $$[$0-1];\nbreak;\ncase 69: case 70:\n$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];\nbreak;\ncase 71:\nthis.$ = $$[$0];\nbreak;\ncase 72:\nvar inf = yy.destructLink($$[$0], $$[$0-2]); this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length,\"text\":$$[$0-1]};\nbreak;\ncase 73:\nthis.$={text:$$[$0], type:'text'};\nbreak;\ncase 74:\nthis.$={text:$$[$0-1].text+''+$$[$0], type:$$[$0-1].type};\nbreak;\ncase 75:\nthis.$={text: $$[$0], type: 'string'};\nbreak;\ncase 76:\nthis.$={text:$$[$0], type:'markdown'};\nbreak;\ncase 77:\nvar inf = yy.destructLink($$[$0]);this.$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length};\nbreak;\ncase 78:\nthis.$ = $$[$0-1];\nbreak;\ncase 79:\n this.$={text:$$[$0], type: 'text'};\nbreak;\ncase 80:\n this.$={text:$$[$0-1].text+''+$$[$0], type: $$[$0-1].type};\nbreak;\ncase 81:\n this.$ = {text: $$[$0], type: 'string'};\nbreak;\ncase 82: case 97:\n this.$={text: $$[$0], type: 'markdown'};\nbreak;\ncase 94:\nthis.$={text:$$[$0], type: 'text'};\nbreak;\ncase 95:\nthis.$={text:$$[$0-1].text+''+$$[$0], type: $$[$0-1].type};\nbreak;\ncase 96:\n this.$={text: $$[$0], type: 'text'};\nbreak;\ncase 98:\nthis.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);\nbreak;\ncase 99:\nthis.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);\nbreak;\ncase 100: case 108:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 101: case 109:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 102:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 103:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-4], $$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-4], $$[$0]);\nbreak;\ncase 104:\nthis.$ = $$[$0-2];yy.setLink($$[$0-2], $$[$0]);\nbreak;\ncase 105:\nthis.$ = $$[$0-4];yy.setLink($$[$0-4], $$[$0-2]);yy.setTooltip($$[$0-4], $$[$0]);\nbreak;\ncase 106:\nthis.$ = $$[$0-4];yy.setLink($$[$0-4], $$[$0-2], $$[$0]);\nbreak;\ncase 107:\nthis.$ = $$[$0-6];yy.setLink($$[$0-6], $$[$0-4], $$[$0]);yy.setTooltip($$[$0-6], $$[$0-2]);\nbreak;\ncase 110:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 111:\nthis.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 112:\nthis.$ = $$[$0-3];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);\nbreak;\ncase 113:\nthis.$ = $$[$0-5];yy.setLink($$[$0-5], $$[$0-4], $$[$0]);yy.setTooltip($$[$0-5], $$[$0-2]);\nbreak;\ncase 114:\nthis.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);\nbreak;\ncase 115:\nthis.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);\nbreak;\ncase 116:\nthis.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);\nbreak;\ncase 117:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);\nbreak;\ncase 118:\nthis.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);\nbreak;\ncase 119:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);\nbreak;\ncase 120:\nthis.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);\nbreak;\ncase 121: case 123:\nthis.$ = [$$[$0]]\nbreak;\ncase 122: case 124:\n$$[$0-2].push($$[$0]);this.$ = $$[$0-2];\nbreak;\ncase 126:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\ncase 174:\nthis.$=$$[$0]\nbreak;\ncase 175:\nthis.$=$$[$0-1]+''+$$[$0]\nbreak;\ncase 177:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\ncase 178:\n this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 179:\n this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 180:\n this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 181:\n this.$={stmt:'dir', value:'LR'};\nbreak;\n}\n},\ntable: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,33:24,34:$Va,36:$Vb,38:$Vc,40:28,41:38,42:$Vd,43:39,45:40,58:$Ve,81:$Vf,82:$Vg,83:$Vh,84:$Vi,85:$Vj,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs,118:$Vt,119:$Vu,120:$Vv,121:$Vw},o($V3,[2,9]),o($V3,[2,10]),o($V3,[2,11]),{8:[1,54],9:[1,55],10:$Vx,15:53,18:56},o($Vy,[2,3]),o($Vy,[2,4]),o($Vy,[2,5]),o($Vy,[2,6]),o($Vy,[2,7]),o($Vy,[2,8]),{8:$Vz,9:$VA,11:$VB,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:$Vz,9:$VA,11:$VB,21:66},{8:$Vz,9:$VA,11:$VB,21:67},{8:$Vz,9:$VA,11:$VB,21:68},{8:$Vz,9:$VA,11:$VB,21:69},{8:$Vz,9:$VA,11:$VB,21:70},{8:$Vz,9:$VA,10:[1,71],11:$VB,21:72},o($Vy,[2,36]),{35:[1,73]},{37:[1,74]},o($Vy,[2,39]),o($VC,[2,46],{18:75,10:$Vx}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:$VD,42:$VE,58:$VF,77:[1,83],86:$VG,92:[1,80],94:[1,81],98:82,102:$VH,103:$VI,106:$VJ,108:$VK,111:$VL,112:$VM,113:$VN,117:84},o($Vy,[2,178]),o($Vy,[2,179]),o($Vy,[2,180]),o($Vy,[2,181]),o($VO,[2,47]),o($VO,[2,49],{44:[1,96]}),o($VP,[2,67],{110:109,29:[1,97],42:$Vd,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:$Ve,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,111:$Vq,112:$Vr,113:$Vs}),o($VQ,[2,174]),o($VQ,[2,135]),o($VQ,[2,136]),o($VQ,[2,137]),o($VQ,[2,138]),o($VQ,[2,139]),o($VQ,[2,140]),o($VQ,[2,141]),o($VQ,[2,142]),o($VQ,[2,143]),o($VQ,[2,144]),o($VQ,[2,145]),o($V3,[2,12]),o($V3,[2,18]),o($V3,[2,19]),{9:[1,110]},o($VR,[2,26],{18:111,10:$Vx}),o($Vy,[2,27]),{40:112,41:38,42:$Vd,43:39,45:40,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},o($Vy,[2,40]),o($Vy,[2,41]),o($Vy,[2,42]),o($VS,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:$VT,116:$VU},o([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),o($Vy,[2,28]),o($Vy,[2,29]),o($Vy,[2,30]),o($Vy,[2,31]),o($Vy,[2,32]),{10:$VV,12:$VW,14:$VX,27:$VY,28:122,32:$VZ,42:$V_,58:$V$,73:$V01,77:[1,124],78:[1,125],80:135,81:$V11,82:$V21,83:$V31,84:$V41,85:$V51,86:$V61,87:$V71,88:123,102:$V81,106:$V91,108:$Va1,111:$Vb1,112:$Vc1,113:$Vd1},o($Ve1,$V4,{5:148}),o($Vy,[2,37]),o($Vy,[2,38]),o($VC,[2,45],{42:$Vf1}),{42:$Vd,45:150,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},{99:[1,151],100:152,102:[1,153]},{42:$Vd,45:154,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},{42:$Vd,45:155,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},o($Vg1,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},o($Vg1,[2,108],{117:160,10:[1,159],14:$VD,42:$VE,58:$VF,86:$VG,102:$VH,103:$VI,106:$VJ,108:$VK,111:$VL,112:$VM,113:$VN}),o($Vg1,[2,110],{10:[1,161]}),o($Vh1,[2,176]),o($Vh1,[2,163]),o($Vh1,[2,164]),o($Vh1,[2,165]),o($Vh1,[2,166]),o($Vh1,[2,167]),o($Vh1,[2,168]),o($Vh1,[2,169]),o($Vh1,[2,170]),o($Vh1,[2,171]),o($Vh1,[2,172]),o($Vh1,[2,173]),{42:$Vd,45:162,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},{30:163,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:171,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:173,48:[1,172],65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:174,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:175,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:176,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{106:[1,177]},{30:178,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:179,63:[1,180],65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:181,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:182,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{30:183,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},o($VQ,[2,175]),o($V3,[2,20]),o($VR,[2,25]),o($VC,[2,43],{18:184,10:$Vx}),o($VS,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{75:[1,188],76:189,113:$VT,116:$VU},o($Vo1,[2,73]),o($Vo1,[2,75]),o($Vo1,[2,76]),o($Vo1,[2,161]),o($Vo1,[2,162]),{8:$Vz,9:$VA,10:$VV,11:$VB,12:$VW,14:$VX,21:191,27:$VY,29:[1,190],32:$VZ,42:$V_,58:$V$,73:$V01,80:135,81:$V11,82:$V21,83:$V31,84:$V41,85:$V51,86:$V61,87:$V71,88:192,102:$V81,106:$V91,108:$Va1,111:$Vb1,112:$Vc1,113:$Vd1},o($Vp1,[2,94]),o($Vp1,[2,96]),o($Vp1,[2,97]),o($Vp1,[2,150]),o($Vp1,[2,151]),o($Vp1,[2,152]),o($Vp1,[2,153]),o($Vp1,[2,154]),o($Vp1,[2,155]),o($Vp1,[2,156]),o($Vp1,[2,157]),o($Vp1,[2,158]),o($Vp1,[2,159]),o($Vp1,[2,160]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),o($Vp1,[2,88]),o($Vp1,[2,89]),o($Vp1,[2,90]),o($Vp1,[2,91]),o($Vp1,[2,92]),o($Vp1,[2,93]),{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,193],33:24,34:$Va,36:$Vb,38:$Vc,40:28,41:38,42:$Vd,43:39,45:40,58:$Ve,81:$Vf,82:$Vg,83:$Vh,84:$Vi,85:$Vj,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs,118:$Vt,119:$Vu,120:$Vv,121:$Vw},{10:$Vx,18:194},{10:[1,195],42:$Vd,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:109,111:$Vq,112:$Vr,113:$Vs},{10:[1,196]},{10:[1,197],103:[1,198]},o($Vq1,[2,121]),{10:[1,199],42:$Vd,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:109,111:$Vq,112:$Vr,113:$Vs},{10:[1,200],42:$Vd,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:109,111:$Vq,112:$Vr,113:$Vs},{77:[1,201]},o($Vg1,[2,102],{10:[1,202]}),o($Vg1,[2,104],{10:[1,203]}),{77:[1,204]},o($Vh1,[2,177]),{77:[1,205],95:[1,206]},o($VO,[2,50],{110:109,42:$Vd,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,111:$Vq,112:$Vr,113:$Vs}),{31:[1,207],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},o($Vr1,[2,79]),o($Vr1,[2,81]),o($Vr1,[2,82]),o($Vr1,[2,146]),o($Vr1,[2,147]),o($Vr1,[2,148]),o($Vr1,[2,149]),{47:[1,209],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{30:210,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{49:[1,211],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{51:[1,212],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{53:[1,213],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{55:[1,214],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{58:[1,215]},{62:[1,216],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{64:[1,217],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{30:218,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},{31:[1,219],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{65:$Vi1,67:[1,220],69:[1,221],79:208,113:$Vl1,114:$Vm1,115:$Vn1},{65:$Vi1,67:[1,223],69:[1,222],79:208,113:$Vl1,114:$Vm1,115:$Vn1},o($VC,[2,44],{42:$Vf1}),o($VS,[2,70]),o($VS,[2,69]),{60:[1,224],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},o($VS,[2,72]),o($Vo1,[2,74]),{30:225,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},o($Ve1,$V4,{5:226}),o($Vp1,[2,95]),o($Vy,[2,35]),{41:227,42:$Vd,43:39,45:40,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},{10:$Vs1,58:$Vt1,81:$Vu1,89:228,102:$Vv1,104:229,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},{10:$Vs1,58:$Vt1,81:$Vu1,89:239,101:[1,240],102:$Vv1,104:229,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},{10:$Vs1,58:$Vt1,81:$Vu1,89:241,101:[1,242],102:$Vv1,104:229,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},{102:[1,243]},{10:$Vs1,58:$Vt1,81:$Vu1,89:244,102:$Vv1,104:229,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},{42:$Vd,45:245,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs},o($Vg1,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},o($Vg1,[2,109]),o($Vg1,[2,111],{10:[1,249]}),o($Vg1,[2,112]),o($VP,[2,51]),o($Vr1,[2,80]),o($VP,[2,52]),{49:[1,250],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},o($VP,[2,59]),o($VP,[2,54]),o($VP,[2,55]),o($VP,[2,56]),{106:[1,251]},o($VP,[2,58]),o($VP,[2,60]),{64:[1,252],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},o($VP,[2,62]),o($VP,[2,63]),o($VP,[2,65]),o($VP,[2,64]),o($VP,[2,66]),o([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,254],33:24,34:$Va,36:$Vb,38:$Vc,40:28,41:38,42:$Vd,43:39,45:40,58:$Ve,81:$Vf,82:$Vg,83:$Vh,84:$Vi,85:$Vj,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs,118:$Vt,119:$Vu,120:$Vv,121:$Vw},o($VO,[2,48]),o($Vg1,[2,114],{103:$VA1}),o($VB1,[2,123],{105:256,10:$Vs1,58:$Vt1,81:$Vu1,102:$Vv1,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1}),o($VC1,[2,125]),o($VC1,[2,127]),o($VC1,[2,128]),o($VC1,[2,129]),o($VC1,[2,130]),o($VC1,[2,131]),o($VC1,[2,132]),o($VC1,[2,133]),o($VC1,[2,134]),o($Vg1,[2,115],{103:$VA1}),{10:[1,257]},o($Vg1,[2,116],{103:$VA1}),{10:[1,258]},o($Vq1,[2,122]),o($Vg1,[2,98],{103:$VA1}),o($Vg1,[2,99],{110:109,42:$Vd,58:$Ve,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,111:$Vq,112:$Vr,113:$Vs}),o($Vg1,[2,103]),o($Vg1,[2,105],{10:[1,259]}),o($Vg1,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:$Vz,9:$VA,11:$VB,21:264},o($Vy,[2,34]),{10:$Vs1,58:$Vt1,81:$Vu1,102:$Vv1,104:265,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},o($VC1,[2,126]),{14:$VD,42:$VE,58:$VF,86:$VG,98:266,102:$VH,103:$VI,106:$VJ,108:$VK,111:$VL,112:$VM,113:$VN,117:84},{14:$VD,42:$VE,58:$VF,86:$VG,98:267,102:$VH,103:$VI,106:$VJ,108:$VK,111:$VL,112:$VM,113:$VN,117:84},{95:[1,268]},o($Vg1,[2,113]),o($VP,[2,53]),{30:269,65:$Vi1,77:$Vj1,78:$Vk1,79:164,113:$Vl1,114:$Vm1,115:$Vn1},o($VP,[2,61]),o($Ve1,$V4,{5:270}),o($VB1,[2,124],{105:256,10:$Vs1,58:$Vt1,81:$Vu1,102:$Vv1,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1}),o($Vg1,[2,119],{117:160,10:[1,271],14:$VD,42:$VE,58:$VF,86:$VG,102:$VH,103:$VI,106:$VJ,108:$VK,111:$VL,112:$VM,113:$VN}),o($Vg1,[2,120],{117:160,10:[1,272],14:$VD,42:$VE,58:$VF,86:$VG,102:$VH,103:$VI,106:$VJ,108:$VK,111:$VL,112:$VM,113:$VN}),o($Vg1,[2,107]),{31:[1,273],65:$Vi1,79:208,113:$Vl1,114:$Vm1,115:$Vn1},{6:11,7:12,8:$V5,9:$V6,10:$V7,11:$V8,20:17,22:18,23:19,24:20,25:21,26:22,27:$V9,32:[1,274],33:24,34:$Va,36:$Vb,38:$Vc,40:28,41:38,42:$Vd,43:39,45:40,58:$Ve,81:$Vf,82:$Vg,83:$Vh,84:$Vi,85:$Vj,86:$Vk,99:$Vl,102:$Vm,103:$Vn,106:$Vo,108:$Vp,110:41,111:$Vq,112:$Vr,113:$Vs,118:$Vt,119:$Vu,120:$Vv,121:$Vw},{10:$Vs1,58:$Vt1,81:$Vu1,89:275,102:$Vv1,104:229,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},{10:$Vs1,58:$Vt1,81:$Vu1,89:276,102:$Vv1,104:229,105:230,106:$Vw1,107:$Vx1,108:$Vy1,109:$Vz1},o($VP,[2,57]),o($Vy,[2,33]),o($Vg1,[2,117],{103:$VA1}),o($Vg1,[2,118],{103:$VA1})],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin(\"acc_title\");return 34; \nbreak;\ncase 1: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 2: this.begin(\"acc_descr\");return 36; \nbreak;\ncase 3: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 4: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 5: this.popState(); \nbreak;\ncase 6:return \"acc_descr_multiline_value\";\nbreak;\ncase 7:this.begin(\"callbackname\");\nbreak;\ncase 8:this.popState();\nbreak;\ncase 9:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 10:return 92;\nbreak;\ncase 11:this.popState();\nbreak;\ncase 12:return 93;\nbreak;\ncase 13: return \"MD_STR\";\nbreak;\ncase 14: this.popState();\nbreak;\ncase 15: this.begin(\"md_string\");\nbreak;\ncase 16:return \"STR\";\nbreak;\ncase 17:this.popState();\nbreak;\ncase 18:this.pushState(\"string\");\nbreak;\ncase 19:return 81;\nbreak;\ncase 20:return 99;\nbreak;\ncase 21:return 82;\nbreak;\ncase 22:return 101;\nbreak;\ncase 23:return 83;\nbreak;\ncase 24:return 84;\nbreak;\ncase 25:return 94;\nbreak;\ncase 26:this.begin(\"click\");\nbreak;\ncase 27:this.popState();\nbreak;\ncase 28:return 85;\nbreak;\ncase 29:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 30:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 31:if(yy.lex.firstGraph()){this.begin(\"dir\");} return 12;\nbreak;\ncase 32:return 27;\nbreak;\ncase 33:return 32;\nbreak;\ncase 34:return 95;\nbreak;\ncase 35:return 95;\nbreak;\ncase 36:return 95;\nbreak;\ncase 37:return 95;\nbreak;\ncase 38: this.popState(); return 13; \nbreak;\ncase 39: this.popState(); return 14; \nbreak;\ncase 40: this.popState(); return 14; \nbreak;\ncase 41: this.popState(); return 14; \nbreak;\ncase 42: this.popState(); return 14; \nbreak;\ncase 43: this.popState(); return 14; \nbreak;\ncase 44: this.popState(); return 14; \nbreak;\ncase 45: this.popState(); return 14; \nbreak;\ncase 46: this.popState(); return 14; \nbreak;\ncase 47: this.popState(); return 14; \nbreak;\ncase 48: this.popState(); return 14; \nbreak;\ncase 49:return 118;\nbreak;\ncase 50:return 119;\nbreak;\ncase 51:return 120;\nbreak;\ncase 52:return 121;\nbreak;\ncase 53:return 102;\nbreak;\ncase 54:return 108;\nbreak;\ncase 55:return 44;\nbreak;\ncase 56:return 58;\nbreak;\ncase 57:return 42;\nbreak;\ncase 58:return 8;\nbreak;\ncase 59:return 103;\nbreak;\ncase 60:return 112;\nbreak;\ncase 61: this.popState(); return 75; \nbreak;\ncase 62: this.pushState(\"edgeText\"); return 73; \nbreak;\ncase 63:return 116;\nbreak;\ncase 64: this.popState(); return 75; \nbreak;\ncase 65: this.pushState(\"thickEdgeText\"); return 73; \nbreak;\ncase 66:return 116;\nbreak;\ncase 67: this.popState(); return 75; \nbreak;\ncase 68: this.pushState(\"dottedEdgeText\"); return 73; \nbreak;\ncase 69:return 116;\nbreak;\ncase 70:return 75;\nbreak;\ncase 71: this.popState(); return 51; \nbreak;\ncase 72:return \"TEXT\"\nbreak;\ncase 73: this.pushState(\"ellipseText\"); return 50; \nbreak;\ncase 74: this.popState(); return 53; \nbreak;\ncase 75: this.pushState(\"text\"); return 52; \nbreak;\ncase 76: this.popState(); return 55; \nbreak;\ncase 77: this.pushState(\"text\"); return 54; \nbreak;\ncase 78: return 56; \nbreak;\ncase 79: this.pushState(\"text\"); return 65; \nbreak;\ncase 80: this.popState(); return 62; \nbreak;\ncase 81: this.pushState(\"text\") ;return 61; \nbreak;\ncase 82: this.popState(); return 47; \nbreak;\ncase 83: this.pushState(\"text\"); return 46; \nbreak;\ncase 84: this.popState(); return 67; \nbreak;\ncase 85: this.popState(); return 69; \nbreak;\ncase 86:return 114;\nbreak;\ncase 87: this.pushState(\"trapText\"); return 66; \nbreak;\ncase 88: this.pushState(\"trapText\"); return 68; \nbreak;\ncase 89:return 115;\nbreak;\ncase 90:return 65;\nbreak;\ncase 91:return 87;\nbreak;\ncase 92:return 'SEP';\nbreak;\ncase 93:return 86;\nbreak;\ncase 94:return 112;\nbreak;\ncase 95:return 108;\nbreak;\ncase 96:return 42;\nbreak;\ncase 97:return 106;\nbreak;\ncase 98:return 111\nbreak;\ncase 99:return 113;\nbreak;\ncase 100: this.popState(); return 60; \nbreak;\ncase 101: this.pushState(\"text\"); return 60; \nbreak;\ncase 102: this.popState(); return 49; \nbreak;\ncase 103: this.pushState(\"text\"); return 48; \nbreak;\ncase 104: this.popState(); return 31; \nbreak;\ncase 105: this.pushState(\"text\"); return 29; \nbreak;\ncase 106: this.popState(); return 64 \nbreak;\ncase 107: this.pushState(\"text\"); return 63 \nbreak;\ncase 108:return \"TEXT\";\nbreak;\ncase 109:return 'QUOTE';\nbreak;\ncase 110:return 9;\nbreak;\ncase 111:return 10;\nbreak;\ncase 112:return 11;\nbreak;\n}\n},\nrules: [/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:[^`\"]+)/,/^(?:[`][\"])/,/^(?:[\"][`])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:style\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\b)/,/^(?:class\\b)/,/^(?:href[\\s])/,/^(?:click[\\s]+)/,/^(?:[\\s\\n])/,/^(?:[^\\s\\n]*)/,/^(?:flowchart-elk\\b)/,/^(?:graph\\b)/,/^(?:flowchart\\b)/,/^(?:subgraph\\b)/,/^(?:end\\b\\s*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:(\\r?\\n)*\\s*\\n)/,/^(?:\\s*LR\\b)/,/^(?:\\s*RL\\b)/,/^(?:\\s*TB\\b)/,/^(?:\\s*BT\\b)/,/^(?:\\s*TD\\b)/,/^(?:\\s*BR\\b)/,/^(?:\\s*<)/,/^(?:\\s*>)/,/^(?:\\s*\\^)/,/^(?:\\s*v\\b)/,/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\\*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:[^=]|=(?!))/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:[^\\.]|\\.(?!))/,/^(?:\\s*~~[\\~]+\\s*)/,/^(?:[-/\\)][\\)])/,/^(?:[^\\(\\)\\[\\]\\{\\}]|!\\)+)/,/^(?:\\(-)/,/^(?:\\]\\))/,/^(?:\\(\\[)/,/^(?:\\]\\])/,/^(?:\\[\\[)/,/^(?:\\[\\|)/,/^(?:>)/,/^(?:\\)\\])/,/^(?:\\[\\()/,/^(?:\\)\\)\\))/,/^(?:\\(\\(\\()/,/^(?:[\\\\(?=\\])][\\]])/,/^(?:\\/(?=\\])\\])/,/^(?:\\/(?!\\])|\\\\(?!\\])|[^\\\\\\[\\]\\(\\)\\{\\}\\/]+)/,/^(?:\\[\\/)/,/^(?:\\[\\\\)/,/^(?:<)/,/^(?:>)/,/^(?:\\^)/,/^(?:\\\\\\|)/,/^(?:v\\b)/,/^(?:\\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!\"\\#$%&'*+\\.`?\\\\_\\/]|-(?=[^\\>\\-\\.])|(?!))+)/,/^(?:-)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09D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\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\|)/,/^(?:\\|)/,/^(?:\\))/,/^(?:\\()/,/^(?:\\])/,/^(?:\\[)/,/^(?:(\\}))/,/^(?:\\{)/,/^(?:[^\\[\\]\\(\\)\\{\\}\\|\\\"]+)/,/^(?:\")/,/^(?:(\\r?\\n)+)/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"callbackargs\":{\"rules\":[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"callbackname\":{\"rules\":[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"href\":{\"rules\":[15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"click\":{\"rules\":[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"dottedEdgeText\":{\"rules\":[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"thickEdgeText\":{\"rules\":[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"edgeText\":{\"rules\":[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"trapText\":{\"rules\":[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],\"inclusive\":false},\"ellipseText\":{\"rules\":[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"text\":{\"rules\":[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],\"inclusive\":false},\"vertex\":{\"rules\":[15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"dir\":{\"rules\":[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"acc_descr\":{\"rules\":[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"acc_title\":{\"rules\":[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"md_string\":{\"rules\":[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"string\":{\"rules\":[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "// import khroma from 'khroma';\nimport * as khroma from 'khroma';\n\n/** Returns the styles given options */\nexport interface FlowChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst fade = (color: string, opacity: number) => {\n // @ts-ignore TODO: incorrect types from khroma\n const channel = khroma.channel;\n\n const r = channel(color, 'r');\n const g = channel(color, 'g');\n const b = channel(color, 'b');\n\n // @ts-ignore incorrect types from khroma\n return khroma.rgba(r, g, b, opacity);\n};\n\nconst getStyles = (options: FlowChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span {\n color: ${options.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground, 0.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${options.clusterBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n", "import type { MermaidConfig } from '../../config.type.js';\nimport { setConfig } from '../../diagram-api/diagramAPI.js';\nimport flowDb from './flowDb.js';\nimport renderer from './flowRenderer-v3-unified.js';\n// @ts-ignore: JISON doesn't support types\nimport flowParser from './parser/flow.jison';\nimport flowStyles from './styles.js';\n\nexport const diagram = {\n parser: flowParser,\n db: flowDb,\n renderer,\n styles: flowStyles,\n init: (cnf: MermaidConfig) => {\n if (!cnf.flowchart) {\n cnf.flowchart = {};\n }\n if (cnf.layout) {\n setConfig({ layout: cnf.layout });\n }\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });\n flowDb.clear();\n flowDb.setGen('gen-2');\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,20,22,24,26,27,28],$V1=[1,10],$V2=[1,11],$V3=[1,12],$V4=[1,13],$V5=[1,14],$V6=[1,15],$V7=[1,21],$V8=[1,22],$V9=[1,23],$Va=[1,24],$Vb=[1,25],$Vc=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],$Vd=[1,34],$Ve=[27,28,46,47],$Vf=[41,42,43,44,45],$Vg=[17,34],$Vh=[1,54],$Vi=[1,53],$Vj=[17,34,36,38];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"ER_DIAGRAM\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NEWLINE\":10,\"entityName\":11,\"relSpec\":12,\":\":13,\"role\":14,\"BLOCK_START\":15,\"attributes\":16,\"BLOCK_STOP\":17,\"SQS\":18,\"SQE\":19,\"title\":20,\"title_value\":21,\"acc_title\":22,\"acc_title_value\":23,\"acc_descr\":24,\"acc_descr_value\":25,\"acc_descr_multiline_value\":26,\"ALPHANUM\":27,\"ENTITY_NAME\":28,\"attribute\":29,\"attributeType\":30,\"attributeName\":31,\"attributeKeyTypeList\":32,\"attributeComment\":33,\"ATTRIBUTE_WORD\":34,\"attributeKeyType\":35,\"COMMA\":36,\"ATTRIBUTE_KEY\":37,\"COMMENT\":38,\"cardinality\":39,\"relType\":40,\"ZERO_OR_ONE\":41,\"ZERO_OR_MORE\":42,\"ONE_OR_MORE\":43,\"ONLY_ONE\":44,\"MD_PARENT\":45,\"NON_IDENTIFYING\":46,\"IDENTIFYING\":47,\"WORD\":48,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"ER_DIAGRAM\",6:\"EOF\",8:\"SPACE\",10:\"NEWLINE\",13:\":\",15:\"BLOCK_START\",17:\"BLOCK_STOP\",18:\"SQS\",19:\"SQE\",20:\"title\",21:\"title_value\",22:\"acc_title\",23:\"acc_title_value\",24:\"acc_descr\",25:\"acc_descr_value\",26:\"acc_descr_multiline_value\",27:\"ALPHANUM\",28:\"ENTITY_NAME\",34:\"ATTRIBUTE_WORD\",36:\"COMMA\",37:\"ATTRIBUTE_KEY\",38:\"COMMENT\",41:\"ZERO_OR_ONE\",42:\"ZERO_OR_MORE\",43:\"ONE_OR_MORE\",44:\"ONLY_ONE\",45:\"MD_PARENT\",46:\"NON_IDENTIFYING\",47:\"IDENTIFYING\",48:\"WORD\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n /*console.log('finished parsing');*/ \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\n\n yy.addEntity($$[$0-4]);\n yy.addEntity($$[$0-2]);\n yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]);\n \nbreak;\ncase 9:\n\n yy.addEntity($$[$0-3]);\n yy.addAttributes($$[$0-3], $$[$0-1]);\n \nbreak;\ncase 10:\n yy.addEntity($$[$0-2]); \nbreak;\ncase 11:\n yy.addEntity($$[$0]); \nbreak;\ncase 12:\n\n yy.addEntity($$[$0-6], $$[$0-4]);\n yy.addAttributes($$[$0-6], $$[$0-1]);\n \nbreak;\ncase 13:\n yy.addEntity($$[$0-5], $$[$0-3]); \nbreak;\ncase 14:\n yy.addEntity($$[$0-3], $$[$0-1]); \nbreak;\ncase 15: case 16:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 17: case 18:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 19: case 43:\n this.$ = $$[$0]; \nbreak;\ncase 20: case 41: case 42:\n this.$ = $$[$0].replace(/\"/g, ''); \nbreak;\ncase 21: case 29:\n this.$ = [$$[$0]]; \nbreak;\ncase 22:\n $$[$0].push($$[$0-1]); this.$=$$[$0]; \nbreak;\ncase 23:\n this.$ = { attributeType: $$[$0-1], attributeName: $$[$0] }; \nbreak;\ncase 24:\n this.$ = { attributeType: $$[$0-2], attributeName: $$[$0-1], attributeKeyTypeList: $$[$0] }; \nbreak;\ncase 25:\n this.$ = { attributeType: $$[$0-2], attributeName: $$[$0-1], attributeComment: $$[$0] }; \nbreak;\ncase 26:\n this.$ = { attributeType: $$[$0-3], attributeName: $$[$0-2], attributeKeyTypeList: $$[$0-1], attributeComment: $$[$0] }; \nbreak;\ncase 27: case 28: case 31:\n this.$=$$[$0]; \nbreak;\ncase 30:\n $$[$0-2].push($$[$0]); this.$ = $$[$0-2]; \nbreak;\ncase 32:\n this.$=$$[$0].replace(/\"/g, ''); \nbreak;\ncase 33:\n\n this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] };\n /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/\n \nbreak;\ncase 34:\n this.$ = yy.Cardinality.ZERO_OR_ONE; \nbreak;\ncase 35:\n this.$ = yy.Cardinality.ZERO_OR_MORE; \nbreak;\ncase 36:\n this.$ = yy.Cardinality.ONE_OR_MORE; \nbreak;\ncase 37:\n this.$ = yy.Cardinality.ONLY_ONE; \nbreak;\ncase 38:\n this.$ = yy.Cardinality.MD_PARENT; \nbreak;\ncase 39:\n this.$ = yy.Identification.NON_IDENTIFYING; \nbreak;\ncase 40:\n this.$ = yy.Identification.IDENTIFYING; \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:$V1,22:$V2,24:$V3,26:$V4,27:$V5,28:$V6},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:16,11:9,20:$V1,22:$V2,24:$V3,26:$V4,27:$V5,28:$V6},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:$V7,42:$V8,43:$V9,44:$Va,45:$Vb}),{21:[1,26]},{23:[1,27]},{25:[1,28]},o($V0,[2,18]),o($Vc,[2,19]),o($Vc,[2,20]),o($V0,[2,4]),{11:29,27:$V5,28:$V6},{16:30,17:[1,31],29:32,30:33,34:$Vd},{11:35,27:$V5,28:$V6},{40:36,46:[1,37],47:[1,38]},o($Ve,[2,34]),o($Ve,[2,35]),o($Ve,[2,36]),o($Ve,[2,37]),o($Ve,[2,38]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,17]),{13:[1,39]},{17:[1,40]},o($V0,[2,10]),{16:41,17:[2,21],29:32,30:33,34:$Vd},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:$V7,42:$V8,43:$V9,44:$Va,45:$Vb},o($Vf,[2,39]),o($Vf,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},o($V0,[2,9]),{17:[2,22]},o($Vg,[2,23],{32:50,33:51,35:52,37:$Vh,38:$Vi}),o([17,34,37,38],[2,28]),o($V0,[2,14],{15:[1,55]}),o([27,28],[2,33]),o($V0,[2,8]),o($V0,[2,41]),o($V0,[2,42]),o($V0,[2,43]),o($Vg,[2,24],{33:56,36:[1,57],38:$Vi}),o($Vg,[2,25]),o($Vj,[2,29]),o($Vg,[2,32]),o($Vj,[2,31]),{16:58,17:[1,59],29:32,30:33,34:$Vd},o($Vg,[2,26]),{35:60,37:$Vh},{17:[1,61]},o($V0,[2,13]),o($Vj,[2,30]),o($V0,[2,12])],\ndefaultActions: {34:[2,27],41:[2,22]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin(\"acc_title\");return 22; \nbreak;\ncase 1: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 2: this.begin(\"acc_descr\");return 24; \nbreak;\ncase 3: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 4: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 5: this.popState(); \nbreak;\ncase 6:return \"acc_descr_multiline_value\";\nbreak;\ncase 7:return 10;\nbreak;\ncase 8:/* skip whitespace */\nbreak;\ncase 9:return 8;\nbreak;\ncase 10:return 28;\nbreak;\ncase 11:return 48;\nbreak;\ncase 12:return 4;\nbreak;\ncase 13: this.begin(\"block\"); return 15; \nbreak;\ncase 14:return 36;\nbreak;\ncase 15:/* skip whitespace in block */\nbreak;\ncase 16:return 37\nbreak;\ncase 17:return 34;\nbreak;\ncase 18:return 34\nbreak;\ncase 19:return 38;\nbreak;\ncase 20:/* nothing */\nbreak;\ncase 21: this.popState(); return 17; \nbreak;\ncase 22:return yy_.yytext[0];\nbreak;\ncase 23:return 18;\nbreak;\ncase 24:return 19;\nbreak;\ncase 25:return 41;\nbreak;\ncase 26:return 43;\nbreak;\ncase 27:return 43;\nbreak;\ncase 28:return 43;\nbreak;\ncase 29:return 41;\nbreak;\ncase 30:return 41;\nbreak;\ncase 31:return 42;\nbreak;\ncase 32:return 42;\nbreak;\ncase 33:return 42;\nbreak;\ncase 34:return 42;\nbreak;\ncase 35:return 42;\nbreak;\ncase 36:return 43;\nbreak;\ncase 37:return 42;\nbreak;\ncase 38:return 43;\nbreak;\ncase 39:return 44;\nbreak;\ncase 40:return 44;\nbreak;\ncase 41:return 44;\nbreak;\ncase 42:return 44;\nbreak;\ncase 43:return 41;\nbreak;\ncase 44:return 42;\nbreak;\ncase 45:return 43;\nbreak;\ncase 46:return 45;\nbreak;\ncase 47:return 46;\nbreak;\ncase 48:return 47;\nbreak;\ncase 49:return 47;\nbreak;\ncase 50:return 46;\nbreak;\ncase 51:return 46;\nbreak;\ncase 52:return 46;\nbreak;\ncase 53:return 27;\nbreak;\ncase 54:return yy_.yytext[0];\nbreak;\ncase 55:return 6;\nbreak;\n}\n},\nrules: [/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:[\\s]+)/i,/^(?:\"[^\"%\\r\\n\\v\\b\\\\]+\")/i,/^(?:\"[^\"]*\")/i,/^(?:erDiagram\\b)/i,/^(?:\\{)/i,/^(?:,)/i,/^(?:\\s+)/i,/^(?:\\b((?:PK)|(?:FK)|(?:UK))\\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\\*A-Za-z_][A-Za-z0-9\\-_\\[\\]\\(\\)]*)/i,/^(?:\"[^\"]*\")/i,/^(?:[\\n]+)/i,/^(?:\\})/i,/^(?:.)/i,/^(?:\\[)/i,/^(?:\\])/i,/^(?:one or zero\\b)/i,/^(?:one or more\\b)/i,/^(?:one or many\\b)/i,/^(?:1\\+)/i,/^(?:\\|o\\b)/i,/^(?:zero or one\\b)/i,/^(?:zero or more\\b)/i,/^(?:zero or many\\b)/i,/^(?:0\\+)/i,/^(?:\\}o\\b)/i,/^(?:many\\(0\\))/i,/^(?:many\\(1\\))/i,/^(?:many\\b)/i,/^(?:\\}\\|)/i,/^(?:one\\b)/i,/^(?:only one\\b)/i,/^(?:1\\b)/i,/^(?:\\|\\|)/i,/^(?:o\\|)/i,/^(?:o\\{)/i,/^(?:\\|\\{)/i,/^(?:\\s*u\\b)/i,/^(?:\\.\\.)/i,/^(?:--)/i,/^(?:to\\b)/i,/^(?:optionally to\\b)/i,/^(?:\\.-)/i,/^(?:-\\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\\-_]*)/i,/^(?:.)/i,/^(?:$)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[5,6],\"inclusive\":false},\"acc_descr\":{\"rules\":[3],\"inclusive\":false},\"acc_title\":{\"rules\":[1],\"inclusive\":false},\"block\":{\"rules\":[14,15,16,17,18,19,20,21,22],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\n\nlet entities = new Map();\nlet relationships = [];\n\nconst Cardinality = {\n ZERO_OR_ONE: 'ZERO_OR_ONE',\n ZERO_OR_MORE: 'ZERO_OR_MORE',\n ONE_OR_MORE: 'ONE_OR_MORE',\n ONLY_ONE: 'ONLY_ONE',\n MD_PARENT: 'MD_PARENT',\n};\n\nconst Identification = {\n NON_IDENTIFYING: 'NON_IDENTIFYING',\n IDENTIFYING: 'IDENTIFYING',\n};\n/**\n * Add entity\n * @param {string} name - The name of the entity\n * @param {string | undefined} alias - The alias of the entity\n */\nconst addEntity = function (name, alias = undefined) {\n if (!entities.has(name)) {\n entities.set(name, { attributes: [], alias });\n log.info('Added new entity :', name);\n } else if (!entities.get(name).alias && alias) {\n entities.get(name).alias = alias;\n log.info(`Add alias '${alias}' to entity '${name}'`);\n }\n\n return entities.get(name);\n};\n\nconst getEntities = () => entities;\n\nconst addAttributes = function (entityName, attribs) {\n let entity = addEntity(entityName); // May do nothing (if entity has already been added)\n\n // Process attribs in reverse order due to effect of recursive construction (last attribute is first)\n let i;\n for (i = attribs.length - 1; i >= 0; i--) {\n entity.attributes.push(attribs[i]);\n log.debug('Added attribute ', attribs[i].attributeName);\n }\n};\n\n/**\n * Add a relationship\n *\n * @param entA The first entity in the relationship\n * @param rolA The role played by the first entity in relation to the second\n * @param entB The second entity in the relationship\n * @param rSpec The details of the relationship between the two entities\n */\nconst addRelationship = function (entA, rolA, entB, rSpec) {\n let rel = {\n entityA: entA,\n roleA: rolA,\n entityB: entB,\n relSpec: rSpec,\n };\n\n relationships.push(rel);\n log.debug('Added new relationship :', rel);\n};\n\nconst getRelationships = () => relationships;\n\nconst clear = function () {\n entities = new Map();\n relationships = [];\n commonClear();\n};\n\nexport default {\n Cardinality,\n Identification,\n getConfig: () => getConfig().er,\n addEntity,\n addAttributes,\n getEntities,\n addRelationship,\n getRelationships,\n clear,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "const ERMarkers = {\n ONLY_ONE_START: 'ONLY_ONE_START',\n ONLY_ONE_END: 'ONLY_ONE_END',\n ZERO_OR_ONE_START: 'ZERO_OR_ONE_START',\n ZERO_OR_ONE_END: 'ZERO_OR_ONE_END',\n ONE_OR_MORE_START: 'ONE_OR_MORE_START',\n ONE_OR_MORE_END: 'ONE_OR_MORE_END',\n ZERO_OR_MORE_START: 'ZERO_OR_MORE_START',\n ZERO_OR_MORE_END: 'ZERO_OR_MORE_END',\n MD_PARENT_END: 'MD_PARENT_END',\n MD_PARENT_START: 'MD_PARENT_START',\n};\n\n/**\n * Put the markers into the svg DOM for later use with edge paths\n *\n * @param elem\n * @param conf\n */\nconst insertMarkers = function (elem, conf) {\n let marker;\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.MD_PARENT_START)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.MD_PARENT_END)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M9,0 L9,18 M15,0 L15,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_END)\n .attr('refX', 18)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,0 L3,18 M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 21)\n .attr('cy', 9)\n .attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_END)\n .attr('refX', 30)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 9)\n .attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_END)\n .attr('refX', 27)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 48)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_END)\n .attr('refX', 39)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18');\n\n return;\n};\n\nexport default {\n ERMarkers,\n insertMarkers,\n};\n", "export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;", "import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;", "import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;", "import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;", "import { unsafeStringify } from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}", "// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;", "import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;", "export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';", "import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { line, curveBasis, select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport utils from '../../utils.js';\nimport erMarkers from './erMarkers.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport { parseGenericTypes } from '../common/common.js';\nimport { v5 as uuid5 } from 'uuid';\n\n/** Regex used to remove chars from the entity name so the result can be used in an id */\nconst BAD_ID_CHARS_REGEXP = /[^\\dA-Za-z](\\W)*/g;\n\n// Configuration\nlet conf = {};\n\n// Map so we can look up the id of an entity based on the name\nlet entityNameIds = new Map();\n\n/**\n * Allows the top-level API module to inject config specific to this renderer, storing it in the\n * local conf object. Note that generic config still needs to be retrieved using getConfig()\n * imported from the config module\n *\n * @param cnf\n */\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (const key of keys) {\n conf[key] = cnf[key];\n }\n};\n\n/**\n * Draw attributes for an entity\n *\n * @param groupNode The svg group node for the entity\n * @param entityTextNode The svg node for the entity label text\n * @param attributes An array of attributes defined for the entity (each attribute has a type and a\n * name)\n * @returns {object} The bounding box of the entity, after attributes have been added. The bounding\n * box has a .width and .height\n */\nconst drawAttributes = (groupNode, entityTextNode, attributes) => {\n const heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes\n const widthPadding = conf.entityPadding / 3; // Ditto\n const attrFontSize = conf.fontSize * 0.85;\n const labelBBox = entityTextNode.node().getBBox();\n const attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass\n let hasKeyType = false;\n let hasComment = false;\n let maxTypeWidth = 0;\n let maxNameWidth = 0;\n let maxKeyWidth = 0;\n let maxCommentWidth = 0;\n let cumulativeHeight = labelBBox.height + heightPadding * 2;\n let attrNum = 1;\n\n // Check to see if any of the attributes has a key or a comment\n attributes.forEach((item) => {\n if (item.attributeKeyTypeList !== undefined && item.attributeKeyTypeList.length > 0) {\n hasKeyType = true;\n }\n\n if (item.attributeComment !== undefined) {\n hasComment = true;\n }\n });\n\n attributes.forEach((item) => {\n const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`;\n let nodeHeight = 0;\n\n const attributeType = parseGenericTypes(item.attributeType);\n\n // Add a text node for the attribute type\n const typeNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-type`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(attributeType);\n\n // Add a text node for the attribute name\n const nameNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-name`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(item.attributeName);\n\n const attributeNode = {};\n attributeNode.tn = typeNode;\n attributeNode.nn = nameNode;\n\n const typeBBox = typeNode.node().getBBox();\n const nameBBox = nameNode.node().getBBox();\n maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width);\n maxNameWidth = Math.max(maxNameWidth, nameBBox.width);\n\n nodeHeight = Math.max(typeBBox.height, nameBBox.height);\n\n if (hasKeyType) {\n const keyTypeNodeText =\n item.attributeKeyTypeList !== undefined ? item.attributeKeyTypeList.join(',') : '';\n\n const keyTypeNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-key`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(keyTypeNodeText);\n\n attributeNode.kn = keyTypeNode;\n const keyTypeBBox = keyTypeNode.node().getBBox();\n maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width);\n nodeHeight = Math.max(nodeHeight, keyTypeBBox.height);\n }\n\n if (hasComment) {\n const commentNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', `${attrPrefix}-comment`)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'left')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', attrFontSize + 'px')\n .text(item.attributeComment || '');\n\n attributeNode.cn = commentNode;\n const commentNodeBBox = commentNode.node().getBBox();\n maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width);\n nodeHeight = Math.max(nodeHeight, commentNodeBBox.height);\n }\n\n attributeNode.height = nodeHeight;\n // Keep a reference to the nodes so that we can iterate through them later\n attributeNodes.push(attributeNode);\n cumulativeHeight += nodeHeight + heightPadding * 2;\n attrNum += 1;\n });\n\n let widthPaddingFactor = 4;\n if (hasKeyType) {\n widthPaddingFactor += 2;\n }\n if (hasComment) {\n widthPaddingFactor += 2;\n }\n\n const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth;\n\n // Calculate the new bounding box of the overall entity, now that attributes have been added\n const bBox = {\n width: Math.max(\n conf.minEntityWidth,\n Math.max(\n labelBBox.width + conf.entityPadding * 2,\n maxWidth + widthPadding * widthPaddingFactor\n )\n ),\n height:\n attributes.length > 0\n ? cumulativeHeight\n : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2),\n };\n\n if (attributes.length > 0) {\n // There might be some spare width for padding out attributes if the entity name is very long\n const spareColumnWidth = Math.max(\n 0,\n (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2)\n );\n\n // Position the entity label near the top of the entity bounding box\n entityTextNode.attr(\n 'transform',\n 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'\n );\n\n // Add rectangular boxes for the attribute types/names\n let heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label\n let attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect\n\n attributeNodes.forEach((attributeNode) => {\n // Calculate the alignment y coordinate for the type/name of the attribute\n const alignY = heightOffset + heightPadding + attributeNode.height / 2;\n\n // Position the type attribute\n attributeNode.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')');\n\n // TODO Handle spareWidth in attr('width')\n // Insert a rectangle for the type\n const typeRect = groupNode\n .insert('rect', '#' + attributeNode.tn.node().id)\n .classed(`er ${attribStyle}`, true)\n .attr('x', 0)\n .attr('y', heightOffset)\n .attr('width', maxTypeWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n const nameXOffset = parseFloat(typeRect.attr('x')) + parseFloat(typeRect.attr('width'));\n\n // Position the name attribute\n attributeNode.nn.attr(\n 'transform',\n 'translate(' + (nameXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the name\n const nameRect = groupNode\n .insert('rect', '#' + attributeNode.nn.node().id)\n .classed(`er ${attribStyle}`, true)\n .attr('x', nameXOffset)\n .attr('y', heightOffset)\n .attr('width', maxNameWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n let keyTypeAndCommentXOffset =\n parseFloat(nameRect.attr('x')) + parseFloat(nameRect.attr('width'));\n\n if (hasKeyType) {\n // Position the key type attribute\n attributeNode.kn.attr(\n 'transform',\n 'translate(' + (keyTypeAndCommentXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the key type\n const keyTypeRect = groupNode\n .insert('rect', '#' + attributeNode.kn.node().id)\n .classed(`er ${attribStyle}`, true)\n .attr('x', keyTypeAndCommentXOffset)\n .attr('y', heightOffset)\n .attr('width', maxKeyWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n keyTypeAndCommentXOffset =\n parseFloat(keyTypeRect.attr('x')) + parseFloat(keyTypeRect.attr('width'));\n }\n\n if (hasComment) {\n // Position the comment attribute\n attributeNode.cn.attr(\n 'transform',\n 'translate(' + (keyTypeAndCommentXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the comment\n groupNode\n .insert('rect', '#' + attributeNode.cn.node().id)\n .classed(`er ${attribStyle}`, 'true')\n .attr('x', keyTypeAndCommentXOffset)\n .attr('y', heightOffset)\n .attr('width', maxCommentWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n }\n\n // Increment the height offset to move to the next row\n heightOffset += attributeNode.height + heightPadding * 2;\n\n // Flip the attribute style for row banding\n attribStyle = attribStyle === 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd';\n });\n } else {\n // Ensure the entity box is a decent size without any attributes\n bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight);\n\n // Position the entity label in the middle of the box\n entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')');\n }\n\n return bBox;\n};\n\n/**\n * Use D3 to construct the svg elements for the entities\n *\n * @param svgNode The svg node that contains the diagram\n * @param {Map} entities The entities to be drawn\n * @param graph The graph that contains the vertex and edge definitions post-layout\n * @returns {object} The first entity that was inserted\n */\nconst drawEntities = function (svgNode, entities, graph) {\n const keys = [...entities.keys()];\n let firstOne;\n\n keys.forEach(function (entityName) {\n const entityId = generateId(entityName, 'entity');\n entityNameIds.set(entityName, entityId);\n\n // Create a group for each entity\n const groupNode = svgNode.append('g').attr('id', entityId);\n\n firstOne = firstOne === undefined ? entityId : firstOne;\n\n // Label the entity - this is done first so that we can get the bounding box\n // which then determines the size of the rectangle\n const textId = 'text-' + entityId;\n const textNode = groupNode\n .append('text')\n .classed('er entityLabel', true)\n .attr('id', textId)\n .attr('x', 0)\n .attr('y', 0)\n .style('dominant-baseline', 'middle')\n .style('text-anchor', 'middle')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', conf.fontSize + 'px')\n .text(entities.get(entityName).alias ?? entityName);\n\n const { width: entityWidth, height: entityHeight } = drawAttributes(\n groupNode,\n textNode,\n entities.get(entityName).attributes\n );\n\n // Draw the rectangle - insert it before the text so that the text is not obscured\n const rectNode = groupNode\n .insert('rect', '#' + textId)\n .classed('er entityBox', true)\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', entityWidth)\n .attr('height', entityHeight);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph using the entityId\n graph.setNode(entityId, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: entityId,\n });\n });\n return firstOne;\n}; // drawEntities\n\nconst adjustEntities = function (svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n};\n\n/**\n * Construct a name for an edge based on the names of the 2 entities and the role (relationship)\n * between them. Remove any spaces from it\n *\n * @param rel - A (parsed) relationship (e.g. one of the objects in the list returned by\n * erDb.getRelationships)\n * @returns {string}\n */\nconst getEdgeName = function (rel) {\n return (rel.entityA + rel.roleA + rel.entityB).replace(/\\s/g, '');\n};\n\n/**\n * Add each relationship to the graph\n *\n * @param relationships The relationships to be added\n * @param g The graph\n * @returns {Array} The array of relationships\n */\nconst addRelationships = function (relationships, g) {\n relationships.forEach(function (r) {\n g.setEdge(\n entityNameIds.get(r.entityA),\n entityNameIds.get(r.entityB),\n { relationship: r },\n getEdgeName(r)\n );\n });\n return relationships;\n}; // addRelationships\n\nlet relCnt = 0;\n/**\n * Draw a relationship using edge information from the graph\n *\n * @param svg The svg node\n * @param rel The relationship to draw in the svg\n * @param g The graph containing the edge information\n * @param insert The insertion point in the svg DOM (because relationships have markers that need to\n * sit 'behind' opaque entity boxes)\n * @param diagObj\n */\nconst drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {\n relCnt++;\n\n // Find the edge relating to this relationship\n const edge = g.edge(\n entityNameIds.get(rel.entityA),\n entityNameIds.get(rel.entityB),\n getEdgeName(rel)\n );\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .classed('er relationshipLine', true)\n .attr('d', lineFunction(edge.points))\n .style('stroke', conf.stroke)\n .style('fill', 'none');\n\n // ...and with dashes if necessary\n if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) {\n svgPath.attr('stroke-dasharray', '8,8');\n }\n\n // TODO: Understand this better\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n // Decide which start and end markers it needs. It may be possible to be more concise here\n // by reversing a start marker to make an end marker...but this will do for now\n\n // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start\n switch (rel.relSpec.cardA) {\n case diagObj.db.Cardinality.ZERO_OR_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_END + ')');\n break;\n case diagObj.db.Cardinality.ZERO_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_END + ')');\n break;\n case diagObj.db.Cardinality.ONE_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_END + ')');\n break;\n case diagObj.db.Cardinality.ONLY_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_END + ')');\n break;\n case diagObj.db.Cardinality.MD_PARENT:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.MD_PARENT_END + ')');\n break;\n }\n\n switch (rel.relSpec.cardB) {\n case diagObj.db.Cardinality.ZERO_OR_ONE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ZERO_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ONE_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ONLY_ONE:\n svgPath.attr('marker-start', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_START + ')');\n break;\n case diagObj.db.Cardinality.MD_PARENT:\n svgPath.attr('marker-start', 'url(' + url + '#' + erMarkers.ERMarkers.MD_PARENT_START + ')');\n break;\n }\n\n // Now label the relationship\n\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n\n const labelNode = svg\n .append('text')\n .classed('er relationshipLabel', true)\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .style('text-anchor', 'middle')\n .style('dominant-baseline', 'middle')\n .style('font-family', getConfig().fontFamily)\n .style('font-size', conf.fontSize + 'px')\n .text(rel.roleA);\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n svg\n .insert('rect', '#' + labelId)\n .classed('er relationshipLabelBox', true)\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height);\n};\n\n/**\n * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram\n *\n * @param text The text of the diagram\n * @param id The unique id of the DOM node that contains the diagram\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().er;\n log.info('Drawing ER diagram');\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Get a reference to the svg node that contains the text\n const svg = root.select(`[id='${id}']`);\n\n // Add cardinality marker definitions to the svg\n erMarkers.insertMarkers(svg, conf);\n\n // Now we have to construct the diagram in a specific way:\n // ---\n // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)\n // 2. Make sure they are all added to the graph\n // 3. Add all the edges (relationships) to the graph as well\n // 4. Let dagre do its magic to lay out the graph. This assigns:\n // - the centre coordinates for each node, bearing in mind the dimensions and edge relationships\n // - the path coordinates for each edge\n // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0\n // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by\n // its centre point, which is obtained from the graph, and it's width and height\n // 6. And finally, create all the edges in the svg node using information from the graph\n // ---\n\n // Create the graph\n let g;\n\n // TODO: Explore directed vs undirected graphs, and how the layout is affected\n // An E-R diagram could be said to be undirected, but there is merit in setting\n // the direction from parent to child in a one-to-many as this influences graphlib to\n // put the parent above the child (does it?), which is intuitive. Most relationships\n // in ER diagrams are one-to-many.\n g = new graphlib.Graph({\n multigraph: true,\n directed: true,\n compound: false,\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // Draw the entities (at 0,0), returning the first svg node that got\n // inserted - this represents the insertion point for relationship paths\n const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g);\n\n // TODO: externalize the addition of entities to the graph - it's a bit 'buried' in the above\n\n // Add all the relationships to the graph\n const relationships = addRelationships(diagObj.db.getRelationships(), g);\n\n dagreLayout(g); // Node and edge positions will be updated\n\n // Adjust the positions of the entities so that they adhere to the layout\n adjustEntities(svg, g);\n\n // Draw the relationships\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj);\n });\n\n const padding = conf.diagramPadding;\n\n utils.insertTitle(svg, 'entityTitleText', conf.titleTopMargin, diagObj.db.getDiagramTitle());\n\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n}; // draw\n\n/**\n * UUID namespace for ER diagram IDs\n *\n * This can be generated via running:\n *\n * ```js\n * const { v5: uuid5 } = await import('uuid');\n * uuid5(\n * 'https://mermaid-js.github.io/mermaid/syntax/entityRelationshipDiagram.html',\n * uuid5.URL\n * );\n * ```\n */\nconst MERMAID_ERDIAGRAM_UUID = '28e9f9db-3c8d-5aa5-9faf-44286ae5937c';\n\n/**\n * Return a unique id based on the given string. Start with the prefix, then a hyphen, then the\n * simplified str, then a hyphen, then a unique uuid based on the str. (Hyphens are only included if needed.)\n * Although the official XML standard for ids says that many more characters are valid in the id,\n * this keeps things simple by accepting only A-Za-z0-9.\n *\n * @param {string} str Given string to use as the basis for the id. Default is `''`\n * @param {string} prefix String to put at the start, followed by '-'. Default is `''`\n * @returns {string}\n * @see https://www.w3.org/TR/xml/#NT-Name\n */\nexport function generateId(str = '', prefix = '') {\n const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, '');\n // we use `uuid v5` so that UUIDs are consistent given a string.\n return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${uuid5(\n str,\n MERMAID_ERDIAGRAM_UUID\n )}`;\n}\n\n/**\n * Append a hyphen to a string only if the string isn't empty\n *\n * @param {string} str\n * @returns {string}\n * @todo This could be moved into a string utility file/class.\n */\nfunction strWithHyphen(str = '') {\n return str.length > 0 ? `${str}-` : '';\n}\n\nexport default {\n setConf,\n draw,\n};\n", "const getStyles = (options) =>\n `\n .entityBox {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${options.attributeBackgroundColorOdd};\n stroke: ${options.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${options.attributeBackgroundColorEven};\n stroke: ${options.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${options.tertiaryColor};\n opacity: 0.7;\n background-color: ${options.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${options.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n }\n \n`;\n\nexport default getStyles;\n", "// @ts-ignore: TODO: Fix ts errors\nimport erParser from './parser/erDiagram.jison';\nimport erDb from './erDb.js';\nimport erRenderer from './erRenderer.js';\nimport erStyles from './styles.js';\n\nexport const diagram = {\n parser: erParser,\n db: erDb,\n renderer: erRenderer,\n styles: erStyles,\n};\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { TokenType } from 'chevrotain';\nimport type { URI } from './utils/uri-utils.js';\nimport type { AbstractElement } from './languages/generated/ast.js';\nimport type { DocumentSegment, LangiumDocument } from './workspace/documents.js';\n\n/**\n * A node in the Abstract Syntax Tree (AST).\n */\nexport interface AstNode {\n /** Every AST node has a type corresponding to what was specified in the grammar declaration. */\n readonly $type: string;\n /** The container node in the AST; every node except the root node has a container. */\n readonly $container?: AstNode;\n /** The property of the `$container` node that contains this node. This is either a direct reference or an array. */\n readonly $containerProperty?: string;\n /** In case `$containerProperty` is an array, the array index is stored here. */\n readonly $containerIndex?: number;\n /** The Concrete Syntax Tree (CST) node of the text range from which this node was parsed. */\n readonly $cstNode?: CstNode;\n /** The document containing the AST; only the root node has a direct reference to the document. */\n readonly $document?: LangiumDocument;\n}\n\nexport function isAstNode(obj: unknown): obj is AstNode {\n return typeof obj === 'object' && obj !== null && typeof (obj as AstNode).$type === 'string';\n}\n\nexport interface GenericAstNode extends AstNode {\n [key: string]: unknown\n}\n\ntype SpecificNodeProperties = keyof Omit;\n\n/**\n * The property names of a given AST node type.\n */\nexport type Properties = SpecificNodeProperties extends never ? string : SpecificNodeProperties\n\n/**\n * A cross-reference in the AST. Cross-references may or may not be successfully resolved.\n */\nexport interface Reference {\n /**\n * The target AST node of this reference. Accessing this property may trigger cross-reference\n * resolution by the `Linker` in case it has not been done yet. If the reference cannot be resolved,\n * the value is `undefined`.\n */\n readonly ref?: T;\n\n /** If any problem occurred while resolving the reference, it is described by this property. */\n readonly error?: LinkingError;\n /** The CST node from which the reference was parsed */\n readonly $refNode?: CstNode;\n /** The actual text used to look up in the surrounding scope */\n readonly $refText: string;\n /** The node description for the AstNode returned by `ref` */\n readonly $nodeDescription?: AstNodeDescription;\n}\n\nexport function isReference(obj: unknown): obj is Reference {\n return typeof obj === 'object' && obj !== null && typeof (obj as Reference).$refText === 'string';\n}\n\nexport type ResolvedReference = Reference & {\n readonly ref: T;\n}\n\n/**\n * A description of an AST node is used when constructing scopes and looking up cross-reference targets.\n */\nexport interface AstNodeDescription {\n /** The target node; should be present only for local references (linking to the same document). */\n node?: AstNode;\n /**\n * The document segment that represents the range of the name of the AST node.\n */\n nameSegment?: DocumentSegment;\n /**\n * The document segment that represents the full range of the AST node.\n */\n selectionSegment?: DocumentSegment;\n /** `$type` property value of the AST node */\n type: string;\n /** Name of the AST node; this is usually determined by the `NameProvider` service. */\n name: string;\n /** URI to the document containing the AST node */\n documentUri: URI;\n /** Navigation path inside the document */\n path: string;\n}\n\nexport function isAstNodeDescription(obj: unknown): obj is AstNodeDescription {\n return typeof obj === 'object' && obj !== null\n && typeof (obj as AstNodeDescription).name === 'string'\n && typeof (obj as AstNodeDescription).type === 'string'\n && typeof (obj as AstNodeDescription).path === 'string';\n}\n\n/**\n * Information about a cross-reference. This is used when traversing references in an AST or to describe\n * unresolved references.\n */\nexport interface ReferenceInfo {\n reference: Reference\n container: AstNode\n property: string\n index?: number\n}\n\n/**\n * Used to collect information when the `Linker` service fails to resolve a cross-reference.\n */\nexport interface LinkingError extends ReferenceInfo {\n message: string;\n targetDescription?: AstNodeDescription;\n}\n\nexport function isLinkingError(obj: unknown): obj is LinkingError {\n return typeof obj === 'object' && obj !== null\n && isAstNode((obj as LinkingError).container)\n && isReference((obj as LinkingError).reference)\n && typeof (obj as LinkingError).message === 'string';\n}\n\n/**\n * Service used for generic access to the structure of the AST. This service is shared between\n * all involved languages, so it operates on the superset of types of these languages.\n */\nexport interface AstReflection {\n getAllTypes(): string[]\n getAllSubTypes(type: string): string[]\n getReferenceType(refInfo: ReferenceInfo): string\n getTypeMetaData(type: string): TypeMetaData\n isInstance(node: unknown, type: string): boolean\n isSubtype(subtype: string, supertype: string): boolean\n}\n\n/**\n * An abstract implementation of the {@link AstReflection} interface.\n * Serves to cache subtype computation results to improve performance throughout different parts of Langium.\n */\nexport abstract class AbstractAstReflection implements AstReflection {\n\n protected subtypes: Record> = {};\n protected allSubtypes: Record = {};\n\n abstract getAllTypes(): string[];\n abstract getReferenceType(refInfo: ReferenceInfo): string;\n abstract getTypeMetaData(type: string): TypeMetaData;\n protected abstract computeIsSubtype(subtype: string, supertype: string): boolean;\n\n isInstance(node: unknown, type: string): boolean {\n return isAstNode(node) && this.isSubtype(node.$type, type);\n }\n\n isSubtype(subtype: string, supertype: string): boolean {\n if (subtype === supertype) {\n return true;\n }\n let nested = this.subtypes[subtype];\n if (!nested) {\n nested = this.subtypes[subtype] = {};\n }\n const existing = nested[supertype];\n if (existing !== undefined) {\n return existing;\n } else {\n const result = this.computeIsSubtype(subtype, supertype);\n nested[supertype] = result;\n return result;\n }\n }\n\n getAllSubTypes(type: string): string[] {\n const existing = this.allSubtypes[type];\n if (existing) {\n return existing;\n } else {\n const allTypes = this.getAllTypes();\n const types: string[] = [];\n for (const possibleSubType of allTypes) {\n if (this.isSubtype(possibleSubType, type)) {\n types.push(possibleSubType);\n }\n }\n this.allSubtypes[type] = types;\n return types;\n }\n }\n}\n\n/**\n * Represents runtime meta data about a meta model type.\n */\nexport interface TypeMetaData {\n /** The name of this meta model type. Corresponds to the `AstNode.$type` value. */\n name: string\n /** A list of properties. They can contain default values for their respective property in the AST. */\n properties: TypeProperty[]\n}\n\n/**\n * Describes the meta data of a property of an AST node.\n *\n * The optional `defaultValue` indicates that the property is mandatory in the AST node.\n * For example, if an AST node contains an array, but no elements of this array have been parsed, we still expect an empty array instead of `undefined`.\n */\nexport interface TypeProperty {\n name: string\n defaultValue?: PropertyType\n}\n\n/**\n * Represents a default value for an AST property.\n */\nexport type PropertyType = number | string | boolean | PropertyType[];\n\n/**\n * A node in the Concrete Syntax Tree (CST).\n */\nexport interface CstNode extends DocumentSegment {\n /** The container node in the CST */\n readonly container?: CompositeCstNode;\n /** @deprecated use `container` instead. */\n readonly parent?: CompositeCstNode;\n /** The actual text */\n readonly text: string;\n /** The root CST node */\n readonly root: RootCstNode;\n /** The grammar element from which this node was parsed */\n readonly grammarSource: AbstractElement;\n /** @deprecated use `grammarSource` instead. */\n readonly feature: AbstractElement;\n /** The AST node created from this CST node */\n readonly astNode: AstNode;\n /** @deprecated use `astNode` instead. */\n readonly element: AstNode;\n /** Whether the token is hidden, i.e. not explicitly part of the containing grammar rule */\n readonly hidden: boolean;\n}\n\n/**\n * A composite CST node contains other nodes, but no directly associated token.\n */\nexport interface CompositeCstNode extends CstNode {\n readonly content: CstNode[];\n /** @deprecated use `content` instead. */\n readonly children: CstNode[];\n}\n\nexport function isCompositeCstNode(node: unknown): node is CompositeCstNode {\n return typeof node === 'object' && node !== null && Array.isArray((node as CompositeCstNode).content);\n}\n\n/**\n * A leaf CST node corresponds to a token in the input token stream.\n */\nexport interface LeafCstNode extends CstNode {\n readonly tokenType: TokenType;\n}\n\nexport function isLeafCstNode(node: unknown): node is LeafCstNode {\n return typeof node === 'object' && node !== null && typeof (node as LeafCstNode).tokenType === 'object';\n}\n\nexport interface RootCstNode extends CompositeCstNode {\n readonly fullText: string\n}\n\nexport function isRootCstNode(node: unknown): node is RootCstNode {\n return isCompositeCstNode(node) && typeof (node as RootCstNode).fullText === 'string';\n}\n\n/**\n * Returns a type to have only properties names (!) of a type T whose property value is of a certain type K.\n */\ntype ExtractKeysOfValueType = { [I in keyof T]: T[I] extends K ? I : never }[keyof T];\n\n/**\n * Returns the property names (!) of an AstNode that are cross-references.\n * Meant to be used during cross-reference resolution in combination with `assertUnreachable(context.property)`.\n */\nexport type CrossReferencesOfAstNodeType = (\n ExtractKeysOfValueType\n | ExtractKeysOfValueType|undefined>\n// eslint-disable-next-line @typescript-eslint/ban-types\n) & {};\n\n/**\n * Represents the enumeration-like type, that lists all AstNode types of your grammar.\n */\nexport type AstTypeList = Record;\n\n/**\n * Returns all types that contain cross-references, A is meant to be the interface `XXXAstType` fromm your generated `ast.ts` file.\n * Meant to be used during cross-reference resolution in combination with `assertUnreachable(context.container)`.\n */\nexport type AstNodeTypesWithCrossReferences
    > = {\n [T in keyof A]: CrossReferencesOfAstNodeType extends never ? never : A[T]\n}[keyof A];\n\nexport type Mutable = {\n -readonly [P in keyof T]: T[P]\n};\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/**\n * A stream is a read-only sequence of values. While the contents of an array can be accessed\n * both sequentially and randomly (via index), a stream allows only sequential access.\n *\n * The advantage of this is that a stream can be evaluated lazily, so it does not require\n * to store intermediate values. This can boost performance when a large sequence is\n * processed via filtering, mapping etc. and accessed at most once. However, lazy\n * evaluation means that all processing is repeated when you access the sequence multiple\n * times; in such a case, it may be better to store the resulting sequence into an array.\n */\nexport interface Stream extends Iterable {\n\n /**\n * Returns an iterator for this stream. This is the same as calling the `Symbol.iterator` function property.\n */\n iterator(): IterableIterator;\n\n /**\n * Determines whether this stream contains no elements.\n */\n isEmpty(): boolean;\n\n /**\n * Determines the number of elements in this stream.\n */\n count(): number;\n\n /**\n * Collects all elements of this stream into an array.\n */\n toArray(): T[];\n\n /**\n * Collects all elements of this stream into a Set.\n */\n toSet(): Set;\n\n /**\n * Collects all elements of this stream into a Map, applying the provided functions to determine keys and values.\n *\n * @param keyFn The function to derive map keys. If omitted, the stream elements are used as keys.\n * @param valueFn The function to derive map values. If omitted, the stream elements are used as values.\n */\n toMap(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map;\n\n /**\n * Returns a string representation of a stream.\n */\n toString(): string;\n\n /**\n * Combines two streams by returning a new stream that yields all elements of this stream and the other stream.\n *\n * @param other Stream to be concatenated with this one.\n */\n concat(other: Iterable): Stream;\n\n /**\n * Adds all elements of the stream into a string, separated by the specified separator string.\n *\n * @param separator A string used to separate one element of the stream from the next in the resulting string.\n * If omitted, the steam elements are separated with a comma.\n */\n join(separator?: string): string\n\n /**\n * Returns the index of the first occurrence of a value in the stream, or -1 if it is not present.\n *\n * @param searchElement The value to locate in the array.\n * @param fromIndex The stream index at which to begin the search. If fromIndex is omitted, the search\n * starts at index 0.\n */\n indexOf(searchElement: T, fromIndex?: number): number;\n\n /**\n * Determines whether all members of the stream satisfy the specified test.\n *\n * @param predicate This method calls the predicate function for each element in the stream until the\n * predicate returns a value which is coercible to the Boolean value `false`, or until the end\n * of the stream.\n */\n every(predicate: (value: T) => value is S): this is Stream;\n every(predicate: (value: T) => unknown): boolean;\n\n /**\n * Determines whether any member of the stream satisfies the specified test.\n *\n * @param predicate This method calls the predicate function for each element in the stream until the\n * predicate returns a value which is coercible to the Boolean value `true`, or until the end\n * of the stream.\n */\n some(predicate: (value: T) => unknown): boolean;\n\n /**\n * Performs the specified action for each element in the stream.\n *\n * @param callbackfn Function called once for each element in the stream.\n */\n forEach(callbackfn: (value: T, index: number) => void): void;\n\n /**\n * Returns a stream that yields the results of calling the specified callback function on each element\n * of the stream. The function is called when the resulting stream elements are actually accessed, so\n * accessing the resulting stream multiple times means the function is also called multiple times for\n * each element of the stream.\n *\n * @param callbackfn Lazily evaluated function mapping stream elements.\n */\n map(callbackfn: (value: T) => U): Stream;\n\n /**\n * Returns the elements of the stream that meet the condition specified in a callback function.\n * The function is called when the resulting stream elements are actually accessed, so accessing the\n * resulting stream multiple times means the function is also called multiple times for each element\n * of the stream.\n *\n * @param predicate Lazily evaluated function checking a condition on stream elements.\n */\n filter(predicate: (value: T) => value is S): Stream;\n filter(predicate: (value: T) => unknown): Stream;\n\n /**\n * Returns the elements of the stream that are _non-nullable_, which means they are neither `undefined`\n * nor `null`.\n */\n nonNullable(): Stream>;\n\n /**\n * Calls the specified callback function for all elements in the stream. The return value of the\n * callback function is the accumulated result, and is provided as an argument in the next call to\n * the callback function.\n *\n * @param callbackfn This method calls the function once for each element in the stream, providing\n * the previous and current values of the reduction.\n * @param initialValue If specified, `initialValue` is used as the initial value to start the\n * accumulation. The first call to the function provides this value as an argument instead\n * of a stream value.\n */\n reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduce(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n\n /**\n * Calls the specified callback function for all elements in the stream, in descending order.\n * The return value of the callback function is the accumulated result, and is provided as an\n * argument in the next call to the callback function.\n *\n * @param callbackfn This method calls the function once for each element in the stream, providing\n * the previous and current values of the reduction.\n * @param initialValue If specified, `initialValue` is used as the initial value to start the\n * accumulation. The first call to the function provides this value as an argument instead\n * of an array value.\n */\n reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduceRight(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n\n /**\n * Returns the value of the first element in the stream that meets the condition, or `undefined`\n * if there is no such element.\n *\n * @param predicate This method calls `predicate` once for each element of the stream, in ascending\n * order, until it finds one where `predicate` returns a value which is coercible to the\n * Boolean value `true`.\n */\n find(predicate: (value: T) => value is S): S | undefined;\n find(predicate: (value: T) => unknown): T | undefined;\n\n /**\n * Returns the index of the first element in the stream that meets the condition, or `-1`\n * if there is no such element.\n *\n * @param predicate This method calls `predicate` once for each element of the stream, in ascending\n * order, until it finds one where `predicate` returns a value which is coercible to the\n * Boolean value `true`.\n */\n findIndex(predicate: (value: T) => unknown): number;\n\n /**\n * Determines whether the stream includes a certain element, returning `true` or `false` as appropriate.\n *\n * @param searchElement The element to search for.\n */\n includes(searchElement: T): boolean;\n\n /**\n * Calls a defined callback function on each element of the stream and then flattens the result into\n * a new stream. This is identical to a `map` followed by `flat` with depth 1.\n *\n * @param callbackfn Lazily evaluated function mapping stream elements.\n */\n flatMap(callbackfn: (value: T) => U | Iterable): Stream;\n\n /**\n * Returns a new stream with all sub-stream or sub-array elements concatenated into it recursively up\n * to the specified depth.\n *\n * @param depth The maximum recursion depth. Defaults to 1.\n */\n flat(depth?: D): FlatStream;\n\n /**\n * Returns the first element in the stream, or `undefined` if the stream is empty.\n */\n head(): T | undefined;\n\n /**\n * Returns a stream that skips the first `skipCount` elements from this stream.\n *\n * @param skipCount The number of elements to skip. If this is larger than the number of elements in\n * the stream, an empty stream is returned. Defaults to 1.\n */\n tail(skipCount?: number): Stream;\n\n /**\n * Returns a stream consisting of the elements of this stream, truncated to be no longer than `maxSize`\n * in length.\n *\n * @param maxSize The number of elements the stream should be limited to\n */\n limit(maxSize: number): Stream;\n\n /**\n * Returns a stream containing only the distinct elements from this stream.\n * Equality is determined with the same rules as a standard `Set`.\n *\n * @param by A function returning the key used to check equality with a previous stream element.\n * If omitted, the stream elements themselves are used for comparison.\n */\n distinct(by?: (element: T) => Key): Stream;\n\n /**\n * Returns a stream that contains all elements that don't exist in the {@link other} iterable.\n * Equality is determined with the same rules as a standard `Set`.\n * @param other The elements that should be exluded from this stream.\n * @param key A function returning the key used to check quality.\n * If omitted, the stream elements themselves are used for comparison.\n */\n exclude(other: Iterable, key?: (element: T) => Key): Stream;\n\n}\n\nexport type FlatStream = {\n 'done': Stream,\n 'recur': T extends Iterable\n ? FlatStream>\n : Stream\n}[Depth extends 0 ? 'done' : 'recur'];\n\nexport type MinusOne = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][N];\n\n/**\n * The default implementation of `Stream` works with two input functions:\n * - The first function creates the initial state of an iteration.\n * - The second function gets the current state as argument and returns an `IteratorResult`.\n */\nexport class StreamImpl implements Stream {\n protected readonly startFn: () => S;\n protected readonly nextFn: (state: S) => IteratorResult;\n\n constructor(startFn: () => S, nextFn: (state: S) => IteratorResult) {\n this.startFn = startFn;\n this.nextFn = nextFn;\n }\n\n iterator(): IterableIterator {\n const iterator = {\n state: this.startFn(),\n next: () => this.nextFn(iterator.state),\n [Symbol.iterator]: () => iterator\n };\n return iterator;\n }\n\n [Symbol.iterator](): Iterator {\n return this.iterator();\n }\n\n isEmpty(): boolean {\n const iterator = this.iterator();\n return Boolean(iterator.next().done);\n }\n\n count(): number {\n const iterator = this.iterator();\n let count = 0;\n let next = iterator.next();\n while (!next.done) {\n count++;\n next = iterator.next();\n }\n return count;\n }\n\n toArray(): T[] {\n const result: T[] = [];\n const iterator = this.iterator();\n let next: IteratorResult;\n do {\n next = iterator.next();\n if (next.value !== undefined) {\n result.push(next.value);\n }\n } while (!next.done);\n return result;\n }\n\n toSet(): Set {\n return new Set(this);\n }\n\n toMap(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map {\n const entryStream = this.map(element => <[K, V]>[\n keyFn ? keyFn(element) : element,\n valueFn ? valueFn(element) : element\n ]);\n return new Map(entryStream);\n }\n\n toString(): string {\n return this.join();\n }\n\n concat(other: Iterable): Stream {\n const iterator = other[Symbol.iterator]();\n return new StreamImpl<{ first: S, firstDone: boolean }, T | T2>(\n () => ({ first: this.startFn(), firstDone: false }),\n state => {\n let result: IteratorResult;\n if (!state.firstDone) {\n do {\n result = this.nextFn(state.first);\n if (!result.done) {\n return result;\n }\n } while (!result.done);\n state.firstDone = true;\n }\n do {\n result = iterator.next();\n if (!result.done) {\n return result;\n }\n } while (!result.done);\n return DONE_RESULT;\n }\n );\n }\n\n join(separator = ','): string {\n const iterator = this.iterator();\n let value = '';\n let result: IteratorResult;\n let addSeparator = false;\n do {\n result = iterator.next();\n if (!result.done) {\n if (addSeparator) {\n value += separator;\n }\n value += toString(result.value);\n }\n addSeparator = true;\n } while (!result.done);\n return value;\n }\n\n indexOf(searchElement: T, fromIndex = 0): number {\n const iterator = this.iterator();\n let index = 0;\n let next = iterator.next();\n while (!next.done) {\n if (index >= fromIndex && next.value === searchElement) {\n return index;\n }\n next = iterator.next();\n index++;\n }\n return -1;\n }\n\n // In the following definition the '& this' part in the return type is important\n // _and_ the order within 'Stream & this' is crucial!\n // Otherwise Typescript would infer the type of 'this' as 'StreamImpl & Stream'\n // (or ' & Stream') and usages like\n // ```\n // const stream = new StreamImpl(...);\n // ... stream.every() & stream....\n // ```\n // cannot benefit from '', as Typescript would priorize the signatures\n // of 'StreamImpl' (i.e. those of 'Stream') over those of 'Stream'.\n // With the order of 'Stream & this' the signatures of 'Stream' get precedence.\n every(predicate: (value: T) => value is U): this is Stream & this;\n every(predicate: (value: T) => unknown): boolean;\n every(predicate: (value: T) => unknown): boolean {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (!predicate(next.value)) {\n return false;\n }\n next = iterator.next();\n }\n return true;\n }\n\n some(predicate: (value: T) => unknown): boolean {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (predicate(next.value)) {\n return true;\n }\n next = iterator.next();\n }\n return false;\n }\n\n forEach(callbackfn: (value: T, index: number) => void): void {\n const iterator = this.iterator();\n let index = 0;\n let next = iterator.next();\n while (!next.done) {\n callbackfn(next.value, index);\n next = iterator.next();\n index++;\n }\n }\n\n map(callbackfn: (value: T) => U): Stream {\n return new StreamImpl(\n this.startFn,\n (state) => {\n const { done, value } = this.nextFn(state);\n if (done) {\n return DONE_RESULT;\n } else {\n return { done: false, value: callbackfn(value) };\n }\n }\n );\n }\n\n // for remarks on the return type definition refer to 'every(...)'\n filter(predicate: (value: T) => value is U): Stream & this;\n filter(predicate: (value: T) => unknown): Stream & this;\n filter(predicate: (value: T) => unknown): Stream {\n return new StreamImpl(\n this.startFn,\n state => {\n let result: IteratorResult;\n do {\n result = this.nextFn(state);\n if (!result.done && predicate(result.value)) {\n return result;\n }\n } while (!result.done);\n return DONE_RESULT;\n }\n );\n }\n\n nonNullable(): Stream> {\n return this.filter(e => e !== undefined && e !== null) as Stream>;\n }\n\n reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduce(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n reduce(callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined {\n const iterator = this.iterator();\n let previousValue: U | T | undefined = initialValue;\n let next = iterator.next();\n while (!next.done) {\n if (previousValue === undefined) {\n previousValue = next.value;\n } else {\n previousValue = callbackfn(previousValue, next.value);\n }\n next = iterator.next();\n }\n return previousValue;\n }\n\n reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;\n reduceRight(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;\n reduceRight(callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined {\n return this.recursiveReduce(this.iterator(), callbackfn, initialValue);\n }\n\n protected recursiveReduce(iterator: Iterator, callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined {\n const next = iterator.next();\n if (next.done) {\n return initialValue;\n }\n const previousValue = this.recursiveReduce(iterator, callbackfn, initialValue);\n if (previousValue === undefined) {\n return next.value;\n }\n return callbackfn(previousValue, next.value);\n }\n\n find(predicate: (value: T) => value is S): S | undefined;\n find(predicate: (value: T) => unknown): T | undefined;\n find(predicate: (value: T) => unknown): T | undefined {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (predicate(next.value)) {\n return next.value;\n }\n next = iterator.next();\n }\n return undefined;\n }\n\n findIndex(predicate: (value: T) => unknown): number {\n const iterator = this.iterator();\n let index = 0;\n let next = iterator.next();\n while (!next.done) {\n if (predicate(next.value)) {\n return index;\n }\n next = iterator.next();\n index++;\n }\n return -1;\n }\n\n includes(searchElement: T): boolean {\n const iterator = this.iterator();\n let next = iterator.next();\n while (!next.done) {\n if (next.value === searchElement) {\n return true;\n }\n next = iterator.next();\n }\n return false;\n }\n\n flatMap(callbackfn: (value: T) => U | Iterable): Stream {\n type FlatMapState = { this: S, iterator?: Iterator }\n return new StreamImpl(\n () => ({ this: this.startFn() }),\n (state) => {\n do {\n if (state.iterator) {\n const next = state.iterator.next();\n if (next.done) {\n state.iterator = undefined;\n } else {\n return next;\n }\n }\n const { done, value } = this.nextFn(state.this);\n if (!done) {\n const mapped = callbackfn(value);\n if (isIterable(mapped)) {\n state.iterator = mapped[Symbol.iterator]();\n } else {\n return { done: false, value: mapped };\n }\n }\n } while (state.iterator);\n return DONE_RESULT;\n }\n );\n }\n\n flat(depth?: D): FlatStream {\n if (depth === undefined) {\n depth = 1 as D;\n }\n if (depth <= 0) {\n return this as unknown as FlatStream;\n }\n const stream = depth > 1 ? this.flat(depth - 1) as unknown as StreamImpl : this;\n type FlatMapState = { this: S, iterator?: Iterator }\n return new StreamImpl(\n () => ({ this: stream.startFn() }),\n (state) => {\n do {\n if (state.iterator) {\n const next = state.iterator.next();\n if (next.done) {\n state.iterator = undefined;\n } else {\n return next;\n }\n }\n const { done, value } = stream.nextFn(state.this);\n if (!done) {\n if (isIterable(value)) {\n state.iterator = value[Symbol.iterator]() as Iterator;\n } else {\n return { done: false, value: value };\n }\n }\n } while (state.iterator);\n return DONE_RESULT;\n }\n ) as unknown as FlatStream;\n }\n\n head(): T | undefined {\n const iterator = this.iterator();\n const result = iterator.next();\n if (result.done) {\n return undefined;\n }\n return result.value;\n }\n\n tail(skipCount = 1): Stream {\n return new StreamImpl(\n () => {\n const state = this.startFn();\n for (let i = 0; i < skipCount; i++) {\n const next = this.nextFn(state);\n if (next.done) {\n return state;\n }\n }\n return state;\n },\n this.nextFn\n );\n }\n\n limit(maxSize: number): Stream {\n return new StreamImpl<{ size: number, state: S }, T>(\n () => ({ size: 0, state: this.startFn() }),\n state => {\n state.size++;\n if (state.size > maxSize) {\n return DONE_RESULT;\n }\n return this.nextFn(state.state);\n }\n );\n }\n\n distinct(by?: (element: T) => Key): Stream {\n const set = new Set();\n return this.filter(e => {\n const value = by ? by(e) : e;\n if (set.has(value)) {\n return false;\n } else {\n set.add(value);\n return true;\n }\n });\n }\n\n exclude(other: Iterable, key?: (element: T) => Key): Stream {\n const otherKeySet = new Set();\n for (const item of other) {\n const value = key ? key(item) : item;\n otherKeySet.add(value);\n }\n return this.filter(e => {\n const ownKey = key ? key(e) : e;\n return !otherKeySet.has(ownKey);\n });\n }\n}\n\nfunction toString(item: unknown): string {\n if (typeof item === 'string') {\n return item as string;\n }\n if (typeof item === 'undefined') {\n return 'undefined';\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (typeof (item as any).toString === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (item as any).toString();\n }\n return Object.prototype.toString.call(item);\n}\n\nfunction isIterable(obj: unknown): obj is Iterable {\n return !!obj && typeof (obj as Iterable)[Symbol.iterator] === 'function';\n}\n\n/**\n * An empty stream of any type.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const EMPTY_STREAM: Stream = new StreamImpl(() => undefined, () => DONE_RESULT);\n\n/**\n * Use this `IteratorResult` when implementing a `StreamImpl` to indicate that there are no more elements in the stream.\n */\nexport const DONE_RESULT: IteratorReturnResult = Object.freeze({ done: true, value: undefined });\n\n/**\n * Create a stream from one or more iterables or array-likes.\n */\nexport function stream(...collections: Array | ArrayLike>): Stream {\n if (collections.length === 1) {\n const collection = collections[0];\n if (collection instanceof StreamImpl) {\n return collection as Stream;\n }\n if (isIterable(collection)) {\n return new StreamImpl, T>(\n () => collection[Symbol.iterator](),\n (iterator) => iterator.next()\n );\n }\n if (typeof collection.length === 'number') {\n return new StreamImpl<{ index: number }, T>(\n () => ({ index: 0 }),\n (state) => {\n if (state.index < collection.length) {\n return { done: false, value: collection[state.index++] };\n } else {\n return DONE_RESULT;\n }\n }\n );\n }\n }\n if (collections.length > 1) {\n type State = { collIndex: number, iterator?: Iterator, array?: ArrayLike, arrIndex: number };\n return new StreamImpl(\n () => ({ collIndex: 0, arrIndex: 0 }),\n (state) => {\n do {\n if (state.iterator) {\n const next = state.iterator.next();\n if (!next.done) {\n return next;\n }\n state.iterator = undefined;\n }\n if (state.array) {\n if (state.arrIndex < state.array.length) {\n return { done: false, value: state.array[state.arrIndex++] };\n }\n state.array = undefined;\n state.arrIndex = 0;\n }\n if (state.collIndex < collections.length) {\n const collection = collections[state.collIndex++];\n if (isIterable(collection)) {\n state.iterator = collection[Symbol.iterator]();\n } else if (collection && typeof collection.length === 'number') {\n state.array = collection;\n }\n }\n } while (state.iterator || state.array || state.collIndex < collections.length);\n return DONE_RESULT;\n }\n );\n }\n return EMPTY_STREAM;\n}\n\n/**\n * A tree iterator adds the ability to prune the current iteration.\n */\nexport interface TreeIterator extends IterableIterator {\n /**\n * Skip the whole subtree below the last returned element. The iteration continues as if that\n * element had no children.\n */\n prune(): void\n}\n\n/**\n * A tree stream is used to stream the elements of a tree, for example an AST or CST.\n */\nexport interface TreeStream extends Stream {\n iterator(): TreeIterator\n}\n\n/**\n * The default implementation of `TreeStream` takes a root element and a function that computes the\n * children of its argument. Whether the root node included in the stream is controlled with the\n * `includeRoot` option, which defaults to `false`.\n */\nexport class TreeStreamImpl\n extends StreamImpl<{ iterators: Array>, pruned: boolean }, T>\n implements TreeStream {\n\n constructor(root: T, children: (node: T) => Iterable, options?: { includeRoot?: boolean }) {\n super(\n () => ({\n iterators: options?.includeRoot ? [[root][Symbol.iterator]()] : [children(root)[Symbol.iterator]()],\n pruned: false\n }),\n state => {\n if (state.pruned) {\n state.iterators.pop();\n state.pruned = false;\n }\n while (state.iterators.length > 0) {\n const iterator = state.iterators[state.iterators.length - 1];\n const next = iterator.next();\n if (next.done) {\n state.iterators.pop();\n } else {\n state.iterators.push(children(next.value)[Symbol.iterator]());\n return next;\n }\n }\n return DONE_RESULT;\n }\n );\n }\n\n override iterator(): TreeIterator {\n const iterator = {\n state: this.startFn(),\n next: () => this.nextFn(iterator.state),\n prune: () => {\n iterator.state.pruned = true;\n },\n [Symbol.iterator]: () => iterator\n };\n return iterator;\n }\n}\n\n/**\n * A set of utility functions that reduce a stream to a single value.\n */\nexport namespace Reduction {\n\n /**\n * Compute the sum of a number stream.\n */\n export function sum(stream: Stream): number {\n return stream.reduce((a, b) => a + b, 0);\n }\n\n /**\n * Compute the product of a number stream.\n */\n export function product(stream: Stream): number {\n return stream.reduce((a, b) => a * b, 0);\n }\n\n /**\n * Compute the minimum of a number stream. Returns `undefined` if the stream is empty.\n */\n export function min(stream: Stream): number | undefined {\n return stream.reduce((a, b) => Math.min(a, b));\n }\n\n /**\n * Compute the maximum of a number stream. Returns `undefined` if the stream is empty.\n */\n export function max(stream: Stream): number | undefined {\n return stream.reduce((a, b) => Math.max(a, b));\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { IToken } from '@chevrotain/types';\nimport type { Range } from 'vscode-languageserver-types';\nimport type { CstNode, CompositeCstNode, LeafCstNode } from '../syntax-tree.js';\nimport type { DocumentSegment } from '../workspace/documents.js';\nimport type { Stream, TreeStream } from './stream.js';\nimport { isCompositeCstNode, isLeafCstNode, isRootCstNode } from '../syntax-tree.js';\nimport { TreeStreamImpl } from './stream.js';\n\n/**\n * Create a stream of all CST nodes that are directly and indirectly contained in the given root node,\n * including the root node itself.\n */\nexport function streamCst(node: CstNode): TreeStream {\n return new TreeStreamImpl(node, element => {\n if (isCompositeCstNode(element)) {\n return element.content;\n } else {\n return [];\n }\n }, { includeRoot: true });\n}\n\n/**\n * Create a stream of all leaf nodes that are directly and indirectly contained in the given root node.\n */\nexport function flattenCst(node: CstNode): Stream {\n return streamCst(node).filter(isLeafCstNode);\n}\n\n/**\n * Determines whether the specified cst node is a child of the specified parent node.\n */\nexport function isChildNode(child: CstNode, parent: CstNode): boolean {\n while (child.container) {\n child = child.container;\n if (child === parent) {\n return true;\n }\n }\n return false;\n}\n\nexport function tokenToRange(token: IToken): Range {\n // Chevrotain uses 1-based indices everywhere\n // So we subtract 1 from every value to align with the LSP\n return {\n start: {\n character: token.startColumn! - 1,\n line: token.startLine! - 1\n },\n end: {\n character: token.endColumn!, // endColumn uses the correct index\n line: token.endLine! - 1\n }\n };\n}\n\nexport function toDocumentSegment(node: CstNode): DocumentSegment;\nexport function toDocumentSegment(node?: CstNode): DocumentSegment | undefined;\nexport function toDocumentSegment(node?: CstNode): DocumentSegment | undefined {\n if (!node) {\n return undefined;\n }\n const { offset, end, range } = node;\n return {\n range,\n offset,\n end,\n length: end - offset\n };\n}\n\nexport enum RangeComparison {\n Before = 0,\n After = 1,\n OverlapFront = 2,\n OverlapBack = 3,\n Inside = 4\n}\n\nexport function compareRange(range: Range, to: Range): RangeComparison {\n if (range.end.line < to.start.line || (range.end.line === to.start.line && range.end.character < range.start.character)) {\n return RangeComparison.Before;\n } else if (range.start.line > to.end.line || (range.start.line === to.end.line && range.start.character > to.end.character)) {\n return RangeComparison.After;\n }\n const startInside = range.start.line > to.start.line || (range.start.line === to.start.line && range.start.character >= to.start.character);\n const endInside = range.end.line < to.end.line || (range.end.line === to.end.line && range.end.character <= to.end.character);\n if (startInside && endInside) {\n return RangeComparison.Inside;\n } else if (startInside) {\n return RangeComparison.OverlapBack;\n } else {\n return RangeComparison.OverlapFront;\n }\n}\n\nexport function inRange(range: Range, to: Range): boolean {\n const comparison = compareRange(range, to);\n return comparison > RangeComparison.After;\n}\n\n// The \\p{L} regex matches any unicode letter character, i.e. characters from non-english alphabets\n// Together with \\w it matches any kind of character which can commonly appear in IDs\nexport const DefaultNameRegexp = /^[\\w\\p{L}]$/u;\n\n/**\n * Performs `findLeafNodeAtOffset` with a minor difference: When encountering a character that matches the `nameRegexp` argument,\n * it will instead return the leaf node at the `offset - 1` position.\n *\n * For LSP services, users expect that the declaration of an element is available if the cursor is directly after the element.\n */\nexport function findDeclarationNodeAtOffset(cstNode: CstNode | undefined, offset: number, nameRegexp = DefaultNameRegexp): LeafCstNode | undefined {\n if (cstNode) {\n if (offset > 0) {\n const localOffset = offset - cstNode.offset;\n const textAtOffset = cstNode.text.charAt(localOffset);\n if (!nameRegexp.test(textAtOffset)) {\n offset--;\n }\n }\n return findLeafNodeAtOffset(cstNode, offset);\n }\n return undefined;\n}\n\nexport function findCommentNode(cstNode: CstNode | undefined, commentNames: string[]): CstNode | undefined {\n if (cstNode) {\n const previous = getPreviousNode(cstNode, true);\n if (previous && isCommentNode(previous, commentNames)) {\n return previous;\n }\n if (isRootCstNode(cstNode)) {\n // Go from the first non-hidden node through all nodes in reverse order\n // We do this to find the comment node which directly precedes the root node\n const endIndex = cstNode.content.findIndex(e => !e.hidden);\n for (let i = endIndex - 1; i >= 0; i--) {\n const child = cstNode.content[i];\n if (isCommentNode(child, commentNames)) {\n return child;\n }\n }\n }\n }\n return undefined;\n}\n\nexport function isCommentNode(cstNode: CstNode, commentNames: string[]): boolean {\n return isLeafCstNode(cstNode) && commentNames.includes(cstNode.tokenType.name);\n}\n\n/**\n * Finds the leaf CST node at the specified 0-based string offset.\n * Note that the given offset will be within the range of the returned leaf node.\n *\n * If the offset does not point to a CST node (but just white space), this method will return `undefined`.\n *\n * @param node The CST node to search through.\n * @param offset The specified offset.\n * @returns The CST node at the specified offset.\n */\nexport function findLeafNodeAtOffset(node: CstNode, offset: number): LeafCstNode | undefined {\n if (isLeafCstNode(node)) {\n return node;\n } else if (isCompositeCstNode(node)) {\n const searchResult = binarySearch(node, offset, false);\n if (searchResult) {\n return findLeafNodeAtOffset(searchResult, offset);\n }\n }\n return undefined;\n}\n\n/**\n * Finds the leaf CST node at the specified 0-based string offset.\n * If no CST node exists at the specified position, it will return the leaf node before it.\n *\n * If there is no leaf node before the specified offset, this method will return `undefined`.\n *\n * @param node The CST node to search through.\n * @param offset The specified offset.\n * @returns The CST node closest to the specified offset.\n */\nexport function findLeafNodeBeforeOffset(node: CstNode, offset: number): LeafCstNode | undefined {\n if (isLeafCstNode(node)) {\n return node;\n } else if (isCompositeCstNode(node)) {\n const searchResult = binarySearch(node, offset, true);\n if (searchResult) {\n return findLeafNodeBeforeOffset(searchResult, offset);\n }\n }\n return undefined;\n}\n\nfunction binarySearch(node: CompositeCstNode, offset: number, closest: boolean): CstNode | undefined {\n let left = 0;\n let right = node.content.length - 1;\n let closestNode: CstNode | undefined = undefined;\n\n while (left <= right) {\n const middle = Math.floor((left + right) / 2);\n const middleNode = node.content[middle];\n\n if (middleNode.offset <= offset && middleNode.end > offset) {\n // Found an exact match\n return middleNode;\n }\n\n if (middleNode.end <= offset) {\n // Update the closest node (less than offset) and move to the right half\n closestNode = closest ? middleNode : undefined;\n left = middle + 1;\n } else {\n // Move to the left half\n right = middle - 1;\n }\n }\n\n return closestNode;\n}\n\nexport function getPreviousNode(node: CstNode, hidden = true): CstNode | undefined {\n while (node.container) {\n const parent = node.container;\n let index = parent.content.indexOf(node);\n while (index > 0) {\n index--;\n const previous = parent.content[index];\n if (hidden || !previous.hidden) {\n return previous;\n }\n }\n node = parent;\n }\n return undefined;\n}\n\nexport function getNextNode(node: CstNode, hidden = true): CstNode | undefined {\n while (node.container) {\n const parent = node.container;\n let index = parent.content.indexOf(node);\n const last = parent.content.length - 1;\n while (index < last) {\n index++;\n const next = parent.content[index];\n if (hidden || !next.hidden) {\n return next;\n }\n }\n node = parent;\n }\n return undefined;\n}\n\nexport function getStartlineNode(node: CstNode): CstNode {\n if (node.range.start.character === 0) {\n return node;\n }\n const line = node.range.start.line;\n let last = node;\n let index: number | undefined;\n while (node.container) {\n const parent = node.container;\n const selfIndex = index ?? parent.content.indexOf(node);\n if (selfIndex === 0) {\n node = parent;\n index = undefined;\n } else {\n index = selfIndex - 1;\n node = parent.content[index];\n }\n if (node.range.start.line !== line) {\n break;\n }\n last = node;\n }\n return last;\n}\n\nexport function getInteriorNodes(start: CstNode, end: CstNode): CstNode[] {\n const commonParent = getCommonParent(start, end);\n if (!commonParent) {\n return [];\n }\n return commonParent.parent.content.slice(commonParent.a + 1, commonParent.b);\n}\n\nfunction getCommonParent(a: CstNode, b: CstNode): CommonParent | undefined {\n const aParents = getParentChain(a);\n const bParents = getParentChain(b);\n let current: CommonParent | undefined;\n for (let i = 0; i < aParents.length && i < bParents.length; i++) {\n const aParent = aParents[i];\n const bParent = bParents[i];\n if (aParent.parent === bParent.parent) {\n current = {\n parent: aParent.parent,\n a: aParent.index,\n b: bParent.index\n };\n } else {\n break;\n }\n }\n return current;\n}\n\ninterface CommonParent {\n parent: CompositeCstNode\n a: number\n b: number\n}\n\nfunction getParentChain(node: CstNode): ParentLink[] {\n const chain: ParentLink[] = [];\n while (node.container) {\n const parent = node.container;\n const index = parent.content.indexOf(node);\n chain.push({\n parent,\n index\n });\n node = parent;\n }\n return chain.reverse();\n}\n\ninterface ParentLink {\n parent: CompositeCstNode\n index: number\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CstNode } from '../syntax-tree.js';\n\nexport class ErrorWithLocation extends Error {\n constructor(node: CstNode | undefined, message: string) {\n super(node ? `${message} at ${node.range.start.line}:${node.range.start.character}` : message);\n }\n}\n\nexport function assertUnreachable(_: never): never {\n throw new Error('Error! The input value was not handled.');\n}\n", "/******************************************************************************\n * This file was generated by langium-cli 3.0.0.\n * DO NOT EDIT MANUALLY!\n ******************************************************************************/\n\n/* eslint-disable */\nimport type { AstNode, Reference, ReferenceInfo, TypeMetaData } from '../../syntax-tree.js';\nimport { AbstractAstReflection } from '../../syntax-tree.js';\n\nexport const LangiumGrammarTerminals = {\n ID: /\\^?[_a-zA-Z][\\w_]*/,\n STRING: /\"(\\\\.|[^\"\\\\])*\"|'(\\\\.|[^'\\\\])*'/,\n NUMBER: /NaN|-?((\\d*\\.\\d+|\\d+)([Ee][+-]?\\d+)?|Infinity)/,\n RegexLiteral: /\\/(?![*+?])(?:[^\\r\\n\\[/\\\\]|\\\\.|\\[(?:[^\\r\\n\\]\\\\]|\\\\.)*\\])+\\/[a-z]*/,\n WS: /\\s+/,\n ML_COMMENT: /\\/\\*[\\s\\S]*?\\*\\//,\n SL_COMMENT: /\\/\\/[^\\n\\r]*/,\n};\n\nexport type AbstractRule = ParserRule | TerminalRule;\n\nexport const AbstractRule = 'AbstractRule';\n\nexport function isAbstractRule(item: unknown): item is AbstractRule {\n return reflection.isInstance(item, AbstractRule);\n}\n\nexport type AbstractType = InferredType | Interface | ParserRule | Type;\n\nexport const AbstractType = 'AbstractType';\n\nexport function isAbstractType(item: unknown): item is AbstractType {\n return reflection.isInstance(item, AbstractType);\n}\n\nexport type Condition = BooleanLiteral | Conjunction | Disjunction | Negation | ParameterReference;\n\nexport const Condition = 'Condition';\n\nexport function isCondition(item: unknown): item is Condition {\n return reflection.isInstance(item, Condition);\n}\n\nexport type FeatureName = 'current' | 'entry' | 'extends' | 'false' | 'fragment' | 'grammar' | 'hidden' | 'import' | 'infer' | 'infers' | 'interface' | 'returns' | 'terminal' | 'true' | 'type' | 'with' | PrimitiveType | string;\n\nexport function isFeatureName(item: unknown): item is FeatureName {\n return isPrimitiveType(item) || item === 'current' || item === 'entry' || item === 'extends' || item === 'false' || item === 'fragment' || item === 'grammar' || item === 'hidden' || item === 'import' || item === 'interface' || item === 'returns' || item === 'terminal' || item === 'true' || item === 'type' || item === 'infer' || item === 'infers' || item === 'with' || (typeof item === 'string' && (/\\^?[_a-zA-Z][\\w_]*/.test(item)));\n}\n\nexport type PrimitiveType = 'Date' | 'bigint' | 'boolean' | 'number' | 'string';\n\nexport function isPrimitiveType(item: unknown): item is PrimitiveType {\n return item === 'string' || item === 'number' || item === 'boolean' || item === 'Date' || item === 'bigint';\n}\n\nexport type TypeDefinition = ArrayType | ReferenceType | SimpleType | UnionType;\n\nexport const TypeDefinition = 'TypeDefinition';\n\nexport function isTypeDefinition(item: unknown): item is TypeDefinition {\n return reflection.isInstance(item, TypeDefinition);\n}\n\nexport type ValueLiteral = ArrayLiteral | BooleanLiteral | NumberLiteral | StringLiteral;\n\nexport const ValueLiteral = 'ValueLiteral';\n\nexport function isValueLiteral(item: unknown): item is ValueLiteral {\n return reflection.isInstance(item, ValueLiteral);\n}\n\nexport interface AbstractElement extends AstNode {\n readonly $type: 'AbstractElement' | 'Action' | 'Alternatives' | 'Assignment' | 'CharacterRange' | 'CrossReference' | 'EndOfFile' | 'Group' | 'Keyword' | 'NegatedToken' | 'RegexToken' | 'RuleCall' | 'TerminalAlternatives' | 'TerminalGroup' | 'TerminalRuleCall' | 'UnorderedGroup' | 'UntilToken' | 'Wildcard';\n cardinality?: '*' | '+' | '?';\n lookahead?: '?!' | '?;\n}\n\nexport const ArrayLiteral = 'ArrayLiteral';\n\nexport function isArrayLiteral(item: unknown): item is ArrayLiteral {\n return reflection.isInstance(item, ArrayLiteral);\n}\n\nexport interface ArrayType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'ArrayType';\n elementType: TypeDefinition;\n}\n\nexport const ArrayType = 'ArrayType';\n\nexport function isArrayType(item: unknown): item is ArrayType {\n return reflection.isInstance(item, ArrayType);\n}\n\nexport interface BooleanLiteral extends AstNode {\n readonly $container: ArrayLiteral | Conjunction | Disjunction | Group | NamedArgument | Negation | TypeAttribute;\n readonly $type: 'BooleanLiteral';\n true: boolean;\n}\n\nexport const BooleanLiteral = 'BooleanLiteral';\n\nexport function isBooleanLiteral(item: unknown): item is BooleanLiteral {\n return reflection.isInstance(item, BooleanLiteral);\n}\n\nexport interface Conjunction extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'Conjunction';\n left: Condition;\n right: Condition;\n}\n\nexport const Conjunction = 'Conjunction';\n\nexport function isConjunction(item: unknown): item is Conjunction {\n return reflection.isInstance(item, Conjunction);\n}\n\nexport interface Disjunction extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'Disjunction';\n left: Condition;\n right: Condition;\n}\n\nexport const Disjunction = 'Disjunction';\n\nexport function isDisjunction(item: unknown): item is Disjunction {\n return reflection.isInstance(item, Disjunction);\n}\n\nexport interface Grammar extends AstNode {\n readonly $type: 'Grammar';\n definesHiddenTokens: boolean;\n hiddenTokens: Array>;\n imports: Array;\n interfaces: Array;\n isDeclared: boolean;\n name?: string;\n rules: Array;\n types: Array;\n usedGrammars: Array>;\n}\n\nexport const Grammar = 'Grammar';\n\nexport function isGrammar(item: unknown): item is Grammar {\n return reflection.isInstance(item, Grammar);\n}\n\nexport interface GrammarImport extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'GrammarImport';\n path: string;\n}\n\nexport const GrammarImport = 'GrammarImport';\n\nexport function isGrammarImport(item: unknown): item is GrammarImport {\n return reflection.isInstance(item, GrammarImport);\n}\n\nexport interface InferredType extends AstNode {\n readonly $container: Action | ParserRule;\n readonly $type: 'InferredType';\n name: string;\n}\n\nexport const InferredType = 'InferredType';\n\nexport function isInferredType(item: unknown): item is InferredType {\n return reflection.isInstance(item, InferredType);\n}\n\nexport interface Interface extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'Interface';\n attributes: Array;\n name: string;\n superTypes: Array>;\n}\n\nexport const Interface = 'Interface';\n\nexport function isInterface(item: unknown): item is Interface {\n return reflection.isInstance(item, Interface);\n}\n\nexport interface NamedArgument extends AstNode {\n readonly $container: RuleCall;\n readonly $type: 'NamedArgument';\n calledByName: boolean;\n parameter?: Reference;\n value: Condition;\n}\n\nexport const NamedArgument = 'NamedArgument';\n\nexport function isNamedArgument(item: unknown): item is NamedArgument {\n return reflection.isInstance(item, NamedArgument);\n}\n\nexport interface Negation extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'Negation';\n value: Condition;\n}\n\nexport const Negation = 'Negation';\n\nexport function isNegation(item: unknown): item is Negation {\n return reflection.isInstance(item, Negation);\n}\n\nexport interface NumberLiteral extends AstNode {\n readonly $container: ArrayLiteral | TypeAttribute;\n readonly $type: 'NumberLiteral';\n value: number;\n}\n\nexport const NumberLiteral = 'NumberLiteral';\n\nexport function isNumberLiteral(item: unknown): item is NumberLiteral {\n return reflection.isInstance(item, NumberLiteral);\n}\n\nexport interface Parameter extends AstNode {\n readonly $container: ParserRule;\n readonly $type: 'Parameter';\n name: string;\n}\n\nexport const Parameter = 'Parameter';\n\nexport function isParameter(item: unknown): item is Parameter {\n return reflection.isInstance(item, Parameter);\n}\n\nexport interface ParameterReference extends AstNode {\n readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;\n readonly $type: 'ParameterReference';\n parameter: Reference;\n}\n\nexport const ParameterReference = 'ParameterReference';\n\nexport function isParameterReference(item: unknown): item is ParameterReference {\n return reflection.isInstance(item, ParameterReference);\n}\n\nexport interface ParserRule extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'ParserRule';\n dataType?: PrimitiveType;\n definesHiddenTokens: boolean;\n definition: AbstractElement;\n entry: boolean;\n fragment: boolean;\n hiddenTokens: Array>;\n inferredType?: InferredType;\n name: string;\n parameters: Array;\n returnType?: Reference;\n wildcard: boolean;\n}\n\nexport const ParserRule = 'ParserRule';\n\nexport function isParserRule(item: unknown): item is ParserRule {\n return reflection.isInstance(item, ParserRule);\n}\n\nexport interface ReferenceType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'ReferenceType';\n referenceType: TypeDefinition;\n}\n\nexport const ReferenceType = 'ReferenceType';\n\nexport function isReferenceType(item: unknown): item is ReferenceType {\n return reflection.isInstance(item, ReferenceType);\n}\n\nexport interface ReturnType extends AstNode {\n readonly $container: TerminalRule;\n readonly $type: 'ReturnType';\n name: PrimitiveType | string;\n}\n\nexport const ReturnType = 'ReturnType';\n\nexport function isReturnType(item: unknown): item is ReturnType {\n return reflection.isInstance(item, ReturnType);\n}\n\nexport interface SimpleType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'SimpleType';\n primitiveType?: PrimitiveType;\n stringType?: string;\n typeRef?: Reference;\n}\n\nexport const SimpleType = 'SimpleType';\n\nexport function isSimpleType(item: unknown): item is SimpleType {\n return reflection.isInstance(item, SimpleType);\n}\n\nexport interface StringLiteral extends AstNode {\n readonly $container: ArrayLiteral | TypeAttribute;\n readonly $type: 'StringLiteral';\n value: string;\n}\n\nexport const StringLiteral = 'StringLiteral';\n\nexport function isStringLiteral(item: unknown): item is StringLiteral {\n return reflection.isInstance(item, StringLiteral);\n}\n\nexport interface TerminalRule extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'TerminalRule';\n definition: AbstractElement;\n fragment: boolean;\n hidden: boolean;\n name: string;\n type?: ReturnType;\n}\n\nexport const TerminalRule = 'TerminalRule';\n\nexport function isTerminalRule(item: unknown): item is TerminalRule {\n return reflection.isInstance(item, TerminalRule);\n}\n\nexport interface Type extends AstNode {\n readonly $container: Grammar;\n readonly $type: 'Type';\n name: string;\n type: TypeDefinition;\n}\n\nexport const Type = 'Type';\n\nexport function isType(item: unknown): item is Type {\n return reflection.isInstance(item, Type);\n}\n\nexport interface TypeAttribute extends AstNode {\n readonly $container: Interface;\n readonly $type: 'TypeAttribute';\n defaultValue?: ValueLiteral;\n isOptional: boolean;\n name: FeatureName;\n type: TypeDefinition;\n}\n\nexport const TypeAttribute = 'TypeAttribute';\n\nexport function isTypeAttribute(item: unknown): item is TypeAttribute {\n return reflection.isInstance(item, TypeAttribute);\n}\n\nexport interface UnionType extends AstNode {\n readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;\n readonly $type: 'UnionType';\n types: Array;\n}\n\nexport const UnionType = 'UnionType';\n\nexport function isUnionType(item: unknown): item is UnionType {\n return reflection.isInstance(item, UnionType);\n}\n\nexport interface Action extends AbstractElement {\n readonly $type: 'Action';\n feature?: FeatureName;\n inferredType?: InferredType;\n operator?: '+=' | '=';\n type?: Reference;\n}\n\nexport const Action = 'Action';\n\nexport function isAction(item: unknown): item is Action {\n return reflection.isInstance(item, Action);\n}\n\nexport interface Alternatives extends AbstractElement {\n readonly $type: 'Alternatives';\n elements: Array;\n}\n\nexport const Alternatives = 'Alternatives';\n\nexport function isAlternatives(item: unknown): item is Alternatives {\n return reflection.isInstance(item, Alternatives);\n}\n\nexport interface Assignment extends AbstractElement {\n readonly $type: 'Assignment';\n feature: FeatureName;\n operator: '+=' | '=' | '?=';\n terminal: AbstractElement;\n}\n\nexport const Assignment = 'Assignment';\n\nexport function isAssignment(item: unknown): item is Assignment {\n return reflection.isInstance(item, Assignment);\n}\n\nexport interface CharacterRange extends AbstractElement {\n readonly $type: 'CharacterRange';\n left: Keyword;\n right?: Keyword;\n}\n\nexport const CharacterRange = 'CharacterRange';\n\nexport function isCharacterRange(item: unknown): item is CharacterRange {\n return reflection.isInstance(item, CharacterRange);\n}\n\nexport interface CrossReference extends AbstractElement {\n readonly $type: 'CrossReference';\n deprecatedSyntax: boolean;\n terminal?: AbstractElement;\n type: Reference;\n}\n\nexport const CrossReference = 'CrossReference';\n\nexport function isCrossReference(item: unknown): item is CrossReference {\n return reflection.isInstance(item, CrossReference);\n}\n\nexport interface EndOfFile extends AbstractElement {\n readonly $type: 'EndOfFile';\n}\n\nexport const EndOfFile = 'EndOfFile';\n\nexport function isEndOfFile(item: unknown): item is EndOfFile {\n return reflection.isInstance(item, EndOfFile);\n}\n\nexport interface Group extends AbstractElement {\n readonly $type: 'Group';\n elements: Array;\n guardCondition?: Condition;\n}\n\nexport const Group = 'Group';\n\nexport function isGroup(item: unknown): item is Group {\n return reflection.isInstance(item, Group);\n}\n\nexport interface Keyword extends AbstractElement {\n readonly $container: CharacterRange;\n readonly $type: 'Keyword';\n value: string;\n}\n\nexport const Keyword = 'Keyword';\n\nexport function isKeyword(item: unknown): item is Keyword {\n return reflection.isInstance(item, Keyword);\n}\n\nexport interface NegatedToken extends AbstractElement {\n readonly $type: 'NegatedToken';\n terminal: AbstractElement;\n}\n\nexport const NegatedToken = 'NegatedToken';\n\nexport function isNegatedToken(item: unknown): item is NegatedToken {\n return reflection.isInstance(item, NegatedToken);\n}\n\nexport interface RegexToken extends AbstractElement {\n readonly $type: 'RegexToken';\n regex: string;\n}\n\nexport const RegexToken = 'RegexToken';\n\nexport function isRegexToken(item: unknown): item is RegexToken {\n return reflection.isInstance(item, RegexToken);\n}\n\nexport interface RuleCall extends AbstractElement {\n readonly $type: 'RuleCall';\n arguments: Array;\n rule: Reference;\n}\n\nexport const RuleCall = 'RuleCall';\n\nexport function isRuleCall(item: unknown): item is RuleCall {\n return reflection.isInstance(item, RuleCall);\n}\n\nexport interface TerminalAlternatives extends AbstractElement {\n readonly $type: 'TerminalAlternatives';\n elements: Array;\n}\n\nexport const TerminalAlternatives = 'TerminalAlternatives';\n\nexport function isTerminalAlternatives(item: unknown): item is TerminalAlternatives {\n return reflection.isInstance(item, TerminalAlternatives);\n}\n\nexport interface TerminalGroup extends AbstractElement {\n readonly $type: 'TerminalGroup';\n elements: Array;\n}\n\nexport const TerminalGroup = 'TerminalGroup';\n\nexport function isTerminalGroup(item: unknown): item is TerminalGroup {\n return reflection.isInstance(item, TerminalGroup);\n}\n\nexport interface TerminalRuleCall extends AbstractElement {\n readonly $type: 'TerminalRuleCall';\n rule: Reference;\n}\n\nexport const TerminalRuleCall = 'TerminalRuleCall';\n\nexport function isTerminalRuleCall(item: unknown): item is TerminalRuleCall {\n return reflection.isInstance(item, TerminalRuleCall);\n}\n\nexport interface UnorderedGroup extends AbstractElement {\n readonly $type: 'UnorderedGroup';\n elements: Array;\n}\n\nexport const UnorderedGroup = 'UnorderedGroup';\n\nexport function isUnorderedGroup(item: unknown): item is UnorderedGroup {\n return reflection.isInstance(item, UnorderedGroup);\n}\n\nexport interface UntilToken extends AbstractElement {\n readonly $type: 'UntilToken';\n terminal: AbstractElement;\n}\n\nexport const UntilToken = 'UntilToken';\n\nexport function isUntilToken(item: unknown): item is UntilToken {\n return reflection.isInstance(item, UntilToken);\n}\n\nexport interface Wildcard extends AbstractElement {\n readonly $type: 'Wildcard';\n}\n\nexport const Wildcard = 'Wildcard';\n\nexport function isWildcard(item: unknown): item is Wildcard {\n return reflection.isInstance(item, Wildcard);\n}\n\nexport type LangiumGrammarAstType = {\n AbstractElement: AbstractElement\n AbstractRule: AbstractRule\n AbstractType: AbstractType\n Action: Action\n Alternatives: Alternatives\n ArrayLiteral: ArrayLiteral\n ArrayType: ArrayType\n Assignment: Assignment\n BooleanLiteral: BooleanLiteral\n CharacterRange: CharacterRange\n Condition: Condition\n Conjunction: Conjunction\n CrossReference: CrossReference\n Disjunction: Disjunction\n EndOfFile: EndOfFile\n Grammar: Grammar\n GrammarImport: GrammarImport\n Group: Group\n InferredType: InferredType\n Interface: Interface\n Keyword: Keyword\n NamedArgument: NamedArgument\n NegatedToken: NegatedToken\n Negation: Negation\n NumberLiteral: NumberLiteral\n Parameter: Parameter\n ParameterReference: ParameterReference\n ParserRule: ParserRule\n ReferenceType: ReferenceType\n RegexToken: RegexToken\n ReturnType: ReturnType\n RuleCall: RuleCall\n SimpleType: SimpleType\n StringLiteral: StringLiteral\n TerminalAlternatives: TerminalAlternatives\n TerminalGroup: TerminalGroup\n TerminalRule: TerminalRule\n TerminalRuleCall: TerminalRuleCall\n Type: Type\n TypeAttribute: TypeAttribute\n TypeDefinition: TypeDefinition\n UnionType: UnionType\n UnorderedGroup: UnorderedGroup\n UntilToken: UntilToken\n ValueLiteral: ValueLiteral\n Wildcard: Wildcard\n}\n\nexport class LangiumGrammarAstReflection extends AbstractAstReflection {\n\n getAllTypes(): string[] {\n return ['AbstractElement', 'AbstractRule', 'AbstractType', 'Action', 'Alternatives', 'ArrayLiteral', 'ArrayType', 'Assignment', 'BooleanLiteral', 'CharacterRange', 'Condition', 'Conjunction', 'CrossReference', 'Disjunction', 'EndOfFile', 'Grammar', 'GrammarImport', 'Group', 'InferredType', 'Interface', 'Keyword', 'NamedArgument', 'NegatedToken', 'Negation', 'NumberLiteral', 'Parameter', 'ParameterReference', 'ParserRule', 'ReferenceType', 'RegexToken', 'ReturnType', 'RuleCall', 'SimpleType', 'StringLiteral', 'TerminalAlternatives', 'TerminalGroup', 'TerminalRule', 'TerminalRuleCall', 'Type', 'TypeAttribute', 'TypeDefinition', 'UnionType', 'UnorderedGroup', 'UntilToken', 'ValueLiteral', 'Wildcard'];\n }\n\n protected override computeIsSubtype(subtype: string, supertype: string): boolean {\n switch (subtype) {\n case Action:\n case Alternatives:\n case Assignment:\n case CharacterRange:\n case CrossReference:\n case EndOfFile:\n case Group:\n case Keyword:\n case NegatedToken:\n case RegexToken:\n case RuleCall:\n case TerminalAlternatives:\n case TerminalGroup:\n case TerminalRuleCall:\n case UnorderedGroup:\n case UntilToken:\n case Wildcard: {\n return this.isSubtype(AbstractElement, supertype);\n }\n case ArrayLiteral:\n case NumberLiteral:\n case StringLiteral: {\n return this.isSubtype(ValueLiteral, supertype);\n }\n case ArrayType:\n case ReferenceType:\n case SimpleType:\n case UnionType: {\n return this.isSubtype(TypeDefinition, supertype);\n }\n case BooleanLiteral: {\n return this.isSubtype(Condition, supertype) || this.isSubtype(ValueLiteral, supertype);\n }\n case Conjunction:\n case Disjunction:\n case Negation:\n case ParameterReference: {\n return this.isSubtype(Condition, supertype);\n }\n case InferredType:\n case Interface:\n case Type: {\n return this.isSubtype(AbstractType, supertype);\n }\n case ParserRule: {\n return this.isSubtype(AbstractRule, supertype) || this.isSubtype(AbstractType, supertype);\n }\n case TerminalRule: {\n return this.isSubtype(AbstractRule, supertype);\n }\n default: {\n return false;\n }\n }\n }\n\n getReferenceType(refInfo: ReferenceInfo): string {\n const referenceId = `${refInfo.container.$type}:${refInfo.property}`;\n switch (referenceId) {\n case 'Action:type':\n case 'CrossReference:type':\n case 'Interface:superTypes':\n case 'ParserRule:returnType':\n case 'SimpleType:typeRef': {\n return AbstractType;\n }\n case 'Grammar:hiddenTokens':\n case 'ParserRule:hiddenTokens':\n case 'RuleCall:rule': {\n return AbstractRule;\n }\n case 'Grammar:usedGrammars': {\n return Grammar;\n }\n case 'NamedArgument:parameter':\n case 'ParameterReference:parameter': {\n return Parameter;\n }\n case 'TerminalRuleCall:rule': {\n return TerminalRule;\n }\n default: {\n throw new Error(`${referenceId} is not a valid reference id.`);\n }\n }\n }\n\n getTypeMetaData(type: string): TypeMetaData {\n switch (type) {\n case 'AbstractElement': {\n return {\n name: 'AbstractElement',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' }\n ]\n };\n }\n case 'ArrayLiteral': {\n return {\n name: 'ArrayLiteral',\n properties: [\n { name: 'elements', defaultValue: [] }\n ]\n };\n }\n case 'ArrayType': {\n return {\n name: 'ArrayType',\n properties: [\n { name: 'elementType' }\n ]\n };\n }\n case 'BooleanLiteral': {\n return {\n name: 'BooleanLiteral',\n properties: [\n { name: 'true', defaultValue: false }\n ]\n };\n }\n case 'Conjunction': {\n return {\n name: 'Conjunction',\n properties: [\n { name: 'left' },\n { name: 'right' }\n ]\n };\n }\n case 'Disjunction': {\n return {\n name: 'Disjunction',\n properties: [\n { name: 'left' },\n { name: 'right' }\n ]\n };\n }\n case 'Grammar': {\n return {\n name: 'Grammar',\n properties: [\n { name: 'definesHiddenTokens', defaultValue: false },\n { name: 'hiddenTokens', defaultValue: [] },\n { name: 'imports', defaultValue: [] },\n { name: 'interfaces', defaultValue: [] },\n { name: 'isDeclared', defaultValue: false },\n { name: 'name' },\n { name: 'rules', defaultValue: [] },\n { name: 'types', defaultValue: [] },\n { name: 'usedGrammars', defaultValue: [] }\n ]\n };\n }\n case 'GrammarImport': {\n return {\n name: 'GrammarImport',\n properties: [\n { name: 'path' }\n ]\n };\n }\n case 'InferredType': {\n return {\n name: 'InferredType',\n properties: [\n { name: 'name' }\n ]\n };\n }\n case 'Interface': {\n return {\n name: 'Interface',\n properties: [\n { name: 'attributes', defaultValue: [] },\n { name: 'name' },\n { name: 'superTypes', defaultValue: [] }\n ]\n };\n }\n case 'NamedArgument': {\n return {\n name: 'NamedArgument',\n properties: [\n { name: 'calledByName', defaultValue: false },\n { name: 'parameter' },\n { name: 'value' }\n ]\n };\n }\n case 'Negation': {\n return {\n name: 'Negation',\n properties: [\n { name: 'value' }\n ]\n };\n }\n case 'NumberLiteral': {\n return {\n name: 'NumberLiteral',\n properties: [\n { name: 'value' }\n ]\n };\n }\n case 'Parameter': {\n return {\n name: 'Parameter',\n properties: [\n { name: 'name' }\n ]\n };\n }\n case 'ParameterReference': {\n return {\n name: 'ParameterReference',\n properties: [\n { name: 'parameter' }\n ]\n };\n }\n case 'ParserRule': {\n return {\n name: 'ParserRule',\n properties: [\n { name: 'dataType' },\n { name: 'definesHiddenTokens', defaultValue: false },\n { name: 'definition' },\n { name: 'entry', defaultValue: false },\n { name: 'fragment', defaultValue: false },\n { name: 'hiddenTokens', defaultValue: [] },\n { name: 'inferredType' },\n { name: 'name' },\n { name: 'parameters', defaultValue: [] },\n { name: 'returnType' },\n { name: 'wildcard', defaultValue: false }\n ]\n };\n }\n case 'ReferenceType': {\n return {\n name: 'ReferenceType',\n properties: [\n { name: 'referenceType' }\n ]\n };\n }\n case 'ReturnType': {\n return {\n name: 'ReturnType',\n properties: [\n { name: 'name' }\n ]\n };\n }\n case 'SimpleType': {\n return {\n name: 'SimpleType',\n properties: [\n { name: 'primitiveType' },\n { name: 'stringType' },\n { name: 'typeRef' }\n ]\n };\n }\n case 'StringLiteral': {\n return {\n name: 'StringLiteral',\n properties: [\n { name: 'value' }\n ]\n };\n }\n case 'TerminalRule': {\n return {\n name: 'TerminalRule',\n properties: [\n { name: 'definition' },\n { name: 'fragment', defaultValue: false },\n { name: 'hidden', defaultValue: false },\n { name: 'name' },\n { name: 'type' }\n ]\n };\n }\n case 'Type': {\n return {\n name: 'Type',\n properties: [\n { name: 'name' },\n { name: 'type' }\n ]\n };\n }\n case 'TypeAttribute': {\n return {\n name: 'TypeAttribute',\n properties: [\n { name: 'defaultValue' },\n { name: 'isOptional', defaultValue: false },\n { name: 'name' },\n { name: 'type' }\n ]\n };\n }\n case 'UnionType': {\n return {\n name: 'UnionType',\n properties: [\n { name: 'types', defaultValue: [] }\n ]\n };\n }\n case 'Action': {\n return {\n name: 'Action',\n properties: [\n { name: 'cardinality' },\n { name: 'feature' },\n { name: 'inferredType' },\n { name: 'lookahead' },\n { name: 'operator' },\n { name: 'type' }\n ]\n };\n }\n case 'Alternatives': {\n return {\n name: 'Alternatives',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'Assignment': {\n return {\n name: 'Assignment',\n properties: [\n { name: 'cardinality' },\n { name: 'feature' },\n { name: 'lookahead' },\n { name: 'operator' },\n { name: 'terminal' }\n ]\n };\n }\n case 'CharacterRange': {\n return {\n name: 'CharacterRange',\n properties: [\n { name: 'cardinality' },\n { name: 'left' },\n { name: 'lookahead' },\n { name: 'right' }\n ]\n };\n }\n case 'CrossReference': {\n return {\n name: 'CrossReference',\n properties: [\n { name: 'cardinality' },\n { name: 'deprecatedSyntax', defaultValue: false },\n { name: 'lookahead' },\n { name: 'terminal' },\n { name: 'type' }\n ]\n };\n }\n case 'EndOfFile': {\n return {\n name: 'EndOfFile',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' }\n ]\n };\n }\n case 'Group': {\n return {\n name: 'Group',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'guardCondition' },\n { name: 'lookahead' }\n ]\n };\n }\n case 'Keyword': {\n return {\n name: 'Keyword',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'value' }\n ]\n };\n }\n case 'NegatedToken': {\n return {\n name: 'NegatedToken',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'terminal' }\n ]\n };\n }\n case 'RegexToken': {\n return {\n name: 'RegexToken',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'regex' }\n ]\n };\n }\n case 'RuleCall': {\n return {\n name: 'RuleCall',\n properties: [\n { name: 'arguments', defaultValue: [] },\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'rule' }\n ]\n };\n }\n case 'TerminalAlternatives': {\n return {\n name: 'TerminalAlternatives',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'TerminalGroup': {\n return {\n name: 'TerminalGroup',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'TerminalRuleCall': {\n return {\n name: 'TerminalRuleCall',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'rule' }\n ]\n };\n }\n case 'UnorderedGroup': {\n return {\n name: 'UnorderedGroup',\n properties: [\n { name: 'cardinality' },\n { name: 'elements', defaultValue: [] },\n { name: 'lookahead' }\n ]\n };\n }\n case 'UntilToken': {\n return {\n name: 'UntilToken',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' },\n { name: 'terminal' }\n ]\n };\n }\n case 'Wildcard': {\n return {\n name: 'Wildcard',\n properties: [\n { name: 'cardinality' },\n { name: 'lookahead' }\n ]\n };\n }\n default: {\n return {\n name: type,\n properties: []\n };\n }\n }\n }\n}\n\nexport const reflection = new LangiumGrammarAstReflection();\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Range } from 'vscode-languageserver-types';\nimport type { AstNode, AstReflection, CstNode, GenericAstNode, Mutable, PropertyType, Reference, ReferenceInfo } from '../syntax-tree.js';\nimport type { Stream, TreeStream } from './stream.js';\nimport type { LangiumDocument } from '../workspace/documents.js';\nimport { isAstNode, isReference } from '../syntax-tree.js';\nimport { DONE_RESULT, stream, StreamImpl, TreeStreamImpl } from './stream.js';\nimport { inRange } from './cst-utils.js';\n\n/**\n * Link the `$container` and other related properties of every AST node that is directly contained\n * in the given `node`.\n */\nexport function linkContentToContainer(node: AstNode): void {\n for (const [name, value] of Object.entries(node)) {\n if (!name.startsWith('$')) {\n if (Array.isArray(value)) {\n value.forEach((item, index) => {\n if (isAstNode(item)) {\n (item as Mutable).$container = node;\n (item as Mutable).$containerProperty = name;\n (item as Mutable).$containerIndex = index;\n }\n });\n } else if (isAstNode(value)) {\n (value as Mutable).$container = node;\n (value as Mutable).$containerProperty = name;\n }\n }\n }\n}\n\n/**\n * Walk along the hierarchy of containers from the given AST node to the root and return the first\n * node that matches the type predicate. If the start node itself matches, it is returned.\n * If no container matches, `undefined` is returned.\n */\nexport function getContainerOfType(node: AstNode | undefined, typePredicate: (n: AstNode) => n is T): T | undefined {\n let item = node;\n while (item) {\n if (typePredicate(item)) {\n return item;\n }\n item = item.$container;\n }\n return undefined;\n}\n\n/**\n * Walk along the hierarchy of containers from the given AST node to the root and check for existence\n * of a container that matches the given predicate. The start node is included in the checks.\n */\nexport function hasContainerOfType(node: AstNode | undefined, predicate: (n: AstNode) => boolean): boolean {\n let item = node;\n while (item) {\n if (predicate(item)) {\n return true;\n }\n item = item.$container;\n }\n return false;\n}\n\n/**\n * Retrieve the document in which the given AST node is contained. A reference to the document is\n * usually held by the root node of the AST.\n *\n * @throws an error if the node is not contained in a document.\n */\nexport function getDocument(node: AstNode): LangiumDocument {\n const rootNode = findRootNode(node);\n const result = rootNode.$document;\n if (!result) {\n throw new Error('AST node has no document.');\n }\n return result as LangiumDocument;\n}\n\n/**\n * Returns the root node of the given AST node by following the `$container` references.\n */\nexport function findRootNode(node: AstNode): AstNode {\n while (node.$container) {\n node = node.$container;\n }\n return node;\n}\n\nexport interface AstStreamOptions {\n /**\n * Optional target range that the nodes in the stream need to intersect\n */\n range?: Range\n}\n\n/**\n * Create a stream of all AST nodes that are directly contained in the given node. This includes\n * single-valued as well as multi-valued (array) properties.\n */\nexport function streamContents(node: AstNode, options?: AstStreamOptions): Stream {\n if (!node) {\n throw new Error('Node must be an AstNode.');\n }\n const range = options?.range;\n type State = { keys: string[], keyIndex: number, arrayIndex: number };\n return new StreamImpl(() => ({\n keys: Object.keys(node),\n keyIndex: 0,\n arrayIndex: 0\n }), state => {\n while (state.keyIndex < state.keys.length) {\n const property = state.keys[state.keyIndex];\n if (!property.startsWith('$')) {\n const value = (node as GenericAstNode)[property];\n if (isAstNode(value)) {\n state.keyIndex++;\n if (isAstNodeInRange(value, range)) {\n return { done: false, value };\n }\n } else if (Array.isArray(value)) {\n while (state.arrayIndex < value.length) {\n const index = state.arrayIndex++;\n const element = value[index];\n if (isAstNode(element) && isAstNodeInRange(element, range)) {\n return { done: false, value: element };\n }\n }\n state.arrayIndex = 0;\n }\n }\n state.keyIndex++;\n }\n return DONE_RESULT;\n });\n}\n\n/**\n * Create a stream of all AST nodes that are directly and indirectly contained in the given root node.\n * This does not include the root node itself.\n */\nexport function streamAllContents(root: AstNode, options?: AstStreamOptions): TreeStream {\n if (!root) {\n throw new Error('Root node must be an AstNode.');\n }\n return new TreeStreamImpl(root, node => streamContents(node, options));\n}\n\n/**\n * Create a stream of all AST nodes that are directly and indirectly contained in the given root node,\n * including the root node itself.\n */\nexport function streamAst(root: AstNode, options?: AstStreamOptions): TreeStream {\n if (!root) {\n throw new Error('Root node must be an AstNode.');\n } else if (options?.range && !isAstNodeInRange(root, options.range)) {\n // Return an empty stream if the root node isn't in range\n return new TreeStreamImpl(root, () => []);\n }\n return new TreeStreamImpl(root, node => streamContents(node, options), { includeRoot: true });\n}\n\nfunction isAstNodeInRange(astNode: AstNode, range?: Range): boolean {\n if (!range) {\n return true;\n }\n const nodeRange = astNode.$cstNode?.range;\n if (!nodeRange) {\n return false;\n }\n return inRange(nodeRange, range);\n}\n\n/**\n * Create a stream of all cross-references that are held by the given AST node. This includes\n * single-valued as well as multi-valued (array) properties.\n */\nexport function streamReferences(node: AstNode): Stream {\n type State = { keys: string[], keyIndex: number, arrayIndex: number };\n return new StreamImpl(() => ({\n keys: Object.keys(node),\n keyIndex: 0,\n arrayIndex: 0\n }), state => {\n while (state.keyIndex < state.keys.length) {\n const property = state.keys[state.keyIndex];\n if (!property.startsWith('$')) {\n const value = (node as GenericAstNode)[property];\n if (isReference(value)) {\n state.keyIndex++;\n return { done: false, value: { reference: value, container: node, property } };\n } else if (Array.isArray(value)) {\n while (state.arrayIndex < value.length) {\n const index = state.arrayIndex++;\n const element = value[index];\n if (isReference(element)) {\n return { done: false, value: { reference: element, container: node, property, index } };\n }\n }\n state.arrayIndex = 0;\n }\n }\n state.keyIndex++;\n }\n return DONE_RESULT;\n });\n}\n\n/**\n * Returns a Stream of references to the target node from the AstNode tree\n *\n * @param targetNode AstNode we are looking for\n * @param lookup AstNode where we search for references. If not provided, the root node of the document is used as the default value\n */\nexport function findLocalReferences(targetNode: AstNode, lookup = getDocument(targetNode).parseResult.value): Stream {\n const refs: Reference[] = [];\n streamAst(lookup).forEach(node => {\n streamReferences(node).forEach(refInfo => {\n if (refInfo.reference.ref === targetNode) {\n refs.push(refInfo.reference);\n }\n });\n });\n return stream(refs);\n}\n\n/**\n * Assigns all mandatory AST properties to the specified node.\n *\n * @param reflection Reflection object used to gather mandatory properties for the node.\n * @param node Specified node is modified in place and properties are directly assigned.\n */\nexport function assignMandatoryProperties(reflection: AstReflection, node: AstNode): void {\n const typeMetaData = reflection.getTypeMetaData(node.$type);\n const genericNode = node as GenericAstNode;\n for (const property of typeMetaData.properties) {\n // Only set the value if the property is not already set and if it has a default value\n if (property.defaultValue !== undefined && genericNode[property.name] === undefined) {\n genericNode[property.name] = copyDefaultValue(property.defaultValue);\n }\n }\n}\n\nfunction copyDefaultValue(propertyType: PropertyType): PropertyType {\n if (Array.isArray(propertyType)) {\n return [...propertyType.map(copyDefaultValue)];\n } else {\n return propertyType;\n }\n}\n\n/**\n * Creates a deep copy of the specified AST node.\n * The resulting copy will only contain semantically relevant information, such as the `$type` property and AST properties.\n *\n * References are copied without resolved cross reference. The specified function is used to rebuild them.\n */\nexport function copyAstNode(node: T, buildReference: (node: AstNode, property: string, refNode: CstNode | undefined, refText: string) => Reference): T {\n const copy: GenericAstNode = { $type: node.$type };\n\n for (const [name, value] of Object.entries(node)) {\n if (!name.startsWith('$')) {\n if (isAstNode(value)) {\n copy[name] = copyAstNode(value, buildReference);\n } else if (isReference(value)) {\n copy[name] = buildReference(\n copy,\n name,\n value.$refNode,\n value.$refText\n );\n } else if (Array.isArray(value)) {\n const copiedArray: unknown[] = [];\n for (const element of value) {\n if (isAstNode(element)) {\n copiedArray.push(copyAstNode(element, buildReference));\n } else if (isReference(element)) {\n copiedArray.push(\n buildReference(\n copy,\n name,\n element.$refNode,\n element.$refText\n )\n );\n } else {\n copiedArray.push(element);\n }\n }\n copy[name] = copiedArray;\n } else {\n copy[name] = value;\n }\n }\n }\n\n linkContentToContainer(copy);\n return copy as unknown as T;\n}\n", "import type { Character, IRegExpAST, RegExpFlags } from \"../types\";\n\nexport function cc(char: string): number {\n return char.charCodeAt(0);\n}\n\nexport function insertToSet(item: T | T[], set: T[]) {\n if (Array.isArray(item)) {\n item.forEach(function (subItem) {\n set.push(subItem);\n });\n } else {\n set.push(item);\n }\n}\n\nexport function addFlag(\n flagObj: RegExpFlags,\n flagKey: keyof Omit,\n) {\n if (flagObj[flagKey] === true) {\n throw \"duplicate flag \" + flagKey;\n }\n\n const x: boolean = flagObj[flagKey];\n flagObj[flagKey] = true;\n}\n\nexport function ASSERT_EXISTS(obj: any): obj is T {\n // istanbul ignore next\n if (obj === undefined) {\n throw Error(\"Internal Error - Should never get here!\");\n }\n return true;\n}\n\n// istanbul ignore next\nexport function ASSERT_NEVER_REACH_HERE(): any {\n throw Error(\"Internal Error - Should never get here!\");\n}\n\nexport function isCharacter(obj: { type: string }): obj is Character {\n return obj[\"type\"] === \"Character\";\n}\n", "import { cc } from \"./utils.js\";\n\nexport const digitsCharCodes: number[] = [];\nfor (let i = cc(\"0\"); i <= cc(\"9\"); i++) {\n digitsCharCodes.push(i);\n}\n\nexport const wordCharCodes: number[] = [cc(\"_\")].concat(digitsCharCodes);\nfor (let i = cc(\"a\"); i <= cc(\"z\"); i++) {\n wordCharCodes.push(i);\n}\n\nfor (let i = cc(\"A\"); i <= cc(\"Z\"); i++) {\n wordCharCodes.push(i);\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#character-classes\nexport const whitespaceCodes: number[] = [\n cc(\" \"),\n cc(\"\\f\"),\n cc(\"\\n\"),\n cc(\"\\r\"),\n cc(\"\\t\"),\n cc(\"\\v\"),\n cc(\"\\t\"),\n cc(\"\\u00a0\"),\n cc(\"\\u1680\"),\n cc(\"\\u2000\"),\n cc(\"\\u2001\"),\n cc(\"\\u2002\"),\n cc(\"\\u2003\"),\n cc(\"\\u2004\"),\n cc(\"\\u2005\"),\n cc(\"\\u2006\"),\n cc(\"\\u2007\"),\n cc(\"\\u2008\"),\n cc(\"\\u2009\"),\n cc(\"\\u200a\"),\n cc(\"\\u2028\"),\n cc(\"\\u2029\"),\n cc(\"\\u202f\"),\n cc(\"\\u205f\"),\n cc(\"\\u3000\"),\n cc(\"\\ufeff\"),\n];\n", "import type {\n Alternative,\n Assertion,\n Atom,\n Character,\n Disjunction,\n Group,\n GroupBackReference,\n Location,\n Quantifier,\n Range,\n RegExpFlags,\n RegExpPattern,\n Set,\n Term,\n} from \"../types\";\nimport {\n addFlag,\n ASSERT_EXISTS,\n ASSERT_NEVER_REACH_HERE,\n cc,\n insertToSet,\n isCharacter,\n} from \"./utils.js\";\nimport {\n digitsCharCodes,\n whitespaceCodes,\n wordCharCodes,\n} from \"./character-classes.js\";\n\n// consts and utilities\nconst hexDigitPattern = /[0-9a-fA-F]/;\nconst decimalPattern = /[0-9]/;\nconst decimalPatternNoZero = /[1-9]/;\n\n// https://hackernoon.com/the-madness-of-parsing-real-world-javascript-regexps-d9ee336df983\n// https://www.ecma-international.org/ecma-262/8.0/index.html#prod-Pattern\nexport class RegExpParser {\n protected idx: number = 0;\n protected input: string = \"\";\n protected groupIdx: number = 0;\n\n protected saveState() {\n return {\n idx: this.idx,\n input: this.input,\n groupIdx: this.groupIdx,\n };\n }\n\n protected restoreState(newState: {\n idx: number;\n input: string;\n groupIdx: number;\n }) {\n this.idx = newState.idx;\n this.input = newState.input;\n this.groupIdx = newState.groupIdx;\n }\n\n public pattern(input: string): RegExpPattern {\n // parser state\n this.idx = 0;\n this.input = input;\n this.groupIdx = 0;\n\n this.consumeChar(\"/\");\n const value = this.disjunction();\n this.consumeChar(\"/\");\n\n const flags: RegExpFlags = {\n type: \"Flags\",\n loc: { begin: this.idx, end: input.length },\n global: false,\n ignoreCase: false,\n multiLine: false,\n unicode: false,\n sticky: false,\n };\n\n while (this.isRegExpFlag()) {\n switch (this.popChar()) {\n case \"g\":\n addFlag(flags, \"global\");\n break;\n case \"i\":\n addFlag(flags, \"ignoreCase\");\n break;\n case \"m\":\n addFlag(flags, \"multiLine\");\n break;\n case \"u\":\n addFlag(flags, \"unicode\");\n break;\n case \"y\":\n addFlag(flags, \"sticky\");\n break;\n }\n }\n\n if (this.idx !== this.input.length) {\n throw Error(\"Redundant input: \" + this.input.substring(this.idx));\n }\n return {\n type: \"Pattern\",\n flags: flags,\n value: value,\n loc: this.loc(0),\n };\n }\n\n protected disjunction(): Disjunction {\n const alts = [];\n const begin = this.idx;\n\n alts.push(this.alternative());\n\n while (this.peekChar() === \"|\") {\n this.consumeChar(\"|\");\n alts.push(this.alternative());\n }\n\n return { type: \"Disjunction\", value: alts, loc: this.loc(begin) };\n }\n\n protected alternative(): Alternative {\n const terms = [];\n const begin = this.idx;\n\n while (this.isTerm()) {\n terms.push(this.term());\n }\n\n return { type: \"Alternative\", value: terms, loc: this.loc(begin) };\n }\n\n protected term(): Term {\n if (this.isAssertion()) {\n return this.assertion();\n } else {\n return this.atom();\n }\n }\n\n protected assertion(): Assertion {\n const begin = this.idx;\n switch (this.popChar()) {\n case \"^\":\n return {\n type: \"StartAnchor\",\n loc: this.loc(begin),\n };\n case \"$\":\n return { type: \"EndAnchor\", loc: this.loc(begin) };\n // '\\b' or '\\B'\n case \"\\\\\":\n switch (this.popChar()) {\n case \"b\":\n return {\n type: \"WordBoundary\",\n loc: this.loc(begin),\n };\n case \"B\":\n return {\n type: \"NonWordBoundary\",\n loc: this.loc(begin),\n };\n }\n // istanbul ignore next\n throw Error(\"Invalid Assertion Escape\");\n // '(?=' or '(?!'\n case \"(\":\n this.consumeChar(\"?\");\n\n let type: \"Lookahead\" | \"NegativeLookahead\" | undefined;\n switch (this.popChar()) {\n case \"=\":\n type = \"Lookahead\";\n break;\n case \"!\":\n type = \"NegativeLookahead\";\n break;\n }\n ASSERT_EXISTS(type);\n\n const disjunction = this.disjunction();\n\n this.consumeChar(\")\");\n\n return {\n type: type!,\n value: disjunction,\n loc: this.loc(begin),\n };\n }\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected quantifier(\n isBacktracking: boolean = false,\n ): Quantifier | undefined {\n let range: Partial | undefined = undefined;\n const begin = this.idx;\n switch (this.popChar()) {\n case \"*\":\n range = {\n atLeast: 0,\n atMost: Infinity,\n };\n break;\n case \"+\":\n range = {\n atLeast: 1,\n atMost: Infinity,\n };\n break;\n case \"?\":\n range = {\n atLeast: 0,\n atMost: 1,\n };\n break;\n case \"{\":\n const atLeast = this.integerIncludingZero();\n switch (this.popChar()) {\n case \"}\":\n range = {\n atLeast: atLeast,\n atMost: atLeast,\n };\n break;\n case \",\":\n let atMost;\n if (this.isDigit()) {\n atMost = this.integerIncludingZero();\n range = {\n atLeast: atLeast,\n atMost: atMost,\n };\n } else {\n range = {\n atLeast: atLeast,\n atMost: Infinity,\n };\n }\n this.consumeChar(\"}\");\n break;\n }\n // throwing exceptions from \"ASSERT_EXISTS\" during backtracking\n // causes severe performance degradations\n if (isBacktracking === true && range === undefined) {\n return undefined;\n }\n ASSERT_EXISTS(range);\n break;\n }\n\n // throwing exceptions from \"ASSERT_EXISTS\" during backtracking\n // causes severe performance degradations\n if (isBacktracking === true && range === undefined) {\n return undefined;\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(range)) {\n if (this.peekChar(0) === \"?\") {\n this.consumeChar(\"?\");\n range.greedy = false;\n } else {\n range.greedy = true;\n }\n\n range.type = \"Quantifier\";\n range.loc = this.loc(begin);\n return range as Quantifier;\n }\n }\n\n protected atom(): Atom {\n let atom: Omit | undefined;\n const begin = this.idx;\n switch (this.peekChar()) {\n case \".\":\n atom = this.dotAll();\n break;\n case \"\\\\\":\n atom = this.atomEscape();\n break;\n case \"[\":\n atom = this.characterClass();\n break;\n case \"(\":\n atom = this.group();\n break;\n }\n\n if (atom === undefined && this.isPatternCharacter()) {\n atom = this.patternCharacter();\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(atom)) {\n atom.loc = this.loc(begin);\n\n if (this.isQuantifier()) {\n atom.quantifier = this.quantifier();\n }\n\n return atom;\n }\n\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected dotAll(): Omit {\n this.consumeChar(\".\");\n return {\n type: \"Set\",\n complement: true,\n value: [cc(\"\\n\"), cc(\"\\r\"), cc(\"\\u2028\"), cc(\"\\u2029\")],\n };\n }\n\n protected atomEscape(): Omit {\n this.consumeChar(\"\\\\\");\n\n switch (this.peekChar()) {\n case \"1\":\n case \"2\":\n case \"3\":\n case \"4\":\n case \"5\":\n case \"6\":\n case \"7\":\n case \"8\":\n case \"9\":\n return this.decimalEscapeAtom();\n case \"d\":\n case \"D\":\n case \"s\":\n case \"S\":\n case \"w\":\n case \"W\":\n return this.characterClassEscape();\n case \"f\":\n case \"n\":\n case \"r\":\n case \"t\":\n case \"v\":\n return this.controlEscapeAtom();\n case \"c\":\n return this.controlLetterEscapeAtom();\n case \"0\":\n return this.nulCharacterAtom();\n case \"x\":\n return this.hexEscapeSequenceAtom();\n case \"u\":\n return this.regExpUnicodeEscapeSequenceAtom();\n default:\n return this.identityEscapeAtom();\n }\n }\n\n protected decimalEscapeAtom(): Omit {\n const value = this.positiveInteger();\n\n return { type: \"GroupBackReference\", value: value };\n }\n\n protected characterClassEscape(): Omit {\n let set: (number | Range)[] | undefined;\n let complement = false;\n switch (this.popChar()) {\n case \"d\":\n set = digitsCharCodes;\n break;\n case \"D\":\n set = digitsCharCodes;\n complement = true;\n break;\n case \"s\":\n set = whitespaceCodes;\n break;\n case \"S\":\n set = whitespaceCodes;\n complement = true;\n break;\n case \"w\":\n set = wordCharCodes;\n break;\n case \"W\":\n set = wordCharCodes;\n complement = true;\n break;\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(set)) {\n return { type: \"Set\", value: set, complement: complement };\n }\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected controlEscapeAtom(): Omit {\n let escapeCode;\n switch (this.popChar()) {\n case \"f\":\n escapeCode = cc(\"\\f\");\n break;\n case \"n\":\n escapeCode = cc(\"\\n\");\n break;\n case \"r\":\n escapeCode = cc(\"\\r\");\n break;\n case \"t\":\n escapeCode = cc(\"\\t\");\n break;\n case \"v\":\n escapeCode = cc(\"\\v\");\n break;\n }\n\n // istanbul ignore else\n if (ASSERT_EXISTS(escapeCode)) {\n return { type: \"Character\", value: escapeCode };\n }\n // istanbul ignore next\n return ASSERT_NEVER_REACH_HERE();\n }\n\n protected controlLetterEscapeAtom(): Omit {\n this.consumeChar(\"c\");\n const letter = this.popChar();\n if (/[a-zA-Z]/.test(letter) === false) {\n throw Error(\"Invalid \");\n }\n\n const letterCode = letter.toUpperCase().charCodeAt(0) - 64;\n return { type: \"Character\", value: letterCode };\n }\n\n protected nulCharacterAtom(): Omit {\n // TODO implement '[lookahead \u2209 DecimalDigit]'\n // TODO: for the deprecated octal escape sequence\n this.consumeChar(\"0\");\n return { type: \"Character\", value: cc(\"\\0\") };\n }\n\n protected hexEscapeSequenceAtom(): Omit {\n this.consumeChar(\"x\");\n return this.parseHexDigits(2);\n }\n\n protected regExpUnicodeEscapeSequenceAtom(): Omit {\n this.consumeChar(\"u\");\n return this.parseHexDigits(4);\n }\n\n protected identityEscapeAtom(): Omit {\n // TODO: implement \"SourceCharacter but not UnicodeIDContinue\"\n // // http://unicode.org/reports/tr31/#Specific_Character_Adjustments\n const escapedChar = this.popChar();\n return { type: \"Character\", value: cc(escapedChar) };\n }\n\n protected classPatternCharacterAtom(): Omit {\n switch (this.peekChar()) {\n // istanbul ignore next\n case \"\\n\":\n // istanbul ignore next\n case \"\\r\":\n // istanbul ignore next\n case \"\\u2028\":\n // istanbul ignore next\n case \"\\u2029\":\n // istanbul ignore next\n case \"\\\\\":\n // istanbul ignore next\n case \"]\":\n throw Error(\"TBD\");\n default:\n const nextChar = this.popChar();\n return { type: \"Character\", value: cc(nextChar) };\n }\n }\n\n protected characterClass(): Omit {\n const set: (number | Range)[] = [];\n let complement = false;\n this.consumeChar(\"[\");\n if (this.peekChar(0) === \"^\") {\n this.consumeChar(\"^\");\n complement = true;\n }\n\n while (this.isClassAtom()) {\n const from = this.classAtom();\n const isFromSingleChar = from.type === \"Character\";\n if (isCharacter(from) && this.isRangeDash()) {\n this.consumeChar(\"-\");\n const to = this.classAtom();\n const isToSingleChar = to.type === \"Character\";\n\n // a range can only be used when both sides are single characters\n if (isCharacter(to)) {\n if (to.value < from.value) {\n throw Error(\"Range out of order in character class\");\n }\n set.push({ from: from.value, to: to.value });\n } else {\n // literal dash\n insertToSet(from.value, set);\n set.push(cc(\"-\"));\n insertToSet(to.value, set);\n }\n } else {\n insertToSet(from.value, set);\n }\n }\n\n this.consumeChar(\"]\");\n\n return { type: \"Set\", complement: complement, value: set };\n }\n\n protected classAtom(): Omit {\n switch (this.peekChar()) {\n // istanbul ignore next\n case \"]\":\n // istanbul ignore next\n case \"\\n\":\n // istanbul ignore next\n case \"\\r\":\n // istanbul ignore next\n case \"\\u2028\":\n // istanbul ignore next\n case \"\\u2029\":\n throw Error(\"TBD\");\n case \"\\\\\":\n return this.classEscape();\n default:\n return this.classPatternCharacterAtom();\n }\n }\n\n protected classEscape(): Omit {\n this.consumeChar(\"\\\\\");\n switch (this.peekChar()) {\n // Matches a backspace.\n // (Not to be confused with \\b word boundary outside characterClass)\n case \"b\":\n this.consumeChar(\"b\");\n return { type: \"Character\", value: cc(\"\\u0008\") };\n case \"d\":\n case \"D\":\n case \"s\":\n case \"S\":\n case \"w\":\n case \"W\":\n return this.characterClassEscape();\n case \"f\":\n case \"n\":\n case \"r\":\n case \"t\":\n case \"v\":\n return this.controlEscapeAtom();\n case \"c\":\n return this.controlLetterEscapeAtom();\n case \"0\":\n return this.nulCharacterAtom();\n case \"x\":\n return this.hexEscapeSequenceAtom();\n case \"u\":\n return this.regExpUnicodeEscapeSequenceAtom();\n default:\n return this.identityEscapeAtom();\n }\n }\n\n protected group(): Omit {\n let capturing = true;\n this.consumeChar(\"(\");\n switch (this.peekChar(0)) {\n case \"?\":\n this.consumeChar(\"?\");\n this.consumeChar(\":\");\n capturing = false;\n break;\n default:\n this.groupIdx++;\n break;\n }\n const value = this.disjunction();\n this.consumeChar(\")\");\n\n const groupAst: Omit = {\n type: \"Group\",\n capturing: capturing,\n value: value,\n };\n\n if (capturing) {\n groupAst[\"idx\"] = this.groupIdx;\n }\n\n return groupAst;\n }\n\n protected positiveInteger(): number {\n let number = this.popChar();\n\n // istanbul ignore next - can't ever get here due to previous lookahead checks\n // still implementing this error checking in case this ever changes.\n if (decimalPatternNoZero.test(number) === false) {\n throw Error(\"Expecting a positive integer\");\n }\n\n while (decimalPattern.test(this.peekChar(0))) {\n number += this.popChar();\n }\n\n return parseInt(number, 10);\n }\n\n protected integerIncludingZero(): number {\n let number = this.popChar();\n if (decimalPattern.test(number) === false) {\n throw Error(\"Expecting an integer\");\n }\n\n while (decimalPattern.test(this.peekChar(0))) {\n number += this.popChar();\n }\n\n return parseInt(number, 10);\n }\n\n protected patternCharacter(): Omit {\n const nextChar = this.popChar();\n switch (nextChar) {\n // istanbul ignore next\n case \"\\n\":\n // istanbul ignore next\n case \"\\r\":\n // istanbul ignore next\n case \"\\u2028\":\n // istanbul ignore next\n case \"\\u2029\":\n // istanbul ignore next\n case \"^\":\n // istanbul ignore next\n case \"$\":\n // istanbul ignore next\n case \"\\\\\":\n // istanbul ignore next\n case \".\":\n // istanbul ignore next\n case \"*\":\n // istanbul ignore next\n case \"+\":\n // istanbul ignore next\n case \"?\":\n // istanbul ignore next\n case \"(\":\n // istanbul ignore next\n case \")\":\n // istanbul ignore next\n case \"[\":\n // istanbul ignore next\n case \"|\":\n // istanbul ignore next\n throw Error(\"TBD\");\n default:\n return { type: \"Character\", value: cc(nextChar) };\n }\n }\n protected isRegExpFlag(): boolean {\n switch (this.peekChar(0)) {\n case \"g\":\n case \"i\":\n case \"m\":\n case \"u\":\n case \"y\":\n return true;\n default:\n return false;\n }\n }\n\n protected isRangeDash(): boolean {\n return this.peekChar() === \"-\" && this.isClassAtom(1);\n }\n\n protected isDigit(): boolean {\n return decimalPattern.test(this.peekChar(0));\n }\n\n protected isClassAtom(howMuch = 0): boolean {\n switch (this.peekChar(howMuch)) {\n case \"]\":\n case \"\\n\":\n case \"\\r\":\n case \"\\u2028\":\n case \"\\u2029\":\n return false;\n default:\n return true;\n }\n }\n\n protected isTerm() {\n return this.isAtom() || this.isAssertion();\n }\n\n protected isAtom(): boolean {\n if (this.isPatternCharacter()) {\n return true;\n }\n\n switch (this.peekChar(0)) {\n case \".\":\n case \"\\\\\": // atomEscape\n case \"[\": // characterClass\n // TODO: isAtom must be called before isAssertion - disambiguate\n case \"(\": // group\n return true;\n default:\n return false;\n }\n }\n\n protected isAssertion(): boolean {\n switch (this.peekChar(0)) {\n case \"^\":\n case \"$\":\n return true;\n // '\\b' or '\\B'\n case \"\\\\\":\n switch (this.peekChar(1)) {\n case \"b\":\n case \"B\":\n return true;\n default:\n return false;\n }\n // '(?=' or '(?!'\n case \"(\":\n return (\n this.peekChar(1) === \"?\" &&\n (this.peekChar(2) === \"=\" || this.peekChar(2) === \"!\")\n );\n default:\n return false;\n }\n }\n\n protected isQuantifier(): boolean {\n const prevState = this.saveState();\n try {\n return this.quantifier(true) !== undefined;\n } catch (e) {\n return false;\n } finally {\n this.restoreState(prevState);\n }\n }\n\n protected isPatternCharacter(): boolean {\n switch (this.peekChar()) {\n case \"^\":\n case \"$\":\n case \"\\\\\":\n case \".\":\n case \"*\":\n case \"+\":\n case \"?\":\n case \"(\":\n case \")\":\n case \"[\":\n case \"|\":\n case \"/\":\n case \"\\n\":\n case \"\\r\":\n case \"\\u2028\":\n case \"\\u2029\":\n return false;\n default:\n return true;\n }\n }\n\n protected parseHexDigits(howMany: number): Omit {\n let hexString = \"\";\n for (let i = 0; i < howMany; i++) {\n const hexChar = this.popChar();\n if (hexDigitPattern.test(hexChar) === false) {\n throw Error(\"Expecting a HexDecimal digits\");\n }\n hexString += hexChar;\n }\n const charCode = parseInt(hexString, 16);\n return { type: \"Character\", value: charCode };\n }\n\n protected peekChar(howMuch = 0): string {\n return this.input[this.idx + howMuch];\n }\n\n protected popChar(): string {\n const nextChar = this.peekChar(0);\n this.consumeChar(undefined);\n return nextChar;\n }\n\n protected consumeChar(char: string | undefined): void {\n if (char !== undefined && this.input[this.idx] !== char) {\n throw Error(\n \"Expected: '\" +\n char +\n \"' but found: '\" +\n this.input[this.idx] +\n \"' at offset: \" +\n this.idx,\n );\n }\n\n if (this.idx >= this.input.length) {\n throw Error(\"Unexpected end of input\");\n }\n this.idx++;\n }\n\n protected loc(begin: number): Location {\n return { begin: begin, end: this.idx };\n }\n}\n", "import type {\n Alternative,\n Assertion,\n Character,\n Disjunction,\n Group,\n GroupBackReference,\n IRegExpAST,\n Quantifier,\n RegExpAstPart,\n RegExpFlags,\n RegExpPattern,\n Set,\n} from \"../types\";\n\nexport class BaseRegExpVisitor {\n public visitChildren(node: IRegExpAST) {\n for (const key in node) {\n const child = (node as any)[key];\n /* istanbul ignore else */\n if (node.hasOwnProperty(key)) {\n if (child.type !== undefined) {\n this.visit(child);\n } else if (Array.isArray(child)) {\n child.forEach((subChild) => {\n this.visit(subChild);\n }, this);\n }\n }\n }\n }\n\n public visit(node: RegExpAstPart): void {\n switch (node.type) {\n case \"Pattern\":\n this.visitPattern(node);\n break;\n case \"Flags\":\n this.visitFlags(node);\n break;\n case \"Disjunction\":\n this.visitDisjunction(node);\n break;\n case \"Alternative\":\n this.visitAlternative(node);\n break;\n case \"StartAnchor\":\n this.visitStartAnchor(node);\n break;\n case \"EndAnchor\":\n this.visitEndAnchor(node);\n break;\n case \"WordBoundary\":\n this.visitWordBoundary(node);\n break;\n case \"NonWordBoundary\":\n this.visitNonWordBoundary(node);\n break;\n case \"Lookahead\":\n this.visitLookahead(node);\n break;\n case \"NegativeLookahead\":\n this.visitNegativeLookahead(node);\n break;\n case \"Character\":\n this.visitCharacter(node);\n break;\n case \"Set\":\n this.visitSet(node);\n break;\n case \"Group\":\n this.visitGroup(node);\n break;\n case \"GroupBackReference\":\n this.visitGroupBackReference(node);\n break;\n case \"Quantifier\":\n this.visitQuantifier(node);\n break;\n }\n\n this.visitChildren(node);\n }\n\n public visitPattern(node: RegExpPattern): void {}\n\n public visitFlags(node: RegExpFlags): void {}\n\n public visitDisjunction(node: Disjunction): void {}\n\n public visitAlternative(node: Alternative): void {}\n\n // Assertion\n public visitStartAnchor(node: Assertion): void {}\n\n public visitEndAnchor(node: Assertion): void {}\n\n public visitWordBoundary(node: Assertion): void {}\n\n public visitNonWordBoundary(node: Assertion): void {}\n\n public visitLookahead(node: Assertion): void {}\n\n public visitNegativeLookahead(node: Assertion): void {}\n\n // atoms\n public visitCharacter(node: Character): void {}\n\n public visitSet(node: Set): void {}\n\n public visitGroup(node: Group): void {}\n\n public visitGroupBackReference(node: GroupBackReference): void {}\n\n public visitQuantifier(node: Quantifier): void {}\n}\n", "export { RegExpParser } from \"./regexp-parser.js\";\nexport { BaseRegExpVisitor } from \"./base-regexp-visitor.js\";\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Set, Group, Character, IRegExpAST } from '@chevrotain/regexp-to-ast';\nimport { RegExpParser, BaseRegExpVisitor } from '@chevrotain/regexp-to-ast';\n\nexport const NEWLINE_REGEXP = /\\r?\\n/gm;\n\nconst regexpParser = new RegExpParser();\n\n/**\n * This class is in charge of heuristically identifying start/end tokens of terminals.\n *\n * The way this works is by doing the following:\n * 1. Traverse the regular expression in the \"start state\"\n * 2. Add any encountered sets/single characters to the \"start regexp\"\n * 3. Once we encounter any variable-length content (i.e. with quantifiers such as +/?/*), we enter the \"end state\"\n * 4. In the end state, any sets/single characters are added to an \"end stack\".\n * 5. If we re-encounter any variable-length content we reset the end stack\n * 6. We continue visiting the regex until the end, reseting the end stack and rebuilding it as necessary\n *\n * After traversing a regular expression the `startRegexp/endRegexp` properties allow access to the stored start/end of the terminal\n */\nclass TerminalRegExpVisitor extends BaseRegExpVisitor {\n\n private isStarting = true;\n startRegexp: string;\n private endRegexpStack: string[] = [];\n multiline = false;\n regex: string;\n\n get endRegex(): string {\n return this.endRegexpStack.join('');\n }\n\n reset(regex: string): void {\n this.multiline = false;\n this.regex = regex;\n this.startRegexp = '';\n this.isStarting = true;\n this.endRegexpStack = [];\n }\n\n override visitGroup(node: Group) {\n if (node.quantifier) {\n this.isStarting = false;\n this.endRegexpStack = [];\n }\n }\n\n override visitCharacter(node: Character): void {\n const char = String.fromCharCode(node.value);\n if (!this.multiline && char === '\\n') {\n this.multiline = true;\n }\n if (node.quantifier) {\n this.isStarting = false;\n this.endRegexpStack = [];\n } else {\n const escapedChar = escapeRegExp(char);\n this.endRegexpStack.push(escapedChar);\n if (this.isStarting) {\n this.startRegexp += escapedChar;\n }\n }\n }\n\n override visitSet(node: Set): void {\n if (!this.multiline) {\n const set = this.regex.substring(node.loc.begin, node.loc.end);\n const regex = new RegExp(set);\n this.multiline = Boolean('\\n'.match(regex));\n }\n if (node.quantifier) {\n this.isStarting = false;\n this.endRegexpStack = [];\n } else {\n const set = this.regex.substring(node.loc.begin, node.loc.end);\n this.endRegexpStack.push(set);\n if (this.isStarting) {\n this.startRegexp += set;\n }\n }\n }\n\n override visitChildren(node: IRegExpAST): void {\n if (node.type === 'Group') {\n // Ignore children of groups with quantifier (+/*/?)\n // These groups are unrelated to start/end tokens of terminals\n const group = node as Group;\n if (group.quantifier) {\n return;\n }\n }\n super.visitChildren(node);\n }\n}\n\nconst visitor = new TerminalRegExpVisitor();\n\nexport function getTerminalParts(regexp: RegExp | string): Array<{ start: string, end: string }> {\n try {\n if (typeof regexp !== 'string') {\n regexp = regexp.source;\n }\n regexp = `/${regexp}/`;\n const pattern = regexpParser.pattern(regexp);\n const parts: Array<{ start: string, end: string }> = [];\n for (const alternative of pattern.value.value) {\n visitor.reset(regexp);\n visitor.visit(alternative);\n parts.push({\n start: visitor.startRegexp,\n end: visitor.endRegex\n });\n }\n return parts;\n } catch {\n return [];\n }\n}\n\nexport function isMultilineComment(regexp: RegExp | string): boolean {\n try {\n if (typeof regexp === 'string') {\n regexp = new RegExp(regexp);\n }\n regexp = regexp.toString();\n visitor.reset(regexp);\n // Parsing the pattern might fail (since it's user code)\n visitor.visit(regexpParser.pattern(regexp));\n return visitor.multiline;\n } catch {\n return false;\n }\n}\n\nexport function isWhitespace(value: RegExp | string): boolean {\n const regexp = typeof value === 'string' ? new RegExp(value) : value;\n return regexp.test(' ');\n}\n\nexport function escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nexport function getCaseInsensitivePattern(keyword: string): string {\n return Array.prototype.map.call(keyword, letter =>\n /\\w/.test(letter) ? `[${letter.toLowerCase()}${letter.toUpperCase()}]` : escapeRegExp(letter)\n ).join('');\n}\n\n/**\n * Determines whether the given input has a partial match with the specified regex.\n * @param regex The regex to partially match against\n * @param input The input string\n * @returns Whether any match exists.\n */\nexport function partialMatches(regex: RegExp | string, input: string): boolean {\n const partial = partialRegExp(regex);\n const match = input.match(partial);\n return !!match && match[0].length > 0;\n}\n\n/**\n * Builds a partial regex from the input regex. A partial regex is able to match incomplete input strings. E.g.\n * a partial regex constructed from `/ab/` is able to match the string `a` without needing a following `b` character. However it won't match `b` alone.\n * @param regex The input regex to be converted.\n * @returns A partial regex constructed from the input regex.\n */\nexport function partialRegExp(regex: RegExp | string): RegExp {\n if (typeof regex === 'string') {\n regex = new RegExp(regex);\n }\n const re = regex, source = regex.source;\n let i = 0;\n\n function process() {\n let result = '',\n tmp;\n\n function appendRaw(nbChars: number) {\n result += source.substr(i, nbChars);\n i += nbChars;\n }\n\n function appendOptional(nbChars: number) {\n result += '(?:' + source.substr(i, nbChars) + '|$)';\n i += nbChars;\n }\n\n while (i < source.length) {\n switch (source[i]) {\n case '\\\\':\n switch (source[i + 1]) {\n case 'c':\n appendOptional(3);\n break;\n case 'x':\n appendOptional(4);\n break;\n case 'u':\n if (re.unicode) {\n if (source[i + 2] === '{') {\n appendOptional(source.indexOf('}', i) - i + 1);\n } else {\n appendOptional(6);\n }\n } else {\n appendOptional(2);\n }\n break;\n case 'p':\n case 'P':\n if (re.unicode) {\n appendOptional(source.indexOf('}', i) - i + 1);\n } else {\n appendOptional(2);\n }\n break;\n case 'k':\n appendOptional(source.indexOf('>', i) - i + 1);\n break;\n default:\n appendOptional(2);\n break;\n }\n break;\n\n case '[':\n tmp = /\\[(?:\\\\.|.)*?\\]/g;\n tmp.lastIndex = i;\n tmp = tmp.exec(source) || [];\n appendOptional(tmp[0].length);\n break;\n\n case '|':\n case '^':\n case '$':\n case '*':\n case '+':\n case '?':\n appendRaw(1);\n break;\n case '{':\n tmp = /\\{\\d+,?\\d*\\}/g;\n tmp.lastIndex = i;\n tmp = tmp.exec(source);\n if (tmp) {\n appendRaw(tmp[0].length);\n } else {\n appendOptional(1);\n }\n break;\n case '(':\n if (source[i + 1] === '?') {\n switch (source[i + 2]) {\n case ':':\n result += '(?:';\n i += 3;\n result += process() + '|$)';\n break;\n case '=':\n result += '(?=';\n i += 3;\n result += process() + ')';\n break;\n case '!':\n tmp = i;\n i += 3;\n process();\n result += source.substr(tmp, i - tmp);\n break;\n case '<':\n switch (source[i + 3]) {\n case '=':\n case '!':\n tmp = i;\n i += 4;\n process();\n result += source.substr(tmp, i - tmp);\n break;\n default:\n appendRaw(source.indexOf('>', i) - i + 1);\n result += process() + '|$)';\n break;\n }\n break;\n }\n } else {\n appendRaw(1);\n result += process() + '|$)';\n }\n break;\n case ')':\n ++i;\n return result;\n default:\n appendOptional(1);\n break;\n }\n }\n\n return result;\n }\n\n return new RegExp(process(), regex.flags);\n}\n", "/******************************************************************************\n * Copyright 2021-2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { assertUnreachable } from '../utils/errors.js';\nimport * as ast from '../languages/generated/ast.js';\nimport type { AstNode, CstNode } from '../syntax-tree.js';\nimport { isCompositeCstNode } from '../syntax-tree.js';\nimport { getContainerOfType, streamAllContents } from './ast-utils.js';\nimport { streamCst } from './cst-utils.js';\nimport { escapeRegExp } from './regexp-utils.js';\n\n/**\n * Returns the entry rule of the given grammar, if any. If the grammar file does not contain an entry rule,\n * the result is `undefined`.\n */\nexport function getEntryRule(grammar: ast.Grammar): ast.ParserRule | undefined {\n return grammar.rules.find(e => ast.isParserRule(e) && e.entry) as ast.ParserRule;\n}\n\n/**\n * Returns all hidden terminal rules of the given grammar, if any.\n */\nexport function getHiddenRules(grammar: ast.Grammar) {\n return grammar.rules.filter((e): e is ast.TerminalRule => ast.isTerminalRule(e) && e.hidden);\n}\n\n/**\n * Returns all rules that can be reached from the topmost rules of the specified grammar (entry and hidden terminal rules).\n *\n * @param grammar The grammar that contains all rules\n * @param allTerminals Whether or not to include terminals that are referenced only by other terminals\n * @returns A list of referenced parser and terminal rules. If the grammar contains no entry rule,\n * this function returns all rules of the specified grammar.\n */\nexport function getAllReachableRules(grammar: ast.Grammar, allTerminals: boolean): Set {\n const ruleNames = new Set();\n const entryRule = getEntryRule(grammar);\n if (!entryRule) {\n return new Set(grammar.rules);\n }\n\n const topMostRules = [entryRule as ast.AbstractRule].concat(getHiddenRules(grammar));\n for (const rule of topMostRules) {\n ruleDfs(rule, ruleNames, allTerminals);\n }\n\n const rules = new Set();\n for (const rule of grammar.rules) {\n if (ruleNames.has(rule.name) || (ast.isTerminalRule(rule) && rule.hidden)) {\n rules.add(rule);\n }\n }\n return rules;\n}\n\nfunction ruleDfs(rule: ast.AbstractRule, visitedSet: Set, allTerminals: boolean): void {\n visitedSet.add(rule.name);\n streamAllContents(rule).forEach(node => {\n if (ast.isRuleCall(node) || (allTerminals && ast.isTerminalRuleCall(node))) {\n const refRule = node.rule.ref;\n if (refRule && !visitedSet.has(refRule.name)) {\n ruleDfs(refRule, visitedSet, allTerminals);\n }\n }\n });\n}\n\n/**\n * Determines the grammar expression used to parse a cross-reference (usually a reference to a terminal rule).\n * A cross-reference can declare this expression explicitly in the form `[Type : Terminal]`, but if `Terminal`\n * is omitted, this function attempts to infer it from the name of the referenced `Type` (using `findNameAssignment`).\n *\n * Returns the grammar expression used to parse the given cross-reference, or `undefined` if it is not declared\n * and cannot be inferred.\n */\nexport function getCrossReferenceTerminal(crossRef: ast.CrossReference): ast.AbstractElement | undefined {\n if (crossRef.terminal) {\n return crossRef.terminal;\n } else if (crossRef.type.ref) {\n const nameAssigment = findNameAssignment(crossRef.type.ref);\n return nameAssigment?.terminal;\n }\n return undefined;\n}\n\n/**\n * Determines whether the given terminal rule represents a comment. This is true if the rule is marked\n * as `hidden` and it does not match white space. This means every hidden token (i.e. excluded from the AST)\n * that contains visible characters is considered a comment.\n */\nexport function isCommentTerminal(terminalRule: ast.TerminalRule): boolean {\n return terminalRule.hidden && !terminalRegex(terminalRule).test(' ');\n}\n\n/**\n * Find all CST nodes within the given node that contribute to the specified property.\n *\n * @param node A CST node in which to look for property assignments. If this is undefined, the result is an empty array.\n * @param property A property name of the constructed AST node. If this is undefined, the result is an empty array.\n */\nexport function findNodesForProperty(node: CstNode | undefined, property: string | undefined): CstNode[] {\n if (!node || !property) {\n return [];\n }\n return findNodesForPropertyInternal(node, property, node.astNode, true);\n}\n\n/**\n * Find a single CST node within the given node that contributes to the specified property.\n *\n * @param node A CST node in which to look for property assignments. If this is undefined, the result is `undefined`.\n * @param property A property name of the constructed AST node. If this is undefined, the result is `undefined`.\n * @param index If no index is specified or the index is less than zero, the first found node is returned. If the\n * specified index exceeds the number of assignments to the property, the last found node is returned. Otherwise,\n * the node with the specified index is returned.\n */\nexport function findNodeForProperty(node: CstNode | undefined, property: string | undefined, index?: number): CstNode | undefined {\n if (!node || !property) {\n return undefined;\n }\n const nodes = findNodesForPropertyInternal(node, property, node.astNode, true);\n if (nodes.length === 0) {\n return undefined;\n }\n if (index !== undefined) {\n index = Math.max(0, Math.min(index, nodes.length - 1));\n } else {\n index = 0;\n }\n return nodes[index];\n}\n\nfunction findNodesForPropertyInternal(node: CstNode, property: string, element: AstNode | undefined, first: boolean): CstNode[] {\n if (!first) {\n const nodeFeature = getContainerOfType(node.grammarSource, ast.isAssignment);\n if (nodeFeature && nodeFeature.feature === property) {\n return [node];\n }\n }\n if (isCompositeCstNode(node) && node.astNode === element) {\n return node.content.flatMap(e => findNodesForPropertyInternal(e, property, element, false));\n }\n return [];\n}\n\n/**\n * Find all CST nodes within the given node that correspond to the specified keyword.\n *\n * @param node A CST node in which to look for keywords. If this is undefined, the result is an empty array.\n * @param keyword A keyword as specified in the grammar.\n */\nexport function findNodesForKeyword(node: CstNode | undefined, keyword: string): CstNode[] {\n if (!node) {\n return [];\n }\n return findNodesForKeywordInternal(node, keyword, node?.astNode);\n}\n\n/**\n * Find a single CST node within the given node that corresponds to the specified keyword.\n *\n * @param node A CST node in which to look for keywords. If this is undefined, the result is `undefined`.\n * @param keyword A keyword as specified in the grammar.\n * @param index If no index is specified or the index is less than zero, the first found node is returned. If the\n * specified index exceeds the number of keyword occurrences, the last found node is returned. Otherwise,\n * the node with the specified index is returned.\n */\nexport function findNodeForKeyword(node: CstNode | undefined, keyword: string, index?: number): CstNode | undefined {\n if (!node) {\n return undefined;\n }\n const nodes = findNodesForKeywordInternal(node, keyword, node?.astNode);\n if (nodes.length === 0) {\n return undefined;\n }\n if (index !== undefined) {\n index = Math.max(0, Math.min(index, nodes.length - 1));\n } else {\n index = 0;\n }\n return nodes[index];\n}\n\nexport function findNodesForKeywordInternal(node: CstNode, keyword: string, element: AstNode | undefined): CstNode[] {\n if (node.astNode !== element) {\n return [];\n }\n if (ast.isKeyword(node.grammarSource) && node.grammarSource.value === keyword) {\n return [node];\n }\n const treeIterator = streamCst(node).iterator();\n let result: IteratorResult;\n const keywordNodes: CstNode[] = [];\n do {\n result = treeIterator.next();\n if (!result.done) {\n const childNode = result.value;\n if (childNode.astNode === element) {\n if (ast.isKeyword(childNode.grammarSource) && childNode.grammarSource.value === keyword) {\n keywordNodes.push(childNode);\n }\n } else {\n treeIterator.prune();\n }\n }\n } while (!result.done);\n return keywordNodes;\n}\n\n/**\n * If the given CST node was parsed in the context of a property assignment, the respective `Assignment` grammar\n * node is returned. If no assignment is found, the result is `undefined`.\n *\n * @param cstNode A CST node for which to find a property assignment.\n */\nexport function findAssignment(cstNode: CstNode): ast.Assignment | undefined {\n const astNode = cstNode.astNode;\n // Only search until the ast node of the parent cst node is no longer the original ast node\n // This would make us jump to a preceding rule call, which contains only unrelated assignments\n while (astNode === cstNode.container?.astNode) {\n const assignment = getContainerOfType(cstNode.grammarSource, ast.isAssignment);\n if (assignment) {\n return assignment;\n }\n cstNode = cstNode.container;\n }\n return undefined;\n}\n\n/**\n * Find an assignment to the `name` property for the given grammar type. This requires the `type` to be inferred\n * from a parser rule, and that rule must contain an assignment to the `name` property. In all other cases,\n * this function returns `undefined`.\n */\nexport function findNameAssignment(type: ast.AbstractType): ast.Assignment | undefined {\n let startNode: AstNode = type;\n if (ast.isInferredType(startNode)) {\n // for inferred types, the location to start searching for the name-assignment is different\n if (ast.isAction(startNode.$container)) {\n // a type which is explicitly inferred by an action: investigate the sibbling of the Action node, i.e. start searching at the Action's parent\n startNode = startNode.$container.$container!;\n } else if (ast.isParserRule(startNode.$container)) {\n // investigate the parser rule with the explicitly inferred type\n startNode = startNode.$container;\n } else {\n assertUnreachable(startNode.$container);\n }\n }\n return findNameAssignmentInternal(type, startNode, new Map());\n}\n\nfunction findNameAssignmentInternal(type: ast.AbstractType, startNode: AstNode, cache: Map): ast.Assignment | undefined {\n // the cache is only required to prevent infinite loops\n function go(node: AstNode, refType: ast.AbstractType): ast.Assignment | undefined {\n let childAssignment: ast.Assignment | undefined = undefined;\n const parentAssignment = getContainerOfType(node, ast.isAssignment);\n // No parent assignment implies unassigned rule call\n if (!parentAssignment) {\n childAssignment = findNameAssignmentInternal(refType, refType, cache);\n }\n cache.set(type, childAssignment);\n return childAssignment;\n }\n\n if (cache.has(type)) {\n return cache.get(type);\n }\n cache.set(type, undefined);\n for (const node of streamAllContents(startNode)) {\n if (ast.isAssignment(node) && node.feature.toLowerCase() === 'name') {\n cache.set(type, node);\n return node;\n } else if (ast.isRuleCall(node) && ast.isParserRule(node.rule.ref)) {\n return go(node, node.rule.ref);\n } else if (ast.isSimpleType(node) && node.typeRef?.ref) {\n return go(node, node.typeRef.ref);\n }\n }\n return undefined;\n}\n\nexport function getActionAtElement(element: ast.AbstractElement): ast.Action | undefined {\n const parent = element.$container;\n if (ast.isGroup(parent)) {\n const elements = parent.elements;\n const index = elements.indexOf(element);\n for (let i = index - 1; i >= 0; i--) {\n const item = elements[i];\n if (ast.isAction(item)) {\n return item;\n } else {\n const action = streamAllContents(elements[i]).find(ast.isAction);\n if (action) {\n return action;\n }\n }\n }\n }\n if (ast.isAbstractElement(parent)) {\n return getActionAtElement(parent);\n } else {\n return undefined;\n }\n}\n\nexport type Cardinality = '?' | '*' | '+' | undefined;\nexport type Operator = '=' | '+=' | '?=' | undefined;\n\nexport function isOptionalCardinality(cardinality?: Cardinality, element?: ast.AbstractElement): boolean {\n return cardinality === '?' || cardinality === '*' || (ast.isGroup(element) && Boolean(element.guardCondition));\n}\n\nexport function isArrayCardinality(cardinality?: Cardinality): boolean {\n return cardinality === '*' || cardinality === '+';\n}\n\nexport function isArrayOperator(operator?: Operator): boolean {\n return operator === '+=';\n}\n\n/**\n * Determines whether the given parser rule is a _data type rule_, meaning that it has a\n * primitive return type like `number`, `boolean`, etc.\n */\nexport function isDataTypeRule(rule: ast.ParserRule): boolean {\n return isDataTypeRuleInternal(rule, new Set());\n}\n\nfunction isDataTypeRuleInternal(rule: ast.ParserRule, visited: Set): boolean {\n if (visited.has(rule)) {\n return true;\n } else {\n visited.add(rule);\n }\n for (const node of streamAllContents(rule)) {\n if (ast.isRuleCall(node)) {\n if (!node.rule.ref) {\n // RuleCall to unresolved rule. Don't assume `rule` is a DataType rule.\n return false;\n }\n if (ast.isParserRule(node.rule.ref) && !isDataTypeRuleInternal(node.rule.ref, visited)) {\n return false;\n }\n } else if (ast.isAssignment(node)) {\n return false;\n } else if (ast.isAction(node)) {\n return false;\n }\n }\n return Boolean(rule.definition);\n}\n\nexport function isDataType(type: ast.Type): boolean {\n return isDataTypeInternal(type.type, new Set());\n}\n\nfunction isDataTypeInternal(type: ast.TypeDefinition, visited: Set): boolean {\n if (visited.has(type)) {\n return true;\n } else {\n visited.add(type);\n }\n if (ast.isArrayType(type)) {\n return false;\n } else if (ast.isReferenceType(type)) {\n return false;\n } else if (ast.isUnionType(type)) {\n return type.types.every(e => isDataTypeInternal(e, visited));\n } else if (ast.isSimpleType(type)) {\n if (type.primitiveType !== undefined) {\n return true;\n } else if (type.stringType !== undefined) {\n return true;\n } else if (type.typeRef !== undefined) {\n const ref = type.typeRef.ref;\n if (ast.isType(ref)) {\n return isDataTypeInternal(ref.type, visited);\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n}\n\nexport function getExplicitRuleType(rule: ast.ParserRule): string | undefined {\n if (rule.inferredType) {\n return rule.inferredType.name;\n } else if (rule.dataType) {\n return rule.dataType;\n } else if (rule.returnType) {\n const refType = rule.returnType.ref;\n if(refType) {\n // check if we need to check Action as return type\n if (ast.isParserRule(refType)) {\n return refType.name;\n } else if(ast.isInterface(refType) || ast.isType(refType)) {\n return refType.name;\n }\n }\n }\n return undefined;\n}\n\nexport function getTypeName(type: ast.AbstractType | ast.Action): string {\n if (ast.isParserRule(type)) {\n return isDataTypeRule(type) ? type.name : getExplicitRuleType(type) ?? type.name;\n } else if (ast.isInterface(type) || ast.isType(type) || ast.isReturnType(type)) {\n return type.name;\n } else if (ast.isAction(type)) {\n const actionType = getActionType(type);\n if (actionType) {\n return actionType;\n }\n } else if (ast.isInferredType(type)) {\n return type.name;\n }\n throw new Error('Cannot get name of Unknown Type');\n}\n\nexport function getActionType(action: ast.Action): string | undefined {\n if (action.inferredType) {\n return action.inferredType.name;\n } else if (action.type?.ref) {\n return getTypeName(action.type.ref);\n }\n return undefined; // not inferring and not referencing a valid type\n}\n\nexport function getRuleType(rule: ast.AbstractRule): string {\n if (ast.isTerminalRule(rule)) {\n return rule.type?.name ?? 'string';\n } else {\n return isDataTypeRule(rule) ? rule.name : getExplicitRuleType(rule) ?? rule.name;\n }\n}\n\nexport function terminalRegex(terminalRule: ast.TerminalRule): RegExp {\n const flags: Flags = {\n s: false,\n i: false,\n u: false\n };\n const source = abstractElementToRegex(terminalRule.definition, flags);\n const flagText = Object.entries(flags).filter(([, value]) => value).map(([name]) => name).join('');\n return new RegExp(source, flagText);\n}\n\n// Using [\\s\\S]* allows to match everything, compared to . which doesn't match line terminators\nconst WILDCARD = /[\\s\\S]/.source;\n\ntype Flags = {\n s: boolean;\n i: boolean;\n u: boolean;\n}\n\nfunction abstractElementToRegex(element: ast.AbstractElement, flags?: Flags): string {\n if (ast.isTerminalAlternatives(element)) {\n return terminalAlternativesToRegex(element);\n } else if (ast.isTerminalGroup(element)) {\n return terminalGroupToRegex(element);\n } else if (ast.isCharacterRange(element)) {\n return characterRangeToRegex(element);\n } else if (ast.isTerminalRuleCall(element)) {\n const rule = element.rule.ref;\n if (!rule) {\n throw new Error('Missing rule reference.');\n }\n return withCardinality(abstractElementToRegex(rule.definition), {\n cardinality: element.cardinality,\n lookahead: element.lookahead\n });\n } else if (ast.isNegatedToken(element)) {\n return negateTokenToRegex(element);\n } else if (ast.isUntilToken(element)) {\n return untilTokenToRegex(element);\n } else if (ast.isRegexToken(element)) {\n const lastSlash = element.regex.lastIndexOf('/');\n const source = element.regex.substring(1, lastSlash);\n const regexFlags = element.regex.substring(lastSlash + 1);\n if (flags) {\n flags.i = regexFlags.includes('i');\n flags.s = regexFlags.includes('s');\n flags.u = regexFlags.includes('u');\n }\n return withCardinality(source, {\n cardinality: element.cardinality,\n lookahead: element.lookahead,\n wrap: false\n });\n } else if (ast.isWildcard(element)) {\n return withCardinality(WILDCARD, {\n cardinality: element.cardinality,\n lookahead: element.lookahead\n });\n } else {\n throw new Error(`Invalid terminal element: ${element?.$type}`);\n }\n}\n\nfunction terminalAlternativesToRegex(alternatives: ast.TerminalAlternatives): string {\n return withCardinality(alternatives.elements.map(e => abstractElementToRegex(e)).join('|'), {\n cardinality: alternatives.cardinality,\n lookahead: alternatives.lookahead\n });\n}\n\nfunction terminalGroupToRegex(group: ast.TerminalGroup): string {\n return withCardinality(group.elements.map(e => abstractElementToRegex(e)).join(''), {\n cardinality: group.cardinality,\n lookahead: group.lookahead\n });\n}\n\nfunction untilTokenToRegex(until: ast.UntilToken): string {\n return withCardinality(`${WILDCARD}*?${abstractElementToRegex(until.terminal)}`, {\n cardinality: until.cardinality,\n lookahead: until.lookahead\n });\n}\n\nfunction negateTokenToRegex(negate: ast.NegatedToken): string {\n return withCardinality(`(?!${abstractElementToRegex(negate.terminal)})${WILDCARD}*?`, {\n cardinality: negate.cardinality,\n lookahead: negate.lookahead\n });\n}\n\nfunction characterRangeToRegex(range: ast.CharacterRange): string {\n if (range.right) {\n return withCardinality(`[${keywordToRegex(range.left)}-${keywordToRegex(range.right)}]`, {\n cardinality: range.cardinality,\n lookahead: range.lookahead,\n wrap: false\n });\n }\n return withCardinality(keywordToRegex(range.left), {\n cardinality: range.cardinality,\n lookahead: range.lookahead,\n wrap: false\n });\n}\n\nfunction keywordToRegex(keyword: ast.Keyword): string {\n return escapeRegExp(keyword.value);\n}\n\nfunction withCardinality(regex: string, options: {\n cardinality?: string\n wrap?: boolean\n lookahead?: string\n}): string {\n if (options.wrap !== false || options.lookahead) {\n regex = `(${options.lookahead ?? ''}${regex})`;\n }\n if (options.cardinality) {\n return `${regex}${options.cardinality}`;\n }\n return regex;\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport { DefaultNameRegexp } from '../utils/cst-utils.js';\nimport { isCommentTerminal, terminalRegex } from '../utils/grammar-utils.js';\nimport { isMultilineComment } from '../utils/regexp-utils.js';\nimport { isTerminalRule } from './generated/ast.js';\n\nexport interface GrammarConfig {\n /**\n * Lists all rule names which are classified as multiline comment rules\n */\n multilineCommentRules: string[]\n /**\n * A regular expression which matches characters of names\n */\n nameRegexp: RegExp\n}\n\n/**\n * Create the default grammar configuration (used by `createDefaultModule`). This can be overridden in a\n * language-specific module.\n */\nexport function createGrammarConfig(services: LangiumCoreServices): GrammarConfig {\n const rules: string[] = [];\n const grammar = services.Grammar;\n for (const rule of grammar.rules) {\n if (isTerminalRule(rule) && isCommentTerminal(rule) && isMultilineComment(terminalRegex(rule))) {\n rules.push(rule.name);\n }\n }\n return {\n multilineCommentRules: rules,\n nameRegexp: DefaultNameRegexp\n };\n}\n", "// needs a separate module as this is required inside chevrotain productive code\n// and also in the entry point for webpack(api.ts).\n// A separate file avoids cyclic dependencies and webpack errors.\nexport const VERSION = \"11.0.3\";\n", "export function PRINT_ERROR(msg: string) {\n /* istanbul ignore else - can't override global.console in node.js */\n if (console && console.error) {\n console.error(`Error: ${msg}`);\n }\n}\n\nexport function PRINT_WARNING(msg: string) {\n /* istanbul ignore else - can't override global.console in node.js*/\n if (console && console.warn) {\n // TODO: modify docs accordingly\n console.warn(`Warning: ${msg}`);\n }\n}\n", "export function timer(func: () => T): { time: number; value: T } {\n const start = new Date().getTime();\n const val = func();\n const end = new Date().getTime();\n const total = end - start;\n return { time: total, value: val };\n}\n", "// based on: https://github.com/petkaantonov/bluebird/blob/b97c0d2d487e8c5076e8bd897e0dcd4622d31846/src/util.js#L201-L216\nexport function toFastProperties(toBecomeFast: any) {\n function FakeConstructor() {}\n\n // If our object is used as a constructor, it would receive\n FakeConstructor.prototype = toBecomeFast;\n const fakeInstance = new (FakeConstructor as any)();\n\n function fakeAccess() {\n return typeof fakeInstance.bar;\n }\n\n // help V8 understand this is a \"real\" prototype by actually using\n // the fake instance.\n fakeAccess();\n fakeAccess();\n\n // Always true condition to suppress the Firefox warning of unreachable\n // code after a return statement.\n if (1) return toBecomeFast;\n\n // Eval prevents optimization of this method (even though this is dead code)\n // - https://esbuild.github.io/content-types/#direct-eval\n /* istanbul ignore next */\n // tslint:disable-next-line\n (0, eval)(toBecomeFast);\n}\n", "export { PRINT_WARNING, PRINT_ERROR } from \"./print.js\";\nexport { timer } from \"./timer.js\";\nexport { toFastProperties } from \"./to-fast-properties.js\";\n", "import { assign, forEach, isRegExp, isString, map, pickBy } from \"lodash-es\";\nimport type {\n IGASTVisitor,\n IProduction,\n IProductionWithOccurrence,\n ISerializedGast,\n TokenType,\n} from \"@chevrotain/types\";\n\n// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?\nfunction tokenLabel(tokType: TokenType): string {\n if (hasTokenLabel(tokType)) {\n return tokType.LABEL;\n } else {\n return tokType.name;\n }\n}\n\n// TODO: duplicated code to avoid extracting another sub-package -- how to avoid?\nfunction hasTokenLabel(\n obj: TokenType,\n): obj is TokenType & Pick, \"LABEL\"> {\n return isString(obj.LABEL) && obj.LABEL !== \"\";\n}\n\nexport abstract class AbstractProduction\n implements IProduction\n{\n public get definition(): T[] {\n return this._definition;\n }\n public set definition(value: T[]) {\n this._definition = value;\n }\n\n constructor(protected _definition: T[]) {}\n\n accept(visitor: IGASTVisitor): void {\n visitor.visit(this);\n forEach(this.definition, (prod) => {\n prod.accept(visitor);\n });\n }\n}\n\nexport class NonTerminal\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public nonTerminalName!: string;\n public label?: string;\n public referencedRule!: Rule;\n public idx: number = 1;\n\n constructor(options: {\n nonTerminalName: string;\n label?: string;\n referencedRule?: Rule;\n idx?: number;\n }) {\n super([]);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n\n set definition(definition: IProduction[]) {\n // immutable\n }\n\n get definition(): IProduction[] {\n if (this.referencedRule !== undefined) {\n return this.referencedRule.definition;\n }\n return [];\n }\n\n accept(visitor: IGASTVisitor): void {\n visitor.visit(this);\n // don't visit children of a reference, we will get cyclic infinite loops if we do so\n }\n}\n\nexport class Rule extends AbstractProduction {\n public name!: string;\n public orgText: string = \"\";\n\n constructor(options: {\n name: string;\n definition: IProduction[];\n orgText?: string;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Alternative extends AbstractProduction {\n public ignoreAmbiguities: boolean = false;\n\n constructor(options: {\n definition: IProduction[];\n ignoreAmbiguities?: boolean;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Option\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n idx?: number;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class RepetitionMandatory\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n idx?: number;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class RepetitionMandatoryWithSeparator\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public separator!: TokenType;\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n separator: TokenType;\n idx?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Repetition\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public separator!: TokenType;\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n idx?: number;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class RepetitionWithSeparator\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public separator!: TokenType;\n public idx: number = 1;\n public maxLookahead?: number;\n\n constructor(options: {\n definition: IProduction[];\n separator: TokenType;\n idx?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Alternation\n extends AbstractProduction\n implements IProductionWithOccurrence\n{\n public idx: number = 1;\n public ignoreAmbiguities: boolean = false;\n public hasPredicates: boolean = false;\n public maxLookahead?: number;\n\n public get definition(): Alternative[] {\n return this._definition;\n }\n public set definition(value: Alternative[]) {\n this._definition = value;\n }\n\n constructor(options: {\n definition: Alternative[];\n idx?: number;\n ignoreAmbiguities?: boolean;\n hasPredicates?: boolean;\n maxLookahead?: number;\n }) {\n super(options.definition);\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n}\n\nexport class Terminal implements IProductionWithOccurrence {\n public terminalType!: TokenType;\n public label?: string;\n public idx: number = 1;\n\n constructor(options: {\n terminalType: TokenType;\n label?: string;\n idx?: number;\n }) {\n assign(\n this,\n pickBy(options, (v) => v !== undefined),\n );\n }\n\n accept(visitor: IGASTVisitor): void {\n visitor.visit(this);\n }\n}\n\nexport interface ISerializedBasic extends ISerializedGast {\n type:\n | \"Alternative\"\n | \"Option\"\n | \"RepetitionMandatory\"\n | \"Repetition\"\n | \"Alternation\";\n idx?: number;\n}\n\nexport interface ISerializedGastRule extends ISerializedGast {\n type: \"Rule\";\n name: string;\n orgText: string;\n}\n\nexport interface ISerializedNonTerminal extends ISerializedGast {\n type: \"NonTerminal\";\n name: string;\n label?: string;\n idx: number;\n}\n\nexport interface ISerializedTerminal extends ISerializedGast {\n type: \"Terminal\";\n name: string;\n terminalLabel?: string;\n label?: string;\n pattern?: string;\n idx: number;\n}\n\nexport interface ISerializedTerminalWithSeparator extends ISerializedGast {\n type: \"RepetitionMandatoryWithSeparator\" | \"RepetitionWithSeparator\";\n idx: number;\n separator: ISerializedTerminal;\n}\n\nexport type ISerializedGastAny =\n | ISerializedBasic\n | ISerializedGastRule\n | ISerializedNonTerminal\n | ISerializedTerminal\n | ISerializedTerminalWithSeparator;\n\nexport function serializeGrammar(topRules: Rule[]): ISerializedGast[] {\n return map(topRules, serializeProduction);\n}\n\nexport function serializeProduction(node: IProduction): ISerializedGast {\n function convertDefinition(definition: IProduction[]): ISerializedGast[] {\n return map(definition, serializeProduction);\n }\n /* istanbul ignore else */\n if (node instanceof NonTerminal) {\n const serializedNonTerminal: ISerializedNonTerminal = {\n type: \"NonTerminal\",\n name: node.nonTerminalName,\n idx: node.idx,\n };\n\n if (isString(node.label)) {\n serializedNonTerminal.label = node.label;\n }\n\n return serializedNonTerminal;\n } else if (node instanceof Alternative) {\n return {\n type: \"Alternative\",\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Option) {\n return {\n type: \"Option\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof RepetitionMandatory) {\n return {\n type: \"RepetitionMandatory\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof RepetitionMandatoryWithSeparator) {\n return {\n type: \"RepetitionMandatoryWithSeparator\",\n idx: node.idx,\n separator: (\n serializeProduction(new Terminal({ terminalType: node.separator }))\n ),\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof RepetitionWithSeparator) {\n return {\n type: \"RepetitionWithSeparator\",\n idx: node.idx,\n separator: (\n serializeProduction(new Terminal({ terminalType: node.separator }))\n ),\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Repetition) {\n return {\n type: \"Repetition\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Alternation) {\n return {\n type: \"Alternation\",\n idx: node.idx,\n definition: convertDefinition(node.definition),\n };\n } else if (node instanceof Terminal) {\n const serializedTerminal = {\n type: \"Terminal\",\n name: node.terminalType.name,\n label: tokenLabel(node.terminalType),\n idx: node.idx,\n };\n\n if (isString(node.label)) {\n serializedTerminal.terminalLabel = node.label;\n }\n\n const pattern = node.terminalType.PATTERN;\n if (node.terminalType.PATTERN) {\n serializedTerminal.pattern = isRegExp(pattern)\n ? (pattern).source\n : pattern;\n }\n\n return serializedTerminal;\n } else if (node instanceof Rule) {\n return {\n type: \"Rule\",\n name: node.name,\n orgText: node.orgText,\n definition: convertDefinition(node.definition),\n };\n /* c8 ignore next 3 */\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n", "import {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"./model.js\";\nimport type { IProduction } from \"@chevrotain/types\";\n\nexport abstract class GAstVisitor {\n public visit(node: IProduction): any {\n const nodeAny: any = node;\n switch (nodeAny.constructor) {\n case NonTerminal:\n return this.visitNonTerminal(nodeAny);\n case Alternative:\n return this.visitAlternative(nodeAny);\n case Option:\n return this.visitOption(nodeAny);\n case RepetitionMandatory:\n return this.visitRepetitionMandatory(nodeAny);\n case RepetitionMandatoryWithSeparator:\n return this.visitRepetitionMandatoryWithSeparator(nodeAny);\n case RepetitionWithSeparator:\n return this.visitRepetitionWithSeparator(nodeAny);\n case Repetition:\n return this.visitRepetition(nodeAny);\n case Alternation:\n return this.visitAlternation(nodeAny);\n case Terminal:\n return this.visitTerminal(nodeAny);\n case Rule:\n return this.visitRule(nodeAny);\n /* c8 ignore next 2 */\n default:\n throw Error(\"non exhaustive match\");\n }\n }\n\n /* c8 ignore next */\n public visitNonTerminal(node: NonTerminal): any {}\n\n /* c8 ignore next */\n public visitAlternative(node: Alternative): any {}\n\n /* c8 ignore next */\n public visitOption(node: Option): any {}\n\n /* c8 ignore next */\n public visitRepetition(node: Repetition): any {}\n\n /* c8 ignore next */\n public visitRepetitionMandatory(node: RepetitionMandatory): any {}\n\n /* c8 ignore next 3 */\n public visitRepetitionMandatoryWithSeparator(\n node: RepetitionMandatoryWithSeparator,\n ): any {}\n\n /* c8 ignore next */\n public visitRepetitionWithSeparator(node: RepetitionWithSeparator): any {}\n\n /* c8 ignore next */\n public visitAlternation(node: Alternation): any {}\n\n /* c8 ignore next */\n public visitTerminal(node: Terminal): any {}\n\n /* c8 ignore next */\n public visitRule(node: Rule): any {}\n}\n", "import { every, includes, some } from \"lodash-es\";\nimport {\n AbstractProduction,\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"./model.js\";\nimport type { IProduction, IProductionWithOccurrence } from \"@chevrotain/types\";\n\nexport function isSequenceProd(\n prod: IProduction,\n): prod is { definition: IProduction[] } & IProduction {\n return (\n prod instanceof Alternative ||\n prod instanceof Option ||\n prod instanceof Repetition ||\n prod instanceof RepetitionMandatory ||\n prod instanceof RepetitionMandatoryWithSeparator ||\n prod instanceof RepetitionWithSeparator ||\n prod instanceof Terminal ||\n prod instanceof Rule\n );\n}\n\nexport function isOptionalProd(\n prod: IProduction,\n alreadyVisited: NonTerminal[] = [],\n): boolean {\n const isDirectlyOptional =\n prod instanceof Option ||\n prod instanceof Repetition ||\n prod instanceof RepetitionWithSeparator;\n if (isDirectlyOptional) {\n return true;\n }\n\n // note that this can cause infinite loop if one optional empty TOP production has a cyclic dependency with another\n // empty optional top rule\n // may be indirectly optional ((A?B?C?) | (D?E?F?))\n if (prod instanceof Alternation) {\n // for OR its enough for just one of the alternatives to be optional\n return some((prod).definition, (subProd: IProduction) => {\n return isOptionalProd(subProd, alreadyVisited);\n });\n } else if (prod instanceof NonTerminal && includes(alreadyVisited, prod)) {\n // avoiding stack overflow due to infinite recursion\n return false;\n } else if (prod instanceof AbstractProduction) {\n if (prod instanceof NonTerminal) {\n alreadyVisited.push(prod);\n }\n return every(\n (prod).definition,\n (subProd: IProduction) => {\n return isOptionalProd(subProd, alreadyVisited);\n },\n );\n } else {\n return false;\n }\n}\n\nexport function isBranchingProd(\n prod: IProduction,\n): prod is { definition: IProduction[] } & IProduction {\n return prod instanceof Alternation;\n}\n\nexport function getProductionDslName(prod: IProductionWithOccurrence): string {\n /* istanbul ignore else */\n if (prod instanceof NonTerminal) {\n return \"SUBRULE\";\n } else if (prod instanceof Option) {\n return \"OPTION\";\n } else if (prod instanceof Alternation) {\n return \"OR\";\n } else if (prod instanceof RepetitionMandatory) {\n return \"AT_LEAST_ONE\";\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\n return \"AT_LEAST_ONE_SEP\";\n } else if (prod instanceof RepetitionWithSeparator) {\n return \"MANY_SEP\";\n } else if (prod instanceof Repetition) {\n return \"MANY\";\n } else if (prod instanceof Terminal) {\n return \"CONSUME\";\n /* c8 ignore next 3 */\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n", "export {\n Rule,\n Terminal,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Alternation,\n Alternative,\n serializeGrammar,\n serializeProduction,\n} from \"./model.js\";\n\nexport { GAstVisitor } from \"./visitor.js\";\n\nexport {\n getProductionDslName,\n isOptionalProd,\n isBranchingProd,\n isSequenceProd,\n} from \"./helpers.js\";\n", "import { drop, forEach } from \"lodash-es\";\nimport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Terminal,\n} from \"@chevrotain/gast\";\nimport { IProduction } from \"@chevrotain/types\";\n\n/**\n * A Grammar Walker that computes the \"remaining\" grammar \"after\" a productions in the grammar.\n */\nexport abstract class RestWalker {\n walk(prod: { definition: IProduction[] }, prevRest: any[] = []): void {\n forEach(prod.definition, (subProd: IProduction, index) => {\n const currRest = drop(prod.definition, index + 1);\n /* istanbul ignore else */\n if (subProd instanceof NonTerminal) {\n this.walkProdRef(subProd, currRest, prevRest);\n } else if (subProd instanceof Terminal) {\n this.walkTerminal(subProd, currRest, prevRest);\n } else if (subProd instanceof Alternative) {\n this.walkFlat(subProd, currRest, prevRest);\n } else if (subProd instanceof Option) {\n this.walkOption(subProd, currRest, prevRest);\n } else if (subProd instanceof RepetitionMandatory) {\n this.walkAtLeastOne(subProd, currRest, prevRest);\n } else if (subProd instanceof RepetitionMandatoryWithSeparator) {\n this.walkAtLeastOneSep(subProd, currRest, prevRest);\n } else if (subProd instanceof RepetitionWithSeparator) {\n this.walkManySep(subProd, currRest, prevRest);\n } else if (subProd instanceof Repetition) {\n this.walkMany(subProd, currRest, prevRest);\n } else if (subProd instanceof Alternation) {\n this.walkOr(subProd, currRest, prevRest);\n } else {\n throw Error(\"non exhaustive match\");\n }\n });\n }\n\n walkTerminal(\n terminal: Terminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {}\n\n walkProdRef(\n refProd: NonTerminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {}\n\n walkFlat(\n flatProd: Alternative,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABCDEF => after the D the rest is EF\n const fullOrRest = currRest.concat(prevRest);\n this.walk(flatProd, fullOrRest);\n }\n\n walkOption(\n optionProd: Option,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(DE)?F => after the (DE)? the rest is F\n const fullOrRest = currRest.concat(prevRest);\n this.walk(optionProd, fullOrRest);\n }\n\n walkAtLeastOne(\n atLeastOneProd: RepetitionMandatory,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(DE)+F => after the (DE)+ the rest is (DE)?F\n const fullAtLeastOneRest: IProduction[] = [\n new Option({ definition: atLeastOneProd.definition }),\n ].concat(currRest, prevRest);\n this.walk(atLeastOneProd, fullAtLeastOneRest);\n }\n\n walkAtLeastOneSep(\n atLeastOneSepProd: RepetitionMandatoryWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC DE(,DE)* F => after the (,DE)+ the rest is (,DE)?F\n const fullAtLeastOneSepRest = restForRepetitionWithSeparator(\n atLeastOneSepProd,\n currRest,\n prevRest,\n );\n this.walk(atLeastOneSepProd, fullAtLeastOneSepRest);\n }\n\n walkMany(\n manyProd: Repetition,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(DE)*F => after the (DE)* the rest is (DE)?F\n const fullManyRest: IProduction[] = [\n new Option({ definition: manyProd.definition }),\n ].concat(currRest, prevRest);\n this.walk(manyProd, fullManyRest);\n }\n\n walkManySep(\n manySepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC (DE(,DE)*)? F => after the (,DE)* the rest is (,DE)?F\n const fullManySepRest = restForRepetitionWithSeparator(\n manySepProd,\n currRest,\n prevRest,\n );\n this.walk(manySepProd, fullManySepRest);\n }\n\n walkOr(\n orProd: Alternation,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // ABC(D|E|F)G => when finding the (D|E|F) the rest is G\n const fullOrRest = currRest.concat(prevRest);\n // walk all different alternatives\n forEach(orProd.definition, (alt) => {\n // wrapping each alternative in a single definition wrapper\n // to avoid errors in computing the rest of that alternative in the invocation to computeInProdFollows\n // (otherwise for OR([alt1,alt2]) alt2 will be considered in 'rest' of alt1\n const prodWrapper = new Alternative({ definition: [alt] });\n this.walk(prodWrapper, fullOrRest);\n });\n }\n}\n\nfunction restForRepetitionWithSeparator(\n repSepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n) {\n const repSepRest = [\n new Option({\n definition: [\n new Terminal({ terminalType: repSepProd.separator }) as IProduction,\n ].concat(repSepProd.definition),\n }) as IProduction,\n ];\n const fullRepSepRest: IProduction[] = repSepRest.concat(currRest, prevRest);\n return fullRepSepRest;\n}\n", "import { flatten, map, uniq } from \"lodash-es\";\nimport {\n isBranchingProd,\n isOptionalProd,\n isSequenceProd,\n NonTerminal,\n Terminal,\n} from \"@chevrotain/gast\";\nimport { IProduction, TokenType } from \"@chevrotain/types\";\n\nexport function first(prod: IProduction): TokenType[] {\n /* istanbul ignore else */\n if (prod instanceof NonTerminal) {\n // this could in theory cause infinite loops if\n // (1) prod A refs prod B.\n // (2) prod B refs prod A\n // (3) AB can match the empty set\n // in other words a cycle where everything is optional so the first will keep\n // looking ahead for the next optional part and will never exit\n // currently there is no safeguard for this unique edge case because\n // (1) not sure a grammar in which this can happen is useful for anything (productive)\n return first((prod).referencedRule);\n } else if (prod instanceof Terminal) {\n return firstForTerminal(prod);\n } else if (isSequenceProd(prod)) {\n return firstForSequence(prod);\n } else if (isBranchingProd(prod)) {\n return firstForBranching(prod);\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nexport function firstForSequence(prod: {\n definition: IProduction[];\n}): TokenType[] {\n let firstSet: TokenType[] = [];\n const seq = prod.definition;\n let nextSubProdIdx = 0;\n let hasInnerProdsRemaining = seq.length > nextSubProdIdx;\n let currSubProd;\n // so we enter the loop at least once (if the definition is not empty\n let isLastInnerProdOptional = true;\n // scan a sequence until it's end or until we have found a NONE optional production in it\n while (hasInnerProdsRemaining && isLastInnerProdOptional) {\n currSubProd = seq[nextSubProdIdx];\n isLastInnerProdOptional = isOptionalProd(currSubProd);\n firstSet = firstSet.concat(first(currSubProd));\n nextSubProdIdx = nextSubProdIdx + 1;\n hasInnerProdsRemaining = seq.length > nextSubProdIdx;\n }\n\n return uniq(firstSet);\n}\n\nexport function firstForBranching(prod: {\n definition: IProduction[];\n}): TokenType[] {\n const allAlternativesFirsts: TokenType[][] = map(\n prod.definition,\n (innerProd) => {\n return first(innerProd);\n },\n );\n return uniq(flatten(allAlternativesFirsts));\n}\n\nexport function firstForTerminal(terminal: Terminal): TokenType[] {\n return [terminal.terminalType];\n}\n", "// TODO: can this be removed? where is it used?\nexport const IN = \"_~IN~_\";\n", "import { RestWalker } from \"./rest.js\";\nimport { first } from \"./first.js\";\nimport { assign, forEach } from \"lodash-es\";\nimport { IN } from \"../constants.js\";\nimport { Alternative, NonTerminal, Rule, Terminal } from \"@chevrotain/gast\";\nimport { IProduction, TokenType } from \"@chevrotain/types\";\n\n// This ResyncFollowsWalker computes all of the follows required for RESYNC\n// (skipping reference production).\nexport class ResyncFollowsWalker extends RestWalker {\n public follows: Record = {};\n\n constructor(private topProd: Rule) {\n super();\n }\n\n startWalking(): Record {\n this.walk(this.topProd);\n return this.follows;\n }\n\n walkTerminal(\n terminal: Terminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // do nothing! just like in the public sector after 13:00\n }\n\n walkProdRef(\n refProd: NonTerminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n const followName =\n buildBetweenProdsFollowPrefix(refProd.referencedRule, refProd.idx) +\n this.topProd.name;\n const fullRest: IProduction[] = currRest.concat(prevRest);\n const restProd = new Alternative({ definition: fullRest });\n const t_in_topProd_follows = first(restProd);\n this.follows[followName] = t_in_topProd_follows;\n }\n}\n\nexport function computeAllProdsFollows(\n topProductions: Rule[],\n): Record {\n const reSyncFollows = {};\n\n forEach(topProductions, (topProd) => {\n const currRefsFollow = new ResyncFollowsWalker(topProd).startWalking();\n assign(reSyncFollows, currRefsFollow);\n });\n return reSyncFollows;\n}\n\nexport function buildBetweenProdsFollowPrefix(\n inner: Rule,\n occurenceInParent: number,\n): string {\n return inner.name + occurenceInParent + IN;\n}\n\nexport function buildInProdFollowPrefix(terminal: Terminal): string {\n const terminalName = terminal.terminalType.name;\n return terminalName + terminal.idx + IN;\n}\n", "import {\n Alternative,\n Assertion,\n Atom,\n Disjunction,\n RegExpParser,\n RegExpPattern,\n} from \"@chevrotain/regexp-to-ast\";\n\nlet regExpAstCache: { [regex: string]: RegExpPattern } = {};\nconst regExpParser = new RegExpParser();\n\n// this should be moved to regexp-to-ast\nexport type ASTNode =\n | RegExpPattern\n | Disjunction\n | Alternative\n | Assertion\n | Atom;\n\nexport function getRegExpAst(regExp: RegExp): RegExpPattern {\n const regExpStr = regExp.toString();\n if (regExpAstCache.hasOwnProperty(regExpStr)) {\n return regExpAstCache[regExpStr];\n } else {\n const regExpAst = regExpParser.pattern(regExpStr);\n regExpAstCache[regExpStr] = regExpAst;\n return regExpAst;\n }\n}\n\nexport function clearRegExpParserCache() {\n regExpAstCache = {};\n}\n", "import {\n Alternative,\n Atom,\n BaseRegExpVisitor,\n Character,\n Disjunction,\n Group,\n Set,\n} from \"@chevrotain/regexp-to-ast\";\nimport { every, find, forEach, includes, isArray, values } from \"lodash-es\";\nimport { PRINT_ERROR, PRINT_WARNING } from \"@chevrotain/utils\";\nimport { ASTNode, getRegExpAst } from \"./reg_exp_parser.js\";\nimport { charCodeToOptimizedIndex, minOptimizationVal } from \"./lexer.js\";\n\nconst complementErrorMessage =\n \"Complement Sets are not supported for first char optimization\";\nexport const failedOptimizationPrefixMsg =\n 'Unable to use \"first char\" lexer optimizations:\\n';\n\nexport function getOptimizedStartCodesIndices(\n regExp: RegExp,\n ensureOptimizations = false,\n): number[] {\n try {\n const ast = getRegExpAst(regExp);\n const firstChars = firstCharOptimizedIndices(\n ast.value,\n {},\n ast.flags.ignoreCase,\n );\n return firstChars;\n } catch (e) {\n /* istanbul ignore next */\n // Testing this relies on the regexp-to-ast library having a bug... */\n // TODO: only the else branch needs to be ignored, try to fix with newer prettier / tsc\n if (e.message === complementErrorMessage) {\n if (ensureOptimizations) {\n PRINT_WARNING(\n `${failedOptimizationPrefixMsg}` +\n `\\tUnable to optimize: < ${regExp.toString()} >\\n` +\n \"\\tComplement Sets cannot be automatically optimized.\\n\" +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.\",\n );\n }\n } else {\n let msgSuffix = \"\";\n if (ensureOptimizations) {\n msgSuffix =\n \"\\n\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.\";\n }\n PRINT_ERROR(\n `${failedOptimizationPrefixMsg}\\n` +\n `\\tFailed parsing: < ${regExp.toString()} >\\n` +\n `\\tUsing the @chevrotain/regexp-to-ast library\\n` +\n \"\\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues\" +\n msgSuffix,\n );\n }\n }\n\n return [];\n}\n\nexport function firstCharOptimizedIndices(\n ast: ASTNode,\n result: { [charCode: number]: number },\n ignoreCase: boolean,\n): number[] {\n switch (ast.type) {\n case \"Disjunction\":\n for (let i = 0; i < ast.value.length; i++) {\n firstCharOptimizedIndices(ast.value[i], result, ignoreCase);\n }\n break;\n case \"Alternative\":\n const terms = ast.value;\n for (let i = 0; i < terms.length; i++) {\n const term = terms[i];\n\n // skip terms that cannot effect the first char results\n switch (term.type) {\n case \"EndAnchor\":\n // A group back reference cannot affect potential starting char.\n // because if a back reference is the first production than automatically\n // the group being referenced has had to come BEFORE so its codes have already been added\n case \"GroupBackReference\":\n // assertions do not affect potential starting codes\n case \"Lookahead\":\n case \"NegativeLookahead\":\n case \"StartAnchor\":\n case \"WordBoundary\":\n case \"NonWordBoundary\":\n continue;\n }\n\n const atom = term;\n switch (atom.type) {\n case \"Character\":\n addOptimizedIdxToResult(atom.value, result, ignoreCase);\n break;\n case \"Set\":\n if (atom.complement === true) {\n throw Error(complementErrorMessage);\n }\n forEach(atom.value, (code) => {\n if (typeof code === \"number\") {\n addOptimizedIdxToResult(code, result, ignoreCase);\n } else {\n // range\n const range = code as any;\n // cannot optimize when ignoreCase is\n if (ignoreCase === true) {\n for (\n let rangeCode = range.from;\n rangeCode <= range.to;\n rangeCode++\n ) {\n addOptimizedIdxToResult(rangeCode, result, ignoreCase);\n }\n }\n // Optimization (2 orders of magnitude less work for very large ranges)\n else {\n // handle unoptimized values\n for (\n let rangeCode = range.from;\n rangeCode <= range.to && rangeCode < minOptimizationVal;\n rangeCode++\n ) {\n addOptimizedIdxToResult(rangeCode, result, ignoreCase);\n }\n\n // Less common charCode where we optimize for faster init time, by using larger \"buckets\"\n if (range.to >= minOptimizationVal) {\n const minUnOptVal =\n range.from >= minOptimizationVal\n ? range.from\n : minOptimizationVal;\n const maxUnOptVal = range.to;\n const minOptIdx = charCodeToOptimizedIndex(minUnOptVal);\n const maxOptIdx = charCodeToOptimizedIndex(maxUnOptVal);\n\n for (\n let currOptIdx = minOptIdx;\n currOptIdx <= maxOptIdx;\n currOptIdx++\n ) {\n result[currOptIdx] = currOptIdx;\n }\n }\n }\n }\n });\n break;\n case \"Group\":\n firstCharOptimizedIndices(atom.value, result, ignoreCase);\n break;\n /* istanbul ignore next */\n default:\n throw Error(\"Non Exhaustive Match\");\n }\n\n // reached a mandatory production, no more **start** codes can be found on this alternative\n const isOptionalQuantifier =\n atom.quantifier !== undefined && atom.quantifier.atLeast === 0;\n if (\n // A group may be optional due to empty contents /(?:)/\n // or if everything inside it is optional /((a)?)/\n (atom.type === \"Group\" && isWholeOptional(atom) === false) ||\n // If this term is not a group it may only be optional if it has an optional quantifier\n (atom.type !== \"Group\" && isOptionalQuantifier === false)\n ) {\n break;\n }\n }\n break;\n /* istanbul ignore next */\n default:\n throw Error(\"non exhaustive match!\");\n }\n\n // console.log(Object.keys(result).length)\n return values(result);\n}\n\nfunction addOptimizedIdxToResult(\n code: number,\n result: { [charCode: number]: number },\n ignoreCase: boolean,\n) {\n const optimizedCharIdx = charCodeToOptimizedIndex(code);\n result[optimizedCharIdx] = optimizedCharIdx;\n\n if (ignoreCase === true) {\n handleIgnoreCase(code, result);\n }\n}\n\nfunction handleIgnoreCase(\n code: number,\n result: { [charCode: number]: number },\n) {\n const char = String.fromCharCode(code);\n const upperChar = char.toUpperCase();\n /* istanbul ignore else */\n if (upperChar !== char) {\n const optimizedCharIdx = charCodeToOptimizedIndex(upperChar.charCodeAt(0));\n result[optimizedCharIdx] = optimizedCharIdx;\n } else {\n const lowerChar = char.toLowerCase();\n if (lowerChar !== char) {\n const optimizedCharIdx = charCodeToOptimizedIndex(\n lowerChar.charCodeAt(0),\n );\n result[optimizedCharIdx] = optimizedCharIdx;\n }\n }\n}\n\nfunction findCode(setNode: Set, targetCharCodes: number[]) {\n return find(setNode.value, (codeOrRange) => {\n if (typeof codeOrRange === \"number\") {\n return includes(targetCharCodes, codeOrRange);\n } else {\n // range\n const range = codeOrRange;\n return (\n find(\n targetCharCodes,\n (targetCode) => range.from <= targetCode && targetCode <= range.to,\n ) !== undefined\n );\n }\n });\n}\n\nfunction isWholeOptional(ast: any): boolean {\n const quantifier = (ast as Atom).quantifier;\n if (quantifier && quantifier.atLeast === 0) {\n return true;\n }\n\n if (!ast.value) {\n return false;\n }\n\n return isArray(ast.value)\n ? every(ast.value, isWholeOptional)\n : isWholeOptional(ast.value);\n}\n\nclass CharCodeFinder extends BaseRegExpVisitor {\n found: boolean = false;\n\n constructor(private targetCharCodes: number[]) {\n super();\n }\n\n visitChildren(node: ASTNode) {\n // No need to keep looking...\n if (this.found === true) {\n return;\n }\n\n // switch lookaheads as they do not actually consume any characters thus\n // finding a charCode at lookahead context does not mean that regexp can actually contain it in a match.\n switch (node.type) {\n case \"Lookahead\":\n this.visitLookahead(node);\n return;\n case \"NegativeLookahead\":\n this.visitNegativeLookahead(node);\n return;\n }\n\n super.visitChildren(node);\n }\n\n visitCharacter(node: Character) {\n if (includes(this.targetCharCodes, node.value)) {\n this.found = true;\n }\n }\n\n visitSet(node: Set) {\n if (node.complement) {\n if (findCode(node, this.targetCharCodes) === undefined) {\n this.found = true;\n }\n } else {\n if (findCode(node, this.targetCharCodes) !== undefined) {\n this.found = true;\n }\n }\n }\n}\n\nexport function canMatchCharCode(\n charCodes: number[],\n pattern: RegExp | string,\n) {\n if (pattern instanceof RegExp) {\n const ast = getRegExpAst(pattern);\n const charCodeFinder = new CharCodeFinder(charCodes);\n charCodeFinder.visit(ast);\n return charCodeFinder.found;\n } else {\n return (\n find(pattern, (char) => {\n return includes(charCodes, (char).charCodeAt(0));\n }) !== undefined\n );\n }\n}\n", "import { BaseRegExpVisitor } from \"@chevrotain/regexp-to-ast\";\nimport {\n IRegExpExec,\n Lexer,\n LexerDefinitionErrorType,\n} from \"./lexer_public.js\";\nimport {\n compact,\n defaults,\n difference,\n filter,\n find,\n first,\n flatten,\n forEach,\n has,\n includes,\n indexOf,\n isArray,\n isEmpty,\n isFunction,\n isRegExp,\n isString,\n isUndefined,\n keys,\n map,\n reduce,\n reject,\n values,\n} from \"lodash-es\";\nimport { PRINT_ERROR } from \"@chevrotain/utils\";\nimport {\n canMatchCharCode,\n failedOptimizationPrefixMsg,\n getOptimizedStartCodesIndices,\n} from \"./reg_exp.js\";\nimport {\n ILexerDefinitionError,\n ILineTerminatorsTester,\n IMultiModeLexerDefinition,\n IToken,\n TokenType,\n} from \"@chevrotain/types\";\nimport { getRegExpAst } from \"./reg_exp_parser.js\";\n\nconst PATTERN = \"PATTERN\";\nexport const DEFAULT_MODE = \"defaultMode\";\nexport const MODES = \"modes\";\n\nexport interface IPatternConfig {\n pattern: IRegExpExec | string;\n longerAlt: number[] | undefined;\n canLineTerminator: boolean;\n isCustom: boolean;\n short: number | false;\n group: string | undefined | false;\n push: string | undefined;\n pop: boolean;\n tokenType: TokenType;\n tokenTypeIdx: number;\n}\n\nexport interface IAnalyzeResult {\n patternIdxToConfig: IPatternConfig[];\n charCodeToPatternIdxToConfig: { [charCode: number]: IPatternConfig[] };\n emptyGroups: { [groupName: string]: IToken[] };\n hasCustom: boolean;\n canBeOptimized: boolean;\n}\n\nexport let SUPPORT_STICKY =\n typeof (new RegExp(\"(?:)\")).sticky === \"boolean\";\n\nexport function disableSticky() {\n SUPPORT_STICKY = false;\n}\n\nexport function enableSticky() {\n SUPPORT_STICKY = true;\n}\n\nexport function analyzeTokenTypes(\n tokenTypes: TokenType[],\n options: {\n positionTracking?: \"full\" | \"onlyStart\" | \"onlyOffset\";\n ensureOptimizations?: boolean;\n lineTerminatorCharacters?: (number | string)[];\n // TODO: should `useSticky` be an argument here?\n useSticky?: boolean;\n safeMode?: boolean;\n tracer?: (msg: string, action: () => void) => void;\n },\n): IAnalyzeResult {\n options = defaults(options, {\n useSticky: SUPPORT_STICKY,\n debug: false as boolean,\n safeMode: false as boolean,\n positionTracking: \"full\",\n lineTerminatorCharacters: [\"\\r\", \"\\n\"],\n tracer: (msg: string, action: Function) => action(),\n });\n\n const tracer = options.tracer!;\n\n tracer(\"initCharCodeToOptimizedIndexMap\", () => {\n initCharCodeToOptimizedIndexMap();\n });\n\n let onlyRelevantTypes: TokenType[];\n tracer(\"Reject Lexer.NA\", () => {\n onlyRelevantTypes = reject(tokenTypes, (currType) => {\n return currType[PATTERN] === Lexer.NA;\n });\n });\n\n let hasCustom = false;\n let allTransformedPatterns: (IRegExpExec | string)[];\n tracer(\"Transform Patterns\", () => {\n hasCustom = false;\n allTransformedPatterns = map(\n onlyRelevantTypes,\n (currType): IRegExpExec | string => {\n const currPattern = currType[PATTERN];\n\n /* istanbul ignore else */\n if (isRegExp(currPattern)) {\n const regExpSource = currPattern.source;\n if (\n regExpSource.length === 1 &&\n // only these regExp meta characters which can appear in a length one regExp\n regExpSource !== \"^\" &&\n regExpSource !== \"$\" &&\n regExpSource !== \".\" &&\n !currPattern.ignoreCase\n ) {\n return regExpSource;\n } else if (\n regExpSource.length === 2 &&\n regExpSource[0] === \"\\\\\" &&\n // not a meta character\n !includes(\n [\n \"d\",\n \"D\",\n \"s\",\n \"S\",\n \"t\",\n \"r\",\n \"n\",\n \"t\",\n \"0\",\n \"c\",\n \"b\",\n \"B\",\n \"f\",\n \"v\",\n \"w\",\n \"W\",\n ],\n regExpSource[1],\n )\n ) {\n // escaped meta Characters: /\\+/ /\\[/\n // or redundant escaping: /\\a/\n // without the escaping \"\\\"\n return regExpSource[1];\n } else {\n return options.useSticky\n ? addStickyFlag(currPattern)\n : addStartOfInput(currPattern);\n }\n } else if (isFunction(currPattern)) {\n hasCustom = true;\n // CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object\n return { exec: currPattern };\n } else if (typeof currPattern === \"object\") {\n hasCustom = true;\n // ICustomPattern\n return currPattern;\n } else if (typeof currPattern === \"string\") {\n if (currPattern.length === 1) {\n return currPattern;\n } else {\n const escapedRegExpString = currPattern.replace(\n /[\\\\^$.*+?()[\\]{}|]/g,\n \"\\\\$&\",\n );\n const wrappedRegExp = new RegExp(escapedRegExpString);\n return options.useSticky\n ? addStickyFlag(wrappedRegExp)\n : addStartOfInput(wrappedRegExp);\n }\n } else {\n throw Error(\"non exhaustive match\");\n }\n },\n );\n });\n\n let patternIdxToType: number[];\n let patternIdxToGroup: (string | undefined | false)[];\n let patternIdxToLongerAltIdxArr: (number[] | undefined)[];\n let patternIdxToPushMode: (string | undefined)[];\n let patternIdxToPopMode: boolean[];\n tracer(\"misc mapping\", () => {\n patternIdxToType = map(\n onlyRelevantTypes,\n (currType) => currType.tokenTypeIdx!,\n );\n\n patternIdxToGroup = map(onlyRelevantTypes, (clazz: any) => {\n const groupName = clazz.GROUP;\n /* istanbul ignore next */\n if (groupName === Lexer.SKIPPED) {\n return undefined;\n } else if (isString(groupName)) {\n return groupName;\n } else if (isUndefined(groupName)) {\n return false;\n } else {\n throw Error(\"non exhaustive match\");\n }\n });\n\n patternIdxToLongerAltIdxArr = map(onlyRelevantTypes, (clazz: any) => {\n const longerAltType = clazz.LONGER_ALT;\n\n if (longerAltType) {\n const longerAltIdxArr = isArray(longerAltType)\n ? map(longerAltType, (type: any) => indexOf(onlyRelevantTypes, type))\n : [indexOf(onlyRelevantTypes, longerAltType)];\n return longerAltIdxArr;\n }\n });\n\n patternIdxToPushMode = map(\n onlyRelevantTypes,\n (clazz: any) => clazz.PUSH_MODE,\n );\n\n patternIdxToPopMode = map(onlyRelevantTypes, (clazz: any) =>\n has(clazz, \"POP_MODE\"),\n );\n });\n\n let patternIdxToCanLineTerminator: boolean[];\n tracer(\"Line Terminator Handling\", () => {\n const lineTerminatorCharCodes = getCharCodes(\n options.lineTerminatorCharacters!,\n );\n patternIdxToCanLineTerminator = map(onlyRelevantTypes, (tokType) => false);\n if (options.positionTracking !== \"onlyOffset\") {\n patternIdxToCanLineTerminator = map(onlyRelevantTypes, (tokType) => {\n if (has(tokType, \"LINE_BREAKS\")) {\n return !!tokType.LINE_BREAKS;\n } else {\n return (\n checkLineBreaksIssues(tokType, lineTerminatorCharCodes) === false &&\n canMatchCharCode(\n lineTerminatorCharCodes,\n tokType.PATTERN as RegExp | string,\n )\n );\n }\n });\n }\n });\n\n let patternIdxToIsCustom: boolean[];\n let patternIdxToShort: (number | false)[];\n let emptyGroups!: { [groupName: string]: IToken[] };\n let patternIdxToConfig!: IPatternConfig[];\n tracer(\"Misc Mapping #2\", () => {\n patternIdxToIsCustom = map(onlyRelevantTypes, isCustomPattern);\n patternIdxToShort = map(allTransformedPatterns, isShortPattern);\n\n emptyGroups = reduce(\n onlyRelevantTypes,\n (acc, clazz: any) => {\n const groupName = clazz.GROUP;\n if (isString(groupName) && !(groupName === Lexer.SKIPPED)) {\n acc[groupName] = [];\n }\n return acc;\n },\n {} as { [groupName: string]: IToken[] },\n );\n\n patternIdxToConfig = map(\n allTransformedPatterns,\n (x, idx): IPatternConfig => {\n return {\n pattern: allTransformedPatterns[idx],\n longerAlt: patternIdxToLongerAltIdxArr[idx],\n canLineTerminator: patternIdxToCanLineTerminator[idx],\n isCustom: patternIdxToIsCustom[idx],\n short: patternIdxToShort[idx],\n group: patternIdxToGroup[idx],\n push: patternIdxToPushMode[idx],\n pop: patternIdxToPopMode[idx],\n tokenTypeIdx: patternIdxToType[idx],\n tokenType: onlyRelevantTypes[idx],\n };\n },\n );\n });\n\n let canBeOptimized = true;\n let charCodeToPatternIdxToConfig: { [charCode: number]: IPatternConfig[] } =\n [];\n\n if (!options.safeMode) {\n tracer(\"First Char Optimization\", () => {\n charCodeToPatternIdxToConfig = reduce(\n onlyRelevantTypes,\n (result, currTokType, idx) => {\n if (typeof currTokType.PATTERN === \"string\") {\n const charCode = currTokType.PATTERN.charCodeAt(0);\n const optimizedIdx = charCodeToOptimizedIndex(charCode);\n addToMapOfArrays(result, optimizedIdx, patternIdxToConfig[idx]);\n } else if (isArray(currTokType.START_CHARS_HINT)) {\n let lastOptimizedIdx: number;\n forEach(currTokType.START_CHARS_HINT, (charOrInt) => {\n const charCode =\n typeof charOrInt === \"string\"\n ? charOrInt.charCodeAt(0)\n : charOrInt;\n const currOptimizedIdx = charCodeToOptimizedIndex(charCode);\n // Avoid adding the config multiple times\n /* istanbul ignore else */\n // - Difficult to check this scenario effects as it is only a performance\n // optimization that does not change correctness\n if (lastOptimizedIdx !== currOptimizedIdx) {\n lastOptimizedIdx = currOptimizedIdx;\n addToMapOfArrays(\n result,\n currOptimizedIdx,\n patternIdxToConfig[idx],\n );\n }\n });\n } else if (isRegExp(currTokType.PATTERN)) {\n if (currTokType.PATTERN.unicode) {\n canBeOptimized = false;\n if (options.ensureOptimizations) {\n PRINT_ERROR(\n `${failedOptimizationPrefixMsg}` +\n `\\tUnable to analyze < ${currTokType.PATTERN.toString()} > pattern.\\n` +\n \"\\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\\n\" +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE\",\n );\n }\n } else {\n const optimizedCodes = getOptimizedStartCodesIndices(\n currTokType.PATTERN,\n options.ensureOptimizations,\n );\n /* istanbul ignore if */\n // start code will only be empty given an empty regExp or failure of regexp-to-ast library\n // the first should be a different validation and the second cannot be tested.\n if (isEmpty(optimizedCodes)) {\n // we cannot understand what codes may start possible matches\n // The optimization correctness requires knowing start codes for ALL patterns.\n // Not actually sure this is an error, no debug message\n canBeOptimized = false;\n }\n forEach(optimizedCodes, (code) => {\n addToMapOfArrays(result, code, patternIdxToConfig[idx]);\n });\n }\n } else {\n if (options.ensureOptimizations) {\n PRINT_ERROR(\n `${failedOptimizationPrefixMsg}` +\n `\\tTokenType: <${currTokType.name}> is using a custom token pattern without providing parameter.\\n` +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE\",\n );\n }\n canBeOptimized = false;\n }\n\n return result;\n },\n [] as { [charCode: number]: IPatternConfig[] },\n );\n });\n }\n\n return {\n emptyGroups: emptyGroups,\n patternIdxToConfig: patternIdxToConfig,\n charCodeToPatternIdxToConfig: charCodeToPatternIdxToConfig,\n hasCustom: hasCustom,\n canBeOptimized: canBeOptimized,\n };\n}\n\nexport function validatePatterns(\n tokenTypes: TokenType[],\n validModesNames: string[],\n): ILexerDefinitionError[] {\n let errors: ILexerDefinitionError[] = [];\n\n const missingResult = findMissingPatterns(tokenTypes);\n errors = errors.concat(missingResult.errors);\n\n const invalidResult = findInvalidPatterns(missingResult.valid);\n const validTokenTypes = invalidResult.valid;\n errors = errors.concat(invalidResult.errors);\n\n errors = errors.concat(validateRegExpPattern(validTokenTypes));\n\n errors = errors.concat(findInvalidGroupType(validTokenTypes));\n\n errors = errors.concat(\n findModesThatDoNotExist(validTokenTypes, validModesNames),\n );\n\n errors = errors.concat(findUnreachablePatterns(validTokenTypes));\n\n return errors;\n}\n\nfunction validateRegExpPattern(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n let errors: ILexerDefinitionError[] = [];\n const withRegExpPatterns = filter(tokenTypes, (currTokType) =>\n isRegExp(currTokType[PATTERN]),\n );\n\n errors = errors.concat(findEndOfInputAnchor(withRegExpPatterns));\n\n errors = errors.concat(findStartOfInputAnchor(withRegExpPatterns));\n\n errors = errors.concat(findUnsupportedFlags(withRegExpPatterns));\n\n errors = errors.concat(findDuplicatePatterns(withRegExpPatterns));\n\n errors = errors.concat(findEmptyMatchRegExps(withRegExpPatterns));\n\n return errors;\n}\n\nexport interface ILexerFilterResult {\n errors: ILexerDefinitionError[];\n valid: TokenType[];\n}\n\nexport function findMissingPatterns(\n tokenTypes: TokenType[],\n): ILexerFilterResult {\n const tokenTypesWithMissingPattern = filter(tokenTypes, (currType) => {\n return !has(currType, PATTERN);\n });\n\n const errors = map(tokenTypesWithMissingPattern, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- missing static 'PATTERN' property\",\n type: LexerDefinitionErrorType.MISSING_PATTERN,\n tokenTypes: [currType],\n };\n });\n\n const valid = difference(tokenTypes, tokenTypesWithMissingPattern);\n return { errors, valid };\n}\n\nexport function findInvalidPatterns(\n tokenTypes: TokenType[],\n): ILexerFilterResult {\n const tokenTypesWithInvalidPattern = filter(tokenTypes, (currType) => {\n const pattern = currType[PATTERN];\n return (\n !isRegExp(pattern) &&\n !isFunction(pattern) &&\n !has(pattern, \"exec\") &&\n !isString(pattern)\n );\n });\n\n const errors = map(tokenTypesWithInvalidPattern, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' can only be a RegExp, a\" +\n \" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.\",\n type: LexerDefinitionErrorType.INVALID_PATTERN,\n tokenTypes: [currType],\n };\n });\n\n const valid = difference(tokenTypes, tokenTypesWithInvalidPattern);\n return { errors, valid };\n}\n\nconst end_of_input = /[^\\\\][$]/;\n\nexport function findEndOfInputAnchor(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n class EndAnchorFinder extends BaseRegExpVisitor {\n found = false;\n\n visitEndAnchor(node: unknown) {\n this.found = true;\n }\n }\n\n const invalidRegex = filter(tokenTypes, (currType) => {\n const pattern = currType.PATTERN;\n\n try {\n const regexpAst = getRegExpAst(pattern as RegExp);\n const endAnchorVisitor = new EndAnchorFinder();\n endAnchorVisitor.visit(regexpAst);\n\n return endAnchorVisitor.found;\n } catch (e) {\n // old behavior in case of runtime exceptions with regexp-to-ast.\n /* istanbul ignore next - cannot ensure an error in regexp-to-ast*/\n return end_of_input.test((pattern as RegExp).source);\n }\n });\n\n const errors = map(invalidRegex, (currType) => {\n return {\n message:\n \"Unexpected RegExp Anchor Error:\\n\" +\n \"\\tToken Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' cannot contain end of input anchor '$'\\n\" +\n \"\\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.EOI_ANCHOR_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nexport function findEmptyMatchRegExps(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const matchesEmptyString = filter(tokenTypes, (currType) => {\n const pattern = currType.PATTERN as RegExp;\n return pattern.test(\"\");\n });\n\n const errors = map(matchesEmptyString, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' must not match an empty string\",\n type: LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nconst start_of_input = /[^\\\\[][\\^]|^\\^/;\n\nexport function findStartOfInputAnchor(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n class StartAnchorFinder extends BaseRegExpVisitor {\n found = false;\n\n visitStartAnchor(node: unknown) {\n this.found = true;\n }\n }\n\n const invalidRegex = filter(tokenTypes, (currType) => {\n const pattern = currType.PATTERN as RegExp;\n try {\n const regexpAst = getRegExpAst(pattern);\n const startAnchorVisitor = new StartAnchorFinder();\n startAnchorVisitor.visit(regexpAst);\n\n return startAnchorVisitor.found;\n } catch (e) {\n // old behavior in case of runtime exceptions with regexp-to-ast.\n /* istanbul ignore next - cannot ensure an error in regexp-to-ast*/\n return start_of_input.test(pattern.source);\n }\n });\n\n const errors = map(invalidRegex, (currType) => {\n return {\n message:\n \"Unexpected RegExp Anchor Error:\\n\" +\n \"\\tToken Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' cannot contain start of input anchor '^'\\n\" +\n \"\\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.SOI_ANCHOR_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nexport function findUnsupportedFlags(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const invalidFlags = filter(tokenTypes, (currType) => {\n const pattern = currType[PATTERN];\n return pattern instanceof RegExp && (pattern.multiline || pattern.global);\n });\n\n const errors = map(invalidFlags, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' may NOT contain global('g') or multiline('m')\",\n type: LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\n// This can only test for identical duplicate RegExps, not semantically equivalent ones.\nexport function findDuplicatePatterns(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const found: TokenType[] = [];\n let identicalPatterns = map(tokenTypes, (outerType: any) => {\n return reduce(\n tokenTypes,\n (result, innerType) => {\n if (\n outerType.PATTERN.source === (innerType.PATTERN as RegExp).source &&\n !includes(found, innerType) &&\n innerType.PATTERN !== Lexer.NA\n ) {\n // this avoids duplicates in the result, each Token Type may only appear in one \"set\"\n // in essence we are creating Equivalence classes on equality relation.\n found.push(innerType);\n result.push(innerType);\n return result;\n }\n return result;\n },\n [] as TokenType[],\n );\n });\n\n identicalPatterns = compact(identicalPatterns);\n\n const duplicatePatterns = filter(identicalPatterns, (currIdenticalSet) => {\n return currIdenticalSet.length > 1;\n });\n\n const errors = map(duplicatePatterns, (setOfIdentical: any) => {\n const tokenTypeNames = map(setOfIdentical, (currType: any) => {\n return currType.name;\n });\n\n const dupPatternSrc = (first(setOfIdentical)).PATTERN;\n return {\n message:\n `The same RegExp pattern ->${dupPatternSrc}<-` +\n `has been used in all of the following Token Types: ${tokenTypeNames.join(\n \", \",\n )} <-`,\n type: LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,\n tokenTypes: setOfIdentical,\n };\n });\n\n return errors;\n}\n\nexport function findInvalidGroupType(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const invalidTypes = filter(tokenTypes, (clazz: any) => {\n if (!has(clazz, \"GROUP\")) {\n return false;\n }\n const group = clazz.GROUP;\n\n return group !== Lexer.SKIPPED && group !== Lexer.NA && !isString(group);\n });\n\n const errors = map(invalidTypes, (currType) => {\n return {\n message:\n \"Token Type: ->\" +\n currType.name +\n \"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String\",\n type: LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,\n tokenTypes: [currType],\n };\n });\n\n return errors;\n}\n\nexport function findModesThatDoNotExist(\n tokenTypes: TokenType[],\n validModes: string[],\n): ILexerDefinitionError[] {\n const invalidModes = filter(tokenTypes, (clazz: any) => {\n return (\n clazz.PUSH_MODE !== undefined && !includes(validModes, clazz.PUSH_MODE)\n );\n });\n\n const errors = map(invalidModes, (tokType) => {\n const msg =\n `Token Type: ->${tokType.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${tokType.PUSH_MODE}<-` +\n `which does not exist`;\n return {\n message: msg,\n type: LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,\n tokenTypes: [tokType],\n };\n });\n\n return errors;\n}\n\nexport function findUnreachablePatterns(\n tokenTypes: TokenType[],\n): ILexerDefinitionError[] {\n const errors: ILexerDefinitionError[] = [];\n\n const canBeTested = reduce(\n tokenTypes,\n (result, tokType, idx) => {\n const pattern = tokType.PATTERN;\n\n if (pattern === Lexer.NA) {\n return result;\n }\n\n // a more comprehensive validation for all forms of regExps would require\n // deeper regExp analysis capabilities\n if (isString(pattern)) {\n result.push({ str: pattern, idx, tokenType: tokType });\n } else if (isRegExp(pattern) && noMetaChar(pattern)) {\n result.push({ str: pattern.source, idx, tokenType: tokType });\n }\n return result;\n },\n [] as { str: string; idx: number; tokenType: TokenType }[],\n );\n\n forEach(tokenTypes, (tokType, testIdx) => {\n forEach(canBeTested, ({ str, idx, tokenType }) => {\n if (testIdx < idx && testTokenType(str, tokType.PATTERN)) {\n const msg =\n `Token: ->${tokenType.name}<- can never be matched.\\n` +\n `Because it appears AFTER the Token Type ->${tokType.name}<-` +\n `in the lexer's definition.\\n` +\n `See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;\n errors.push({\n message: msg,\n type: LexerDefinitionErrorType.UNREACHABLE_PATTERN,\n tokenTypes: [tokType, tokenType],\n });\n }\n });\n });\n\n return errors;\n}\n\nfunction testTokenType(str: string, pattern: any): boolean {\n /* istanbul ignore else */\n if (isRegExp(pattern)) {\n const regExpArray = pattern.exec(str);\n return regExpArray !== null && regExpArray.index === 0;\n } else if (isFunction(pattern)) {\n // maintain the API of custom patterns\n return pattern(str, 0, [], {});\n } else if (has(pattern, \"exec\")) {\n // maintain the API of custom patterns\n return pattern.exec(str, 0, [], {});\n } else if (typeof pattern === \"string\") {\n return pattern === str;\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nfunction noMetaChar(regExp: RegExp): boolean {\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n const metaChars = [\n \".\",\n \"\\\\\",\n \"[\",\n \"]\",\n \"|\",\n \"^\",\n \"$\",\n \"(\",\n \")\",\n \"?\",\n \"*\",\n \"+\",\n \"{\",\n ];\n return (\n find(metaChars, (char) => regExp.source.indexOf(char) !== -1) === undefined\n );\n}\n\nexport function addStartOfInput(pattern: RegExp): RegExp {\n const flags = pattern.ignoreCase ? \"i\" : \"\";\n // always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input.\n // duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/)\n return new RegExp(`^(?:${pattern.source})`, flags);\n}\n\nexport function addStickyFlag(pattern: RegExp): RegExp {\n const flags = pattern.ignoreCase ? \"iy\" : \"y\";\n // always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input.\n // duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/)\n return new RegExp(`${pattern.source}`, flags);\n}\n\nexport function performRuntimeChecks(\n lexerDefinition: IMultiModeLexerDefinition,\n trackLines: boolean,\n lineTerminatorCharacters: (number | string)[],\n): ILexerDefinitionError[] {\n const errors: ILexerDefinitionError[] = [];\n\n // some run time checks to help the end users.\n if (!has(lexerDefinition, DEFAULT_MODE)) {\n errors.push({\n message:\n \"A MultiMode Lexer cannot be initialized without a <\" +\n DEFAULT_MODE +\n \"> property in its definition\\n\",\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE,\n });\n }\n if (!has(lexerDefinition, MODES)) {\n errors.push({\n message:\n \"A MultiMode Lexer cannot be initialized without a <\" +\n MODES +\n \"> property in its definition\\n\",\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY,\n });\n }\n\n if (\n has(lexerDefinition, MODES) &&\n has(lexerDefinition, DEFAULT_MODE) &&\n !has(lexerDefinition.modes, lexerDefinition.defaultMode)\n ) {\n errors.push({\n message:\n `A MultiMode Lexer cannot be initialized with a ${DEFAULT_MODE}: <${lexerDefinition.defaultMode}>` +\n `which does not exist\\n`,\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST,\n });\n }\n\n if (has(lexerDefinition, MODES)) {\n forEach(lexerDefinition.modes, (currModeValue, currModeName) => {\n forEach(currModeValue, (currTokType, currIdx) => {\n if (isUndefined(currTokType)) {\n errors.push({\n message:\n `A Lexer cannot be initialized using an undefined Token Type. Mode:` +\n `<${currModeName}> at index: <${currIdx}>\\n`,\n type: LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED,\n });\n } else if (has(currTokType, \"LONGER_ALT\")) {\n const longerAlt = isArray(currTokType.LONGER_ALT)\n ? currTokType.LONGER_ALT\n : [currTokType.LONGER_ALT];\n forEach(longerAlt, (currLongerAlt) => {\n if (\n !isUndefined(currLongerAlt) &&\n !includes(currModeValue, currLongerAlt)\n ) {\n errors.push({\n message: `A MultiMode Lexer cannot be initialized with a longer_alt <${currLongerAlt.name}> on token <${currTokType.name}> outside of mode <${currModeName}>\\n`,\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE,\n });\n }\n });\n }\n });\n });\n }\n\n return errors;\n}\n\nexport function performWarningRuntimeChecks(\n lexerDefinition: IMultiModeLexerDefinition,\n trackLines: boolean,\n lineTerminatorCharacters: (number | string)[],\n): ILexerDefinitionError[] {\n const warnings = [];\n let hasAnyLineBreak = false;\n const allTokenTypes = compact(flatten(values(lexerDefinition.modes)));\n\n const concreteTokenTypes = reject(\n allTokenTypes,\n (currType) => currType[PATTERN] === Lexer.NA,\n );\n const terminatorCharCodes = getCharCodes(lineTerminatorCharacters);\n if (trackLines) {\n forEach(concreteTokenTypes, (tokType) => {\n const currIssue = checkLineBreaksIssues(tokType, terminatorCharCodes);\n if (currIssue !== false) {\n const message = buildLineBreakIssueMessage(tokType, currIssue);\n const warningDescriptor = {\n message,\n type: currIssue.issue,\n tokenType: tokType,\n };\n warnings.push(warningDescriptor);\n } else {\n // we don't want to attempt to scan if the user explicitly specified the line_breaks option.\n if (has(tokType, \"LINE_BREAKS\")) {\n if (tokType.LINE_BREAKS === true) {\n hasAnyLineBreak = true;\n }\n } else {\n if (\n canMatchCharCode(terminatorCharCodes, tokType.PATTERN as RegExp)\n ) {\n hasAnyLineBreak = true;\n }\n }\n }\n });\n }\n\n if (trackLines && !hasAnyLineBreak) {\n warnings.push({\n message:\n \"Warning: No LINE_BREAKS Found.\\n\" +\n \"\\tThis Lexer has been defined to track line and column information,\\n\" +\n \"\\tBut none of the Token Types can be identified as matching a line terminator.\\n\" +\n \"\\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \\n\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS,\n });\n }\n return warnings;\n}\n\nexport function cloneEmptyGroups(emptyGroups: {\n [groupName: string]: IToken;\n}): { [groupName: string]: IToken } {\n const clonedResult: any = {};\n const groupKeys = keys(emptyGroups);\n\n forEach(groupKeys, (currKey) => {\n const currGroupValue = emptyGroups[currKey];\n\n /* istanbul ignore else */\n if (isArray(currGroupValue)) {\n clonedResult[currKey] = [];\n } else {\n throw Error(\"non exhaustive match\");\n }\n });\n\n return clonedResult;\n}\n\n// TODO: refactor to avoid duplication\nexport function isCustomPattern(tokenType: TokenType): boolean {\n const pattern = tokenType.PATTERN;\n /* istanbul ignore else */\n if (isRegExp(pattern)) {\n return false;\n } else if (isFunction(pattern)) {\n // CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object\n return true;\n } else if (has(pattern, \"exec\")) {\n // ICustomPattern\n return true;\n } else if (isString(pattern)) {\n return false;\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nexport function isShortPattern(pattern: any): number | false {\n if (isString(pattern) && pattern.length === 1) {\n return pattern.charCodeAt(0);\n } else {\n return false;\n }\n}\n\n/**\n * Faster than using a RegExp for default newline detection during lexing.\n */\nexport const LineTerminatorOptimizedTester: ILineTerminatorsTester = {\n // implements /\\n|\\r\\n?/g.test\n test: function (text) {\n const len = text.length;\n for (let i = this.lastIndex; i < len; i++) {\n const c = text.charCodeAt(i);\n if (c === 10) {\n this.lastIndex = i + 1;\n return true;\n } else if (c === 13) {\n if (text.charCodeAt(i + 1) === 10) {\n this.lastIndex = i + 2;\n } else {\n this.lastIndex = i + 1;\n }\n return true;\n }\n }\n return false;\n },\n\n lastIndex: 0,\n};\n\nfunction checkLineBreaksIssues(\n tokType: TokenType,\n lineTerminatorCharCodes: number[],\n):\n | {\n issue:\n | LexerDefinitionErrorType.IDENTIFY_TERMINATOR\n | LexerDefinitionErrorType.CUSTOM_LINE_BREAK;\n errMsg?: string;\n }\n | false {\n if (has(tokType, \"LINE_BREAKS\")) {\n // if the user explicitly declared the line_breaks option we will respect their choice\n // and assume it is correct.\n return false;\n } else {\n /* istanbul ignore else */\n if (isRegExp(tokType.PATTERN)) {\n try {\n // TODO: why is the casting suddenly needed?\n canMatchCharCode(lineTerminatorCharCodes, tokType.PATTERN as RegExp);\n } catch (e) {\n /* istanbul ignore next - to test this we would have to mock to throw an error */\n return {\n issue: LexerDefinitionErrorType.IDENTIFY_TERMINATOR,\n errMsg: (e as Error).message,\n };\n }\n return false;\n } else if (isString(tokType.PATTERN)) {\n // string literal patterns can always be analyzed to detect line terminator usage\n return false;\n } else if (isCustomPattern(tokType)) {\n // custom token types\n return { issue: LexerDefinitionErrorType.CUSTOM_LINE_BREAK };\n } else {\n throw Error(\"non exhaustive match\");\n }\n }\n}\n\nexport function buildLineBreakIssueMessage(\n tokType: TokenType,\n details: {\n issue:\n | LexerDefinitionErrorType.IDENTIFY_TERMINATOR\n | LexerDefinitionErrorType.CUSTOM_LINE_BREAK;\n errMsg?: string;\n },\n): string {\n /* istanbul ignore else */\n if (details.issue === LexerDefinitionErrorType.IDENTIFY_TERMINATOR) {\n return (\n \"Warning: unable to identify line terminator usage in pattern.\\n\" +\n `\\tThe problem is in the <${tokType.name}> Token Type\\n` +\n `\\t Root cause: ${details.errMsg}.\\n` +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR\"\n );\n } else if (details.issue === LexerDefinitionErrorType.CUSTOM_LINE_BREAK) {\n return (\n \"Warning: A Custom Token Pattern should specify the option.\\n\" +\n `\\tThe problem is in the <${tokType.name}> Token Type\\n` +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK\"\n );\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nfunction getCharCodes(charsOrCodes: (number | string)[]): number[] {\n const charCodes = map(charsOrCodes, (numOrString) => {\n if (isString(numOrString)) {\n return numOrString.charCodeAt(0);\n } else {\n return numOrString;\n }\n });\n\n return charCodes;\n}\n\nfunction addToMapOfArrays(\n map: Record,\n key: number,\n value: T,\n): void {\n if (map[key] === undefined) {\n map[key] = [value];\n } else {\n map[key].push(value);\n }\n}\n\nexport const minOptimizationVal = 256;\n\n/**\n * We are mapping charCode above ASCI (256) into buckets each in the size of 256.\n * This is because ASCI are the most common start chars so each one of those will get its own\n * possible token configs vector.\n *\n * Tokens starting with charCodes \"above\" ASCI are uncommon, so we can \"afford\"\n * to place these into buckets of possible token configs, What we gain from\n * this is avoiding the case of creating an optimization 'charCodeToPatternIdxToConfig'\n * which would contain 10,000+ arrays of small size (e.g unicode Identifiers scenario).\n * Our 'charCodeToPatternIdxToConfig' max size will now be:\n * 256 + (2^16 / 2^8) - 1 === 511\n *\n * note the hack for fast division integer part extraction\n * See: https://stackoverflow.com/a/4228528\n */\nlet charCodeToOptimizedIdxMap: number[] = [];\nexport function charCodeToOptimizedIndex(charCode: number): number {\n return charCode < minOptimizationVal\n ? charCode\n : charCodeToOptimizedIdxMap[charCode];\n}\n\n/**\n * This is a compromise between cold start / hot running performance\n * Creating this array takes ~3ms on a modern machine,\n * But if we perform the computation at runtime as needed the CSS Lexer benchmark\n * performance degrades by ~10%\n *\n * TODO: Perhaps it should be lazy initialized only if a charCode > 255 is used.\n */\nfunction initCharCodeToOptimizedIndexMap() {\n if (isEmpty(charCodeToOptimizedIdxMap)) {\n charCodeToOptimizedIdxMap = new Array(65536);\n for (let i = 0; i < 65536; i++) {\n charCodeToOptimizedIdxMap[i] = i > 255 ? 255 + ~~(i / 255) : i;\n }\n }\n}\n", "import {\n clone,\n compact,\n difference,\n flatten,\n forEach,\n has,\n includes,\n isArray,\n isEmpty,\n map,\n} from \"lodash-es\";\nimport { IToken, TokenType } from \"@chevrotain/types\";\n\nexport function tokenStructuredMatcher(\n tokInstance: IToken,\n tokConstructor: TokenType,\n) {\n const instanceType = tokInstance.tokenTypeIdx;\n if (instanceType === tokConstructor.tokenTypeIdx) {\n return true;\n } else {\n return (\n tokConstructor.isParent === true &&\n tokConstructor.categoryMatchesMap![instanceType] === true\n );\n }\n}\n\n// Optimized tokenMatcher in case our grammar does not use token categories\n// Being so tiny it is much more likely to be in-lined and this avoid the function call overhead\nexport function tokenStructuredMatcherNoCategories(\n token: IToken,\n tokType: TokenType,\n) {\n return token.tokenTypeIdx === tokType.tokenTypeIdx;\n}\n\nexport let tokenShortNameIdx = 1;\nexport const tokenIdxToClass: { [tokenIdx: number]: TokenType } = {};\n\nexport function augmentTokenTypes(tokenTypes: TokenType[]): void {\n // collect the parent Token Types as well.\n const tokenTypesAndParents = expandCategories(tokenTypes);\n\n // add required tokenType and categoryMatches properties\n assignTokenDefaultProps(tokenTypesAndParents);\n\n // fill up the categoryMatches\n assignCategoriesMapProp(tokenTypesAndParents);\n assignCategoriesTokensProp(tokenTypesAndParents);\n\n forEach(tokenTypesAndParents, (tokType) => {\n tokType.isParent = tokType.categoryMatches!.length > 0;\n });\n}\n\nexport function expandCategories(tokenTypes: TokenType[]): TokenType[] {\n let result = clone(tokenTypes);\n\n let categories = tokenTypes;\n let searching = true;\n while (searching) {\n categories = compact(\n flatten(map(categories, (currTokType) => currTokType.CATEGORIES)),\n );\n\n const newCategories = difference(categories, result);\n\n result = result.concat(newCategories);\n\n if (isEmpty(newCategories)) {\n searching = false;\n } else {\n categories = newCategories;\n }\n }\n return result;\n}\n\nexport function assignTokenDefaultProps(tokenTypes: TokenType[]): void {\n forEach(tokenTypes, (currTokType) => {\n if (!hasShortKeyProperty(currTokType)) {\n tokenIdxToClass[tokenShortNameIdx] = currTokType;\n (currTokType).tokenTypeIdx = tokenShortNameIdx++;\n }\n\n // CATEGORIES? : TokenType | TokenType[]\n if (\n hasCategoriesProperty(currTokType) &&\n !isArray(currTokType.CATEGORIES)\n // &&\n // !isUndefined(currTokType.CATEGORIES.PATTERN)\n ) {\n currTokType.CATEGORIES = [currTokType.CATEGORIES as unknown as TokenType];\n }\n\n if (!hasCategoriesProperty(currTokType)) {\n currTokType.CATEGORIES = [];\n }\n\n if (!hasExtendingTokensTypesProperty(currTokType)) {\n currTokType.categoryMatches = [];\n }\n\n if (!hasExtendingTokensTypesMapProperty(currTokType)) {\n currTokType.categoryMatchesMap = {};\n }\n });\n}\n\nexport function assignCategoriesTokensProp(tokenTypes: TokenType[]): void {\n forEach(tokenTypes, (currTokType) => {\n // avoid duplications\n currTokType.categoryMatches = [];\n forEach(currTokType.categoryMatchesMap!, (val, key) => {\n currTokType.categoryMatches!.push(\n tokenIdxToClass[key as unknown as number].tokenTypeIdx!,\n );\n });\n });\n}\n\nexport function assignCategoriesMapProp(tokenTypes: TokenType[]): void {\n forEach(tokenTypes, (currTokType) => {\n singleAssignCategoriesToksMap([], currTokType);\n });\n}\n\nexport function singleAssignCategoriesToksMap(\n path: TokenType[],\n nextNode: TokenType,\n): void {\n forEach(path, (pathNode) => {\n nextNode.categoryMatchesMap![pathNode.tokenTypeIdx!] = true;\n });\n\n forEach(nextNode.CATEGORIES, (nextCategory) => {\n const newPath = path.concat(nextNode);\n // avoids infinite loops due to cyclic categories.\n if (!includes(newPath, nextCategory)) {\n singleAssignCategoriesToksMap(newPath, nextCategory);\n }\n });\n}\n\nexport function hasShortKeyProperty(tokType: TokenType): boolean {\n return has(tokType, \"tokenTypeIdx\");\n}\n\nexport function hasCategoriesProperty(tokType: TokenType): boolean {\n return has(tokType, \"CATEGORIES\");\n}\n\nexport function hasExtendingTokensTypesProperty(tokType: TokenType): boolean {\n return has(tokType, \"categoryMatches\");\n}\n\nexport function hasExtendingTokensTypesMapProperty(\n tokType: TokenType,\n): boolean {\n return has(tokType, \"categoryMatchesMap\");\n}\n\nexport function isTokenType(tokType: TokenType): boolean {\n return has(tokType, \"tokenTypeIdx\");\n}\n", "import { ILexerErrorMessageProvider, IToken } from \"@chevrotain/types\";\n\nexport const defaultLexerErrorProvider: ILexerErrorMessageProvider = {\n buildUnableToPopLexerModeMessage(token: IToken): string {\n return `Unable to pop Lexer Mode after encountering Token ->${token.image}<- The Mode Stack is empty`;\n },\n\n buildUnexpectedCharactersMessage(\n fullText: string,\n startOffset: number,\n length: number,\n line?: number,\n column?: number,\n ): string {\n return (\n `unexpected character: ->${fullText.charAt(\n startOffset,\n )}<- at offset: ${startOffset},` + ` skipped ${length} characters.`\n );\n },\n};\n", "import {\n analyzeTokenTypes,\n charCodeToOptimizedIndex,\n cloneEmptyGroups,\n DEFAULT_MODE,\n IAnalyzeResult,\n IPatternConfig,\n LineTerminatorOptimizedTester,\n performRuntimeChecks,\n performWarningRuntimeChecks,\n SUPPORT_STICKY,\n validatePatterns,\n} from \"./lexer.js\";\nimport {\n assign,\n clone,\n forEach,\n identity,\n isArray,\n isEmpty,\n isUndefined,\n keys,\n last,\n map,\n noop,\n reduce,\n reject,\n} from \"lodash-es\";\nimport { PRINT_WARNING, timer, toFastProperties } from \"@chevrotain/utils\";\nimport { augmentTokenTypes } from \"./tokens.js\";\nimport {\n CustomPatternMatcherFunc,\n CustomPatternMatcherReturn,\n ILexerConfig,\n ILexerDefinitionError,\n ILexingError,\n IMultiModeLexerDefinition,\n IToken,\n TokenType,\n} from \"@chevrotain/types\";\nimport { defaultLexerErrorProvider } from \"./lexer_errors_public.js\";\nimport { clearRegExpParserCache } from \"./reg_exp_parser.js\";\n\nexport interface ILexingResult {\n tokens: IToken[];\n groups: { [groupName: string]: IToken[] };\n errors: ILexingError[];\n}\n\nexport enum LexerDefinitionErrorType {\n MISSING_PATTERN,\n INVALID_PATTERN,\n EOI_ANCHOR_FOUND,\n UNSUPPORTED_FLAGS_FOUND,\n DUPLICATE_PATTERNS_FOUND,\n INVALID_GROUP_TYPE_FOUND,\n PUSH_MODE_DOES_NOT_EXIST,\n MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE,\n MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY,\n MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST,\n LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED,\n SOI_ANCHOR_FOUND,\n EMPTY_MATCH_PATTERN,\n NO_LINE_BREAKS_FLAGS,\n UNREACHABLE_PATTERN,\n IDENTIFY_TERMINATOR,\n CUSTOM_LINE_BREAK,\n MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE,\n}\n\nexport interface IRegExpExec {\n exec: CustomPatternMatcherFunc;\n}\n\nconst DEFAULT_LEXER_CONFIG: Required = {\n deferDefinitionErrorsHandling: false,\n positionTracking: \"full\",\n lineTerminatorsPattern: /\\n|\\r\\n?/g,\n lineTerminatorCharacters: [\"\\n\", \"\\r\"],\n ensureOptimizations: false,\n safeMode: false,\n errorMessageProvider: defaultLexerErrorProvider,\n traceInitPerf: false,\n skipValidations: false,\n recoveryEnabled: true,\n};\n\nObject.freeze(DEFAULT_LEXER_CONFIG);\n\nexport class Lexer {\n public static SKIPPED =\n \"This marks a skipped Token pattern, this means each token identified by it will\" +\n \"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.\";\n\n public static NA = /NOT_APPLICABLE/;\n public lexerDefinitionErrors: ILexerDefinitionError[] = [];\n public lexerDefinitionWarning: ILexerDefinitionError[] = [];\n\n protected patternIdxToConfig: Record = {};\n protected charCodeToPatternIdxToConfig: {\n [modeName: string]: { [charCode: number]: IPatternConfig[] };\n } = {};\n\n protected modes: string[] = [];\n protected defaultMode!: string;\n protected emptyGroups: { [groupName: string]: IToken } = {};\n\n private config: Required;\n private trackStartLines: boolean = true;\n private trackEndLines: boolean = true;\n private hasCustom: boolean = false;\n private canModeBeOptimized: Record = {};\n\n private traceInitPerf!: boolean | number;\n private traceInitMaxIdent!: number;\n private traceInitIndent: number;\n\n constructor(\n protected lexerDefinition: TokenType[] | IMultiModeLexerDefinition,\n config: ILexerConfig = DEFAULT_LEXER_CONFIG,\n ) {\n if (typeof config === \"boolean\") {\n throw Error(\n \"The second argument to the Lexer constructor is now an ILexerConfig Object.\\n\" +\n \"a boolean 2nd argument is no longer supported\",\n );\n }\n\n // todo: defaults func?\n this.config = assign({}, DEFAULT_LEXER_CONFIG, config) as any;\n\n const traceInitVal = this.config.traceInitPerf;\n if (traceInitVal === true) {\n this.traceInitMaxIdent = Infinity;\n this.traceInitPerf = true;\n } else if (typeof traceInitVal === \"number\") {\n this.traceInitMaxIdent = traceInitVal;\n this.traceInitPerf = true;\n }\n this.traceInitIndent = -1;\n\n this.TRACE_INIT(\"Lexer Constructor\", () => {\n let actualDefinition!: IMultiModeLexerDefinition;\n let hasOnlySingleMode = true;\n this.TRACE_INIT(\"Lexer Config handling\", () => {\n if (\n this.config.lineTerminatorsPattern ===\n DEFAULT_LEXER_CONFIG.lineTerminatorsPattern\n ) {\n // optimized built-in implementation for the defaults definition of lineTerminators\n this.config.lineTerminatorsPattern = LineTerminatorOptimizedTester;\n } else {\n if (\n this.config.lineTerminatorCharacters ===\n DEFAULT_LEXER_CONFIG.lineTerminatorCharacters\n ) {\n throw Error(\n \"Error: Missing property on the Lexer config.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS\",\n );\n }\n }\n\n if (config.safeMode && config.ensureOptimizations) {\n throw Error(\n '\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.',\n );\n }\n\n this.trackStartLines = /full|onlyStart/i.test(\n this.config.positionTracking,\n );\n this.trackEndLines = /full/i.test(this.config.positionTracking);\n\n // Convert SingleModeLexerDefinition into a IMultiModeLexerDefinition.\n if (isArray(lexerDefinition)) {\n actualDefinition = {\n modes: { defaultMode: clone(lexerDefinition) },\n defaultMode: DEFAULT_MODE,\n };\n } else {\n // no conversion needed, input should already be a IMultiModeLexerDefinition\n hasOnlySingleMode = false;\n actualDefinition = clone(lexerDefinition);\n }\n });\n\n if (this.config.skipValidations === false) {\n this.TRACE_INIT(\"performRuntimeChecks\", () => {\n this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(\n performRuntimeChecks(\n actualDefinition,\n this.trackStartLines,\n this.config.lineTerminatorCharacters,\n ),\n );\n });\n\n this.TRACE_INIT(\"performWarningRuntimeChecks\", () => {\n this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(\n performWarningRuntimeChecks(\n actualDefinition,\n this.trackStartLines,\n this.config.lineTerminatorCharacters,\n ),\n );\n });\n }\n\n // for extra robustness to avoid throwing an none informative error message\n actualDefinition.modes = actualDefinition.modes\n ? actualDefinition.modes\n : {};\n\n // an error of undefined TokenTypes will be detected in \"performRuntimeChecks\" above.\n // this transformation is to increase robustness in the case of partially invalid lexer definition.\n forEach(actualDefinition.modes, (currModeValue, currModeName) => {\n actualDefinition.modes[currModeName] = reject(\n currModeValue,\n (currTokType) => isUndefined(currTokType),\n );\n });\n\n const allModeNames = keys(actualDefinition.modes);\n\n forEach(\n actualDefinition.modes,\n (currModDef: TokenType[], currModName) => {\n this.TRACE_INIT(`Mode: <${currModName}> processing`, () => {\n this.modes.push(currModName);\n\n if (this.config.skipValidations === false) {\n this.TRACE_INIT(`validatePatterns`, () => {\n this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(\n validatePatterns(currModDef, allModeNames),\n );\n });\n }\n\n // If definition errors were encountered, the analysis phase may fail unexpectedly/\n // Considering a lexer with definition errors may never be used, there is no point\n // to performing the analysis anyhow...\n if (isEmpty(this.lexerDefinitionErrors)) {\n augmentTokenTypes(currModDef);\n\n let currAnalyzeResult!: IAnalyzeResult;\n this.TRACE_INIT(`analyzeTokenTypes`, () => {\n currAnalyzeResult = analyzeTokenTypes(currModDef, {\n lineTerminatorCharacters:\n this.config.lineTerminatorCharacters,\n positionTracking: config.positionTracking,\n ensureOptimizations: config.ensureOptimizations,\n safeMode: config.safeMode,\n tracer: this.TRACE_INIT,\n });\n });\n\n this.patternIdxToConfig[currModName] =\n currAnalyzeResult.patternIdxToConfig;\n\n this.charCodeToPatternIdxToConfig[currModName] =\n currAnalyzeResult.charCodeToPatternIdxToConfig;\n\n this.emptyGroups = assign(\n {},\n this.emptyGroups,\n currAnalyzeResult.emptyGroups,\n ) as any;\n\n this.hasCustom = currAnalyzeResult.hasCustom || this.hasCustom;\n\n this.canModeBeOptimized[currModName] =\n currAnalyzeResult.canBeOptimized;\n }\n });\n },\n );\n\n this.defaultMode = actualDefinition.defaultMode;\n\n if (\n !isEmpty(this.lexerDefinitionErrors) &&\n !this.config.deferDefinitionErrorsHandling\n ) {\n const allErrMessages = map(this.lexerDefinitionErrors, (error) => {\n return error.message;\n });\n const allErrMessagesString = allErrMessages.join(\n \"-----------------------\\n\",\n );\n throw new Error(\n \"Errors detected in definition of Lexer:\\n\" + allErrMessagesString,\n );\n }\n\n // Only print warning if there are no errors, This will avoid pl\n forEach(this.lexerDefinitionWarning, (warningDescriptor) => {\n PRINT_WARNING(warningDescriptor.message);\n });\n\n this.TRACE_INIT(\"Choosing sub-methods implementations\", () => {\n // Choose the relevant internal implementations for this specific parser.\n // These implementations should be in-lined by the JavaScript engine\n // to provide optimal performance in each scenario.\n if (SUPPORT_STICKY) {\n this.chopInput = identity;\n this.match = this.matchWithTest;\n } else {\n this.updateLastIndex = noop;\n this.match = this.matchWithExec;\n }\n\n if (hasOnlySingleMode) {\n this.handleModes = noop;\n }\n\n if (this.trackStartLines === false) {\n this.computeNewColumn = identity;\n }\n\n if (this.trackEndLines === false) {\n this.updateTokenEndLineColumnLocation = noop;\n }\n\n if (/full/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createFullToken;\n } else if (/onlyStart/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createStartOnlyToken;\n } else if (/onlyOffset/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createOffsetOnlyToken;\n } else {\n throw Error(\n `Invalid config option: \"${this.config.positionTracking}\"`,\n );\n }\n\n if (this.hasCustom) {\n this.addToken = this.addTokenUsingPush;\n this.handlePayload = this.handlePayloadWithCustom;\n } else {\n this.addToken = this.addTokenUsingMemberAccess;\n this.handlePayload = this.handlePayloadNoCustom;\n }\n });\n\n this.TRACE_INIT(\"Failed Optimization Warnings\", () => {\n const unOptimizedModes = reduce(\n this.canModeBeOptimized,\n (cannotBeOptimized, canBeOptimized, modeName) => {\n if (canBeOptimized === false) {\n cannotBeOptimized.push(modeName);\n }\n return cannotBeOptimized;\n },\n [] as string[],\n );\n\n if (config.ensureOptimizations && !isEmpty(unOptimizedModes)) {\n throw Error(\n `Lexer Modes: < ${unOptimizedModes.join(\n \", \",\n )} > cannot be optimized.\\n` +\n '\\t Disable the \"ensureOptimizations\" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\\n' +\n \"\\t Or inspect the console log for details on how to resolve these issues.\",\n );\n }\n });\n\n this.TRACE_INIT(\"clearRegExpParserCache\", () => {\n clearRegExpParserCache();\n });\n\n this.TRACE_INIT(\"toFastProperties\", () => {\n toFastProperties(this);\n });\n });\n }\n\n public tokenize(\n text: string,\n initialMode: string = this.defaultMode,\n ): ILexingResult {\n if (!isEmpty(this.lexerDefinitionErrors)) {\n const allErrMessages = map(this.lexerDefinitionErrors, (error) => {\n return error.message;\n });\n const allErrMessagesString = allErrMessages.join(\n \"-----------------------\\n\",\n );\n throw new Error(\n \"Unable to Tokenize because Errors detected in definition of Lexer:\\n\" +\n allErrMessagesString,\n );\n }\n\n return this.tokenizeInternal(text, initialMode);\n }\n\n // There is quite a bit of duplication between this and \"tokenizeInternalLazy\"\n // This is intentional due to performance considerations.\n // this method also used quite a bit of `!` none null assertions because it is too optimized\n // for `tsc` to always understand it is \"safe\"\n private tokenizeInternal(text: string, initialMode: string): ILexingResult {\n let i,\n j,\n k,\n matchAltImage,\n longerAlt,\n matchedImage: string | null,\n payload,\n altPayload,\n imageLength,\n group,\n tokType,\n newToken: IToken,\n errLength,\n droppedChar,\n msg,\n match;\n const orgText = text;\n const orgLength = orgText.length;\n let offset = 0;\n let matchedTokensIndex = 0;\n // initializing the tokensArray to the \"guessed\" size.\n // guessing too little will still reduce the number of array re-sizes on pushes.\n // guessing too large (Tested by guessing x4 too large) may cost a bit more of memory\n // but would still have a faster runtime by avoiding (All but one) array resizing.\n const guessedNumberOfTokens = this.hasCustom\n ? 0 // will break custom token pattern APIs the matchedTokens array will contain undefined elements.\n : Math.floor(text.length / 10);\n const matchedTokens = new Array(guessedNumberOfTokens);\n const errors: ILexingError[] = [];\n let line = this.trackStartLines ? 1 : undefined;\n let column = this.trackStartLines ? 1 : undefined;\n const groups: any = cloneEmptyGroups(this.emptyGroups);\n const trackLines = this.trackStartLines;\n const lineTerminatorPattern = this.config.lineTerminatorsPattern;\n\n let currModePatternsLength = 0;\n let patternIdxToConfig: IPatternConfig[] = [];\n let currCharCodeToPatternIdxToConfig: {\n [charCode: number]: IPatternConfig[];\n } = [];\n\n const modeStack: string[] = [];\n\n const emptyArray: IPatternConfig[] = [];\n Object.freeze(emptyArray);\n let getPossiblePatterns!: (charCode: number) => IPatternConfig[];\n\n function getPossiblePatternsSlow() {\n return patternIdxToConfig;\n }\n\n function getPossiblePatternsOptimized(charCode: number): IPatternConfig[] {\n const optimizedCharIdx = charCodeToOptimizedIndex(charCode);\n const possiblePatterns =\n currCharCodeToPatternIdxToConfig[optimizedCharIdx];\n if (possiblePatterns === undefined) {\n return emptyArray;\n } else {\n return possiblePatterns;\n }\n }\n\n const pop_mode = (popToken: IToken) => {\n // TODO: perhaps avoid this error in the edge case there is no more input?\n if (\n modeStack.length === 1 &&\n // if we have both a POP_MODE and a PUSH_MODE this is in-fact a \"transition\"\n // So no error should occur.\n popToken.tokenType.PUSH_MODE === undefined\n ) {\n // if we try to pop the last mode there lexer will no longer have ANY mode.\n // thus the pop is ignored, an error will be created and the lexer will continue parsing in the previous mode.\n const msg =\n this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(\n popToken,\n );\n\n errors.push({\n offset: popToken.startOffset,\n line: popToken.startLine,\n column: popToken.startColumn,\n length: popToken.image.length,\n message: msg,\n });\n } else {\n modeStack.pop();\n const newMode = last(modeStack)!;\n patternIdxToConfig = this.patternIdxToConfig[newMode];\n currCharCodeToPatternIdxToConfig =\n this.charCodeToPatternIdxToConfig[newMode];\n currModePatternsLength = patternIdxToConfig.length;\n const modeCanBeOptimized =\n this.canModeBeOptimized[newMode] && this.config.safeMode === false;\n\n if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) {\n getPossiblePatterns = getPossiblePatternsOptimized;\n } else {\n getPossiblePatterns = getPossiblePatternsSlow;\n }\n }\n };\n\n function push_mode(this: Lexer, newMode: string) {\n modeStack.push(newMode);\n currCharCodeToPatternIdxToConfig =\n this.charCodeToPatternIdxToConfig[newMode];\n\n patternIdxToConfig = this.patternIdxToConfig[newMode];\n currModePatternsLength = patternIdxToConfig.length;\n\n currModePatternsLength = patternIdxToConfig.length;\n const modeCanBeOptimized =\n this.canModeBeOptimized[newMode] && this.config.safeMode === false;\n\n if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) {\n getPossiblePatterns = getPossiblePatternsOptimized;\n } else {\n getPossiblePatterns = getPossiblePatternsSlow;\n }\n }\n\n // this pattern seems to avoid a V8 de-optimization, although that de-optimization does not\n // seem to matter performance wise.\n push_mode.call(this, initialMode);\n\n let currConfig!: IPatternConfig;\n\n const recoveryEnabled = this.config.recoveryEnabled;\n\n while (offset < orgLength) {\n matchedImage = null;\n\n const nextCharCode = orgText.charCodeAt(offset);\n const chosenPatternIdxToConfig = getPossiblePatterns(nextCharCode);\n const chosenPatternsLength = chosenPatternIdxToConfig.length;\n\n for (i = 0; i < chosenPatternsLength; i++) {\n currConfig = chosenPatternIdxToConfig[i];\n const currPattern = currConfig.pattern;\n payload = null;\n\n // manually in-lined because > 600 chars won't be in-lined in V8\n const singleCharCode = currConfig.short;\n if (singleCharCode !== false) {\n if (nextCharCode === singleCharCode) {\n // single character string\n matchedImage = currPattern as string;\n }\n } else if (currConfig.isCustom === true) {\n match = (currPattern as IRegExpExec).exec(\n orgText,\n offset,\n matchedTokens,\n groups,\n );\n if (match !== null) {\n matchedImage = match[0];\n if ((match as CustomPatternMatcherReturn).payload !== undefined) {\n payload = (match as CustomPatternMatcherReturn).payload;\n }\n } else {\n matchedImage = null;\n }\n } else {\n this.updateLastIndex(currPattern as RegExp, offset);\n matchedImage = this.match(currPattern as RegExp, text, offset);\n }\n\n if (matchedImage !== null) {\n // even though this pattern matched we must try a another longer alternative.\n // this can be used to prioritize keywords over identifiers\n longerAlt = currConfig.longerAlt;\n if (longerAlt !== undefined) {\n // TODO: micro optimize, avoid extra prop access\n // by saving/linking longerAlt on the original config?\n const longerAltLength = longerAlt.length;\n for (k = 0; k < longerAltLength; k++) {\n const longerAltConfig = patternIdxToConfig[longerAlt[k]];\n const longerAltPattern = longerAltConfig.pattern;\n altPayload = null;\n\n // single Char can never be a longer alt so no need to test it.\n // manually in-lined because > 600 chars won't be in-lined in V8\n if (longerAltConfig.isCustom === true) {\n match = (longerAltPattern as IRegExpExec).exec(\n orgText,\n offset,\n matchedTokens,\n groups,\n );\n if (match !== null) {\n matchAltImage = match[0];\n if (\n (match as CustomPatternMatcherReturn).payload !== undefined\n ) {\n altPayload = (match as CustomPatternMatcherReturn).payload;\n }\n } else {\n matchAltImage = null;\n }\n } else {\n this.updateLastIndex(longerAltPattern as RegExp, offset);\n matchAltImage = this.match(\n longerAltPattern as RegExp,\n text,\n offset,\n );\n }\n\n if (matchAltImage && matchAltImage.length > matchedImage.length) {\n matchedImage = matchAltImage;\n payload = altPayload;\n currConfig = longerAltConfig;\n // Exit the loop early after matching one of the longer alternatives\n // The first matched alternative takes precedence\n break;\n }\n }\n }\n break;\n }\n }\n\n // successful match\n if (matchedImage !== null) {\n imageLength = matchedImage.length;\n group = currConfig.group;\n if (group !== undefined) {\n tokType = currConfig.tokenTypeIdx;\n // TODO: \"offset + imageLength\" and the new column may be computed twice in case of \"full\" location information inside\n // createFullToken method\n newToken = this.createTokenInstance(\n matchedImage,\n offset,\n tokType,\n currConfig.tokenType,\n line,\n column,\n imageLength,\n );\n\n this.handlePayload(newToken, payload);\n\n // TODO: optimize NOOP in case there are no special groups?\n if (group === false) {\n matchedTokensIndex = this.addToken(\n matchedTokens,\n matchedTokensIndex,\n newToken,\n );\n } else {\n groups[group].push(newToken);\n }\n }\n text = this.chopInput(text, imageLength);\n offset = offset + imageLength;\n\n // TODO: with newlines the column may be assigned twice\n column = this.computeNewColumn(column!, imageLength);\n\n if (trackLines === true && currConfig.canLineTerminator === true) {\n let numOfLTsInMatch = 0;\n let foundTerminator;\n let lastLTEndOffset: number;\n lineTerminatorPattern.lastIndex = 0;\n do {\n foundTerminator = lineTerminatorPattern.test(matchedImage);\n if (foundTerminator === true) {\n lastLTEndOffset = lineTerminatorPattern.lastIndex - 1;\n numOfLTsInMatch++;\n }\n } while (foundTerminator === true);\n\n if (numOfLTsInMatch !== 0) {\n line = line! + numOfLTsInMatch;\n column = imageLength - lastLTEndOffset!;\n this.updateTokenEndLineColumnLocation(\n newToken!,\n group!,\n lastLTEndOffset!,\n numOfLTsInMatch,\n line,\n column,\n imageLength,\n );\n }\n }\n // will be NOOP if no modes present\n this.handleModes(currConfig, pop_mode, push_mode, newToken!);\n } else {\n // error recovery, drop characters until we identify a valid token's start point\n const errorStartOffset = offset;\n const errorLine = line;\n const errorColumn = column;\n let foundResyncPoint = recoveryEnabled === false;\n\n while (foundResyncPoint === false && offset < orgLength) {\n // Identity Func (when sticky flag is enabled)\n text = this.chopInput(text, 1);\n offset++;\n for (j = 0; j < currModePatternsLength; j++) {\n const currConfig = patternIdxToConfig[j];\n const currPattern = currConfig.pattern;\n\n // manually in-lined because > 600 chars won't be in-lined in V8\n const singleCharCode = currConfig.short;\n if (singleCharCode !== false) {\n if (orgText.charCodeAt(offset) === singleCharCode) {\n // single character string\n foundResyncPoint = true;\n }\n } else if (currConfig.isCustom === true) {\n foundResyncPoint =\n (currPattern as IRegExpExec).exec(\n orgText,\n offset,\n matchedTokens,\n groups,\n ) !== null;\n } else {\n this.updateLastIndex(currPattern as RegExp, offset);\n foundResyncPoint = (currPattern as RegExp).exec(text) !== null;\n }\n\n if (foundResyncPoint === true) {\n break;\n }\n }\n }\n\n errLength = offset - errorStartOffset;\n column = this.computeNewColumn(column!, errLength);\n // at this point we either re-synced or reached the end of the input text\n msg = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(\n orgText,\n errorStartOffset,\n errLength,\n errorLine,\n errorColumn,\n );\n errors.push({\n offset: errorStartOffset,\n line: errorLine,\n column: errorColumn,\n length: errLength,\n message: msg,\n });\n\n if (recoveryEnabled === false) {\n break;\n }\n }\n }\n\n // if we do have custom patterns which push directly into the\n // TODO: custom tokens should not push directly??\n if (!this.hasCustom) {\n // if we guessed a too large size for the tokens array this will shrink it to the right size.\n matchedTokens.length = matchedTokensIndex;\n }\n\n return {\n tokens: matchedTokens,\n groups: groups,\n errors: errors,\n };\n }\n\n private handleModes(\n config: IPatternConfig,\n pop_mode: (tok: IToken) => void,\n push_mode: (this: Lexer, pushMode: string) => void,\n newToken: IToken,\n ) {\n if (config.pop === true) {\n // need to save the PUSH_MODE property as if the mode is popped\n // patternIdxToPopMode is updated to reflect the new mode after popping the stack\n const pushMode = config.push;\n pop_mode(newToken);\n if (pushMode !== undefined) {\n push_mode.call(this, pushMode);\n }\n } else if (config.push !== undefined) {\n push_mode.call(this, config.push);\n }\n }\n\n private chopInput(text: string, length: number): string {\n return text.substring(length);\n }\n\n private updateLastIndex(regExp: RegExp, newLastIndex: number): void {\n regExp.lastIndex = newLastIndex;\n }\n\n // TODO: decrease this under 600 characters? inspect stripping comments option in TSC compiler\n private updateTokenEndLineColumnLocation(\n newToken: IToken,\n group: string | false,\n lastLTIdx: number,\n numOfLTsInMatch: number,\n line: number,\n column: number,\n imageLength: number,\n ): void {\n let lastCharIsLT, fixForEndingInLT;\n if (group !== undefined) {\n // a none skipped multi line Token, need to update endLine/endColumn\n lastCharIsLT = lastLTIdx === imageLength - 1;\n fixForEndingInLT = lastCharIsLT ? -1 : 0;\n if (!(numOfLTsInMatch === 1 && lastCharIsLT === true)) {\n // if a token ends in a LT that last LT only affects the line numbering of following Tokens\n newToken.endLine = line + fixForEndingInLT;\n // the last LT in a token does not affect the endColumn either as the [columnStart ... columnEnd)\n // inclusive to exclusive range.\n newToken.endColumn = column - 1 + -fixForEndingInLT;\n }\n // else single LT in the last character of a token, no need to modify the endLine/EndColumn\n }\n }\n\n private computeNewColumn(oldColumn: number, imageLength: number) {\n return oldColumn + imageLength;\n }\n\n // Place holder, will be replaced by the correct variant according to the locationTracking option at runtime.\n /* istanbul ignore next - place holder */\n private createTokenInstance!: (...args: any[]) => IToken;\n\n private createOffsetOnlyToken(\n image: string,\n startOffset: number,\n tokenTypeIdx: number,\n tokenType: TokenType,\n ) {\n return {\n image,\n startOffset,\n tokenTypeIdx,\n tokenType,\n };\n }\n\n private createStartOnlyToken(\n image: string,\n startOffset: number,\n tokenTypeIdx: number,\n tokenType: TokenType,\n startLine: number,\n startColumn: number,\n ) {\n return {\n image,\n startOffset,\n startLine,\n startColumn,\n tokenTypeIdx,\n tokenType,\n };\n }\n\n private createFullToken(\n image: string,\n startOffset: number,\n tokenTypeIdx: number,\n tokenType: TokenType,\n startLine: number,\n startColumn: number,\n imageLength: number,\n ): IToken {\n return {\n image,\n startOffset,\n endOffset: startOffset + imageLength - 1,\n startLine,\n endLine: startLine,\n startColumn,\n endColumn: startColumn + imageLength - 1,\n tokenTypeIdx,\n tokenType,\n };\n }\n\n // Place holder, will be replaced by the correct variant according to the locationTracking option at runtime.\n /* istanbul ignore next - place holder */\n private addToken!: (\n tokenVector: IToken[],\n index: number,\n tokenToAdd: IToken,\n ) => number;\n\n private addTokenUsingPush(\n tokenVector: IToken[],\n index: number,\n tokenToAdd: IToken,\n ): number {\n tokenVector.push(tokenToAdd);\n return index;\n }\n\n private addTokenUsingMemberAccess(\n tokenVector: IToken[],\n index: number,\n tokenToAdd: IToken,\n ): number {\n tokenVector[index] = tokenToAdd;\n index++;\n return index;\n }\n\n // Place holder, will be replaced by the correct variant according to the hasCustom flag option at runtime.\n private handlePayload: (token: IToken, payload: any) => void;\n\n private handlePayloadNoCustom(token: IToken, payload: any): void {}\n\n private handlePayloadWithCustom(token: IToken, payload: any): void {\n if (payload !== null) {\n token.payload = payload;\n }\n }\n\n // place holder to be replaced with chosen alternative at runtime\n private match!: (\n pattern: RegExp,\n text: string,\n offset: number,\n ) => string | null;\n\n private matchWithTest(\n pattern: RegExp,\n text: string,\n offset: number,\n ): string | null {\n const found = pattern.test(text);\n if (found === true) {\n return text.substring(offset, pattern.lastIndex);\n }\n return null;\n }\n\n private matchWithExec(pattern: RegExp, text: string): string | null {\n const regExpArray = pattern.exec(text);\n return regExpArray !== null ? regExpArray[0] : null;\n }\n\n // Duplicated from the parser's perf trace trait to allow future extraction\n // of the lexer to a separate package.\n TRACE_INIT = (phaseDesc: string, phaseImpl: () => T): T => {\n // No need to optimize this using NOOP pattern because\n // It is not called in a hot spot...\n if (this.traceInitPerf === true) {\n this.traceInitIndent++;\n const indent = new Array(this.traceInitIndent + 1).join(\"\\t\");\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n console.log(`${indent}--> <${phaseDesc}>`);\n }\n const { time, value } = timer(phaseImpl);\n /* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */\n const traceMethod = time > 10 ? console.warn : console.log;\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n traceMethod(`${indent}<-- <${phaseDesc}> time: ${time}ms`);\n }\n this.traceInitIndent--;\n return value;\n } else {\n return phaseImpl();\n }\n };\n}\n", "import { has, isString, isUndefined } from \"lodash-es\";\nimport { Lexer } from \"./lexer_public.js\";\nimport { augmentTokenTypes, tokenStructuredMatcher } from \"./tokens.js\";\nimport { IToken, ITokenConfig, TokenType } from \"@chevrotain/types\";\n\nexport function tokenLabel(tokType: TokenType): string {\n if (hasTokenLabel(tokType)) {\n return tokType.LABEL;\n } else {\n return tokType.name;\n }\n}\n\nexport function tokenName(tokType: TokenType): string {\n return tokType.name;\n}\n\nexport function hasTokenLabel(\n obj: TokenType,\n): obj is TokenType & Pick, \"LABEL\"> {\n return isString(obj.LABEL) && obj.LABEL !== \"\";\n}\n\nconst PARENT = \"parent\";\nconst CATEGORIES = \"categories\";\nconst LABEL = \"label\";\nconst GROUP = \"group\";\nconst PUSH_MODE = \"push_mode\";\nconst POP_MODE = \"pop_mode\";\nconst LONGER_ALT = \"longer_alt\";\nconst LINE_BREAKS = \"line_breaks\";\nconst START_CHARS_HINT = \"start_chars_hint\";\n\nexport function createToken(config: ITokenConfig): TokenType {\n return createTokenInternal(config);\n}\n\nfunction createTokenInternal(config: ITokenConfig): TokenType {\n const pattern = config.pattern;\n\n const tokenType: TokenType = {};\n tokenType.name = config.name;\n\n if (!isUndefined(pattern)) {\n tokenType.PATTERN = pattern;\n }\n\n if (has(config, PARENT)) {\n throw (\n \"The parent property is no longer supported.\\n\" +\n \"See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.\"\n );\n }\n\n if (has(config, CATEGORIES)) {\n // casting to ANY as this will be fixed inside `augmentTokenTypes``\n tokenType.CATEGORIES = config[CATEGORIES];\n }\n\n augmentTokenTypes([tokenType]);\n\n if (has(config, LABEL)) {\n tokenType.LABEL = config[LABEL];\n }\n\n if (has(config, GROUP)) {\n tokenType.GROUP = config[GROUP];\n }\n\n if (has(config, POP_MODE)) {\n tokenType.POP_MODE = config[POP_MODE];\n }\n\n if (has(config, PUSH_MODE)) {\n tokenType.PUSH_MODE = config[PUSH_MODE];\n }\n\n if (has(config, LONGER_ALT)) {\n tokenType.LONGER_ALT = config[LONGER_ALT];\n }\n\n if (has(config, LINE_BREAKS)) {\n tokenType.LINE_BREAKS = config[LINE_BREAKS];\n }\n\n if (has(config, START_CHARS_HINT)) {\n tokenType.START_CHARS_HINT = config[START_CHARS_HINT];\n }\n\n return tokenType;\n}\n\nexport const EOF = createToken({ name: \"EOF\", pattern: Lexer.NA });\naugmentTokenTypes([EOF]);\n\nexport function createTokenInstance(\n tokType: TokenType,\n image: string,\n startOffset: number,\n endOffset: number,\n startLine: number,\n endLine: number,\n startColumn: number,\n endColumn: number,\n): IToken {\n return {\n image,\n startOffset,\n endOffset,\n startLine,\n endLine,\n startColumn,\n endColumn,\n tokenTypeIdx: (tokType).tokenTypeIdx,\n tokenType: tokType,\n };\n}\n\nexport function tokenMatcher(token: IToken, tokType: TokenType): boolean {\n return tokenStructuredMatcher(token, tokType);\n}\n", "import { hasTokenLabel, tokenLabel } from \"../scan/tokens_public.js\";\nimport { first, map, reduce } from \"lodash-es\";\nimport {\n Alternation,\n getProductionDslName,\n NonTerminal,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\nimport {\n IParserErrorMessageProvider,\n IProductionWithOccurrence,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n IGrammarResolverErrorMessageProvider,\n IGrammarValidatorErrorMessageProvider,\n} from \"./grammar/types.js\";\n\nexport const defaultParserErrorProvider: IParserErrorMessageProvider = {\n buildMismatchTokenMessage({ expected, actual, previous, ruleName }): string {\n const hasLabel = hasTokenLabel(expected);\n const expectedMsg = hasLabel\n ? `--> ${tokenLabel(expected)} <--`\n : `token of type --> ${expected.name} <--`;\n\n const msg = `Expecting ${expectedMsg} but found --> '${actual.image}' <--`;\n\n return msg;\n },\n\n buildNotAllInputParsedMessage({ firstRedundant, ruleName }): string {\n return \"Redundant input, expecting EOF but found: \" + firstRedundant.image;\n },\n\n buildNoViableAltMessage({\n expectedPathsPerAlt,\n actual,\n previous,\n customUserDescription,\n ruleName,\n }): string {\n const errPrefix = \"Expecting: \";\n // TODO: issue: No Viable Alternative Error may have incomplete details. #502\n const actualText = first(actual)!.image;\n const errSuffix = \"\\nbut found: '\" + actualText + \"'\";\n\n if (customUserDescription) {\n return errPrefix + customUserDescription + errSuffix;\n } else {\n const allLookAheadPaths = reduce(\n expectedPathsPerAlt,\n (result, currAltPaths) => result.concat(currAltPaths),\n [] as TokenType[][],\n );\n const nextValidTokenSequences = map(\n allLookAheadPaths,\n (currPath) =>\n `[${map(currPath, (currTokenType) => tokenLabel(currTokenType)).join(\n \", \",\n )}]`,\n );\n const nextValidSequenceItems = map(\n nextValidTokenSequences,\n (itemMsg, idx) => ` ${idx + 1}. ${itemMsg}`,\n );\n const calculatedDescription = `one of these possible Token sequences:\\n${nextValidSequenceItems.join(\n \"\\n\",\n )}`;\n\n return errPrefix + calculatedDescription + errSuffix;\n }\n },\n\n buildEarlyExitMessage({\n expectedIterationPaths,\n actual,\n customUserDescription,\n ruleName,\n }): string {\n const errPrefix = \"Expecting: \";\n // TODO: issue: No Viable Alternative Error may have incomplete details. #502\n const actualText = first(actual)!.image;\n const errSuffix = \"\\nbut found: '\" + actualText + \"'\";\n\n if (customUserDescription) {\n return errPrefix + customUserDescription + errSuffix;\n } else {\n const nextValidTokenSequences = map(\n expectedIterationPaths,\n (currPath) =>\n `[${map(currPath, (currTokenType) => tokenLabel(currTokenType)).join(\n \",\",\n )}]`,\n );\n const calculatedDescription =\n `expecting at least one iteration which starts with one of these possible Token sequences::\\n ` +\n `<${nextValidTokenSequences.join(\" ,\")}>`;\n\n return errPrefix + calculatedDescription + errSuffix;\n }\n },\n};\n\nObject.freeze(defaultParserErrorProvider);\n\nexport const defaultGrammarResolverErrorProvider: IGrammarResolverErrorMessageProvider =\n {\n buildRuleNotFoundError(\n topLevelRule: Rule,\n undefinedRule: NonTerminal,\n ): string {\n const msg =\n \"Invalid grammar, reference to a rule which is not defined: ->\" +\n undefinedRule.nonTerminalName +\n \"<-\\n\" +\n \"inside top level rule: ->\" +\n topLevelRule.name +\n \"<-\";\n return msg;\n },\n };\n\nexport const defaultGrammarValidatorErrorProvider: IGrammarValidatorErrorMessageProvider =\n {\n buildDuplicateFoundError(\n topLevelRule: Rule,\n duplicateProds: IProductionWithOccurrence[],\n ): string {\n function getExtraProductionArgument(\n prod: IProductionWithOccurrence,\n ): string {\n if (prod instanceof Terminal) {\n return prod.terminalType.name;\n } else if (prod instanceof NonTerminal) {\n return prod.nonTerminalName;\n } else {\n return \"\";\n }\n }\n\n const topLevelName = topLevelRule.name;\n const duplicateProd = first(duplicateProds)!;\n const index = duplicateProd.idx;\n const dslName = getProductionDslName(duplicateProd);\n const extraArgument = getExtraProductionArgument(duplicateProd);\n\n const hasExplicitIndex = index > 0;\n let msg = `->${dslName}${hasExplicitIndex ? index : \"\"}<- ${\n extraArgument ? `with argument: ->${extraArgument}<-` : \"\"\n }\n appears more than once (${\n duplicateProds.length\n } times) in the top level rule: ->${topLevelName}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;\n\n // white space trimming time! better to trim afterwards as it allows to use WELL formatted multi line template strings...\n msg = msg.replace(/[ \\t]+/g, \" \");\n msg = msg.replace(/\\s\\s+/g, \"\\n\");\n\n return msg;\n },\n\n buildNamespaceConflictError(rule: Rule): string {\n const errMsg =\n `Namespace conflict found in grammar.\\n` +\n `The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${rule.name}>.\\n` +\n `To resolve this make sure each Terminal and Non-Terminal names are unique\\n` +\n `This is easy to accomplish by using the convention that Terminal names start with an uppercase letter\\n` +\n `and Non-Terminal names start with a lower case letter.`;\n\n return errMsg;\n },\n\n buildAlternationPrefixAmbiguityError(options: {\n topLevelRule: Rule;\n prefixPath: TokenType[];\n ambiguityIndices: number[];\n alternation: Alternation;\n }): string {\n const pathMsg = map(options.prefixPath, (currTok) =>\n tokenLabel(currTok),\n ).join(\", \");\n const occurrence =\n options.alternation.idx === 0 ? \"\" : options.alternation.idx;\n const errMsg =\n `Ambiguous alternatives: <${options.ambiguityIndices.join(\n \" ,\",\n )}> due to common lookahead prefix\\n` +\n `in inside <${options.topLevelRule.name}> Rule,\\n` +\n `<${pathMsg}> may appears as a prefix path in all these alternatives.\\n` +\n `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\\n` +\n `For Further details.`;\n\n return errMsg;\n },\n\n buildAlternationAmbiguityError(options: {\n topLevelRule: Rule;\n prefixPath: TokenType[];\n ambiguityIndices: number[];\n alternation: Alternation;\n }): string {\n const pathMsg = map(options.prefixPath, (currtok) =>\n tokenLabel(currtok),\n ).join(\", \");\n const occurrence =\n options.alternation.idx === 0 ? \"\" : options.alternation.idx;\n let currMessage =\n `Ambiguous Alternatives Detected: <${options.ambiguityIndices.join(\n \" ,\",\n )}> in ` +\n ` inside <${options.topLevelRule.name}> Rule,\\n` +\n `<${pathMsg}> may appears as a prefix path in all these alternatives.\\n`;\n\n currMessage =\n currMessage +\n `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\\n` +\n `For Further details.`;\n return currMessage;\n },\n\n buildEmptyRepetitionError(options: {\n topLevelRule: Rule;\n repetition: IProductionWithOccurrence;\n }): string {\n let dslName = getProductionDslName(options.repetition);\n if (options.repetition.idx !== 0) {\n dslName += options.repetition.idx;\n }\n\n const errMsg =\n `The repetition <${dslName}> within Rule <${options.topLevelRule.name}> can never consume any tokens.\\n` +\n `This could lead to an infinite loop.`;\n\n return errMsg;\n },\n\n // TODO: remove - `errors_public` from nyc.config.js exclude\n // once this method is fully removed from this file\n buildTokenNameError(options: {\n tokenType: TokenType;\n expectedPattern: RegExp;\n }): string {\n /* istanbul ignore next */\n return \"deprecated\";\n },\n\n buildEmptyAlternationError(options: {\n topLevelRule: Rule;\n alternation: Alternation;\n emptyChoiceIdx: number;\n }): string {\n const errMsg =\n `Ambiguous empty alternative: <${options.emptyChoiceIdx + 1}>` +\n ` in inside <${options.topLevelRule.name}> Rule.\\n` +\n `Only the last alternative may be an empty alternative.`;\n\n return errMsg;\n },\n\n buildTooManyAlternativesError(options: {\n topLevelRule: Rule;\n alternation: Alternation;\n }): string {\n const errMsg =\n `An Alternation cannot have more than 256 alternatives:\\n` +\n ` inside <${\n options.topLevelRule.name\n }> Rule.\\n has ${\n options.alternation.definition.length + 1\n } alternatives.`;\n\n return errMsg;\n },\n\n buildLeftRecursionError(options: {\n topLevelRule: Rule;\n leftRecursionPath: Rule[];\n }): string {\n const ruleName = options.topLevelRule.name;\n const pathNames = map(\n options.leftRecursionPath,\n (currRule) => currRule.name,\n );\n const leftRecursivePath = `${ruleName} --> ${pathNames\n .concat([ruleName])\n .join(\" --> \")}`;\n const errMsg =\n `Left Recursion found in grammar.\\n` +\n `rule: <${ruleName}> can be invoked from itself (directly or indirectly)\\n` +\n `without consuming any Tokens. The grammar path that causes this is: \\n ${leftRecursivePath}\\n` +\n ` To fix this refactor your grammar to remove the left recursion.\\n` +\n `see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;\n\n return errMsg;\n },\n\n // TODO: remove - `errors_public` from nyc.config.js exclude\n // once this method is fully removed from this file\n buildInvalidRuleNameError(options: {\n topLevelRule: Rule;\n expectedPattern: RegExp;\n }): string {\n /* istanbul ignore next */\n return \"deprecated\";\n },\n\n buildDuplicateRuleNameError(options: {\n topLevelRule: Rule | string;\n grammarName: string;\n }): string {\n let ruleName;\n if (options.topLevelRule instanceof Rule) {\n ruleName = options.topLevelRule.name;\n } else {\n ruleName = options.topLevelRule;\n }\n\n const errMsg = `Duplicate definition, rule: ->${ruleName}<- is already defined in the grammar: ->${options.grammarName}<-`;\n\n return errMsg;\n },\n };\n", "import {\n IParserUnresolvedRefDefinitionError,\n ParserDefinitionErrorType,\n} from \"../parser/parser.js\";\nimport { forEach, values } from \"lodash-es\";\nimport { GAstVisitor, NonTerminal, Rule } from \"@chevrotain/gast\";\nimport {\n IGrammarResolverErrorMessageProvider,\n IParserDefinitionError,\n} from \"./types.js\";\n\nexport function resolveGrammar(\n topLevels: Record,\n errMsgProvider: IGrammarResolverErrorMessageProvider,\n): IParserDefinitionError[] {\n const refResolver = new GastRefResolverVisitor(topLevels, errMsgProvider);\n refResolver.resolveRefs();\n return refResolver.errors;\n}\n\nexport class GastRefResolverVisitor extends GAstVisitor {\n public errors: IParserUnresolvedRefDefinitionError[] = [];\n private currTopLevel: Rule;\n\n constructor(\n private nameToTopRule: Record,\n private errMsgProvider: IGrammarResolverErrorMessageProvider,\n ) {\n super();\n }\n\n public resolveRefs(): void {\n forEach(values(this.nameToTopRule), (prod) => {\n this.currTopLevel = prod;\n prod.accept(this);\n });\n }\n\n public visitNonTerminal(node: NonTerminal): void {\n const ref = this.nameToTopRule[node.nonTerminalName];\n\n if (!ref) {\n const msg = this.errMsgProvider.buildRuleNotFoundError(\n this.currTopLevel,\n node,\n );\n this.errors.push({\n message: msg,\n type: ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,\n ruleName: this.currTopLevel.name,\n unresolvedRefName: node.nonTerminalName,\n });\n } else {\n node.referencedRule = ref;\n }\n }\n}\n", "import {\n clone,\n drop,\n dropRight,\n first as _first,\n forEach,\n isEmpty,\n last,\n} from \"lodash-es\";\nimport { first } from \"./first.js\";\nimport { RestWalker } from \"./rest.js\";\nimport { TokenMatcher } from \"../parser/parser.js\";\nimport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\nimport {\n IGrammarPath,\n IProduction,\n ISyntacticContentAssistPath,\n IToken,\n ITokenGrammarPath,\n TokenType,\n} from \"@chevrotain/types\";\n\nexport abstract class AbstractNextPossibleTokensWalker extends RestWalker {\n protected possibleTokTypes: TokenType[] = [];\n protected ruleStack: string[];\n protected occurrenceStack: number[];\n\n protected nextProductionName = \"\";\n protected nextProductionOccurrence = 0;\n protected found = false;\n protected isAtEndOfPath = false;\n\n constructor(\n protected topProd: Rule,\n protected path: IGrammarPath,\n ) {\n super();\n }\n\n startWalking(): TokenType[] {\n this.found = false;\n\n if (this.path.ruleStack[0] !== this.topProd.name) {\n throw Error(\"The path does not start with the walker's top Rule!\");\n }\n\n // immutable for the win\n this.ruleStack = clone(this.path.ruleStack).reverse(); // intelij bug requires assertion\n this.occurrenceStack = clone(this.path.occurrenceStack).reverse(); // intelij bug requires assertion\n\n // already verified that the first production is valid, we now seek the 2nd production\n this.ruleStack.pop();\n this.occurrenceStack.pop();\n\n this.updateExpectedNext();\n this.walk(this.topProd);\n\n return this.possibleTokTypes;\n }\n\n walk(\n prod: { definition: IProduction[] },\n prevRest: IProduction[] = [],\n ): void {\n // stop scanning once we found the path\n if (!this.found) {\n super.walk(prod, prevRest);\n }\n }\n\n walkProdRef(\n refProd: NonTerminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n // found the next production, need to keep walking in it\n if (\n refProd.referencedRule.name === this.nextProductionName &&\n refProd.idx === this.nextProductionOccurrence\n ) {\n const fullRest = currRest.concat(prevRest);\n this.updateExpectedNext();\n this.walk(refProd.referencedRule, fullRest);\n }\n }\n\n updateExpectedNext(): void {\n // need to consume the Terminal\n if (isEmpty(this.ruleStack)) {\n // must reset nextProductionXXX to avoid walking down another Top Level production while what we are\n // really seeking is the last Terminal...\n this.nextProductionName = \"\";\n this.nextProductionOccurrence = 0;\n this.isAtEndOfPath = true;\n } else {\n this.nextProductionName = this.ruleStack.pop()!;\n this.nextProductionOccurrence = this.occurrenceStack.pop()!;\n }\n }\n}\n\nexport class NextAfterTokenWalker extends AbstractNextPossibleTokensWalker {\n private nextTerminalName = \"\";\n private nextTerminalOccurrence = 0;\n\n constructor(\n topProd: Rule,\n protected path: ITokenGrammarPath,\n ) {\n super(topProd, path);\n this.nextTerminalName = this.path.lastTok.name;\n this.nextTerminalOccurrence = this.path.lastTokOccurrence;\n }\n\n walkTerminal(\n terminal: Terminal,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n this.isAtEndOfPath &&\n terminal.terminalType.name === this.nextTerminalName &&\n terminal.idx === this.nextTerminalOccurrence &&\n !this.found\n ) {\n const fullRest = currRest.concat(prevRest);\n const restProd = new Alternative({ definition: fullRest });\n this.possibleTokTypes = first(restProd);\n this.found = true;\n }\n }\n}\n\nexport type AlternativesFirstTokens = TokenType[][];\n\nexport interface IFirstAfterRepetition {\n token: TokenType | undefined;\n occurrence: number | undefined;\n isEndOfRule: boolean | undefined;\n}\n\n/**\n * This walker only \"walks\" a single \"TOP\" level in the Grammar Ast, this means\n * it never \"follows\" production refs\n */\nexport class AbstractNextTerminalAfterProductionWalker extends RestWalker {\n protected result: IFirstAfterRepetition = {\n token: undefined,\n occurrence: undefined,\n isEndOfRule: undefined,\n };\n\n constructor(\n protected topRule: Rule,\n protected occurrence: number,\n ) {\n super();\n }\n\n startWalking(): IFirstAfterRepetition {\n this.walk(this.topRule);\n return this.result;\n }\n}\n\nexport class NextTerminalAfterManyWalker extends AbstractNextTerminalAfterProductionWalker {\n walkMany(\n manyProd: Repetition,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (manyProd.idx === this.occurrence) {\n const firstAfterMany = _first(currRest.concat(prevRest));\n this.result.isEndOfRule = firstAfterMany === undefined;\n if (firstAfterMany instanceof Terminal) {\n this.result.token = firstAfterMany.terminalType;\n this.result.occurrence = firstAfterMany.idx;\n }\n } else {\n super.walkMany(manyProd, currRest, prevRest);\n }\n }\n}\n\nexport class NextTerminalAfterManySepWalker extends AbstractNextTerminalAfterProductionWalker {\n walkManySep(\n manySepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (manySepProd.idx === this.occurrence) {\n const firstAfterManySep = _first(currRest.concat(prevRest));\n this.result.isEndOfRule = firstAfterManySep === undefined;\n if (firstAfterManySep instanceof Terminal) {\n this.result.token = firstAfterManySep.terminalType;\n this.result.occurrence = firstAfterManySep.idx;\n }\n } else {\n super.walkManySep(manySepProd, currRest, prevRest);\n }\n }\n}\n\nexport class NextTerminalAfterAtLeastOneWalker extends AbstractNextTerminalAfterProductionWalker {\n walkAtLeastOne(\n atLeastOneProd: RepetitionMandatory,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (atLeastOneProd.idx === this.occurrence) {\n const firstAfterAtLeastOne = _first(currRest.concat(prevRest));\n this.result.isEndOfRule = firstAfterAtLeastOne === undefined;\n if (firstAfterAtLeastOne instanceof Terminal) {\n this.result.token = firstAfterAtLeastOne.terminalType;\n this.result.occurrence = firstAfterAtLeastOne.idx;\n }\n } else {\n super.walkAtLeastOne(atLeastOneProd, currRest, prevRest);\n }\n }\n}\n\n// TODO: reduce code duplication in the AfterWalkers\nexport class NextTerminalAfterAtLeastOneSepWalker extends AbstractNextTerminalAfterProductionWalker {\n walkAtLeastOneSep(\n atleastOneSepProd: RepetitionMandatoryWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (atleastOneSepProd.idx === this.occurrence) {\n const firstAfterfirstAfterAtLeastOneSep = _first(\n currRest.concat(prevRest),\n );\n this.result.isEndOfRule = firstAfterfirstAfterAtLeastOneSep === undefined;\n if (firstAfterfirstAfterAtLeastOneSep instanceof Terminal) {\n this.result.token = firstAfterfirstAfterAtLeastOneSep.terminalType;\n this.result.occurrence = firstAfterfirstAfterAtLeastOneSep.idx;\n }\n } else {\n super.walkAtLeastOneSep(atleastOneSepProd, currRest, prevRest);\n }\n }\n}\n\nexport interface PartialPathAndSuffixes {\n partialPath: TokenType[];\n suffixDef: IProduction[];\n}\n\nexport function possiblePathsFrom(\n targetDef: IProduction[],\n maxLength: number,\n currPath: TokenType[] = [],\n): PartialPathAndSuffixes[] {\n // avoid side effects\n currPath = clone(currPath);\n let result: PartialPathAndSuffixes[] = [];\n let i = 0;\n\n // TODO: avoid inner funcs\n function remainingPathWith(nextDef: IProduction[]) {\n return nextDef.concat(drop(targetDef, i + 1));\n }\n\n // TODO: avoid inner funcs\n function getAlternativesForProd(definition: IProduction[]) {\n const alternatives = possiblePathsFrom(\n remainingPathWith(definition),\n maxLength,\n currPath,\n );\n return result.concat(alternatives);\n }\n\n /**\n * Mandatory productions will halt the loop as the paths computed from their recursive calls will already contain the\n * following (rest) of the targetDef.\n *\n * For optional productions (Option/Repetition/...) the loop will continue to represent the paths that do not include the\n * the optional production.\n */\n while (currPath.length < maxLength && i < targetDef.length) {\n const prod = targetDef[i];\n\n /* istanbul ignore else */\n if (prod instanceof Alternative) {\n return getAlternativesForProd(prod.definition);\n } else if (prod instanceof NonTerminal) {\n return getAlternativesForProd(prod.definition);\n } else if (prod instanceof Option) {\n result = getAlternativesForProd(prod.definition);\n } else if (prod instanceof RepetitionMandatory) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: prod.definition,\n }),\n ]);\n return getAlternativesForProd(newDef);\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\n const newDef = [\n new Alternative({ definition: prod.definition }),\n new Repetition({\n definition: [new Terminal({ terminalType: prod.separator })].concat(\n prod.definition,\n ),\n }),\n ];\n return getAlternativesForProd(newDef);\n } else if (prod instanceof RepetitionWithSeparator) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: [new Terminal({ terminalType: prod.separator })].concat(\n prod.definition,\n ),\n }),\n ]);\n result = getAlternativesForProd(newDef);\n } else if (prod instanceof Repetition) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: prod.definition,\n }),\n ]);\n result = getAlternativesForProd(newDef);\n } else if (prod instanceof Alternation) {\n forEach(prod.definition, (currAlt) => {\n // TODO: this is a limited check for empty alternatives\n // It would prevent a common case of infinite loops during parser initialization.\n // However **in-directly** empty alternatives may still cause issues.\n if (isEmpty(currAlt.definition) === false) {\n result = getAlternativesForProd(currAlt.definition);\n }\n });\n return result;\n } else if (prod instanceof Terminal) {\n currPath.push(prod.terminalType);\n } else {\n throw Error(\"non exhaustive match\");\n }\n\n i++;\n }\n result.push({\n partialPath: currPath,\n suffixDef: drop(targetDef, i),\n });\n\n return result;\n}\n\ninterface IPathToExamine {\n idx: number;\n def: IProduction[];\n ruleStack: string[];\n occurrenceStack: number[];\n}\n\nexport function nextPossibleTokensAfter(\n initialDef: IProduction[],\n tokenVector: IToken[],\n tokMatcher: TokenMatcher,\n maxLookAhead: number,\n): ISyntacticContentAssistPath[] {\n const EXIT_NON_TERMINAL: any = \"EXIT_NONE_TERMINAL\";\n // to avoid creating a new Array each time.\n const EXIT_NON_TERMINAL_ARR = [EXIT_NON_TERMINAL];\n const EXIT_ALTERNATIVE: any = \"EXIT_ALTERNATIVE\";\n let foundCompletePath = false;\n\n const tokenVectorLength = tokenVector.length;\n const minimalAlternativesIndex = tokenVectorLength - maxLookAhead - 1;\n\n const result: ISyntacticContentAssistPath[] = [];\n\n const possiblePaths: IPathToExamine[] = [];\n possiblePaths.push({\n idx: -1,\n def: initialDef,\n ruleStack: [],\n occurrenceStack: [],\n });\n\n while (!isEmpty(possiblePaths)) {\n const currPath = possiblePaths.pop()!;\n\n // skip alternatives if no more results can be found (assuming deterministic grammar with fixed lookahead)\n if (currPath === EXIT_ALTERNATIVE) {\n if (\n foundCompletePath &&\n last(possiblePaths)!.idx <= minimalAlternativesIndex\n ) {\n // remove irrelevant alternative\n possiblePaths.pop();\n }\n continue;\n }\n\n const currDef = currPath.def;\n const currIdx = currPath.idx;\n const currRuleStack = currPath.ruleStack;\n const currOccurrenceStack = currPath.occurrenceStack;\n\n // For Example: an empty path could exist in a valid grammar in the case of an EMPTY_ALT\n if (isEmpty(currDef)) {\n continue;\n }\n\n const prod = currDef[0];\n /* istanbul ignore else */\n if (prod === EXIT_NON_TERMINAL) {\n const nextPath = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: dropRight(currRuleStack),\n occurrenceStack: dropRight(currOccurrenceStack),\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof Terminal) {\n /* istanbul ignore else */\n if (currIdx < tokenVectorLength - 1) {\n const nextIdx = currIdx + 1;\n const actualToken = tokenVector[nextIdx];\n if (tokMatcher!(actualToken, prod.terminalType)) {\n const nextPath = {\n idx: nextIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n }\n // end of the line\n } else if (currIdx === tokenVectorLength - 1) {\n // IGNORE ABOVE ELSE\n result.push({\n nextTokenType: prod.terminalType,\n nextTokenOccurrence: prod.idx,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n });\n foundCompletePath = true;\n } else {\n throw Error(\"non exhaustive match\");\n }\n } else if (prod instanceof NonTerminal) {\n const newRuleStack = clone(currRuleStack);\n newRuleStack.push(prod.nonTerminalName);\n\n const newOccurrenceStack = clone(currOccurrenceStack);\n newOccurrenceStack.push(prod.idx);\n\n const nextPath = {\n idx: currIdx,\n def: prod.definition.concat(EXIT_NON_TERMINAL_ARR, drop(currDef)),\n ruleStack: newRuleStack,\n occurrenceStack: newOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof Option) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n\n const nextPathWith = {\n idx: currIdx,\n def: prod.definition.concat(drop(currDef)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n } else if (prod instanceof RepetitionMandatory) {\n // TODO:(THE NEW operators here take a while...) (convert once?)\n const secondIteration = new Repetition({\n definition: prod.definition,\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([secondIteration], drop(currDef));\n const nextPath = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\n // TODO:(THE NEW operators here take a while...) (convert once?)\n const separatorGast = new Terminal({\n terminalType: prod.separator,\n });\n const secondIteration = new Repetition({\n definition: [separatorGast].concat(prod.definition),\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([secondIteration], drop(currDef));\n const nextPath = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n } else if (prod instanceof RepetitionWithSeparator) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n\n const separatorGast = new Terminal({\n terminalType: prod.separator,\n });\n const nthRepetition = new Repetition({\n definition: [separatorGast].concat(prod.definition),\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([nthRepetition], drop(currDef));\n const nextPathWith = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n } else if (prod instanceof Repetition) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: drop(currDef),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n\n // TODO: an empty repetition will cause infinite loops here, will the parser detect this in selfAnalysis?\n const nthRepetition = new Repetition({\n definition: prod.definition,\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([nthRepetition], drop(currDef));\n const nextPathWith = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n } else if (prod instanceof Alternation) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n for (let i = prod.definition.length - 1; i >= 0; i--) {\n const currAlt: any = prod.definition[i];\n const currAltPath = {\n idx: currIdx,\n def: currAlt.definition.concat(drop(currDef)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(currAltPath);\n possiblePaths.push(EXIT_ALTERNATIVE);\n }\n } else if (prod instanceof Alternative) {\n possiblePaths.push({\n idx: currIdx,\n def: prod.definition.concat(drop(currDef)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n });\n } else if (prod instanceof Rule) {\n // last because we should only encounter at most a single one of these per invocation.\n possiblePaths.push(\n expandTopLevelRule(prod, currIdx, currRuleStack, currOccurrenceStack),\n );\n } else {\n throw Error(\"non exhaustive match\");\n }\n }\n return result;\n}\n\nfunction expandTopLevelRule(\n topRule: Rule,\n currIdx: number,\n currRuleStack: string[],\n currOccurrenceStack: number[],\n): IPathToExamine {\n const newRuleStack = clone(currRuleStack);\n newRuleStack.push(topRule.name);\n\n const newCurrOccurrenceStack = clone(currOccurrenceStack);\n // top rule is always assumed to have been called with occurrence index 1\n newCurrOccurrenceStack.push(1);\n\n return {\n idx: currIdx,\n def: topRule.definition,\n ruleStack: newRuleStack,\n occurrenceStack: newCurrOccurrenceStack,\n };\n}\n", "import { every, flatten, forEach, has, isEmpty, map, reduce } from \"lodash-es\";\nimport { possiblePathsFrom } from \"./interpreter.js\";\nimport { RestWalker } from \"./rest.js\";\nimport { Predicate, TokenMatcher } from \"../parser/parser.js\";\nimport {\n tokenStructuredMatcher,\n tokenStructuredMatcherNoCategories,\n} from \"../../scan/tokens.js\";\nimport {\n Alternation,\n Alternative as AlternativeGAST,\n GAstVisitor,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n} from \"@chevrotain/gast\";\nimport {\n BaseParser,\n IOrAlt,\n IProduction,\n IProductionWithOccurrence,\n LookaheadProductionType,\n LookaheadSequence,\n Rule,\n TokenType,\n} from \"@chevrotain/types\";\n\nexport enum PROD_TYPE {\n OPTION,\n REPETITION,\n REPETITION_MANDATORY,\n REPETITION_MANDATORY_WITH_SEPARATOR,\n REPETITION_WITH_SEPARATOR,\n ALTERNATION,\n}\n\nexport function getProdType(\n prod: IProduction | LookaheadProductionType,\n): PROD_TYPE {\n /* istanbul ignore else */\n if (prod instanceof Option || prod === \"Option\") {\n return PROD_TYPE.OPTION;\n } else if (prod instanceof Repetition || prod === \"Repetition\") {\n return PROD_TYPE.REPETITION;\n } else if (\n prod instanceof RepetitionMandatory ||\n prod === \"RepetitionMandatory\"\n ) {\n return PROD_TYPE.REPETITION_MANDATORY;\n } else if (\n prod instanceof RepetitionMandatoryWithSeparator ||\n prod === \"RepetitionMandatoryWithSeparator\"\n ) {\n return PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR;\n } else if (\n prod instanceof RepetitionWithSeparator ||\n prod === \"RepetitionWithSeparator\"\n ) {\n return PROD_TYPE.REPETITION_WITH_SEPARATOR;\n } else if (prod instanceof Alternation || prod === \"Alternation\") {\n return PROD_TYPE.ALTERNATION;\n } else {\n throw Error(\"non exhaustive match\");\n }\n}\n\nexport function getLookaheadPaths(options: {\n occurrence: number;\n rule: Rule;\n prodType: LookaheadProductionType;\n maxLookahead: number;\n}): LookaheadSequence[] {\n const { occurrence, rule, prodType, maxLookahead } = options;\n const type = getProdType(prodType);\n if (type === PROD_TYPE.ALTERNATION) {\n return getLookaheadPathsForOr(occurrence, rule, maxLookahead);\n } else {\n return getLookaheadPathsForOptionalProd(\n occurrence,\n rule,\n type,\n maxLookahead,\n );\n }\n}\n\nexport function buildLookaheadFuncForOr(\n occurrence: number,\n ruleGrammar: Rule,\n maxLookahead: number,\n hasPredicates: boolean,\n dynamicTokensEnabled: boolean,\n laFuncBuilder: Function,\n): (orAlts?: IOrAlt[]) => number | undefined {\n const lookAheadPaths = getLookaheadPathsForOr(\n occurrence,\n ruleGrammar,\n maxLookahead,\n );\n\n const tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths)\n ? tokenStructuredMatcherNoCategories\n : tokenStructuredMatcher;\n\n return laFuncBuilder(\n lookAheadPaths,\n hasPredicates,\n tokenMatcher,\n dynamicTokensEnabled,\n );\n}\n\n/**\n * When dealing with an Optional production (OPTION/MANY/2nd iteration of AT_LEAST_ONE/...) we need to compare\n * the lookahead \"inside\" the production and the lookahead immediately \"after\" it in the same top level rule (context free).\n *\n * Example: given a production:\n * ABC(DE)?DF\n *\n * The optional '(DE)?' should only be entered if we see 'DE'. a single Token 'D' is not sufficient to distinguish between the two\n * alternatives.\n *\n * @returns A Lookahead function which will return true IFF the parser should parse the Optional production.\n */\nexport function buildLookaheadFuncForOptionalProd(\n occurrence: number,\n ruleGrammar: Rule,\n k: number,\n dynamicTokensEnabled: boolean,\n prodType: PROD_TYPE,\n lookaheadBuilder: (\n lookAheadSequence: LookaheadSequence,\n tokenMatcher: TokenMatcher,\n dynamicTokensEnabled: boolean,\n ) => () => boolean,\n): () => boolean {\n const lookAheadPaths = getLookaheadPathsForOptionalProd(\n occurrence,\n ruleGrammar,\n prodType,\n k,\n );\n\n const tokenMatcher = areTokenCategoriesNotUsed(lookAheadPaths)\n ? tokenStructuredMatcherNoCategories\n : tokenStructuredMatcher;\n\n return lookaheadBuilder(\n lookAheadPaths[0],\n tokenMatcher,\n dynamicTokensEnabled,\n );\n}\n\nexport type Alternative = TokenType[][];\n\nexport function buildAlternativesLookAheadFunc(\n alts: LookaheadSequence[],\n hasPredicates: boolean,\n tokenMatcher: TokenMatcher,\n dynamicTokensEnabled: boolean,\n): (orAlts: IOrAlt[]) => number | undefined {\n const numOfAlts = alts.length;\n const areAllOneTokenLookahead = every(alts, (currAlt) => {\n return every(currAlt, (currPath) => {\n return currPath.length === 1;\n });\n });\n\n // This version takes into account the predicates as well.\n if (hasPredicates) {\n /**\n * @returns {number} - The chosen alternative index\n */\n return function (\n this: BaseParser,\n orAlts: IOrAlt[],\n ): number | undefined {\n // unfortunately the predicates must be extracted every single time\n // as they cannot be cached due to references to parameters(vars) which are no longer valid.\n // note that in the common case of no predicates, no cpu time will be wasted on this (see else block)\n const predicates: (Predicate | undefined)[] = map(\n orAlts,\n (currAlt) => currAlt.GATE,\n );\n\n for (let t = 0; t < numOfAlts; t++) {\n const currAlt = alts[t];\n const currNumOfPaths = currAlt.length;\n\n const currPredicate = predicates[t];\n if (currPredicate !== undefined && currPredicate.call(this) === false) {\n // if the predicate does not match there is no point in checking the paths\n continue;\n }\n nextPath: for (let j = 0; j < currNumOfPaths; j++) {\n const currPath = currAlt[j];\n const currPathLength = currPath.length;\n for (let i = 0; i < currPathLength; i++) {\n const nextToken = this.LA(i + 1);\n if (tokenMatcher(nextToken, currPath[i]) === false) {\n // mismatch in current path\n // try the next pth\n continue nextPath;\n }\n }\n // found a full path that matches.\n // this will also work for an empty ALT as the loop will be skipped\n return t;\n }\n // none of the paths for the current alternative matched\n // try the next alternative\n }\n // none of the alternatives could be matched\n return undefined;\n };\n } else if (areAllOneTokenLookahead && !dynamicTokensEnabled) {\n // optimized (common) case of all the lookaheads paths requiring only\n // a single token lookahead. These Optimizations cannot work if dynamically defined Tokens are used.\n const singleTokenAlts = map(alts, (currAlt) => {\n return flatten(currAlt);\n });\n\n const choiceToAlt = reduce(\n singleTokenAlts,\n (result, currAlt, idx) => {\n forEach(currAlt, (currTokType) => {\n if (!has(result, currTokType.tokenTypeIdx!)) {\n result[currTokType.tokenTypeIdx!] = idx;\n }\n forEach(currTokType.categoryMatches!, (currExtendingType) => {\n if (!has(result, currExtendingType)) {\n result[currExtendingType] = idx;\n }\n });\n });\n return result;\n },\n {} as Record,\n );\n\n /**\n * @returns {number} - The chosen alternative index\n */\n return function (this: BaseParser): number {\n const nextToken = this.LA(1);\n return choiceToAlt[nextToken.tokenTypeIdx];\n };\n } else {\n // optimized lookahead without needing to check the predicates at all.\n // this causes code duplication which is intentional to improve performance.\n /**\n * @returns {number} - The chosen alternative index\n */\n return function (this: BaseParser): number | undefined {\n for (let t = 0; t < numOfAlts; t++) {\n const currAlt = alts[t];\n const currNumOfPaths = currAlt.length;\n nextPath: for (let j = 0; j < currNumOfPaths; j++) {\n const currPath = currAlt[j];\n const currPathLength = currPath.length;\n for (let i = 0; i < currPathLength; i++) {\n const nextToken = this.LA(i + 1);\n if (tokenMatcher(nextToken, currPath[i]) === false) {\n // mismatch in current path\n // try the next pth\n continue nextPath;\n }\n }\n // found a full path that matches.\n // this will also work for an empty ALT as the loop will be skipped\n return t;\n }\n // none of the paths for the current alternative matched\n // try the next alternative\n }\n // none of the alternatives could be matched\n return undefined;\n };\n }\n}\n\nexport function buildSingleAlternativeLookaheadFunction(\n alt: LookaheadSequence,\n tokenMatcher: TokenMatcher,\n dynamicTokensEnabled: boolean,\n): () => boolean {\n const areAllOneTokenLookahead = every(alt, (currPath) => {\n return currPath.length === 1;\n });\n\n const numOfPaths = alt.length;\n\n // optimized (common) case of all the lookaheads paths requiring only\n // a single token lookahead.\n if (areAllOneTokenLookahead && !dynamicTokensEnabled) {\n const singleTokensTypes = flatten(alt);\n\n if (\n singleTokensTypes.length === 1 &&\n isEmpty((singleTokensTypes[0]).categoryMatches)\n ) {\n const expectedTokenType = singleTokensTypes[0];\n const expectedTokenUniqueKey = (expectedTokenType).tokenTypeIdx;\n\n return function (this: BaseParser): boolean {\n return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey;\n };\n } else {\n const choiceToAlt = reduce(\n singleTokensTypes,\n (result, currTokType, idx) => {\n result[currTokType.tokenTypeIdx!] = true;\n forEach(currTokType.categoryMatches!, (currExtendingType) => {\n result[currExtendingType] = true;\n });\n return result;\n },\n [] as boolean[],\n );\n\n return function (this: BaseParser): boolean {\n const nextToken = this.LA(1);\n return choiceToAlt[nextToken.tokenTypeIdx] === true;\n };\n }\n } else {\n return function (this: BaseParser): boolean {\n nextPath: for (let j = 0; j < numOfPaths; j++) {\n const currPath = alt[j];\n const currPathLength = currPath.length;\n for (let i = 0; i < currPathLength; i++) {\n const nextToken = this.LA(i + 1);\n if (tokenMatcher(nextToken, currPath[i]) === false) {\n // mismatch in current path\n // try the next pth\n continue nextPath;\n }\n }\n // found a full path that matches.\n return true;\n }\n\n // none of the paths matched\n return false;\n };\n }\n}\n\nclass RestDefinitionFinderWalker extends RestWalker {\n private restDef: IProduction[];\n\n constructor(\n private topProd: Rule,\n private targetOccurrence: number,\n private targetProdType: PROD_TYPE,\n ) {\n super();\n }\n\n startWalking(): IProduction[] {\n this.walk(this.topProd);\n return this.restDef;\n }\n\n private checkIsTarget(\n node: IProductionWithOccurrence,\n expectedProdType: PROD_TYPE,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): boolean {\n if (\n node.idx === this.targetOccurrence &&\n this.targetProdType === expectedProdType\n ) {\n this.restDef = currRest.concat(prevRest);\n return true;\n }\n // performance optimization, do not iterate over the entire Grammar ast after we have found the target\n return false;\n }\n\n walkOption(\n optionProd: Option,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (!this.checkIsTarget(optionProd, PROD_TYPE.OPTION, currRest, prevRest)) {\n super.walkOption(optionProd, currRest, prevRest);\n }\n }\n\n walkAtLeastOne(\n atLeastOneProd: RepetitionMandatory,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(\n atLeastOneProd,\n PROD_TYPE.REPETITION_MANDATORY,\n currRest,\n prevRest,\n )\n ) {\n super.walkOption(atLeastOneProd, currRest, prevRest);\n }\n }\n\n walkAtLeastOneSep(\n atLeastOneSepProd: RepetitionMandatoryWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(\n atLeastOneSepProd,\n PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,\n currRest,\n prevRest,\n )\n ) {\n super.walkOption(atLeastOneSepProd, currRest, prevRest);\n }\n }\n\n walkMany(\n manyProd: Repetition,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(manyProd, PROD_TYPE.REPETITION, currRest, prevRest)\n ) {\n super.walkOption(manyProd, currRest, prevRest);\n }\n }\n\n walkManySep(\n manySepProd: RepetitionWithSeparator,\n currRest: IProduction[],\n prevRest: IProduction[],\n ): void {\n if (\n !this.checkIsTarget(\n manySepProd,\n PROD_TYPE.REPETITION_WITH_SEPARATOR,\n currRest,\n prevRest,\n )\n ) {\n super.walkOption(manySepProd, currRest, prevRest);\n }\n }\n}\n\n/**\n * Returns the definition of a target production in a top level level rule.\n */\nclass InsideDefinitionFinderVisitor extends GAstVisitor {\n public result: IProduction[] = [];\n\n constructor(\n private targetOccurrence: number,\n private targetProdType: PROD_TYPE,\n private targetRef?: any,\n ) {\n super();\n }\n\n private checkIsTarget(\n node: { definition: IProduction[] } & IProductionWithOccurrence,\n expectedProdName: PROD_TYPE,\n ): void {\n if (\n node.idx === this.targetOccurrence &&\n this.targetProdType === expectedProdName &&\n (this.targetRef === undefined || node === this.targetRef)\n ) {\n this.result = node.definition;\n }\n }\n\n public visitOption(node: Option): void {\n this.checkIsTarget(node, PROD_TYPE.OPTION);\n }\n\n public visitRepetition(node: Repetition): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION);\n }\n\n public visitRepetitionMandatory(node: RepetitionMandatory): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n node: RepetitionMandatoryWithSeparator,\n ): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR);\n }\n\n public visitRepetitionWithSeparator(node: RepetitionWithSeparator): void {\n this.checkIsTarget(node, PROD_TYPE.REPETITION_WITH_SEPARATOR);\n }\n\n public visitAlternation(node: Alternation): void {\n this.checkIsTarget(node, PROD_TYPE.ALTERNATION);\n }\n}\n\nfunction initializeArrayOfArrays(size: number): any[][] {\n const result = new Array(size);\n for (let i = 0; i < size; i++) {\n result[i] = [];\n }\n return result;\n}\n\n/**\n * A sort of hash function between a Path in the grammar and a string.\n * Note that this returns multiple \"hashes\" to support the scenario of token categories.\n * - A single path with categories may match multiple **actual** paths.\n */\nfunction pathToHashKeys(path: TokenType[]): string[] {\n let keys = [\"\"];\n for (let i = 0; i < path.length; i++) {\n const tokType = path[i];\n const longerKeys = [];\n for (let j = 0; j < keys.length; j++) {\n const currShorterKey = keys[j];\n longerKeys.push(currShorterKey + \"_\" + tokType.tokenTypeIdx);\n for (let t = 0; t < tokType.categoryMatches!.length; t++) {\n const categoriesKeySuffix = \"_\" + tokType.categoryMatches![t];\n longerKeys.push(currShorterKey + categoriesKeySuffix);\n }\n }\n keys = longerKeys;\n }\n return keys;\n}\n\n/**\n * Imperative style due to being called from a hot spot\n */\nfunction isUniquePrefixHash(\n altKnownPathsKeys: Record[],\n searchPathKeys: string[],\n idx: number,\n): boolean {\n for (\n let currAltIdx = 0;\n currAltIdx < altKnownPathsKeys.length;\n currAltIdx++\n ) {\n // We only want to test vs the other alternatives\n if (currAltIdx === idx) {\n continue;\n }\n const otherAltKnownPathsKeys = altKnownPathsKeys[currAltIdx];\n for (let searchIdx = 0; searchIdx < searchPathKeys.length; searchIdx++) {\n const searchKey = searchPathKeys[searchIdx];\n if (otherAltKnownPathsKeys[searchKey] === true) {\n return false;\n }\n }\n }\n // None of the SearchPathKeys were found in any of the other alternatives\n return true;\n}\n\nexport function lookAheadSequenceFromAlternatives(\n altsDefs: IProduction[],\n k: number,\n): LookaheadSequence[] {\n const partialAlts = map(altsDefs, (currAlt) =>\n possiblePathsFrom([currAlt], 1),\n );\n const finalResult = initializeArrayOfArrays(partialAlts.length);\n const altsHashes = map(partialAlts, (currAltPaths) => {\n const dict: { [key: string]: boolean } = {};\n forEach(currAltPaths, (item) => {\n const keys = pathToHashKeys(item.partialPath);\n forEach(keys, (currKey) => {\n dict[currKey] = true;\n });\n });\n return dict;\n });\n let newData = partialAlts;\n\n // maxLookahead loop\n for (let pathLength = 1; pathLength <= k; pathLength++) {\n const currDataset = newData;\n newData = initializeArrayOfArrays(currDataset.length);\n\n // alternatives loop\n for (let altIdx = 0; altIdx < currDataset.length; altIdx++) {\n const currAltPathsAndSuffixes = currDataset[altIdx];\n // paths in current alternative loop\n for (\n let currPathIdx = 0;\n currPathIdx < currAltPathsAndSuffixes.length;\n currPathIdx++\n ) {\n const currPathPrefix = currAltPathsAndSuffixes[currPathIdx].partialPath;\n const suffixDef = currAltPathsAndSuffixes[currPathIdx].suffixDef;\n const prefixKeys = pathToHashKeys(currPathPrefix);\n const isUnique = isUniquePrefixHash(altsHashes, prefixKeys, altIdx);\n // End of the line for this path.\n if (isUnique || isEmpty(suffixDef) || currPathPrefix.length === k) {\n const currAltResult = finalResult[altIdx];\n // TODO: Can we implement a containsPath using Maps/Dictionaries?\n if (containsPath(currAltResult, currPathPrefix) === false) {\n currAltResult.push(currPathPrefix);\n // Update all new keys for the current path.\n for (let j = 0; j < prefixKeys.length; j++) {\n const currKey = prefixKeys[j];\n altsHashes[altIdx][currKey] = true;\n }\n }\n }\n // Expand longer paths\n else {\n const newPartialPathsAndSuffixes = possiblePathsFrom(\n suffixDef,\n pathLength + 1,\n currPathPrefix,\n );\n newData[altIdx] = newData[altIdx].concat(newPartialPathsAndSuffixes);\n\n // Update keys for new known paths\n forEach(newPartialPathsAndSuffixes, (item) => {\n const prefixKeys = pathToHashKeys(item.partialPath);\n forEach(prefixKeys, (key) => {\n altsHashes[altIdx][key] = true;\n });\n });\n }\n }\n }\n }\n\n return finalResult;\n}\n\nexport function getLookaheadPathsForOr(\n occurrence: number,\n ruleGrammar: Rule,\n k: number,\n orProd?: Alternation,\n): LookaheadSequence[] {\n const visitor = new InsideDefinitionFinderVisitor(\n occurrence,\n PROD_TYPE.ALTERNATION,\n orProd,\n );\n ruleGrammar.accept(visitor);\n return lookAheadSequenceFromAlternatives(visitor.result, k);\n}\n\nexport function getLookaheadPathsForOptionalProd(\n occurrence: number,\n ruleGrammar: Rule,\n prodType: PROD_TYPE,\n k: number,\n): LookaheadSequence[] {\n const insideDefVisitor = new InsideDefinitionFinderVisitor(\n occurrence,\n prodType,\n );\n ruleGrammar.accept(insideDefVisitor);\n const insideDef = insideDefVisitor.result;\n\n const afterDefWalker = new RestDefinitionFinderWalker(\n ruleGrammar,\n occurrence,\n prodType,\n );\n const afterDef = afterDefWalker.startWalking();\n\n const insideFlat = new AlternativeGAST({ definition: insideDef });\n const afterFlat = new AlternativeGAST({ definition: afterDef });\n\n return lookAheadSequenceFromAlternatives([insideFlat, afterFlat], k);\n}\n\nexport function containsPath(\n alternative: Alternative,\n searchPath: TokenType[],\n): boolean {\n compareOtherPath: for (let i = 0; i < alternative.length; i++) {\n const otherPath = alternative[i];\n if (otherPath.length !== searchPath.length) {\n continue;\n }\n for (let j = 0; j < otherPath.length; j++) {\n const searchTok = searchPath[j];\n const otherTok = otherPath[j];\n\n const matchingTokens =\n searchTok === otherTok ||\n otherTok.categoryMatchesMap![searchTok.tokenTypeIdx!] !== undefined;\n if (matchingTokens === false) {\n continue compareOtherPath;\n }\n }\n return true;\n }\n\n return false;\n}\n\nexport function isStrictPrefixOfPath(\n prefix: TokenType[],\n other: TokenType[],\n): boolean {\n return (\n prefix.length < other.length &&\n every(prefix, (tokType, idx) => {\n const otherTokType = other[idx];\n return (\n tokType === otherTokType ||\n otherTokType.categoryMatchesMap![tokType.tokenTypeIdx!]\n );\n })\n );\n}\n\nexport function areTokenCategoriesNotUsed(\n lookAheadPaths: LookaheadSequence[],\n): boolean {\n return every(lookAheadPaths, (singleAltPaths) =>\n every(singleAltPaths, (singlePath) =>\n every(singlePath, (token) => isEmpty(token.categoryMatches!)),\n ),\n );\n}\n", "import {\n clone,\n compact,\n difference,\n drop,\n dropRight,\n filter,\n first,\n flatMap,\n flatten,\n forEach,\n groupBy,\n includes,\n isEmpty,\n map,\n pickBy,\n reduce,\n reject,\n values,\n} from \"lodash-es\";\nimport {\n IParserAmbiguousAlternativesDefinitionError,\n IParserDuplicatesDefinitionError,\n IParserEmptyAlternativeDefinitionError,\n ParserDefinitionErrorType,\n} from \"../parser/parser.js\";\nimport {\n Alternation,\n Alternative as AlternativeGAST,\n GAstVisitor,\n getProductionDslName,\n isOptionalProd,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Terminal,\n} from \"@chevrotain/gast\";\nimport {\n Alternative,\n containsPath,\n getLookaheadPathsForOptionalProd,\n getLookaheadPathsForOr,\n getProdType,\n isStrictPrefixOfPath,\n} from \"./lookahead.js\";\nimport { nextPossibleTokensAfter } from \"./interpreter.js\";\nimport {\n ILookaheadStrategy,\n IProduction,\n IProductionWithOccurrence,\n Rule,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n IGrammarValidatorErrorMessageProvider,\n IParserDefinitionError,\n} from \"./types.js\";\nimport { tokenStructuredMatcher } from \"../../scan/tokens.js\";\n\nexport function validateLookahead(options: {\n lookaheadStrategy: ILookaheadStrategy;\n rules: Rule[];\n tokenTypes: TokenType[];\n grammarName: string;\n}): IParserDefinitionError[] {\n const lookaheadValidationErrorMessages = options.lookaheadStrategy.validate({\n rules: options.rules,\n tokenTypes: options.tokenTypes,\n grammarName: options.grammarName,\n });\n return map(lookaheadValidationErrorMessages, (errorMessage) => ({\n type: ParserDefinitionErrorType.CUSTOM_LOOKAHEAD_VALIDATION,\n ...errorMessage,\n }));\n}\n\nexport function validateGrammar(\n topLevels: Rule[],\n tokenTypes: TokenType[],\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n grammarName: string,\n): IParserDefinitionError[] {\n const duplicateErrors: IParserDefinitionError[] = flatMap(\n topLevels,\n (currTopLevel) =>\n validateDuplicateProductions(currTopLevel, errMsgProvider),\n );\n\n const termsNamespaceConflictErrors = checkTerminalAndNoneTerminalsNameSpace(\n topLevels,\n tokenTypes,\n errMsgProvider,\n );\n\n const tooManyAltsErrors = flatMap(topLevels, (curRule) =>\n validateTooManyAlts(curRule, errMsgProvider),\n );\n\n const duplicateRulesError = flatMap(topLevels, (curRule) =>\n validateRuleDoesNotAlreadyExist(\n curRule,\n topLevels,\n grammarName,\n errMsgProvider,\n ),\n );\n\n return duplicateErrors.concat(\n termsNamespaceConflictErrors,\n tooManyAltsErrors,\n duplicateRulesError,\n );\n}\n\nfunction validateDuplicateProductions(\n topLevelRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDuplicatesDefinitionError[] {\n const collectorVisitor = new OccurrenceValidationCollector();\n topLevelRule.accept(collectorVisitor);\n const allRuleProductions = collectorVisitor.allProductions;\n\n const productionGroups = groupBy(\n allRuleProductions,\n identifyProductionForDuplicates,\n );\n\n const duplicates: any = pickBy(productionGroups, (currGroup) => {\n return currGroup.length > 1;\n });\n\n const errors = map(values(duplicates), (currDuplicates: any) => {\n const firstProd: any = first(currDuplicates);\n const msg = errMsgProvider.buildDuplicateFoundError(\n topLevelRule,\n currDuplicates,\n );\n const dslName = getProductionDslName(firstProd);\n const defError: IParserDuplicatesDefinitionError = {\n message: msg,\n type: ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,\n ruleName: topLevelRule.name,\n dslName: dslName,\n occurrence: firstProd.idx,\n };\n\n const param = getExtraProductionArgument(firstProd);\n if (param) {\n defError.parameter = param;\n }\n\n return defError;\n });\n return errors;\n}\n\nexport function identifyProductionForDuplicates(\n prod: IProductionWithOccurrence,\n): string {\n return `${getProductionDslName(prod)}_#_${\n prod.idx\n }_#_${getExtraProductionArgument(prod)}`;\n}\n\nfunction getExtraProductionArgument(prod: IProductionWithOccurrence): string {\n if (prod instanceof Terminal) {\n return prod.terminalType.name;\n } else if (prod instanceof NonTerminal) {\n return prod.nonTerminalName;\n } else {\n return \"\";\n }\n}\n\nexport class OccurrenceValidationCollector extends GAstVisitor {\n public allProductions: IProductionWithOccurrence[] = [];\n\n public visitNonTerminal(subrule: NonTerminal): void {\n this.allProductions.push(subrule);\n }\n\n public visitOption(option: Option): void {\n this.allProductions.push(option);\n }\n\n public visitRepetitionWithSeparator(manySep: RepetitionWithSeparator): void {\n this.allProductions.push(manySep);\n }\n\n public visitRepetitionMandatory(atLeastOne: RepetitionMandatory): void {\n this.allProductions.push(atLeastOne);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n atLeastOneSep: RepetitionMandatoryWithSeparator,\n ): void {\n this.allProductions.push(atLeastOneSep);\n }\n\n public visitRepetition(many: Repetition): void {\n this.allProductions.push(many);\n }\n\n public visitAlternation(or: Alternation): void {\n this.allProductions.push(or);\n }\n\n public visitTerminal(terminal: Terminal): void {\n this.allProductions.push(terminal);\n }\n}\n\nexport function validateRuleDoesNotAlreadyExist(\n rule: Rule,\n allRules: Rule[],\n className: string,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const errors = [];\n const occurrences = reduce(\n allRules,\n (result, curRule) => {\n if (curRule.name === rule.name) {\n return result + 1;\n }\n return result;\n },\n 0,\n );\n if (occurrences > 1) {\n const errMsg = errMsgProvider.buildDuplicateRuleNameError({\n topLevelRule: rule,\n grammarName: className,\n });\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.DUPLICATE_RULE_NAME,\n ruleName: rule.name,\n });\n }\n\n return errors;\n}\n\n// TODO: is there anyway to get only the rule names of rules inherited from the super grammars?\n// This is not part of the IGrammarErrorProvider because the validation cannot be performed on\n// The grammar structure, only at runtime.\nexport function validateRuleIsOverridden(\n ruleName: string,\n definedRulesNames: string[],\n className: string,\n): IParserDefinitionError[] {\n const errors = [];\n let errMsg;\n\n if (!includes(definedRulesNames, ruleName)) {\n errMsg =\n `Invalid rule override, rule: ->${ruleName}<- cannot be overridden in the grammar: ->${className}<-` +\n `as it is not defined in any of the super grammars `;\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,\n ruleName: ruleName,\n });\n }\n\n return errors;\n}\n\nexport function validateNoLeftRecursion(\n topRule: Rule,\n currRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n path: Rule[] = [],\n): IParserDefinitionError[] {\n const errors: IParserDefinitionError[] = [];\n const nextNonTerminals = getFirstNoneTerminal(currRule.definition);\n if (isEmpty(nextNonTerminals)) {\n return [];\n } else {\n const ruleName = topRule.name;\n const foundLeftRecursion = includes(nextNonTerminals, topRule);\n if (foundLeftRecursion) {\n errors.push({\n message: errMsgProvider.buildLeftRecursionError({\n topLevelRule: topRule,\n leftRecursionPath: path,\n }),\n type: ParserDefinitionErrorType.LEFT_RECURSION,\n ruleName: ruleName,\n });\n }\n\n // we are only looking for cyclic paths leading back to the specific topRule\n // other cyclic paths are ignored, we still need this difference to avoid infinite loops...\n const validNextSteps = difference(nextNonTerminals, path.concat([topRule]));\n const errorsFromNextSteps = flatMap(validNextSteps, (currRefRule) => {\n const newPath = clone(path);\n newPath.push(currRefRule);\n return validateNoLeftRecursion(\n topRule,\n currRefRule,\n errMsgProvider,\n newPath,\n );\n });\n\n return errors.concat(errorsFromNextSteps);\n }\n}\n\nexport function getFirstNoneTerminal(definition: IProduction[]): Rule[] {\n let result: Rule[] = [];\n if (isEmpty(definition)) {\n return result;\n }\n const firstProd = first(definition);\n\n /* istanbul ignore else */\n if (firstProd instanceof NonTerminal) {\n result.push(firstProd.referencedRule);\n } else if (\n firstProd instanceof AlternativeGAST ||\n firstProd instanceof Option ||\n firstProd instanceof RepetitionMandatory ||\n firstProd instanceof RepetitionMandatoryWithSeparator ||\n firstProd instanceof RepetitionWithSeparator ||\n firstProd instanceof Repetition\n ) {\n result = result.concat(\n getFirstNoneTerminal(firstProd.definition),\n );\n } else if (firstProd instanceof Alternation) {\n // each sub definition in alternation is a FLAT\n result = flatten(\n map(firstProd.definition, (currSubDef) =>\n getFirstNoneTerminal((currSubDef).definition),\n ),\n );\n } else if (firstProd instanceof Terminal) {\n // nothing to see, move along\n } else {\n throw Error(\"non exhaustive match\");\n }\n\n const isFirstOptional = isOptionalProd(firstProd);\n const hasMore = definition.length > 1;\n if (isFirstOptional && hasMore) {\n const rest = drop(definition);\n return result.concat(getFirstNoneTerminal(rest));\n } else {\n return result;\n }\n}\n\nclass OrCollector extends GAstVisitor {\n public alternations: Alternation[] = [];\n\n public visitAlternation(node: Alternation): void {\n this.alternations.push(node);\n }\n}\n\nexport function validateEmptyOrAlternative(\n topLevelRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserEmptyAlternativeDefinitionError[] {\n const orCollector = new OrCollector();\n topLevelRule.accept(orCollector);\n const ors = orCollector.alternations;\n\n const errors = flatMap(\n ors,\n (currOr) => {\n const exceptLast = dropRight(currOr.definition);\n return flatMap(exceptLast, (currAlternative, currAltIdx) => {\n const possibleFirstInAlt = nextPossibleTokensAfter(\n [currAlternative],\n [],\n tokenStructuredMatcher,\n 1,\n );\n if (isEmpty(possibleFirstInAlt)) {\n return [\n {\n message: errMsgProvider.buildEmptyAlternationError({\n topLevelRule: topLevelRule,\n alternation: currOr,\n emptyChoiceIdx: currAltIdx,\n }),\n type: ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,\n ruleName: topLevelRule.name,\n occurrence: currOr.idx,\n alternative: currAltIdx + 1,\n },\n ];\n } else {\n return [];\n }\n });\n },\n );\n\n return errors;\n}\n\nexport function validateAmbiguousAlternationAlternatives(\n topLevelRule: Rule,\n globalMaxLookahead: number,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserAmbiguousAlternativesDefinitionError[] {\n const orCollector = new OrCollector();\n topLevelRule.accept(orCollector);\n let ors = orCollector.alternations;\n\n // New Handling of ignoring ambiguities\n // - https://github.com/chevrotain/chevrotain/issues/869\n ors = reject(ors, (currOr) => currOr.ignoreAmbiguities === true);\n\n const errors = flatMap(ors, (currOr: Alternation) => {\n const currOccurrence = currOr.idx;\n const actualMaxLookahead = currOr.maxLookahead || globalMaxLookahead;\n const alternatives = getLookaheadPathsForOr(\n currOccurrence,\n topLevelRule,\n actualMaxLookahead,\n currOr,\n );\n const altsAmbiguityErrors = checkAlternativesAmbiguities(\n alternatives,\n currOr,\n topLevelRule,\n errMsgProvider,\n );\n const altsPrefixAmbiguityErrors = checkPrefixAlternativesAmbiguities(\n alternatives,\n currOr,\n topLevelRule,\n errMsgProvider,\n );\n\n return altsAmbiguityErrors.concat(altsPrefixAmbiguityErrors);\n });\n\n return errors;\n}\n\nexport class RepetitionCollector extends GAstVisitor {\n public allProductions: (IProductionWithOccurrence & {\n maxLookahead?: number;\n })[] = [];\n\n public visitRepetitionWithSeparator(manySep: RepetitionWithSeparator): void {\n this.allProductions.push(manySep);\n }\n\n public visitRepetitionMandatory(atLeastOne: RepetitionMandatory): void {\n this.allProductions.push(atLeastOne);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n atLeastOneSep: RepetitionMandatoryWithSeparator,\n ): void {\n this.allProductions.push(atLeastOneSep);\n }\n\n public visitRepetition(many: Repetition): void {\n this.allProductions.push(many);\n }\n}\n\nexport function validateTooManyAlts(\n topLevelRule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const orCollector = new OrCollector();\n topLevelRule.accept(orCollector);\n const ors = orCollector.alternations;\n\n const errors = flatMap(ors, (currOr) => {\n if (currOr.definition.length > 255) {\n return [\n {\n message: errMsgProvider.buildTooManyAlternativesError({\n topLevelRule: topLevelRule,\n alternation: currOr,\n }),\n type: ParserDefinitionErrorType.TOO_MANY_ALTS,\n ruleName: topLevelRule.name,\n occurrence: currOr.idx,\n },\n ];\n } else {\n return [];\n }\n });\n\n return errors;\n}\n\nexport function validateSomeNonEmptyLookaheadPath(\n topLevelRules: Rule[],\n maxLookahead: number,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const errors: IParserDefinitionError[] = [];\n forEach(topLevelRules, (currTopRule) => {\n const collectorVisitor = new RepetitionCollector();\n currTopRule.accept(collectorVisitor);\n const allRuleProductions = collectorVisitor.allProductions;\n forEach(allRuleProductions, (currProd) => {\n const prodType = getProdType(currProd);\n const actualMaxLookahead = currProd.maxLookahead || maxLookahead;\n const currOccurrence = currProd.idx;\n const paths = getLookaheadPathsForOptionalProd(\n currOccurrence,\n currTopRule,\n prodType,\n actualMaxLookahead,\n );\n const pathsInsideProduction = paths[0];\n if (isEmpty(flatten(pathsInsideProduction))) {\n const errMsg = errMsgProvider.buildEmptyRepetitionError({\n topLevelRule: currTopRule,\n repetition: currProd,\n });\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,\n ruleName: currTopRule.name,\n });\n }\n });\n });\n\n return errors;\n}\n\nexport interface IAmbiguityDescriptor {\n alts: number[];\n path: TokenType[];\n}\n\nfunction checkAlternativesAmbiguities(\n alternatives: Alternative[],\n alternation: Alternation,\n rule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserAmbiguousAlternativesDefinitionError[] {\n const foundAmbiguousPaths: Alternative = [];\n const identicalAmbiguities = reduce(\n alternatives,\n (result, currAlt, currAltIdx) => {\n // ignore (skip) ambiguities with this alternative\n if (alternation.definition[currAltIdx].ignoreAmbiguities === true) {\n return result;\n }\n\n forEach(currAlt, (currPath) => {\n const altsCurrPathAppearsIn = [currAltIdx];\n forEach(alternatives, (currOtherAlt, currOtherAltIdx) => {\n if (\n currAltIdx !== currOtherAltIdx &&\n containsPath(currOtherAlt, currPath) &&\n // ignore (skip) ambiguities with this \"other\" alternative\n alternation.definition[currOtherAltIdx].ignoreAmbiguities !== true\n ) {\n altsCurrPathAppearsIn.push(currOtherAltIdx);\n }\n });\n\n if (\n altsCurrPathAppearsIn.length > 1 &&\n !containsPath(foundAmbiguousPaths, currPath)\n ) {\n foundAmbiguousPaths.push(currPath);\n result.push({\n alts: altsCurrPathAppearsIn,\n path: currPath,\n });\n }\n });\n return result;\n },\n [] as { alts: number[]; path: TokenType[] }[],\n );\n\n const currErrors = map(identicalAmbiguities, (currAmbDescriptor) => {\n const ambgIndices = map(\n currAmbDescriptor.alts,\n (currAltIdx) => currAltIdx + 1,\n );\n\n const currMessage = errMsgProvider.buildAlternationAmbiguityError({\n topLevelRule: rule,\n alternation: alternation,\n ambiguityIndices: ambgIndices,\n prefixPath: currAmbDescriptor.path,\n });\n\n return {\n message: currMessage,\n type: ParserDefinitionErrorType.AMBIGUOUS_ALTS,\n ruleName: rule.name,\n occurrence: alternation.idx,\n alternatives: currAmbDescriptor.alts,\n };\n });\n\n return currErrors;\n}\n\nexport function checkPrefixAlternativesAmbiguities(\n alternatives: Alternative[],\n alternation: Alternation,\n rule: Rule,\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserAmbiguousAlternativesDefinitionError[] {\n // flatten\n const pathsAndIndices = reduce(\n alternatives,\n (result, currAlt, idx) => {\n const currPathsAndIdx = map(currAlt, (currPath) => {\n return { idx: idx, path: currPath };\n });\n return result.concat(currPathsAndIdx);\n },\n [] as { idx: number; path: TokenType[] }[],\n );\n\n const errors = compact(\n flatMap(pathsAndIndices, (currPathAndIdx) => {\n const alternativeGast = alternation.definition[currPathAndIdx.idx];\n // ignore (skip) ambiguities with this alternative\n if (alternativeGast.ignoreAmbiguities === true) {\n return [];\n }\n const targetIdx = currPathAndIdx.idx;\n const targetPath = currPathAndIdx.path;\n\n const prefixAmbiguitiesPathsAndIndices = filter(\n pathsAndIndices,\n (searchPathAndIdx) => {\n // prefix ambiguity can only be created from lower idx (higher priority) path\n return (\n // ignore (skip) ambiguities with this \"other\" alternative\n alternation.definition[searchPathAndIdx.idx].ignoreAmbiguities !==\n true &&\n searchPathAndIdx.idx < targetIdx &&\n // checking for strict prefix because identical lookaheads\n // will be be detected using a different validation.\n isStrictPrefixOfPath(searchPathAndIdx.path, targetPath)\n );\n },\n );\n\n const currPathPrefixErrors = map(\n prefixAmbiguitiesPathsAndIndices,\n (currAmbPathAndIdx): IParserAmbiguousAlternativesDefinitionError => {\n const ambgIndices = [currAmbPathAndIdx.idx + 1, targetIdx + 1];\n const occurrence = alternation.idx === 0 ? \"\" : alternation.idx;\n\n const message = errMsgProvider.buildAlternationPrefixAmbiguityError({\n topLevelRule: rule,\n alternation: alternation,\n ambiguityIndices: ambgIndices,\n prefixPath: currAmbPathAndIdx.path,\n });\n return {\n message: message,\n type: ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,\n ruleName: rule.name,\n occurrence: occurrence,\n alternatives: ambgIndices,\n };\n },\n );\n\n return currPathPrefixErrors;\n }),\n );\n\n return errors;\n}\n\nfunction checkTerminalAndNoneTerminalsNameSpace(\n topLevels: Rule[],\n tokenTypes: TokenType[],\n errMsgProvider: IGrammarValidatorErrorMessageProvider,\n): IParserDefinitionError[] {\n const errors: IParserDefinitionError[] = [];\n\n const tokenNames = map(tokenTypes, (currToken) => currToken.name);\n\n forEach(topLevels, (currRule) => {\n const currRuleName = currRule.name;\n if (includes(tokenNames, currRuleName)) {\n const errMsg = errMsgProvider.buildNamespaceConflictError(currRule);\n\n errors.push({\n message: errMsg,\n type: ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,\n ruleName: currRuleName,\n });\n }\n });\n\n return errors;\n}\n", "import { Rule } from \"@chevrotain/gast\";\nimport { defaults, forEach } from \"lodash-es\";\nimport { resolveGrammar as orgResolveGrammar } from \"../resolver.js\";\nimport { validateGrammar as orgValidateGrammar } from \"../checks.js\";\nimport {\n defaultGrammarResolverErrorProvider,\n defaultGrammarValidatorErrorProvider,\n} from \"../../errors_public.js\";\nimport { TokenType } from \"@chevrotain/types\";\nimport {\n IGrammarResolverErrorMessageProvider,\n IGrammarValidatorErrorMessageProvider,\n IParserDefinitionError,\n} from \"../types.js\";\n\ntype ResolveGrammarOpts = {\n rules: Rule[];\n errMsgProvider?: IGrammarResolverErrorMessageProvider;\n};\nexport function resolveGrammar(\n options: ResolveGrammarOpts,\n): IParserDefinitionError[] {\n const actualOptions: Required = defaults(options, {\n errMsgProvider: defaultGrammarResolverErrorProvider,\n });\n\n const topRulesTable: { [ruleName: string]: Rule } = {};\n forEach(options.rules, (rule) => {\n topRulesTable[rule.name] = rule;\n });\n return orgResolveGrammar(topRulesTable, actualOptions.errMsgProvider);\n}\n\nexport function validateGrammar(options: {\n rules: Rule[];\n tokenTypes: TokenType[];\n grammarName: string;\n errMsgProvider: IGrammarValidatorErrorMessageProvider;\n}): IParserDefinitionError[] {\n options = defaults(options, {\n errMsgProvider: defaultGrammarValidatorErrorProvider,\n });\n\n return orgValidateGrammar(\n options.rules,\n options.tokenTypes,\n options.errMsgProvider,\n options.grammarName,\n );\n}\n", "import { includes } from \"lodash-es\";\nimport {\n IRecognitionException,\n IRecognizerContext,\n IToken,\n} from \"@chevrotain/types\";\n\nconst MISMATCHED_TOKEN_EXCEPTION = \"MismatchedTokenException\";\nconst NO_VIABLE_ALT_EXCEPTION = \"NoViableAltException\";\nconst EARLY_EXIT_EXCEPTION = \"EarlyExitException\";\nconst NOT_ALL_INPUT_PARSED_EXCEPTION = \"NotAllInputParsedException\";\n\nconst RECOGNITION_EXCEPTION_NAMES = [\n MISMATCHED_TOKEN_EXCEPTION,\n NO_VIABLE_ALT_EXCEPTION,\n EARLY_EXIT_EXCEPTION,\n NOT_ALL_INPUT_PARSED_EXCEPTION,\n];\n\nObject.freeze(RECOGNITION_EXCEPTION_NAMES);\n\n// hacks to bypass no support for custom Errors in javascript/typescript\nexport function isRecognitionException(error: Error) {\n // can't do instanceof on hacked custom js exceptions\n return includes(RECOGNITION_EXCEPTION_NAMES, error.name);\n}\n\nabstract class RecognitionException\n extends Error\n implements IRecognitionException\n{\n context: IRecognizerContext;\n resyncedTokens: IToken[] = [];\n\n protected constructor(\n message: string,\n public token: IToken,\n ) {\n super(message);\n\n // fix prototype chain when typescript target is ES5\n Object.setPrototypeOf(this, new.target.prototype);\n\n /* istanbul ignore next - V8 workaround to remove constructor from stacktrace when typescript target is ES5 */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n\nexport class MismatchedTokenException extends RecognitionException {\n constructor(\n message: string,\n token: IToken,\n public previousToken: IToken,\n ) {\n super(message, token);\n this.name = MISMATCHED_TOKEN_EXCEPTION;\n }\n}\n\nexport class NoViableAltException extends RecognitionException {\n constructor(\n message: string,\n token: IToken,\n public previousToken: IToken,\n ) {\n super(message, token);\n this.name = NO_VIABLE_ALT_EXCEPTION;\n }\n}\n\nexport class NotAllInputParsedException extends RecognitionException {\n constructor(message: string, token: IToken) {\n super(message, token);\n this.name = NOT_ALL_INPUT_PARSED_EXCEPTION;\n }\n}\n\nexport class EarlyExitException extends RecognitionException {\n constructor(\n message: string,\n token: IToken,\n public previousToken: IToken,\n ) {\n super(message, token);\n this.name = EARLY_EXIT_EXCEPTION;\n }\n}\n", "import {\n createTokenInstance,\n EOF,\n tokenMatcher,\n} from \"../../../scan/tokens_public.js\";\nimport {\n AbstractNextTerminalAfterProductionWalker,\n IFirstAfterRepetition,\n} from \"../../grammar/interpreter.js\";\nimport {\n clone,\n dropRight,\n find,\n flatten,\n has,\n includes,\n isEmpty,\n map,\n} from \"lodash-es\";\nimport {\n IParserConfig,\n IToken,\n ITokenGrammarPath,\n TokenType,\n} from \"@chevrotain/types\";\nimport { MismatchedTokenException } from \"../../exceptions_public.js\";\nimport { IN } from \"../../constants.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\nexport const EOF_FOLLOW_KEY: any = {};\n\nexport interface IFollowKey {\n ruleName: string;\n idxInCallingRule: number;\n inRule: string;\n}\n\nexport const IN_RULE_RECOVERY_EXCEPTION = \"InRuleRecoveryException\";\n\nexport class InRuleRecoveryException extends Error {\n constructor(message: string) {\n super(message);\n this.name = IN_RULE_RECOVERY_EXCEPTION;\n }\n}\n\n/**\n * This trait is responsible for the error recovery and fault tolerant logic\n */\nexport class Recoverable {\n recoveryEnabled: boolean;\n firstAfterRepMap: Record;\n resyncFollows: Record;\n\n initRecoverable(config: IParserConfig) {\n this.firstAfterRepMap = {};\n this.resyncFollows = {};\n\n this.recoveryEnabled = has(config, \"recoveryEnabled\")\n ? (config.recoveryEnabled as boolean) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.recoveryEnabled;\n\n // performance optimization, NOOP will be inlined which\n // effectively means that this optional feature does not exist\n // when not used.\n if (this.recoveryEnabled) {\n this.attemptInRepetitionRecovery = attemptInRepetitionRecovery;\n }\n }\n\n public getTokenToInsert(tokType: TokenType): IToken {\n const tokToInsert = createTokenInstance(\n tokType,\n \"\",\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n );\n tokToInsert.isInsertedInRecovery = true;\n return tokToInsert;\n }\n\n public canTokenTypeBeInsertedInRecovery(tokType: TokenType): boolean {\n return true;\n }\n\n public canTokenTypeBeDeletedInRecovery(tokType: TokenType): boolean {\n return true;\n }\n\n tryInRepetitionRecovery(\n this: MixedInParser,\n grammarRule: Function,\n grammarRuleArgs: any[],\n lookAheadFunc: () => boolean,\n expectedTokType: TokenType,\n ): void {\n // TODO: can the resyncTokenType be cached?\n const reSyncTokType = this.findReSyncTokenType();\n const savedLexerState = this.exportLexerState();\n const resyncedTokens: IToken[] = [];\n let passedResyncPoint = false;\n\n const nextTokenWithoutResync = this.LA(1);\n let currToken = this.LA(1);\n\n const generateErrorMessage = () => {\n const previousToken = this.LA(0);\n // we are preemptively re-syncing before an error has been detected, therefor we must reproduce\n // the error that would have been thrown\n const msg = this.errorMessageProvider.buildMismatchTokenMessage({\n expected: expectedTokType,\n actual: nextTokenWithoutResync,\n previous: previousToken,\n ruleName: this.getCurrRuleFullName(),\n });\n const error = new MismatchedTokenException(\n msg,\n nextTokenWithoutResync,\n this.LA(0),\n );\n // the first token here will be the original cause of the error, this is not part of the resyncedTokens property.\n error.resyncedTokens = dropRight(resyncedTokens);\n this.SAVE_ERROR(error);\n };\n\n while (!passedResyncPoint) {\n // re-synced to a point where we can safely exit the repetition/\n if (this.tokenMatcher(currToken, expectedTokType)) {\n generateErrorMessage();\n return; // must return here to avoid reverting the inputIdx\n } else if (lookAheadFunc.call(this)) {\n // we skipped enough tokens so we can resync right back into another iteration of the repetition grammar rule\n generateErrorMessage();\n // recursive invocation in other to support multiple re-syncs in the same top level repetition grammar rule\n grammarRule.apply(this, grammarRuleArgs);\n return; // must return here to avoid reverting the inputIdx\n } else if (this.tokenMatcher(currToken, reSyncTokType)) {\n passedResyncPoint = true;\n } else {\n currToken = this.SKIP_TOKEN();\n this.addToResyncTokens(currToken, resyncedTokens);\n }\n }\n\n // we were unable to find a CLOSER point to resync inside the Repetition, reset the state.\n // The parsing exception we were trying to prevent will happen in the NEXT parsing step. it may be handled by\n // \"between rules\" resync recovery later in the flow.\n this.importLexerState(savedLexerState);\n }\n\n shouldInRepetitionRecoveryBeTried(\n this: MixedInParser,\n expectTokAfterLastMatch: TokenType,\n nextTokIdx: number,\n notStuck: boolean | undefined,\n ): boolean {\n // Edge case of arriving from a MANY repetition which is stuck\n // Attempting recovery in this case could cause an infinite loop\n if (notStuck === false) {\n return false;\n }\n\n // no need to recover, next token is what we expect...\n if (this.tokenMatcher(this.LA(1), expectTokAfterLastMatch)) {\n return false;\n }\n\n // error recovery is disabled during backtracking as it can make the parser ignore a valid grammar path\n // and prefer some backtracking path that includes recovered errors.\n if (this.isBackTracking()) {\n return false;\n }\n\n // if we can perform inRule recovery (single token insertion or deletion) we always prefer that recovery algorithm\n // because if it works, it makes the least amount of changes to the input stream (greedy algorithm)\n //noinspection RedundantIfStatementJS\n if (\n this.canPerformInRuleRecovery(\n expectTokAfterLastMatch,\n this.getFollowsForInRuleRecovery(expectTokAfterLastMatch, nextTokIdx),\n )\n ) {\n return false;\n }\n\n return true;\n }\n\n // Error Recovery functionality\n getFollowsForInRuleRecovery(\n this: MixedInParser,\n tokType: TokenType,\n tokIdxInRule: number,\n ): TokenType[] {\n const grammarPath = this.getCurrentGrammarPath(tokType, tokIdxInRule);\n const follows = this.getNextPossibleTokenTypes(grammarPath);\n return follows;\n }\n\n tryInRuleRecovery(\n this: MixedInParser,\n expectedTokType: TokenType,\n follows: TokenType[],\n ): IToken {\n if (this.canRecoverWithSingleTokenInsertion(expectedTokType, follows)) {\n const tokToInsert = this.getTokenToInsert(expectedTokType);\n return tokToInsert;\n }\n\n if (this.canRecoverWithSingleTokenDeletion(expectedTokType)) {\n const nextTok = this.SKIP_TOKEN();\n this.consumeToken();\n return nextTok;\n }\n\n throw new InRuleRecoveryException(\"sad sad panda\");\n }\n\n canPerformInRuleRecovery(\n this: MixedInParser,\n expectedToken: TokenType,\n follows: TokenType[],\n ): boolean {\n return (\n this.canRecoverWithSingleTokenInsertion(expectedToken, follows) ||\n this.canRecoverWithSingleTokenDeletion(expectedToken)\n );\n }\n\n canRecoverWithSingleTokenInsertion(\n this: MixedInParser,\n expectedTokType: TokenType,\n follows: TokenType[],\n ): boolean {\n if (!this.canTokenTypeBeInsertedInRecovery(expectedTokType)) {\n return false;\n }\n\n // must know the possible following tokens to perform single token insertion\n if (isEmpty(follows)) {\n return false;\n }\n\n const mismatchedTok = this.LA(1);\n const isMisMatchedTokInFollows =\n find(follows, (possibleFollowsTokType: TokenType) => {\n return this.tokenMatcher(mismatchedTok, possibleFollowsTokType);\n }) !== undefined;\n\n return isMisMatchedTokInFollows;\n }\n\n canRecoverWithSingleTokenDeletion(\n this: MixedInParser,\n expectedTokType: TokenType,\n ): boolean {\n if (!this.canTokenTypeBeDeletedInRecovery(expectedTokType)) {\n return false;\n }\n\n const isNextTokenWhatIsExpected = this.tokenMatcher(\n this.LA(2),\n expectedTokType,\n );\n return isNextTokenWhatIsExpected;\n }\n\n isInCurrentRuleReSyncSet(\n this: MixedInParser,\n tokenTypeIdx: TokenType,\n ): boolean {\n const followKey = this.getCurrFollowKey();\n const currentRuleReSyncSet = this.getFollowSetFromFollowKey(followKey);\n return includes(currentRuleReSyncSet, tokenTypeIdx);\n }\n\n findReSyncTokenType(this: MixedInParser): TokenType {\n const allPossibleReSyncTokTypes = this.flattenFollowSet();\n // this loop will always terminate as EOF is always in the follow stack and also always (virtually) in the input\n let nextToken = this.LA(1);\n let k = 2;\n while (true) {\n const foundMatch = find(allPossibleReSyncTokTypes, (resyncTokType) => {\n const canMatch = tokenMatcher(nextToken, resyncTokType);\n return canMatch;\n });\n if (foundMatch !== undefined) {\n return foundMatch;\n }\n nextToken = this.LA(k);\n k++;\n }\n }\n\n getCurrFollowKey(this: MixedInParser): IFollowKey {\n // the length is at least one as we always add the ruleName to the stack before invoking the rule.\n if (this.RULE_STACK.length === 1) {\n return EOF_FOLLOW_KEY;\n }\n const currRuleShortName = this.getLastExplicitRuleShortName();\n const currRuleIdx = this.getLastExplicitRuleOccurrenceIndex();\n const prevRuleShortName = this.getPreviousExplicitRuleShortName();\n\n return {\n ruleName: this.shortRuleNameToFullName(currRuleShortName),\n idxInCallingRule: currRuleIdx,\n inRule: this.shortRuleNameToFullName(prevRuleShortName),\n };\n }\n\n buildFullFollowKeyStack(this: MixedInParser): IFollowKey[] {\n const explicitRuleStack = this.RULE_STACK;\n const explicitOccurrenceStack = this.RULE_OCCURRENCE_STACK;\n\n return map(explicitRuleStack, (ruleName, idx) => {\n if (idx === 0) {\n return EOF_FOLLOW_KEY;\n }\n return {\n ruleName: this.shortRuleNameToFullName(ruleName),\n idxInCallingRule: explicitOccurrenceStack[idx],\n inRule: this.shortRuleNameToFullName(explicitRuleStack[idx - 1]),\n };\n });\n }\n\n flattenFollowSet(this: MixedInParser): TokenType[] {\n const followStack = map(this.buildFullFollowKeyStack(), (currKey) => {\n return this.getFollowSetFromFollowKey(currKey);\n });\n return flatten(followStack);\n }\n\n getFollowSetFromFollowKey(\n this: MixedInParser,\n followKey: IFollowKey,\n ): TokenType[] {\n if (followKey === EOF_FOLLOW_KEY) {\n return [EOF];\n }\n\n const followName =\n followKey.ruleName + followKey.idxInCallingRule + IN + followKey.inRule;\n\n return this.resyncFollows[followName];\n }\n\n // It does not make any sense to include a virtual EOF token in the list of resynced tokens\n // as EOF does not really exist and thus does not contain any useful information (line/column numbers)\n addToResyncTokens(\n this: MixedInParser,\n token: IToken,\n resyncTokens: IToken[],\n ): IToken[] {\n if (!this.tokenMatcher(token, EOF)) {\n resyncTokens.push(token);\n }\n return resyncTokens;\n }\n\n reSyncTo(this: MixedInParser, tokType: TokenType): IToken[] {\n const resyncedTokens: IToken[] = [];\n let nextTok = this.LA(1);\n while (this.tokenMatcher(nextTok, tokType) === false) {\n nextTok = this.SKIP_TOKEN();\n this.addToResyncTokens(nextTok, resyncedTokens);\n }\n // the last token is not part of the error.\n return dropRight(resyncedTokens);\n }\n\n attemptInRepetitionRecovery(\n this: MixedInParser,\n prodFunc: Function,\n args: any[],\n lookaheadFunc: () => boolean,\n dslMethodIdx: number,\n prodOccurrence: number,\n nextToksWalker: typeof AbstractNextTerminalAfterProductionWalker,\n notStuck?: boolean,\n ): void {\n // by default this is a NO-OP\n // The actual implementation is with the function(not method) below\n }\n\n getCurrentGrammarPath(\n this: MixedInParser,\n tokType: TokenType,\n tokIdxInRule: number,\n ): ITokenGrammarPath {\n const pathRuleStack: string[] = this.getHumanReadableRuleStack();\n const pathOccurrenceStack: number[] = clone(this.RULE_OCCURRENCE_STACK);\n const grammarPath: any = {\n ruleStack: pathRuleStack,\n occurrenceStack: pathOccurrenceStack,\n lastTok: tokType,\n lastTokOccurrence: tokIdxInRule,\n };\n\n return grammarPath;\n }\n getHumanReadableRuleStack(this: MixedInParser): string[] {\n return map(this.RULE_STACK, (currShortName) =>\n this.shortRuleNameToFullName(currShortName),\n );\n }\n}\n\nexport function attemptInRepetitionRecovery(\n this: MixedInParser,\n prodFunc: Function,\n args: any[],\n lookaheadFunc: () => boolean,\n dslMethodIdx: number,\n prodOccurrence: number,\n nextToksWalker: typeof AbstractNextTerminalAfterProductionWalker,\n notStuck?: boolean,\n): void {\n const key = this.getKeyForAutomaticLookahead(dslMethodIdx, prodOccurrence);\n let firstAfterRepInfo = this.firstAfterRepMap[key];\n if (firstAfterRepInfo === undefined) {\n const currRuleName = this.getCurrRuleFullName();\n const ruleGrammar = this.getGAstProductions()[currRuleName];\n const walker: AbstractNextTerminalAfterProductionWalker =\n new nextToksWalker(ruleGrammar, prodOccurrence);\n firstAfterRepInfo = walker.startWalking();\n this.firstAfterRepMap[key] = firstAfterRepInfo;\n }\n\n let expectTokAfterLastMatch = firstAfterRepInfo.token;\n let nextTokIdx = firstAfterRepInfo.occurrence;\n const isEndOfRule = firstAfterRepInfo.isEndOfRule;\n\n // special edge case of a TOP most repetition after which the input should END.\n // this will force an attempt for inRule recovery in that scenario.\n if (\n this.RULE_STACK.length === 1 &&\n isEndOfRule &&\n expectTokAfterLastMatch === undefined\n ) {\n expectTokAfterLastMatch = EOF;\n nextTokIdx = 1;\n }\n\n // We don't have anything to re-sync to...\n // this condition was extracted from `shouldInRepetitionRecoveryBeTried` to act as a type-guard\n if (expectTokAfterLastMatch === undefined || nextTokIdx === undefined) {\n return;\n }\n\n if (\n this.shouldInRepetitionRecoveryBeTried(\n expectTokAfterLastMatch,\n nextTokIdx,\n notStuck,\n )\n ) {\n // TODO: performance optimization: instead of passing the original args here, we modify\n // the args param (or create a new one) and make sure the lookahead func is explicitly provided\n // to avoid searching the cache for it once more.\n this.tryInRepetitionRecovery(\n prodFunc,\n args,\n lookaheadFunc,\n expectTokAfterLastMatch,\n );\n }\n}\n", "// Lookahead keys are 32Bit integers in the form\n// TTTTTTTT-ZZZZZZZZZZZZ-YYYY-XXXXXXXX\n// XXXX -> Occurrence Index bitmap.\n// YYYY -> DSL Method Type bitmap.\n// ZZZZZZZZZZZZZZZ -> Rule short Index bitmap.\n// TTTTTTTTT -> alternation alternative index bitmap\n\nexport const BITS_FOR_METHOD_TYPE = 4;\nexport const BITS_FOR_OCCURRENCE_IDX = 8;\nexport const BITS_FOR_RULE_IDX = 12;\n// TODO: validation, this means that there may at most 2^8 --> 256 alternatives for an alternation.\nexport const BITS_FOR_ALT_IDX = 8;\n\n// short string used as part of mapping keys.\n// being short improves the performance when composing KEYS for maps out of these\n// The 5 - 8 bits (16 possible values, are reserved for the DSL method indices)\nexport const OR_IDX = 1 << BITS_FOR_OCCURRENCE_IDX;\nexport const OPTION_IDX = 2 << BITS_FOR_OCCURRENCE_IDX;\nexport const MANY_IDX = 3 << BITS_FOR_OCCURRENCE_IDX;\nexport const AT_LEAST_ONE_IDX = 4 << BITS_FOR_OCCURRENCE_IDX;\nexport const MANY_SEP_IDX = 5 << BITS_FOR_OCCURRENCE_IDX;\nexport const AT_LEAST_ONE_SEP_IDX = 6 << BITS_FOR_OCCURRENCE_IDX;\n\n// this actually returns a number, but it is always used as a string (object prop key)\nexport function getKeyForAutomaticLookahead(\n ruleIdx: number,\n dslMethodIdx: number,\n occurrence: number,\n): number {\n return occurrence | dslMethodIdx | ruleIdx;\n}\n\nconst BITS_START_FOR_ALT_IDX = 32 - BITS_FOR_ALT_IDX;\n", "import {\n ILookaheadStrategy,\n ILookaheadValidationError,\n IOrAlt,\n OptionalProductionType,\n Rule,\n TokenType,\n} from \"@chevrotain/types\";\nimport { flatMap, isEmpty } from \"lodash-es\";\nimport { defaultGrammarValidatorErrorProvider } from \"../errors_public.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser/parser.js\";\nimport {\n validateAmbiguousAlternationAlternatives,\n validateEmptyOrAlternative,\n validateNoLeftRecursion,\n validateSomeNonEmptyLookaheadPath,\n} from \"./checks.js\";\nimport {\n buildAlternativesLookAheadFunc,\n buildLookaheadFuncForOptionalProd,\n buildLookaheadFuncForOr,\n buildSingleAlternativeLookaheadFunction,\n getProdType,\n} from \"./lookahead.js\";\nimport { IParserDefinitionError } from \"./types.js\";\n\nexport class LLkLookaheadStrategy implements ILookaheadStrategy {\n readonly maxLookahead: number;\n\n constructor(options?: { maxLookahead?: number }) {\n this.maxLookahead =\n options?.maxLookahead ?? DEFAULT_PARSER_CONFIG.maxLookahead;\n }\n\n validate(options: {\n rules: Rule[];\n tokenTypes: TokenType[];\n grammarName: string;\n }): ILookaheadValidationError[] {\n const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);\n\n if (isEmpty(leftRecursionErrors)) {\n const emptyAltErrors = this.validateEmptyOrAlternatives(options.rules);\n const ambiguousAltsErrors = this.validateAmbiguousAlternationAlternatives(\n options.rules,\n this.maxLookahead,\n );\n const emptyRepetitionErrors = this.validateSomeNonEmptyLookaheadPath(\n options.rules,\n this.maxLookahead,\n );\n const allErrors = [\n ...leftRecursionErrors,\n ...emptyAltErrors,\n ...ambiguousAltsErrors,\n ...emptyRepetitionErrors,\n ];\n return allErrors;\n }\n return leftRecursionErrors;\n }\n\n validateNoLeftRecursion(rules: Rule[]): IParserDefinitionError[] {\n return flatMap(rules, (currTopRule) =>\n validateNoLeftRecursion(\n currTopRule,\n currTopRule,\n defaultGrammarValidatorErrorProvider,\n ),\n );\n }\n\n validateEmptyOrAlternatives(rules: Rule[]): IParserDefinitionError[] {\n return flatMap(rules, (currTopRule) =>\n validateEmptyOrAlternative(\n currTopRule,\n defaultGrammarValidatorErrorProvider,\n ),\n );\n }\n\n validateAmbiguousAlternationAlternatives(\n rules: Rule[],\n maxLookahead: number,\n ): IParserDefinitionError[] {\n return flatMap(rules, (currTopRule) =>\n validateAmbiguousAlternationAlternatives(\n currTopRule,\n maxLookahead,\n defaultGrammarValidatorErrorProvider,\n ),\n );\n }\n\n validateSomeNonEmptyLookaheadPath(\n rules: Rule[],\n maxLookahead: number,\n ): IParserDefinitionError[] {\n return validateSomeNonEmptyLookaheadPath(\n rules,\n maxLookahead,\n defaultGrammarValidatorErrorProvider,\n );\n }\n\n buildLookaheadForAlternation(options: {\n prodOccurrence: number;\n rule: Rule;\n maxLookahead: number;\n hasPredicates: boolean;\n dynamicTokensEnabled: boolean;\n }): (orAlts?: IOrAlt[] | undefined) => number | undefined {\n return buildLookaheadFuncForOr(\n options.prodOccurrence,\n options.rule,\n options.maxLookahead,\n options.hasPredicates,\n options.dynamicTokensEnabled,\n buildAlternativesLookAheadFunc,\n );\n }\n\n buildLookaheadForOptional(options: {\n prodOccurrence: number;\n prodType: OptionalProductionType;\n rule: Rule;\n maxLookahead: number;\n dynamicTokensEnabled: boolean;\n }): () => boolean {\n return buildLookaheadFuncForOptionalProd(\n options.prodOccurrence,\n options.rule,\n options.maxLookahead,\n options.dynamicTokensEnabled,\n getProdType(options.prodType),\n buildSingleAlternativeLookaheadFunction,\n );\n }\n}\n", "import { forEach, has } from \"lodash-es\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\nimport {\n ILookaheadStrategy,\n IParserConfig,\n OptionalProductionType,\n} from \"@chevrotain/types\";\nimport {\n AT_LEAST_ONE_IDX,\n AT_LEAST_ONE_SEP_IDX,\n getKeyForAutomaticLookahead,\n MANY_IDX,\n MANY_SEP_IDX,\n OPTION_IDX,\n OR_IDX,\n} from \"../../grammar/keys.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport {\n Alternation,\n GAstVisitor,\n getProductionDslName,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n} from \"@chevrotain/gast\";\nimport { LLkLookaheadStrategy } from \"../../grammar/llk_lookahead.js\";\n\n/**\n * Trait responsible for the lookahead related utilities and optimizations.\n */\nexport class LooksAhead {\n maxLookahead: number;\n lookAheadFuncsCache: any;\n dynamicTokensEnabled: boolean;\n lookaheadStrategy: ILookaheadStrategy;\n\n initLooksAhead(config: IParserConfig) {\n this.dynamicTokensEnabled = has(config, \"dynamicTokensEnabled\")\n ? (config.dynamicTokensEnabled as boolean) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.dynamicTokensEnabled;\n\n this.maxLookahead = has(config, \"maxLookahead\")\n ? (config.maxLookahead as number) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.maxLookahead;\n\n this.lookaheadStrategy = has(config, \"lookaheadStrategy\")\n ? (config.lookaheadStrategy as ILookaheadStrategy) // assumes end user provides the correct config value/type\n : new LLkLookaheadStrategy({ maxLookahead: this.maxLookahead });\n\n this.lookAheadFuncsCache = new Map();\n }\n\n preComputeLookaheadFunctions(this: MixedInParser, rules: Rule[]): void {\n forEach(rules, (currRule) => {\n this.TRACE_INIT(`${currRule.name} Rule Lookahead`, () => {\n const {\n alternation,\n repetition,\n option,\n repetitionMandatory,\n repetitionMandatoryWithSeparator,\n repetitionWithSeparator,\n } = collectMethods(currRule);\n\n forEach(alternation, (currProd) => {\n const prodIdx = currProd.idx === 0 ? \"\" : currProd.idx;\n this.TRACE_INIT(`${getProductionDslName(currProd)}${prodIdx}`, () => {\n const laFunc = this.lookaheadStrategy.buildLookaheadForAlternation({\n prodOccurrence: currProd.idx,\n rule: currRule,\n maxLookahead: currProd.maxLookahead || this.maxLookahead,\n hasPredicates: currProd.hasPredicates,\n dynamicTokensEnabled: this.dynamicTokensEnabled,\n });\n\n const key = getKeyForAutomaticLookahead(\n this.fullRuleNameToShort[currRule.name],\n OR_IDX,\n currProd.idx,\n );\n this.setLaFuncCache(key, laFunc);\n });\n });\n\n forEach(repetition, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n MANY_IDX,\n \"Repetition\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(option, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n OPTION_IDX,\n \"Option\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(repetitionMandatory, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n AT_LEAST_ONE_IDX,\n \"RepetitionMandatory\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(repetitionMandatoryWithSeparator, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n AT_LEAST_ONE_SEP_IDX,\n \"RepetitionMandatoryWithSeparator\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n\n forEach(repetitionWithSeparator, (currProd) => {\n this.computeLookaheadFunc(\n currRule,\n currProd.idx,\n MANY_SEP_IDX,\n \"RepetitionWithSeparator\",\n currProd.maxLookahead,\n getProductionDslName(currProd),\n );\n });\n });\n });\n }\n\n computeLookaheadFunc(\n this: MixedInParser,\n rule: Rule,\n prodOccurrence: number,\n prodKey: number,\n prodType: OptionalProductionType,\n prodMaxLookahead: number | undefined,\n dslMethodName: string,\n ): void {\n this.TRACE_INIT(\n `${dslMethodName}${prodOccurrence === 0 ? \"\" : prodOccurrence}`,\n () => {\n const laFunc = this.lookaheadStrategy.buildLookaheadForOptional({\n prodOccurrence,\n rule,\n maxLookahead: prodMaxLookahead || this.maxLookahead,\n dynamicTokensEnabled: this.dynamicTokensEnabled,\n prodType,\n });\n const key = getKeyForAutomaticLookahead(\n this.fullRuleNameToShort[rule.name],\n prodKey,\n prodOccurrence,\n );\n this.setLaFuncCache(key, laFunc);\n },\n );\n }\n\n // this actually returns a number, but it is always used as a string (object prop key)\n getKeyForAutomaticLookahead(\n this: MixedInParser,\n dslMethodIdx: number,\n occurrence: number,\n ): number {\n const currRuleShortName: any = this.getLastExplicitRuleShortName();\n return getKeyForAutomaticLookahead(\n currRuleShortName,\n dslMethodIdx,\n occurrence,\n );\n }\n\n getLaFuncFromCache(this: MixedInParser, key: number): Function {\n return this.lookAheadFuncsCache.get(key);\n }\n\n /* istanbul ignore next */\n setLaFuncCache(this: MixedInParser, key: number, value: Function): void {\n this.lookAheadFuncsCache.set(key, value);\n }\n}\n\nclass DslMethodsCollectorVisitor extends GAstVisitor {\n public dslMethods: {\n option: Option[];\n alternation: Alternation[];\n repetition: Repetition[];\n repetitionWithSeparator: RepetitionWithSeparator[];\n repetitionMandatory: RepetitionMandatory[];\n repetitionMandatoryWithSeparator: RepetitionMandatoryWithSeparator[];\n } = {\n option: [],\n alternation: [],\n repetition: [],\n repetitionWithSeparator: [],\n repetitionMandatory: [],\n repetitionMandatoryWithSeparator: [],\n };\n\n reset() {\n this.dslMethods = {\n option: [],\n alternation: [],\n repetition: [],\n repetitionWithSeparator: [],\n repetitionMandatory: [],\n repetitionMandatoryWithSeparator: [],\n };\n }\n\n public visitOption(option: Option): void {\n this.dslMethods.option.push(option);\n }\n\n public visitRepetitionWithSeparator(manySep: RepetitionWithSeparator): void {\n this.dslMethods.repetitionWithSeparator.push(manySep);\n }\n\n public visitRepetitionMandatory(atLeastOne: RepetitionMandatory): void {\n this.dslMethods.repetitionMandatory.push(atLeastOne);\n }\n\n public visitRepetitionMandatoryWithSeparator(\n atLeastOneSep: RepetitionMandatoryWithSeparator,\n ): void {\n this.dslMethods.repetitionMandatoryWithSeparator.push(atLeastOneSep);\n }\n\n public visitRepetition(many: Repetition): void {\n this.dslMethods.repetition.push(many);\n }\n\n public visitAlternation(or: Alternation): void {\n this.dslMethods.alternation.push(or);\n }\n}\n\nconst collectorVisitor = new DslMethodsCollectorVisitor();\nexport function collectMethods(rule: Rule): {\n option: Option[];\n alternation: Alternation[];\n repetition: Repetition[];\n repetitionWithSeparator: RepetitionWithSeparator[];\n repetitionMandatory: RepetitionMandatory[];\n repetitionMandatoryWithSeparator: RepetitionMandatoryWithSeparator[];\n} {\n collectorVisitor.reset();\n rule.accept(collectorVisitor);\n const dslMethods = collectorVisitor.dslMethods;\n // avoid uncleaned references\n collectorVisitor.reset();\n return dslMethods;\n}\n", "import { CstNode, CstNodeLocation, IToken } from \"@chevrotain/types\";\n\n/**\n * This nodeLocation tracking is not efficient and should only be used\n * when error recovery is enabled or the Token Vector contains virtual Tokens\n * (e.g, Python Indent/Outdent)\n * As it executes the calculation for every single terminal/nonTerminal\n * and does not rely on the fact the token vector is **sorted**\n */\nexport function setNodeLocationOnlyOffset(\n currNodeLocation: CstNodeLocation,\n newLocationInfo: Required>,\n): void {\n // First (valid) update for this cst node\n if (isNaN(currNodeLocation.startOffset) === true) {\n // assumption1: Token location information is either NaN or a valid number\n // assumption2: Token location information is fully valid if it exist\n // (both start/end offsets exist and are numbers).\n currNodeLocation.startOffset = newLocationInfo.startOffset;\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n }\n // Once the startOffset has been updated with a valid number it should never receive\n // any farther updates as the Token vector is sorted.\n // We still have to check this this condition for every new possible location info\n // because with error recovery enabled we may encounter invalid tokens (NaN location props)\n else if (currNodeLocation.endOffset! < newLocationInfo.endOffset === true) {\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n }\n}\n\n/**\n * This nodeLocation tracking is not efficient and should only be used\n * when error recovery is enabled or the Token Vector contains virtual Tokens\n * (e.g, Python Indent/Outdent)\n * As it executes the calculation for every single terminal/nonTerminal\n * and does not rely on the fact the token vector is **sorted**\n */\nexport function setNodeLocationFull(\n currNodeLocation: CstNodeLocation,\n newLocationInfo: CstNodeLocation,\n): void {\n // First (valid) update for this cst node\n if (isNaN(currNodeLocation.startOffset) === true) {\n // assumption1: Token location information is either NaN or a valid number\n // assumption2: Token location information is fully valid if it exist\n // (all start/end props exist and are numbers).\n currNodeLocation.startOffset = newLocationInfo.startOffset;\n currNodeLocation.startColumn = newLocationInfo.startColumn;\n currNodeLocation.startLine = newLocationInfo.startLine;\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n currNodeLocation.endColumn = newLocationInfo.endColumn;\n currNodeLocation.endLine = newLocationInfo.endLine;\n }\n // Once the start props has been updated with a valid number it should never receive\n // any farther updates as the Token vector is sorted.\n // We still have to check this this condition for every new possible location info\n // because with error recovery enabled we may encounter invalid tokens (NaN location props)\n else if (currNodeLocation.endOffset! < newLocationInfo.endOffset! === true) {\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n currNodeLocation.endColumn = newLocationInfo.endColumn;\n currNodeLocation.endLine = newLocationInfo.endLine;\n }\n}\n\nexport function addTerminalToCst(\n node: CstNode,\n token: IToken,\n tokenTypeName: string,\n): void {\n if (node.children[tokenTypeName] === undefined) {\n node.children[tokenTypeName] = [token];\n } else {\n node.children[tokenTypeName].push(token);\n }\n}\n\nexport function addNoneTerminalToCst(\n node: CstNode,\n ruleName: string,\n ruleResult: any,\n): void {\n if (node.children[ruleName] === undefined) {\n node.children[ruleName] = [ruleResult];\n } else {\n node.children[ruleName].push(ruleResult);\n }\n}\n", "const NAME = \"name\";\n\nexport function defineNameProp(obj: {}, nameValue: string): void {\n Object.defineProperty(obj, NAME, {\n enumerable: false,\n configurable: true,\n writable: false,\n value: nameValue,\n });\n}\n", "import {\n compact,\n filter,\n forEach,\n isArray,\n isEmpty,\n isFunction,\n isUndefined,\n keys,\n map,\n} from \"lodash-es\";\nimport { defineNameProp } from \"../../lang/lang_extensions.js\";\nimport { CstNode, ICstVisitor } from \"@chevrotain/types\";\n\nexport function defaultVisit(ctx: any, param: IN): void {\n const childrenNames = keys(ctx);\n const childrenNamesLength = childrenNames.length;\n for (let i = 0; i < childrenNamesLength; i++) {\n const currChildName = childrenNames[i];\n const currChildArray = ctx[currChildName];\n const currChildArrayLength = currChildArray.length;\n for (let j = 0; j < currChildArrayLength; j++) {\n const currChild: any = currChildArray[j];\n // distinction between Tokens Children and CstNode children\n if (currChild.tokenTypeIdx === undefined) {\n this[currChild.name](currChild.children, param);\n }\n }\n }\n // defaultVisit does not support generic out param\n}\n\nexport function createBaseSemanticVisitorConstructor(\n grammarName: string,\n ruleNames: string[],\n): {\n new (...args: any[]): ICstVisitor;\n} {\n const derivedConstructor: any = function () {};\n\n // can be overwritten according to:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/\n // name?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fname\n defineNameProp(derivedConstructor, grammarName + \"BaseSemantics\");\n\n const semanticProto = {\n visit: function (cstNode: CstNode | CstNode[], param: any) {\n // enables writing more concise visitor methods when CstNode has only a single child\n if (isArray(cstNode)) {\n // A CST Node's children dictionary can never have empty arrays as values\n // If a key is defined there will be at least one element in the corresponding value array.\n cstNode = cstNode[0];\n }\n\n // enables passing optional CstNodes concisely.\n if (isUndefined(cstNode)) {\n return undefined;\n }\n\n return this[cstNode.name](cstNode.children, param);\n },\n\n validateVisitor: function () {\n const semanticDefinitionErrors = validateVisitor(this, ruleNames);\n if (!isEmpty(semanticDefinitionErrors)) {\n const errorMessages = map(\n semanticDefinitionErrors,\n (currDefError) => currDefError.msg,\n );\n throw Error(\n `Errors Detected in CST Visitor <${this.constructor.name}>:\\n\\t` +\n `${errorMessages.join(\"\\n\\n\").replace(/\\n/g, \"\\n\\t\")}`,\n );\n }\n },\n };\n\n derivedConstructor.prototype = semanticProto;\n derivedConstructor.prototype.constructor = derivedConstructor;\n\n derivedConstructor._RULE_NAMES = ruleNames;\n\n return derivedConstructor;\n}\n\nexport function createBaseVisitorConstructorWithDefaults(\n grammarName: string,\n ruleNames: string[],\n baseConstructor: Function,\n): {\n new (...args: any[]): ICstVisitor;\n} {\n const derivedConstructor: any = function () {};\n\n // can be overwritten according to:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/\n // name?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FFunction%2Fname\n defineNameProp(derivedConstructor, grammarName + \"BaseSemanticsWithDefaults\");\n\n const withDefaultsProto = Object.create(baseConstructor.prototype);\n forEach(ruleNames, (ruleName) => {\n withDefaultsProto[ruleName] = defaultVisit;\n });\n\n derivedConstructor.prototype = withDefaultsProto;\n derivedConstructor.prototype.constructor = derivedConstructor;\n\n return derivedConstructor;\n}\n\nexport enum CstVisitorDefinitionError {\n REDUNDANT_METHOD,\n MISSING_METHOD,\n}\n\nexport interface IVisitorDefinitionError {\n msg: string;\n type: CstVisitorDefinitionError;\n methodName: string;\n}\n\nexport function validateVisitor(\n visitorInstance: ICstVisitor,\n ruleNames: string[],\n): IVisitorDefinitionError[] {\n const missingErrors = validateMissingCstMethods(visitorInstance, ruleNames);\n\n return missingErrors;\n}\n\nexport function validateMissingCstMethods(\n visitorInstance: ICstVisitor,\n ruleNames: string[],\n): IVisitorDefinitionError[] {\n const missingRuleNames = filter(ruleNames, (currRuleName) => {\n return isFunction((visitorInstance as any)[currRuleName]) === false;\n });\n\n const errors: IVisitorDefinitionError[] = map(\n missingRuleNames,\n (currRuleName) => {\n return {\n msg: `Missing visitor method: <${currRuleName}> on ${(\n visitorInstance.constructor.name\n )} CST Visitor.`,\n type: CstVisitorDefinitionError.MISSING_METHOD,\n methodName: currRuleName,\n };\n },\n );\n\n return compact(errors);\n}\n", "import {\n addNoneTerminalToCst,\n addTerminalToCst,\n setNodeLocationFull,\n setNodeLocationOnlyOffset,\n} from \"../../cst/cst.js\";\nimport { has, isUndefined, keys, noop } from \"lodash-es\";\nimport {\n createBaseSemanticVisitorConstructor,\n createBaseVisitorConstructorWithDefaults,\n} from \"../../cst/cst_visitor.js\";\nimport {\n CstNode,\n CstNodeLocation,\n ICstVisitor,\n IParserConfig,\n IToken,\n nodeLocationTrackingOptions,\n} from \"@chevrotain/types\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\n/**\n * This trait is responsible for the CST building logic.\n */\nexport class TreeBuilder {\n outputCst: boolean;\n CST_STACK: CstNode[];\n baseCstVisitorConstructor: Function;\n baseCstVisitorWithDefaultsConstructor: Function;\n\n // dynamically assigned Methods\n setNodeLocationFromNode: (\n nodeLocation: CstNodeLocation,\n locationInformation: CstNodeLocation,\n ) => void;\n setNodeLocationFromToken: (\n nodeLocation: CstNodeLocation,\n locationInformation: CstNodeLocation,\n ) => void;\n cstPostRule: (this: MixedInParser, ruleCstNode: CstNode) => void;\n\n setInitialNodeLocation: (cstNode: CstNode) => void;\n nodeLocationTracking: nodeLocationTrackingOptions;\n\n initTreeBuilder(this: MixedInParser, config: IParserConfig) {\n this.CST_STACK = [];\n\n // outputCst is no longer exposed/defined in the pubic API\n this.outputCst = (config as any).outputCst;\n\n this.nodeLocationTracking = has(config, \"nodeLocationTracking\")\n ? (config.nodeLocationTracking as nodeLocationTrackingOptions) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.nodeLocationTracking;\n\n if (!this.outputCst) {\n this.cstInvocationStateUpdate = noop;\n this.cstFinallyStateUpdate = noop;\n this.cstPostTerminal = noop;\n this.cstPostNonTerminal = noop;\n this.cstPostRule = noop;\n } else {\n if (/full/i.test(this.nodeLocationTracking)) {\n if (this.recoveryEnabled) {\n this.setNodeLocationFromToken = setNodeLocationFull;\n this.setNodeLocationFromNode = setNodeLocationFull;\n this.cstPostRule = noop;\n this.setInitialNodeLocation = this.setInitialNodeLocationFullRecovery;\n } else {\n this.setNodeLocationFromToken = noop;\n this.setNodeLocationFromNode = noop;\n this.cstPostRule = this.cstPostRuleFull;\n this.setInitialNodeLocation = this.setInitialNodeLocationFullRegular;\n }\n } else if (/onlyOffset/i.test(this.nodeLocationTracking)) {\n if (this.recoveryEnabled) {\n this.setNodeLocationFromToken = setNodeLocationOnlyOffset;\n this.setNodeLocationFromNode = setNodeLocationOnlyOffset;\n this.cstPostRule = noop;\n this.setInitialNodeLocation =\n this.setInitialNodeLocationOnlyOffsetRecovery;\n } else {\n this.setNodeLocationFromToken = noop;\n this.setNodeLocationFromNode = noop;\n this.cstPostRule = this.cstPostRuleOnlyOffset;\n this.setInitialNodeLocation =\n this.setInitialNodeLocationOnlyOffsetRegular;\n }\n } else if (/none/i.test(this.nodeLocationTracking)) {\n this.setNodeLocationFromToken = noop;\n this.setNodeLocationFromNode = noop;\n this.cstPostRule = noop;\n this.setInitialNodeLocation = noop;\n } else {\n throw Error(\n `Invalid config option: \"${config.nodeLocationTracking}\"`,\n );\n }\n }\n }\n\n setInitialNodeLocationOnlyOffsetRecovery(\n this: MixedInParser,\n cstNode: any,\n ): void {\n cstNode.location = {\n startOffset: NaN,\n endOffset: NaN,\n };\n }\n\n setInitialNodeLocationOnlyOffsetRegular(\n this: MixedInParser,\n cstNode: any,\n ): void {\n cstNode.location = {\n // without error recovery the starting Location of a new CstNode is guaranteed\n // To be the next Token's startOffset (for valid inputs).\n // For invalid inputs there won't be any CSTOutput so this potential\n // inaccuracy does not matter\n startOffset: this.LA(1).startOffset,\n endOffset: NaN,\n };\n }\n\n setInitialNodeLocationFullRecovery(this: MixedInParser, cstNode: any): void {\n cstNode.location = {\n startOffset: NaN,\n startLine: NaN,\n startColumn: NaN,\n endOffset: NaN,\n endLine: NaN,\n endColumn: NaN,\n };\n }\n\n /**\n * @see setInitialNodeLocationOnlyOffsetRegular for explanation why this work\n\n * @param cstNode\n */\n setInitialNodeLocationFullRegular(this: MixedInParser, cstNode: any): void {\n const nextToken = this.LA(1);\n cstNode.location = {\n startOffset: nextToken.startOffset,\n startLine: nextToken.startLine,\n startColumn: nextToken.startColumn,\n endOffset: NaN,\n endLine: NaN,\n endColumn: NaN,\n };\n }\n\n cstInvocationStateUpdate(this: MixedInParser, fullRuleName: string): void {\n const cstNode: CstNode = {\n name: fullRuleName,\n children: Object.create(null),\n };\n\n this.setInitialNodeLocation(cstNode);\n this.CST_STACK.push(cstNode);\n }\n\n cstFinallyStateUpdate(this: MixedInParser): void {\n this.CST_STACK.pop();\n }\n\n cstPostRuleFull(this: MixedInParser, ruleCstNode: CstNode): void {\n // casts to `required` are safe because `cstPostRuleFull` should only be invoked when full location is enabled\n const prevToken = this.LA(0) as Required;\n const loc = ruleCstNode.location as Required;\n\n // If this condition is true it means we consumed at least one Token\n // In this CstNode.\n if (loc.startOffset <= prevToken.startOffset === true) {\n loc.endOffset = prevToken.endOffset;\n loc.endLine = prevToken.endLine;\n loc.endColumn = prevToken.endColumn;\n }\n // \"empty\" CstNode edge case\n else {\n loc.startOffset = NaN;\n loc.startLine = NaN;\n loc.startColumn = NaN;\n }\n }\n\n cstPostRuleOnlyOffset(this: MixedInParser, ruleCstNode: CstNode): void {\n const prevToken = this.LA(0);\n // `location' is not null because `cstPostRuleOnlyOffset` will only be invoked when location tracking is enabled.\n const loc = ruleCstNode.location!;\n\n // If this condition is true it means we consumed at least one Token\n // In this CstNode.\n if (loc.startOffset <= prevToken.startOffset === true) {\n loc.endOffset = prevToken.endOffset;\n }\n // \"empty\" CstNode edge case\n else {\n loc.startOffset = NaN;\n }\n }\n\n cstPostTerminal(\n this: MixedInParser,\n key: string,\n consumedToken: IToken,\n ): void {\n const rootCst = this.CST_STACK[this.CST_STACK.length - 1];\n addTerminalToCst(rootCst, consumedToken, key);\n // This is only used when **both** error recovery and CST Output are enabled.\n this.setNodeLocationFromToken(rootCst.location!, consumedToken);\n }\n\n cstPostNonTerminal(\n this: MixedInParser,\n ruleCstResult: CstNode,\n ruleName: string,\n ): void {\n const preCstNode = this.CST_STACK[this.CST_STACK.length - 1];\n addNoneTerminalToCst(preCstNode, ruleName, ruleCstResult);\n // This is only used when **both** error recovery and CST Output are enabled.\n this.setNodeLocationFromNode(preCstNode.location!, ruleCstResult.location!);\n }\n\n getBaseCstVisitorConstructor(\n this: MixedInParser,\n ): {\n new (...args: any[]): ICstVisitor;\n } {\n if (isUndefined(this.baseCstVisitorConstructor)) {\n const newBaseCstVisitorConstructor = createBaseSemanticVisitorConstructor(\n this.className,\n keys(this.gastProductionsCache),\n );\n this.baseCstVisitorConstructor = newBaseCstVisitorConstructor;\n return newBaseCstVisitorConstructor;\n }\n\n return this.baseCstVisitorConstructor;\n }\n\n getBaseCstVisitorConstructorWithDefaults(\n this: MixedInParser,\n ): {\n new (...args: any[]): ICstVisitor;\n } {\n if (isUndefined(this.baseCstVisitorWithDefaultsConstructor)) {\n const newConstructor = createBaseVisitorConstructorWithDefaults(\n this.className,\n keys(this.gastProductionsCache),\n this.getBaseCstVisitorConstructor(),\n );\n this.baseCstVisitorWithDefaultsConstructor = newConstructor;\n return newConstructor;\n }\n\n return this.baseCstVisitorWithDefaultsConstructor;\n }\n\n getLastExplicitRuleShortName(this: MixedInParser): number {\n const ruleStack = this.RULE_STACK;\n return ruleStack[ruleStack.length - 1];\n }\n\n getPreviousExplicitRuleShortName(this: MixedInParser): number {\n const ruleStack = this.RULE_STACK;\n return ruleStack[ruleStack.length - 2];\n }\n\n getLastExplicitRuleOccurrenceIndex(this: MixedInParser): number {\n const occurrenceStack = this.RULE_OCCURRENCE_STACK;\n return occurrenceStack[occurrenceStack.length - 1];\n }\n}\n", "import { END_OF_FILE } from \"../parser.js\";\nimport { IToken } from \"@chevrotain/types\";\nimport { MixedInParser } from \"./parser_traits.js\";\n\n/**\n * Trait responsible abstracting over the interaction with Lexer output (Token vector).\n *\n * This could be generalized to support other kinds of lexers, e.g.\n * - Just in Time Lexing / Lexer-Less parsing.\n * - Streaming Lexer.\n */\nexport class LexerAdapter {\n tokVector: IToken[];\n tokVectorLength: number;\n currIdx: number;\n\n initLexerAdapter() {\n this.tokVector = [];\n this.tokVectorLength = 0;\n this.currIdx = -1;\n }\n\n set input(newInput: IToken[]) {\n // @ts-ignore - `this parameter` not supported in setters/getters\n // - https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters\n if (this.selfAnalysisDone !== true) {\n throw Error(\n `Missing invocation at the end of the Parser's constructor.`,\n );\n }\n // @ts-ignore - `this parameter` not supported in setters/getters\n // - https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters\n this.reset();\n this.tokVector = newInput;\n this.tokVectorLength = newInput.length;\n }\n\n get input(): IToken[] {\n return this.tokVector;\n }\n\n // skips a token and returns the next token\n SKIP_TOKEN(this: MixedInParser): IToken {\n if (this.currIdx <= this.tokVector.length - 2) {\n this.consumeToken();\n return this.LA(1);\n } else {\n return END_OF_FILE;\n }\n }\n\n // Lexer (accessing Token vector) related methods which can be overridden to implement lazy lexers\n // or lexers dependent on parser context.\n LA(this: MixedInParser, howMuch: number): IToken {\n const soughtIdx = this.currIdx + howMuch;\n if (soughtIdx < 0 || this.tokVectorLength <= soughtIdx) {\n return END_OF_FILE;\n } else {\n return this.tokVector[soughtIdx];\n }\n }\n\n consumeToken(this: MixedInParser) {\n this.currIdx++;\n }\n\n exportLexerState(this: MixedInParser): number {\n return this.currIdx;\n }\n\n importLexerState(this: MixedInParser, newState: number) {\n this.currIdx = newState;\n }\n\n resetLexerState(this: MixedInParser): void {\n this.currIdx = -1;\n }\n\n moveToTerminatedState(this: MixedInParser): void {\n this.currIdx = this.tokVector.length - 1;\n }\n\n getLexerPosition(this: MixedInParser): number {\n return this.exportLexerState();\n }\n}\n", "import {\n AtLeastOneSepMethodOpts,\n ConsumeMethodOpts,\n DSLMethodOpts,\n DSLMethodOptsWithErr,\n GrammarAction,\n IOrAlt,\n IRuleConfig,\n ISerializedGast,\n IToken,\n ManySepMethodOpts,\n OrMethodOpts,\n SubruleMethodOpts,\n TokenType,\n} from \"@chevrotain/types\";\nimport { includes, values } from \"lodash-es\";\nimport { isRecognitionException } from \"../../exceptions_public.js\";\nimport { DEFAULT_RULE_CONFIG, ParserDefinitionErrorType } from \"../parser.js\";\nimport { defaultGrammarValidatorErrorProvider } from \"../../errors_public.js\";\nimport { validateRuleIsOverridden } from \"../../grammar/checks.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { Rule, serializeGrammar } from \"@chevrotain/gast\";\nimport { IParserDefinitionError } from \"../../grammar/types.js\";\nimport { ParserMethodInternal } from \"../types.js\";\n\n/**\n * This trait is responsible for implementing the public API\n * for defining Chevrotain parsers, i.e:\n * - CONSUME\n * - RULE\n * - OPTION\n * - ...\n */\nexport class RecognizerApi {\n ACTION(this: MixedInParser, impl: () => T): T {\n return impl.call(this);\n }\n\n consume(\n this: MixedInParser,\n idx: number,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, idx, options);\n }\n\n subrule(\n this: MixedInParser,\n idx: number,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, idx, options);\n }\n\n option(\n this: MixedInParser,\n idx: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, idx);\n }\n\n or(\n this: MixedInParser,\n idx: number,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): any {\n return this.orInternal(altsOrOpts, idx);\n }\n\n many(\n this: MixedInParser,\n idx: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n return this.manyInternal(idx, actionORMethodDef);\n }\n\n atLeastOne(\n this: MixedInParser,\n idx: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n return this.atLeastOneInternal(idx, actionORMethodDef);\n }\n\n CONSUME(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 0, options);\n }\n\n CONSUME1(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 1, options);\n }\n\n CONSUME2(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 2, options);\n }\n\n CONSUME3(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 3, options);\n }\n\n CONSUME4(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 4, options);\n }\n\n CONSUME5(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 5, options);\n }\n\n CONSUME6(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 6, options);\n }\n\n CONSUME7(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 7, options);\n }\n\n CONSUME8(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 8, options);\n }\n\n CONSUME9(\n this: MixedInParser,\n tokType: TokenType,\n options?: ConsumeMethodOpts,\n ): IToken {\n return this.consumeInternal(tokType, 9, options);\n }\n\n SUBRULE(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 0, options);\n }\n\n SUBRULE1(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 1, options);\n }\n\n SUBRULE2(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 2, options);\n }\n\n SUBRULE3(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 3, options);\n }\n\n SUBRULE4(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 4, options);\n }\n\n SUBRULE5(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 5, options);\n }\n\n SUBRULE6(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 6, options);\n }\n\n SUBRULE7(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 7, options);\n }\n\n SUBRULE8(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 8, options);\n }\n\n SUBRULE9(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n options?: SubruleMethodOpts,\n ): R {\n return this.subruleInternal(ruleToCall, 9, options);\n }\n\n OPTION(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 0);\n }\n\n OPTION1(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 1);\n }\n\n OPTION2(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 2);\n }\n\n OPTION3(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 3);\n }\n\n OPTION4(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 4);\n }\n\n OPTION5(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 5);\n }\n\n OPTION6(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 6);\n }\n\n OPTION7(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 7);\n }\n\n OPTION8(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 8);\n }\n\n OPTION9(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): OUT | undefined {\n return this.optionInternal(actionORMethodDef, 9);\n }\n\n OR(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 0);\n }\n\n OR1(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 1);\n }\n\n OR2(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 2);\n }\n\n OR3(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 3);\n }\n\n OR4(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 4);\n }\n\n OR5(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 5);\n }\n\n OR6(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 6);\n }\n\n OR7(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 7);\n }\n\n OR8(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 8);\n }\n\n OR9(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n ): T {\n return this.orInternal(altsOrOpts, 9);\n }\n\n MANY(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(0, actionORMethodDef);\n }\n\n MANY1(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(1, actionORMethodDef);\n }\n\n MANY2(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(2, actionORMethodDef);\n }\n\n MANY3(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(3, actionORMethodDef);\n }\n\n MANY4(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(4, actionORMethodDef);\n }\n\n MANY5(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(5, actionORMethodDef);\n }\n\n MANY6(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(6, actionORMethodDef);\n }\n\n MANY7(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(7, actionORMethodDef);\n }\n\n MANY8(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(8, actionORMethodDef);\n }\n\n MANY9(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n this.manyInternal(9, actionORMethodDef);\n }\n\n MANY_SEP(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(0, options);\n }\n\n MANY_SEP1(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(1, options);\n }\n\n MANY_SEP2(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(2, options);\n }\n\n MANY_SEP3(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(3, options);\n }\n\n MANY_SEP4(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(4, options);\n }\n\n MANY_SEP5(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(5, options);\n }\n\n MANY_SEP6(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(6, options);\n }\n\n MANY_SEP7(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(7, options);\n }\n\n MANY_SEP8(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(8, options);\n }\n\n MANY_SEP9(this: MixedInParser, options: ManySepMethodOpts): void {\n this.manySepFirstInternal(9, options);\n }\n\n AT_LEAST_ONE(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(0, actionORMethodDef);\n }\n\n AT_LEAST_ONE1(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n return this.atLeastOneInternal(1, actionORMethodDef);\n }\n\n AT_LEAST_ONE2(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(2, actionORMethodDef);\n }\n\n AT_LEAST_ONE3(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(3, actionORMethodDef);\n }\n\n AT_LEAST_ONE4(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(4, actionORMethodDef);\n }\n\n AT_LEAST_ONE5(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(5, actionORMethodDef);\n }\n\n AT_LEAST_ONE6(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(6, actionORMethodDef);\n }\n\n AT_LEAST_ONE7(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(7, actionORMethodDef);\n }\n\n AT_LEAST_ONE8(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(8, actionORMethodDef);\n }\n\n AT_LEAST_ONE9(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n this.atLeastOneInternal(9, actionORMethodDef);\n }\n\n AT_LEAST_ONE_SEP(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(0, options);\n }\n\n AT_LEAST_ONE_SEP1(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(1, options);\n }\n\n AT_LEAST_ONE_SEP2(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(2, options);\n }\n\n AT_LEAST_ONE_SEP3(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(3, options);\n }\n\n AT_LEAST_ONE_SEP4(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(4, options);\n }\n\n AT_LEAST_ONE_SEP5(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(5, options);\n }\n\n AT_LEAST_ONE_SEP6(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(6, options);\n }\n\n AT_LEAST_ONE_SEP7(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(7, options);\n }\n\n AT_LEAST_ONE_SEP8(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(8, options);\n }\n\n AT_LEAST_ONE_SEP9(\n this: MixedInParser,\n options: AtLeastOneSepMethodOpts,\n ): void {\n this.atLeastOneSepFirstInternal(9, options);\n }\n\n RULE(\n this: MixedInParser,\n name: string,\n implementation: (...implArgs: any[]) => T,\n config: IRuleConfig = DEFAULT_RULE_CONFIG,\n ): (idxInCallingRule?: number, ...args: any[]) => T | any {\n if (includes(this.definedRulesNames, name)) {\n const errMsg =\n defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({\n topLevelRule: name,\n grammarName: this.className,\n });\n\n const error = {\n message: errMsg,\n type: ParserDefinitionErrorType.DUPLICATE_RULE_NAME,\n ruleName: name,\n };\n this.definitionErrors.push(error);\n }\n\n this.definedRulesNames.push(name);\n\n const ruleImplementation = this.defineRule(name, implementation, config);\n (this as any)[name] = ruleImplementation;\n return ruleImplementation;\n }\n\n OVERRIDE_RULE(\n this: MixedInParser,\n name: string,\n impl: (...implArgs: any[]) => T,\n config: IRuleConfig = DEFAULT_RULE_CONFIG,\n ): (idxInCallingRule?: number, ...args: any[]) => T {\n const ruleErrors: IParserDefinitionError[] = validateRuleIsOverridden(\n name,\n this.definedRulesNames,\n this.className,\n );\n this.definitionErrors = this.definitionErrors.concat(ruleErrors);\n\n const ruleImplementation = this.defineRule(name, impl, config);\n (this as any)[name] = ruleImplementation;\n return ruleImplementation;\n }\n\n BACKTRACK(\n this: MixedInParser,\n grammarRule: (...args: any[]) => T,\n args?: any[],\n ): () => boolean {\n return function () {\n // save org state\n this.isBackTrackingStack.push(1);\n const orgState = this.saveRecogState();\n try {\n grammarRule.apply(this, args);\n // if no exception was thrown we have succeed parsing the rule.\n return true;\n } catch (e) {\n if (isRecognitionException(e)) {\n return false;\n } else {\n throw e;\n }\n } finally {\n this.reloadRecogState(orgState);\n this.isBackTrackingStack.pop();\n }\n };\n }\n\n // GAST export APIs\n public getGAstProductions(this: MixedInParser): Record {\n return this.gastProductionsCache;\n }\n\n public getSerializedGastProductions(this: MixedInParser): ISerializedGast[] {\n return serializeGrammar(values(this.gastProductionsCache));\n }\n}\n", "import {\n AtLeastOneSepMethodOpts,\n ConsumeMethodOpts,\n DSLMethodOpts,\n DSLMethodOptsWithErr,\n GrammarAction,\n IOrAlt,\n IParserConfig,\n IRuleConfig,\n IToken,\n ManySepMethodOpts,\n OrMethodOpts,\n ParserMethod,\n SubruleMethodOpts,\n TokenType,\n TokenTypeDictionary,\n TokenVocabulary,\n} from \"@chevrotain/types\";\nimport {\n clone,\n every,\n flatten,\n has,\n isArray,\n isEmpty,\n isObject,\n reduce,\n uniq,\n values,\n} from \"lodash-es\";\nimport {\n AT_LEAST_ONE_IDX,\n AT_LEAST_ONE_SEP_IDX,\n BITS_FOR_METHOD_TYPE,\n BITS_FOR_OCCURRENCE_IDX,\n MANY_IDX,\n MANY_SEP_IDX,\n OPTION_IDX,\n OR_IDX,\n} from \"../../grammar/keys.js\";\nimport {\n isRecognitionException,\n MismatchedTokenException,\n NotAllInputParsedException,\n} from \"../../exceptions_public.js\";\nimport { PROD_TYPE } from \"../../grammar/lookahead.js\";\nimport {\n AbstractNextTerminalAfterProductionWalker,\n NextTerminalAfterAtLeastOneSepWalker,\n NextTerminalAfterAtLeastOneWalker,\n NextTerminalAfterManySepWalker,\n NextTerminalAfterManyWalker,\n} from \"../../grammar/interpreter.js\";\nimport { DEFAULT_RULE_CONFIG, IParserState, TokenMatcher } from \"../parser.js\";\nimport { IN_RULE_RECOVERY_EXCEPTION } from \"./recoverable.js\";\nimport { EOF } from \"../../../scan/tokens_public.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport {\n augmentTokenTypes,\n isTokenType,\n tokenStructuredMatcher,\n tokenStructuredMatcherNoCategories,\n} from \"../../../scan/tokens.js\";\nimport { Rule } from \"@chevrotain/gast\";\nimport { ParserMethodInternal } from \"../types.js\";\n\n/**\n * This trait is responsible for the runtime parsing engine\n * Used by the official API (recognizer_api.ts)\n */\nexport class RecognizerEngine {\n isBackTrackingStack: boolean[];\n className: string;\n RULE_STACK: number[];\n RULE_OCCURRENCE_STACK: number[];\n definedRulesNames: string[];\n tokensMap: { [fqn: string]: TokenType };\n gastProductionsCache: Record;\n shortRuleNameToFull: Record;\n fullRuleNameToShort: Record;\n // The shortName Index must be coded \"after\" the first 8bits to enable building unique lookahead keys\n ruleShortNameIdx: number;\n tokenMatcher: TokenMatcher;\n subruleIdx: number;\n\n initRecognizerEngine(\n tokenVocabulary: TokenVocabulary,\n config: IParserConfig,\n ) {\n this.className = this.constructor.name;\n // TODO: would using an ES6 Map or plain object be faster (CST building scenario)\n this.shortRuleNameToFull = {};\n this.fullRuleNameToShort = {};\n this.ruleShortNameIdx = 256;\n this.tokenMatcher = tokenStructuredMatcherNoCategories;\n this.subruleIdx = 0;\n\n this.definedRulesNames = [];\n this.tokensMap = {};\n this.isBackTrackingStack = [];\n this.RULE_STACK = [];\n this.RULE_OCCURRENCE_STACK = [];\n this.gastProductionsCache = {};\n\n if (has(config, \"serializedGrammar\")) {\n throw Error(\n \"The Parser's configuration can no longer contain a property.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\\n\" +\n \"\\tFor Further details.\",\n );\n }\n\n if (isArray(tokenVocabulary)) {\n // This only checks for Token vocabularies provided as arrays.\n // That is good enough because the main objective is to detect users of pre-V4.0 APIs\n // rather than all edge cases of empty Token vocabularies.\n if (isEmpty(tokenVocabulary as any[])) {\n throw Error(\n \"A Token Vocabulary cannot be empty.\\n\" +\n \"\\tNote that the first argument for the parser constructor\\n\" +\n \"\\tis no longer a Token vector (since v4.0).\",\n );\n }\n\n if (typeof (tokenVocabulary as any[])[0].startOffset === \"number\") {\n throw Error(\n \"The Parser constructor no longer accepts a token vector as the first argument.\\n\" +\n \"\\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\\n\" +\n \"\\tFor Further details.\",\n );\n }\n }\n\n if (isArray(tokenVocabulary)) {\n this.tokensMap = reduce(\n tokenVocabulary,\n (acc, tokType: TokenType) => {\n acc[tokType.name] = tokType;\n return acc;\n },\n {} as { [tokenName: string]: TokenType },\n );\n } else if (\n has(tokenVocabulary, \"modes\") &&\n every(flatten(values((tokenVocabulary).modes)), isTokenType)\n ) {\n const allTokenTypes = flatten(values((tokenVocabulary).modes));\n const uniqueTokens = uniq(allTokenTypes);\n this.tokensMap = reduce(\n uniqueTokens,\n (acc, tokType: TokenType) => {\n acc[tokType.name] = tokType;\n return acc;\n },\n {} as { [tokenName: string]: TokenType },\n );\n } else if (isObject(tokenVocabulary)) {\n this.tokensMap = clone(tokenVocabulary as TokenTypeDictionary);\n } else {\n throw new Error(\n \" argument must be An Array of Token constructors,\" +\n \" A dictionary of Token constructors or an IMultiModeLexerDefinition\",\n );\n }\n\n // always add EOF to the tokenNames -> constructors map. it is useful to assure all the input has been\n // parsed with a clear error message (\"expecting EOF but found ...\")\n this.tokensMap[\"EOF\"] = EOF;\n\n const allTokenTypes = has(tokenVocabulary, \"modes\")\n ? flatten(values((tokenVocabulary).modes))\n : values(tokenVocabulary);\n const noTokenCategoriesUsed = every(allTokenTypes, (tokenConstructor) =>\n isEmpty(tokenConstructor.categoryMatches),\n );\n\n this.tokenMatcher = noTokenCategoriesUsed\n ? tokenStructuredMatcherNoCategories\n : tokenStructuredMatcher;\n\n // Because ES2015+ syntax should be supported for creating Token classes\n // We cannot assume that the Token classes were created using the \"extendToken\" utilities\n // Therefore we must augment the Token classes both on Lexer initialization and on Parser initialization\n augmentTokenTypes(values(this.tokensMap));\n }\n\n defineRule(\n this: MixedInParser,\n ruleName: string,\n impl: (...args: ARGS) => R,\n config: IRuleConfig,\n ): ParserMethodInternal {\n if (this.selfAnalysisDone) {\n throw Error(\n `Grammar rule <${ruleName}> may not be defined after the 'performSelfAnalysis' method has been called'\\n` +\n `Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`,\n );\n }\n const resyncEnabled: boolean = has(config, \"resyncEnabled\")\n ? (config.resyncEnabled as boolean) // assumes end user provides the correct config value/type\n : DEFAULT_RULE_CONFIG.resyncEnabled;\n const recoveryValueFunc = has(config, \"recoveryValueFunc\")\n ? (config.recoveryValueFunc as () => R) // assumes end user provides the correct config value/type\n : DEFAULT_RULE_CONFIG.recoveryValueFunc;\n\n // performance optimization: Use small integers as keys for the longer human readable \"full\" rule names.\n // this greatly improves Map access time (as much as 8% for some performance benchmarks).\n const shortName =\n this.ruleShortNameIdx << (BITS_FOR_METHOD_TYPE + BITS_FOR_OCCURRENCE_IDX);\n\n this.ruleShortNameIdx++;\n this.shortRuleNameToFull[shortName] = ruleName;\n this.fullRuleNameToShort[ruleName] = shortName;\n\n let invokeRuleWithTry: ParserMethod;\n\n // Micro optimization, only check the condition **once** on rule definition\n // instead of **every single** rule invocation.\n if (this.outputCst === true) {\n invokeRuleWithTry = function invokeRuleWithTry(\n this: MixedInParser,\n ...args: ARGS\n ): R {\n try {\n this.ruleInvocationStateUpdate(shortName, ruleName, this.subruleIdx);\n impl.apply(this, args);\n const cst = this.CST_STACK[this.CST_STACK.length - 1];\n this.cstPostRule(cst);\n return cst as unknown as R;\n } catch (e) {\n return this.invokeRuleCatch(e, resyncEnabled, recoveryValueFunc) as R;\n } finally {\n this.ruleFinallyStateUpdate();\n }\n };\n } else {\n invokeRuleWithTry = function invokeRuleWithTryCst(\n this: MixedInParser,\n ...args: ARGS\n ): R {\n try {\n this.ruleInvocationStateUpdate(shortName, ruleName, this.subruleIdx);\n return impl.apply(this, args);\n } catch (e) {\n return this.invokeRuleCatch(e, resyncEnabled, recoveryValueFunc) as R;\n } finally {\n this.ruleFinallyStateUpdate();\n }\n };\n }\n\n const wrappedGrammarRule: ParserMethodInternal = Object.assign(\n invokeRuleWithTry as any,\n { ruleName, originalGrammarAction: impl },\n );\n\n return wrappedGrammarRule;\n }\n\n invokeRuleCatch(\n this: MixedInParser,\n e: Error,\n resyncEnabledConfig: boolean,\n recoveryValueFunc: Function,\n ): unknown {\n const isFirstInvokedRule = this.RULE_STACK.length === 1;\n // note the reSync is always enabled for the first rule invocation, because we must always be able to\n // reSync with EOF and just output some INVALID ParseTree\n // during backtracking reSync recovery is disabled, otherwise we can't be certain the backtracking\n // path is really the most valid one\n const reSyncEnabled =\n resyncEnabledConfig && !this.isBackTracking() && this.recoveryEnabled;\n\n if (isRecognitionException(e)) {\n const recogError: any = e;\n if (reSyncEnabled) {\n const reSyncTokType = this.findReSyncTokenType();\n if (this.isInCurrentRuleReSyncSet(reSyncTokType)) {\n recogError.resyncedTokens = this.reSyncTo(reSyncTokType);\n if (this.outputCst) {\n const partialCstResult: any =\n this.CST_STACK[this.CST_STACK.length - 1];\n partialCstResult.recoveredNode = true;\n return partialCstResult;\n } else {\n return recoveryValueFunc(e);\n }\n } else {\n if (this.outputCst) {\n const partialCstResult: any =\n this.CST_STACK[this.CST_STACK.length - 1];\n partialCstResult.recoveredNode = true;\n recogError.partialCstResult = partialCstResult;\n }\n // to be handled Further up the call stack\n throw recogError;\n }\n } else if (isFirstInvokedRule) {\n // otherwise a Redundant input error will be created as well and we cannot guarantee that this is indeed the case\n this.moveToTerminatedState();\n // the parser should never throw one of its own errors outside its flow.\n // even if error recovery is disabled\n return recoveryValueFunc(e);\n } else {\n // to be recovered Further up the call stack\n throw recogError;\n }\n } else {\n // some other Error type which we don't know how to handle (for example a built in JavaScript Error)\n throw e;\n }\n }\n\n // Implementation of parsing DSL\n optionInternal(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n occurrence: number,\n ): OUT | undefined {\n const key = this.getKeyForAutomaticLookahead(OPTION_IDX, occurrence);\n return this.optionInternalLogic(actionORMethodDef, occurrence, key);\n }\n\n optionInternalLogic(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n occurrence: number,\n key: number,\n ): OUT | undefined {\n let lookAheadFunc = this.getLaFuncFromCache(key);\n let action: GrammarAction;\n if (typeof actionORMethodDef !== \"function\") {\n action = actionORMethodDef.DEF;\n const predicate = actionORMethodDef.GATE;\n // predicate present\n if (predicate !== undefined) {\n const orgLookaheadFunction = lookAheadFunc;\n lookAheadFunc = () => {\n return predicate.call(this) && orgLookaheadFunction.call(this);\n };\n }\n } else {\n action = actionORMethodDef;\n }\n\n if (lookAheadFunc.call(this) === true) {\n return action.call(this);\n }\n return undefined;\n }\n\n atLeastOneInternal(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(\n AT_LEAST_ONE_IDX,\n prodOccurrence,\n );\n return this.atLeastOneInternalLogic(\n prodOccurrence,\n actionORMethodDef,\n laKey,\n );\n }\n\n atLeastOneInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n key: number,\n ): void {\n let lookAheadFunc = this.getLaFuncFromCache(key);\n let action;\n if (typeof actionORMethodDef !== \"function\") {\n action = actionORMethodDef.DEF;\n const predicate = actionORMethodDef.GATE;\n // predicate present\n if (predicate !== undefined) {\n const orgLookaheadFunction = lookAheadFunc;\n lookAheadFunc = () => {\n return predicate.call(this) && orgLookaheadFunction.call(this);\n };\n }\n } else {\n action = actionORMethodDef;\n }\n\n if ((lookAheadFunc).call(this) === true) {\n let notStuck = this.doSingleRepetition(action);\n while (\n (lookAheadFunc).call(this) === true &&\n notStuck === true\n ) {\n notStuck = this.doSingleRepetition(action);\n }\n } else {\n throw this.raiseEarlyExitException(\n prodOccurrence,\n PROD_TYPE.REPETITION_MANDATORY,\n (>actionORMethodDef).ERR_MSG,\n );\n }\n\n // note that while it may seem that this can cause an error because by using a recursive call to\n // AT_LEAST_ONE we change the grammar to AT_LEAST_TWO, AT_LEAST_THREE ... , the possible recursive call\n // from the tryInRepetitionRecovery(...) will only happen IFF there really are TWO/THREE/.... items.\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.atLeastOneInternal,\n [prodOccurrence, actionORMethodDef],\n lookAheadFunc,\n AT_LEAST_ONE_IDX,\n prodOccurrence,\n NextTerminalAfterAtLeastOneWalker,\n );\n }\n\n atLeastOneSepFirstInternal(\n this: MixedInParser,\n prodOccurrence: number,\n options: AtLeastOneSepMethodOpts,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(\n AT_LEAST_ONE_SEP_IDX,\n prodOccurrence,\n );\n this.atLeastOneSepFirstInternalLogic(prodOccurrence, options, laKey);\n }\n\n atLeastOneSepFirstInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n options: AtLeastOneSepMethodOpts,\n key: number,\n ): void {\n const action = options.DEF;\n const separator = options.SEP;\n\n const firstIterationLookaheadFunc = this.getLaFuncFromCache(key);\n\n // 1st iteration\n if (firstIterationLookaheadFunc.call(this) === true) {\n (>action).call(this);\n\n // TODO: Optimization can move this function construction into \"attemptInRepetitionRecovery\"\n // because it is only needed in error recovery scenarios.\n const separatorLookAheadFunc = () => {\n return this.tokenMatcher(this.LA(1), separator);\n };\n\n // 2nd..nth iterations\n while (this.tokenMatcher(this.LA(1), separator) === true) {\n // note that this CONSUME will never enter recovery because\n // the separatorLookAheadFunc checks that the separator really does exist.\n this.CONSUME(separator);\n // No need for checking infinite loop here due to consuming the separator.\n (>action).call(this);\n }\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.repetitionSepSecondInternal,\n [\n prodOccurrence,\n separator,\n separatorLookAheadFunc,\n action,\n NextTerminalAfterAtLeastOneSepWalker,\n ],\n separatorLookAheadFunc,\n AT_LEAST_ONE_SEP_IDX,\n prodOccurrence,\n NextTerminalAfterAtLeastOneSepWalker,\n );\n } else {\n throw this.raiseEarlyExitException(\n prodOccurrence,\n PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,\n options.ERR_MSG,\n );\n }\n }\n\n manyInternal(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(MANY_IDX, prodOccurrence);\n return this.manyInternalLogic(prodOccurrence, actionORMethodDef, laKey);\n }\n\n manyInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n key: number,\n ) {\n let lookaheadFunction = this.getLaFuncFromCache(key);\n let action;\n if (typeof actionORMethodDef !== \"function\") {\n action = actionORMethodDef.DEF;\n const predicate = actionORMethodDef.GATE;\n // predicate present\n if (predicate !== undefined) {\n const orgLookaheadFunction = lookaheadFunction;\n lookaheadFunction = () => {\n return predicate.call(this) && orgLookaheadFunction.call(this);\n };\n }\n } else {\n action = actionORMethodDef;\n }\n\n let notStuck = true;\n while (lookaheadFunction.call(this) === true && notStuck === true) {\n notStuck = this.doSingleRepetition(action);\n }\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.manyInternal,\n [prodOccurrence, actionORMethodDef],\n lookaheadFunction,\n MANY_IDX,\n prodOccurrence,\n NextTerminalAfterManyWalker,\n // The notStuck parameter is only relevant when \"attemptInRepetitionRecovery\"\n // is invoked from manyInternal, in the MANY_SEP case and AT_LEAST_ONE[_SEP]\n // An infinite loop cannot occur as:\n // - Either the lookahead is guaranteed to consume something (Single Token Separator)\n // - AT_LEAST_ONE by definition is guaranteed to consume something (or error out).\n notStuck,\n );\n }\n\n manySepFirstInternal(\n this: MixedInParser,\n prodOccurrence: number,\n options: ManySepMethodOpts,\n ): void {\n const laKey = this.getKeyForAutomaticLookahead(\n MANY_SEP_IDX,\n prodOccurrence,\n );\n this.manySepFirstInternalLogic(prodOccurrence, options, laKey);\n }\n\n manySepFirstInternalLogic(\n this: MixedInParser,\n prodOccurrence: number,\n options: ManySepMethodOpts,\n key: number,\n ): void {\n const action = options.DEF;\n const separator = options.SEP;\n const firstIterationLaFunc = this.getLaFuncFromCache(key);\n\n // 1st iteration\n if (firstIterationLaFunc.call(this) === true) {\n action.call(this);\n\n const separatorLookAheadFunc = () => {\n return this.tokenMatcher(this.LA(1), separator);\n };\n // 2nd..nth iterations\n while (this.tokenMatcher(this.LA(1), separator) === true) {\n // note that this CONSUME will never enter recovery because\n // the separatorLookAheadFunc checks that the separator really does exist.\n this.CONSUME(separator);\n // No need for checking infinite loop here due to consuming the separator.\n action.call(this);\n }\n\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n this.attemptInRepetitionRecovery(\n this.repetitionSepSecondInternal,\n [\n prodOccurrence,\n separator,\n separatorLookAheadFunc,\n action,\n NextTerminalAfterManySepWalker,\n ],\n separatorLookAheadFunc,\n MANY_SEP_IDX,\n prodOccurrence,\n NextTerminalAfterManySepWalker,\n );\n }\n }\n\n repetitionSepSecondInternal(\n this: MixedInParser,\n prodOccurrence: number,\n separator: TokenType,\n separatorLookAheadFunc: () => boolean,\n action: GrammarAction,\n nextTerminalAfterWalker: typeof AbstractNextTerminalAfterProductionWalker,\n ): void {\n while (separatorLookAheadFunc()) {\n // note that this CONSUME will never enter recovery because\n // the separatorLookAheadFunc checks that the separator really does exist.\n this.CONSUME(separator);\n action.call(this);\n }\n\n // we can only arrive to this function after an error\n // has occurred (hence the name 'second') so the following\n // IF will always be entered, its possible to remove it...\n // however it is kept to avoid confusion and be consistent.\n // Performance optimization: \"attemptInRepetitionRecovery\" will be defined as NOOP unless recovery is enabled\n /* istanbul ignore else */\n this.attemptInRepetitionRecovery(\n this.repetitionSepSecondInternal,\n [\n prodOccurrence,\n separator,\n separatorLookAheadFunc,\n action,\n nextTerminalAfterWalker,\n ],\n separatorLookAheadFunc,\n AT_LEAST_ONE_SEP_IDX,\n prodOccurrence,\n nextTerminalAfterWalker,\n );\n }\n\n doSingleRepetition(this: MixedInParser, action: Function): any {\n const beforeIteration = this.getLexerPosition();\n action.call(this);\n const afterIteration = this.getLexerPosition();\n\n // This boolean will indicate if this repetition progressed\n // or if we are \"stuck\" (potential infinite loop in the repetition).\n return afterIteration > beforeIteration;\n }\n\n orInternal(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n occurrence: number,\n ): T {\n const laKey = this.getKeyForAutomaticLookahead(OR_IDX, occurrence);\n const alts = isArray(altsOrOpts) ? altsOrOpts : altsOrOpts.DEF;\n\n const laFunc = this.getLaFuncFromCache(laKey);\n const altIdxToTake = laFunc.call(this, alts);\n if (altIdxToTake !== undefined) {\n const chosenAlternative: any = alts[altIdxToTake];\n return chosenAlternative.ALT.call(this);\n }\n this.raiseNoAltException(\n occurrence,\n (altsOrOpts as OrMethodOpts).ERR_MSG,\n );\n }\n\n ruleFinallyStateUpdate(this: MixedInParser): void {\n this.RULE_STACK.pop();\n this.RULE_OCCURRENCE_STACK.pop();\n\n // NOOP when cst is disabled\n this.cstFinallyStateUpdate();\n\n if (this.RULE_STACK.length === 0 && this.isAtEndOfInput() === false) {\n const firstRedundantTok = this.LA(1);\n const errMsg = this.errorMessageProvider.buildNotAllInputParsedMessage({\n firstRedundant: firstRedundantTok,\n ruleName: this.getCurrRuleFullName(),\n });\n this.SAVE_ERROR(\n new NotAllInputParsedException(errMsg, firstRedundantTok),\n );\n }\n }\n\n subruleInternal(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n idx: number,\n options?: SubruleMethodOpts,\n ): R {\n let ruleResult;\n try {\n const args = options !== undefined ? options.ARGS : undefined;\n this.subruleIdx = idx;\n ruleResult = ruleToCall.apply(this, args);\n this.cstPostNonTerminal(\n ruleResult,\n options !== undefined && options.LABEL !== undefined\n ? options.LABEL\n : ruleToCall.ruleName,\n );\n return ruleResult;\n } catch (e) {\n throw this.subruleInternalError(e, options, ruleToCall.ruleName);\n }\n }\n\n subruleInternalError(\n this: MixedInParser,\n e: any,\n options: SubruleMethodOpts | undefined,\n ruleName: string,\n ): void {\n if (isRecognitionException(e) && e.partialCstResult !== undefined) {\n this.cstPostNonTerminal(\n e.partialCstResult,\n options !== undefined && options.LABEL !== undefined\n ? options.LABEL\n : ruleName,\n );\n\n delete e.partialCstResult;\n }\n throw e;\n }\n\n consumeInternal(\n this: MixedInParser,\n tokType: TokenType,\n idx: number,\n options: ConsumeMethodOpts | undefined,\n ): IToken {\n let consumedToken!: IToken;\n try {\n const nextToken = this.LA(1);\n if (this.tokenMatcher(nextToken, tokType) === true) {\n this.consumeToken();\n consumedToken = nextToken;\n } else {\n this.consumeInternalError(tokType, nextToken, options);\n }\n } catch (eFromConsumption) {\n consumedToken = this.consumeInternalRecovery(\n tokType,\n idx,\n eFromConsumption,\n );\n }\n\n this.cstPostTerminal(\n options !== undefined && options.LABEL !== undefined\n ? options.LABEL\n : tokType.name,\n consumedToken,\n );\n return consumedToken;\n }\n\n consumeInternalError(\n this: MixedInParser,\n tokType: TokenType,\n nextToken: IToken,\n options: ConsumeMethodOpts | undefined,\n ): void {\n let msg;\n const previousToken = this.LA(0);\n if (options !== undefined && options.ERR_MSG) {\n msg = options.ERR_MSG;\n } else {\n msg = this.errorMessageProvider.buildMismatchTokenMessage({\n expected: tokType,\n actual: nextToken,\n previous: previousToken,\n ruleName: this.getCurrRuleFullName(),\n });\n }\n throw this.SAVE_ERROR(\n new MismatchedTokenException(msg, nextToken, previousToken),\n );\n }\n\n consumeInternalRecovery(\n this: MixedInParser,\n tokType: TokenType,\n idx: number,\n eFromConsumption: Error,\n ): IToken {\n // no recovery allowed during backtracking, otherwise backtracking may recover invalid syntax and accept it\n // but the original syntax could have been parsed successfully without any backtracking + recovery\n if (\n this.recoveryEnabled &&\n // TODO: more robust checking of the exception type. Perhaps Typescript extending expressions?\n eFromConsumption.name === \"MismatchedTokenException\" &&\n !this.isBackTracking()\n ) {\n const follows = this.getFollowsForInRuleRecovery(tokType, idx);\n try {\n return this.tryInRuleRecovery(tokType, follows);\n } catch (eFromInRuleRecovery) {\n if (eFromInRuleRecovery.name === IN_RULE_RECOVERY_EXCEPTION) {\n // failed in RuleRecovery.\n // throw the original error in order to trigger reSync error recovery\n throw eFromConsumption;\n } else {\n throw eFromInRuleRecovery;\n }\n }\n } else {\n throw eFromConsumption;\n }\n }\n\n saveRecogState(this: MixedInParser): IParserState {\n // errors is a getter which will clone the errors array\n const savedErrors = this.errors;\n const savedRuleStack = clone(this.RULE_STACK);\n return {\n errors: savedErrors,\n lexerState: this.exportLexerState(),\n RULE_STACK: savedRuleStack,\n CST_STACK: this.CST_STACK,\n };\n }\n\n reloadRecogState(this: MixedInParser, newState: IParserState) {\n this.errors = newState.errors;\n this.importLexerState(newState.lexerState);\n this.RULE_STACK = newState.RULE_STACK;\n }\n\n ruleInvocationStateUpdate(\n this: MixedInParser,\n shortName: number,\n fullName: string,\n idxInCallingRule: number,\n ): void {\n this.RULE_OCCURRENCE_STACK.push(idxInCallingRule);\n this.RULE_STACK.push(shortName);\n // NOOP when cst is disabled\n this.cstInvocationStateUpdate(fullName);\n }\n\n isBackTracking(this: MixedInParser): boolean {\n return this.isBackTrackingStack.length !== 0;\n }\n\n getCurrRuleFullName(this: MixedInParser): string {\n const shortName = this.getLastExplicitRuleShortName();\n return this.shortRuleNameToFull[shortName];\n }\n\n shortRuleNameToFullName(this: MixedInParser, shortName: number) {\n return this.shortRuleNameToFull[shortName];\n }\n\n public isAtEndOfInput(this: MixedInParser): boolean {\n return this.tokenMatcher(this.LA(1), EOF);\n }\n\n public reset(this: MixedInParser): void {\n this.resetLexerState();\n this.subruleIdx = 0;\n this.isBackTrackingStack = [];\n this.errors = [];\n this.RULE_STACK = [];\n // TODO: extract a specific reset for TreeBuilder trait\n this.CST_STACK = [];\n this.RULE_OCCURRENCE_STACK = [];\n }\n}\n", "import {\n IParserConfig,\n IParserErrorMessageProvider,\n IRecognitionException,\n} from \"@chevrotain/types\";\nimport {\n EarlyExitException,\n isRecognitionException,\n NoViableAltException,\n} from \"../../exceptions_public.js\";\nimport { clone, has } from \"lodash-es\";\nimport {\n getLookaheadPathsForOptionalProd,\n getLookaheadPathsForOr,\n PROD_TYPE,\n} from \"../../grammar/lookahead.js\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\n/**\n * Trait responsible for runtime parsing errors.\n */\nexport class ErrorHandler {\n _errors: IRecognitionException[];\n errorMessageProvider: IParserErrorMessageProvider;\n\n initErrorHandler(config: IParserConfig) {\n this._errors = [];\n this.errorMessageProvider = has(config, \"errorMessageProvider\")\n ? (config.errorMessageProvider as IParserErrorMessageProvider) // assumes end user provides the correct config value/type\n : DEFAULT_PARSER_CONFIG.errorMessageProvider;\n }\n\n SAVE_ERROR(\n this: MixedInParser,\n error: IRecognitionException,\n ): IRecognitionException {\n if (isRecognitionException(error)) {\n error.context = {\n ruleStack: this.getHumanReadableRuleStack(),\n ruleOccurrenceStack: clone(this.RULE_OCCURRENCE_STACK),\n };\n this._errors.push(error);\n return error;\n } else {\n throw Error(\n \"Trying to save an Error which is not a RecognitionException\",\n );\n }\n }\n\n get errors(): IRecognitionException[] {\n return clone(this._errors);\n }\n\n set errors(newErrors: IRecognitionException[]) {\n this._errors = newErrors;\n }\n\n // TODO: consider caching the error message computed information\n raiseEarlyExitException(\n this: MixedInParser,\n occurrence: number,\n prodType: PROD_TYPE,\n userDefinedErrMsg: string | undefined,\n ): never {\n const ruleName = this.getCurrRuleFullName();\n const ruleGrammar = this.getGAstProductions()[ruleName];\n const lookAheadPathsPerAlternative = getLookaheadPathsForOptionalProd(\n occurrence,\n ruleGrammar,\n prodType,\n this.maxLookahead,\n );\n const insideProdPaths = lookAheadPathsPerAlternative[0];\n const actualTokens = [];\n for (let i = 1; i <= this.maxLookahead; i++) {\n actualTokens.push(this.LA(i));\n }\n const msg = this.errorMessageProvider.buildEarlyExitMessage({\n expectedIterationPaths: insideProdPaths,\n actual: actualTokens,\n previous: this.LA(0),\n customUserDescription: userDefinedErrMsg,\n ruleName: ruleName,\n });\n\n throw this.SAVE_ERROR(new EarlyExitException(msg, this.LA(1), this.LA(0)));\n }\n\n // TODO: consider caching the error message computed information\n raiseNoAltException(\n this: MixedInParser,\n occurrence: number,\n errMsgTypes: string | undefined,\n ): never {\n const ruleName = this.getCurrRuleFullName();\n const ruleGrammar = this.getGAstProductions()[ruleName];\n // TODO: getLookaheadPathsForOr can be slow for large enough maxLookahead and certain grammars, consider caching ?\n const lookAheadPathsPerAlternative = getLookaheadPathsForOr(\n occurrence,\n ruleGrammar,\n this.maxLookahead,\n );\n\n const actualTokens = [];\n for (let i = 1; i <= this.maxLookahead; i++) {\n actualTokens.push(this.LA(i));\n }\n const previousToken = this.LA(0);\n\n const errMsg = this.errorMessageProvider.buildNoViableAltMessage({\n expectedPathsPerAlt: lookAheadPathsPerAlternative,\n actual: actualTokens,\n previous: previousToken,\n customUserDescription: errMsgTypes,\n ruleName: this.getCurrRuleFullName(),\n });\n\n throw this.SAVE_ERROR(\n new NoViableAltException(errMsg, this.LA(1), previousToken),\n );\n }\n}\n", "import {\n ISyntacticContentAssistPath,\n IToken,\n ITokenGrammarPath,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n NextAfterTokenWalker,\n nextPossibleTokensAfter,\n} from \"../../grammar/interpreter.js\";\nimport { first, isUndefined } from \"lodash-es\";\nimport { MixedInParser } from \"./parser_traits.js\";\n\nexport class ContentAssist {\n initContentAssist() {}\n\n public computeContentAssist(\n this: MixedInParser,\n startRuleName: string,\n precedingInput: IToken[],\n ): ISyntacticContentAssistPath[] {\n const startRuleGast = this.gastProductionsCache[startRuleName];\n\n if (isUndefined(startRuleGast)) {\n throw Error(`Rule ->${startRuleName}<- does not exist in this grammar.`);\n }\n\n return nextPossibleTokensAfter(\n [startRuleGast],\n precedingInput,\n this.tokenMatcher,\n this.maxLookahead,\n );\n }\n\n // TODO: should this be a member method or a utility? it does not have any state or usage of 'this'...\n // TODO: should this be more explicitly part of the public API?\n public getNextPossibleTokenTypes(\n this: MixedInParser,\n grammarPath: ITokenGrammarPath,\n ): TokenType[] {\n const topRuleName = first(grammarPath.ruleStack)!;\n const gastProductions = this.getGAstProductions();\n const topProduction = gastProductions[topRuleName];\n const nextPossibleTokenTypes = new NextAfterTokenWalker(\n topProduction,\n grammarPath,\n ).startWalking();\n return nextPossibleTokenTypes;\n }\n}\n", "import {\n AtLeastOneSepMethodOpts,\n ConsumeMethodOpts,\n CstNode,\n DSLMethodOpts,\n DSLMethodOptsWithErr,\n GrammarAction,\n IOrAlt,\n IParserConfig,\n IProduction,\n IToken,\n ManySepMethodOpts,\n OrMethodOpts,\n SubruleMethodOpts,\n TokenType,\n} from \"@chevrotain/types\";\nimport {\n forEach,\n has,\n isArray,\n isFunction,\n last as peek,\n some,\n} from \"lodash-es\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\nimport { Lexer } from \"../../../scan/lexer_public.js\";\nimport {\n augmentTokenTypes,\n hasShortKeyProperty,\n} from \"../../../scan/tokens.js\";\nimport {\n createToken,\n createTokenInstance,\n} from \"../../../scan/tokens_public.js\";\nimport { END_OF_FILE } from \"../parser.js\";\nimport { BITS_FOR_OCCURRENCE_IDX } from \"../../grammar/keys.js\";\nimport { ParserMethodInternal } from \"../types.js\";\n\ntype ProdWithDef = IProduction & { definition?: IProduction[] };\nconst RECORDING_NULL_OBJECT = {\n description: \"This Object indicates the Parser is during Recording Phase\",\n};\nObject.freeze(RECORDING_NULL_OBJECT);\n\nconst HANDLE_SEPARATOR = true;\nconst MAX_METHOD_IDX = Math.pow(2, BITS_FOR_OCCURRENCE_IDX) - 1;\n\nconst RFT = createToken({ name: \"RECORDING_PHASE_TOKEN\", pattern: Lexer.NA });\naugmentTokenTypes([RFT]);\nconst RECORDING_PHASE_TOKEN = createTokenInstance(\n RFT,\n \"This IToken indicates the Parser is in Recording Phase\\n\\t\" +\n \"\" +\n \"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details\",\n // Using \"-1\" instead of NaN (as in EOF) because an actual number is less likely to\n // cause errors if the output of LA or CONSUME would be (incorrectly) used during the recording phase.\n -1,\n -1,\n -1,\n -1,\n -1,\n -1,\n);\nObject.freeze(RECORDING_PHASE_TOKEN);\n\nconst RECORDING_PHASE_CSTNODE: CstNode = {\n name:\n \"This CSTNode indicates the Parser is in Recording Phase\\n\\t\" +\n \"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details\",\n children: {},\n};\n\n/**\n * This trait handles the creation of the GAST structure for Chevrotain Grammars\n */\nexport class GastRecorder {\n recordingProdStack: ProdWithDef[];\n RECORDING_PHASE: boolean;\n\n initGastRecorder(this: MixedInParser, config: IParserConfig): void {\n this.recordingProdStack = [];\n this.RECORDING_PHASE = false;\n }\n\n enableRecording(this: MixedInParser): void {\n this.RECORDING_PHASE = true;\n\n this.TRACE_INIT(\"Enable Recording\", () => {\n /**\n * Warning Dark Voodoo Magic upcoming!\n * We are \"replacing\" the public parsing DSL methods API\n * With **new** alternative implementations on the Parser **instance**\n *\n * So far this is the only way I've found to avoid performance regressions during parsing time.\n * - Approx 30% performance regression was measured on Chrome 75 Canary when attempting to replace the \"internal\"\n * implementations directly instead.\n */\n for (let i = 0; i < 10; i++) {\n const idx = i > 0 ? i : \"\";\n this[`CONSUME${idx}` as \"CONSUME\"] = function (arg1, arg2) {\n return this.consumeInternalRecord(arg1, i, arg2);\n };\n this[`SUBRULE${idx}` as \"SUBRULE\"] = function (arg1, arg2) {\n return this.subruleInternalRecord(arg1, i, arg2) as any;\n };\n this[`OPTION${idx}` as \"OPTION\"] = function (arg1) {\n return this.optionInternalRecord(arg1, i);\n };\n this[`OR${idx}` as \"OR\"] = function (arg1) {\n return this.orInternalRecord(arg1, i);\n };\n this[`MANY${idx}` as \"MANY\"] = function (arg1) {\n this.manyInternalRecord(i, arg1);\n };\n this[`MANY_SEP${idx}` as \"MANY_SEP\"] = function (arg1) {\n this.manySepFirstInternalRecord(i, arg1);\n };\n this[`AT_LEAST_ONE${idx}` as \"AT_LEAST_ONE\"] = function (arg1) {\n this.atLeastOneInternalRecord(i, arg1);\n };\n this[`AT_LEAST_ONE_SEP${idx}` as \"AT_LEAST_ONE_SEP\"] = function (arg1) {\n this.atLeastOneSepFirstInternalRecord(i, arg1);\n };\n }\n\n // DSL methods with the idx(suffix) as an argument\n this[`consume`] = function (idx, arg1, arg2) {\n return this.consumeInternalRecord(arg1, idx, arg2);\n };\n this[`subrule`] = function (idx, arg1, arg2) {\n return this.subruleInternalRecord(arg1, idx, arg2) as any;\n };\n this[`option`] = function (idx, arg1) {\n return this.optionInternalRecord(arg1, idx);\n };\n this[`or`] = function (idx, arg1) {\n return this.orInternalRecord(arg1, idx);\n };\n this[`many`] = function (idx, arg1) {\n this.manyInternalRecord(idx, arg1);\n };\n this[`atLeastOne`] = function (idx, arg1) {\n this.atLeastOneInternalRecord(idx, arg1);\n };\n\n this.ACTION = this.ACTION_RECORD;\n this.BACKTRACK = this.BACKTRACK_RECORD;\n this.LA = this.LA_RECORD;\n });\n }\n\n disableRecording(this: MixedInParser) {\n this.RECORDING_PHASE = false;\n // By deleting these **instance** properties, any future invocation\n // will be deferred to the original methods on the **prototype** object\n // This seems to get rid of any incorrect optimizations that V8 may\n // do during the recording phase.\n this.TRACE_INIT(\"Deleting Recording methods\", () => {\n const that: any = this;\n\n for (let i = 0; i < 10; i++) {\n const idx = i > 0 ? i : \"\";\n delete that[`CONSUME${idx}`];\n delete that[`SUBRULE${idx}`];\n delete that[`OPTION${idx}`];\n delete that[`OR${idx}`];\n delete that[`MANY${idx}`];\n delete that[`MANY_SEP${idx}`];\n delete that[`AT_LEAST_ONE${idx}`];\n delete that[`AT_LEAST_ONE_SEP${idx}`];\n }\n\n delete that[`consume`];\n delete that[`subrule`];\n delete that[`option`];\n delete that[`or`];\n delete that[`many`];\n delete that[`atLeastOne`];\n\n delete that.ACTION;\n delete that.BACKTRACK;\n delete that.LA;\n });\n }\n\n // Parser methods are called inside an ACTION?\n // Maybe try/catch/finally on ACTIONS while disabling the recorders state changes?\n // @ts-expect-error -- noop place holder\n ACTION_RECORD(this: MixedInParser, impl: () => T): T {\n // NO-OP during recording\n }\n\n // Executing backtracking logic will break our recording logic assumptions\n BACKTRACK_RECORD(\n grammarRule: (...args: any[]) => T,\n args?: any[],\n ): () => boolean {\n return () => true;\n }\n\n // LA is part of the official API and may be used for custom lookahead logic\n // by end users who may forget to wrap it in ACTION or inside a GATE\n LA_RECORD(howMuch: number): IToken {\n // We cannot use the RECORD_PHASE_TOKEN here because someone may depend\n // On LA return EOF at the end of the input so an infinite loop may occur.\n return END_OF_FILE;\n }\n\n topLevelRuleRecord(name: string, def: Function): Rule {\n try {\n const newTopLevelRule = new Rule({ definition: [], name: name });\n newTopLevelRule.name = name;\n this.recordingProdStack.push(newTopLevelRule);\n def.call(this);\n this.recordingProdStack.pop();\n return newTopLevelRule;\n } catch (originalError) {\n if (originalError.KNOWN_RECORDER_ERROR !== true) {\n try {\n originalError.message =\n originalError.message +\n '\\n\\t This error was thrown during the \"grammar recording phase\" For more info see:\\n\\t' +\n \"https://chevrotain.io/docs/guide/internals.html#grammar-recording\";\n } catch (mutabilityError) {\n // We may not be able to modify the original error object\n throw originalError;\n }\n }\n throw originalError;\n }\n }\n\n // Implementation of parsing DSL\n optionInternalRecord(\n this: MixedInParser,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n occurrence: number,\n ): OUT {\n return recordProd.call(this, Option, actionORMethodDef, occurrence);\n }\n\n atLeastOneInternalRecord(\n this: MixedInParser,\n occurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOptsWithErr,\n ): void {\n recordProd.call(this, RepetitionMandatory, actionORMethodDef, occurrence);\n }\n\n atLeastOneSepFirstInternalRecord(\n this: MixedInParser,\n occurrence: number,\n options: AtLeastOneSepMethodOpts,\n ): void {\n recordProd.call(\n this,\n RepetitionMandatoryWithSeparator,\n options,\n occurrence,\n HANDLE_SEPARATOR,\n );\n }\n\n manyInternalRecord(\n this: MixedInParser,\n occurrence: number,\n actionORMethodDef: GrammarAction | DSLMethodOpts,\n ): void {\n recordProd.call(this, Repetition, actionORMethodDef, occurrence);\n }\n\n manySepFirstInternalRecord(\n this: MixedInParser,\n occurrence: number,\n options: ManySepMethodOpts,\n ): void {\n recordProd.call(\n this,\n RepetitionWithSeparator,\n options,\n occurrence,\n HANDLE_SEPARATOR,\n );\n }\n\n orInternalRecord(\n this: MixedInParser,\n altsOrOpts: IOrAlt[] | OrMethodOpts,\n occurrence: number,\n ): T {\n return recordOrProd.call(this, altsOrOpts, occurrence);\n }\n\n subruleInternalRecord(\n this: MixedInParser,\n ruleToCall: ParserMethodInternal,\n occurrence: number,\n options?: SubruleMethodOpts,\n ): R | CstNode {\n assertMethodIdxIsValid(occurrence);\n if (!ruleToCall || has(ruleToCall, \"ruleName\") === false) {\n const error: any = new Error(\n ` argument is invalid` +\n ` expecting a Parser method reference but got: <${JSON.stringify(\n ruleToCall,\n )}>` +\n `\\n inside top level rule: <${\n (this.recordingProdStack[0]).name\n }>`,\n );\n error.KNOWN_RECORDER_ERROR = true;\n throw error;\n }\n\n const prevProd: any = peek(this.recordingProdStack);\n const ruleName = ruleToCall.ruleName;\n const newNoneTerminal = new NonTerminal({\n idx: occurrence,\n nonTerminalName: ruleName,\n label: options?.LABEL,\n // The resolving of the `referencedRule` property will be done once all the Rule's GASTs have been created\n referencedRule: undefined,\n });\n prevProd.definition.push(newNoneTerminal);\n\n return this.outputCst\n ? RECORDING_PHASE_CSTNODE\n : RECORDING_NULL_OBJECT;\n }\n\n consumeInternalRecord(\n this: MixedInParser,\n tokType: TokenType,\n occurrence: number,\n options?: ConsumeMethodOpts,\n ): IToken {\n assertMethodIdxIsValid(occurrence);\n if (!hasShortKeyProperty(tokType)) {\n const error: any = new Error(\n ` argument is invalid` +\n ` expecting a TokenType reference but got: <${JSON.stringify(\n tokType,\n )}>` +\n `\\n inside top level rule: <${\n (this.recordingProdStack[0]).name\n }>`,\n );\n error.KNOWN_RECORDER_ERROR = true;\n throw error;\n }\n const prevProd: any = peek(this.recordingProdStack);\n const newNoneTerminal = new Terminal({\n idx: occurrence,\n terminalType: tokType,\n label: options?.LABEL,\n });\n prevProd.definition.push(newNoneTerminal);\n\n return RECORDING_PHASE_TOKEN;\n }\n}\n\nfunction recordProd(\n prodConstructor: any,\n mainProdArg: any,\n occurrence: number,\n handleSep: boolean = false,\n): any {\n assertMethodIdxIsValid(occurrence);\n const prevProd: any = peek(this.recordingProdStack);\n const grammarAction = isFunction(mainProdArg) ? mainProdArg : mainProdArg.DEF;\n\n const newProd = new prodConstructor({ definition: [], idx: occurrence });\n if (handleSep) {\n newProd.separator = mainProdArg.SEP;\n }\n if (has(mainProdArg, \"MAX_LOOKAHEAD\")) {\n newProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD;\n }\n\n this.recordingProdStack.push(newProd);\n grammarAction.call(this);\n prevProd.definition.push(newProd);\n this.recordingProdStack.pop();\n\n return RECORDING_NULL_OBJECT;\n}\n\nfunction recordOrProd(mainProdArg: any, occurrence: number): any {\n assertMethodIdxIsValid(occurrence);\n const prevProd: any = peek(this.recordingProdStack);\n // Only an array of alternatives\n const hasOptions = isArray(mainProdArg) === false;\n const alts: IOrAlt[] =\n hasOptions === false ? mainProdArg : mainProdArg.DEF;\n\n const newOrProd = new Alternation({\n definition: [],\n idx: occurrence,\n ignoreAmbiguities: hasOptions && mainProdArg.IGNORE_AMBIGUITIES === true,\n });\n if (has(mainProdArg, \"MAX_LOOKAHEAD\")) {\n newOrProd.maxLookahead = mainProdArg.MAX_LOOKAHEAD;\n }\n\n const hasPredicates = some(alts, (currAlt: any) => isFunction(currAlt.GATE));\n newOrProd.hasPredicates = hasPredicates;\n\n prevProd.definition.push(newOrProd);\n\n forEach(alts, (currAlt) => {\n const currAltFlat = new Alternative({ definition: [] });\n newOrProd.definition.push(currAltFlat);\n if (has(currAlt, \"IGNORE_AMBIGUITIES\")) {\n currAltFlat.ignoreAmbiguities = currAlt.IGNORE_AMBIGUITIES as boolean; // assumes end user provides the correct config value/type\n }\n // **implicit** ignoreAmbiguities due to usage of gate\n else if (has(currAlt, \"GATE\")) {\n currAltFlat.ignoreAmbiguities = true;\n }\n this.recordingProdStack.push(currAltFlat);\n currAlt.ALT.call(this);\n this.recordingProdStack.pop();\n });\n return RECORDING_NULL_OBJECT;\n}\n\nfunction getIdxSuffix(idx: number): string {\n return idx === 0 ? \"\" : `${idx}`;\n}\n\nfunction assertMethodIdxIsValid(idx: number): void {\n if (idx < 0 || idx > MAX_METHOD_IDX) {\n const error: any = new Error(\n // The stack trace will contain all the needed details\n `Invalid DSL Method idx value: <${idx}>\\n\\t` +\n `Idx value must be a none negative value smaller than ${\n MAX_METHOD_IDX + 1\n }`,\n );\n error.KNOWN_RECORDER_ERROR = true;\n throw error;\n }\n}\n", "import { IParserConfig } from \"@chevrotain/types\";\nimport { has } from \"lodash-es\";\nimport { timer } from \"@chevrotain/utils\";\nimport { MixedInParser } from \"./parser_traits.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser.js\";\n\n/**\n * Trait responsible for runtime parsing errors.\n */\nexport class PerformanceTracer {\n traceInitPerf: boolean | number;\n traceInitMaxIdent: number;\n traceInitIndent: number;\n\n initPerformanceTracer(config: IParserConfig) {\n if (has(config, \"traceInitPerf\")) {\n const userTraceInitPerf = config.traceInitPerf;\n const traceIsNumber = typeof userTraceInitPerf === \"number\";\n this.traceInitMaxIdent = traceIsNumber\n ? userTraceInitPerf\n : Infinity;\n this.traceInitPerf = traceIsNumber\n ? userTraceInitPerf > 0\n : (userTraceInitPerf as boolean); // assumes end user provides the correct config value/type\n } else {\n this.traceInitMaxIdent = 0;\n this.traceInitPerf = DEFAULT_PARSER_CONFIG.traceInitPerf;\n }\n\n this.traceInitIndent = -1;\n }\n\n TRACE_INIT(this: MixedInParser, phaseDesc: string, phaseImpl: () => T): T {\n // No need to optimize this using NOOP pattern because\n // It is not called in a hot spot...\n if (this.traceInitPerf === true) {\n this.traceInitIndent++;\n const indent = new Array(this.traceInitIndent + 1).join(\"\\t\");\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n console.log(`${indent}--> <${phaseDesc}>`);\n }\n const { time, value } = timer(phaseImpl);\n /* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */\n const traceMethod = time > 10 ? console.warn : console.log;\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n traceMethod(`${indent}<-- <${phaseDesc}> time: ${time}ms`);\n }\n this.traceInitIndent--;\n return value;\n } else {\n return phaseImpl();\n }\n }\n}\n", "export function applyMixins(derivedCtor: any, baseCtors: any[]) {\n baseCtors.forEach((baseCtor) => {\n const baseProto = baseCtor.prototype;\n Object.getOwnPropertyNames(baseProto).forEach((propName) => {\n if (propName === \"constructor\") {\n return;\n }\n\n const basePropDescriptor = Object.getOwnPropertyDescriptor(\n baseProto,\n propName,\n );\n // Handle Accessors\n if (\n basePropDescriptor &&\n (basePropDescriptor.get || basePropDescriptor.set)\n ) {\n Object.defineProperty(\n derivedCtor.prototype,\n propName,\n basePropDescriptor,\n );\n } else {\n derivedCtor.prototype[propName] = baseCtor.prototype[propName];\n }\n });\n });\n}\n", "import { clone, forEach, has, isEmpty, map, values } from \"lodash-es\";\nimport { toFastProperties } from \"@chevrotain/utils\";\nimport { computeAllProdsFollows } from \"../grammar/follow.js\";\nimport { createTokenInstance, EOF } from \"../../scan/tokens_public.js\";\nimport {\n defaultGrammarValidatorErrorProvider,\n defaultParserErrorProvider,\n} from \"../errors_public.js\";\nimport {\n resolveGrammar,\n validateGrammar,\n} from \"../grammar/gast/gast_resolver_public.js\";\nimport {\n CstNode,\n IParserConfig,\n IRecognitionException,\n IRuleConfig,\n IToken,\n TokenType,\n TokenVocabulary,\n} from \"@chevrotain/types\";\nimport { Recoverable } from \"./traits/recoverable.js\";\nimport { LooksAhead } from \"./traits/looksahead.js\";\nimport { TreeBuilder } from \"./traits/tree_builder.js\";\nimport { LexerAdapter } from \"./traits/lexer_adapter.js\";\nimport { RecognizerApi } from \"./traits/recognizer_api.js\";\nimport { RecognizerEngine } from \"./traits/recognizer_engine.js\";\n\nimport { ErrorHandler } from \"./traits/error_handler.js\";\nimport { MixedInParser } from \"./traits/parser_traits.js\";\nimport { ContentAssist } from \"./traits/context_assist.js\";\nimport { GastRecorder } from \"./traits/gast_recorder.js\";\nimport { PerformanceTracer } from \"./traits/perf_tracer.js\";\nimport { applyMixins } from \"./utils/apply_mixins.js\";\nimport { IParserDefinitionError } from \"../grammar/types.js\";\nimport { Rule } from \"@chevrotain/gast\";\nimport { IParserConfigInternal, ParserMethodInternal } from \"./types.js\";\nimport { validateLookahead } from \"../grammar/checks.js\";\n\nexport const END_OF_FILE = createTokenInstance(\n EOF,\n \"\",\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n NaN,\n);\nObject.freeze(END_OF_FILE);\n\nexport type TokenMatcher = (token: IToken, tokType: TokenType) => boolean;\n\nexport const DEFAULT_PARSER_CONFIG: Required<\n Omit\n> = Object.freeze({\n recoveryEnabled: false,\n maxLookahead: 3,\n dynamicTokensEnabled: false,\n outputCst: true,\n errorMessageProvider: defaultParserErrorProvider,\n nodeLocationTracking: \"none\",\n traceInitPerf: false,\n skipValidations: false,\n});\n\nexport const DEFAULT_RULE_CONFIG: Required> = Object.freeze({\n recoveryValueFunc: () => undefined,\n resyncEnabled: true,\n});\n\nexport enum ParserDefinitionErrorType {\n INVALID_RULE_NAME = 0,\n DUPLICATE_RULE_NAME = 1,\n INVALID_RULE_OVERRIDE = 2,\n DUPLICATE_PRODUCTIONS = 3,\n UNRESOLVED_SUBRULE_REF = 4,\n LEFT_RECURSION = 5,\n NONE_LAST_EMPTY_ALT = 6,\n AMBIGUOUS_ALTS = 7,\n CONFLICT_TOKENS_RULES_NAMESPACE = 8,\n INVALID_TOKEN_NAME = 9,\n NO_NON_EMPTY_LOOKAHEAD = 10,\n AMBIGUOUS_PREFIX_ALTS = 11,\n TOO_MANY_ALTS = 12,\n CUSTOM_LOOKAHEAD_VALIDATION = 13,\n}\n\nexport interface IParserDuplicatesDefinitionError\n extends IParserDefinitionError {\n dslName: string;\n occurrence: number;\n parameter?: string;\n}\n\nexport interface IParserEmptyAlternativeDefinitionError\n extends IParserDefinitionError {\n occurrence: number;\n alternative: number;\n}\n\nexport interface IParserAmbiguousAlternativesDefinitionError\n extends IParserDefinitionError {\n occurrence: number | string;\n alternatives: number[];\n}\n\nexport interface IParserUnresolvedRefDefinitionError\n extends IParserDefinitionError {\n unresolvedRefName: string;\n}\n\nexport interface IParserState {\n errors: IRecognitionException[];\n lexerState: any;\n RULE_STACK: number[];\n CST_STACK: CstNode[];\n}\n\nexport type Predicate = () => boolean;\n\nexport function EMPTY_ALT(): () => undefined;\nexport function EMPTY_ALT(value: T): () => T;\nexport function EMPTY_ALT(value: any = undefined) {\n return function () {\n return value;\n };\n}\n\nexport class Parser {\n // Set this flag to true if you don't want the Parser to throw error when problems in it's definition are detected.\n // (normally during the parser's constructor).\n // This is a design time flag, it will not affect the runtime error handling of the parser, just design time errors,\n // for example: duplicate rule names, referencing an unresolved subrule, ect...\n // This flag should not be enabled during normal usage, it is used in special situations, for example when\n // needing to display the parser definition errors in some GUI(online playground).\n static DEFER_DEFINITION_ERRORS_HANDLING: boolean = false;\n\n /**\n * @deprecated use the **instance** method with the same name instead\n */\n static performSelfAnalysis(parserInstance: Parser): void {\n throw Error(\n \"The **static** `performSelfAnalysis` method has been deprecated.\" +\n \"\\t\\nUse the **instance** method with the same name instead.\",\n );\n }\n\n public performSelfAnalysis(this: MixedInParser): void {\n this.TRACE_INIT(\"performSelfAnalysis\", () => {\n let defErrorsMsgs;\n\n this.selfAnalysisDone = true;\n const className = this.className;\n\n this.TRACE_INIT(\"toFastProps\", () => {\n // Without this voodoo magic the parser would be x3-x4 slower\n // It seems it is better to invoke `toFastProperties` **before**\n // Any manipulations of the `this` object done during the recording phase.\n toFastProperties(this);\n });\n\n this.TRACE_INIT(\"Grammar Recording\", () => {\n try {\n this.enableRecording();\n // Building the GAST\n forEach(this.definedRulesNames, (currRuleName) => {\n const wrappedRule = (this as any)[\n currRuleName\n ] as ParserMethodInternal;\n const originalGrammarAction = wrappedRule[\"originalGrammarAction\"];\n let recordedRuleGast!: Rule;\n this.TRACE_INIT(`${currRuleName} Rule`, () => {\n recordedRuleGast = this.topLevelRuleRecord(\n currRuleName,\n originalGrammarAction,\n );\n });\n this.gastProductionsCache[currRuleName] = recordedRuleGast;\n });\n } finally {\n this.disableRecording();\n }\n });\n\n let resolverErrors: IParserDefinitionError[] = [];\n this.TRACE_INIT(\"Grammar Resolving\", () => {\n resolverErrors = resolveGrammar({\n rules: values(this.gastProductionsCache),\n });\n this.definitionErrors = this.definitionErrors.concat(resolverErrors);\n });\n\n this.TRACE_INIT(\"Grammar Validations\", () => {\n // only perform additional grammar validations IFF no resolving errors have occurred.\n // as unresolved grammar may lead to unhandled runtime exceptions in the follow up validations.\n if (isEmpty(resolverErrors) && this.skipValidations === false) {\n const validationErrors = validateGrammar({\n rules: values(this.gastProductionsCache),\n tokenTypes: values(this.tokensMap),\n errMsgProvider: defaultGrammarValidatorErrorProvider,\n grammarName: className,\n });\n const lookaheadValidationErrors = validateLookahead({\n lookaheadStrategy: this.lookaheadStrategy,\n rules: values(this.gastProductionsCache),\n tokenTypes: values(this.tokensMap),\n grammarName: className,\n });\n this.definitionErrors = this.definitionErrors.concat(\n validationErrors,\n lookaheadValidationErrors,\n );\n }\n });\n\n // this analysis may fail if the grammar is not perfectly valid\n if (isEmpty(this.definitionErrors)) {\n // The results of these computations are not needed unless error recovery is enabled.\n if (this.recoveryEnabled) {\n this.TRACE_INIT(\"computeAllProdsFollows\", () => {\n const allFollows = computeAllProdsFollows(\n values(this.gastProductionsCache),\n );\n this.resyncFollows = allFollows;\n });\n }\n\n this.TRACE_INIT(\"ComputeLookaheadFunctions\", () => {\n this.lookaheadStrategy.initialize?.({\n rules: values(this.gastProductionsCache),\n });\n this.preComputeLookaheadFunctions(values(this.gastProductionsCache));\n });\n }\n\n if (\n !Parser.DEFER_DEFINITION_ERRORS_HANDLING &&\n !isEmpty(this.definitionErrors)\n ) {\n defErrorsMsgs = map(\n this.definitionErrors,\n (defError) => defError.message,\n );\n throw new Error(\n `Parser Definition Errors detected:\\n ${defErrorsMsgs.join(\n \"\\n-------------------------------\\n\",\n )}`,\n );\n }\n });\n }\n\n definitionErrors: IParserDefinitionError[] = [];\n selfAnalysisDone = false;\n protected skipValidations: boolean;\n\n constructor(tokenVocabulary: TokenVocabulary, config: IParserConfig) {\n const that: MixedInParser = this as any;\n that.initErrorHandler(config);\n that.initLexerAdapter();\n that.initLooksAhead(config);\n that.initRecognizerEngine(tokenVocabulary, config);\n that.initRecoverable(config);\n that.initTreeBuilder(config);\n that.initContentAssist();\n that.initGastRecorder(config);\n that.initPerformanceTracer(config);\n\n if (has(config, \"ignoredIssues\")) {\n throw new Error(\n \"The IParserConfig property has been deprecated.\\n\\t\" +\n \"Please use the flag on the relevant DSL method instead.\\n\\t\" +\n \"See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\\n\\t\" +\n \"For further details.\",\n );\n }\n\n this.skipValidations = has(config, \"skipValidations\")\n ? (config.skipValidations as boolean) // casting assumes the end user passing the correct type\n : DEFAULT_PARSER_CONFIG.skipValidations;\n }\n}\n\napplyMixins(Parser, [\n Recoverable,\n LooksAhead,\n TreeBuilder,\n LexerAdapter,\n RecognizerEngine,\n RecognizerApi,\n ErrorHandler,\n ContentAssist,\n GastRecorder,\n PerformanceTracer,\n]);\n\nexport class CstParser extends Parser {\n constructor(\n tokenVocabulary: TokenVocabulary,\n config: IParserConfigInternal = DEFAULT_PARSER_CONFIG,\n ) {\n const configClone = clone(config);\n configClone.outputCst = true;\n super(tokenVocabulary, configClone);\n }\n}\n\nexport class EmbeddedActionsParser extends Parser {\n constructor(\n tokenVocabulary: TokenVocabulary,\n config: IParserConfigInternal = DEFAULT_PARSER_CONFIG,\n ) {\n const configClone = clone(config);\n configClone.outputCst = false;\n super(tokenVocabulary, configClone);\n }\n}\n", "import type {\n Alternation,\n Alternative,\n IProduction,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n TokenType,\n} from \"@chevrotain/types\";\nimport { GAstVisitor, NonTerminal } from \"@chevrotain/gast\";\nimport { assign, flatten, groupBy, map, some, values } from \"lodash-es\";\n\nexport function buildModel(\n productions: Record,\n): CstNodeTypeDefinition[] {\n const generator = new CstNodeDefinitionGenerator();\n const allRules = values(productions);\n return map(allRules, (rule) => generator.visitRule(rule));\n}\n\nexport type CstNodeTypeDefinition = {\n name: string;\n properties: PropertyTypeDefinition[];\n};\n\nexport type PropertyTypeDefinition = {\n name: string;\n type: PropertyArrayType;\n optional: boolean;\n};\n\nexport type PropertyArrayType =\n | TokenArrayType\n | RuleArrayType\n | (TokenArrayType | RuleArrayType)[];\n\nexport type TokenArrayType = { kind: \"token\" };\nexport type RuleArrayType = {\n kind: \"rule\";\n name: string;\n};\n\nclass CstNodeDefinitionGenerator extends GAstVisitor {\n visitRule(node: Rule): CstNodeTypeDefinition {\n const rawElements = this.visitEach(node.definition);\n\n const grouped = groupBy(rawElements, (el) => el.propertyName);\n const properties = map(grouped, (group, propertyName) => {\n const allNullable = !some(group, (el) => !el.canBeNull);\n\n // In an alternation with a label a property name can have\n // multiple types.\n let propertyType: PropertyArrayType = group[0].type;\n if (group.length > 1) {\n propertyType = map(group, (g) => g.type);\n }\n\n return {\n name: propertyName,\n type: propertyType,\n optional: allNullable,\n } as PropertyTypeDefinition;\n });\n\n return {\n name: node.name,\n properties: properties,\n };\n }\n\n visitAlternative(node: Alternative) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitOption(node: Option) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitRepetition(node: Repetition) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitRepetitionMandatory(node: RepetitionMandatory) {\n return this.visitEach(node.definition);\n }\n\n visitRepetitionMandatoryWithSeparator(\n node: RepetitionMandatoryWithSeparator,\n ) {\n return this.visitEach(node.definition).concat({\n propertyName: node.separator.name,\n canBeNull: true,\n type: getType(node.separator),\n });\n }\n\n visitRepetitionWithSeparator(node: RepetitionWithSeparator) {\n return this.visitEachAndOverrideWith(node.definition, {\n canBeNull: true,\n }).concat({\n propertyName: node.separator.name,\n canBeNull: true,\n type: getType(node.separator),\n });\n }\n\n visitAlternation(node: Alternation) {\n return this.visitEachAndOverrideWith(node.definition, { canBeNull: true });\n }\n\n visitTerminal(node: Terminal): PropertyTupleElement[] {\n return [\n {\n propertyName: node.label || node.terminalType.name,\n canBeNull: false,\n type: getType(node),\n },\n ];\n }\n\n visitNonTerminal(node: NonTerminal): PropertyTupleElement[] {\n return [\n {\n propertyName: node.label || node.nonTerminalName,\n canBeNull: false,\n type: getType(node),\n },\n ];\n }\n\n private visitEachAndOverrideWith(\n definition: IProduction[],\n override: Partial,\n ) {\n return map(\n this.visitEach(definition),\n (definition) => assign({}, definition, override) as PropertyTupleElement,\n );\n }\n\n private visitEach(definition: IProduction[]) {\n return flatten(\n map(\n definition,\n (definition) => this.visit(definition) as PropertyTupleElement[],\n ),\n );\n }\n}\n\ntype PropertyTupleElement = {\n propertyName: string;\n canBeNull: boolean;\n type: TokenArrayType | RuleArrayType;\n};\n\nfunction getType(\n production: Terminal | NonTerminal | TokenType,\n): TokenArrayType | RuleArrayType {\n if (production instanceof NonTerminal) {\n return {\n kind: \"rule\",\n name: production.referencedRule.name,\n };\n }\n\n return { kind: \"token\" };\n}\n", "import { flatten, isArray, map, reduce, uniq, upperFirst } from \"lodash-es\";\nimport { GenerateDtsOptions } from \"@chevrotain/types\";\nimport {\n CstNodeTypeDefinition,\n PropertyArrayType,\n PropertyTypeDefinition,\n RuleArrayType,\n TokenArrayType,\n} from \"./model.js\";\n\nexport function genDts(\n model: CstNodeTypeDefinition[],\n options: Required,\n): string {\n let contentParts: string[] = [];\n\n contentParts = contentParts.concat(\n `import type { CstNode, ICstVisitor, IToken } from \"chevrotain\";`,\n );\n\n contentParts = contentParts.concat(\n flatten(map(model, (node) => genCstNodeTypes(node))),\n );\n\n if (options.includeVisitorInterface) {\n contentParts = contentParts.concat(\n genVisitor(options.visitorInterfaceName, model),\n );\n }\n\n return contentParts.join(\"\\n\\n\") + \"\\n\";\n}\n\nfunction genCstNodeTypes(node: CstNodeTypeDefinition) {\n const nodeCstInterface = genNodeInterface(node);\n const nodeChildrenInterface = genNodeChildrenType(node);\n\n return [nodeCstInterface, nodeChildrenInterface];\n}\n\nfunction genNodeInterface(node: CstNodeTypeDefinition) {\n const nodeInterfaceName = getNodeInterfaceName(node.name);\n const childrenTypeName = getNodeChildrenTypeName(node.name);\n\n return `export interface ${nodeInterfaceName} extends CstNode {\n name: \"${node.name}\";\n children: ${childrenTypeName};\n}`;\n}\n\nfunction genNodeChildrenType(node: CstNodeTypeDefinition) {\n const typeName = getNodeChildrenTypeName(node.name);\n\n return `export type ${typeName} = {\n ${map(node.properties, (property) => genChildProperty(property)).join(\"\\n \")}\n};`;\n}\n\nfunction genChildProperty(prop: PropertyTypeDefinition) {\n const typeName = buildTypeString(prop.type);\n return `${prop.name}${prop.optional ? \"?\" : \"\"}: ${typeName}[];`;\n}\n\nfunction genVisitor(name: string, nodes: CstNodeTypeDefinition[]) {\n return `export interface ${name} extends ICstVisitor {\n ${map(nodes, (node) => genVisitorFunction(node)).join(\"\\n \")}\n}`;\n}\n\nfunction genVisitorFunction(node: CstNodeTypeDefinition) {\n const childrenTypeName = getNodeChildrenTypeName(node.name);\n return `${node.name}(children: ${childrenTypeName}, param?: IN): OUT;`;\n}\n\nfunction buildTypeString(type: PropertyArrayType) {\n if (isArray(type)) {\n const typeNames = uniq(map(type, (t) => getTypeString(t)));\n const typeString = reduce(typeNames, (sum, t) => sum + \" | \" + t);\n return \"(\" + typeString + \")\";\n } else {\n return getTypeString(type);\n }\n}\n\nfunction getTypeString(type: TokenArrayType | RuleArrayType) {\n if (type.kind === \"token\") {\n return \"IToken\";\n }\n return getNodeInterfaceName(type.name);\n}\n\nfunction getNodeInterfaceName(ruleName: string) {\n return upperFirst(ruleName) + \"CstNode\";\n}\n\nfunction getNodeChildrenTypeName(ruleName: string) {\n return upperFirst(ruleName) + \"CstChildren\";\n}\n", "import { GenerateDtsOptions, Rule } from \"@chevrotain/types\";\nimport { buildModel } from \"./model.js\";\nimport { genDts } from \"./generate.js\";\n\nconst defaultOptions: Required = {\n includeVisitorInterface: true,\n visitorInterfaceName: \"ICstNodeVisitor\",\n};\n\nexport function generateCstDts(\n productions: Record,\n options?: GenerateDtsOptions,\n): string {\n const effectiveOptions = {\n ...defaultOptions,\n ...options,\n };\n\n const model = buildModel(productions);\n\n return genDts(model, effectiveOptions);\n}\n", "import { VERSION } from \"../version.js\";\nimport { ISerializedGast } from \"@chevrotain/types\";\n\nexport function createSyntaxDiagramsCode(\n grammar: ISerializedGast[],\n {\n resourceBase = `https://unpkg.com/chevrotain@${VERSION}/diagrams/`,\n css = `https://unpkg.com/chevrotain@${VERSION}/diagrams/diagrams.css`,\n }: {\n resourceBase?: string;\n css?: string;\n } = {},\n) {\n const header = `\n\n\n\n\n\n`;\n const cssHtml = `\n\n`;\n\n const scripts = `\n\n\n\n\n`;\n const diagramsDiv = `\n
    \n`;\n const serializedGrammar = `\n\n`;\n\n const initLogic = `\n\n`;\n return (\n header + cssHtml + scripts + diagramsDiv + serializedGrammar + initLogic\n );\n}\n", "/* istanbul ignore file - tricky to import some things from this module during testing */\n\n// semantic version\nexport { VERSION } from \"./version.js\";\n\nexport {\n CstParser,\n EmbeddedActionsParser,\n ParserDefinitionErrorType,\n EMPTY_ALT,\n} from \"./parse/parser/parser.js\";\n\nexport { Lexer, LexerDefinitionErrorType } from \"./scan/lexer_public.js\";\n\n// Tokens utilities\nexport {\n createToken,\n createTokenInstance,\n EOF,\n tokenLabel,\n tokenMatcher,\n tokenName,\n} from \"./scan/tokens_public.js\";\n\n// Lookahead\n\nexport { getLookaheadPaths } from \"./parse/grammar/lookahead.js\";\n\nexport { LLkLookaheadStrategy } from \"./parse/grammar/llk_lookahead.js\";\n\n// Other Utilities\n\nexport { defaultParserErrorProvider } from \"./parse/errors_public.js\";\n\nexport {\n EarlyExitException,\n isRecognitionException,\n MismatchedTokenException,\n NotAllInputParsedException,\n NoViableAltException,\n} from \"./parse/exceptions_public.js\";\n\nexport { defaultLexerErrorProvider } from \"./scan/lexer_errors_public.js\";\n\n// grammar reflection API\nexport {\n Alternation,\n Alternative,\n NonTerminal,\n Option,\n Repetition,\n RepetitionMandatory,\n RepetitionMandatoryWithSeparator,\n RepetitionWithSeparator,\n Rule,\n Terminal,\n} from \"@chevrotain/gast\";\n\n// GAST Utilities\n\nexport {\n serializeGrammar,\n serializeProduction,\n GAstVisitor,\n} from \"@chevrotain/gast\";\n\nexport { generateCstDts } from \"@chevrotain/cst-dts-gen\";\n\n/* istanbul ignore next */\nexport function clearCache() {\n console.warn(\n \"The clearCache function was 'soft' removed from the Chevrotain API.\" +\n \"\\n\\t It performs no action other than printing this message.\" +\n \"\\n\\t Please avoid using it as it will be completely removed in the future\",\n );\n}\n\nexport { createSyntaxDiagramsCode } from \"./diagrams/render_public.js\";\n\nexport class Parser {\n constructor() {\n throw new Error(\n \"The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\\t\\n\" +\n \"See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0\",\n );\n }\n}\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nimport map from \"lodash-es/map.js\"\r\nimport filter from \"lodash-es/filter.js\"\r\nimport {\r\n IProduction,\r\n IProductionWithOccurrence,\r\n TokenType,\r\n Alternation,\r\n NonTerminal,\r\n Rule,\r\n Option,\r\n RepetitionMandatory,\r\n Repetition,\r\n Terminal,\r\n Alternative,\r\n RepetitionWithSeparator,\r\n RepetitionMandatoryWithSeparator,\r\n LookaheadProductionType\r\n} from \"chevrotain\"\r\n\r\nexport function buildATNKey(rule: Rule, type: LookaheadProductionType, occurrence: number): string {\r\n return `${rule.name}_${type}_${occurrence}`;\r\n}\r\n\r\nexport interface ATN {\r\n decisionMap: Record\r\n states: ATNState[]\r\n decisionStates: DecisionState[]\r\n ruleToStartState: Map\r\n ruleToStopState: Map\r\n}\r\n\r\nexport const ATN_INVALID_TYPE = 0\r\nexport const ATN_BASIC = 1\r\nexport const ATN_RULE_START = 2\r\nexport const ATN_PLUS_BLOCK_START = 4\r\nexport const ATN_STAR_BLOCK_START = 5\r\n// Currently unused as the ATN is not used for lexing\r\nexport const ATN_TOKEN_START = 6\r\nexport const ATN_RULE_STOP = 7\r\nexport const ATN_BLOCK_END = 8\r\nexport const ATN_STAR_LOOP_BACK = 9\r\nexport const ATN_STAR_LOOP_ENTRY = 10\r\nexport const ATN_PLUS_LOOP_BACK = 11\r\nexport const ATN_LOOP_END = 12\r\n\r\nexport type ATNState =\r\n | BasicState\r\n | BasicBlockStartState\r\n | PlusBlockStartState\r\n | PlusLoopbackState\r\n | StarBlockStartState\r\n | StarLoopbackState\r\n | StarLoopEntryState\r\n | BlockEndState\r\n | RuleStartState\r\n | RuleStopState\r\n | LoopEndState\r\n\r\nexport interface ATNBaseState {\r\n atn: ATN\r\n production: IProductionWithOccurrence\r\n stateNumber: number\r\n rule: Rule\r\n epsilonOnlyTransitions: boolean\r\n transitions: Transition[]\r\n nextTokenWithinRule: number[]\r\n}\r\n\r\nexport interface BasicState extends ATNBaseState {\r\n type: typeof ATN_BASIC\r\n}\r\n\r\nexport interface BlockStartState extends DecisionState {\r\n end: BlockEndState\r\n}\r\n\r\nexport interface BasicBlockStartState extends BlockStartState {\r\n type: typeof ATN_BASIC\r\n}\r\n\r\nexport interface PlusBlockStartState extends BlockStartState {\r\n loopback: PlusLoopbackState\r\n type: typeof ATN_PLUS_BLOCK_START\r\n}\r\n\r\nexport interface PlusLoopbackState extends DecisionState {\r\n type: typeof ATN_PLUS_LOOP_BACK\r\n}\r\n\r\nexport interface StarBlockStartState extends BlockStartState {\r\n type: typeof ATN_STAR_BLOCK_START\r\n}\r\n\r\nexport interface StarLoopbackState extends ATNBaseState {\r\n type: typeof ATN_STAR_LOOP_BACK\r\n}\r\n\r\nexport interface StarLoopEntryState extends DecisionState {\r\n loopback: StarLoopbackState\r\n type: typeof ATN_STAR_LOOP_ENTRY\r\n}\r\n\r\nexport interface BlockEndState extends ATNBaseState {\r\n start: BlockStartState\r\n type: typeof ATN_BLOCK_END\r\n}\r\n\r\nexport interface DecisionState extends ATNBaseState {\r\n decision: number\r\n}\r\n\r\nexport interface LoopEndState extends ATNBaseState {\r\n loopback: ATNState\r\n type: typeof ATN_LOOP_END\r\n}\r\n\r\nexport interface RuleStartState extends ATNBaseState {\r\n stop: RuleStopState\r\n type: typeof ATN_RULE_START\r\n}\r\n\r\nexport interface RuleStopState extends ATNBaseState {\r\n type: typeof ATN_RULE_STOP\r\n}\r\n\r\nexport interface Transition {\r\n target: ATNState\r\n isEpsilon(): boolean\r\n}\r\n\r\nexport abstract class AbstractTransition implements Transition {\r\n target: ATNState\r\n\r\n constructor(target: ATNState) {\r\n this.target = target\r\n }\r\n\r\n isEpsilon() {\r\n return false\r\n }\r\n}\r\n\r\nexport class AtomTransition extends AbstractTransition {\r\n tokenType: TokenType\r\n\r\n constructor(target: ATNState, tokenType: TokenType) {\r\n super(target)\r\n this.tokenType = tokenType\r\n }\r\n}\r\n\r\nexport class EpsilonTransition extends AbstractTransition {\r\n constructor(target: ATNState) {\r\n super(target)\r\n }\r\n\r\n isEpsilon() {\r\n return true\r\n }\r\n}\r\n\r\nexport class RuleTransition extends AbstractTransition {\r\n rule: Rule\r\n followState: ATNState\r\n\r\n constructor(ruleStart: RuleStartState, rule: Rule, followState: ATNState) {\r\n super(ruleStart)\r\n this.rule = rule\r\n this.followState = followState\r\n }\r\n\r\n isEpsilon() {\r\n return true\r\n }\r\n}\r\n\r\ninterface ATNHandle {\r\n left: ATNState\r\n right: ATNState\r\n}\r\n\r\nexport function createATN(rules: Rule[]): ATN {\r\n const atn: ATN = {\r\n decisionMap: {},\r\n decisionStates: [],\r\n ruleToStartState: new Map(),\r\n ruleToStopState: new Map(),\r\n states: []\r\n }\r\n createRuleStartAndStopATNStates(atn, rules)\r\n const ruleLength = rules.length\r\n for (let i = 0; i < ruleLength; i++) {\r\n const rule = rules[i]\r\n const ruleBlock = block(atn, rule, rule)\r\n if (ruleBlock === undefined) {\r\n continue\r\n }\r\n buildRuleHandle(atn, rule, ruleBlock)\r\n }\r\n return atn\r\n}\r\n\r\nfunction createRuleStartAndStopATNStates(atn: ATN, rules: Rule[]): void {\r\n const ruleLength = rules.length\r\n for (let i = 0; i < ruleLength; i++) {\r\n const rule = rules[i]\r\n const start = newState(atn, rule, undefined, {\r\n type: ATN_RULE_START\r\n })\r\n const stop = newState(atn, rule, undefined, {\r\n type: ATN_RULE_STOP\r\n })\r\n start.stop = stop\r\n atn.ruleToStartState.set(rule, start)\r\n atn.ruleToStopState.set(rule, stop)\r\n }\r\n}\r\n\r\nfunction atom(\r\n atn: ATN,\r\n rule: Rule,\r\n production: IProduction\r\n): ATNHandle | undefined {\r\n if (production instanceof Terminal) {\r\n return tokenRef(atn, rule, production.terminalType, production)\r\n } else if (production instanceof NonTerminal) {\r\n return ruleRef(atn, rule, production)\r\n } else if (production instanceof Alternation) {\r\n return alternation(atn, rule, production)\r\n } else if (production instanceof Option) {\r\n return option(atn, rule, production)\r\n } else if (production instanceof Repetition) {\r\n return repetition(atn, rule, production)\r\n } else if (production instanceof RepetitionWithSeparator) {\r\n return repetitionSep(atn, rule, production)\r\n } else if (production instanceof RepetitionMandatory) {\r\n return repetitionMandatory(atn, rule, production)\r\n } else if (production instanceof RepetitionMandatoryWithSeparator) {\r\n return repetitionMandatorySep(atn, rule, production)\r\n } else {\r\n return block(atn, rule, production as Alternative)\r\n }\r\n}\r\n\r\nfunction repetition(atn: ATN, rule: Rule, repetition: Repetition): ATNHandle {\r\n const starState = newState(atn, rule, repetition, {\r\n type: ATN_STAR_BLOCK_START\r\n })\r\n defineDecisionState(atn, starState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n starState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n return star(atn, rule, repetition, handle)\r\n}\r\n\r\nfunction repetitionSep(\r\n atn: ATN,\r\n rule: Rule,\r\n repetition: RepetitionWithSeparator\r\n): ATNHandle {\r\n const starState = newState(atn, rule, repetition, {\r\n type: ATN_STAR_BLOCK_START\r\n })\r\n defineDecisionState(atn, starState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n starState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n const sep = tokenRef(atn, rule, repetition.separator, repetition)\r\n return star(atn, rule, repetition, handle, sep)\r\n}\r\n\r\nfunction repetitionMandatory(\r\n atn: ATN,\r\n rule: Rule,\r\n repetition: RepetitionMandatory\r\n): ATNHandle {\r\n const plusState = newState(atn, rule, repetition, {\r\n type: ATN_PLUS_BLOCK_START\r\n })\r\n defineDecisionState(atn, plusState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n plusState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n return plus(atn, rule, repetition, handle)\r\n}\r\n\r\nfunction repetitionMandatorySep(\r\n atn: ATN,\r\n rule: Rule,\r\n repetition: RepetitionMandatoryWithSeparator\r\n): ATNHandle {\r\n const plusState = newState(atn, rule, repetition, {\r\n type: ATN_PLUS_BLOCK_START\r\n })\r\n defineDecisionState(atn, plusState)\r\n const handle = makeAlts(\r\n atn,\r\n rule,\r\n plusState,\r\n repetition,\r\n block(atn, rule, repetition)\r\n )\r\n const sep = tokenRef(atn, rule, repetition.separator, repetition)\r\n return plus(atn, rule, repetition, handle, sep)\r\n}\r\n\r\nfunction alternation(\r\n atn: ATN,\r\n rule: Rule,\r\n alternation: Alternation\r\n): ATNHandle {\r\n const start = newState(atn, rule, alternation, {\r\n type: ATN_BASIC\r\n })\r\n defineDecisionState(atn, start)\r\n const alts = map(alternation.definition, (e) => atom(atn, rule, e))\r\n const handle = makeAlts(atn, rule, start, alternation, ...alts)\r\n return handle\r\n}\r\n\r\nfunction option(atn: ATN, rule: Rule, option: Option): ATNHandle {\r\n const start = newState(atn, rule, option, {\r\n type: ATN_BASIC\r\n })\r\n defineDecisionState(atn, start)\r\n const handle = makeAlts(atn, rule, start, option, block(atn, rule, option))\r\n return optional(atn, rule, option, handle)\r\n}\r\n\r\nfunction block(\r\n atn: ATN,\r\n rule: Rule,\r\n block: { definition: IProduction[] }\r\n): ATNHandle | undefined {\r\n const handles = filter(\r\n map(block.definition, (e) => atom(atn, rule, e)),\r\n (e) => e !== undefined\r\n ) as ATNHandle[]\r\n if (handles.length === 1) {\r\n return handles[0]\r\n } else if (handles.length === 0) {\r\n return undefined\r\n } else {\r\n return makeBlock(atn, handles)\r\n }\r\n}\r\n\r\nfunction plus(\r\n atn: ATN,\r\n rule: Rule,\r\n plus: IProductionWithOccurrence,\r\n handle: ATNHandle,\r\n sep?: ATNHandle\r\n): ATNHandle {\r\n const blkStart = handle.left as PlusBlockStartState\r\n const blkEnd = handle.right\r\n\r\n const loop = newState(atn, rule, plus, {\r\n type: ATN_PLUS_LOOP_BACK\r\n })\r\n defineDecisionState(atn, loop)\r\n const end = newState(atn, rule, plus, {\r\n type: ATN_LOOP_END\r\n })\r\n blkStart.loopback = loop\r\n end.loopback = loop\r\n atn.decisionMap[buildATNKey(rule, sep ? 'RepetitionMandatoryWithSeparator' : 'RepetitionMandatory', plus.idx)] = loop;\r\n epsilon(blkEnd, loop) // block can see loop back\r\n\r\n // Depending on whether we have a separator we put the exit transition at index 1 or 0\r\n // This influences the chosen option in the lookahead DFA\r\n if (sep === undefined) {\r\n epsilon(loop, blkStart) // loop back to start\r\n epsilon(loop, end) // exit\r\n } else {\r\n epsilon(loop, end) // exit\r\n // loop back to start with separator\r\n epsilon(loop, sep.left)\r\n epsilon(sep.right, blkStart)\r\n }\r\n\r\n return {\r\n left: blkStart,\r\n right: end\r\n }\r\n}\r\n\r\nfunction star(\r\n atn: ATN,\r\n rule: Rule,\r\n star: IProductionWithOccurrence,\r\n handle: ATNHandle,\r\n sep?: ATNHandle\r\n): ATNHandle {\r\n const start = handle.left\r\n const end = handle.right\r\n\r\n const entry = newState(atn, rule, star, {\r\n type: ATN_STAR_LOOP_ENTRY\r\n })\r\n defineDecisionState(atn, entry)\r\n const loopEnd = newState(atn, rule, star, {\r\n type: ATN_LOOP_END\r\n })\r\n const loop = newState(atn, rule, star, {\r\n type: ATN_STAR_LOOP_BACK\r\n })\r\n entry.loopback = loop\r\n loopEnd.loopback = loop\r\n\r\n epsilon(entry, start) // loop enter edge (alt 2)\r\n epsilon(entry, loopEnd) // bypass loop edge (alt 1)\r\n epsilon(end, loop) // block end hits loop back\r\n\r\n if (sep !== undefined) {\r\n epsilon(loop, loopEnd) // end loop\r\n // loop back to start of handle using separator\r\n epsilon(loop, sep.left)\r\n epsilon(sep.right, start)\r\n } else {\r\n epsilon(loop, entry) // loop back to entry/exit decision\r\n }\r\n\r\n atn.decisionMap[buildATNKey(rule, sep ? 'RepetitionWithSeparator' : 'Repetition', star.idx)] = entry;\r\n return {\r\n left: entry,\r\n right: loopEnd\r\n }\r\n}\r\n\r\nfunction optional(atn: ATN, rule: Rule, optional: Option, handle: ATNHandle): ATNHandle {\r\n const start = handle.left as DecisionState\r\n const end = handle.right\r\n\r\n epsilon(start, end)\r\n\r\n atn.decisionMap[buildATNKey(rule, 'Option', optional.idx)] = start;\r\n return handle\r\n}\r\n\r\nfunction defineDecisionState(atn: ATN, state: DecisionState): number {\r\n atn.decisionStates.push(state)\r\n state.decision = atn.decisionStates.length - 1\r\n return state.decision\r\n}\r\n\r\nfunction makeAlts(\r\n atn: ATN,\r\n rule: Rule,\r\n start: BlockStartState,\r\n production: IProductionWithOccurrence,\r\n ...alts: (ATNHandle | undefined)[]\r\n): ATNHandle {\r\n const end = newState(atn, rule, production, {\r\n type: ATN_BLOCK_END,\r\n start\r\n })\r\n start.end = end\r\n for (const alt of alts) {\r\n if (alt !== undefined) {\r\n // hook alts up to decision block\r\n epsilon(start, alt.left)\r\n epsilon(alt.right, end)\r\n } else {\r\n epsilon(start, end)\r\n }\r\n }\r\n\r\n const handle: ATNHandle = {\r\n left: start as ATNState,\r\n right: end\r\n }\r\n atn.decisionMap[buildATNKey(rule, getProdType(production), production.idx)] = start\r\n return handle\r\n}\r\n\r\nfunction getProdType(production: IProduction): LookaheadProductionType {\r\n if (production instanceof Alternation) {\r\n return 'Alternation';\r\n } else if (production instanceof Option) {\r\n return 'Option';\r\n } else if (production instanceof Repetition) {\r\n return 'Repetition';\r\n } else if (production instanceof RepetitionWithSeparator) {\r\n return 'RepetitionWithSeparator';\r\n } else if (production instanceof RepetitionMandatory) {\r\n return 'RepetitionMandatory';\r\n } else if (production instanceof RepetitionMandatoryWithSeparator) {\r\n return 'RepetitionMandatoryWithSeparator';\r\n } else {\r\n throw new Error('Invalid production type encountered');\r\n }\r\n}\r\n\r\nfunction makeBlock(atn: ATN, alts: ATNHandle[]): ATNHandle {\r\n const altsLength = alts.length\r\n for (let i = 0; i < altsLength - 1; i++) {\r\n const handle = alts[i]\r\n let transition: Transition | undefined\r\n if (handle.left.transitions.length === 1) {\r\n transition = handle.left.transitions[0]\r\n }\r\n const isRuleTransition = transition instanceof RuleTransition\r\n const ruleTransition = transition as RuleTransition\r\n const next = alts[i + 1].left\r\n if (\r\n handle.left.type === ATN_BASIC &&\r\n handle.right.type === ATN_BASIC &&\r\n transition !== undefined &&\r\n ((isRuleTransition && ruleTransition.followState === handle.right) ||\r\n transition.target === handle.right)\r\n ) {\r\n // we can avoid epsilon edge to next element\r\n if (isRuleTransition) {\r\n ruleTransition.followState = next\r\n } else {\r\n transition.target = next\r\n }\r\n removeState(atn, handle.right) // we skipped over this state\r\n } else {\r\n // need epsilon if previous block's right end node is complex\r\n epsilon(handle.right, next)\r\n }\r\n }\r\n\r\n const first = alts[0]\r\n const last = alts[altsLength - 1]\r\n return {\r\n left: first.left,\r\n right: last.right\r\n }\r\n}\r\n\r\nfunction tokenRef(\r\n atn: ATN,\r\n rule: Rule,\r\n tokenType: TokenType,\r\n production: IProductionWithOccurrence\r\n): ATNHandle {\r\n const left = newState(atn, rule, production, {\r\n type: ATN_BASIC\r\n })\r\n const right = newState(atn, rule, production, {\r\n type: ATN_BASIC\r\n })\r\n addTransition(left, new AtomTransition(right, tokenType))\r\n return {\r\n left,\r\n right\r\n }\r\n}\r\n\r\nfunction ruleRef(\r\n atn: ATN,\r\n currentRule: Rule,\r\n nonTerminal: NonTerminal\r\n): ATNHandle {\r\n const rule = nonTerminal.referencedRule\r\n const start = atn.ruleToStartState.get(rule)!\r\n const left = newState(atn, currentRule, nonTerminal, {\r\n type: ATN_BASIC\r\n })\r\n const right = newState(atn, currentRule, nonTerminal, {\r\n type: ATN_BASIC\r\n })\r\n\r\n const call = new RuleTransition(start, rule, right)\r\n addTransition(left, call)\r\n\r\n return {\r\n left,\r\n right\r\n }\r\n}\r\n\r\nfunction buildRuleHandle(atn: ATN, rule: Rule, block: ATNHandle): ATNHandle {\r\n const start = atn.ruleToStartState.get(rule)!\r\n epsilon(start, block.left)\r\n const stop = atn.ruleToStopState.get(rule)!\r\n epsilon(block.right, stop)\r\n const handle: ATNHandle = {\r\n left: start,\r\n right: stop\r\n }\r\n return handle\r\n}\r\n\r\nfunction epsilon(a: ATNBaseState, b: ATNBaseState): void {\r\n const transition = new EpsilonTransition(b as ATNState)\r\n addTransition(a, transition)\r\n}\r\n\r\nfunction newState(\r\n atn: ATN,\r\n rule: Rule,\r\n production: IProductionWithOccurrence | undefined,\r\n partial: Partial\r\n): T {\r\n const t: T = {\r\n atn,\r\n production,\r\n epsilonOnlyTransitions: false,\r\n rule,\r\n transitions: [],\r\n nextTokenWithinRule: [],\r\n stateNumber: atn.states.length,\r\n ...partial\r\n } as unknown as T\r\n atn.states.push(t)\r\n return t\r\n}\r\n\r\nfunction addTransition(state: ATNBaseState, transition: Transition) {\r\n // A single ATN state can only contain epsilon transitions or non-epsilon transitions\r\n // Because they are never mixed, only setting the property for the first transition is fine\r\n if (state.transitions.length === 0) {\r\n state.epsilonOnlyTransitions = transition.isEpsilon()\r\n }\r\n state.transitions.push(transition)\r\n}\r\n\r\nfunction removeState(atn: ATN, state: ATNState): void {\r\n atn.states.splice(atn.states.indexOf(state), 1)\r\n}\r\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nimport map from \"lodash-es/map.js\"\r\nimport { ATNState, DecisionState } from \"./atn.js\"\r\n\r\nexport interface DFA {\r\n start?: DFAState\r\n states: Record\r\n decision: number\r\n atnStartState: DecisionState\r\n}\r\n\r\nexport interface DFAState {\r\n configs: ATNConfigSet\r\n edges: Record\r\n isAcceptState: boolean\r\n prediction: number\r\n}\r\n\r\nexport const DFA_ERROR = {} as DFAState\r\n\r\nexport interface ATNConfig {\r\n state: ATNState\r\n alt: number\r\n stack: ATNState[]\r\n}\r\n\r\nexport class ATNConfigSet {\r\n private map: Record = {}\r\n private configs: ATNConfig[] = []\r\n\r\n uniqueAlt: number | undefined\r\n\r\n get size(): number {\r\n return this.configs.length\r\n }\r\n\r\n finalize(): void {\r\n // Empties the map to free up memory\r\n this.map = {}\r\n }\r\n\r\n add(config: ATNConfig): void {\r\n const key = getATNConfigKey(config)\r\n // Only add configs which don't exist in our map already\r\n // While this does not influence the actual algorithm, adding them anyway would massively increase memory consumption\r\n if (!(key in this.map)) {\r\n this.map[key] = this.configs.length\r\n this.configs.push(config)\r\n }\r\n }\r\n\r\n get elements(): readonly ATNConfig[] {\r\n return this.configs\r\n }\r\n\r\n get alts(): number[] {\r\n return map(this.configs, (e) => e.alt)\r\n }\r\n\r\n get key(): string {\r\n let value = \"\"\r\n for (const k in this.map) {\r\n value += k + \":\"\r\n }\r\n return value\r\n }\r\n}\r\n\r\nexport function getATNConfigKey(config: ATNConfig, alt = true) {\r\n return `${alt ? `a${config.alt}` : \"\"}s${\r\n config.state.stateNumber\r\n }:${config.stack.map((e) => e.stateNumber.toString()).join(\"_\")}`\r\n}\r\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nimport {\r\n IToken,\r\n TokenType,\r\n tokenMatcher,\r\n tokenLabel,\r\n Rule,\r\n IProductionWithOccurrence,\r\n NonTerminal,\r\n Alternation,\r\n Option,\r\n RepetitionMandatory,\r\n RepetitionMandatoryWithSeparator,\r\n RepetitionWithSeparator,\r\n Repetition,\r\n Terminal,\r\n BaseParser,\r\n LLkLookaheadStrategy,\r\n ILookaheadValidationError,\r\n IOrAlt,\r\n getLookaheadPaths,\r\n OptionalProductionType\r\n} from \"chevrotain\";\r\nimport {\r\n ATN,\r\n ATNState,\r\n ATN_RULE_STOP,\r\n AtomTransition,\r\n buildATNKey,\r\n createATN,\r\n DecisionState,\r\n EpsilonTransition,\r\n RuleTransition,\r\n Transition\r\n} from \"./atn.js\";\r\nimport {\r\n ATNConfig,\r\n ATNConfigSet,\r\n DFA,\r\n DFAState,\r\n DFA_ERROR,\r\n getATNConfigKey\r\n} from \"./dfa.js\";\r\nimport min from \"lodash-es/min.js\";\r\nimport flatMap from \"lodash-es/flatMap.js\";\r\nimport uniqBy from \"lodash-es/uniqBy.js\";\r\nimport map from \"lodash-es/map.js\";\r\nimport flatten from \"lodash-es/flatten.js\";\r\nimport forEach from \"lodash-es/forEach.js\";\r\nimport isEmpty from \"lodash-es/isEmpty.js\";\r\nimport reduce from \"lodash-es/reduce.js\";\r\n\r\ntype DFACache = (predicateSet: PredicateSet) => DFA\r\n\r\nexport type AmbiguityReport = (message: string) => void;\r\n\r\nfunction createDFACache(startState: DecisionState, decision: number): DFACache {\r\n const map: Record = {}\r\n return (predicateSet) => {\r\n const key = predicateSet.toString()\r\n let existing = map[key]\r\n if (existing !== undefined) {\r\n return existing\r\n } else {\r\n existing = {\r\n atnStartState: startState,\r\n decision,\r\n states: {}\r\n }\r\n map[key] = existing\r\n return existing\r\n }\r\n }\r\n}\r\n\r\nclass PredicateSet {\r\n private predicates: boolean[] = []\r\n\r\n is(index: number): boolean {\r\n return index >= this.predicates.length || this.predicates[index]\r\n }\r\n\r\n set(index: number, value: boolean) {\r\n this.predicates[index] = value\r\n }\r\n\r\n toString(): string {\r\n let value = \"\"\r\n const size = this.predicates.length\r\n for (let i = 0; i < size; i++) {\r\n value += this.predicates[i] === true ? \"1\" : \"0\"\r\n }\r\n return value\r\n }\r\n}\r\n\r\ninterface AdaptivePredictError {\r\n tokenPath: IToken[]\r\n possibleTokenTypes: TokenType[]\r\n actualToken: IToken\r\n}\r\n\r\nconst EMPTY_PREDICATES = new PredicateSet()\r\n\r\nexport interface LLStarLookaheadOptions {\r\n logging?: AmbiguityReport\r\n}\r\n\r\nexport class LLStarLookaheadStrategy extends LLkLookaheadStrategy {\r\n\r\n private atn: ATN;\r\n private dfas: DFACache[];\r\n private logging: AmbiguityReport;\r\n\r\n constructor(options?: LLStarLookaheadOptions) {\r\n super();\r\n this.logging = options?.logging ?? ((message) => console.log(message));\r\n }\r\n\r\n override initialize(options: { rules: Rule[] }): void {\r\n this.atn = createATN(options.rules);\r\n this.dfas = initATNSimulator(this.atn);\r\n }\r\n\r\n override validateAmbiguousAlternationAlternatives(): ILookaheadValidationError[] {\r\n return [];\r\n }\r\n\r\n override validateEmptyOrAlternatives(): ILookaheadValidationError[] {\r\n return [];\r\n }\r\n\r\n override buildLookaheadForAlternation(options: {\r\n prodOccurrence: number;\r\n rule: Rule;\r\n maxLookahead: number;\r\n hasPredicates: boolean;\r\n dynamicTokensEnabled: boolean\r\n }): (this: BaseParser, orAlts?: IOrAlt[] | undefined) => number | undefined {\r\n const { prodOccurrence, rule, hasPredicates, dynamicTokensEnabled } = options;\r\n const dfas = this.dfas;\r\n const logging = this.logging;\r\n const key = buildATNKey(rule, 'Alternation', prodOccurrence);\r\n const decisionState = this.atn.decisionMap[key];\r\n const decisionIndex = decisionState.decision;\r\n const partialAlts: (TokenType | undefined)[][] = map(\r\n getLookaheadPaths({\r\n maxLookahead: 1,\r\n occurrence: prodOccurrence,\r\n prodType: \"Alternation\",\r\n rule: rule\r\n }),\r\n (currAlt) => map(currAlt, (path) => path[0])\r\n )\r\n\r\n if (isLL1Sequence(partialAlts, false) && !dynamicTokensEnabled) {\r\n const choiceToAlt = reduce(\r\n partialAlts,\r\n (result, currAlt, idx) => {\r\n forEach(currAlt, (currTokType) => {\r\n if (currTokType) {\r\n result[currTokType.tokenTypeIdx!] = idx\r\n forEach(currTokType.categoryMatches!, (currExtendingType) => {\r\n result[currExtendingType] = idx\r\n })\r\n }\r\n })\r\n return result\r\n },\r\n {} as Record\r\n )\r\n\r\n if (hasPredicates) {\r\n return function (this: BaseParser, orAlts) {\r\n const nextToken = this.LA(1)\r\n const prediction: number | undefined = choiceToAlt[nextToken.tokenTypeIdx]\r\n if (orAlts !== undefined && prediction !== undefined) {\r\n const gate = orAlts[prediction]?.GATE\r\n if (gate !== undefined && gate.call(this) === false) {\r\n return undefined;\r\n }\r\n }\r\n return prediction\r\n }\r\n } else {\r\n return function (this: BaseParser): number | undefined {\r\n const nextToken = this.LA(1)\r\n return choiceToAlt[nextToken.tokenTypeIdx];\r\n }\r\n }\r\n } else if (hasPredicates) {\r\n return function (this: BaseParser, orAlts) {\r\n const predicates = new PredicateSet()\r\n const length = orAlts === undefined ? 0 : orAlts.length\r\n for (let i = 0; i < length; i++) {\r\n const gate = orAlts?.[i].GATE\r\n predicates.set(i, gate === undefined || gate.call(this))\r\n }\r\n const result = adaptivePredict.call(this, dfas, decisionIndex, predicates, logging);\r\n return typeof result === 'number' ? result : undefined;\r\n }\r\n } else {\r\n return function (this: BaseParser) {\r\n const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging);\r\n return typeof result === 'number' ? result : undefined;\r\n }\r\n }\r\n }\r\n\r\n override buildLookaheadForOptional(options: {\r\n prodOccurrence: number;\r\n prodType: OptionalProductionType;\r\n rule: Rule;\r\n maxLookahead: number;\r\n dynamicTokensEnabled: boolean\r\n }): (this: BaseParser) => boolean {\r\n const { prodOccurrence, rule, prodType, dynamicTokensEnabled } = options;\r\n const dfas = this.dfas;\r\n const logging = this.logging;\r\n const key = buildATNKey(rule, prodType, prodOccurrence);\r\n const decisionState = this.atn.decisionMap[key];\r\n const decisionIndex = decisionState.decision;\r\n const alts = map(\r\n getLookaheadPaths({\r\n maxLookahead: 1,\r\n occurrence: prodOccurrence,\r\n prodType,\r\n rule\r\n }),\r\n (e) => {\r\n return map(e, (g) => g[0])\r\n }\r\n )\r\n \r\n if (isLL1Sequence(alts) && alts[0][0] && !dynamicTokensEnabled) {\r\n const alt = alts[0]\r\n const singleTokensTypes = flatten(alt)\r\n \r\n if (\r\n singleTokensTypes.length === 1 &&\r\n isEmpty(singleTokensTypes[0].categoryMatches)\r\n ) {\r\n const expectedTokenType = singleTokensTypes[0]\r\n const expectedTokenUniqueKey = expectedTokenType.tokenTypeIdx\r\n \r\n return function (this: BaseParser): boolean {\r\n return this.LA(1).tokenTypeIdx === expectedTokenUniqueKey\r\n }\r\n } else {\r\n const choiceToAlt = reduce(\r\n singleTokensTypes,\r\n (result, currTokType) => {\r\n if (currTokType !== undefined) {\r\n result[currTokType.tokenTypeIdx!] = true\r\n forEach(currTokType.categoryMatches, (currExtendingType) => {\r\n result[currExtendingType] = true\r\n })\r\n }\r\n return result\r\n },\r\n {} as Record\r\n )\r\n \r\n return function (this: BaseParser): boolean {\r\n const nextToken = this.LA(1)\r\n return choiceToAlt[nextToken.tokenTypeIdx] === true\r\n }\r\n }\r\n }\r\n return function (this: BaseParser) {\r\n const result = adaptivePredict.call(this, dfas, decisionIndex, EMPTY_PREDICATES, logging)\r\n return typeof result === \"object\" ? false : result === 0;\r\n }\r\n }\r\n\r\n}\r\n\r\nfunction isLL1Sequence(sequences: (TokenType | undefined)[][], allowEmpty = true): boolean {\r\n const fullSet = new Set()\r\n\r\n for (const alt of sequences) {\r\n const altSet = new Set()\r\n for (const tokType of alt) {\r\n if (tokType === undefined) {\r\n if (allowEmpty) {\r\n // Epsilon production encountered\r\n break\r\n } else {\r\n return false;\r\n }\r\n }\r\n const indices = [tokType.tokenTypeIdx!].concat(tokType.categoryMatches!)\r\n for (const index of indices) {\r\n if (fullSet.has(index)) {\r\n if (!altSet.has(index)) {\r\n return false\r\n }\r\n } else {\r\n fullSet.add(index)\r\n altSet.add(index)\r\n }\r\n }\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction initATNSimulator(atn: ATN): DFACache[] {\r\n const decisionLength = atn.decisionStates.length\r\n const decisionToDFA: DFACache[] = Array(decisionLength)\r\n for (let i = 0; i < decisionLength; i++) {\r\n decisionToDFA[i] = createDFACache(atn.decisionStates[i], i)\r\n }\r\n return decisionToDFA;\r\n}\r\n\r\nfunction adaptivePredict(\r\n this: BaseParser,\r\n dfaCaches: DFACache[],\r\n decision: number,\r\n predicateSet: PredicateSet,\r\n logging: AmbiguityReport\r\n): number | AdaptivePredictError {\r\n const dfa = dfaCaches[decision](predicateSet)\r\n let start = dfa.start\r\n if (start === undefined) {\r\n const closure = computeStartState(dfa.atnStartState as ATNState)\r\n start = addDFAState(dfa, newDFAState(closure))\r\n dfa.start = start\r\n }\r\n\r\n const alt = performLookahead.apply(this, [dfa, start, predicateSet, logging])\r\n return alt\r\n}\r\n\r\nfunction performLookahead(\r\n this: BaseParser,\r\n dfa: DFA,\r\n s0: DFAState,\r\n predicateSet: PredicateSet,\r\n logging: AmbiguityReport\r\n): number | AdaptivePredictError {\r\n let previousD = s0\r\n\r\n let i = 1\r\n const path: IToken[] = []\r\n let t = this.LA(i++)\r\n\r\n while (true) {\r\n let d = getExistingTargetState(previousD, t)\r\n if (d === undefined) {\r\n d = computeLookaheadTarget.apply(this, [dfa, previousD, t, i, predicateSet, logging])\r\n }\r\n\r\n if (d === DFA_ERROR) {\r\n return buildAdaptivePredictError(path, previousD, t)\r\n }\r\n\r\n if (d.isAcceptState === true) {\r\n return d.prediction\r\n }\r\n\r\n previousD = d\r\n path.push(t)\r\n t = this.LA(i++)\r\n }\r\n}\r\n\r\nfunction computeLookaheadTarget(\r\n this: BaseParser,\r\n dfa: DFA,\r\n previousD: DFAState,\r\n token: IToken,\r\n lookahead: number,\r\n predicateSet: PredicateSet,\r\n logging: AmbiguityReport\r\n): DFAState {\r\n const reach = computeReachSet(previousD.configs, token, predicateSet)\r\n if (reach.size === 0) {\r\n addDFAEdge(dfa, previousD, token, DFA_ERROR)\r\n return DFA_ERROR\r\n }\r\n\r\n let newState = newDFAState(reach)\r\n const predictedAlt = getUniqueAlt(reach, predicateSet)\r\n\r\n if (predictedAlt !== undefined) {\r\n newState.isAcceptState = true\r\n newState.prediction = predictedAlt\r\n newState.configs.uniqueAlt = predictedAlt\r\n } else if (hasConflictTerminatingPrediction(reach)) {\r\n const prediction = min(reach.alts)!\r\n newState.isAcceptState = true\r\n newState.prediction = prediction\r\n newState.configs.uniqueAlt = prediction\r\n reportLookaheadAmbiguity.apply(this, [dfa, lookahead, reach.alts, logging])\r\n }\r\n\r\n newState = addDFAEdge(dfa, previousD, token, newState)\r\n return newState\r\n}\r\n\r\nfunction reportLookaheadAmbiguity(\r\n this: BaseParser,\r\n dfa: DFA,\r\n lookahead: number,\r\n ambiguityIndices: number[],\r\n logging: AmbiguityReport\r\n) {\r\n const prefixPath: TokenType[] = []\r\n for (let i = 1; i <= lookahead; i++) {\r\n prefixPath.push(this.LA(i).tokenType)\r\n }\r\n const atnState = dfa.atnStartState\r\n const topLevelRule = atnState.rule\r\n const production = atnState.production\r\n const message = buildAmbiguityError({\r\n topLevelRule,\r\n ambiguityIndices,\r\n production,\r\n prefixPath\r\n })\r\n logging(message)\r\n}\r\n\r\nfunction buildAmbiguityError(options: {\r\n topLevelRule: Rule\r\n prefixPath: TokenType[]\r\n ambiguityIndices: number[]\r\n production: IProductionWithOccurrence\r\n}): string {\r\n const pathMsg = map(options.prefixPath, (currtok) =>\r\n tokenLabel(currtok)\r\n ).join(\", \")\r\n const occurrence =\r\n options.production.idx === 0 ? \"\" : options.production.idx\r\n let currMessage =\r\n `Ambiguous Alternatives Detected: <${options.ambiguityIndices.join(\r\n \", \"\r\n )}> in <${getProductionDslName(options.production)}${occurrence}>` +\r\n ` inside <${options.topLevelRule.name}> Rule,\\n` +\r\n `<${pathMsg}> may appears as a prefix path in all these alternatives.\\n`\r\n\r\n currMessage =\r\n currMessage +\r\n `See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\\n` +\r\n `For Further details.`\r\n return currMessage\r\n}\r\n\r\nfunction getProductionDslName(prod: IProductionWithOccurrence): string {\r\n if (prod instanceof NonTerminal) {\r\n return \"SUBRULE\"\r\n } else if (prod instanceof Option) {\r\n return \"OPTION\"\r\n } else if (prod instanceof Alternation) {\r\n return \"OR\"\r\n } else if (prod instanceof RepetitionMandatory) {\r\n return \"AT_LEAST_ONE\"\r\n } else if (prod instanceof RepetitionMandatoryWithSeparator) {\r\n return \"AT_LEAST_ONE_SEP\"\r\n } else if (prod instanceof RepetitionWithSeparator) {\r\n return \"MANY_SEP\"\r\n } else if (prod instanceof Repetition) {\r\n return \"MANY\"\r\n } else if (prod instanceof Terminal) {\r\n return \"CONSUME\"\r\n } else {\r\n throw Error(\"non exhaustive match\")\r\n }\r\n}\r\n\r\nfunction buildAdaptivePredictError(\r\n path: IToken[],\r\n previous: DFAState,\r\n current: IToken\r\n): AdaptivePredictError {\r\n const nextTransitions = flatMap(\r\n previous.configs.elements,\r\n (e) => e.state.transitions\r\n )\r\n const nextTokenTypes = uniqBy(\r\n nextTransitions\r\n .filter((e): e is AtomTransition => e instanceof AtomTransition)\r\n .map((e) => e.tokenType),\r\n (e) => e.tokenTypeIdx\r\n )\r\n return {\r\n actualToken: current,\r\n possibleTokenTypes: nextTokenTypes,\r\n tokenPath: path\r\n }\r\n}\r\n\r\nfunction getExistingTargetState(\r\n state: DFAState,\r\n token: IToken\r\n): DFAState | undefined {\r\n return state.edges[token.tokenTypeIdx]\r\n}\r\n\r\nfunction computeReachSet(\r\n configs: ATNConfigSet,\r\n token: IToken,\r\n predicateSet: PredicateSet\r\n): ATNConfigSet {\r\n const intermediate = new ATNConfigSet()\r\n const skippedStopStates: ATNConfig[] = []\r\n\r\n for (const c of configs.elements) {\r\n if (predicateSet.is(c.alt) === false) {\r\n continue\r\n }\r\n if (c.state.type === ATN_RULE_STOP) {\r\n skippedStopStates.push(c)\r\n continue\r\n }\r\n const transitionLength = c.state.transitions.length\r\n for (let i = 0; i < transitionLength; i++) {\r\n const transition = c.state.transitions[i]\r\n const target = getReachableTarget(transition, token)\r\n if (target !== undefined) {\r\n intermediate.add({\r\n state: target,\r\n alt: c.alt,\r\n stack: c.stack\r\n })\r\n }\r\n }\r\n }\r\n\r\n let reach: ATNConfigSet | undefined\r\n\r\n if (skippedStopStates.length === 0 && intermediate.size === 1) {\r\n reach = intermediate\r\n }\r\n\r\n if (reach === undefined) {\r\n reach = new ATNConfigSet()\r\n for (const c of intermediate.elements) {\r\n closure(c, reach)\r\n }\r\n }\r\n\r\n if (skippedStopStates.length > 0 && !hasConfigInRuleStopState(reach)) {\r\n for (const c of skippedStopStates) {\r\n reach.add(c)\r\n }\r\n }\r\n\r\n return reach\r\n}\r\n\r\nfunction getReachableTarget(\r\n transition: Transition,\r\n token: IToken\r\n): ATNState | undefined {\r\n if (\r\n transition instanceof AtomTransition &&\r\n tokenMatcher(token, transition.tokenType)\r\n ) {\r\n return transition.target\r\n }\r\n return undefined\r\n}\r\n\r\nfunction getUniqueAlt(\r\n configs: ATNConfigSet,\r\n predicateSet: PredicateSet\r\n): number | undefined {\r\n let alt: number | undefined\r\n for (const c of configs.elements) {\r\n if (predicateSet.is(c.alt) === true) {\r\n if (alt === undefined) {\r\n alt = c.alt\r\n } else if (alt !== c.alt) {\r\n return undefined\r\n }\r\n }\r\n }\r\n return alt\r\n}\r\n\r\nfunction newDFAState(closure: ATNConfigSet): DFAState {\r\n return {\r\n configs: closure,\r\n edges: {},\r\n isAcceptState: false,\r\n prediction: -1\r\n }\r\n}\r\n\r\nfunction addDFAEdge(\r\n dfa: DFA,\r\n from: DFAState,\r\n token: IToken,\r\n to: DFAState\r\n): DFAState {\r\n to = addDFAState(dfa, to)\r\n from.edges[token.tokenTypeIdx] = to\r\n return to\r\n}\r\n\r\nfunction addDFAState(dfa: DFA, state: DFAState): DFAState {\r\n if (state === DFA_ERROR) {\r\n return state\r\n }\r\n // Repetitions have the same config set\r\n // Therefore, storing the key of the config in a map allows us to create a loop in our DFA\r\n const mapKey = state.configs.key\r\n const existing = dfa.states[mapKey]\r\n if (existing !== undefined) {\r\n return existing\r\n }\r\n state.configs.finalize()\r\n dfa.states[mapKey] = state\r\n return state\r\n}\r\n\r\nfunction computeStartState(atnState: ATNState): ATNConfigSet {\r\n const configs = new ATNConfigSet()\r\n\r\n const numberOfTransitions = atnState.transitions.length\r\n for (let i = 0; i < numberOfTransitions; i++) {\r\n const target = atnState.transitions[i].target\r\n const config: ATNConfig = {\r\n state: target,\r\n alt: i,\r\n stack: []\r\n }\r\n closure(config, configs)\r\n }\r\n\r\n return configs\r\n}\r\n\r\nfunction closure(config: ATNConfig, configs: ATNConfigSet): void {\r\n const p = config.state\r\n\r\n if (p.type === ATN_RULE_STOP) {\r\n if (config.stack.length > 0) {\r\n const atnStack = [...config.stack]\r\n const followState = atnStack.pop()!\r\n const followConfig: ATNConfig = {\r\n state: followState,\r\n alt: config.alt,\r\n stack: atnStack\r\n }\r\n closure(followConfig, configs)\r\n } else {\r\n // Dipping into outer context, simply add the config\r\n // This will stop computation once every config is at the rule stop state\r\n configs.add(config)\r\n }\r\n return\r\n }\r\n\r\n if (!p.epsilonOnlyTransitions) {\r\n configs.add(config)\r\n }\r\n\r\n const transitionLength = p.transitions.length\r\n for (let i = 0; i < transitionLength; i++) {\r\n const transition = p.transitions[i]\r\n const c = getEpsilonTarget(config, transition)\r\n\r\n if (c !== undefined) {\r\n closure(c, configs)\r\n }\r\n }\r\n}\r\n\r\nfunction getEpsilonTarget(\r\n config: ATNConfig,\r\n transition: Transition\r\n): ATNConfig | undefined {\r\n if (transition instanceof EpsilonTransition) {\r\n return {\r\n state: transition.target,\r\n alt: config.alt,\r\n stack: config.stack\r\n }\r\n } else if (transition instanceof RuleTransition) {\r\n const stack = [...config.stack, transition.followState]\r\n return {\r\n state: transition.target,\r\n alt: config.alt,\r\n stack\r\n }\r\n }\r\n return undefined\r\n}\r\n\r\nfunction hasConfigInRuleStopState(configs: ATNConfigSet): boolean {\r\n for (const c of configs.elements) {\r\n if (c.state.type === ATN_RULE_STOP) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n\r\nfunction allConfigsInRuleStopStates(configs: ATNConfigSet): boolean {\r\n for (const c of configs.elements) {\r\n if (c.state.type !== ATN_RULE_STOP) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction hasConflictTerminatingPrediction(configs: ATNConfigSet): boolean {\r\n if (allConfigsInRuleStopStates(configs)) {\r\n return true\r\n }\r\n const altSets = getConflictingAltSets(configs.elements)\r\n const heuristic =\r\n hasConflictingAltSet(altSets) && !hasStateAssociatedWithOneAlt(altSets)\r\n return heuristic\r\n}\r\n\r\nfunction getConflictingAltSets(\r\n configs: readonly ATNConfig[]\r\n): Map> {\r\n const configToAlts = new Map>()\r\n for (const c of configs) {\r\n const key = getATNConfigKey(c, false)\r\n let alts = configToAlts.get(key)\r\n if (alts === undefined) {\r\n alts = {}\r\n configToAlts.set(key, alts)\r\n }\r\n alts[c.alt] = true\r\n }\r\n return configToAlts\r\n}\r\n\r\nfunction hasConflictingAltSet(\r\n altSets: Map>\r\n): boolean {\r\n for (const value of Array.from(altSets.values())) {\r\n if (Object.keys(value).length > 1) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n\r\nfunction hasStateAssociatedWithOneAlt(\r\n altSets: Map>\r\n): boolean {\r\n for (const value of Array.from(altSets.values())) {\r\n if (Object.keys(value).length === 1) {\r\n return true\r\n }\r\n }\r\n return false\r\n}\r\n", "/******************************************************************************\r\n * Copyright 2022 TypeFox GmbH\r\n * This program and the accompanying materials are made available under the\r\n * terms of the MIT License, which is available in the project root.\r\n ******************************************************************************/\r\n\r\nexport {\r\n AmbiguityReport,\r\n LLStarLookaheadOptions,\r\n LLStarLookaheadStrategy\r\n} from './all-star-lookahead.js';\r\n", "/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nexport var DocumentUri;\n(function (DocumentUri) {\n function is(value) {\n return typeof value === 'string';\n }\n DocumentUri.is = is;\n})(DocumentUri || (DocumentUri = {}));\nexport var URI;\n(function (URI) {\n function is(value) {\n return typeof value === 'string';\n }\n URI.is = is;\n})(URI || (URI = {}));\nexport var integer;\n(function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;\n }\n integer.is = is;\n})(integer || (integer = {}));\nexport var uinteger;\n(function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;\n }\n uinteger.is = is;\n})(uinteger || (uinteger = {}));\n/**\n * The Position namespace provides helper functions to work with\n * {@link Position} literals.\n */\nexport var Position;\n(function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line, character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Position} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n})(Position || (Position = {}));\n/**\n * The Range namespace provides helper functions to work with\n * {@link Range} literals.\n */\nexport var Range;\n(function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`);\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Range} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n})(Range || (Range = {}));\n/**\n * The Location namespace provides helper functions to work with\n * {@link Location} literals.\n */\nexport var Location;\n(function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri, range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Location} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n})(Location || (Location = {}));\n/**\n * The LocationLink namespace provides helper functions to work with\n * {@link LocationLink} literals.\n */\nexport var LocationLink;\n(function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri, targetRange, targetSelectionRange, originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the {@link LocationLink} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && Range.is(candidate.targetSelectionRange)\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n})(LocationLink || (LocationLink = {}));\n/**\n * The Color namespace provides helper functions to work with\n * {@link Color} literals.\n */\nexport var Color;\n(function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red,\n green,\n blue,\n alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Color} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n})(Color || (Color = {}));\n/**\n * The ColorInformation namespace provides helper functions to work with\n * {@link ColorInformation} literals.\n */\nexport var ColorInformation;\n(function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range,\n color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ColorInformation} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n})(ColorInformation || (ColorInformation = {}));\n/**\n * The Color namespace provides helper functions to work with\n * {@link ColorPresentation} literals.\n */\nexport var ColorPresentation;\n(function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label,\n textEdit,\n additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ColorInformation} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n})(ColorPresentation || (ColorPresentation = {}));\n/**\n * A set of predefined range kinds.\n */\nexport var FoldingRangeKind;\n(function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind.Comment = 'comment';\n /**\n * Folding range for an import or include\n */\n FoldingRangeKind.Imports = 'imports';\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind.Region = 'region';\n})(FoldingRangeKind || (FoldingRangeKind = {}));\n/**\n * The folding range namespace provides helper functions to work with\n * {@link FoldingRange} literals.\n */\nexport var FoldingRange;\n(function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {\n const result = {\n startLine,\n endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n if (Is.defined(collapsedText)) {\n result.collapsedText = collapsedText;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the {@link FoldingRange} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n})(FoldingRange || (FoldingRange = {}));\n/**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * {@link DiagnosticRelatedInformation} literals.\n */\nexport var DiagnosticRelatedInformation;\n(function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location,\n message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\n/**\n * The diagnostic's severity.\n */\nexport var DiagnosticSeverity;\n(function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\n/**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\nexport var DiagnosticTag;\n(function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n})(DiagnosticTag || (DiagnosticTag = {}));\n/**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\nexport var CodeDescription;\n(function (CodeDescription) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n})(CodeDescription || (CodeDescription = {}));\n/**\n * The Diagnostic namespace provides helper functions to work with\n * {@link Diagnostic} literals.\n */\nexport var Diagnostic;\n(function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n let result = { range, message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Diagnostic} interface.\n */\n function is(value) {\n var _a;\n let candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n})(Diagnostic || (Diagnostic = {}));\n/**\n * The Command namespace provides helper functions to work with\n * {@link Command} literals.\n */\nexport var Command;\n(function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command, ...args) {\n let result = { title, command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the {@link Command} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n})(Command || (Command = {}));\n/**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\nexport var TextEdit;\n(function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range, newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates an insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n})(TextEdit || (TextEdit = {}));\nexport var ChangeAnnotation;\n(function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n const result = { label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n})(ChangeAnnotation || (ChangeAnnotation = {}));\nexport var ChangeAnnotationIdentifier;\n(function (ChangeAnnotationIdentifier) {\n function is(value) {\n const candidate = value;\n return Is.string(candidate);\n }\n ChangeAnnotationIdentifier.is = is;\n})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));\nexport var AnnotatedTextEdit;\n(function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range, newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n const candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));\n/**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\nexport var TextDocumentEdit;\n(function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument, edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n let candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n})(TextDocumentEdit || (TextDocumentEdit = {}));\nexport var CreateFile;\n(function (CreateFile) {\n function create(uri, options, annotation) {\n let result = {\n kind: 'create',\n uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n let candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n})(CreateFile || (CreateFile = {}));\nexport var RenameFile;\n(function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n let result = {\n kind: 'rename',\n oldUri,\n newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n let candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n})(RenameFile || (RenameFile = {}));\nexport var DeleteFile;\n(function (DeleteFile) {\n function create(uri, options, annotation) {\n let result = {\n kind: 'delete',\n uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n let candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n})(DeleteFile || (DeleteFile = {}));\nexport var WorkspaceEdit;\n(function (WorkspaceEdit) {\n function is(value) {\n let candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every((change) => {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n})(WorkspaceEdit || (WorkspaceEdit = {}));\nclass TextEditChangeImpl {\n constructor(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n insert(position, newText, annotation) {\n let edit;\n let id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n }\n replace(range, newText, annotation) {\n let edit;\n let id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n }\n delete(range, annotation) {\n let edit;\n let id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n }\n add(edit) {\n this.edits.push(edit);\n }\n all() {\n return this.edits;\n }\n clear() {\n this.edits.splice(0, this.edits.length);\n }\n assertChangeAnnotations(value) {\n if (value === undefined) {\n throw new Error(`Text edit change is not configured to manage change annotations.`);\n }\n }\n}\n/**\n * A helper class\n */\nclass ChangeAnnotations {\n constructor(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n all() {\n return this._annotations;\n }\n get size() {\n return this._size;\n }\n manage(idOrAnnotation, annotation) {\n let id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(`Id ${id} is already in use.`);\n }\n if (annotation === undefined) {\n throw new Error(`No annotation provided for id ${id}`);\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n }\n nextId() {\n this._counter++;\n return this._counter.toString();\n }\n}\n/**\n * A workspace change helps constructing changes to a workspace.\n */\nexport class WorkspaceChange {\n constructor(workspaceEdit) {\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach((change) => {\n if (TextDocumentEdit.is(change)) {\n const textEditChange = new TextEditChangeImpl(change.edits, this._changeAnnotations);\n this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach((key) => {\n const textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n /**\n * Returns the underlying {@link WorkspaceEdit} literal\n * use to be returned from a workspace edit operation like rename.\n */\n get edit() {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n }\n getTextEditChange(key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n const textDocument = { uri: key.uri, version: key.version };\n let result = this._textEditChanges[textDocument.uri];\n if (!result) {\n const edits = [];\n const textDocumentEdit = {\n textDocument,\n edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n let result = this._textEditChanges[key];\n if (!result) {\n let edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n }\n initDocumentChanges() {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n initChanges() {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n }\n createFile(uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n let annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n let operation;\n let id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n }\n renameFile(oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n let annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n let operation;\n let id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n }\n deleteFile(uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n let annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n let operation;\n let id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n }\n}\n/**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * {@link TextDocumentIdentifier} literals.\n */\nexport var TextDocumentIdentifier;\n(function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\n/**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * {@link VersionedTextDocumentIdentifier} literals.\n */\nexport var VersionedTextDocumentIdentifier;\n(function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri, version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\n/**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * {@link OptionalVersionedTextDocumentIdentifier} literals.\n */\nexport var OptionalVersionedTextDocumentIdentifier;\n(function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri, version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));\n/**\n * The TextDocumentItem namespace provides helper functions to work with\n * {@link TextDocumentItem} literals.\n */\nexport var TextDocumentItem;\n(function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri, languageId, version, text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the {@link TextDocumentItem} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n})(TextDocumentItem || (TextDocumentItem = {}));\n/**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\nexport var MarkupKind;\n(function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n /**\n * Checks whether the given value is a value of the {@link MarkupKind} type.\n */\n function is(value) {\n const candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n})(MarkupKind || (MarkupKind = {}));\nexport var MarkupContent;\n(function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the {@link MarkupContent} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n})(MarkupContent || (MarkupContent = {}));\n/**\n * The kind of a completion entry.\n */\nexport var CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n})(CompletionItemKind || (CompletionItemKind = {}));\n/**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\nexport var InsertTextFormat;\n(function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n})(InsertTextFormat || (InsertTextFormat = {}));\n/**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\nexport var CompletionItemTag;\n(function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\nexport var InsertReplaceEdit;\n(function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText, insert, replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.\n */\n function is(value) {\n const candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n})(InsertReplaceEdit || (InsertReplaceEdit = {}));\n/**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\nexport var InsertTextMode;\n(function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n})(InsertTextMode || (InsertTextMode = {}));\nexport var CompletionItemLabelDetails;\n(function (CompletionItemLabelDetails) {\n function is(value) {\n const candidate = value;\n return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n CompletionItemLabelDetails.is = is;\n})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));\n/**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\nexport var CompletionItem;\n(function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label };\n }\n CompletionItem.create = create;\n})(CompletionItem || (CompletionItem = {}));\n/**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\nexport var CompletionList;\n(function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n})(CompletionList || (CompletionList = {}));\nexport var MarkedString;\n(function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the {@link MarkedString} type.\n */\n function is(value) {\n const candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n})(MarkedString || (MarkedString = {}));\nexport var Hover;\n(function (Hover) {\n /**\n * Checks whether the given value conforms to the {@link Hover} interface.\n */\n function is(value) {\n let candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n})(Hover || (Hover = {}));\n/**\n * The ParameterInformation namespace provides helper functions to work with\n * {@link ParameterInformation} literals.\n */\nexport var ParameterInformation;\n(function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label, documentation } : { label };\n }\n ParameterInformation.create = create;\n})(ParameterInformation || (ParameterInformation = {}));\n/**\n * The SignatureInformation namespace provides helper functions to work with\n * {@link SignatureInformation} literals.\n */\nexport var SignatureInformation;\n(function (SignatureInformation) {\n function create(label, documentation, ...parameters) {\n let result = { label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n})(SignatureInformation || (SignatureInformation = {}));\n/**\n * A document highlight kind.\n */\nexport var DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * DocumentHighlight namespace to provide helper functions to work with\n * {@link DocumentHighlight} literals.\n */\nexport var DocumentHighlight;\n(function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n * @param kind The highlight kind\n */\n function create(range, kind) {\n let result = { range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n})(DocumentHighlight || (DocumentHighlight = {}));\n/**\n * A symbol kind.\n */\nexport var SymbolKind;\n(function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n})(SymbolKind || (SymbolKind = {}));\n/**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n *\n * @since 3.16\n */\nexport var SymbolTag;\n(function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n})(SymbolTag || (SymbolTag = {}));\nexport var SymbolInformation;\n(function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n let result = {\n name,\n kind,\n location: { uri, range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n})(SymbolInformation || (SymbolInformation = {}));\nexport var WorkspaceSymbol;\n(function (WorkspaceSymbol) {\n /**\n * Create a new workspace symbol.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param uri The resource of the location of the symbol.\n * @param range An options range of the location.\n * @returns A WorkspaceSymbol.\n */\n function create(name, kind, uri, range) {\n return range !== undefined\n ? { name, kind, location: { uri, range } }\n : { name, kind, location: { uri } };\n }\n WorkspaceSymbol.create = create;\n})(WorkspaceSymbol || (WorkspaceSymbol = {}));\nexport var DocumentSymbol;\n(function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n let result = {\n name,\n detail,\n kind,\n range,\n selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DocumentSymbol} interface.\n */\n function is(value) {\n let candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n})(DocumentSymbol || (DocumentSymbol = {}));\n/**\n * A set of predefined code action kinds\n */\nexport var CodeActionKind;\n(function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n})(CodeActionKind || (CodeActionKind = {}));\n/**\n * The reason why code actions were requested.\n *\n * @since 3.17.0\n */\nexport var CodeActionTriggerKind;\n(function (CodeActionTriggerKind) {\n /**\n * Code actions were explicitly requested by the user or by an extension.\n */\n CodeActionTriggerKind.Invoked = 1;\n /**\n * Code actions were requested automatically.\n *\n * This typically happens when current selection in a file changes, but can\n * also be triggered when file content changes.\n */\n CodeActionTriggerKind.Automatic = 2;\n})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));\n/**\n * The CodeActionContext namespace provides helper functions to work with\n * {@link CodeActionContext} literals.\n */\nexport var CodeActionContext;\n(function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only, triggerKind) {\n let result = { diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n if (triggerKind !== undefined && triggerKind !== null) {\n result.triggerKind = triggerKind;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the {@link CodeActionContext} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)\n && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))\n && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);\n }\n CodeActionContext.is = is;\n})(CodeActionContext || (CodeActionContext = {}));\nexport var CodeAction;\n(function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n let result = { title };\n let checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n let candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n})(CodeAction || (CodeAction = {}));\n/**\n * The CodeLens namespace provides helper functions to work with\n * {@link CodeLens} literals.\n */\nexport var CodeLens;\n(function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n let result = { range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the {@link CodeLens} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n})(CodeLens || (CodeLens = {}));\n/**\n * The FormattingOptions namespace provides helper functions to work with\n * {@link FormattingOptions} literals.\n */\nexport var FormattingOptions;\n(function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize, insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the {@link FormattingOptions} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n})(FormattingOptions || (FormattingOptions = {}));\n/**\n * The DocumentLink namespace provides helper functions to work with\n * {@link DocumentLink} literals.\n */\nexport var DocumentLink;\n(function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range, target, data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the {@link DocumentLink} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n})(DocumentLink || (DocumentLink = {}));\n/**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\nexport var SelectionRange;\n(function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range, parent };\n }\n SelectionRange.create = create;\n function is(value) {\n let candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n})(SelectionRange || (SelectionRange = {}));\n/**\n * A set of predefined token types. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\nexport var SemanticTokenTypes;\n(function (SemanticTokenTypes) {\n SemanticTokenTypes[\"namespace\"] = \"namespace\";\n /**\n * Represents a generic type. Acts as a fallback for types which can't be mapped to\n * a specific type like class or enum.\n */\n SemanticTokenTypes[\"type\"] = \"type\";\n SemanticTokenTypes[\"class\"] = \"class\";\n SemanticTokenTypes[\"enum\"] = \"enum\";\n SemanticTokenTypes[\"interface\"] = \"interface\";\n SemanticTokenTypes[\"struct\"] = \"struct\";\n SemanticTokenTypes[\"typeParameter\"] = \"typeParameter\";\n SemanticTokenTypes[\"parameter\"] = \"parameter\";\n SemanticTokenTypes[\"variable\"] = \"variable\";\n SemanticTokenTypes[\"property\"] = \"property\";\n SemanticTokenTypes[\"enumMember\"] = \"enumMember\";\n SemanticTokenTypes[\"event\"] = \"event\";\n SemanticTokenTypes[\"function\"] = \"function\";\n SemanticTokenTypes[\"method\"] = \"method\";\n SemanticTokenTypes[\"macro\"] = \"macro\";\n SemanticTokenTypes[\"keyword\"] = \"keyword\";\n SemanticTokenTypes[\"modifier\"] = \"modifier\";\n SemanticTokenTypes[\"comment\"] = \"comment\";\n SemanticTokenTypes[\"string\"] = \"string\";\n SemanticTokenTypes[\"number\"] = \"number\";\n SemanticTokenTypes[\"regexp\"] = \"regexp\";\n SemanticTokenTypes[\"operator\"] = \"operator\";\n /**\n * @since 3.17.0\n */\n SemanticTokenTypes[\"decorator\"] = \"decorator\";\n})(SemanticTokenTypes || (SemanticTokenTypes = {}));\n/**\n * A set of predefined token modifiers. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\nexport var SemanticTokenModifiers;\n(function (SemanticTokenModifiers) {\n SemanticTokenModifiers[\"declaration\"] = \"declaration\";\n SemanticTokenModifiers[\"definition\"] = \"definition\";\n SemanticTokenModifiers[\"readonly\"] = \"readonly\";\n SemanticTokenModifiers[\"static\"] = \"static\";\n SemanticTokenModifiers[\"deprecated\"] = \"deprecated\";\n SemanticTokenModifiers[\"abstract\"] = \"abstract\";\n SemanticTokenModifiers[\"async\"] = \"async\";\n SemanticTokenModifiers[\"modification\"] = \"modification\";\n SemanticTokenModifiers[\"documentation\"] = \"documentation\";\n SemanticTokenModifiers[\"defaultLibrary\"] = \"defaultLibrary\";\n})(SemanticTokenModifiers || (SemanticTokenModifiers = {}));\n/**\n * @since 3.16.0\n */\nexport var SemanticTokens;\n(function (SemanticTokens) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&\n Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');\n }\n SemanticTokens.is = is;\n})(SemanticTokens || (SemanticTokens = {}));\n/**\n * The InlineValueText namespace provides functions to deal with InlineValueTexts.\n *\n * @since 3.17.0\n */\nexport var InlineValueText;\n(function (InlineValueText) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, text) {\n return { range, text };\n }\n InlineValueText.create = create;\n function is(value) {\n const candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);\n }\n InlineValueText.is = is;\n})(InlineValueText || (InlineValueText = {}));\n/**\n * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.\n *\n * @since 3.17.0\n */\nexport var InlineValueVariableLookup;\n(function (InlineValueVariableLookup) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, variableName, caseSensitiveLookup) {\n return { range, variableName, caseSensitiveLookup };\n }\n InlineValueVariableLookup.create = create;\n function is(value) {\n const candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)\n && (Is.string(candidate.variableName) || candidate.variableName === undefined);\n }\n InlineValueVariableLookup.is = is;\n})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));\n/**\n * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.\n *\n * @since 3.17.0\n */\nexport var InlineValueEvaluatableExpression;\n(function (InlineValueEvaluatableExpression) {\n /**\n * Creates a new InlineValueEvaluatableExpression literal.\n */\n function create(range, expression) {\n return { range, expression };\n }\n InlineValueEvaluatableExpression.create = create;\n function is(value) {\n const candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range)\n && (Is.string(candidate.expression) || candidate.expression === undefined);\n }\n InlineValueEvaluatableExpression.is = is;\n})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));\n/**\n * The InlineValueContext namespace provides helper functions to work with\n * {@link InlineValueContext} literals.\n *\n * @since 3.17.0\n */\nexport var InlineValueContext;\n(function (InlineValueContext) {\n /**\n * Creates a new InlineValueContext literal.\n */\n function create(frameId, stoppedLocation) {\n return { frameId, stoppedLocation };\n }\n InlineValueContext.create = create;\n /**\n * Checks whether the given literal conforms to the {@link InlineValueContext} interface.\n */\n function is(value) {\n const candidate = value;\n return Is.defined(candidate) && Range.is(value.stoppedLocation);\n }\n InlineValueContext.is = is;\n})(InlineValueContext || (InlineValueContext = {}));\n/**\n * Inlay hint kinds.\n *\n * @since 3.17.0\n */\nexport var InlayHintKind;\n(function (InlayHintKind) {\n /**\n * An inlay hint that for a type annotation.\n */\n InlayHintKind.Type = 1;\n /**\n * An inlay hint that is for a parameter.\n */\n InlayHintKind.Parameter = 2;\n function is(value) {\n return value === 1 || value === 2;\n }\n InlayHintKind.is = is;\n})(InlayHintKind || (InlayHintKind = {}));\nexport var InlayHintLabelPart;\n(function (InlayHintLabelPart) {\n function create(value) {\n return { value };\n }\n InlayHintLabelPart.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.location === undefined || Location.is(candidate.location))\n && (candidate.command === undefined || Command.is(candidate.command));\n }\n InlayHintLabelPart.is = is;\n})(InlayHintLabelPart || (InlayHintLabelPart = {}));\nexport var InlayHint;\n(function (InlayHint) {\n function create(position, label, kind) {\n const result = { position, label };\n if (kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n InlayHint.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.position)\n && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))\n && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))\n && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))\n && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));\n }\n InlayHint.is = is;\n})(InlayHint || (InlayHint = {}));\nexport var StringValue;\n(function (StringValue) {\n function createSnippet(value) {\n return { kind: 'snippet', value };\n }\n StringValue.createSnippet = createSnippet;\n})(StringValue || (StringValue = {}));\nexport var InlineCompletionItem;\n(function (InlineCompletionItem) {\n function create(insertText, filterText, range, command) {\n return { insertText, filterText, range, command };\n }\n InlineCompletionItem.create = create;\n})(InlineCompletionItem || (InlineCompletionItem = {}));\nexport var InlineCompletionList;\n(function (InlineCompletionList) {\n function create(items) {\n return { items };\n }\n InlineCompletionList.create = create;\n})(InlineCompletionList || (InlineCompletionList = {}));\n/**\n * Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.\n *\n * @since 3.18.0\n * @proposed\n */\nexport var InlineCompletionTriggerKind;\n(function (InlineCompletionTriggerKind) {\n /**\n * Completion was triggered explicitly by a user gesture.\n */\n InlineCompletionTriggerKind.Invoked = 0;\n /**\n * Completion was triggered automatically while editing.\n */\n InlineCompletionTriggerKind.Automatic = 1;\n})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));\nexport var SelectedCompletionInfo;\n(function (SelectedCompletionInfo) {\n function create(range, text) {\n return { range, text };\n }\n SelectedCompletionInfo.create = create;\n})(SelectedCompletionInfo || (SelectedCompletionInfo = {}));\nexport var InlineCompletionContext;\n(function (InlineCompletionContext) {\n function create(triggerKind, selectedCompletionInfo) {\n return { triggerKind, selectedCompletionInfo };\n }\n InlineCompletionContext.create = create;\n})(InlineCompletionContext || (InlineCompletionContext = {}));\nexport var WorkspaceFolder;\n(function (WorkspaceFolder) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);\n }\n WorkspaceFolder.is = is;\n})(WorkspaceFolder || (WorkspaceFolder = {}));\nexport const EOL = ['\\n', '\\r\\n', '\\r'];\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's version.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the {@link ITextDocument} interface.\n */\n function is(value) {\n let candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n let text = document.getText();\n let sortedEdits = mergeSort(edits, (a, b) => {\n let diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n let lastModifiedOffset = text.length;\n for (let i = sortedEdits.length - 1; i >= 0; i--) {\n let e = sortedEdits[i];\n let startOffset = document.offsetAt(e.range.start);\n let endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n const p = (data.length / 2) | 0;\n const left = data.slice(0, p);\n const right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n let leftIdx = 0;\n let rightIdx = 0;\n let i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n let ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n})(TextDocument || (TextDocument = {}));\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nclass FullTextDocument {\n constructor(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n get uri() {\n return this._uri;\n }\n get languageId() {\n return this._languageId;\n }\n get version() {\n return this._version;\n }\n getText(range) {\n if (range) {\n let start = this.offsetAt(range.start);\n let end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n }\n update(event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n }\n getLineOffsets() {\n if (this._lineOffsets === undefined) {\n let lineOffsets = [];\n let text = this._content;\n let isLineStart = true;\n for (let i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n let ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n }\n positionAt(offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n let lineOffsets = this.getLineOffsets();\n let low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n let mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n let line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n }\n offsetAt(position) {\n let lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n let lineOffset = lineOffsets[position.line];\n let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n }\n get lineCount() {\n return this.getLineOffsets().length;\n }\n}\nvar Is;\n(function (Is) {\n const toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n})(Is || (Is = {}));\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { IToken, TokenType } from 'chevrotain';\nimport type { Range } from 'vscode-languageserver-types';\nimport type { AbstractElement } from '../languages/generated/ast.js';\nimport type { AstNode, CompositeCstNode, CstNode, LeafCstNode, RootCstNode } from '../syntax-tree.js';\nimport { Position } from 'vscode-languageserver-types';\nimport { isCompositeCstNode } from '../syntax-tree.js';\nimport { tokenToRange } from '../utils/cst-utils.js';\n\nexport class CstNodeBuilder {\n\n private rootNode!: RootCstNodeImpl;\n private nodeStack: CompositeCstNodeImpl[] = [];\n\n private get current(): CompositeCstNodeImpl {\n return this.nodeStack[this.nodeStack.length - 1];\n }\n\n buildRootNode(input: string): RootCstNode {\n this.rootNode = new RootCstNodeImpl(input);\n this.rootNode.root = this.rootNode;\n this.nodeStack = [this.rootNode];\n return this.rootNode;\n }\n\n buildCompositeNode(feature: AbstractElement): CompositeCstNode {\n const compositeNode = new CompositeCstNodeImpl();\n compositeNode.grammarSource = feature;\n compositeNode.root = this.rootNode;\n this.current.content.push(compositeNode);\n this.nodeStack.push(compositeNode);\n return compositeNode;\n }\n\n buildLeafNode(token: IToken, feature: AbstractElement): LeafCstNode {\n const leafNode = new LeafCstNodeImpl(token.startOffset, token.image.length, tokenToRange(token), token.tokenType, false);\n leafNode.grammarSource = feature;\n leafNode.root = this.rootNode;\n this.current.content.push(leafNode);\n return leafNode;\n }\n\n removeNode(node: CstNode): void {\n const parent = node.container;\n if (parent) {\n const index = parent.content.indexOf(node);\n if (index >= 0) {\n parent.content.splice(index, 1);\n }\n }\n }\n\n construct(item: { $type: string | symbol | undefined, $cstNode: CstNode }): void {\n const current: CstNode = this.current;\n // The specified item could be a datatype ($type is symbol) or a fragment ($type is undefined)\n // Only if the $type is a string, we actually assign the element\n if (typeof item.$type === 'string') {\n this.current.astNode = item;\n }\n item.$cstNode = current;\n const node = this.nodeStack.pop();\n // Empty composite nodes are not valid\n // Simply remove the node from the tree\n if (node?.content.length === 0) {\n this.removeNode(node);\n }\n }\n\n addHiddenTokens(hiddenTokens: IToken[]): void {\n for (const token of hiddenTokens) {\n const hiddenNode = new LeafCstNodeImpl(token.startOffset, token.image.length, tokenToRange(token), token.tokenType, true);\n hiddenNode.root = this.rootNode;\n this.addHiddenToken(this.rootNode, hiddenNode);\n }\n }\n\n private addHiddenToken(node: CompositeCstNode, token: LeafCstNode): void {\n const { offset: tokenStart, end: tokenEnd } = token;\n\n for (let i = 0; i < node.content.length; i++) {\n const child = node.content[i];\n const { offset: childStart, end: childEnd } = child;\n if (isCompositeCstNode(child) && tokenStart > childStart && tokenEnd < childEnd) {\n this.addHiddenToken(child, token);\n return;\n } else if (tokenEnd <= childStart) {\n node.content.splice(i, 0, token);\n return;\n }\n }\n\n // We know that we haven't found a suited position for the token\n // So we simply add it to the end of the current node\n node.content.push(token);\n }\n}\n\nexport abstract class AbstractCstNode implements CstNode {\n abstract get offset(): number;\n abstract get length(): number;\n abstract get end(): number;\n abstract get range(): Range;\n\n container?: CompositeCstNode;\n grammarSource: AbstractElement;\n root: RootCstNode;\n private _astNode?: AstNode;\n\n /** @deprecated use `container` instead. */\n get parent(): CompositeCstNode | undefined {\n return this.container;\n }\n\n /** @deprecated use `grammarSource` instead. */\n get feature(): AbstractElement {\n return this.grammarSource;\n }\n\n get hidden(): boolean {\n return false;\n }\n\n get astNode(): AstNode {\n const node = typeof this._astNode?.$type === 'string' ? this._astNode : this.container?.astNode;\n if (!node) {\n throw new Error('This node has no associated AST element');\n }\n return node;\n }\n\n set astNode(value: AstNode) {\n this._astNode = value;\n }\n\n /** @deprecated use `astNode` instead. */\n get element(): AstNode {\n return this.astNode;\n }\n\n get text(): string {\n return this.root.fullText.substring(this.offset, this.end);\n }\n}\n\nexport class LeafCstNodeImpl extends AbstractCstNode implements LeafCstNode {\n get offset(): number {\n return this._offset;\n }\n\n get length(): number {\n return this._length;\n }\n\n get end(): number {\n return this._offset + this._length;\n }\n\n override get hidden(): boolean {\n return this._hidden;\n }\n\n get tokenType(): TokenType {\n return this._tokenType;\n }\n\n get range(): Range {\n return this._range;\n }\n\n private _hidden: boolean;\n private _offset: number;\n private _length: number;\n private _range: Range;\n private _tokenType: TokenType;\n\n constructor(offset: number, length: number, range: Range, tokenType: TokenType, hidden = false) {\n super();\n this._hidden = hidden;\n this._offset = offset;\n this._tokenType = tokenType;\n this._length = length;\n this._range = range;\n }\n}\n\nexport class CompositeCstNodeImpl extends AbstractCstNode implements CompositeCstNode {\n readonly content: CstNode[] = new CstNodeContainer(this);\n private _rangeCache?: Range;\n\n /** @deprecated use `content` instead. */\n get children(): CstNode[] {\n return this.content;\n }\n\n get offset(): number {\n return this.firstNonHiddenNode?.offset ?? 0;\n }\n\n get length(): number {\n return this.end - this.offset;\n }\n\n get end(): number {\n return this.lastNonHiddenNode?.end ?? 0;\n }\n\n get range(): Range {\n const firstNode = this.firstNonHiddenNode;\n const lastNode = this.lastNonHiddenNode;\n if (firstNode && lastNode) {\n if (this._rangeCache === undefined) {\n const { range: firstRange } = firstNode;\n const { range: lastRange } = lastNode;\n this._rangeCache = { start: firstRange.start, end: lastRange.end.line < firstRange.start.line ? firstRange.start : lastRange.end };\n }\n return this._rangeCache;\n } else {\n return { start: Position.create(0, 0), end: Position.create(0, 0) };\n }\n }\n\n private get firstNonHiddenNode(): CstNode | undefined {\n for (const child of this.content) {\n if (!child.hidden) {\n return child;\n }\n }\n return this.content[0];\n }\n\n private get lastNonHiddenNode(): CstNode | undefined {\n for (let i = this.content.length - 1; i >= 0; i--) {\n const child = this.content[i];\n if (!child.hidden) {\n return child;\n }\n }\n return this.content[this.content.length - 1];\n }\n}\n\nclass CstNodeContainer extends Array {\n readonly parent: CompositeCstNode;\n\n constructor(parent: CompositeCstNode) {\n super();\n this.parent = parent;\n Object.setPrototypeOf(this, CstNodeContainer.prototype);\n }\n\n override push(...items: CstNode[]): number {\n this.addParents(items);\n return super.push(...items);\n }\n\n override unshift(...items: CstNode[]): number {\n this.addParents(items);\n return super.unshift(...items);\n }\n\n override splice(start: number, count: number, ...items: CstNode[]): CstNode[] {\n this.addParents(items);\n return super.splice(start, count, ...items);\n }\n\n private addParents(items: CstNode[]): void {\n for (const item of items) {\n (item).container = this.parent;\n }\n }\n}\n\nexport class RootCstNodeImpl extends CompositeCstNodeImpl implements RootCstNode {\n private _text = '';\n\n override get text(): string {\n return this._text.substring(this.offset, this.end);\n }\n\n get fullText(): string {\n return this._text;\n }\n\n constructor(input?: string) {\n super();\n this._text = input ?? '';\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { DSLMethodOpts, ILexingError, IOrAlt, IParserErrorMessageProvider, IRecognitionException, IToken, TokenType, TokenVocabulary } from 'chevrotain';\nimport type { AbstractElement, Action, Assignment, ParserRule } from '../languages/generated/ast.js';\nimport type { Linker } from '../references/linker.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstReflection, CompositeCstNode, CstNode } from '../syntax-tree.js';\nimport type { Lexer } from './lexer.js';\nimport type { IParserConfig } from './parser-config.js';\nimport type { ValueConverter } from './value-converter.js';\nimport { defaultParserErrorProvider, EmbeddedActionsParser, LLkLookaheadStrategy } from 'chevrotain';\nimport { LLStarLookaheadStrategy } from 'chevrotain-allstar';\nimport { isAssignment, isCrossReference, isKeyword } from '../languages/generated/ast.js';\nimport { getTypeName, isDataTypeRule } from '../utils/grammar-utils.js';\nimport { assignMandatoryProperties, getContainerOfType, linkContentToContainer } from '../utils/ast-utils.js';\nimport { CstNodeBuilder } from './cst-node-builder.js';\n\nexport type ParseResult = {\n value: T,\n parserErrors: IRecognitionException[],\n lexerErrors: ILexingError[]\n}\n\nexport const DatatypeSymbol = Symbol('Datatype');\n\ninterface DataTypeNode {\n $cstNode: CompositeCstNode\n /** Instead of a string, this node is uniquely identified by the `Datatype` symbol */\n $type: symbol\n /** Used as a storage for all parsed terminals, keywords and sub-datatype rules */\n value: string\n}\n\nfunction isDataTypeNode(node: { $type: string | symbol | undefined }): node is DataTypeNode {\n return node.$type === DatatypeSymbol;\n}\n\ntype RuleResult = (args: Args) => any;\n\ntype Args = Record;\n\ntype RuleImpl = (args: Args) => any;\n\ninterface AssignmentElement {\n assignment?: Assignment\n isCrossRef: boolean\n}\n\nexport interface BaseParser {\n rule(rule: ParserRule, impl: RuleImpl): RuleResult;\n alternatives(idx: number, choices: Array>): void;\n optional(idx: number, callback: DSLMethodOpts): void;\n many(idx: number, callback: DSLMethodOpts): void;\n atLeastOne(idx: number, callback: DSLMethodOpts): void;\n consume(idx: number, tokenType: TokenType, feature: AbstractElement): void;\n subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void;\n action($type: string, action: Action): void;\n construct(): unknown;\n isRecording(): boolean;\n get unorderedGroups(): Map;\n getRuleStack(): number[];\n}\n\nconst ruleSuffix = '\\u200B';\nconst withRuleSuffix = (name: string): string => name.endsWith(ruleSuffix) ? name : name + ruleSuffix;\n\nexport abstract class AbstractLangiumParser implements BaseParser {\n\n protected readonly lexer: Lexer;\n protected readonly wrapper: ChevrotainWrapper;\n protected _unorderedGroups: Map = new Map();\n\n constructor(services: LangiumCoreServices) {\n this.lexer = services.parser.Lexer;\n const tokens = this.lexer.definition;\n this.wrapper = new ChevrotainWrapper(tokens, {\n ...services.parser.ParserConfig,\n errorMessageProvider: services.parser.ParserErrorMessageProvider\n });\n }\n\n alternatives(idx: number, choices: Array>): void {\n this.wrapper.wrapOr(idx, choices);\n }\n\n optional(idx: number, callback: DSLMethodOpts): void {\n this.wrapper.wrapOption(idx, callback);\n }\n\n many(idx: number, callback: DSLMethodOpts): void {\n this.wrapper.wrapMany(idx, callback);\n }\n\n atLeastOne(idx: number, callback: DSLMethodOpts): void {\n this.wrapper.wrapAtLeastOne(idx, callback);\n }\n\n abstract rule(rule: ParserRule, impl: RuleImpl): RuleResult;\n abstract consume(idx: number, tokenType: TokenType, feature: AbstractElement): void;\n abstract subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void;\n abstract action($type: string, action: Action): void;\n abstract construct(): unknown;\n\n isRecording(): boolean {\n return this.wrapper.IS_RECORDING;\n }\n\n get unorderedGroups(): Map {\n return this._unorderedGroups;\n }\n\n getRuleStack(): number[] {\n return (this.wrapper as any).RULE_STACK;\n }\n\n finalize(): void {\n this.wrapper.wrapSelfAnalysis();\n }\n}\n\nexport class LangiumParser extends AbstractLangiumParser {\n private readonly linker: Linker;\n private readonly converter: ValueConverter;\n private readonly astReflection: AstReflection;\n private readonly nodeBuilder = new CstNodeBuilder();\n private stack: any[] = [];\n private mainRule!: RuleResult;\n private assignmentMap = new Map();\n\n private get current(): any {\n return this.stack[this.stack.length - 1];\n }\n\n constructor(services: LangiumCoreServices) {\n super(services);\n this.linker = services.references.Linker;\n this.converter = services.parser.ValueConverter;\n this.astReflection = services.shared.AstReflection;\n }\n\n rule(rule: ParserRule, impl: RuleImpl): RuleResult {\n const type = rule.fragment ? undefined : isDataTypeRule(rule) ? DatatypeSymbol : getTypeName(rule);\n const ruleMethod = this.wrapper.DEFINE_RULE(withRuleSuffix(rule.name), this.startImplementation(type, impl).bind(this));\n if (rule.entry) {\n this.mainRule = ruleMethod;\n }\n return ruleMethod;\n }\n\n parse(input: string): ParseResult {\n this.nodeBuilder.buildRootNode(input);\n const lexerResult = this.lexer.tokenize(input);\n this.wrapper.input = lexerResult.tokens;\n const result = this.mainRule.call(this.wrapper, {});\n this.nodeBuilder.addHiddenTokens(lexerResult.hidden);\n this.unorderedGroups.clear();\n return {\n value: result,\n lexerErrors: lexerResult.errors,\n parserErrors: this.wrapper.errors\n };\n }\n\n private startImplementation($type: string | symbol | undefined, implementation: RuleImpl): RuleImpl {\n return (args) => {\n if (!this.isRecording()) {\n const node: any = { $type };\n this.stack.push(node);\n if ($type === DatatypeSymbol) {\n node.value = '';\n }\n }\n let result: unknown;\n try {\n result = implementation(args);\n } catch (err) {\n result = undefined;\n }\n if (!this.isRecording() && result === undefined) {\n result = this.construct();\n }\n return result;\n };\n }\n\n consume(idx: number, tokenType: TokenType, feature: AbstractElement): void {\n const token = this.wrapper.wrapConsume(idx, tokenType);\n if (!this.isRecording() && this.isValidToken(token)) {\n const leafNode = this.nodeBuilder.buildLeafNode(token, feature);\n const { assignment, isCrossRef } = this.getAssignment(feature);\n const current = this.current;\n if (assignment) {\n const convertedValue = isKeyword(feature) ? token.image : this.converter.convert(token.image, leafNode);\n this.assign(assignment.operator, assignment.feature, convertedValue, leafNode, isCrossRef);\n } else if (isDataTypeNode(current)) {\n let text = token.image;\n if (!isKeyword(feature)) {\n text = this.converter.convert(text, leafNode).toString();\n }\n current.value += text;\n }\n }\n }\n\n /**\n * Most consumed parser tokens are valid. However there are two cases in which they are not valid:\n *\n * 1. They were inserted during error recovery by the parser. These tokens don't really exist and should not be further processed\n * 2. They contain invalid token ranges. This might include the special EOF token, or other tokens produced by invalid token builders.\n */\n private isValidToken(token: IToken): boolean {\n return !token.isInsertedInRecovery && !isNaN(token.startOffset) && typeof token.endOffset === 'number' && !isNaN(token.endOffset);\n }\n\n subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void {\n let cstNode: CompositeCstNode | undefined;\n if (!this.isRecording()) {\n cstNode = this.nodeBuilder.buildCompositeNode(feature);\n }\n const subruleResult = this.wrapper.wrapSubrule(idx, rule, args) as any;\n if (!this.isRecording() && cstNode && cstNode.length > 0) {\n this.performSubruleAssignment(subruleResult, feature, cstNode);\n }\n }\n\n private performSubruleAssignment(result: any, feature: AbstractElement, cstNode: CompositeCstNode): void {\n const { assignment, isCrossRef } = this.getAssignment(feature);\n if (assignment) {\n this.assign(assignment.operator, assignment.feature, result, cstNode, isCrossRef);\n } else if (!assignment) {\n // If we call a subrule without an assignment we either:\n // 1. append the result of the subrule (data type rule)\n // 2. override the current object with the newly parsed object\n // If the current element is an AST node and the result of the subrule\n // is a data type rule, we can safely discard the results.\n const current = this.current;\n if (isDataTypeNode(current)) {\n current.value += result.toString();\n } else if (typeof result === 'object' && result) {\n const resultKind = result.$type;\n const object = this.assignWithoutOverride(result, current);\n if (resultKind) {\n object.$type = resultKind;\n }\n const newItem = object;\n this.stack.pop();\n this.stack.push(newItem);\n }\n }\n }\n\n action($type: string, action: Action): void {\n if (!this.isRecording()) {\n let last = this.current;\n // This branch is used for left recursive grammar rules.\n // Those don't call `construct` before another action.\n // Therefore, we need to call it here.\n if (!last.$cstNode && action.feature && action.operator) {\n last = this.construct(false);\n const feature = last.$cstNode.feature;\n this.nodeBuilder.buildCompositeNode(feature);\n }\n const newItem = { $type };\n this.stack.pop();\n this.stack.push(newItem);\n if (action.feature && action.operator) {\n this.assign(action.operator, action.feature, last, last.$cstNode, false);\n }\n }\n }\n\n construct(pop = true): unknown {\n if (this.isRecording()) {\n return undefined;\n }\n const obj = this.current;\n linkContentToContainer(obj);\n this.nodeBuilder.construct(obj);\n if (pop) {\n this.stack.pop();\n }\n if (isDataTypeNode(obj)) {\n return this.converter.convert(obj.value, obj.$cstNode);\n } else {\n assignMandatoryProperties(this.astReflection, obj);\n }\n return obj;\n }\n\n private getAssignment(feature: AbstractElement): AssignmentElement {\n if (!this.assignmentMap.has(feature)) {\n const assignment = getContainerOfType(feature, isAssignment);\n this.assignmentMap.set(feature, {\n assignment: assignment,\n isCrossRef: assignment ? isCrossReference(assignment.terminal) : false\n });\n }\n return this.assignmentMap.get(feature)!;\n }\n\n private assign(operator: string, feature: string, value: unknown, cstNode: CstNode, isCrossRef: boolean): void {\n const obj = this.current;\n let item: unknown;\n if (isCrossRef && typeof value === 'string') {\n item = this.linker.buildReference(obj, feature, cstNode, value);\n } else {\n item = value;\n }\n switch (operator) {\n case '=': {\n obj[feature] = item;\n break;\n }\n case '?=': {\n obj[feature] = true;\n break;\n }\n case '+=': {\n if (!Array.isArray(obj[feature])) {\n obj[feature] = [];\n }\n obj[feature].push(item);\n }\n }\n }\n\n private assignWithoutOverride(target: any, source: any): any {\n for (const [name, existingValue] of Object.entries(source)) {\n const newValue = target[name];\n if (newValue === undefined) {\n target[name] = existingValue;\n } else if (Array.isArray(newValue) && Array.isArray(existingValue)) {\n existingValue.push(...newValue);\n target[name] = existingValue;\n }\n }\n return target;\n }\n\n get definitionErrors(): IParserDefinitionError[] {\n return this.wrapper.definitionErrors;\n }\n}\n\nexport interface IParserDefinitionError {\n message: string\n type: number\n ruleName?: string\n}\n\nexport abstract class AbstractParserErrorMessageProvider implements IParserErrorMessageProvider {\n\n buildMismatchTokenMessage(options: {\n expected: TokenType\n actual: IToken\n previous: IToken\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildMismatchTokenMessage(options);\n }\n\n buildNotAllInputParsedMessage(options: {\n firstRedundant: IToken\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildNotAllInputParsedMessage(options);\n }\n\n buildNoViableAltMessage(options: {\n expectedPathsPerAlt: TokenType[][][]\n actual: IToken[]\n previous: IToken\n customUserDescription: string\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildNoViableAltMessage(options);\n }\n\n buildEarlyExitMessage(options: {\n expectedIterationPaths: TokenType[][]\n actual: IToken[]\n previous: IToken\n customUserDescription: string\n ruleName: string\n }): string {\n return defaultParserErrorProvider.buildEarlyExitMessage(options);\n }\n\n}\n\nexport class LangiumParserErrorMessageProvider extends AbstractParserErrorMessageProvider {\n\n override buildMismatchTokenMessage({ expected, actual }: {\n expected: TokenType\n actual: IToken\n previous: IToken\n ruleName: string\n }): string {\n const expectedMsg = expected.LABEL\n ? '`' + expected.LABEL + '`'\n : expected.name.endsWith(':KW')\n ? `keyword '${expected.name.substring(0, expected.name.length - 3)}'`\n : `token of type '${expected.name}'`;\n return `Expecting ${expectedMsg} but found \\`${actual.image}\\`.`;\n }\n\n override buildNotAllInputParsedMessage({ firstRedundant }: {\n firstRedundant: IToken\n ruleName: string\n }): string {\n return `Expecting end of file but found \\`${firstRedundant.image}\\`.`;\n }\n}\n\nexport interface CompletionParserResult {\n tokens: IToken[]\n elementStack: AbstractElement[]\n tokenIndex: number\n}\n\nexport class LangiumCompletionParser extends AbstractLangiumParser {\n private mainRule!: RuleResult;\n private tokens: IToken[] = [];\n\n private elementStack: AbstractElement[] = [];\n private lastElementStack: AbstractElement[] = [];\n private nextTokenIndex = 0;\n private stackSize = 0;\n\n action(): void {\n // NOOP\n }\n\n construct(): unknown {\n // NOOP\n return undefined;\n }\n\n parse(input: string): CompletionParserResult {\n this.resetState();\n const tokens = this.lexer.tokenize(input);\n this.tokens = tokens.tokens;\n this.wrapper.input = [...this.tokens];\n this.mainRule.call(this.wrapper, {});\n this.unorderedGroups.clear();\n return {\n tokens: this.tokens,\n elementStack: [...this.lastElementStack],\n tokenIndex: this.nextTokenIndex\n };\n }\n\n rule(rule: ParserRule, impl: RuleImpl): RuleResult {\n const ruleMethod = this.wrapper.DEFINE_RULE(withRuleSuffix(rule.name), this.startImplementation(impl).bind(this));\n if (rule.entry) {\n this.mainRule = ruleMethod;\n }\n return ruleMethod;\n }\n\n private resetState(): void {\n this.elementStack = [];\n this.lastElementStack = [];\n this.nextTokenIndex = 0;\n this.stackSize = 0;\n }\n\n private startImplementation(implementation: RuleImpl): RuleImpl {\n return (args) => {\n const size = this.keepStackSize();\n try {\n implementation(args);\n } finally {\n this.resetStackSize(size);\n }\n };\n }\n\n private removeUnexpectedElements(): void {\n this.elementStack.splice(this.stackSize);\n }\n\n keepStackSize(): number {\n const size = this.elementStack.length;\n this.stackSize = size;\n return size;\n }\n\n resetStackSize(size: number): void {\n this.removeUnexpectedElements();\n this.stackSize = size;\n }\n\n consume(idx: number, tokenType: TokenType, feature: AbstractElement): void {\n this.wrapper.wrapConsume(idx, tokenType);\n if (!this.isRecording()) {\n this.lastElementStack = [...this.elementStack, feature];\n this.nextTokenIndex = this.currIdx + 1;\n }\n }\n\n subrule(idx: number, rule: RuleResult, feature: AbstractElement, args: Args): void {\n this.before(feature);\n this.wrapper.wrapSubrule(idx, rule, args);\n this.after(feature);\n }\n\n before(element: AbstractElement): void {\n if (!this.isRecording()) {\n this.elementStack.push(element);\n }\n }\n\n after(element: AbstractElement): void {\n if (!this.isRecording()) {\n const index = this.elementStack.lastIndexOf(element);\n if (index >= 0) {\n this.elementStack.splice(index);\n }\n }\n }\n\n get currIdx(): number {\n return (this.wrapper as any).currIdx;\n }\n}\n\nconst defaultConfig: IParserConfig = {\n recoveryEnabled: true,\n nodeLocationTracking: 'full',\n skipValidations: true,\n errorMessageProvider: new LangiumParserErrorMessageProvider()\n};\n\n/**\n * This class wraps the embedded actions parser of chevrotain and exposes protected methods.\n * This way, we can build the `LangiumParser` as a composition.\n */\nclass ChevrotainWrapper extends EmbeddedActionsParser {\n\n // This array is set in the base implementation of Chevrotain.\n definitionErrors: IParserDefinitionError[];\n\n constructor(tokens: TokenVocabulary, config?: IParserConfig) {\n const useDefaultLookahead = config && 'maxLookahead' in config;\n super(tokens, {\n ...defaultConfig,\n lookaheadStrategy: useDefaultLookahead\n ? new LLkLookaheadStrategy({ maxLookahead: config.maxLookahead })\n : new LLStarLookaheadStrategy(),\n ...config,\n });\n }\n\n get IS_RECORDING(): boolean {\n return this.RECORDING_PHASE;\n }\n\n DEFINE_RULE(name: string, impl: RuleImpl): RuleResult {\n return this.RULE(name, impl);\n }\n\n wrapSelfAnalysis(): void {\n this.performSelfAnalysis();\n }\n\n wrapConsume(idx: number, tokenType: TokenType): IToken {\n return this.consume(idx, tokenType);\n }\n\n wrapSubrule(idx: number, rule: RuleResult, args: Args): unknown {\n return this.subrule(idx, rule, {\n ARGS: [args]\n });\n }\n\n wrapOr(idx: number, choices: Array>): void {\n this.or(idx, choices);\n }\n\n wrapOption(idx: number, callback: DSLMethodOpts): void {\n this.option(idx, callback);\n }\n\n wrapMany(idx: number, callback: DSLMethodOpts): void {\n this.many(idx, callback);\n }\n\n wrapAtLeastOne(idx: number, callback: DSLMethodOpts): void {\n this.atLeastOne(idx, callback);\n }\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { IOrAlt, TokenType, TokenTypeDictionary } from 'chevrotain';\nimport type { AbstractElement, Action, Alternatives, Condition, CrossReference, Grammar, Group, Keyword, NamedArgument, ParserRule, RuleCall, UnorderedGroup } from '../languages/generated/ast.js';\nimport type { BaseParser } from './langium-parser.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport type { Cardinality } from '../utils/grammar-utils.js';\nimport { EMPTY_ALT, EOF } from 'chevrotain';\nimport { isAction, isAlternatives, isEndOfFile, isAssignment, isConjunction, isCrossReference, isDisjunction, isGroup, isKeyword, isNegation, isParameterReference, isParserRule, isRuleCall, isTerminalRule, isUnorderedGroup, isBooleanLiteral } from '../languages/generated/ast.js';\nimport { assertUnreachable, ErrorWithLocation } from '../utils/errors.js';\nimport { stream } from '../utils/stream.js';\nimport { findNameAssignment, getAllReachableRules, getTypeName } from '../utils/grammar-utils.js';\n\ntype RuleContext = {\n optional: number,\n consume: number,\n subrule: number,\n many: number,\n or: number\n} & ParserContext;\n\ntype ParserContext = {\n parser: BaseParser\n tokens: TokenTypeDictionary\n rules: Map\n ruleNames: Map\n}\n\ntype Rule = (args: Args) => unknown;\n\ntype Args = Record;\n\ntype Predicate = (args: Args) => boolean;\n\ntype Method = (args: Args) => void;\n\nexport function createParser(grammar: Grammar, parser: T, tokens: TokenTypeDictionary): T {\n const rules = new Map();\n const parserContext: ParserContext = {\n parser,\n tokens,\n rules,\n ruleNames: new Map()\n };\n buildRules(parserContext, grammar);\n return parser;\n}\n\nfunction buildRules(parserContext: ParserContext, grammar: Grammar): void {\n const reachable = getAllReachableRules(grammar, false);\n const parserRules = stream(grammar.rules).filter(isParserRule).filter(rule => reachable.has(rule));\n for (const rule of parserRules) {\n const ctx: RuleContext = {\n ...parserContext,\n consume: 1,\n optional: 1,\n subrule: 1,\n many: 1,\n or: 1\n };\n ctx.rules.set(\n rule.name,\n parserContext.parser.rule(rule, buildElement(ctx, rule.definition))\n );\n }\n}\n\nfunction buildElement(ctx: RuleContext, element: AbstractElement, ignoreGuard = false): Method {\n let method: Method;\n if (isKeyword(element)) {\n method = buildKeyword(ctx, element);\n } else if (isAction(element)) {\n method = buildAction(ctx, element);\n } else if (isAssignment(element)) {\n method = buildElement(ctx, element.terminal);\n } else if (isCrossReference(element)) {\n method = buildCrossReference(ctx, element);\n } else if (isRuleCall(element)) {\n method = buildRuleCall(ctx, element);\n } else if (isAlternatives(element)) {\n method = buildAlternatives(ctx, element);\n } else if (isUnorderedGroup(element)) {\n method = buildUnorderedGroup(ctx, element);\n } else if (isGroup(element)) {\n method = buildGroup(ctx, element);\n } else if(isEndOfFile(element)) {\n const idx = ctx.consume++;\n method = () => ctx.parser.consume(idx, EOF, element);\n } else {\n throw new ErrorWithLocation(element.$cstNode, `Unexpected element type: ${element.$type}`);\n }\n return wrap(ctx, ignoreGuard ? undefined : getGuardCondition(element), method, element.cardinality);\n}\n\nfunction buildAction(ctx: RuleContext, action: Action): Method {\n const actionType = getTypeName(action);\n return () => ctx.parser.action(actionType, action);\n}\n\nfunction buildRuleCall(ctx: RuleContext, ruleCall: RuleCall): Method {\n const rule = ruleCall.rule.ref;\n if (isParserRule(rule)) {\n const idx = ctx.subrule++;\n const predicate = ruleCall.arguments.length > 0 ? buildRuleCallPredicate(rule, ruleCall.arguments) : () => ({});\n return (args) => ctx.parser.subrule(idx, getRule(ctx, rule), ruleCall, predicate(args));\n } else if (isTerminalRule(rule)) {\n const idx = ctx.consume++;\n const method = getToken(ctx, rule.name);\n return () => ctx.parser.consume(idx, method, ruleCall);\n } else if (!rule) {\n throw new ErrorWithLocation(ruleCall.$cstNode, `Undefined rule type: ${ruleCall.$type}`);\n } else {\n assertUnreachable(rule);\n }\n}\n\nfunction buildRuleCallPredicate(rule: ParserRule, namedArgs: NamedArgument[]): (args: Args) => Args {\n const predicates = namedArgs.map(e => buildPredicate(e.value));\n return (args) => {\n const ruleArgs: Args = {};\n for (let i = 0; i < predicates.length; i++) {\n const ruleTarget = rule.parameters[i];\n const predicate = predicates[i];\n ruleArgs[ruleTarget.name] = predicate(args);\n }\n return ruleArgs;\n };\n}\n\ninterface PredicatedMethod {\n ALT: Method,\n GATE?: Predicate\n}\n\nfunction buildPredicate(condition: Condition): Predicate {\n if (isDisjunction(condition)) {\n const left = buildPredicate(condition.left);\n const right = buildPredicate(condition.right);\n return (args) => (left(args) || right(args));\n } else if (isConjunction(condition)) {\n const left = buildPredicate(condition.left);\n const right = buildPredicate(condition.right);\n return (args) => (left(args) && right(args));\n } else if (isNegation(condition)) {\n const value = buildPredicate(condition.value);\n return (args) => !value(args);\n } else if (isParameterReference(condition)) {\n const name = condition.parameter.ref!.name;\n return (args) => args !== undefined && args[name] === true;\n } else if (isBooleanLiteral(condition)) {\n const value = Boolean(condition.true);\n return () => value;\n }\n assertUnreachable(condition);\n}\n\nfunction buildAlternatives(ctx: RuleContext, alternatives: Alternatives): Method {\n if (alternatives.elements.length === 1) {\n return buildElement(ctx, alternatives.elements[0]);\n } else {\n const methods: PredicatedMethod[] = [];\n\n for (const element of alternatives.elements) {\n const predicatedMethod: PredicatedMethod = {\n // Since we handle the guard condition in the alternative already\n // We can ignore the group guard condition inside\n ALT: buildElement(ctx, element, true)\n };\n const guard = getGuardCondition(element);\n if (guard) {\n predicatedMethod.GATE = buildPredicate(guard);\n }\n methods.push(predicatedMethod);\n }\n\n const idx = ctx.or++;\n return (args) => ctx.parser.alternatives(idx, methods.map(method => {\n const alt: IOrAlt = {\n ALT: () => method.ALT(args)\n };\n const gate = method.GATE;\n if (gate) {\n alt.GATE = () => gate(args);\n }\n return alt;\n }));\n }\n}\n\nfunction buildUnorderedGroup(ctx: RuleContext, group: UnorderedGroup): Method {\n if (group.elements.length === 1) {\n return buildElement(ctx, group.elements[0]);\n }\n const methods: PredicatedMethod[] = [];\n\n for (const element of group.elements) {\n const predicatedMethod: PredicatedMethod = {\n // Since we handle the guard condition in the alternative already\n // We can ignore the group guard condition inside\n ALT: buildElement(ctx, element, true)\n };\n const guard = getGuardCondition(element);\n if (guard) {\n predicatedMethod.GATE = buildPredicate(guard);\n }\n methods.push(predicatedMethod);\n }\n\n const orIdx = ctx.or++;\n\n const idFunc = (groupIdx: number, lParser: BaseParser) => {\n const stackId = lParser.getRuleStack().join('-');\n return `uGroup_${groupIdx}_${stackId}`;\n };\n const alternatives: Method = (args) => ctx.parser.alternatives(orIdx, methods.map((method, idx) => {\n const alt: IOrAlt = { ALT: () => true };\n const parser = ctx.parser;\n alt.ALT = () => {\n method.ALT(args);\n if (!parser.isRecording()) {\n const key = idFunc(orIdx, parser);\n if (!parser.unorderedGroups.get(key)) {\n // init after clear state\n parser.unorderedGroups.set(key, []);\n }\n const groupState = parser.unorderedGroups.get(key)!;\n if (typeof groupState?.[idx] === 'undefined') {\n // Not accessed yet\n groupState[idx] = true;\n }\n }\n };\n const gate = method.GATE;\n if (gate) {\n alt.GATE = () => gate(args);\n } else {\n alt.GATE = () => {\n const trackedAlternatives = parser.unorderedGroups.get(idFunc(orIdx, parser));\n const allow = !trackedAlternatives?.[idx];\n return allow;\n };\n }\n return alt;\n }));\n const wrapped = wrap(ctx, getGuardCondition(group), alternatives, '*');\n return (args) => {\n wrapped(args);\n if (!ctx.parser.isRecording()) {\n ctx.parser.unorderedGroups.delete(idFunc(orIdx, ctx.parser));\n }\n };\n}\n\nfunction buildGroup(ctx: RuleContext, group: Group): Method {\n const methods = group.elements.map(e => buildElement(ctx, e));\n return (args) => methods.forEach(method => method(args));\n}\n\nfunction getGuardCondition(element: AbstractElement): Condition | undefined {\n if (isGroup(element)) {\n return element.guardCondition;\n }\n return undefined;\n}\n\nfunction buildCrossReference(ctx: RuleContext, crossRef: CrossReference, terminal = crossRef.terminal): Method {\n if (!terminal) {\n if (!crossRef.type.ref) {\n throw new Error('Could not resolve reference to type: ' + crossRef.type.$refText);\n }\n const assignment = findNameAssignment(crossRef.type.ref);\n const assignTerminal = assignment?.terminal;\n if (!assignTerminal) {\n throw new Error('Could not find name assignment for type: ' + getTypeName(crossRef.type.ref));\n }\n return buildCrossReference(ctx, crossRef, assignTerminal);\n } else if (isRuleCall(terminal) && isParserRule(terminal.rule.ref)) {\n const idx = ctx.subrule++;\n return (args) => ctx.parser.subrule(idx, getRule(ctx, terminal.rule.ref as ParserRule), crossRef, args);\n } else if (isRuleCall(terminal) && isTerminalRule(terminal.rule.ref)) {\n const idx = ctx.consume++;\n const terminalRule = getToken(ctx, terminal.rule.ref.name);\n return () => ctx.parser.consume(idx, terminalRule, crossRef);\n } else if (isKeyword(terminal)) {\n const idx = ctx.consume++;\n const keyword = getToken(ctx, terminal.value);\n return () => ctx.parser.consume(idx, keyword, crossRef);\n }\n else {\n throw new Error('Could not build cross reference parser');\n }\n}\n\nfunction buildKeyword(ctx: RuleContext, keyword: Keyword): Method {\n const idx = ctx.consume++;\n const token = ctx.tokens[keyword.value];\n if (!token) {\n throw new Error('Could not find token for keyword: ' + keyword.value);\n }\n return () => ctx.parser.consume(idx, token, keyword);\n}\n\nfunction wrap(ctx: RuleContext, guard: Condition | undefined, method: Method, cardinality: Cardinality): Method {\n const gate = guard && buildPredicate(guard);\n\n if (!cardinality) {\n if (gate) {\n const idx = ctx.or++;\n return (args) => ctx.parser.alternatives(idx, [\n {\n ALT: () => method(args),\n GATE: () => gate(args)\n },\n {\n ALT: EMPTY_ALT(),\n GATE: () => !gate(args)\n }\n ]);\n } else {\n return method;\n }\n }\n\n if (cardinality === '*') {\n const idx = ctx.many++;\n return (args) => ctx.parser.many(idx, {\n DEF: () => method(args),\n GATE: gate ? () => gate(args) : undefined\n });\n } else if (cardinality === '+') {\n const idx = ctx.many++;\n if (gate) {\n const orIdx = ctx.or++;\n // In the case of a guard condition for the `+` group\n // We combine it with an empty alternative\n // If the condition returns true, it needs to parse at least a single iteration\n // If its false, it is not allowed to parse anything\n return (args) => ctx.parser.alternatives(orIdx, [\n {\n ALT: () => ctx.parser.atLeastOne(idx, {\n DEF: () => method(args)\n }),\n GATE: () => gate(args)\n },\n {\n ALT: EMPTY_ALT(),\n GATE: () => !gate(args)\n }\n ]);\n } else {\n return (args) => ctx.parser.atLeastOne(idx, {\n DEF: () => method(args),\n });\n }\n } else if (cardinality === '?') {\n const idx = ctx.optional++;\n return (args) => ctx.parser.optional(idx, {\n DEF: () => method(args),\n GATE: gate ? () => gate(args) : undefined\n });\n } else {\n assertUnreachable(cardinality);\n }\n}\n\nfunction getRule(ctx: ParserContext, element: ParserRule | AbstractElement): Rule {\n const name = getRuleName(ctx, element);\n const rule = ctx.rules.get(name);\n if (!rule) throw new Error(`Rule \"${name}\" not found.\"`);\n return rule;\n}\n\nfunction getRuleName(ctx: ParserContext, element: ParserRule | AbstractElement): string {\n if (isParserRule(element)) {\n return element.name;\n } else if (ctx.ruleNames.has(element)) {\n return ctx.ruleNames.get(element)!;\n } else {\n let item: AstNode = element;\n let parent: AstNode = item.$container!;\n let ruleName: string = element.$type;\n while (!isParserRule(parent)) {\n if (isGroup(parent) || isAlternatives(parent) || isUnorderedGroup(parent)) {\n const index = parent.elements.indexOf(item as AbstractElement);\n ruleName = index.toString() + ':' + ruleName;\n }\n item = parent;\n parent = parent.$container!;\n }\n const rule = parent as ParserRule;\n ruleName = rule.name + ':' + ruleName;\n ctx.ruleNames.set(element, ruleName);\n return ruleName;\n }\n}\n\nfunction getToken(ctx: ParserContext, name: string): TokenType {\n const token = ctx.tokens[name];\n if (!token) throw new Error(`Token \"${name}\" not found.\"`);\n return token;\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport { LangiumCompletionParser } from './langium-parser.js';\nimport { createParser } from './parser-builder-base.js';\n\nexport function createCompletionParser(services: LangiumCoreServices): LangiumCompletionParser {\n const grammar = services.Grammar;\n const lexer = services.parser.Lexer;\n const parser = new LangiumCompletionParser(services);\n createParser(grammar, parser, lexer.definition);\n parser.finalize();\n return parser;\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport { LangiumParser } from './langium-parser.js';\nimport { createParser } from './parser-builder-base.js';\n\n/**\n * Create and finalize a Langium parser. The parser rules are derived from the grammar, which is\n * available at `services.Grammar`.\n */\nexport function createLangiumParser(services: LangiumCoreServices): LangiumParser {\n const parser = prepareLangiumParser(services);\n parser.finalize();\n return parser;\n}\n\n/**\n * Create a Langium parser without finalizing it. This is used to extract more detailed error\n * information when the parser is initially validated.\n */\nexport function prepareLangiumParser(services: LangiumCoreServices): LangiumParser {\n const grammar = services.Grammar;\n const lexer = services.parser.Lexer;\n const parser = new LangiumParser(services);\n return createParser(grammar, parser, lexer.definition);\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CustomPatternMatcherFunc, TokenPattern, TokenType, TokenVocabulary } from 'chevrotain';\nimport type { AbstractRule, Grammar, Keyword, TerminalRule } from '../languages/generated/ast.js';\nimport type { Stream } from '../utils/stream.js';\nimport { Lexer } from 'chevrotain';\nimport { isKeyword, isParserRule, isTerminalRule } from '../languages/generated/ast.js';\nimport { streamAllContents } from '../utils/ast-utils.js';\nimport { getAllReachableRules, terminalRegex } from '../utils/grammar-utils.js';\nimport { getCaseInsensitivePattern, isWhitespace, partialMatches } from '../utils/regexp-utils.js';\nimport { stream } from '../utils/stream.js';\n\nexport interface TokenBuilderOptions {\n caseInsensitive?: boolean\n}\n\nexport interface TokenBuilder {\n buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary;\n}\n\nexport class DefaultTokenBuilder implements TokenBuilder {\n\n buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary {\n const reachableRules = stream(getAllReachableRules(grammar, false));\n const terminalTokens: TokenType[] = this.buildTerminalTokens(reachableRules);\n const tokens: TokenType[] = this.buildKeywordTokens(reachableRules, terminalTokens, options);\n\n terminalTokens.forEach(terminalToken => {\n const pattern = terminalToken.PATTERN;\n if (typeof pattern === 'object' && pattern && 'test' in pattern && isWhitespace(pattern)) {\n tokens.unshift(terminalToken);\n } else {\n tokens.push(terminalToken);\n }\n });\n // We don't need to add the EOF token explicitly.\n // It is automatically available at the end of the token stream.\n return tokens;\n }\n\n protected buildTerminalTokens(rules: Stream): TokenType[] {\n return rules.filter(isTerminalRule).filter(e => !e.fragment)\n .map(terminal => this.buildTerminalToken(terminal)).toArray();\n }\n\n protected buildTerminalToken(terminal: TerminalRule): TokenType {\n const regex = terminalRegex(terminal);\n const pattern = this.requiresCustomPattern(regex) ? this.regexPatternFunction(regex) : regex;\n const tokenType: TokenType = {\n name: terminal.name,\n PATTERN: pattern,\n LINE_BREAKS: true\n };\n if (terminal.hidden) {\n // Only skip tokens that are able to accept whitespace\n tokenType.GROUP = isWhitespace(regex) ? Lexer.SKIPPED : 'hidden';\n }\n return tokenType;\n }\n\n protected requiresCustomPattern(regex: RegExp): boolean {\n if (regex.flags.includes('u')) {\n // Unicode regexes are not supported by Chevrotain.\n return true;\n } else if (regex.source.includes('?<=') || regex.source.includes('? {\n stickyRegex.lastIndex = offset;\n const execResult = stickyRegex.exec(text);\n return execResult;\n };\n }\n\n protected buildKeywordTokens(rules: Stream, terminalTokens: TokenType[], options?: TokenBuilderOptions): TokenType[] {\n return rules\n // We filter by parser rules, since keywords in terminal rules get transformed into regex and are not actual tokens\n .filter(isParserRule)\n .flatMap(rule => streamAllContents(rule).filter(isKeyword))\n .distinct(e => e.value).toArray()\n // Sort keywords by descending length\n .sort((a, b) => b.value.length - a.value.length)\n .map(keyword => this.buildKeywordToken(keyword, terminalTokens, Boolean(options?.caseInsensitive)));\n }\n\n protected buildKeywordToken(keyword: Keyword, terminalTokens: TokenType[], caseInsensitive: boolean): TokenType {\n return {\n name: keyword.value,\n PATTERN: this.buildKeywordPattern(keyword, caseInsensitive),\n LONGER_ALT: this.findLongerAlt(keyword, terminalTokens)\n };\n }\n\n protected buildKeywordPattern(keyword: Keyword, caseInsensitive: boolean): TokenPattern {\n return caseInsensitive ?\n new RegExp(getCaseInsensitivePattern(keyword.value)) :\n keyword.value;\n }\n\n protected findLongerAlt(keyword: Keyword, terminalTokens: TokenType[]): TokenType[] {\n return terminalTokens.reduce((longerAlts: TokenType[], token) => {\n const pattern = token?.PATTERN as RegExp;\n if (pattern?.source && partialMatches('^' + pattern.source + '$', keyword.value)) {\n longerAlts.push(token);\n }\n return longerAlts;\n }, []);\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AbstractElement, AbstractRule } from '../languages/generated/ast.js';\nimport type { CstNode } from '../syntax-tree.js';\nimport { isCrossReference, isRuleCall } from '../languages/generated/ast.js';\nimport { getCrossReferenceTerminal, getRuleType } from '../utils/grammar-utils.js';\n\n/**\n * Language-specific service for converting string values from the source text format into a value to be held in the AST.\n */\nexport interface ValueConverter {\n /**\n * Converts a string value from the source text format into a value to be held in the AST.\n */\n convert(input: string, cstNode: CstNode): ValueType;\n}\n\nexport type ValueType = string | number | boolean | bigint | Date;\n\nexport class DefaultValueConverter implements ValueConverter {\n\n convert(input: string, cstNode: CstNode): ValueType {\n let feature: AbstractElement | undefined = cstNode.grammarSource;\n if (isCrossReference(feature)) {\n feature = getCrossReferenceTerminal(feature);\n }\n if (isRuleCall(feature)) {\n const rule = feature.rule.ref;\n if (!rule) {\n throw new Error('This cst node was not parsed by a rule.');\n }\n return this.runConverter(rule, input, cstNode);\n }\n return input;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected runConverter(rule: AbstractRule, input: string, cstNode: CstNode): ValueType {\n switch (rule.name.toUpperCase()) {\n case 'INT': return ValueConverter.convertInt(input);\n case 'STRING': return ValueConverter.convertString(input);\n case 'ID': return ValueConverter.convertID(input);\n }\n switch (getRuleType(rule)?.toLowerCase()) {\n case 'number': return ValueConverter.convertNumber(input);\n case 'boolean': return ValueConverter.convertBoolean(input);\n case 'bigint': return ValueConverter.convertBigint(input);\n case 'date': return ValueConverter.convertDate(input);\n default: return input;\n }\n }\n}\n\nexport namespace ValueConverter {\n\n export function convertString(input: string): string {\n let result = '';\n for (let i = 1; i < input.length - 1; i++) {\n const c = input.charAt(i);\n if (c === '\\\\') {\n const c1 = input.charAt(++i);\n result += convertEscapeCharacter(c1);\n } else {\n result += c;\n }\n }\n return result;\n }\n\n function convertEscapeCharacter(char: string): string {\n switch (char) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n case '0': return '\\0';\n default: return char;\n }\n }\n\n export function convertID(input: string): string {\n if (input.charAt(0) === '^') {\n return input.substring(1);\n } else {\n return input;\n }\n }\n\n export function convertInt(input: string): number {\n return parseInt(input);\n }\n\n export function convertBigint(input: string): bigint {\n return BigInt(input);\n }\n\n export function convertDate(input: string): Date {\n return new Date(input);\n }\n\n export function convertNumber(input: string): number {\n return Number(input);\n }\n\n export function convertBoolean(input: string): boolean {\n return input.toLowerCase() === 'true';\n }\n\n}\n", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet _ral;\nfunction RAL() {\n if (_ral === undefined) {\n throw new Error(`No runtime abstraction layer installed`);\n }\n return _ral;\n}\n(function (RAL) {\n function install(ral) {\n if (ral === undefined) {\n throw new Error(`No runtime abstraction layer provided`);\n }\n _ral = ral;\n }\n RAL.install = install;\n})(RAL || (RAL = {}));\nexports.default = RAL;\n", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;\nfunction boolean(value) {\n return value === true || value === false;\n}\nexports.boolean = boolean;\nfunction string(value) {\n return typeof value === 'string' || value instanceof String;\n}\nexports.string = string;\nfunction number(value) {\n return typeof value === 'number' || value instanceof Number;\n}\nexports.number = number;\nfunction error(value) {\n return value instanceof Error;\n}\nexports.error = error;\nfunction func(value) {\n return typeof value === 'function';\n}\nexports.func = func;\nfunction array(value) {\n return Array.isArray(value);\n}\nexports.array = array;\nfunction stringArray(value) {\n return array(value) && value.every(elem => string(elem));\n}\nexports.stringArray = stringArray;\n", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Emitter = exports.Event = void 0;\nconst ral_1 = require(\"./ral\");\nvar Event;\n(function (Event) {\n const _disposable = { dispose() { } };\n Event.None = function () { return _disposable; };\n})(Event || (exports.Event = Event = {}));\nclass CallbackList {\n add(callback, context = null, bucket) {\n if (!this._callbacks) {\n this._callbacks = [];\n this._contexts = [];\n }\n this._callbacks.push(callback);\n this._contexts.push(context);\n if (Array.isArray(bucket)) {\n bucket.push({ dispose: () => this.remove(callback, context) });\n }\n }\n remove(callback, context = null) {\n if (!this._callbacks) {\n return;\n }\n let foundCallbackWithDifferentContext = false;\n for (let i = 0, len = this._callbacks.length; i < len; i++) {\n if (this._callbacks[i] === callback) {\n if (this._contexts[i] === context) {\n // callback & context match => remove it\n this._callbacks.splice(i, 1);\n this._contexts.splice(i, 1);\n return;\n }\n else {\n foundCallbackWithDifferentContext = true;\n }\n }\n }\n if (foundCallbackWithDifferentContext) {\n throw new Error('When adding a listener with a context, you should remove it with the same context');\n }\n }\n invoke(...args) {\n if (!this._callbacks) {\n return [];\n }\n const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\n for (let i = 0, len = callbacks.length; i < len; i++) {\n try {\n ret.push(callbacks[i].apply(contexts[i], args));\n }\n catch (e) {\n // eslint-disable-next-line no-console\n (0, ral_1.default)().console.error(e);\n }\n }\n return ret;\n }\n isEmpty() {\n return !this._callbacks || this._callbacks.length === 0;\n }\n dispose() {\n this._callbacks = undefined;\n this._contexts = undefined;\n }\n}\nclass Emitter {\n constructor(_options) {\n this._options = _options;\n }\n /**\n * For the public to allow to subscribe\n * to events from this Emitter\n */\n get event() {\n if (!this._event) {\n this._event = (listener, thisArgs, disposables) => {\n if (!this._callbacks) {\n this._callbacks = new CallbackList();\n }\n if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {\n this._options.onFirstListenerAdd(this);\n }\n this._callbacks.add(listener, thisArgs);\n const result = {\n dispose: () => {\n if (!this._callbacks) {\n // disposable is disposed after emitter is disposed.\n return;\n }\n this._callbacks.remove(listener, thisArgs);\n result.dispose = Emitter._noop;\n if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {\n this._options.onLastListenerRemove(this);\n }\n }\n };\n if (Array.isArray(disposables)) {\n disposables.push(result);\n }\n return result;\n };\n }\n return this._event;\n }\n /**\n * To be kept private to fire an event to\n * subscribers\n */\n fire(event) {\n if (this._callbacks) {\n this._callbacks.invoke.call(this._callbacks, event);\n }\n }\n dispose() {\n if (this._callbacks) {\n this._callbacks.dispose();\n this._callbacks = undefined;\n }\n }\n}\nexports.Emitter = Emitter;\nEmitter._noop = function () { };\n", "\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CancellationTokenSource = exports.CancellationToken = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst events_1 = require(\"./events\");\nvar CancellationToken;\n(function (CancellationToken) {\n CancellationToken.None = Object.freeze({\n isCancellationRequested: false,\n onCancellationRequested: events_1.Event.None\n });\n CancellationToken.Cancelled = Object.freeze({\n isCancellationRequested: true,\n onCancellationRequested: events_1.Event.None\n });\n function is(value) {\n const candidate = value;\n return candidate && (candidate === CancellationToken.None\n || candidate === CancellationToken.Cancelled\n || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));\n }\n CancellationToken.is = is;\n})(CancellationToken || (exports.CancellationToken = CancellationToken = {}));\nconst shortcutEvent = Object.freeze(function (callback, context) {\n const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);\n return { dispose() { handle.dispose(); } };\n});\nclass MutableToken {\n constructor() {\n this._isCancelled = false;\n }\n cancel() {\n if (!this._isCancelled) {\n this._isCancelled = true;\n if (this._emitter) {\n this._emitter.fire(undefined);\n this.dispose();\n }\n }\n }\n get isCancellationRequested() {\n return this._isCancelled;\n }\n get onCancellationRequested() {\n if (this._isCancelled) {\n return shortcutEvent;\n }\n if (!this._emitter) {\n this._emitter = new events_1.Emitter();\n }\n return this._emitter.event;\n }\n dispose() {\n if (this._emitter) {\n this._emitter.dispose();\n this._emitter = undefined;\n }\n }\n}\nclass CancellationTokenSource {\n get token() {\n if (!this._token) {\n // be lazy and create the token only when\n // actually needed\n this._token = new MutableToken();\n }\n return this._token;\n }\n cancel() {\n if (!this._token) {\n // save an object by returning the default\n // cancelled token when cancellation happens\n // before someone asks for the token\n this._token = CancellationToken.Cancelled;\n }\n else {\n this._token.cancel();\n }\n }\n dispose() {\n if (!this._token) {\n // ensure to initialize with an empty token if we had none\n this._token = CancellationToken.None;\n }\n else if (this._token instanceof MutableToken) {\n // actually dispose\n this._token.dispose();\n }\n }\n}\nexports.CancellationTokenSource = CancellationTokenSource;\n", "/******************************************************************************\n * Copyright 2024 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n// eslint-disable-next-line no-restricted-imports\nexport * from 'vscode-jsonrpc/lib/common/cancellation.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { CancellationToken, CancellationTokenSource, type AbstractCancellationTokenSource } from '../utils/cancellation.js';\n\nexport type MaybePromise = T | Promise\n\n/**\n * Delays the execution of the current code to the next tick of the event loop.\n * Don't call this method directly in a tight loop to prevent too many promises from being created.\n */\nexport function delayNextTick(): Promise {\n return new Promise(resolve => {\n // In case we are running in a non-node environment, `setImmediate` isn't available.\n // Using `setTimeout` of the browser API accomplishes the same result.\n if (typeof setImmediate === 'undefined') {\n setTimeout(resolve, 0);\n } else {\n setImmediate(resolve);\n }\n });\n}\n\nlet lastTick = 0;\nlet globalInterruptionPeriod = 10;\n\n/**\n * Reset the global interruption period and create a cancellation token source.\n */\nexport function startCancelableOperation(): AbstractCancellationTokenSource {\n lastTick = Date.now();\n return new CancellationTokenSource();\n}\n\n/**\n * Change the period duration for `interruptAndCheck` to the given number of milliseconds.\n * The default value is 10ms.\n */\nexport function setInterruptionPeriod(period: number): void {\n globalInterruptionPeriod = period;\n}\n\n/**\n * This symbol may be thrown in an asynchronous context by any Langium service that receives\n * a `CancellationToken`. This means that the promise returned by such a service is rejected with\n * this symbol as rejection reason.\n */\nexport const OperationCancelled = Symbol('OperationCancelled');\n\n/**\n * Use this in a `catch` block to check whether the thrown object indicates that the operation\n * has been cancelled.\n */\nexport function isOperationCancelled(err: unknown): err is typeof OperationCancelled {\n return err === OperationCancelled;\n}\n\n/**\n * This function does two things:\n * 1. Check the elapsed time since the last call to this function or to `startCancelableOperation`. If the predefined\n * period (configured with `setInterruptionPeriod`) is exceeded, execution is delayed with `delayNextTick`.\n * 2. If the predefined period is not met yet or execution is resumed after an interruption, the given cancellation\n * token is checked, and if cancellation is requested, `OperationCanceled` is thrown.\n *\n * All services in Langium that receive a `CancellationToken` may potentially call this function, so the\n * `CancellationToken` must be caught (with an `async` try-catch block or a `catch` callback attached to\n * the promise) to avoid that event being exposed as an error.\n */\nexport async function interruptAndCheck(token: CancellationToken): Promise {\n if (token === CancellationToken.None) {\n // Early exit in case cancellation was disabled by the caller\n return;\n }\n const current = Date.now();\n if (current - lastTick >= globalInterruptionPeriod) {\n lastTick = current;\n await delayNextTick();\n }\n if (token.isCancellationRequested) {\n throw OperationCancelled;\n }\n}\n\n/**\n * Simple implementation of the deferred pattern.\n * An object that exposes a promise and functions to resolve and reject it.\n */\nexport class Deferred {\n resolve: (value: T) => this;\n reject: (err?: unknown) => this;\n\n promise = new Promise((resolve, reject) => {\n this.resolve = (arg) => {\n resolve(arg);\n return this;\n };\n this.reject = (err) => {\n reject(err);\n return this;\n };\n });\n}\n", "/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n'use strict';\nclass FullTextDocument {\n constructor(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n get uri() {\n return this._uri;\n }\n get languageId() {\n return this._languageId;\n }\n get version() {\n return this._version;\n }\n getText(range) {\n if (range) {\n const start = this.offsetAt(range.start);\n const end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n }\n update(changes, version) {\n for (const change of changes) {\n if (FullTextDocument.isIncremental(change)) {\n // makes sure start is before end\n const range = getWellformedRange(change.range);\n // update content\n const startOffset = this.offsetAt(range.start);\n const endOffset = this.offsetAt(range.end);\n this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);\n // update the offsets\n const startLine = Math.max(range.start.line, 0);\n const endLine = Math.max(range.end.line, 0);\n let lineOffsets = this._lineOffsets;\n const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);\n if (endLine - startLine === addedLineOffsets.length) {\n for (let i = 0, len = addedLineOffsets.length; i < len; i++) {\n lineOffsets[i + startLine + 1] = addedLineOffsets[i];\n }\n }\n else {\n if (addedLineOffsets.length < 10000) {\n lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);\n }\n else { // avoid too many arguments for splice\n this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));\n }\n }\n const diff = change.text.length - (endOffset - startOffset);\n if (diff !== 0) {\n for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {\n lineOffsets[i] = lineOffsets[i] + diff;\n }\n }\n }\n else if (FullTextDocument.isFull(change)) {\n this._content = change.text;\n this._lineOffsets = undefined;\n }\n else {\n throw new Error('Unknown change event received');\n }\n }\n this._version = version;\n }\n getLineOffsets() {\n if (this._lineOffsets === undefined) {\n this._lineOffsets = computeLineOffsets(this._content, true);\n }\n return this._lineOffsets;\n }\n positionAt(offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n const lineOffsets = this.getLineOffsets();\n let low = 0, high = lineOffsets.length;\n if (high === 0) {\n return { line: 0, character: offset };\n }\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n const line = low - 1;\n offset = this.ensureBeforeEOL(offset, lineOffsets[line]);\n return { line, character: offset - lineOffsets[line] };\n }\n offsetAt(position) {\n const lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n const lineOffset = lineOffsets[position.line];\n if (position.character <= 0) {\n return lineOffset;\n }\n const nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n const offset = Math.min(lineOffset + position.character, nextLineOffset);\n return this.ensureBeforeEOL(offset, lineOffset);\n }\n ensureBeforeEOL(offset, lineOffset) {\n while (offset > lineOffset && isEOL(this._content.charCodeAt(offset - 1))) {\n offset--;\n }\n return offset;\n }\n get lineCount() {\n return this.getLineOffsets().length;\n }\n static isIncremental(event) {\n const candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range !== undefined &&\n (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');\n }\n static isFull(event) {\n const candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;\n }\n}\nexport var TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new text document.\n *\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's initial version number.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Updates a TextDocument by modifying its content.\n *\n * @param document the document to update. Only documents created by TextDocument.create are valid inputs.\n * @param changes the changes to apply to the document.\n * @param version the changes version for the document.\n * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.\n *\n */\n function update(document, changes, version) {\n if (document instanceof FullTextDocument) {\n document.update(changes, version);\n return document;\n }\n else {\n throw new Error('TextDocument.update: document must be created by TextDocument.create');\n }\n }\n TextDocument.update = update;\n function applyEdits(document, edits) {\n const text = document.getText();\n const sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {\n const diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n let lastModifiedOffset = 0;\n const spans = [];\n for (const e of sortedEdits) {\n const startOffset = document.offsetAt(e.range.start);\n if (startOffset < lastModifiedOffset) {\n throw new Error('Overlapping edit');\n }\n else if (startOffset > lastModifiedOffset) {\n spans.push(text.substring(lastModifiedOffset, startOffset));\n }\n if (e.newText.length) {\n spans.push(e.newText);\n }\n lastModifiedOffset = document.offsetAt(e.range.end);\n }\n spans.push(text.substr(lastModifiedOffset));\n return spans.join('');\n }\n TextDocument.applyEdits = applyEdits;\n})(TextDocument || (TextDocument = {}));\nfunction mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n const p = (data.length / 2) | 0;\n const left = data.slice(0, p);\n const right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n let leftIdx = 0;\n let rightIdx = 0;\n let i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n const ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n}\nfunction computeLineOffsets(text, isAtLineStart, textOffset = 0) {\n const result = isAtLineStart ? [textOffset] : [];\n for (let i = 0; i < text.length; i++) {\n const ch = text.charCodeAt(i);\n if (isEOL(ch)) {\n if (ch === 13 /* CharCode.CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* CharCode.LineFeed */) {\n i++;\n }\n result.push(textOffset + i + 1);\n }\n }\n return result;\n}\nfunction isEOL(char) {\n return char === 13 /* CharCode.CarriageReturn */ || char === 10 /* CharCode.LineFeed */;\n}\nfunction getWellformedRange(range) {\n const start = range.start;\n const end = range.end;\n if (start.line > end.line || (start.line === end.line && start.character > end.character)) {\n return { start: end, end: start };\n }\n return range;\n}\nfunction getWellformedEdit(textEdit) {\n const range = getWellformedRange(textEdit.range);\n if (range !== textEdit.range) {\n return { newText: textEdit.newText, range };\n }\n return textEdit;\n}\n", "// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\n// !!!!!\n// SEE https://github.com/microsoft/vscode/blob/master/src/vs/base/common/platform.ts\n// !!!!!\n\ndeclare const process: { platform: 'win32' };\ndeclare const navigator: { userAgent: string };\n\nexport let isWindows: boolean;\n\nif (typeof process === 'object') {\n\tisWindows = process.platform === 'win32';\n} else if (typeof navigator === 'object') {\n\tlet userAgent = navigator.userAgent;\n\tisWindows = userAgent.indexOf('Windows') >= 0;\n}\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n\nimport { CharCode } from './charCode'\nimport { isWindows } from './platform';\n\nconst _schemePattern = /^\\w[\\w\\d+.-]*$/;\nconst _singleSlashStart = /^\\//;\nconst _doubleSlashStart = /^\\/\\//;\n\nfunction _validateUri(ret: URI, _strict?: boolean): void {\n\n\t// scheme, must be set\n\tif (!ret.scheme && _strict) {\n\t\tthrow new Error(`[UriError]: Scheme is missing: {scheme: \"\", authority: \"${ret.authority}\", path: \"${ret.path}\", query: \"${ret.query}\", fragment: \"${ret.fragment}\"}`);\n\t}\n\n\t// scheme, https://tools.ietf.org/html/rfc3986#section-3.1\n\t// ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\n\tif (ret.scheme && !_schemePattern.test(ret.scheme)) {\n\t\tthrow new Error('[UriError]: Scheme contains illegal characters.');\n\t}\n\n\t// path, http://tools.ietf.org/html/rfc3986#section-3.3\n\t// If a URI contains an authority component, then the path component\n\t// must either be empty or begin with a slash (\"/\") character. If a URI\n\t// does not contain an authority component, then the path cannot begin\n\t// with two slash characters (\"//\").\n\tif (ret.path) {\n\t\tif (ret.authority) {\n\t\t\tif (!_singleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash (\"/\") character');\n\t\t\t}\n\t\t} else {\n\t\t\tif (_doubleSlashStart.test(ret.path)) {\n\t\t\t\tthrow new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters (\"//\")');\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for a while we allowed uris *without* schemes and this is the migration\n// for them, e.g. an uri without scheme and without strict-mode warns and falls\n// back to the file-scheme. that should cause the least carnage and still be a\n// clear warning\nfunction _schemeFix(scheme: string, _strict: boolean): string {\n\tif (!scheme && !_strict) {\n\t\treturn 'file';\n\t}\n\treturn scheme;\n}\n\n// implements a bit of https://tools.ietf.org/html/rfc3986#section-5\nfunction _referenceResolution(scheme: string, path: string): string {\n\n\t// the slash-character is our 'default base' as we don't\n\t// support constructing URIs relative to other URIs. This\n\t// also means that we alter and potentially break paths.\n\t// see https://tools.ietf.org/html/rfc3986#section-5.1.4\n\tswitch (scheme) {\n\t\tcase 'https':\n\t\tcase 'http':\n\t\tcase 'file':\n\t\t\tif (!path) {\n\t\t\t\tpath = _slash;\n\t\t\t} else if (path[0] !== _slash) {\n\t\t\t\tpath = _slash + path;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn path;\n}\n\nconst _empty = '';\nconst _slash = '/';\nconst _regexp = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\n/**\n * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.\n * This class is a simple parser which creates the basic component parts\n * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation\n * and encoding.\n *\n * ```txt\n * foo://example.com:8042/over/there?name=ferret#nose\n * \\_/ \\______________/\\_________/ \\_________/ \\__/\n * | | | | |\n * scheme authority path query fragment\n * | _____________________|__\n * / \\ / \\\n * urn:example:animal:ferret:nose\n * ```\n */\nexport class URI implements UriComponents {\n\n\tstatic isUri(thing: any): thing is URI {\n\t\tif (thing instanceof URI) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!thing) {\n\t\t\treturn false;\n\t\t}\n\t\treturn typeof (thing).authority === 'string'\n\t\t\t&& typeof (thing).fragment === 'string'\n\t\t\t&& typeof (thing).path === 'string'\n\t\t\t&& typeof (thing).query === 'string'\n\t\t\t&& typeof (thing).scheme === 'string'\n\t\t\t&& typeof (thing).fsPath === 'string'\n\t\t\t&& typeof (thing).with === 'function'\n\t\t\t&& typeof (thing).toString === 'function';\n\t}\n\n\t/**\n\t * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part before the first colon.\n\t */\n\treadonly scheme: string;\n\n\t/**\n\t * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.\n\t * The part between the first double slashes and the next slash.\n\t */\n\treadonly authority: string;\n\n\t/**\n\t * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly path: string;\n\n\t/**\n\t * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly query: string;\n\n\t/**\n\t * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.\n\t */\n\treadonly fragment: string;\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(components: UriComponents);\n\n\t/**\n\t * @internal\n\t */\n\tprotected constructor(schemeOrData: string | UriComponents, authority?: string, path?: string, query?: string, fragment?: string, _strict: boolean = false) {\n\n\t\tif (typeof schemeOrData === 'object') {\n\t\t\tthis.scheme = schemeOrData.scheme || _empty;\n\t\t\tthis.authority = schemeOrData.authority || _empty;\n\t\t\tthis.path = schemeOrData.path || _empty;\n\t\t\tthis.query = schemeOrData.query || _empty;\n\t\t\tthis.fragment = schemeOrData.fragment || _empty;\n\t\t\t// no validation because it's this URI\n\t\t\t// that creates uri components.\n\t\t\t// _validateUri(this);\n\t\t} else {\n\t\t\tthis.scheme = _schemeFix(schemeOrData, _strict);\n\t\t\tthis.authority = authority || _empty;\n\t\t\tthis.path = _referenceResolution(this.scheme, path || _empty);\n\t\t\tthis.query = query || _empty;\n\t\t\tthis.fragment = fragment || _empty;\n\n\t\t\t_validateUri(this, _strict);\n\t\t}\n\t}\n\n\t// ---- filesystem path -----------------------\n\n\t/**\n\t * Returns a string representing the corresponding file system path of this URI.\n\t * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the\n\t * platform specific path separator.\n\t *\n\t * * Will *not* validate the path for invalid characters and semantics.\n\t * * Will *not* look at the scheme of this URI.\n\t * * The result shall *not* be used for display purposes but for accessing a file on disk.\n\t *\n\t *\n\t * The *difference* to `URI#path` is the use of the platform specific separator and the handling\n\t * of UNC paths. See the below sample of a file-uri with an authority (UNC path).\n\t *\n\t * ```ts\n\t\tconst u = URI.parse('file://server/c$/folder/file.txt')\n\t\tu.authority === 'server'\n\t\tu.path === '/shares/c$/file.txt'\n\t\tu.fsPath === '\\\\server\\c$\\folder\\file.txt'\n\t```\n\t *\n\t * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,\n\t * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working\n\t * with URIs that represent files on disk (`file` scheme).\n\t */\n\tget fsPath(): string {\n\t\t// if (this.scheme !== 'file') {\n\t\t// \tconsole.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);\n\t\t// }\n\t\treturn uriToFsPath(this, false);\n\t}\n\n\t// ---- modify to new -------------------------\n\n\twith(change: { scheme?: string; authority?: string | null; path?: string | null; query?: string | null; fragment?: string | null }): URI {\n\n\t\tif (!change) {\n\t\t\treturn this;\n\t\t}\n\n\t\tlet { scheme, authority, path, query, fragment } = change;\n\t\tif (scheme === undefined) {\n\t\t\tscheme = this.scheme;\n\t\t} else if (scheme === null) {\n\t\t\tscheme = _empty;\n\t\t}\n\t\tif (authority === undefined) {\n\t\t\tauthority = this.authority;\n\t\t} else if (authority === null) {\n\t\t\tauthority = _empty;\n\t\t}\n\t\tif (path === undefined) {\n\t\t\tpath = this.path;\n\t\t} else if (path === null) {\n\t\t\tpath = _empty;\n\t\t}\n\t\tif (query === undefined) {\n\t\t\tquery = this.query;\n\t\t} else if (query === null) {\n\t\t\tquery = _empty;\n\t\t}\n\t\tif (fragment === undefined) {\n\t\t\tfragment = this.fragment;\n\t\t} else if (fragment === null) {\n\t\t\tfragment = _empty;\n\t\t}\n\n\t\tif (scheme === this.scheme\n\t\t\t&& authority === this.authority\n\t\t\t&& path === this.path\n\t\t\t&& query === this.query\n\t\t\t&& fragment === this.fragment) {\n\n\t\t\treturn this;\n\t\t}\n\n\t\treturn new Uri(scheme, authority, path, query, fragment);\n\t}\n\n\t// ---- parse & validate ------------------------\n\n\t/**\n\t * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,\n\t * `file:///usr/home`, or `scheme:with/path`.\n\t *\n\t * @param value A string which represents an URI (see `URI#toString`).\n\t */\n\tstatic parse(value: string, _strict: boolean = false): URI {\n\t\tconst match = _regexp.exec(value);\n\t\tif (!match) {\n\t\t\treturn new Uri(_empty, _empty, _empty, _empty, _empty);\n\t\t}\n\t\treturn new Uri(\n\t\t\tmatch[2] || _empty,\n\t\t\tpercentDecode(match[4] || _empty),\n\t\t\tpercentDecode(match[5] || _empty),\n\t\t\tpercentDecode(match[7] || _empty),\n\t\t\tpercentDecode(match[9] || _empty),\n\t\t\t_strict\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new URI from a file system path, e.g. `c:\\my\\files`,\n\t * `/usr/home`, or `\\\\server\\share\\some\\path`.\n\t *\n\t * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument\n\t * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**\n\t * `URI.parse('file://' + path)` because the path might contain characters that are\n\t * interpreted (# and ?). See the following sample:\n\t * ```ts\n\tconst good = URI.file('/coding/c#/project1');\n\tgood.scheme === 'file';\n\tgood.path === '/coding/c#/project1';\n\tgood.fragment === '';\n\tconst bad = URI.parse('file://' + '/coding/c#/project1');\n\tbad.scheme === 'file';\n\tbad.path === '/coding/c'; // path is now broken\n\tbad.fragment === '/project1';\n\t```\n\t *\n\t * @param path A file system path (see `URI#fsPath`)\n\t */\n\tstatic file(path: string): URI {\n\n\t\tlet authority = _empty;\n\n\t\t// normalize to fwd-slashes on windows,\n\t\t// on other systems bwd-slashes are valid\n\t\t// filename character, eg /f\\oo/ba\\r.txt\n\t\tif (isWindows) {\n\t\t\tpath = path.replace(/\\\\/g, _slash);\n\t\t}\n\n\t\t// check for authority as used in UNC shares\n\t\t// or use the path as given\n\t\tif (path[0] === _slash && path[1] === _slash) {\n\t\t\tconst idx = path.indexOf(_slash, 2);\n\t\t\tif (idx === -1) {\n\t\t\t\tauthority = path.substring(2);\n\t\t\t\tpath = _slash;\n\t\t\t} else {\n\t\t\t\tauthority = path.substring(2, idx);\n\t\t\t\tpath = path.substring(idx) || _slash;\n\t\t\t}\n\t\t}\n\n\t\treturn new Uri('file', authority, path, _empty, _empty);\n\t}\n\n\tstatic from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {\n\t\tconst result = new Uri(\n\t\t\tcomponents.scheme,\n\t\t\tcomponents.authority,\n\t\t\tcomponents.path,\n\t\t\tcomponents.query,\n\t\t\tcomponents.fragment,\n\t\t);\n\t\t_validateUri(result, true);\n\t\treturn result;\n\t}\n\n\t// ---- printing/externalize ---------------------------\n\n\t/**\n\t * Creates a string representation for this URI. It's guaranteed that calling\n\t * `URI.parse` with the result of this function creates an URI which is equal\n\t * to this URI.\n\t *\n\t * * The result shall *not* be used for display purposes but for externalization or transport.\n\t * * The result will be encoded using the percentage encoding and encoding happens mostly\n\t * ignore the scheme-specific encoding rules.\n\t *\n\t * @param skipEncoding Do not encode the result, default is `false`\n\t */\n\ttoString(skipEncoding: boolean = false): string {\n\t\treturn _asFormatted(this, skipEncoding);\n\t}\n\n\ttoJSON(): UriComponents {\n\t\treturn this;\n\t}\n\n\tstatic revive(data: UriComponents | URI): URI;\n\tstatic revive(data: UriComponents | URI | undefined): URI | undefined;\n\tstatic revive(data: UriComponents | URI | null): URI | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null;\n\tstatic revive(data: UriComponents | URI | undefined | null): URI | undefined | null {\n\t\tif (!data) {\n\t\t\treturn data;\n\t\t} else if (data instanceof URI) {\n\t\t\treturn data;\n\t\t} else {\n\t\t\tconst result = new Uri(data);\n\t\t\tresult._formatted = (data).external;\n\t\t\tresult._fsPath = (data)._sep === _pathSepMarker ? (data).fsPath : null;\n\t\t\treturn result;\n\t\t}\n\t}\n}\n\nexport interface UriComponents {\n\tscheme: string;\n\tauthority: string;\n\tpath: string;\n\tquery: string;\n\tfragment: string;\n}\n\ninterface UriState extends UriComponents {\n\t$mid: number;\n\texternal: string;\n\tfsPath: string;\n\t_sep: 1 | undefined;\n}\n\nconst _pathSepMarker = isWindows ? 1 : undefined;\n\n// This class exists so that URI is compatible with vscode.Uri (API).\nclass Uri extends URI {\n\n\t_formatted: string | null = null;\n\t_fsPath: string | null = null;\n\n\toverride get fsPath(): string {\n\t\tif (!this._fsPath) {\n\t\t\tthis._fsPath = uriToFsPath(this, false);\n\t\t}\n\t\treturn this._fsPath;\n\t}\n\n\toverride toString(skipEncoding: boolean = false): string {\n\t\tif (!skipEncoding) {\n\t\t\tif (!this._formatted) {\n\t\t\t\tthis._formatted = _asFormatted(this, false);\n\t\t\t}\n\t\t\treturn this._formatted;\n\t\t} else {\n\t\t\t// we don't cache that\n\t\t\treturn _asFormatted(this, true);\n\t\t}\n\t}\n\n\toverride toJSON(): UriComponents {\n\t\tconst res = {\n\t\t\t$mid: 1\n\t\t};\n\t\t// cached state\n\t\tif (this._fsPath) {\n\t\t\tres.fsPath = this._fsPath;\n\t\t\tres._sep = _pathSepMarker;\n\t\t}\n\t\tif (this._formatted) {\n\t\t\tres.external = this._formatted;\n\t\t}\n\t\t// uri components\n\t\tif (this.path) {\n\t\t\tres.path = this.path;\n\t\t}\n\t\tif (this.scheme) {\n\t\t\tres.scheme = this.scheme;\n\t\t}\n\t\tif (this.authority) {\n\t\t\tres.authority = this.authority;\n\t\t}\n\t\tif (this.query) {\n\t\t\tres.query = this.query;\n\t\t}\n\t\tif (this.fragment) {\n\t\t\tres.fragment = this.fragment;\n\t\t}\n\t\treturn res;\n\t}\n}\n\n// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2\nconst encodeTable: { [ch: number]: string } = {\n\t[CharCode.Colon]: '%3A', // gen-delims\n\t[CharCode.Slash]: '%2F',\n\t[CharCode.QuestionMark]: '%3F',\n\t[CharCode.Hash]: '%23',\n\t[CharCode.OpenSquareBracket]: '%5B',\n\t[CharCode.CloseSquareBracket]: '%5D',\n\t[CharCode.AtSign]: '%40',\n\n\t[CharCode.ExclamationMark]: '%21', // sub-delims\n\t[CharCode.DollarSign]: '%24',\n\t[CharCode.Ampersand]: '%26',\n\t[CharCode.SingleQuote]: '%27',\n\t[CharCode.OpenParen]: '%28',\n\t[CharCode.CloseParen]: '%29',\n\t[CharCode.Asterisk]: '%2A',\n\t[CharCode.Plus]: '%2B',\n\t[CharCode.Comma]: '%2C',\n\t[CharCode.Semicolon]: '%3B',\n\t[CharCode.Equals]: '%3D',\n\n\t[CharCode.Space]: '%20',\n};\n\nfunction encodeURIComponentFast(uriComponent: string, isPath: boolean, isAuthority: boolean): string {\n\tlet res: string | undefined = undefined;\n\tlet nativeEncodePos = -1;\n\n\tfor (let pos = 0; pos < uriComponent.length; pos++) {\n\t\tconst code = uriComponent.charCodeAt(pos);\n\n\t\t// unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3\n\t\tif (\n\t\t\t(code >= CharCode.a && code <= CharCode.z)\n\t\t\t|| (code >= CharCode.A && code <= CharCode.Z)\n\t\t\t|| (code >= CharCode.Digit0 && code <= CharCode.Digit9)\n\t\t\t|| code === CharCode.Dash\n\t\t\t|| code === CharCode.Period\n\t\t\t|| code === CharCode.Underline\n\t\t\t|| code === CharCode.Tilde\n\t\t\t|| (isPath && code === CharCode.Slash)\n\t\t\t|| (isAuthority && code === CharCode.OpenSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.CloseSquareBracket)\n\t\t\t|| (isAuthority && code === CharCode.Colon)\n\t\t) {\n\t\t\t// check if we are delaying native encode\n\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\tnativeEncodePos = -1;\n\t\t\t}\n\t\t\t// check if we write into a new string (by default we try to return the param)\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += uriComponent.charAt(pos);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// encoding needed, we need to allocate a new string\n\t\t\tif (res === undefined) {\n\t\t\t\tres = uriComponent.substr(0, pos);\n\t\t\t}\n\n\t\t\t// check with default table first\n\t\t\tconst escaped = encodeTable[code];\n\t\t\tif (escaped !== undefined) {\n\n\t\t\t\t// check if we are delaying native encode\n\t\t\t\tif (nativeEncodePos !== -1) {\n\t\t\t\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));\n\t\t\t\t\tnativeEncodePos = -1;\n\t\t\t\t}\n\n\t\t\t\t// append escaped variant to result\n\t\t\t\tres += escaped;\n\n\t\t\t} else if (nativeEncodePos === -1) {\n\t\t\t\t// use native encode only when needed\n\t\t\t\tnativeEncodePos = pos;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (nativeEncodePos !== -1) {\n\t\tres += encodeURIComponent(uriComponent.substring(nativeEncodePos));\n\t}\n\n\treturn res !== undefined ? res : uriComponent;\n}\n\nfunction encodeURIComponentMinimal(path: string): string {\n\tlet res: string | undefined = undefined;\n\tfor (let pos = 0; pos < path.length; pos++) {\n\t\tconst code = path.charCodeAt(pos);\n\t\tif (code === CharCode.Hash || code === CharCode.QuestionMark) {\n\t\t\tif (res === undefined) {\n\t\t\t\tres = path.substr(0, pos);\n\t\t\t}\n\t\t\tres += encodeTable[code];\n\t\t} else {\n\t\t\tif (res !== undefined) {\n\t\t\t\tres += path[pos];\n\t\t\t}\n\t\t}\n\t}\n\treturn res !== undefined ? res : path;\n}\n\n/**\n * Compute `fsPath` for the given uri\n */\nexport function uriToFsPath(uri: URI, keepDriveLetterCasing: boolean): string {\n\n\tlet value: string;\n\tif (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {\n\t\t// unc path: file://shares/c$/far/boo\n\t\tvalue = `//${uri.authority}${uri.path}`;\n\t} else if (\n\t\turi.path.charCodeAt(0) === CharCode.Slash\n\t\t&& (uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z || uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)\n\t\t&& uri.path.charCodeAt(2) === CharCode.Colon\n\t) {\n\t\tif (!keepDriveLetterCasing) {\n\t\t\t// windows drive letter: file:///c:/far/boo\n\t\t\tvalue = uri.path[1].toLowerCase() + uri.path.substr(2);\n\t\t} else {\n\t\t\tvalue = uri.path.substr(1);\n\t\t}\n\t} else {\n\t\t// other path\n\t\tvalue = uri.path;\n\t}\n\tif (isWindows) {\n\t\tvalue = value.replace(/\\//g, '\\\\');\n\t}\n\treturn value;\n}\n\n/**\n * Create the external version of a uri\n */\nfunction _asFormatted(uri: URI, skipEncoding: boolean): string {\n\n\tconst encoder = !skipEncoding\n\t\t? encodeURIComponentFast\n\t\t: encodeURIComponentMinimal;\n\n\tlet res = '';\n\tlet { scheme, authority, path, query, fragment } = uri;\n\tif (scheme) {\n\t\tres += scheme;\n\t\tres += ':';\n\t}\n\tif (authority || scheme === 'file') {\n\t\tres += _slash;\n\t\tres += _slash;\n\t}\n\tif (authority) {\n\t\tlet idx = authority.indexOf('@');\n\t\tif (idx !== -1) {\n\t\t\t// @\n\t\t\tconst userinfo = authority.substr(0, idx);\n\t\t\tauthority = authority.substr(idx + 1);\n\t\t\tidx = userinfo.lastIndexOf(':');\n\t\t\tif (idx === -1) {\n\t\t\t\tres += encoder(userinfo, false, false);\n\t\t\t} else {\n\t\t\t\t// :@\n\t\t\t\tres += encoder(userinfo.substr(0, idx), false, false);\n\t\t\t\tres += ':';\n\t\t\t\tres += encoder(userinfo.substr(idx + 1), false, true);\n\t\t\t}\n\t\t\tres += '@';\n\t\t}\n\t\tauthority = authority.toLowerCase();\n\t\tidx = authority.lastIndexOf(':');\n\t\tif (idx === -1) {\n\t\t\tres += encoder(authority, false, true);\n\t\t} else {\n\t\t\t// :\n\t\t\tres += encoder(authority.substr(0, idx), false, true);\n\t\t\tres += authority.substr(idx);\n\t\t}\n\t}\n\tif (path) {\n\t\t// lower-case windows drive letters in /C:/fff or C:/fff\n\t\tif (path.length >= 3 && path.charCodeAt(0) === CharCode.Slash && path.charCodeAt(2) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(1);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `/${String.fromCharCode(code + 32)}:${path.substr(3)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t} else if (path.length >= 2 && path.charCodeAt(1) === CharCode.Colon) {\n\t\t\tconst code = path.charCodeAt(0);\n\t\t\tif (code >= CharCode.A && code <= CharCode.Z) {\n\t\t\t\tpath = `${String.fromCharCode(code + 32)}:${path.substr(2)}`; // \"/c:\".length === 3\n\t\t\t}\n\t\t}\n\t\t// encode the rest of the path\n\t\tres += encoder(path, true, false);\n\t}\n\tif (query) {\n\t\tres += '?';\n\t\tres += encoder(query, false, false);\n\t}\n\tif (fragment) {\n\t\tres += '#';\n\t\tres += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;\n\t}\n\treturn res;\n}\n\n// --- decode\n\nfunction decodeURIComponentGraceful(str: string): string {\n\ttry {\n\t\treturn decodeURIComponent(str);\n\t} catch {\n\t\tif (str.length > 3) {\n\t\t\treturn str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));\n\t\t} else {\n\t\t\treturn str;\n\t\t}\n\t}\n}\n\nconst _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;\n\nfunction percentDecode(str: string): string {\n\tif (!str.match(_rEncodedAsHex)) {\n\t\treturn str;\n\t}\n\treturn str.replace(_rEncodedAsHex, (match) => decodeURIComponentGraceful(match));\n}\n\n/**\n * Mapped-type that replaces all occurrences of URI with UriComponents\n */\nexport type UriDto = { [K in keyof T]: T[K] extends URI\n\t? UriComponents\n\t: UriDto };\n", "/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n'use strict';\n\nimport { CharCode } from './charCode';\nimport { URI } from './uri';\nimport * as nodePath from 'path';\n\nconst posixPath = nodePath.posix || nodePath;\nconst slash = '/';\n\nexport namespace Utils {\n\n /**\n * Joins one or more input paths to the path of URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved.\n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are preserved.\n * \n * @param uri The input URI.\n * @param paths The paths to be joined with the path of URI.\n * @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function joinPath(uri: URI, ...paths: string[]): URI {\n return uri.with({ path: posixPath.join(uri.path, ...paths) });\n }\n\n\n /**\n * Resolves one or more paths against the path of a URI. \n * '/' is used as the directory separation character. \n * \n * The resolved path will be normalized. That means:\n * - all '..' and '.' segments are resolved. \n * - multiple, sequential occurences of '/' are replaced by a single instance of '/'.\n * - trailing separators are removed.\n * \n * @param uri The input URI.\n * @param paths The paths to resolve against the path of URI.\n * @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.\n */\n export function resolvePath(uri: URI, ...paths: string[]): URI {\n let path = uri.path; \n let slashAdded = false;\n if (path[0] !== slash) {\n path = slash + path; // make the path abstract: for posixPath.resolve the first segments has to be absolute or cwd is used.\n slashAdded = true;\n }\n let resolvedPath = posixPath.resolve(path, ...paths);\n if (slashAdded && resolvedPath[0] === slash && !uri.authority) {\n resolvedPath = resolvedPath.substring(1);\n }\n return uri.with({ path: resolvedPath });\n }\n\n /**\n * Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The orignal URI is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The last segment of the URIs path.\n */\n export function dirname(uri: URI): URI {\n if (uri.path.length === 0 || uri.path === slash) {\n return uri;\n }\n let path = posixPath.dirname(uri.path);\n if (path.length === 1 && path.charCodeAt(0) === CharCode.Period) {\n path = '';\n }\n return uri.with({ path });\n }\n\n /**\n * Returns the last segment of the path of a URI, similar to the Unix basename command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The base name of the URIs path.\n */\n export function basename(uri: URI): string {\n return posixPath.basename(uri.path);\n }\n\n /**\n * Returns the extension name of the path of a URI, similar to the Unix extname command. \n * In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.\n * The empty string is returned if the URIs path is empty or does not contain any path segments.\n * \n * @param uri The input URI.\n * @return The extension name of the URIs path.\n */\n export function extname(uri: URI): string {\n return posixPath.extname(uri.path);\n }\n}", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { URI, Utils } from 'vscode-uri';\n\nexport { URI };\n\nexport namespace UriUtils {\n\n export const basename = Utils.basename;\n export const dirname = Utils.dirname;\n export const extname = Utils.extname;\n export const joinPath = Utils.joinPath;\n export const resolvePath = Utils.resolvePath;\n\n export function equals(a?: URI | string, b?: URI | string): boolean {\n return a?.toString() === b?.toString();\n }\n\n export function relative(from: URI | string, to: URI | string): string {\n const fromPath = typeof from === 'string' ? from : from.path;\n const toPath = typeof to === 'string' ? to : to.path;\n const fromParts = fromPath.split('/').filter(e => e.length > 0);\n const toParts = toPath.split('/').filter(e => e.length > 0);\n let i = 0;\n for (; i < fromParts.length; i++) {\n if (fromParts[i] !== toParts[i]) {\n break;\n }\n }\n const backPart = '../'.repeat(fromParts.length - i);\n const toPart = toParts.slice(i).join('/');\n return backPart + toPart;\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/**\n * Re-export 'TextDocument' from 'vscode-languageserver-textdocument' for convenience,\n * including both type _and_ symbol (namespace), as we here and there also refer to the symbol,\n * the overhead is very small, just a few kilobytes.\n * Everything else of that package (at the time contributing) is also defined\n * in 'vscode-languageserver-protocol' or 'vscode-languageserver-types'.\n */\nexport { TextDocument } from 'vscode-languageserver-textdocument';\n\nimport type { Diagnostic, Range } from 'vscode-languageserver-types';\nimport type { FileSystemProvider } from './file-system-provider.js';\nimport type { ParseResult } from '../parser/langium-parser.js';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, Mutable, Reference } from '../syntax-tree.js';\nimport type { MultiMap } from '../utils/collections.js';\nimport type { Stream } from '../utils/stream.js';\nimport { TextDocument } from './documents.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { stream } from '../utils/stream.js';\nimport { URI } from '../utils/uri-utils.js';\n\n/**\n * A Langium document holds the parse result (AST and CST) and any additional state that is derived\n * from the AST, e.g. the result of scope precomputation.\n */\nexport interface LangiumDocument {\n /** The Uniform Resource Identifier (URI) of the document */\n readonly uri: URI;\n /** The text document used to convert between offsets and positions */\n readonly textDocument: TextDocument;\n /** The current state of the document */\n state: DocumentState;\n /** The parse result holds the Abstract Syntax Tree (AST) and potentially also parser / lexer errors */\n parseResult: ParseResult;\n /** Result of the scope precomputation phase */\n precomputedScopes?: PrecomputedScopes;\n /** An array of all cross-references found in the AST while linking */\n references: Reference[];\n /** Result of the validation phase */\n diagnostics?: Diagnostic[]\n}\n\n/**\n * A document is subject to several phases that are run in predefined order. Any state value implies that\n * smaller state values are finished as well.\n */\nexport enum DocumentState {\n /**\n * The text content has changed and needs to be parsed again. The AST held by this outdated\n * document instance is no longer valid.\n */\n Changed = 0,\n /**\n * An AST has been created from the text content. The document structure can be traversed,\n * but cross-references cannot be resolved yet. If necessary, the structure can be manipulated\n * at this stage as a preprocessing step.\n */\n Parsed = 1,\n /**\n * The `IndexManager` service has processed AST nodes of this document. This means the\n * exported symbols are available in the global scope and can be resolved from other documents.\n */\n IndexedContent = 2,\n /**\n * The `ScopeComputation` service has processed this document. This means the local symbols\n * are stored in a MultiMap so they can be looked up by the `ScopeProvider` service.\n * Once a document has reached this state, you may follow every reference - it will lazily\n * resolve its `ref` property and yield either the target AST node or `undefined` in case\n * the target is not in scope.\n */\n ComputedScopes = 3,\n /**\n * The `Linker` service has processed this document. All outgoing references have been\n * resolved or marked as erroneous.\n */\n Linked = 4,\n /**\n * The `IndexManager` service has processed AST node references of this document. This is\n * necessary to determine which documents are affected by a change in one of the workspace\n * documents.\n */\n IndexedReferences = 5,\n /**\n * The `DocumentValidator` service has processed this document. The language server listens\n * to the results of this phase and sends diagnostics to the client.\n */\n Validated = 6\n}\n\n/**\n * Result of the scope precomputation phase (`ScopeComputation` service).\n * It maps every AST node to the set of symbols that are visible in the subtree of that node.\n */\nexport type PrecomputedScopes = MultiMap\n\nexport interface DocumentSegment {\n readonly range: Range\n readonly offset: number\n readonly length: number\n readonly end: number\n}\n\n/**\n * Surrogate definition of the `TextDocuments` interface from the `vscode-languageserver` package.\n * No implementation object is expected to be offered by `LangiumCoreServices`, but only by `LangiumLSPServices`.\n */\nexport type TextDocumentProvider = {\n get(uri: string): TextDocument | undefined\n}\n\n/**\n * Shared service for creating `LangiumDocument` instances.\n *\n * Register a custom implementation if special (additional) behavior is required for your language(s).\n * Note: If you specialize {@link fromString} or {@link fromTextDocument} you probably might want to\n * specialize {@link update}, too!\n */\nexport interface LangiumDocumentFactory {\n /**\n * Create a Langium document from a `TextDocument` (usually associated with a file).\n */\n fromTextDocument(textDocument: TextDocument, uri?: URI): LangiumDocument;\n /**\n * Create a Langium document from a `TextDocument` asynchronously. This action can be cancelled if a cancellable parser implementation has been provided.\n */\n fromTextDocument(textDocument: TextDocument, uri: URI | undefined, cancellationToken: CancellationToken): Promise>;\n\n /**\n * Create an Langium document from an in-memory string.\n */\n fromString(text: string, uri: URI): LangiumDocument;\n /**\n * Create a Langium document from an in-memory string asynchronously. This action can be cancelled if a cancellable parser implementation has been provided.\n */\n fromString(text: string, uri: URI, cancellationToken: CancellationToken): Promise>;\n\n /**\n * Create an Langium document from a model that has been constructed in memory.\n */\n fromModel(model: T, uri: URI): LangiumDocument;\n\n /**\n * Create an Langium document from a specified `URI`. The factory will use the `FileSystemAccess` service to read the file.\n */\n fromUri(uri: URI, cancellationToken?: CancellationToken): Promise>;\n\n /**\n * Update the given document after changes in the corresponding textual representation.\n * Method is called by the document builder after it has been requested to build an existing\n * document and the document's state is {@link DocumentState.Changed}.\n * The text parsing is expected to be done the same way as in {@link fromTextDocument}\n * and {@link fromString}.\n */\n update(document: LangiumDocument, cancellationToken: CancellationToken): Promise>\n}\n\nexport class DefaultLangiumDocumentFactory implements LangiumDocumentFactory {\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly textDocuments?: TextDocumentProvider;\n protected readonly fileSystemProvider: FileSystemProvider;\n\n constructor(services: LangiumSharedCoreServices) {\n this.serviceRegistry = services.ServiceRegistry;\n this.textDocuments = services.workspace.TextDocuments;\n this.fileSystemProvider = services.workspace.FileSystemProvider;\n }\n\n async fromUri(uri: URI, cancellationToken = CancellationToken.None): Promise> {\n const content = await this.fileSystemProvider.readFile(uri);\n return this.createAsync(uri, content, cancellationToken);\n }\n\n fromTextDocument(textDocument: TextDocument, uri?: URI): LangiumDocument;\n fromTextDocument(textDocument: TextDocument, uri: URI | undefined, cancellationToken: CancellationToken): Promise>;\n fromTextDocument(textDocument: TextDocument, uri?: URI, cancellationToken?: CancellationToken): LangiumDocument | Promise> {\n uri = uri ?? URI.parse(textDocument.uri);\n if (cancellationToken) {\n return this.createAsync(uri, textDocument, cancellationToken);\n } else {\n return this.create(uri, textDocument);\n }\n }\n\n fromString(text: string, uri: URI): LangiumDocument;\n fromString(text: string, uri: URI, cancellationToken: CancellationToken): Promise>;\n fromString(text: string, uri: URI, cancellationToken?: CancellationToken): LangiumDocument | Promise> {\n if (cancellationToken) {\n return this.createAsync(uri, text, cancellationToken);\n } else {\n return this.create(uri, text);\n }\n }\n\n fromModel(model: T, uri: URI): LangiumDocument {\n return this.create(uri, { $model: model });\n }\n\n protected create(uri: URI, content: string | TextDocument | { $model: T }): LangiumDocument {\n if (typeof content === 'string') {\n const parseResult = this.parse(uri, content);\n return this.createLangiumDocument(parseResult, uri, undefined, content);\n\n } else if ('$model' in content) {\n const parseResult = { value: content.$model, parserErrors: [], lexerErrors: [] };\n return this.createLangiumDocument(parseResult, uri);\n\n } else {\n const parseResult = this.parse(uri, content.getText());\n return this.createLangiumDocument(parseResult, uri, content);\n }\n }\n\n protected async createAsync(uri: URI, content: string | TextDocument, cancelToken: CancellationToken): Promise> {\n if (typeof content === 'string') {\n const parseResult = await this.parseAsync(uri, content, cancelToken);\n return this.createLangiumDocument(parseResult, uri, undefined, content);\n } else {\n const parseResult = await this.parseAsync(uri, content.getText(), cancelToken);\n return this.createLangiumDocument(parseResult, uri, content);\n }\n }\n\n /**\n * Create a LangiumDocument from a given parse result.\n *\n * A TextDocument is created on demand if it is not provided as argument here. Usually this\n * should not be necessary because the main purpose of the TextDocument is to convert between\n * text ranges and offsets, which is done solely in LSP request handling.\n *\n * With the introduction of {@link update} below this method is supposed to be mainly called\n * during workspace initialization and on addition/recognition of new files, while changes in\n * existing documents are processed via {@link update}.\n */\n protected createLangiumDocument(parseResult: ParseResult, uri: URI, textDocument?: TextDocument, text?: string): LangiumDocument {\n let document: LangiumDocument;\n if (textDocument) {\n document = {\n parseResult,\n uri,\n state: DocumentState.Parsed,\n references: [],\n textDocument\n };\n } else {\n const textDocumentGetter = this.createTextDocumentGetter(uri, text);\n document = {\n parseResult,\n uri,\n state: DocumentState.Parsed,\n references: [],\n get textDocument() {\n return textDocumentGetter();\n }\n };\n }\n (parseResult.value as Mutable).$document = document;\n return document;\n }\n\n async update(document: Mutable>, cancellationToken: CancellationToken): Promise> {\n // The CST full text property contains the original text that was used to create the AST.\n const oldText = document.parseResult.value.$cstNode?.root.fullText;\n const textDocument = this.textDocuments?.get(document.uri.toString());\n const text = textDocument ? textDocument.getText() : await this.fileSystemProvider.readFile(document.uri);\n\n if (textDocument) {\n Object.defineProperty(\n document,\n 'textDocument',\n {\n value: textDocument\n }\n );\n } else {\n const textDocumentGetter = this.createTextDocumentGetter(document.uri, text);\n Object.defineProperty(\n document,\n 'textDocument',\n {\n get: textDocumentGetter\n }\n );\n }\n\n // Some of these documents can be pretty large, so parsing them again can be quite expensive.\n // Therefore, we only parse if the text has actually changed.\n if (oldText !== text) {\n document.parseResult = await this.parseAsync(document.uri, text, cancellationToken);\n (document.parseResult.value as Mutable).$document = document;\n }\n document.state = DocumentState.Parsed;\n return document;\n }\n\n protected parse(uri: URI, text: string): ParseResult {\n const services = this.serviceRegistry.getServices(uri);\n return services.parser.LangiumParser.parse(text);\n }\n\n protected parseAsync(uri: URI, text: string, cancellationToken: CancellationToken): Promise> {\n const services = this.serviceRegistry.getServices(uri);\n return services.parser.AsyncParser.parse(text, cancellationToken);\n }\n\n protected createTextDocumentGetter(uri: URI, text?: string): () => TextDocument {\n const serviceRegistry = this.serviceRegistry;\n let textDoc: TextDocument | undefined = undefined;\n return () => {\n return textDoc ??= TextDocument.create(\n uri.toString(), serviceRegistry.getServices(uri).LanguageMetaData.languageId, 0, text ?? ''\n );\n };\n }\n}\n\n/**\n * Shared service for managing Langium documents.\n */\nexport interface LangiumDocuments {\n\n /**\n * A stream of all documents managed under this service.\n */\n readonly all: Stream\n\n /**\n * Manage a new document under this service.\n * @throws an error if a document with the same URI is already present.\n */\n addDocument(document: LangiumDocument): void;\n\n /**\n * Retrieve the document with the given URI, if present. Otherwise returns `undefined`.\n */\n getDocument(uri: URI): LangiumDocument | undefined;\n\n /**\n * Retrieve the document with the given URI. If not present, a new one will be created using the file system access.\n * The new document will be added to the list of documents managed under this service.\n */\n getOrCreateDocument(uri: URI, cancellationToken?: CancellationToken): Promise;\n\n /**\n * Creates a new document with the given URI and text content.\n * The new document is automatically added to this service and can be retrieved using {@link getDocument}.\n *\n * @throws an error if a document with the same URI is already present.\n */\n createDocument(uri: URI, text: string): LangiumDocument;\n\n /**\n * Creates a new document with the given URI and text content asynchronously.\n * The process can be interrupted with a cancellation token.\n * The new document is automatically added to this service and can be retrieved using {@link getDocument}.\n *\n * @throws an error if a document with the same URI is already present.\n */\n createDocument(uri: URI, text: string, cancellationToken: CancellationToken): Promise;\n\n /**\n * Returns `true` if a document with the given URI is managed under this service.\n */\n hasDocument(uri: URI): boolean;\n\n /**\n * Flag the document with the given URI as `Changed`, if present, meaning that its content\n * is no longer valid. The content (parseResult) stays untouched, while internal data may\n * be dropped to reduce memory footprint.\n *\n * @returns the affected {@link LangiumDocument} if existing for convenience\n */\n invalidateDocument(uri: URI): LangiumDocument | undefined;\n\n /**\n * Remove the document with the given URI, if present, and mark it as `Changed`, meaning\n * that its content is no longer valid. The next call to `getOrCreateDocument` with the same\n * URI will create a new document instance.\n *\n * @returns the affected {@link LangiumDocument} if existing for convenience\n */\n deleteDocument(uri: URI): LangiumDocument | undefined;\n}\n\nexport class DefaultLangiumDocuments implements LangiumDocuments {\n\n protected readonly langiumDocumentFactory: LangiumDocumentFactory;\n\n protected readonly documentMap: Map = new Map();\n\n constructor(services: LangiumSharedCoreServices) {\n this.langiumDocumentFactory = services.workspace.LangiumDocumentFactory;\n }\n\n get all(): Stream {\n return stream(this.documentMap.values());\n }\n\n addDocument(document: LangiumDocument): void {\n const uriString = document.uri.toString();\n if (this.documentMap.has(uriString)) {\n throw new Error(`A document with the URI '${uriString}' is already present.`);\n }\n this.documentMap.set(uriString, document);\n }\n\n getDocument(uri: URI): LangiumDocument | undefined {\n const uriString = uri.toString();\n return this.documentMap.get(uriString);\n }\n\n async getOrCreateDocument(uri: URI, cancellationToken?: CancellationToken): Promise {\n let document = this.getDocument(uri);\n if (document) {\n return document;\n }\n document = await this.langiumDocumentFactory.fromUri(uri, cancellationToken);\n this.addDocument(document);\n return document;\n }\n\n createDocument(uri: URI, text: string): LangiumDocument;\n createDocument(uri: URI, text: string, cancellationToken: CancellationToken): Promise;\n createDocument(uri: URI, text: string, cancellationToken?: CancellationToken): LangiumDocument | Promise {\n if (cancellationToken) {\n return this.langiumDocumentFactory.fromString(text, uri, cancellationToken).then(document => {\n this.addDocument(document);\n return document;\n });\n } else {\n const document = this.langiumDocumentFactory.fromString(text, uri);\n this.addDocument(document);\n return document;\n }\n }\n\n hasDocument(uri: URI): boolean {\n return this.documentMap.has(uri.toString());\n }\n\n invalidateDocument(uri: URI): LangiumDocument | undefined {\n const uriString = uri.toString();\n const langiumDoc = this.documentMap.get(uriString);\n if (langiumDoc) {\n langiumDoc.state = DocumentState.Changed;\n langiumDoc.precomputedScopes = undefined;\n langiumDoc.references = [];\n langiumDoc.diagnostics = undefined;\n }\n return langiumDoc;\n }\n\n deleteDocument(uri: URI): LangiumDocument | undefined {\n const uriString = uri.toString();\n const langiumDoc = this.documentMap.get(uriString);\n if (langiumDoc) {\n langiumDoc.state = DocumentState.Changed;\n this.documentMap.delete(uriString);\n }\n return langiumDoc;\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, AstReflection, CstNode, LinkingError, Reference, ReferenceInfo } from '../syntax-tree.js';\nimport type { AstNodeLocator } from '../workspace/ast-node-locator.js';\nimport type { LangiumDocument, LangiumDocuments } from '../workspace/documents.js';\nimport type { ScopeProvider } from './scope-provider.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { isAstNode, isAstNodeDescription, isLinkingError } from '../syntax-tree.js';\nimport { getDocument, streamAst, streamReferences } from '../utils/ast-utils.js';\nimport { interruptAndCheck } from '../utils/promise-utils.js';\nimport { DocumentState } from '../workspace/documents.js';\n\n/**\n * Language-specific service for resolving cross-references in the AST.\n */\nexport interface Linker {\n\n /**\n * Links all cross-references within the specified document. The default implementation loads only target\n * elements from documents that are present in the `LangiumDocuments` service. The linked references are\n * stored in the document's `references` property.\n *\n * @param document A LangiumDocument that shall be linked.\n * @param cancelToken A token for cancelling the operation.\n */\n link(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Unlinks all references within the specified document and removes them from the list of `references`.\n *\n * @param document A LangiumDocument that shall be unlinked.\n */\n unlink(document: LangiumDocument): void;\n\n /**\n * Determines a candidate AST node description for linking the given reference.\n *\n * @param node The AST node containing the reference.\n * @param refId The reference identifier used to build a scope.\n * @param reference The actual reference to resolve.\n */\n getCandidate(refInfo: ReferenceInfo): AstNodeDescription | LinkingError;\n\n /**\n * Creates a cross reference node being aware of its containing AstNode, the corresponding CstNode,\n * the cross reference text denoting the target AstNode being already extracted of the document text,\n * as well as the unique cross reference identifier.\n *\n * Default behavior:\n * - The returned Reference's 'ref' property pointing to the target AstNode is populated lazily on its\n * first visit.\n * - If the target AstNode cannot be resolved on the first visit, an error indicator will be installed\n * and further resolution attempts will *not* be performed.\n *\n * @param node The containing AST node\n * @param refNode The corresponding CST node\n * @param refId The cross reference identifier like ':'\n * @param refText The cross reference text denoting the target AstNode\n * @returns the desired Reference node, whose behavior wrt. resolving the cross reference is implementation specific.\n */\n buildReference(node: AstNode, property: string, refNode: CstNode | undefined, refText: string): Reference;\n\n}\n\ninterface DefaultReference extends Reference {\n _ref?: AstNode | LinkingError;\n _nodeDescription?: AstNodeDescription;\n}\n\nexport class DefaultLinker implements Linker {\n protected readonly reflection: AstReflection;\n protected readonly scopeProvider: ScopeProvider;\n protected readonly astNodeLocator: AstNodeLocator;\n protected readonly langiumDocuments: () => LangiumDocuments;\n\n constructor(services: LangiumCoreServices) {\n this.reflection = services.shared.AstReflection;\n this.langiumDocuments = () => services.shared.workspace.LangiumDocuments;\n this.scopeProvider = services.references.ScopeProvider;\n this.astNodeLocator = services.workspace.AstNodeLocator;\n }\n\n async link(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n for (const node of streamAst(document.parseResult.value)) {\n await interruptAndCheck(cancelToken);\n streamReferences(node).forEach(ref => this.doLink(ref, document));\n }\n }\n\n protected doLink(refInfo: ReferenceInfo, document: LangiumDocument): void {\n const ref = refInfo.reference as DefaultReference;\n // The reference may already have been resolved lazily by accessing its `ref` property.\n if (ref._ref === undefined) {\n try {\n const description = this.getCandidate(refInfo);\n if (isLinkingError(description)) {\n ref._ref = description;\n } else {\n ref._nodeDescription = description;\n if (this.langiumDocuments().hasDocument(description.documentUri)) {\n // The target document is already loaded\n const linkedNode = this.loadAstNode(description);\n ref._ref = linkedNode ?? this.createLinkingError(refInfo, description);\n }\n }\n } catch (err) {\n ref._ref = {\n ...refInfo,\n message: `An error occurred while resolving reference to '${ref.$refText}': ${err}`\n };\n }\n }\n // Add the reference to the document's array of references\n document.references.push(ref);\n }\n\n unlink(document: LangiumDocument): void {\n for (const ref of document.references) {\n delete (ref as DefaultReference)._ref;\n delete (ref as DefaultReference)._nodeDescription;\n }\n document.references = [];\n }\n\n getCandidate(refInfo: ReferenceInfo): AstNodeDescription | LinkingError {\n const scope = this.scopeProvider.getScope(refInfo);\n const description = scope.getElement(refInfo.reference.$refText);\n return description ?? this.createLinkingError(refInfo);\n }\n\n buildReference(node: AstNode, property: string, refNode: CstNode | undefined, refText: string): Reference {\n // See behavior description in doc of Linker, update that on changes in here.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const linker = this;\n const reference: DefaultReference = {\n $refNode: refNode,\n $refText: refText,\n\n get ref() {\n if (isAstNode(this._ref)) {\n // Most frequent case: the target is already resolved.\n return this._ref;\n } else if (isAstNodeDescription(this._nodeDescription)) {\n // A candidate has been found before, but it is not loaded yet.\n const linkedNode = linker.loadAstNode(this._nodeDescription);\n this._ref = linkedNode ??\n linker.createLinkingError({ reference, container: node, property }, this._nodeDescription);\n } else if (this._ref === undefined) {\n // The reference has not been linked yet, so do that now.\n const refData = linker.getLinkedNode({ reference, container: node, property });\n if (refData.error && getDocument(node).state < DocumentState.ComputedScopes) {\n // Document scope is not ready, don't set `this._ref` so linker can retry later.\n return undefined;\n }\n this._ref = refData.node ?? refData.error;\n this._nodeDescription = refData.descr;\n }\n return isAstNode(this._ref) ? this._ref : undefined;\n },\n get $nodeDescription() {\n return this._nodeDescription;\n },\n get error() {\n return isLinkingError(this._ref) ? this._ref : undefined;\n }\n };\n return reference;\n }\n\n protected getLinkedNode(refInfo: ReferenceInfo): { node?: AstNode, descr?: AstNodeDescription, error?: LinkingError } {\n try {\n const description = this.getCandidate(refInfo);\n if (isLinkingError(description)) {\n return { error: description };\n }\n const linkedNode = this.loadAstNode(description);\n if (linkedNode) {\n return { node: linkedNode, descr: description };\n }\n else {\n return {\n descr: description,\n error:\n this.createLinkingError(refInfo, description)\n };\n }\n } catch (err) {\n return {\n error: {\n ...refInfo,\n message: `An error occurred while resolving reference to '${refInfo.reference.$refText}': ${err}`\n }\n };\n }\n }\n\n protected loadAstNode(nodeDescription: AstNodeDescription): AstNode | undefined {\n if (nodeDescription.node) {\n return nodeDescription.node;\n }\n const doc = this.langiumDocuments().getDocument(nodeDescription.documentUri);\n if (!doc) {\n return undefined;\n }\n return this.astNodeLocator.getAstNode(doc.parseResult.value, nodeDescription.path);\n }\n\n protected createLinkingError(refInfo: ReferenceInfo, targetDescription?: AstNodeDescription): LinkingError {\n // Check whether the document is sufficiently processed by the DocumentBuilder. If not, this is a hint for a bug\n // in the language implementation.\n const document = getDocument(refInfo.container);\n if (document.state < DocumentState.ComputedScopes) {\n console.warn(`Attempted reference resolution before document reached ComputedScopes state (${document.uri}).`);\n }\n const referenceType = this.reflection.getReferenceType(refInfo);\n return {\n ...refInfo,\n message: `Could not resolve reference to ${referenceType} named '${refInfo.reference.$refText}'.`,\n targetDescription\n };\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AstNode, CstNode } from '../syntax-tree.js';\nimport { findNodeForProperty } from '../utils/grammar-utils.js';\n\nexport interface NamedAstNode extends AstNode {\n name: string;\n}\n\nexport function isNamed(node: AstNode): node is NamedAstNode {\n return typeof (node as NamedAstNode).name === 'string';\n}\n\n/**\n * Utility service for retrieving the `name` of an `AstNode` or the `CstNode` containing a `name`.\n */\nexport interface NameProvider {\n /**\n * Returns the `name` of a given AstNode.\n * @param node Specified `AstNode` whose name node shall be retrieved.\n */\n getName(node: AstNode): string | undefined;\n /**\n * Returns the `CstNode` which contains the parsed value of the `name` assignment.\n * @param node Specified `AstNode` whose name node shall be retrieved.\n */\n getNameNode(node: AstNode): CstNode | undefined;\n}\n\nexport class DefaultNameProvider implements NameProvider {\n getName(node: AstNode): string | undefined {\n if (isNamed(node)) {\n return node.name;\n }\n return undefined;\n }\n\n getNameNode(node: AstNode): CstNode | undefined {\n return findNodeForProperty(node.$cstNode, 'name');\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, CstNode, GenericAstNode } from '../syntax-tree.js';\nimport type { Stream } from '../utils/stream.js';\nimport type { ReferenceDescription } from '../workspace/ast-descriptions.js';\nimport type { AstNodeLocator } from '../workspace/ast-node-locator.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { NameProvider } from './name-provider.js';\nimport type { URI } from '../utils/uri-utils.js';\nimport { findAssignment } from '../utils/grammar-utils.js';\nimport { isReference } from '../syntax-tree.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { isChildNode, toDocumentSegment } from '../utils/cst-utils.js';\nimport { stream } from '../utils/stream.js';\nimport { UriUtils } from '../utils/uri-utils.js';\n\n/**\n * Language-specific service for finding references and declaration of a given `CstNode`.\n */\nexport interface References {\n\n /**\n * If the CstNode is a reference node the target CstNode will be returned.\n * If the CstNode is a significant node of the CstNode this CstNode will be returned.\n *\n * @param sourceCstNode CstNode that points to a AstNode\n */\n findDeclaration(sourceCstNode: CstNode): AstNode | undefined;\n\n /**\n * If the CstNode is a reference node the target CstNode will be returned.\n * If the CstNode is a significant node of the CstNode this CstNode will be returned.\n *\n * @param sourceCstNode CstNode that points to a AstNode\n */\n findDeclarationNode(sourceCstNode: CstNode): CstNode | undefined;\n\n /**\n * Finds all references to the target node as references (local references) or reference descriptions.\n *\n * @param targetNode Specified target node whose references should be returned\n */\n findReferences(targetNode: AstNode, options: FindReferencesOptions): Stream;\n}\n\nexport interface FindReferencesOptions {\n /**\n * @deprecated Since v1.2.0. Please use `documentUri` instead.\n */\n onlyLocal?: boolean;\n /**\n * When set, the `findReferences` method will only return references/declarations from the specified document.\n */\n documentUri?: URI;\n /**\n * Whether the returned list of references should include the declaration.\n */\n includeDeclaration?: boolean;\n}\n\nexport class DefaultReferences implements References {\n protected readonly nameProvider: NameProvider;\n protected readonly index: IndexManager;\n protected readonly nodeLocator: AstNodeLocator;\n\n constructor(services: LangiumCoreServices) {\n this.nameProvider = services.references.NameProvider;\n this.index = services.shared.workspace.IndexManager;\n this.nodeLocator = services.workspace.AstNodeLocator;\n }\n\n findDeclaration(sourceCstNode: CstNode): AstNode | undefined {\n if (sourceCstNode) {\n const assignment = findAssignment(sourceCstNode);\n const nodeElem = sourceCstNode.astNode;\n if (assignment && nodeElem) {\n const reference = (nodeElem as GenericAstNode)[assignment.feature];\n\n if (isReference(reference)) {\n return reference.ref;\n } else if (Array.isArray(reference)) {\n for (const ref of reference) {\n if (isReference(ref) && ref.$refNode\n && ref.$refNode.offset <= sourceCstNode.offset\n && ref.$refNode.end >= sourceCstNode.end) {\n return ref.ref;\n }\n }\n }\n }\n if (nodeElem) {\n const nameNode = this.nameProvider.getNameNode(nodeElem);\n // Only return the targeted node in case the targeted cst node is the name node or part of it\n if (nameNode && (nameNode === sourceCstNode || isChildNode(sourceCstNode, nameNode))) {\n return nodeElem;\n }\n }\n }\n return undefined;\n }\n\n findDeclarationNode(sourceCstNode: CstNode): CstNode | undefined {\n const astNode = this.findDeclaration(sourceCstNode);\n if (astNode?.$cstNode) {\n const targetNode = this.nameProvider.getNameNode(astNode);\n return targetNode ?? astNode.$cstNode;\n }\n return undefined;\n }\n\n findReferences(targetNode: AstNode, options: FindReferencesOptions): Stream {\n const refs: ReferenceDescription[] = [];\n if (options.includeDeclaration) {\n const ref = this.getReferenceToSelf(targetNode);\n if (ref) {\n refs.push(ref);\n }\n }\n let indexReferences = this.index.findAllReferences(targetNode, this.nodeLocator.getAstNodePath(targetNode));\n if (options.documentUri) {\n indexReferences = indexReferences.filter(ref => UriUtils.equals(ref.sourceUri, options.documentUri));\n }\n refs.push(...indexReferences);\n return stream(refs);\n }\n\n protected getReferenceToSelf(targetNode: AstNode): ReferenceDescription | undefined {\n const nameNode = this.nameProvider.getNameNode(targetNode);\n if (nameNode) {\n const doc = getDocument(targetNode);\n const path = this.nodeLocator.getAstNodePath(targetNode);\n return {\n sourceUri: doc.uri,\n sourcePath: path,\n targetUri: doc.uri,\n targetPath: path,\n segment: toDocumentSegment(nameNode),\n local: true\n };\n }\n return undefined;\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Stream } from './stream.js';\nimport { Reduction, stream } from './stream.js';\n\n/**\n * A multimap is a variation of a Map that has potentially multiple values for every key.\n */\nexport class MultiMap {\n\n private map = new Map();\n\n constructor()\n constructor(elements: Array<[K, V]>)\n constructor(elements?: Array<[K, V]>) {\n if (elements) {\n for (const [key, value] of elements) {\n this.add(key, value);\n }\n }\n }\n\n /**\n * The total number of values in the multimap.\n */\n get size(): number {\n return Reduction.sum(stream(this.map.values()).map(a => a.length));\n }\n\n /**\n * Clear all entries in the multimap.\n */\n clear(): void {\n this.map.clear();\n }\n\n /**\n * Operates differently depending on whether a `value` is given:\n * * With a value, this method deletes the specific key / value pair from the multimap.\n * * Without a value, all values associated with the given key are deleted.\n *\n * @returns `true` if a value existed and has been removed, or `false` if the specified\n * key / value does not exist.\n */\n delete(key: K, value?: V): boolean {\n if (value === undefined) {\n return this.map.delete(key);\n } else {\n const values = this.map.get(key);\n if (values) {\n const index = values.indexOf(value);\n if (index >= 0) {\n if (values.length === 1) {\n this.map.delete(key);\n } else {\n values.splice(index, 1);\n }\n return true;\n }\n }\n return false;\n }\n }\n\n /**\n * Returns an array of all values associated with the given key. If no value exists,\n * an empty array is returned.\n *\n * _Note:_ The returned array is assumed not to be modified. Use the `set` method to add a\n * value and `delete` to remove a value from the multimap.\n */\n get(key: K): readonly V[] {\n return this.map.get(key) ?? [];\n }\n\n /**\n * Operates differently depending on whether a `value` is given:\n * * With a value, this method returns `true` if the specific key / value pair is present in the multimap.\n * * Without a value, this method returns `true` if the given key is present in the multimap.\n */\n has(key: K, value?: V): boolean {\n if (value === undefined) {\n return this.map.has(key);\n } else {\n const values = this.map.get(key);\n if (values) {\n return values.indexOf(value) >= 0;\n }\n return false;\n }\n }\n\n /**\n * Add the given key / value pair to the multimap.\n */\n add(key: K, value: V): this {\n if (this.map.has(key)) {\n this.map.get(key)!.push(value);\n } else {\n this.map.set(key, [value]);\n }\n return this;\n }\n\n /**\n * Add the given set of key / value pairs to the multimap.\n */\n addAll(key: K, values: Iterable): this {\n if (this.map.has(key)) {\n this.map.get(key)!.push(...values);\n } else {\n this.map.set(key, Array.from(values));\n }\n return this;\n }\n\n /**\n * Invokes the given callback function for every key / value pair in the multimap.\n */\n forEach(callbackfn: (value: V, key: K, map: this) => void): void {\n this.map.forEach((array, key) =>\n array.forEach(value => callbackfn(value, key, this))\n );\n }\n\n /**\n * Returns an iterator of key, value pairs for every entry in the map.\n */\n [Symbol.iterator](): Iterator<[K, V]> {\n return this.entries().iterator();\n }\n\n /**\n * Returns a stream of key, value pairs for every entry in the map.\n */\n entries(): Stream<[K, V]> {\n return stream(this.map.entries())\n .flatMap(([key, array]) => array.map(value => [key, value] as [K, V]));\n }\n\n /**\n * Returns a stream of keys in the map.\n */\n keys(): Stream {\n return stream(this.map.keys());\n }\n\n /**\n * Returns a stream of values in the map.\n */\n values(): Stream {\n return stream(this.map.values()).flat();\n }\n\n /**\n * Returns a stream of key, value set pairs for every key in the map.\n */\n entriesGroupedByKey(): Stream<[K, V[]]> {\n return stream(this.map.entries());\n }\n\n}\n\nexport class BiMap {\n\n private map = new Map();\n private inverse = new Map();\n\n get size(): number {\n return this.map.size;\n }\n\n constructor()\n constructor(elements: Array<[K, V]>)\n constructor(elements?: Array<[K, V]>) {\n if (elements) {\n for (const [key, value] of elements) {\n this.set(key, value);\n }\n }\n }\n\n clear(): void {\n this.map.clear();\n this.inverse.clear();\n }\n\n set(key: K, value: V): this {\n this.map.set(key, value);\n this.inverse.set(value, key);\n return this;\n }\n\n get(key: K): V | undefined {\n return this.map.get(key);\n }\n\n getKey(value: V): K | undefined {\n return this.inverse.get(value);\n }\n\n delete(key: K): boolean {\n const value = this.map.get(key);\n if (value !== undefined) {\n this.map.delete(key);\n this.inverse.delete(value);\n return true;\n }\n return false;\n }\n}\n", "/******************************************************************************\n * Copyright 2021-2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription } from '../syntax-tree.js';\nimport type { AstNodeDescriptionProvider } from '../workspace/ast-descriptions.js';\nimport type { LangiumDocument, PrecomputedScopes } from '../workspace/documents.js';\nimport type { NameProvider } from './name-provider.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { streamAllContents, streamContents } from '../utils/ast-utils.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { interruptAndCheck } from '../utils/promise-utils.js';\n\n/**\n * Language-specific service for precomputing global and local scopes. The service methods are executed\n * as the first and second phase in the `DocumentBuilder`.\n */\nexport interface ScopeComputation {\n\n /**\n * Creates descriptions of all AST nodes that shall be exported into the _global_ scope from the given\n * document. These descriptions are gathered by the `IndexManager` and stored in the global index so\n * they can be referenced from other documents.\n *\n * _Note:_ You should not resolve any cross-references in this service method. Cross-reference resolution\n * depends on the scope computation phase to be completed (`computeScope` method), which runs after the\n * initial indexing where this method is used.\n *\n * @param document The document from which to gather exported AST nodes.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n computeExports(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Precomputes the _local_ scopes for a document, which are necessary for the default way of\n * resolving references to symbols in the same document. The result is a multimap assigning a\n * set of AST node descriptions to every level of the AST. These data are used by the `ScopeProvider`\n * service to determine which target nodes are visible in the context of a specific cross-reference.\n *\n * _Note:_ You should not resolve any cross-references in this service method. Cross-reference\n * resolution depends on the scope computation phase to be completed.\n *\n * @param document The document in which to compute scopes.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n computeLocalScopes(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n}\n\n/**\n * The default scope computation creates and collectes descriptions of the AST nodes to be exported into the\n * _global_ scope from the given document. By default those are the document's root AST node and its directly\n * contained child nodes.\n *\n * Besides, it gathers all AST nodes that have a name (according to the `NameProvider` service) and includes them\n * in the local scope of their particular container nodes. As a result, for every cross-reference in the AST,\n * target elements from the same level (siblings) and further up towards the root (parents and siblings of parents)\n * are visible. Elements being nested inside lower levels (children, children of siblings and parents' siblings)\n * are _invisible_ by default, but that can be changed by customizing this service.\n */\nexport class DefaultScopeComputation implements ScopeComputation {\n\n protected readonly nameProvider: NameProvider;\n protected readonly descriptions: AstNodeDescriptionProvider;\n\n constructor(services: LangiumCoreServices) {\n this.nameProvider = services.references.NameProvider;\n this.descriptions = services.workspace.AstNodeDescriptionProvider;\n }\n\n async computeExports(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n return this.computeExportsForNode(document.parseResult.value, document, undefined, cancelToken);\n }\n\n /**\n * Creates {@link AstNodeDescription AstNodeDescriptions} for the given {@link AstNode parentNode} and its children.\n * The list of children to be considered is determined by the function parameter {@link children}.\n * By default only the direct children of {@link parentNode} are visited, nested nodes are not exported.\n *\n * @param parentNode AST node to be exported, i.e., of which an {@link AstNodeDescription} shall be added to the returned list.\n * @param document The document containing the AST node to be exported.\n * @param children A function called with {@link parentNode} as single argument and returning an {@link Iterable} supplying the children to be visited, which must be directly or transitively contained in {@link parentNode}.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution.\n * @returns A list of {@link AstNodeDescription AstNodeDescriptions} to be published to index.\n */\n async computeExportsForNode(parentNode: AstNode, document: LangiumDocument, children: (root: AstNode) => Iterable = streamContents, cancelToken: CancellationToken = CancellationToken.None): Promise {\n const exports: AstNodeDescription[] = [];\n\n this.exportNode(parentNode, exports, document);\n for (const node of children(parentNode)) {\n await interruptAndCheck(cancelToken);\n this.exportNode(node, exports, document);\n }\n return exports;\n }\n\n /**\n * Add a single node to the list of exports if it has a name. Override this method to change how\n * symbols are exported, e.g. by modifying their exported name.\n */\n protected exportNode(node: AstNode, exports: AstNodeDescription[], document: LangiumDocument): void {\n const name = this.nameProvider.getName(node);\n if (name) {\n exports.push(this.descriptions.createDescription(node, name, document));\n }\n }\n\n async computeLocalScopes(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const rootNode = document.parseResult.value;\n const scopes = new MultiMap();\n // Here we navigate the full AST - local scopes shall be available in the whole document\n for (const node of streamAllContents(rootNode)) {\n await interruptAndCheck(cancelToken);\n this.processNode(node, document, scopes);\n }\n return scopes;\n }\n\n /**\n * Process a single node during scopes computation. The default implementation makes the node visible\n * in the subtree of its container (if the node has a name). Override this method to change this,\n * e.g. by increasing the visibility to a higher level in the AST.\n */\n protected processNode(node: AstNode, document: LangiumDocument, scopes: PrecomputedScopes): void {\n const container = node.$container;\n if (container) {\n const name = this.nameProvider.getName(node);\n if (name) {\n scopes.add(container, this.descriptions.createDescription(node, name, document));\n }\n }\n }\n\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AstNodeDescription } from '../syntax-tree.js';\nimport type { Stream } from '../utils/stream.js';\nimport { EMPTY_STREAM, stream } from '../utils/stream.js';\n\n/**\n * A scope describes what target elements are visible from a specific cross-reference context.\n */\nexport interface Scope {\n\n /**\n * Find a target element matching the given name. If no element is found, `undefined` is returned.\n * If multiple matching elements are present, the selection of the returned element should be done\n * according to the semantics of your language. Usually it is the element that is most closely defined.\n *\n * @param name Name of the cross-reference target as it appears in the source text.\n */\n getElement(name: string): AstNodeDescription | undefined;\n\n /**\n * Create a stream of all elements in the scope. This is used to compute completion proposals to be\n * shown in the editor.\n */\n getAllElements(): Stream;\n\n}\n\nexport interface ScopeOptions {\n caseInsensitive?: boolean;\n}\n\n/**\n * The default scope implementation is based on a `Stream`. It has an optional _outer scope_ describing\n * the next level of elements, which are queried when a target element is not found in the stream provided\n * to this scope.\n */\nexport class StreamScope implements Scope {\n readonly elements: Stream;\n readonly outerScope?: Scope;\n readonly caseInsensitive: boolean;\n\n constructor(elements: Stream, outerScope?: Scope, options?: ScopeOptions) {\n this.elements = elements;\n this.outerScope = outerScope;\n this.caseInsensitive = options?.caseInsensitive ?? false;\n }\n\n getAllElements(): Stream {\n if (this.outerScope) {\n return this.elements.concat(this.outerScope.getAllElements());\n } else {\n return this.elements;\n }\n }\n\n getElement(name: string): AstNodeDescription | undefined {\n const local = this.caseInsensitive\n ? this.elements.find(e => e.name.toLowerCase() === name.toLowerCase())\n : this.elements.find(e => e.name === name);\n if (local) {\n return local;\n }\n if (this.outerScope) {\n return this.outerScope.getElement(name);\n }\n return undefined;\n }\n}\n\nexport class MapScope implements Scope {\n readonly elements: Map;\n readonly outerScope?: Scope;\n readonly caseInsensitive: boolean;\n\n constructor(elements: Iterable, outerScope?: Scope, options?: ScopeOptions) {\n this.elements = new Map();\n this.caseInsensitive = options?.caseInsensitive ?? false;\n for (const element of elements) {\n const name = this.caseInsensitive\n ? element.name.toLowerCase()\n : element.name;\n this.elements.set(name, element);\n }\n this.outerScope = outerScope;\n }\n\n getElement(name: string): AstNodeDescription | undefined {\n const localName = this.caseInsensitive ? name.toLowerCase() : name;\n const local = this.elements.get(localName);\n if (local) {\n return local;\n }\n if (this.outerScope) {\n return this.outerScope.getElement(name);\n }\n return undefined;\n }\n\n getAllElements(): Stream {\n let elementStream = stream(this.elements.values());\n if (this.outerScope) {\n elementStream = elementStream.concat(this.outerScope.getAllElements());\n }\n return elementStream;\n }\n\n}\n\nexport const EMPTY_SCOPE: Scope = {\n getElement(): undefined {\n return undefined;\n },\n getAllElements(): Stream {\n return EMPTY_STREAM;\n }\n};\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { Disposable } from './disposable.js';\nimport type { URI } from './uri-utils.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\n\nexport abstract class DisposableCache implements Disposable {\n\n protected toDispose: Disposable[] = [];\n protected isDisposed = false;\n\n onDispose(disposable: Disposable): void {\n this.toDispose.push(disposable);\n }\n\n dispose(): void {\n this.throwIfDisposed();\n this.clear();\n this.isDisposed = true;\n this.toDispose.forEach(disposable => disposable.dispose());\n }\n\n protected throwIfDisposed(): void {\n if (this.isDisposed) {\n throw new Error('This cache has already been disposed');\n }\n }\n\n abstract clear(): void;\n}\n\nexport class SimpleCache extends DisposableCache {\n protected readonly cache = new Map();\n\n has(key: K): boolean {\n this.throwIfDisposed();\n return this.cache.has(key);\n }\n\n set(key: K, value: V): void {\n this.throwIfDisposed();\n this.cache.set(key, value);\n }\n\n get(key: K): V | undefined;\n get(key: K, provider: () => V): V;\n get(key: K, provider?: () => V): V | undefined {\n this.throwIfDisposed();\n if (this.cache.has(key)) {\n return this.cache.get(key);\n } else if (provider) {\n const value = provider();\n this.cache.set(key, value);\n return value;\n } else {\n return undefined;\n }\n }\n\n delete(key: K): boolean {\n this.throwIfDisposed();\n return this.cache.delete(key);\n }\n\n clear(): void {\n this.throwIfDisposed();\n this.cache.clear();\n }\n}\n\nexport class ContextCache extends DisposableCache {\n\n private readonly cache = new Map>();\n private readonly converter: (input: Context) => ContextKey | Context;\n\n constructor(converter?: (input: Context) => ContextKey) {\n super();\n this.converter = converter ?? (value => value);\n }\n\n has(contextKey: Context, key: Key): boolean {\n this.throwIfDisposed();\n return this.cacheForContext(contextKey).has(key);\n }\n\n set(contextKey: Context, key: Key, value: Value): void {\n this.throwIfDisposed();\n this.cacheForContext(contextKey).set(key, value);\n }\n\n get(contextKey: Context, key: Key): Value | undefined;\n get(contextKey: Context, key: Key, provider: () => Value): Value;\n get(contextKey: Context, key: Key, provider?: () => Value): Value | undefined {\n this.throwIfDisposed();\n const contextCache = this.cacheForContext(contextKey);\n if (contextCache.has(key)) {\n return contextCache.get(key);\n } else if (provider) {\n const value = provider();\n contextCache.set(key, value);\n return value;\n } else {\n return undefined;\n }\n }\n\n delete(contextKey: Context, key: Key): boolean {\n this.throwIfDisposed();\n return this.cacheForContext(contextKey).delete(key);\n }\n\n clear(): void;\n clear(contextKey: Context): void;\n clear(contextKey?: Context): void {\n this.throwIfDisposed();\n if (contextKey) {\n const mapKey = this.converter(contextKey);\n this.cache.delete(mapKey);\n } else {\n this.cache.clear();\n }\n }\n\n protected cacheForContext(contextKey: Context): Map {\n const mapKey = this.converter(contextKey);\n let documentCache = this.cache.get(mapKey);\n if (!documentCache) {\n documentCache = new Map();\n this.cache.set(mapKey, documentCache);\n }\n return documentCache;\n }\n}\n\n/**\n * Every key/value pair in this cache is scoped to a document.\n * If this document is changed or deleted, all associated key/value pairs are deleted.\n */\nexport class DocumentCache extends ContextCache {\n constructor(sharedServices: LangiumSharedCoreServices) {\n super(uri => uri.toString());\n this.onDispose(sharedServices.workspace.DocumentBuilder.onUpdate((changed, deleted) => {\n const allUris = changed.concat(deleted);\n for (const uri of allUris) {\n this.clear(uri);\n }\n }));\n }\n}\n\n/**\n * Every key/value pair in this cache is scoped to the whole workspace.\n * If any document in the workspace changes, the whole cache is evicted.\n */\nexport class WorkspaceCache extends SimpleCache {\n constructor(sharedServices: LangiumSharedCoreServices) {\n super();\n this.onDispose(sharedServices.workspace.DocumentBuilder.onUpdate(() => {\n this.clear();\n }));\n }\n}\n", "/******************************************************************************\n * Copyright 2021-2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, AstReflection, ReferenceInfo } from '../syntax-tree.js';\nimport type { Stream } from '../utils/stream.js';\nimport type { AstNodeDescriptionProvider } from '../workspace/ast-descriptions.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { NameProvider } from './name-provider.js';\nimport type { Scope, ScopeOptions} from './scope.js';\nimport { MapScope, StreamScope } from './scope.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { stream } from '../utils/stream.js';\nimport { WorkspaceCache } from '../utils/caching.js';\n\n/**\n * Language-specific service for determining the scope of target elements visible in a specific cross-reference context.\n */\nexport interface ScopeProvider {\n\n /**\n * Return a scope describing what elements are visible for the given AST node and cross-reference\n * identifier.\n *\n * @param context Information about the reference for which a scope is requested.\n */\n getScope(context: ReferenceInfo): Scope;\n\n}\n\nexport class DefaultScopeProvider implements ScopeProvider {\n\n protected readonly reflection: AstReflection;\n protected readonly nameProvider: NameProvider;\n protected readonly descriptions: AstNodeDescriptionProvider;\n protected readonly indexManager: IndexManager;\n\n protected readonly globalScopeCache: WorkspaceCache;\n\n constructor(services: LangiumCoreServices) {\n this.reflection = services.shared.AstReflection;\n this.nameProvider = services.references.NameProvider;\n this.descriptions = services.workspace.AstNodeDescriptionProvider;\n this.indexManager = services.shared.workspace.IndexManager;\n this.globalScopeCache = new WorkspaceCache(services.shared);\n }\n\n getScope(context: ReferenceInfo): Scope {\n const scopes: Array> = [];\n const referenceType = this.reflection.getReferenceType(context);\n\n const precomputed = getDocument(context.container).precomputedScopes;\n if (precomputed) {\n let currentNode: AstNode | undefined = context.container;\n do {\n const allDescriptions = precomputed.get(currentNode);\n if (allDescriptions.length > 0) {\n scopes.push(stream(allDescriptions).filter(\n desc => this.reflection.isSubtype(desc.type, referenceType)));\n }\n currentNode = currentNode.$container;\n } while (currentNode);\n }\n\n let result: Scope = this.getGlobalScope(referenceType, context);\n for (let i = scopes.length - 1; i >= 0; i--) {\n result = this.createScope(scopes[i], result);\n }\n return result;\n }\n\n /**\n * Create a scope for the given collection of AST node descriptions.\n */\n protected createScope(elements: Iterable, outerScope?: Scope, options?: ScopeOptions): Scope {\n return new StreamScope(stream(elements), outerScope, options);\n }\n\n /**\n * Create a scope for the given collection of AST nodes, which need to be transformed into respective\n * descriptions first. This is done using the `NameProvider` and `AstNodeDescriptionProvider` services.\n */\n protected createScopeForNodes(elements: Iterable, outerScope?: Scope, options?: ScopeOptions): Scope {\n const s = stream(elements).map(e => {\n const name = this.nameProvider.getName(e);\n if (name) {\n return this.descriptions.createDescription(e, name);\n }\n return undefined;\n }).nonNullable();\n return new StreamScope(s, outerScope, options);\n }\n\n /**\n * Create a global scope filtered for the given reference type.\n */\n protected getGlobalScope(referenceType: string, _context: ReferenceInfo): Scope {\n return this.globalScopeCache.get(referenceType, () => new MapScope(this.indexManager.allElements(referenceType)));\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { URI } from 'vscode-uri';\nimport type { CommentProvider } from '../documentation/comment-provider.js';\nimport type { NameProvider } from '../references/name-provider.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, CstNode, GenericAstNode, Mutable, Reference } from '../syntax-tree.js';\nimport { isAstNode, isReference } from '../syntax-tree.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { findNodesForProperty } from '../utils/grammar-utils.js';\nimport type { AstNodeLocator } from '../workspace/ast-node-locator.js';\nimport type { DocumentSegment, LangiumDocument, LangiumDocuments } from '../workspace/documents.js';\n\nexport interface JsonSerializeOptions {\n /** The space parameter for `JSON.stringify`, controlling whether and how to pretty-print the output. */\n space?: string | number;\n /** Whether to include the `$refText` property for references (the name used to identify the target node). */\n refText?: boolean;\n /** Whether to include the `$sourceText` property, which holds the full source text from which an AST node was parsed. */\n sourceText?: boolean;\n /** Whether to include the `$textRegion` property, which holds information to trace AST node properties to their respective source text regions. */\n textRegions?: boolean;\n /** Whether to include the `$comment` property, which holds comments according to the CommentProvider service. */\n comments?: boolean;\n /** The replacer parameter for `JSON.stringify`; the default replacer given as parameter should be used to apply basic replacements. */\n replacer?: (key: string, value: unknown, defaultReplacer: (key: string, value: unknown) => unknown) => unknown\n /** Used to convert and serialize URIs when the target of a cross-reference is in a different document. */\n uriConverter?: (uri: URI, reference: Reference) => string\n}\n\nexport interface JsonDeserializeOptions {\n /** Used to parse and convert URIs when the target of a cross-reference is in a different document. */\n uriConverter?: (uri: string) => URI\n}\n\n/**\n * {@link AstNode}s that may carry information on their definition area within the DSL text.\n */\nexport interface AstNodeWithTextRegion extends AstNode {\n $sourceText?: string;\n $textRegion?: AstNodeRegionWithAssignments;\n}\n\n/**\n * {@link AstNode}s that may carry a semantically relevant comment.\n */\nexport interface AstNodeWithComment extends AstNode {\n $comment?: string;\n}\n\nexport function isAstNodeWithComment(node: AstNode): node is AstNodeWithComment {\n return typeof (node as AstNodeWithComment).$comment === 'string';\n}\n\n/**\n * A {@DocumentSegment} representing the definition area of an AstNode within the DSL text.\n * Usually contains text region information on all assigned property values of the AstNode,\n * and may contain the defining file's URI as string.\n */\nexport interface AstNodeRegionWithAssignments extends DocumentSegment {\n /**\n * A record containing an entry for each assigned property of the AstNode.\n * The key is equal to the property name and the value is an array of the property values'\n * text regions, regardless of whether the property is a single value or list property.\n */\n assignments?: Record;\n /**\n * The AstNode defining file's URI as string\n */\n documentURI?: string;\n}\n\n/**\n * Utility service for transforming an `AstNode` into a JSON string and vice versa.\n */\nexport interface JsonSerializer {\n /**\n * Serialize an `AstNode` into a JSON `string`.\n * @param node The `AstNode` to be serialized.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\n serialize(node: AstNode, options?: JsonSerializeOptions): string;\n /**\n * Deserialize (parse) a JSON `string` into an `AstNode`.\n */\n deserialize(content: string, options?: JsonDeserializeOptions): T;\n}\n\n/**\n * A cross-reference in the serialized JSON representation of an AstNode.\n */\ninterface IntermediateReference {\n /** URI pointing to the target element. This is either `#${path}` if the target is in the same document, or `${documentURI}#${path}` otherwise. */\n $ref?: string\n /** The actual text used to look up the reference target in the surrounding scope. */\n $refText?: string\n /** If any problem occurred while resolving the reference, it is described by this property. */\n $error?: string\n}\n\nfunction isIntermediateReference(obj: unknown): obj is IntermediateReference {\n return typeof obj === 'object' && !!obj && ('$ref' in obj || '$error' in obj);\n}\n\nexport class DefaultJsonSerializer implements JsonSerializer {\n\n /** The set of AstNode properties to be ignored by the serializer. */\n ignoreProperties = new Set(['$container', '$containerProperty', '$containerIndex', '$document', '$cstNode']);\n\n /** The document that is currently processed by the serializer; this is used by the replacer function. */\n protected currentDocument: LangiumDocument | undefined;\n\n protected readonly langiumDocuments: LangiumDocuments;\n protected readonly astNodeLocator: AstNodeLocator;\n protected readonly nameProvider: NameProvider;\n protected readonly commentProvider: CommentProvider;\n\n constructor(services: LangiumCoreServices) {\n this.langiumDocuments = services.shared.workspace.LangiumDocuments;\n this.astNodeLocator = services.workspace.AstNodeLocator;\n this.nameProvider = services.references.NameProvider;\n this.commentProvider = services.documentation.CommentProvider;\n }\n\n serialize(node: AstNode, options: JsonSerializeOptions = {}): string {\n const specificReplacer = options?.replacer;\n const defaultReplacer = (key: string, value: unknown) => this.replacer(key, value, options);\n const replacer = specificReplacer ? (key: string, value: unknown) => specificReplacer(key, value, defaultReplacer) : defaultReplacer;\n\n try {\n this.currentDocument = getDocument(node);\n return JSON.stringify(node, replacer, options?.space);\n } finally {\n this.currentDocument = undefined;\n }\n }\n\n deserialize(content: string, options: JsonDeserializeOptions = {}): T {\n const root = JSON.parse(content);\n this.linkNode(root, root, options);\n return root;\n }\n\n protected replacer(key: string, value: unknown, { refText, sourceText, textRegions, comments, uriConverter }: JsonSerializeOptions): unknown {\n if (this.ignoreProperties.has(key)) {\n return undefined;\n } else if (isReference(value)) {\n const refValue = value.ref;\n const $refText = refText ? value.$refText : undefined;\n if (refValue) {\n const targetDocument = getDocument(refValue);\n let targetUri = '';\n if (this.currentDocument && this.currentDocument !== targetDocument) {\n if (uriConverter) {\n targetUri = uriConverter(targetDocument.uri, value);\n } else {\n targetUri = targetDocument.uri.toString();\n }\n }\n const targetPath = this.astNodeLocator.getAstNodePath(refValue);\n return {\n $ref: `${targetUri}#${targetPath}`,\n $refText\n } satisfies IntermediateReference;\n } else {\n return {\n $error: value.error?.message ?? 'Could not resolve reference',\n $refText\n } satisfies IntermediateReference;\n }\n } else if (isAstNode(value)) {\n let astNode: AstNodeWithTextRegion | undefined = undefined;\n if (textRegions) {\n astNode = this.addAstNodeRegionWithAssignmentsTo({ ...value });\n if ((!key || value.$document) && astNode?.$textRegion) {\n // The document URI is added to the root node of the resulting JSON tree\n astNode.$textRegion.documentURI = this.currentDocument?.uri.toString();\n }\n }\n if (sourceText && !key) {\n astNode ??= { ...value };\n astNode.$sourceText = value.$cstNode?.text;\n }\n if (comments) {\n astNode ??= { ...value };\n const comment = this.commentProvider.getComment(value);\n if (comment) {\n (astNode as AstNodeWithComment).$comment = comment.replace(/\\r/g, '');\n }\n }\n return astNode ?? value;\n } else {\n return value;\n }\n }\n\n protected addAstNodeRegionWithAssignmentsTo(node: AstNodeWithTextRegion) {\n const createDocumentSegment: (cstNode: CstNode) => AstNodeRegionWithAssignments = cstNode => {\n offset: cstNode.offset,\n end: cstNode.end,\n length: cstNode.length,\n range: cstNode.range,\n };\n\n if (node.$cstNode) {\n const textRegion = node.$textRegion = createDocumentSegment(node.$cstNode);\n const assignments: Record = textRegion.assignments = {};\n\n Object.keys(node).filter(key => !key.startsWith('$')).forEach(key => {\n const propertyAssignments = findNodesForProperty(node.$cstNode, key).map(createDocumentSegment);\n if (propertyAssignments.length !== 0) {\n assignments[key] = propertyAssignments;\n }\n });\n\n return node;\n }\n return undefined;\n }\n\n protected linkNode(node: GenericAstNode, root: AstNode, options: JsonDeserializeOptions, container?: AstNode, containerProperty?: string, containerIndex?: number) {\n for (const [propertyName, item] of Object.entries(node)) {\n if (Array.isArray(item)) {\n for (let index = 0; index < item.length; index++) {\n const element = item[index];\n if (isIntermediateReference(element)) {\n item[index] = this.reviveReference(node, propertyName, root, element, options);\n } else if (isAstNode(element)) {\n this.linkNode(element as GenericAstNode, root, options, node, propertyName, index);\n }\n }\n } else if (isIntermediateReference(item)) {\n node[propertyName] = this.reviveReference(node, propertyName, root, item, options);\n } else if (isAstNode(item)) {\n this.linkNode(item as GenericAstNode, root, options, node, propertyName);\n }\n }\n const mutable = node as Mutable;\n mutable.$container = container;\n mutable.$containerProperty = containerProperty;\n mutable.$containerIndex = containerIndex;\n }\n\n protected reviveReference(container: AstNode, property: string, root: AstNode, reference: IntermediateReference, options: JsonDeserializeOptions): Reference | undefined {\n let refText = reference.$refText;\n let error = reference.$error;\n if (reference.$ref) {\n const ref = this.getRefNode(root, reference.$ref, options.uriConverter);\n if (isAstNode(ref)) {\n if (!refText) {\n refText = this.nameProvider.getName(ref);\n }\n return {\n $refText: refText ?? '',\n ref\n };\n } else {\n error = ref;\n }\n }\n if (error) {\n const ref: Mutable = {\n $refText: refText ?? ''\n };\n ref.error = {\n container,\n property,\n message: error,\n reference: ref\n };\n return ref;\n } else {\n return undefined;\n }\n }\n\n protected getRefNode(root: AstNode, uri: string, uriConverter?: (uri: string) => URI): AstNode | string {\n try {\n const fragmentIndex = uri.indexOf('#');\n if (fragmentIndex === 0) {\n const node = this.astNodeLocator.getAstNode(root, uri.substring(1));\n if (!node) {\n return 'Could not resolve path: ' + uri;\n }\n return node;\n }\n if (fragmentIndex < 0) {\n const documentUri = uriConverter ? uriConverter(uri) : URI.parse(uri);\n const document = this.langiumDocuments.getDocument(documentUri);\n if (!document) {\n return 'Could not find document for URI: ' + uri;\n }\n return document.parseResult.value;\n }\n const documentUri = uriConverter ? uriConverter(uri.substring(0, fragmentIndex)) : URI.parse(uri.substring(0, fragmentIndex));\n const document = this.langiumDocuments.getDocument(documentUri);\n if (!document) {\n return 'Could not find document for URI: ' + uri;\n }\n if (fragmentIndex === uri.length - 1) {\n return document.parseResult.value;\n }\n const node = this.astNodeLocator.getAstNode(document.parseResult.value, uri.substring(fragmentIndex + 1));\n if (!node) {\n return 'Could not resolve URI: ' + uri;\n }\n return node;\n } catch (err) {\n return String(err);\n }\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from './services.js';\nimport { UriUtils, type URI } from './utils/uri-utils.js';\n\n/**\n * The service registry provides access to the language-specific {@link LangiumCoreServices} optionally including LSP-related services.\n * These are resolved via the URI of a text document.\n */\nexport interface ServiceRegistry {\n\n /**\n * Register a language via its injected services.\n */\n register(language: LangiumCoreServices): void;\n\n /**\n * Retrieve the language-specific services for the given URI. In case only one language is\n * registered, it may be used regardless of the URI format.\n */\n getServices(uri: URI): LangiumCoreServices;\n\n /**\n * The full set of registered language services.\n */\n readonly all: readonly LangiumCoreServices[];\n}\n\n/**\n * Generic registry for Langium services, but capable of being used with extending service sets as well (such as the lsp-complete LangiumCoreServices set)\n */\nexport class DefaultServiceRegistry implements ServiceRegistry {\n\n protected singleton?: LangiumCoreServices;\n protected map?: Record;\n\n register(language: LangiumCoreServices): void {\n if (!this.singleton && !this.map) {\n // This is the first language to be registered; store it as singleton.\n this.singleton = language;\n return;\n }\n if (!this.map) {\n this.map = {};\n if (this.singleton) {\n // Move the previous singleton instance to the new map.\n for (const ext of this.singleton.LanguageMetaData.fileExtensions) {\n this.map[ext] = this.singleton;\n }\n this.singleton = undefined;\n }\n }\n // Store the language services in the map.\n for (const ext of language.LanguageMetaData.fileExtensions) {\n if (this.map[ext] !== undefined && this.map[ext] !== language) {\n console.warn(`The file extension ${ext} is used by multiple languages. It is now assigned to '${language.LanguageMetaData.languageId}'.`);\n }\n this.map[ext] = language;\n }\n }\n\n getServices(uri: URI): LangiumCoreServices {\n if (this.singleton !== undefined) {\n return this.singleton;\n }\n if (this.map === undefined) {\n throw new Error('The service registry is empty. Use `register` to register the services of a language.');\n }\n const ext = UriUtils.extname(uri);\n const services = this.map[ext];\n if (!services) {\n throw new Error(`The service registry contains no services for the extension '${ext}'.`);\n }\n return services;\n }\n\n get all(): readonly LangiumCoreServices[] {\n if (this.singleton !== undefined) {\n return [this.singleton];\n }\n if (this.map !== undefined) {\n return Object.values(this.map);\n }\n return [];\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CodeDescription, DiagnosticRelatedInformation, DiagnosticTag, integer, Range } from 'vscode-languageserver-types';\nimport type { CancellationToken } from '../utils/cancellation.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstReflection, Properties } from '../syntax-tree.js';\nimport type { MaybePromise } from '../utils/promise-utils.js';\nimport type { Stream } from '../utils/stream.js';\nimport type { DocumentSegment } from '../workspace/documents.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { isOperationCancelled } from '../utils/promise-utils.js';\nimport { stream } from '../utils/stream.js';\n\nexport type DiagnosticInfo> = {\n /** The AST node to which the diagnostic is attached. */\n node: N;\n /** If a property name is given, the diagnostic is restricted to the corresponding text region. */\n property?: P;\n /** If the value of a keyword is given, the diagnostic will appear at its corresponding text region */\n keyword?: string;\n /** In case of a multi-value property (array), an index can be given to select a specific element. */\n index?: number;\n /** If you want to create a diagnostic independent to any property, use the range property. */\n range?: Range;\n /** The diagnostic's code, which usually appear in the user interface. */\n code?: integer | string;\n /** An optional property to describe the error code. */\n codeDescription?: CodeDescription;\n /** Additional metadata about the diagnostic. */\n tags?: DiagnosticTag[];\n /** An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property. */\n relatedInformation?: DiagnosticRelatedInformation[];\n /** A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request. */\n data?: unknown;\n}\n\n/**\n * Shape of information commonly used in the `data` field of diagnostics.\n */\nexport interface DiagnosticData {\n /** Diagnostic code for identifying which code action to apply. This code is _not_ shown in the user interface. */\n code: string\n /** Specifies where to apply the code action in the form of a `DocumentSegment`. */\n actionSegment?: DocumentSegment\n /** Specifies where to apply the code action in the form of a `Range`. */\n actionRange?: Range\n}\n\n/**\n * Create DiagnosticData for a given diagnostic code. The result can be put into the `data` field of a DiagnosticInfo.\n */\nexport function diagnosticData(code: string): DiagnosticData {\n return { code };\n}\n\nexport type ValidationAcceptor = (severity: 'error' | 'warning' | 'info' | 'hint', message: string, info: DiagnosticInfo) => void\n\nexport type ValidationCheck = (node: T, accept: ValidationAcceptor, cancelToken: CancellationToken) => MaybePromise;\n\n/**\n * A utility type for associating non-primitive AST types to corresponding validation checks. For example:\n *\n * ```ts\n * const checks: ValidationChecks = {\n * State: validator.checkStateNameStartsWithCapital\n * };\n * ```\n *\n * If an AST type does not extend AstNode, e.g. if it describes a union of string literals, that type's name must not occur as a key in objects of type `ValidationCheck<...>`.\n *\n * @param T a type definition mapping language specific type names (keys) to the corresponding types (values)\n */\nexport type ValidationChecks = {\n [K in keyof T]?: T[K] extends AstNode ? ValidationCheck | Array> : never\n} & {\n AstNode?: ValidationCheck | Array>;\n}\n\n/**\n * `fast` checks can be executed after every document change (i.e. as the user is typing). If a check\n * is too slow it can delay the response to document changes, yielding bad user experience. By marking\n * it as `slow`, it will be skipped for normal as-you-type validation. Then it's up to you when to\n * schedule these long-running checks: after the fast checks are done, or after saving a document,\n * or with an explicit command, etc.\n *\n * `built-in` checks are errors produced by the lexer, the parser, or the linker. They cannot be used\n * for custom validation checks.\n */\nexport type ValidationCategory = 'fast' | 'slow' | 'built-in'\n\nexport namespace ValidationCategory {\n export const all: readonly ValidationCategory[] = ['fast', 'slow', 'built-in'];\n}\n\ntype ValidationCheckEntry = {\n check: ValidationCheck\n category: ValidationCategory\n}\n\n/**\n * Manages a set of `ValidationCheck`s to be applied when documents are validated.\n */\nexport class ValidationRegistry {\n private readonly entries = new MultiMap();\n private readonly reflection: AstReflection;\n\n constructor(services: LangiumCoreServices) {\n this.reflection = services.shared.AstReflection;\n }\n\n /**\n * Register a set of validation checks. Each value in the record can be either a single validation check (i.e. a function)\n * or an array of validation checks.\n *\n * @param checksRecord Set of validation checks to register.\n * @param category Optional category for the validation checks (defaults to `'fast'`).\n * @param thisObj Optional object to be used as `this` when calling the validation check functions.\n */\n register(checksRecord: ValidationChecks, thisObj: ThisParameterType = this, category: ValidationCategory = 'fast'): void {\n if (category === 'built-in') {\n throw new Error(\"The 'built-in' category is reserved for lexer, parser, and linker errors.\");\n }\n for (const [type, ch] of Object.entries(checksRecord)) {\n const callbacks = ch as ValidationCheck | ValidationCheck[];\n if (Array.isArray(callbacks)) {\n for (const check of callbacks) {\n const entry: ValidationCheckEntry = {\n check: this.wrapValidationException(check, thisObj),\n category\n };\n this.addEntry(type, entry);\n }\n } else if (typeof callbacks === 'function') {\n const entry: ValidationCheckEntry = {\n check: this.wrapValidationException(callbacks, thisObj),\n category\n };\n this.addEntry(type, entry);\n }\n }\n }\n\n protected wrapValidationException(check: ValidationCheck, thisObj: unknown): ValidationCheck {\n return async (node, accept, cancelToken) => {\n try {\n await check.call(thisObj, node, accept, cancelToken);\n } catch (err) {\n if (isOperationCancelled(err)) {\n throw err;\n }\n console.error('An error occurred during validation:', err);\n const message = err instanceof Error ? err.message : String(err);\n if (err instanceof Error && err.stack) {\n console.error(err.stack);\n }\n accept('error', 'An error occurred during validation: ' + message, { node });\n }\n };\n }\n\n protected addEntry(type: string, entry: ValidationCheckEntry): void {\n if (type === 'AstNode') {\n this.entries.add('AstNode', entry);\n return;\n }\n for (const subtype of this.reflection.getAllSubTypes(type)) {\n this.entries.add(subtype, entry);\n }\n }\n\n getChecks(type: string, categories?: ValidationCategory[]): Stream {\n let checks = stream(this.entries.get(type))\n .concat(this.entries.get('AstNode'));\n if (categories) {\n checks = checks.filter(entry => categories.includes(entry.category));\n }\n return checks.map(entry => entry.check);\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { MismatchedTokenException } from 'chevrotain';\nimport type { DiagnosticSeverity, Position, Range, Diagnostic } from 'vscode-languageserver-types';\nimport type { LanguageMetaData } from '../languages/language-meta-data.js';\nimport type { ParseResult } from '../parser/langium-parser.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, CstNode } from '../syntax-tree.js';\nimport type { LangiumDocument } from '../workspace/documents.js';\nimport type { DiagnosticData, DiagnosticInfo, ValidationAcceptor, ValidationCategory, ValidationRegistry } from './validation-registry.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { findNodeForKeyword, findNodeForProperty } from '../utils/grammar-utils.js';\nimport { streamAst } from '../utils/ast-utils.js';\nimport { tokenToRange } from '../utils/cst-utils.js';\nimport { interruptAndCheck, isOperationCancelled } from '../utils/promise-utils.js';\nimport { diagnosticData } from './validation-registry.js';\n\nexport interface ValidationOptions {\n /**\n * If this is set, only the checks associated with these categories are executed; otherwise\n * all checks are executed. The default category if not specified to the registry is `'fast'`.\n */\n categories?: ValidationCategory[];\n /** If true, no further diagnostics are reported if there are lexing errors. */\n stopAfterLexingErrors?: boolean\n /** If true, no further diagnostics are reported if there are parsing errors. */\n stopAfterParsingErrors?: boolean\n /** If true, no further diagnostics are reported if there are linking errors. */\n stopAfterLinkingErrors?: boolean\n}\n\n/**\n * Language-specific service for validating `LangiumDocument`s.\n */\nexport interface DocumentValidator {\n /**\n * Validates the whole specified document.\n *\n * @param document specified document to validate\n * @param options options to control the validation process\n * @param cancelToken allows to cancel the current operation\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: CancellationToken): Promise;\n}\n\nexport class DefaultDocumentValidator implements DocumentValidator {\n\n protected readonly validationRegistry: ValidationRegistry;\n protected readonly metadata: LanguageMetaData;\n\n constructor(services: LangiumCoreServices) {\n this.validationRegistry = services.validation.ValidationRegistry;\n this.metadata = services.LanguageMetaData;\n }\n\n async validateDocument(document: LangiumDocument, options: ValidationOptions = {}, cancelToken = CancellationToken.None): Promise {\n const parseResult = document.parseResult;\n const diagnostics: Diagnostic[] = [];\n\n await interruptAndCheck(cancelToken);\n\n if (!options.categories || options.categories.includes('built-in')) {\n this.processLexingErrors(parseResult, diagnostics, options);\n if (options.stopAfterLexingErrors && diagnostics.some(d => d.data?.code === DocumentValidator.LexingError)) {\n return diagnostics;\n }\n\n this.processParsingErrors(parseResult, diagnostics, options);\n if (options.stopAfterParsingErrors && diagnostics.some(d => d.data?.code === DocumentValidator.ParsingError)) {\n return diagnostics;\n }\n\n this.processLinkingErrors(document, diagnostics, options);\n if (options.stopAfterLinkingErrors && diagnostics.some(d => d.data?.code === DocumentValidator.LinkingError)) {\n return diagnostics;\n }\n }\n\n // Process custom validations\n try {\n diagnostics.push(...await this.validateAst(parseResult.value, options, cancelToken));\n } catch (err) {\n if (isOperationCancelled(err)) {\n throw err;\n }\n console.error('An error occurred during validation:', err);\n }\n\n await interruptAndCheck(cancelToken);\n\n return diagnostics;\n }\n\n protected processLexingErrors(parseResult: ParseResult, diagnostics: Diagnostic[], _options: ValidationOptions): void {\n for (const lexerError of parseResult.lexerErrors) {\n const diagnostic: Diagnostic = {\n severity: toDiagnosticSeverity('error'),\n range: {\n start: {\n line: lexerError.line! - 1,\n character: lexerError.column! - 1\n },\n end: {\n line: lexerError.line! - 1,\n character: lexerError.column! + lexerError.length - 1\n }\n },\n message: lexerError.message,\n data: diagnosticData(DocumentValidator.LexingError),\n source: this.getSource()\n };\n diagnostics.push(diagnostic);\n }\n }\n\n protected processParsingErrors(parseResult: ParseResult, diagnostics: Diagnostic[], _options: ValidationOptions): void {\n for (const parserError of parseResult.parserErrors) {\n let range: Range | undefined = undefined;\n // We can run into the chevrotain error recovery here\n // The token contained in the parser error might be automatically inserted\n // In this case every position value will be `NaN`\n if (isNaN(parserError.token.startOffset)) {\n // Some special parser error types contain a `previousToken`\n // We can simply append our diagnostic to that token\n if ('previousToken' in parserError) {\n const token = (parserError as MismatchedTokenException).previousToken;\n if (!isNaN(token.startOffset)) {\n const position: Position = { line: token.endLine! - 1, character: token.endColumn! };\n range = { start: position, end: position};\n } else {\n // No valid prev token. Might be empty document or containing only hidden tokens.\n // Point to document start\n const position: Position = { line: 0, character: 0 };\n range = { start: position, end: position};\n }\n }\n } else {\n range = tokenToRange(parserError.token);\n }\n if (range) {\n const diagnostic: Diagnostic = {\n severity: toDiagnosticSeverity('error'),\n range,\n message: parserError.message,\n data: diagnosticData(DocumentValidator.ParsingError),\n source: this.getSource()\n };\n diagnostics.push(diagnostic);\n }\n }\n }\n\n protected processLinkingErrors(document: LangiumDocument, diagnostics: Diagnostic[], _options: ValidationOptions): void {\n for (const reference of document.references) {\n const linkingError = reference.error;\n if (linkingError) {\n const info: DiagnosticInfo = {\n node: linkingError.container,\n property: linkingError.property,\n index: linkingError.index,\n data: {\n code: DocumentValidator.LinkingError,\n containerType: linkingError.container.$type,\n property: linkingError.property,\n refText: linkingError.reference.$refText\n } satisfies LinkingErrorData\n };\n diagnostics.push(this.toDiagnostic('error', linkingError.message, info));\n }\n }\n }\n\n protected async validateAst(rootNode: AstNode, options: ValidationOptions, cancelToken = CancellationToken.None): Promise {\n const validationItems: Diagnostic[] = [];\n const acceptor: ValidationAcceptor = (severity: 'error' | 'warning' | 'info' | 'hint', message: string, info: DiagnosticInfo) => {\n validationItems.push(this.toDiagnostic(severity, message, info));\n };\n\n await Promise.all(streamAst(rootNode).map(async node => {\n await interruptAndCheck(cancelToken);\n const checks = this.validationRegistry.getChecks(node.$type, options.categories);\n for (const check of checks) {\n await check(node, acceptor, cancelToken);\n }\n }));\n return validationItems;\n }\n\n protected toDiagnostic(severity: 'error' | 'warning' | 'info' | 'hint', message: string, info: DiagnosticInfo): Diagnostic {\n return {\n message,\n range: getDiagnosticRange(info),\n severity: toDiagnosticSeverity(severity),\n code: info.code,\n codeDescription: info.codeDescription,\n tags: info.tags,\n relatedInformation: info.relatedInformation,\n data: info.data,\n source: this.getSource()\n };\n }\n\n protected getSource(): string | undefined {\n return this.metadata.languageId;\n }\n}\n\nexport function getDiagnosticRange(info: DiagnosticInfo): Range {\n if (info.range) {\n return info.range;\n }\n let cstNode: CstNode | undefined;\n if (typeof info.property === 'string') {\n cstNode = findNodeForProperty(info.node.$cstNode, info.property, info.index);\n } else if (typeof info.keyword === 'string') {\n cstNode = findNodeForKeyword(info.node.$cstNode, info.keyword, info.index);\n }\n cstNode ??= info.node.$cstNode;\n if (!cstNode) {\n return {\n start: { line: 0, character: 0 },\n end: { line: 0, character: 0 }\n };\n }\n return cstNode.range;\n}\n\nexport function toDiagnosticSeverity(severity: 'error' | 'warning' | 'info' | 'hint'): DiagnosticSeverity {\n switch (severity) {\n case 'error':\n return 1; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Error\n case 'warning':\n return 2; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Warning\n case 'info':\n return 3; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Information\n case 'hint':\n return 4; // according to vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity.Hint\n default:\n throw new Error('Invalid diagnostic severity: ' + severity);\n }\n}\n\nexport namespace DocumentValidator {\n export const LexingError = 'lexing-error';\n export const ParsingError = 'parsing-error';\n export const LinkingError = 'linking-error';\n}\n\nexport interface LinkingErrorData extends DiagnosticData {\n containerType: string\n property: string\n refText: string\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { URI } from '../utils/uri-utils.js';\nimport type { NameProvider } from '../references/name-provider.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, ReferenceInfo } from '../syntax-tree.js';\nimport type { AstNodeLocator } from './ast-node-locator.js';\nimport type { DocumentSegment, LangiumDocument } from './documents.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { isLinkingError } from '../syntax-tree.js';\nimport { getDocument, streamAst, streamReferences } from '../utils/ast-utils.js';\nimport { toDocumentSegment } from '../utils/cst-utils.js';\nimport { interruptAndCheck } from '../utils/promise-utils.js';\nimport { UriUtils } from '../utils/uri-utils.js';\n\n/**\n * Language-specific service for creating descriptions of AST nodes to be used for cross-reference resolutions.\n */\nexport interface AstNodeDescriptionProvider {\n\n /**\n * Create a description for the given AST node. This service method is typically used while indexing\n * the contents of a document and during scope computation.\n *\n * @param node An AST node.\n * @param name The name to be used to refer to the AST node. By default, this is determined by the\n * `NameProvider` service, but alternative names may be provided according to the semantics\n * of your language.\n * @param document The document containing the AST node. If omitted, it is taken from the root AST node.\n */\n createDescription(node: AstNode, name: string | undefined, document?: LangiumDocument): AstNodeDescription;\n\n}\n\nexport class DefaultAstNodeDescriptionProvider implements AstNodeDescriptionProvider {\n\n protected readonly astNodeLocator: AstNodeLocator;\n protected readonly nameProvider: NameProvider;\n\n constructor(services: LangiumCoreServices) {\n this.astNodeLocator = services.workspace.AstNodeLocator;\n this.nameProvider = services.references.NameProvider;\n }\n\n createDescription(node: AstNode, name: string | undefined, document: LangiumDocument = getDocument(node)): AstNodeDescription {\n name ??= this.nameProvider.getName(node);\n const path = this.astNodeLocator.getAstNodePath(node);\n if (!name) {\n throw new Error(`Node at path ${path} has no name.`);\n }\n let nameNodeSegment: DocumentSegment | undefined;\n const nameSegmentGetter = () => nameNodeSegment ??= toDocumentSegment(this.nameProvider.getNameNode(node) ?? node.$cstNode);\n return {\n node,\n name,\n get nameSegment() {\n return nameSegmentGetter();\n },\n selectionSegment: toDocumentSegment(node.$cstNode),\n type: node.$type,\n documentUri: document.uri,\n path\n };\n }\n\n}\n\n/**\n * Describes a cross-reference within a document or between two documents.\n */\nexport interface ReferenceDescription {\n /** URI of the document that holds a reference */\n sourceUri: URI\n /** Path to AstNode that holds a reference */\n sourcePath: string\n /** Target document uri */\n targetUri: URI\n /** Path to the target AstNode inside the document */\n targetPath: string\n /** Segment of the reference text. */\n segment: DocumentSegment\n /** Marks a local reference i.e. a cross reference inside a document. */\n local?: boolean\n}\n\n/**\n * Language-specific service to create descriptions of all cross-references in a document. These are used by the `IndexManager`\n * to determine which documents are affected and should be rebuilt when a document is changed.\n */\nexport interface ReferenceDescriptionProvider {\n /**\n * Create descriptions of all cross-references found in the given document. These descriptions are\n * gathered by the `IndexManager` and stored in the global index so they can be considered when\n * a document change is reported by the client.\n *\n * @param document The document in which to gather cross-references.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n createDescriptions(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n}\n\nexport class DefaultReferenceDescriptionProvider implements ReferenceDescriptionProvider {\n\n protected readonly nodeLocator: AstNodeLocator;\n\n constructor(services: LangiumCoreServices) {\n this.nodeLocator = services.workspace.AstNodeLocator;\n }\n\n async createDescriptions(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const descr: ReferenceDescription[] = [];\n const rootNode = document.parseResult.value;\n for (const astNode of streamAst(rootNode)) {\n await interruptAndCheck(cancelToken);\n streamReferences(astNode).filter(refInfo => !isLinkingError(refInfo)).forEach(refInfo => {\n // TODO: Consider logging a warning or throw an exception when DocumentState is < than Linked\n const description = this.createDescription(refInfo);\n if (description) {\n descr.push(description);\n }\n });\n }\n return descr;\n }\n\n protected createDescription(refInfo: ReferenceInfo): ReferenceDescription | undefined {\n const targetNodeDescr = refInfo.reference.$nodeDescription;\n const refCstNode = refInfo.reference.$refNode;\n if (!targetNodeDescr || !refCstNode) {\n return undefined;\n }\n const docUri = getDocument(refInfo.container).uri;\n return {\n sourceUri: docUri,\n sourcePath: this.nodeLocator.getAstNodePath(refInfo.container),\n targetUri: targetNodeDescr.documentUri,\n targetPath: targetNodeDescr.path,\n segment: toDocumentSegment(refCstNode),\n local: UriUtils.equals(targetNodeDescr.documentUri, docUri)\n };\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { AstNode } from '../syntax-tree.js';\n\n/**\n * Language-specific service for locating an `AstNode` in a document.\n */\nexport interface AstNodeLocator {\n\n /**\n * Creates a path represented by a `string` that identifies an `AstNode` inside its document.\n * It must be possible to retrieve exactly the same `AstNode` from the document using this path.\n *\n * @param node The `AstNode` for which to create the path.\n * @returns a path represented by a `string` that identifies `node` inside its document.\n * @see AstNodeLocator.getAstNode\n */\n getAstNodePath(node: AstNode): string;\n\n /**\n * Locates an `AstNode` inside another node by following the given path.\n *\n * @param node Parent element.\n * @param path Describes how to locate the `AstNode` inside the given `node`.\n * @returns The `AstNode` located under the given path, or `undefined` if the path cannot be resolved.\n * @see AstNodeLocator.getAstNodePath\n */\n getAstNode(node: AstNode, path: string): T | undefined;\n\n}\n\nexport class DefaultAstNodeLocator implements AstNodeLocator {\n protected segmentSeparator = '/';\n protected indexSeparator = '@';\n\n getAstNodePath(node: AstNode): string {\n if (node.$container) {\n const containerPath = this.getAstNodePath(node.$container);\n const newSegment = this.getPathSegment(node);\n const nodePath = containerPath + this.segmentSeparator + newSegment;\n return nodePath;\n }\n return '';\n }\n\n protected getPathSegment({ $containerProperty, $containerIndex }: AstNode): string {\n if (!$containerProperty) {\n throw new Error(\"Missing '$containerProperty' in AST node.\");\n }\n if ($containerIndex !== undefined) {\n return $containerProperty + this.indexSeparator + $containerIndex;\n }\n return $containerProperty;\n }\n\n getAstNode(node: AstNode, path: string): T | undefined {\n const segments = path.split(this.segmentSeparator);\n return segments.reduce((previousValue, currentValue) => {\n if (!previousValue || currentValue.length === 0) {\n return previousValue;\n }\n const propertyIndex = currentValue.indexOf(this.indexSeparator);\n if (propertyIndex > 0) {\n const property = currentValue.substring(0, propertyIndex);\n const arrayIndex = parseInt(currentValue.substring(propertyIndex + 1));\n const array = (previousValue as unknown as Record)[property];\n return array?.[arrayIndex];\n }\n return (previousValue as unknown as Record)[currentValue];\n }, node) as T;\n }\n\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { ConfigurationItem, DidChangeConfigurationParams, DidChangeConfigurationRegistrationOptions, InitializeParams, InitializedParams } from 'vscode-languageserver-protocol';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport { Deferred } from '../utils/promise-utils.js';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport interface ConfigurationProvider {\n\n /**\n * A promise that resolves when the configuration provider is ready to be used.\n */\n readonly ready: Promise;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialize` request.\n */\n initialize(params: InitializeParams): void;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialized` notification.\n */\n initialized(params: ConfigurationInitializedParams): Promise;\n\n /**\n * Returns a configuration value stored for the given language.\n *\n * @param language The language id\n * @param configuration Configuration name\n */\n getConfiguration(language: string, configuration: string): Promise;\n\n /**\n * Updates the cached configurations using the `change` notification parameters.\n *\n * @param change The parameters of a change configuration notification.\n * `settings` property of the change object could be expressed as `Record>`\n */\n updateConfiguration(change: DidChangeConfigurationParams): void;\n}\n\nexport interface ConfigurationInitializedParams extends InitializedParams {\n register?: (params: DidChangeConfigurationRegistrationOptions) => void,\n fetchConfiguration?: (configuration: ConfigurationItem[]) => Promise\n}\n\n/**\n * Base configuration provider for building up other configuration providers\n */\nexport class DefaultConfigurationProvider implements ConfigurationProvider {\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly _ready = new Deferred();\n protected settings: Record> = {};\n protected workspaceConfig = false;\n\n constructor(services: LangiumSharedCoreServices) {\n this.serviceRegistry = services.ServiceRegistry;\n }\n\n get ready(): Promise {\n return this._ready.promise;\n }\n\n initialize(params: InitializeParams): void {\n this.workspaceConfig = params.capabilities.workspace?.configuration ?? false;\n }\n\n async initialized(params: ConfigurationInitializedParams): Promise {\n if (this.workspaceConfig) {\n if (params.register) {\n // params.register(...) is a function to be provided by the calling language server for the sake of\n // decoupling this implementation from the concrete LSP implementations, specifically the LSP Connection\n\n const languages = this.serviceRegistry.all;\n params.register({\n // Listen to configuration changes for all languages\n section: languages.map(lang => this.toSectionName(lang.LanguageMetaData.languageId))\n });\n }\n\n if (params.fetchConfiguration) {\n // params.fetchConfiguration(...) is a function to be provided by the calling language server for the sake of\n // decoupling this implementation from the concrete LSP implementations, specifically the LSP Connection\n const configToUpdate = this.serviceRegistry.all.map(lang => {\n // Fetch the configuration changes for all languages\n section: this.toSectionName(lang.LanguageMetaData.languageId)\n });\n\n // get workspace configurations (default scope URI)\n const configs = await params.fetchConfiguration(configToUpdate);\n configToUpdate.forEach((conf, idx) => {\n this.updateSectionConfiguration(conf.section!, configs[idx]);\n });\n }\n }\n this._ready.resolve();\n }\n\n /**\n * Updates the cached configurations using the `change` notification parameters.\n *\n * @param change The parameters of a change configuration notification.\n * `settings` property of the change object could be expressed as `Record>`\n */\n updateConfiguration(change: DidChangeConfigurationParams): void {\n if (!change.settings) {\n return;\n }\n Object.keys(change.settings).forEach(section => {\n this.updateSectionConfiguration(section, change.settings[section]);\n });\n }\n\n protected updateSectionConfiguration(section: string, configuration: any): void {\n this.settings[section] = configuration;\n }\n\n /**\n * Returns a configuration value stored for the given language.\n *\n * @param language The language id\n * @param configuration Configuration name\n */\n async getConfiguration(language: string, configuration: string): Promise {\n await this.ready;\n\n const sectionName = this.toSectionName(language);\n if (this.settings[sectionName]) {\n return this.settings[sectionName][configuration];\n }\n }\n\n protected toSectionName(languageId: string): string {\n return `${languageId}`;\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport interface Disposable {\n /**\n * Dispose this object.\n */\n dispose(): void;\n}\n\nexport interface AsyncDisposable {\n /**\n * Dispose this object.\n */\n dispose(): Promise;\n}\n\nexport namespace Disposable {\n export function create(callback: () => Promise): AsyncDisposable;\n export function create(callback: () => void): Disposable;\n export function create(callback: () => void | Promise): Disposable | AsyncDisposable {\n return {\n dispose: async () => await callback()\n };\n }\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { Disposable } from '../utils/disposable.js';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport type { MaybePromise } from '../utils/promise-utils.js';\nimport type { Deferred } from '../utils/promise-utils.js';\nimport type { ValidationOptions } from '../validation/document-validator.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { LangiumDocument, LangiumDocuments, LangiumDocumentFactory } from './documents.js';\nimport { MultiMap } from '../utils/collections.js';\nimport { OperationCancelled, interruptAndCheck } from '../utils/promise-utils.js';\nimport { stream } from '../utils/stream.js';\nimport type { URI } from '../utils/uri-utils.js';\nimport { ValidationCategory } from '../validation/validation-registry.js';\nimport { DocumentState } from './documents.js';\n\nexport interface BuildOptions {\n /**\n * Control the validation phase with this option:\n * - `true` enables all validation checks and forces revalidating the documents\n * - `false` or `undefined` disables all validation checks\n * - An object runs only the necessary validation checks; the `categories` property restricts this to a specific subset\n */\n validation?: boolean | ValidationOptions\n}\n\nexport interface DocumentBuildState {\n /** Whether a document has completed its last build process. */\n completed: boolean\n /** The options used for the last build process. */\n options: BuildOptions\n /** Additional information about the last build result. */\n result?: {\n validationChecks?: ValidationCategory[]\n }\n}\n\n/**\n * Shared-service for building and updating `LangiumDocument`s.\n */\nexport interface DocumentBuilder {\n\n /** The options used for rebuilding documents after an update. */\n updateBuildOptions: BuildOptions;\n\n /**\n * Execute all necessary build steps for the given documents.\n *\n * @param documents Set of documents to be built.\n * @param options Options for the document builder.\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n build(documents: Array>, options?: BuildOptions, cancelToken?: CancellationToken): Promise;\n\n /**\n * This method is called when a document change is detected. It updates the state of all\n * affected documents, including those with references to the changed ones, so they are rebuilt.\n *\n * @param changed URIs of changed or created documents\n * @param deleted URIs of deleted documents\n * @param cancelToken allows to cancel the current operation\n * @throws `OperationCancelled` if cancellation is detected during execution\n */\n update(changed: URI[], deleted: URI[], cancelToken?: CancellationToken): Promise;\n\n /**\n * Notify the given callback when a document update was triggered, but before any document\n * is rebuilt. Listeners to this event should not perform any long-running task.\n */\n onUpdate(callback: DocumentUpdateListener): Disposable;\n\n /**\n * Notify the given callback when a set of documents has been built reaching a desired target state.\n */\n onBuildPhase(targetState: DocumentState, callback: DocumentBuildListener): Disposable;\n\n /**\n * Wait until the workspace has reached the specified state for all documents.\n *\n * @param state The desired state. The promise won't resolve until all documents have reached this state\n * @param cancelToken Optionally allows to cancel the wait operation, disposing any listeners in the process\n * @throws `OperationCancelled` if cancellation has been requested before the state has been reached\n */\n waitUntil(state: DocumentState, cancelToken?: CancellationToken): Promise;\n\n /**\n * Wait until the document specified by the {@link uri} has reached the specified state.\n *\n * @param state The desired state. The promise won't resolve until the document has reached this state.\n * @param uri The specified URI that points to the document. If the URI does not exist, the promise will resolve once the workspace has reached the specified state.\n * @param cancelToken Optionally allows to cancel the wait operation, disposing any listeners in the process.\n * @return The URI of the document that has reached the desired state, or `undefined` if the document does not exist.\n * @throws `OperationCancelled` if cancellation has been requested before the state has been reached\n */\n waitUntil(state: DocumentState, uri?: URI, cancelToken?: CancellationToken): Promise;\n}\n\nexport type DocumentUpdateListener = (changed: URI[], deleted: URI[]) => void | Promise\nexport type DocumentBuildListener = (built: LangiumDocument[], cancelToken: CancellationToken) => void | Promise\nexport class DefaultDocumentBuilder implements DocumentBuilder {\n\n updateBuildOptions: BuildOptions = {\n // Default: run only the built-in validation checks and those in the _fast_ category (includes those without category)\n validation: {\n categories: ['built-in', 'fast']\n }\n };\n\n protected readonly langiumDocuments: LangiumDocuments;\n protected readonly langiumDocumentFactory: LangiumDocumentFactory;\n protected readonly indexManager: IndexManager;\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly updateListeners: DocumentUpdateListener[] = [];\n protected readonly buildPhaseListeners = new MultiMap();\n protected readonly buildState = new Map();\n protected readonly documentBuildWaiters = new Map>();\n protected currentState = DocumentState.Changed;\n\n constructor(services: LangiumSharedCoreServices) {\n this.langiumDocuments = services.workspace.LangiumDocuments;\n this.langiumDocumentFactory = services.workspace.LangiumDocumentFactory;\n this.indexManager = services.workspace.IndexManager;\n this.serviceRegistry = services.ServiceRegistry;\n }\n\n async build(documents: Array>, options: BuildOptions = {}, cancelToken = CancellationToken.None): Promise {\n for (const document of documents) {\n const key = document.uri.toString();\n if (document.state === DocumentState.Validated) {\n if (typeof options.validation === 'boolean' && options.validation) {\n // Force re-running all validation checks\n document.state = DocumentState.IndexedReferences;\n document.diagnostics = undefined;\n this.buildState.delete(key);\n } else if (typeof options.validation === 'object') {\n const buildState = this.buildState.get(key);\n const previousCategories = buildState?.result?.validationChecks;\n if (previousCategories) {\n // Validation with explicit options was requested for a document that has already been partly validated.\n // In this case, we need to merge the previous validation categories with the new ones.\n const newCategories = options.validation.categories ?? ValidationCategory.all as ValidationCategory[];\n const categories = newCategories.filter(c => !previousCategories.includes(c));\n if (categories.length > 0) {\n this.buildState.set(key, {\n completed: false,\n options: {\n validation: {\n ...options.validation,\n categories\n }\n },\n result: buildState.result\n });\n document.state = DocumentState.IndexedReferences;\n }\n }\n }\n } else {\n // Default: forget any previous build options\n this.buildState.delete(key);\n }\n }\n this.currentState = DocumentState.Changed;\n await this.emitUpdate(documents.map(e => e.uri), []);\n await this.buildDocuments(documents, options, cancelToken);\n }\n\n async update(changed: URI[], deleted: URI[], cancelToken = CancellationToken.None): Promise {\n this.currentState = DocumentState.Changed;\n // Remove all metadata of documents that are reported as deleted\n for (const deletedUri of deleted) {\n this.langiumDocuments.deleteDocument(deletedUri);\n this.buildState.delete(deletedUri.toString());\n this.indexManager.remove(deletedUri);\n }\n // Set the state of all changed documents to `Changed` so they are completely rebuilt\n for (const changedUri of changed) {\n const invalidated = this.langiumDocuments.invalidateDocument(changedUri);\n if (!invalidated) {\n // We create an unparsed, invalid document.\n // This will be parsed as soon as we reach the first document builder phase.\n // This allows to cancel the parsing process later in case we need it.\n const newDocument = this.langiumDocumentFactory.fromModel({ $type: 'INVALID' }, changedUri);\n newDocument.state = DocumentState.Changed;\n this.langiumDocuments.addDocument(newDocument);\n }\n this.buildState.delete(changedUri.toString());\n }\n // Set the state of all documents that should be relinked to `ComputedScopes` (if not already lower)\n const allChangedUris = stream(changed).concat(deleted).map(uri => uri.toString()).toSet();\n this.langiumDocuments.all\n .filter(doc => !allChangedUris.has(doc.uri.toString()) && this.shouldRelink(doc, allChangedUris))\n .forEach(doc => {\n const linker = this.serviceRegistry.getServices(doc.uri).references.Linker;\n linker.unlink(doc);\n doc.state = Math.min(doc.state, DocumentState.ComputedScopes);\n doc.diagnostics = undefined;\n });\n // Notify listeners of the update\n await this.emitUpdate(changed, deleted);\n // Only allow interrupting the execution after all state changes are done\n await interruptAndCheck(cancelToken);\n\n // Collect all documents that we should rebuild\n const rebuildDocuments = this.langiumDocuments.all\n .filter(doc =>\n // This includes those that were reported as changed and those that we selected for relinking\n doc.state < DocumentState.Linked\n // This includes those for which a previous build has been cancelled\n || !this.buildState.get(doc.uri.toString())?.completed\n )\n .toArray();\n await this.buildDocuments(rebuildDocuments, this.updateBuildOptions, cancelToken);\n }\n\n protected async emitUpdate(changed: URI[], deleted: URI[]): Promise {\n await Promise.all(this.updateListeners.map(listener => listener(changed, deleted)));\n }\n\n /**\n * Check whether the given document should be relinked after changes were found in the given URIs.\n */\n protected shouldRelink(document: LangiumDocument, changedUris: Set): boolean {\n // Relink documents with linking errors -- maybe those references can be resolved now\n if (document.references.some(ref => ref.error !== undefined)) {\n return true;\n }\n // Check whether the document is affected by any of the changed URIs\n return this.indexManager.isAffected(document, changedUris);\n }\n\n onUpdate(callback: DocumentUpdateListener): Disposable {\n this.updateListeners.push(callback);\n return Disposable.create(() => {\n const index = this.updateListeners.indexOf(callback);\n if (index >= 0) {\n this.updateListeners.splice(index, 1);\n }\n });\n }\n\n /**\n * Build the given documents by stepping through all build phases. If a document's state indicates\n * that a certain build phase is already done, the phase is skipped for that document.\n */\n protected async buildDocuments(documents: LangiumDocument[], options: BuildOptions, cancelToken: CancellationToken): Promise {\n this.prepareBuild(documents, options);\n // 0. Parse content\n await this.runCancelable(documents, DocumentState.Parsed, cancelToken, doc =>\n this.langiumDocumentFactory.update(doc, cancelToken)\n );\n // 1. Index content\n await this.runCancelable(documents, DocumentState.IndexedContent, cancelToken, doc =>\n this.indexManager.updateContent(doc, cancelToken)\n );\n // 2. Compute scopes\n await this.runCancelable(documents, DocumentState.ComputedScopes, cancelToken, async doc => {\n const scopeComputation = this.serviceRegistry.getServices(doc.uri).references.ScopeComputation;\n doc.precomputedScopes = await scopeComputation.computeLocalScopes(doc, cancelToken);\n });\n // 3. Linking\n await this.runCancelable(documents, DocumentState.Linked, cancelToken, doc => {\n const linker = this.serviceRegistry.getServices(doc.uri).references.Linker;\n return linker.link(doc, cancelToken);\n });\n // 4. Index references\n await this.runCancelable(documents, DocumentState.IndexedReferences, cancelToken, doc =>\n this.indexManager.updateReferences(doc, cancelToken)\n );\n // 5. Validation\n const toBeValidated = documents.filter(doc => this.shouldValidate(doc));\n await this.runCancelable(toBeValidated, DocumentState.Validated, cancelToken, doc =>\n this.validate(doc, cancelToken)\n );\n\n // If we've made it to this point without being cancelled, we can mark the build state as completed.\n for (const doc of documents) {\n const state = this.buildState.get(doc.uri.toString());\n if (state) {\n state.completed = true;\n }\n }\n }\n\n protected prepareBuild(documents: LangiumDocument[], options: BuildOptions): void {\n for (const doc of documents) {\n const key = doc.uri.toString();\n const state = this.buildState.get(key);\n // If the document has no previous build state, we set it. If it has one, but it's already marked\n // as completed, we overwrite it. If the previous build was not completed, we keep its state\n // and continue where it was cancelled.\n if (!state || state.completed) {\n this.buildState.set(key, {\n completed: false,\n options,\n result: state?.result\n });\n }\n }\n }\n\n protected async runCancelable(documents: LangiumDocument[], targetState: DocumentState, cancelToken: CancellationToken,\n callback: (document: LangiumDocument) => MaybePromise): Promise {\n const filtered = documents.filter(e => e.state < targetState);\n for (const document of filtered) {\n await interruptAndCheck(cancelToken);\n await callback(document);\n document.state = targetState;\n }\n await this.notifyBuildPhase(filtered, targetState, cancelToken);\n this.currentState = targetState;\n }\n\n onBuildPhase(targetState: DocumentState, callback: DocumentBuildListener): Disposable {\n this.buildPhaseListeners.add(targetState, callback);\n return Disposable.create(() => {\n this.buildPhaseListeners.delete(targetState, callback);\n });\n }\n\n waitUntil(state: DocumentState, cancelToken?: CancellationToken): Promise;\n waitUntil(state: DocumentState, uri?: URI, cancelToken?: CancellationToken): Promise;\n waitUntil(state: DocumentState, uriOrToken?: URI | CancellationToken, cancelToken?: CancellationToken): Promise {\n let uri: URI | undefined = undefined;\n if (uriOrToken && 'path' in uriOrToken) {\n uri = uriOrToken;\n } else {\n cancelToken = uriOrToken;\n }\n cancelToken ??= CancellationToken.None;\n if (uri) {\n const document = this.langiumDocuments.getDocument(uri);\n if (document && document.state > state) {\n return Promise.resolve(uri);\n }\n }\n if (this.currentState >= state) {\n return Promise.resolve(undefined);\n } else if (cancelToken.isCancellationRequested) {\n return Promise.reject(OperationCancelled);\n }\n return new Promise((resolve, reject) => {\n const buildDisposable = this.onBuildPhase(state, () => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n if (uri) {\n const document = this.langiumDocuments.getDocument(uri);\n resolve(document?.uri);\n } else {\n resolve(undefined);\n }\n });\n const cancelDisposable = cancelToken!.onCancellationRequested(() => {\n buildDisposable.dispose();\n cancelDisposable.dispose();\n reject(OperationCancelled);\n });\n });\n }\n\n protected async notifyBuildPhase(documents: LangiumDocument[], state: DocumentState, cancelToken: CancellationToken): Promise {\n if (documents.length === 0) {\n // Don't notify when no document has been processed\n return;\n }\n const listeners = this.buildPhaseListeners.get(state);\n for (const listener of listeners) {\n await interruptAndCheck(cancelToken);\n await listener(documents, cancelToken);\n }\n }\n\n /**\n * Determine whether the given document should be validated during a build. The default\n * implementation checks the `validation` property of the build options. If it's set to `true`\n * or a `ValidationOptions` object, the document is included in the validation phase.\n */\n protected shouldValidate(document: LangiumDocument): boolean {\n return Boolean(this.getBuildOptions(document).validation);\n }\n\n /**\n * Run validation checks on the given document and store the resulting diagnostics in the document.\n * If the document already contains diagnostics, the new ones are added to the list.\n */\n protected async validate(document: LangiumDocument, cancelToken: CancellationToken): Promise {\n const validator = this.serviceRegistry.getServices(document.uri).validation.DocumentValidator;\n const validationSetting = this.getBuildOptions(document).validation;\n const options = typeof validationSetting === 'object' ? validationSetting : undefined;\n const diagnostics = await validator.validateDocument(document, options, cancelToken);\n if (document.diagnostics) {\n document.diagnostics.push(...diagnostics);\n } else {\n document.diagnostics = diagnostics;\n }\n\n // Store information about the executed validation in the build state\n const state = this.buildState.get(document.uri.toString());\n if (state) {\n state.result ??= {};\n const newCategories = options?.categories ?? ValidationCategory.all;\n if (state.result.validationChecks) {\n state.result.validationChecks.push(...newCategories);\n } else {\n state.result.validationChecks = [...newCategories];\n }\n }\n }\n\n protected getBuildOptions(document: LangiumDocument): BuildOptions {\n return this.buildState.get(document.uri.toString())?.options ?? {};\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription, AstReflection } from '../syntax-tree.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { ContextCache } from '../utils/caching.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport type { Stream } from '../utils/stream.js';\nimport { stream } from '../utils/stream.js';\nimport type { URI } from '../utils/uri-utils.js';\nimport { UriUtils } from '../utils/uri-utils.js';\nimport type { ReferenceDescription } from './ast-descriptions.js';\nimport type { LangiumDocument, LangiumDocuments } from './documents.js';\n\n/**\n * The index manager is responsible for keeping metadata about symbols and cross-references\n * in the workspace. It is used to look up symbols in the global scope, mostly during linking\n * and completion. This service is shared between all languages of a language server.\n */\nexport interface IndexManager {\n\n /**\n * Removes the specified document URI from the index.\n * Necessary when documents are deleted and not referenceable anymore.\n *\n * @param uri The URI of the document for which index data shall be removed\n */\n remove(uri: URI): void;\n\n /**\n * Updates the information about the exportable content of a document inside the index.\n *\n * @param document Document to be updated\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n updateContent(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Updates the information about the cross-references of a document inside the index.\n *\n * @param document Document to be updated\n * @param cancelToken Indicates when to cancel the current operation.\n * @throws `OperationCanceled` if a user action occurs during execution\n */\n updateReferences(document: LangiumDocument, cancelToken?: CancellationToken): Promise;\n\n /**\n * Determine whether the given document could be affected by changes of the documents\n * identified by the given URIs (second parameter). The document is typically regarded as\n * affected if it contains a reference to any of the changed files.\n *\n * @param document Document to check whether it's affected\n * @param changedUris URIs of the changed documents\n */\n isAffected(document: LangiumDocument, changedUris: Set): boolean;\n\n /**\n * Compute a list of all exported elements, optionally filtered using a type identifier and document URIs.\n *\n * @param nodeType The type to filter with, or `undefined` to return descriptions of all types.\n * @param uris If specified, only returns elements from the given URIs.\n * @returns a `Stream` containing all globally visible nodes (of a given type).\n */\n allElements(nodeType?: string, uris?: Set): Stream;\n\n /**\n * Returns all known references that are pointing to the given `targetNode`.\n *\n * @param targetNode the `AstNode` to look up references for\n * @param astNodePath the path that points to the `targetNode` inside the document. See also `AstNodeLocator`\n *\n * @returns a `Stream` of references that are targeting the `targetNode`\n */\n findAllReferences(targetNode: AstNode, astNodePath: string): Stream;\n\n}\n\nexport class DefaultIndexManager implements IndexManager {\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly documents: LangiumDocuments;\n protected readonly astReflection: AstReflection;\n\n /**\n * The symbol index stores all `AstNodeDescription` items exported by a document.\n * The key used in this map is the string representation of the specific document URI.\n */\n protected readonly symbolIndex = new Map();\n /**\n * This is a cache for the `allElements()` method.\n * It caches the descriptions from `symbolIndex` grouped by types.\n */\n protected readonly symbolByTypeIndex = new ContextCache();\n /**\n * This index keeps track of all `ReferenceDescription` items exported by a document.\n * This is used to compute which elements are affected by a document change\n * and for finding references to an AST node.\n */\n protected readonly referenceIndex = new Map();\n\n constructor(services: LangiumSharedCoreServices) {\n this.documents = services.workspace.LangiumDocuments;\n this.serviceRegistry = services.ServiceRegistry;\n this.astReflection = services.AstReflection;\n }\n\n findAllReferences(targetNode: AstNode, astNodePath: string): Stream {\n const targetDocUri = getDocument(targetNode).uri;\n const result: ReferenceDescription[] = [];\n this.referenceIndex.forEach(docRefs => {\n docRefs.forEach(refDescr => {\n if (UriUtils.equals(refDescr.targetUri, targetDocUri) && refDescr.targetPath === astNodePath) {\n result.push(refDescr);\n }\n });\n });\n return stream(result);\n }\n\n allElements(nodeType?: string, uris?: Set): Stream {\n let documentUris = stream(this.symbolIndex.keys());\n if (uris) {\n documentUris = documentUris.filter(uri => !uris || uris.has(uri));\n }\n return documentUris\n .map(uri => this.getFileDescriptions(uri, nodeType))\n .flat();\n }\n\n protected getFileDescriptions(uri: string, nodeType?: string): AstNodeDescription[] {\n if (!nodeType) {\n return this.symbolIndex.get(uri) ?? [];\n }\n const descriptions = this.symbolByTypeIndex.get(uri, nodeType, () => {\n const allFileDescriptions = this.symbolIndex.get(uri) ?? [];\n return allFileDescriptions.filter(e => this.astReflection.isSubtype(e.type, nodeType));\n });\n return descriptions;\n }\n\n remove(uri: URI): void {\n const uriString = uri.toString();\n this.symbolIndex.delete(uriString);\n this.symbolByTypeIndex.clear(uriString);\n this.referenceIndex.delete(uriString);\n }\n\n async updateContent(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const services = this.serviceRegistry.getServices(document.uri);\n const exports = await services.references.ScopeComputation.computeExports(document, cancelToken);\n const uri = document.uri.toString();\n this.symbolIndex.set(uri, exports);\n this.symbolByTypeIndex.clear(uri);\n }\n\n async updateReferences(document: LangiumDocument, cancelToken = CancellationToken.None): Promise {\n const services = this.serviceRegistry.getServices(document.uri);\n const indexData = await services.workspace.ReferenceDescriptionProvider.createDescriptions(document, cancelToken);\n this.referenceIndex.set(document.uri.toString(), indexData);\n }\n\n isAffected(document: LangiumDocument, changedUris: Set): boolean {\n const references = this.referenceIndex.get(document.uri.toString());\n if (!references) {\n return false;\n }\n return references.some(ref => !ref.local && changedUris.has(ref.targetUri.toString()));\n }\n\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { InitializeParams, InitializedParams } from 'vscode-languageserver-protocol';\nimport type { WorkspaceFolder } from 'vscode-languageserver-types';\nimport type { ServiceRegistry } from '../service-registry.js';\nimport type { LangiumSharedCoreServices } from '../services.js';\nimport { CancellationToken } from '../utils/cancellation.js';\nimport { Deferred, interruptAndCheck } from '../utils/promise-utils.js';\nimport { URI, UriUtils } from '../utils/uri-utils.js';\nimport type { BuildOptions, DocumentBuilder } from './document-builder.js';\nimport type { LangiumDocument, LangiumDocuments } from './documents.js';\nimport type { FileSystemNode, FileSystemProvider } from './file-system-provider.js';\nimport type { WorkspaceLock } from './workspace-lock.js';\n\n// export type WorkspaceFolder from 'vscode-languageserver-types' for convenience,\n// is supposed to avoid confusion as 'WorkspaceFolder' might accidentally be imported via 'vscode-languageclient'\nexport type { WorkspaceFolder };\n\n/**\n * The workspace manager is responsible for finding source files in the workspace.\n * This service is shared between all languages of a language server.\n */\nexport interface WorkspaceManager {\n\n /** The options used for the initial workspace build. */\n initialBuildOptions: BuildOptions | undefined;\n\n /**\n * A promise that resolves when the workspace manager is ready to be used.\n * Use this to ensure that the workspace manager has finished its initialization.\n */\n readonly ready: Promise;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialize` request.\n */\n initialize(params: InitializeParams): void;\n\n /**\n * When used in a language server context, this method is called when the server receives\n * the `initialized` notification.\n */\n initialized(params: InitializedParams): Promise;\n\n /**\n * Does the initial indexing of workspace folders.\n * Collects information about exported and referenced AstNodes in\n * each language file and stores it locally.\n *\n * @param folders The set of workspace folders to be indexed.\n */\n initializeWorkspace(folders: WorkspaceFolder[], cancelToken?: CancellationToken): Promise;\n\n}\n\nexport class DefaultWorkspaceManager implements WorkspaceManager {\n\n initialBuildOptions: BuildOptions = {};\n\n protected readonly serviceRegistry: ServiceRegistry;\n protected readonly langiumDocuments: LangiumDocuments;\n protected readonly documentBuilder: DocumentBuilder;\n protected readonly fileSystemProvider: FileSystemProvider;\n protected readonly mutex: WorkspaceLock;\n protected readonly _ready = new Deferred();\n protected folders?: WorkspaceFolder[];\n\n constructor(services: LangiumSharedCoreServices) {\n this.serviceRegistry = services.ServiceRegistry;\n this.langiumDocuments = services.workspace.LangiumDocuments;\n this.documentBuilder = services.workspace.DocumentBuilder;\n this.fileSystemProvider = services.workspace.FileSystemProvider;\n this.mutex = services.workspace.WorkspaceLock;\n }\n\n get ready(): Promise {\n return this._ready.promise;\n }\n\n initialize(params: InitializeParams): void {\n this.folders = params.workspaceFolders ?? undefined;\n }\n\n initialized(_params: InitializedParams): Promise {\n // Initialize the workspace even if there are no workspace folders\n // We still want to load additional documents (language library or similar) during initialization\n return this.mutex.write(token => this.initializeWorkspace(this.folders ?? [], token));\n }\n\n async initializeWorkspace(folders: WorkspaceFolder[], cancelToken = CancellationToken.None): Promise {\n const documents = await this.performStartup(folders);\n // Only after creating all documents do we check whether we need to cancel the initialization\n // The document builder will later pick up on all unprocessed documents\n await interruptAndCheck(cancelToken);\n await this.documentBuilder.build(documents, this.initialBuildOptions, cancelToken);\n }\n\n /**\n * Performs the uninterruptable startup sequence of the workspace manager.\n * This methods loads all documents in the workspace and other documents and returns them.\n */\n protected async performStartup(folders: WorkspaceFolder[]): Promise {\n const fileExtensions = this.serviceRegistry.all.flatMap(e => e.LanguageMetaData.fileExtensions);\n const documents: LangiumDocument[] = [];\n const collector = (document: LangiumDocument) => {\n documents.push(document);\n if (!this.langiumDocuments.hasDocument(document.uri)) {\n this.langiumDocuments.addDocument(document);\n }\n };\n // Even though we don't await the initialization of the workspace manager,\n // we can still assume that all library documents and file documents are loaded by the time we start building documents.\n // The mutex prevents anything from performing a workspace build until we check the cancellation token\n await this.loadAdditionalDocuments(folders, collector);\n await Promise.all(\n folders.map(wf => [wf, this.getRootFolder(wf)] as [WorkspaceFolder, URI])\n .map(async entry => this.traverseFolder(...entry, fileExtensions, collector))\n );\n this._ready.resolve();\n return documents;\n }\n\n /**\n * Load all additional documents that shall be visible in the context of the given workspace\n * folders and add them to the collector. This can be used to include built-in libraries of\n * your language, which can be either loaded from provided files or constructed in memory.\n */\n protected loadAdditionalDocuments(_folders: WorkspaceFolder[], _collector: (document: LangiumDocument) => void): Promise {\n return Promise.resolve();\n }\n\n /**\n * Determine the root folder of the source documents in the given workspace folder.\n * The default implementation returns the URI of the workspace folder, but you can override\n * this to return a subfolder like `src` instead.\n */\n protected getRootFolder(workspaceFolder: WorkspaceFolder): URI {\n return URI.parse(workspaceFolder.uri);\n }\n\n /**\n * Traverse the file system folder identified by the given URI and its subfolders. All\n * contained files that match the file extensions are added to the collector.\n */\n protected async traverseFolder(workspaceFolder: WorkspaceFolder, folderPath: URI, fileExtensions: string[], collector: (document: LangiumDocument) => void): Promise {\n const content = await this.fileSystemProvider.readDirectory(folderPath);\n await Promise.all(content.map(async entry => {\n if (this.includeEntry(workspaceFolder, entry, fileExtensions)) {\n if (entry.isDirectory) {\n await this.traverseFolder(workspaceFolder, entry.uri, fileExtensions, collector);\n } else if (entry.isFile) {\n const document = await this.langiumDocuments.getOrCreateDocument(entry.uri);\n collector(document);\n }\n }\n }));\n }\n\n /**\n * Determine whether the given folder entry shall be included while indexing the workspace.\n */\n protected includeEntry(_workspaceFolder: WorkspaceFolder, entry: FileSystemNode, fileExtensions: string[]): boolean {\n const name = UriUtils.basename(entry.uri);\n if (name.startsWith('.')) {\n return false;\n }\n if (entry.isDirectory) {\n return name !== 'node_modules' && name !== 'out';\n } else if (entry.isFile) {\n const extname = UriUtils.extname(entry.uri);\n return fileExtensions.includes(extname);\n }\n return false;\n }\n\n}\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { ILexingError, IMultiModeLexerDefinition, IToken, TokenType, TokenTypeDictionary, TokenVocabulary } from 'chevrotain';\nimport type { LangiumCoreServices } from '../services.js';\nimport { Lexer as ChevrotainLexer } from 'chevrotain';\n\nexport interface LexerResult {\n /**\n * A list of all tokens that were lexed from the input.\n *\n * Note that Langium requires the optional properties\n * `startLine`, `startColumn`, `endOffset`, `endLine` and `endColumn` to be set on each token.\n */\n tokens: IToken[];\n /**\n * Contains hidden tokens, usually comments.\n */\n hidden: IToken[];\n errors: ILexingError[];\n}\n\nexport interface Lexer {\n readonly definition: TokenTypeDictionary;\n tokenize(text: string): LexerResult;\n}\n\nexport class DefaultLexer implements Lexer {\n\n protected chevrotainLexer: ChevrotainLexer;\n protected tokenTypes: TokenTypeDictionary;\n\n constructor(services: LangiumCoreServices) {\n const tokens = services.parser.TokenBuilder.buildTokens(services.Grammar, {\n caseInsensitive: services.LanguageMetaData.caseInsensitive\n });\n this.tokenTypes = this.toTokenTypeDictionary(tokens);\n const lexerTokens = isTokenTypeDictionary(tokens) ? Object.values(tokens) : tokens;\n this.chevrotainLexer = new ChevrotainLexer(lexerTokens, {\n positionTracking: 'full'\n });\n }\n\n get definition(): TokenTypeDictionary {\n return this.tokenTypes;\n }\n\n tokenize(text: string): LexerResult {\n const chevrotainResult = this.chevrotainLexer.tokenize(text);\n return {\n tokens: chevrotainResult.tokens,\n errors: chevrotainResult.errors,\n hidden: chevrotainResult.groups.hidden ?? []\n };\n }\n\n protected toTokenTypeDictionary(buildTokens: TokenVocabulary): TokenTypeDictionary {\n if (isTokenTypeDictionary(buildTokens)) return buildTokens;\n const tokens = isIMultiModeLexerDefinition(buildTokens) ? Object.values(buildTokens.modes).flat() : buildTokens;\n const res: TokenTypeDictionary = {};\n tokens.forEach(token => res[token.name] = token);\n return res;\n }\n}\n\n/**\n * Returns a check whether the given TokenVocabulary is TokenType array\n */\nexport function isTokenTypeArray(tokenVocabulary: TokenVocabulary): tokenVocabulary is TokenType[] {\n return Array.isArray(tokenVocabulary) && (tokenVocabulary.length === 0 || 'name' in tokenVocabulary[0]);\n}\n\n/**\n * Returns a check whether the given TokenVocabulary is IMultiModeLexerDefinition\n */\nexport function isIMultiModeLexerDefinition(tokenVocabulary: TokenVocabulary): tokenVocabulary is IMultiModeLexerDefinition {\n return tokenVocabulary && 'modes' in tokenVocabulary && 'defaultMode' in tokenVocabulary;\n}\n\n/**\n * Returns a check whether the given TokenVocabulary is TokenTypeDictionary\n */\nexport function isTokenTypeDictionary(tokenVocabulary: TokenVocabulary): tokenVocabulary is TokenTypeDictionary {\n return !isTokenTypeArray(tokenVocabulary) && !isIMultiModeLexerDefinition(tokenVocabulary);\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { Position, Range } from 'vscode-languageserver-types';\nimport type { CstNode } from '../syntax-tree.js';\nimport { NEWLINE_REGEXP, escapeRegExp } from '../utils/regexp-utils.js';\nimport { URI } from '../utils/uri-utils.js';\n\nexport interface JSDocComment extends JSDocValue {\n readonly elements: JSDocElement[]\n getTag(name: string): JSDocTag | undefined\n getTags(name: string): JSDocTag[]\n}\n\nexport type JSDocElement = JSDocParagraph | JSDocTag;\n\nexport type JSDocInline = JSDocTag | JSDocLine;\n\nexport interface JSDocValue {\n /**\n * Represents the range that this JSDoc element occupies.\n * If the JSDoc was parsed from a `CstNode`, the range will represent the location in the source document.\n */\n readonly range: Range\n /**\n * Renders this JSDoc element to a plain text representation.\n */\n toString(): string\n /**\n * Renders this JSDoc element to a markdown representation.\n *\n * @param options Rendering options to customize the markdown result.\n */\n toMarkdown(options?: JSDocRenderOptions): string\n}\n\nexport interface JSDocParagraph extends JSDocValue {\n readonly inlines: JSDocInline[]\n}\n\nexport interface JSDocLine extends JSDocValue {\n readonly text: string\n}\n\nexport interface JSDocTag extends JSDocValue {\n readonly name: string\n readonly content: JSDocParagraph\n readonly inline: boolean\n}\n\nexport interface JSDocParseOptions {\n /**\n * The start symbol of your comment format. Defaults to `/**`.\n */\n readonly start?: RegExp | string\n /**\n * The symbol that start a line of your comment format. Defaults to `*`.\n */\n readonly line?: RegExp | string\n /**\n * The end symbol of your comment format. Defaults to `*\\/`.\n */\n readonly end?: RegExp | string\n}\n\nexport interface JSDocRenderOptions {\n /**\n * Determines the style for rendering tags. Defaults to `italic`.\n */\n tag?: 'plain' | 'italic' | 'bold' | 'bold-italic'\n /**\n * Determines the default for rendering `@link` tags. Defaults to `plain`.\n */\n link?: 'code' | 'plain'\n /**\n * Custom tag rendering function.\n * Return a markdown formatted tag or `undefined` to fall back to the default rendering.\n */\n renderTag?(tag: JSDocTag): string | undefined\n /**\n * Custom link rendering function. Accepts a link target and a display value for the link.\n * Return a markdown formatted link with the format `[$display]($link)` or `undefined` if the link is not a valid target.\n */\n renderLink?(link: string, display: string): string | undefined\n}\n\n/**\n * Parses a JSDoc from a `CstNode` containing a comment.\n *\n * @param node A `CstNode` from a parsed Langium document.\n * @param options Parsing options specialized to your language. See {@link JSDocParseOptions}.\n */\nexport function parseJSDoc(node: CstNode, options?: JSDocParseOptions): JSDocComment;\n/**\n * Parses a JSDoc from a string comment.\n *\n * @param content A string containing the source of the JSDoc comment.\n * @param start The start position the comment occupies in the source document.\n * @param options Parsing options specialized to your language. See {@link JSDocParseOptions}.\n */\nexport function parseJSDoc(content: string, start?: Position, options?: JSDocParseOptions): JSDocComment;\nexport function parseJSDoc(node: CstNode | string, start?: Position | JSDocParseOptions, options?: JSDocParseOptions): JSDocComment {\n let opts: JSDocParseOptions | undefined;\n let position: Position | undefined;\n if (typeof node === 'string') {\n position = start as Position | undefined;\n opts = options as JSDocParseOptions | undefined;\n } else {\n position = node.range.start;\n opts = start as JSDocParseOptions | undefined;\n }\n if (!position) {\n position = Position.create(0, 0);\n }\n\n const lines = getLines(node);\n const normalizedOptions = normalizeOptions(opts);\n\n const tokens = tokenize({\n lines,\n position,\n options: normalizedOptions\n });\n\n return parseJSDocComment({\n index: 0,\n tokens,\n position\n });\n}\n\nexport function isJSDoc(node: CstNode | string, options?: JSDocParseOptions): boolean {\n const normalizedOptions = normalizeOptions(options);\n const lines = getLines(node);\n if (lines.length === 0) {\n return false;\n }\n\n const first = lines[0];\n const last = lines[lines.length - 1];\n const firstRegex = normalizedOptions.start;\n const lastRegex = normalizedOptions.end;\n\n return Boolean(firstRegex?.exec(first)) && Boolean(lastRegex?.exec(last));\n}\n\nfunction getLines(node: CstNode | string): string[] {\n let content = '';\n if (typeof node === 'string') {\n content = node;\n } else {\n content = node.text;\n }\n const lines = content.split(NEWLINE_REGEXP);\n return lines;\n}\n\n// Tokenization\n\ninterface JSDocToken {\n type: 'text' | 'tag' | 'inline-tag' | 'break'\n content: string\n range: Range\n}\n\nconst tagRegex = /\\s*(@([\\p{L}][\\p{L}\\p{N}]*)?)/uy;\nconst inlineTagRegex = /\\{(@[\\p{L}][\\p{L}\\p{N}]*)(\\s*)([^\\r\\n}]+)?\\}/gu;\n\nfunction tokenize(context: TokenizationContext): JSDocToken[] {\n const tokens: JSDocToken[] = [];\n let currentLine = context.position.line;\n let currentCharacter = context.position.character;\n for (let i = 0; i < context.lines.length; i++) {\n const first = i === 0;\n const last = i === context.lines.length - 1;\n let line = context.lines[i];\n let index = 0;\n\n if (first && context.options.start) {\n const match = context.options.start?.exec(line);\n if (match) {\n index = match.index + match[0].length;\n }\n } else {\n const match = context.options.line?.exec(line);\n if (match) {\n index = match.index + match[0].length;\n }\n }\n if (last) {\n const match = context.options.end?.exec(line);\n if (match) {\n line = line.substring(0, match.index);\n }\n }\n\n line = line.substring(0, lastCharacter(line));\n const whitespaceEnd = skipWhitespace(line, index);\n\n if (whitespaceEnd >= line.length) {\n // Only create a break token when we already have previous tokens\n if (tokens.length > 0) {\n const position = Position.create(currentLine, currentCharacter);\n tokens.push({\n type: 'break',\n content: '',\n range: Range.create(position, position)\n });\n }\n } else {\n tagRegex.lastIndex = index;\n const tagMatch = tagRegex.exec(line);\n if (tagMatch) {\n const fullMatch = tagMatch[0];\n const value = tagMatch[1];\n const start = Position.create(currentLine, currentCharacter + index);\n const end = Position.create(currentLine, currentCharacter + index + fullMatch.length);\n tokens.push({\n type: 'tag',\n content: value,\n range: Range.create(start, end)\n });\n index += fullMatch.length;\n index = skipWhitespace(line, index);\n }\n\n if (index < line.length) {\n const rest = line.substring(index);\n const inlineTagMatches = Array.from(rest.matchAll(inlineTagRegex));\n tokens.push(...buildInlineTokens(inlineTagMatches, rest, currentLine, currentCharacter + index));\n }\n }\n\n currentLine++;\n currentCharacter = 0;\n }\n\n // Remove last break token if there is one\n if (tokens.length > 0 && tokens[tokens.length - 1].type === 'break') {\n return tokens.slice(0, -1);\n }\n\n return tokens;\n}\n\nfunction buildInlineTokens(tags: RegExpMatchArray[], line: string, lineIndex: number, characterIndex: number): JSDocToken[] {\n const tokens: JSDocToken[] = [];\n\n if (tags.length === 0) {\n const start = Position.create(lineIndex, characterIndex);\n const end = Position.create(lineIndex, characterIndex + line.length);\n tokens.push({\n type: 'text',\n content: line,\n range: Range.create(start, end)\n });\n } else {\n let lastIndex = 0;\n for (const match of tags) {\n const matchIndex = match.index!;\n const startContent = line.substring(lastIndex, matchIndex);\n if (startContent.length > 0) {\n tokens.push({\n type: 'text',\n content: line.substring(lastIndex, matchIndex),\n range: Range.create(\n Position.create(lineIndex, lastIndex + characterIndex),\n Position.create(lineIndex, matchIndex + characterIndex)\n )\n });\n }\n let offset = startContent.length + 1;\n const tagName = match[1];\n tokens.push({\n type: 'inline-tag',\n content: tagName,\n range: Range.create(\n Position.create(lineIndex, lastIndex + offset + characterIndex),\n Position.create(lineIndex, lastIndex + offset + tagName.length + characterIndex)\n )\n });\n offset += tagName.length;\n if (match.length === 4) {\n offset += match[2].length;\n const value = match[3];\n tokens.push({\n type: 'text',\n content: value,\n range: Range.create(\n Position.create(lineIndex, lastIndex + offset + characterIndex),\n Position.create(lineIndex, lastIndex + offset + value.length + characterIndex)\n )\n });\n } else {\n tokens.push({\n type: 'text',\n content: '',\n range: Range.create(\n Position.create(lineIndex, lastIndex + offset + characterIndex),\n Position.create(lineIndex, lastIndex + offset + characterIndex)\n )\n });\n }\n lastIndex = matchIndex + match[0].length;\n }\n const endContent = line.substring(lastIndex);\n if (endContent.length > 0) {\n tokens.push({\n type: 'text',\n content: endContent,\n range: Range.create(\n Position.create(lineIndex, lastIndex + characterIndex),\n Position.create(lineIndex, lastIndex + characterIndex + endContent.length)\n )\n });\n }\n }\n\n return tokens;\n}\n\nconst nonWhitespaceRegex = /\\S/;\nconst whitespaceEndRegex = /\\s*$/;\n\nfunction skipWhitespace(line: string, index: number): number {\n const match = line.substring(index).match(nonWhitespaceRegex);\n if (match) {\n return index + match.index!;\n } else {\n return line.length;\n }\n}\n\nfunction lastCharacter(line: string): number | undefined {\n const match = line.match(whitespaceEndRegex);\n if (match && typeof match.index === 'number') {\n return match.index;\n }\n return undefined;\n}\n\n// Parsing\n\nfunction parseJSDocComment(context: ParseContext): JSDocComment {\n const startPosition: Position = Position.create(context.position.line, context.position.character);\n if (context.tokens.length === 0) {\n return new JSDocCommentImpl([], Range.create(startPosition, startPosition));\n }\n const elements: JSDocElement[] = [];\n while (context.index < context.tokens.length) {\n const element = parseJSDocElement(context, elements[elements.length - 1]);\n if (element) {\n elements.push(element);\n }\n }\n const start = elements[0]?.range.start ?? startPosition;\n const end = elements[elements.length - 1]?.range.end ?? startPosition;\n return new JSDocCommentImpl(elements, Range.create(start, end));\n}\n\nfunction parseJSDocElement(context: ParseContext, last?: JSDocElement): JSDocElement | undefined {\n const next = context.tokens[context.index];\n if (next.type === 'tag') {\n return parseJSDocTag(context, false);\n } else if (next.type === 'text' || next.type === 'inline-tag') {\n return parseJSDocText(context);\n } else {\n appendEmptyLine(next, last);\n context.index++;\n return undefined;\n }\n}\n\nfunction appendEmptyLine(token: JSDocToken, element?: JSDocElement): void {\n if (element) {\n const line = new JSDocLineImpl('', token.range);\n if ('inlines' in element) {\n element.inlines.push(line);\n } else {\n element.content.inlines.push(line);\n }\n }\n}\n\nfunction parseJSDocText(context: ParseContext): JSDocParagraph {\n let token = context.tokens[context.index];\n const firstToken = token;\n let lastToken = token;\n const lines: JSDocInline[] = [];\n while (token && token.type !== 'break' && token.type !== 'tag') {\n lines.push(parseJSDocInline(context));\n lastToken = token;\n token = context.tokens[context.index];\n }\n return new JSDocTextImpl(lines, Range.create(firstToken.range.start, lastToken.range.end));\n}\n\nfunction parseJSDocInline(context: ParseContext): JSDocInline {\n const token = context.tokens[context.index];\n if (token.type === 'inline-tag') {\n return parseJSDocTag(context, true);\n } else {\n return parseJSDocLine(context);\n }\n}\n\nfunction parseJSDocTag(context: ParseContext, inline: boolean): JSDocTag {\n const tagToken = context.tokens[context.index++];\n const name = tagToken.content.substring(1);\n const nextToken = context.tokens[context.index];\n if (nextToken?.type === 'text') {\n if (inline) {\n const docLine = parseJSDocLine(context);\n return new JSDocTagImpl(\n name,\n new JSDocTextImpl([docLine], docLine.range),\n inline,\n Range.create(tagToken.range.start, docLine.range.end)\n );\n } else {\n const textDoc = parseJSDocText(context);\n return new JSDocTagImpl(\n name,\n textDoc,\n inline,\n Range.create(tagToken.range.start, textDoc.range.end)\n );\n }\n } else {\n const range = tagToken.range;\n return new JSDocTagImpl(name, new JSDocTextImpl([], range), inline, range);\n }\n}\n\nfunction parseJSDocLine(context: ParseContext): JSDocLine {\n const token = context.tokens[context.index++];\n return new JSDocLineImpl(token.content, token.range);\n}\n\ninterface NormalizedOptions {\n start?: RegExp\n end?: RegExp\n line?: RegExp\n}\n\ninterface TokenizationContext {\n position: Position\n lines: string[]\n options: NormalizedOptions\n}\n\ninterface ParseContext {\n position: Position\n tokens: JSDocToken[]\n index: number\n}\n\nfunction normalizeOptions(options?: JSDocParseOptions): NormalizedOptions {\n if (!options) {\n return normalizeOptions({\n start: '/**',\n end: '*/',\n line: '*'\n });\n }\n const { start, end, line } = options;\n return {\n start: normalizeOption(start, true),\n end: normalizeOption(end, false),\n line: normalizeOption(line, true)\n };\n}\n\nfunction normalizeOption(option: RegExp | string | undefined, start: boolean): RegExp | undefined {\n if (typeof option === 'string' || typeof option === 'object') {\n const escaped = typeof option === 'string' ? escapeRegExp(option) : option.source;\n if (start) {\n return new RegExp(`^\\\\s*${escaped}`);\n } else {\n return new RegExp(`\\\\s*${escaped}\\\\s*$`);\n }\n } else {\n return option;\n }\n}\n\nclass JSDocCommentImpl implements JSDocComment {\n\n readonly elements: JSDocElement[];\n readonly range: Range;\n\n constructor(elements: JSDocElement[], range: Range) {\n this.elements = elements;\n this.range = range;\n }\n\n getTag(name: string): JSDocTag | undefined {\n return this.getAllTags().find(e => e.name === name);\n }\n\n getTags(name: string): JSDocTag[] {\n return this.getAllTags().filter(e => e.name === name);\n }\n\n private getAllTags(): JSDocTag[] {\n return this.elements.filter((e): e is JSDocTag => 'name' in e);\n }\n\n toString(): string {\n let value = '';\n for (const element of this.elements) {\n if (value.length === 0) {\n value = element.toString();\n } else {\n const text = element.toString();\n value += fillNewlines(value) + text;\n }\n }\n return value.trim();\n }\n\n toMarkdown(options?: JSDocRenderOptions): string {\n let value = '';\n for (const element of this.elements) {\n if (value.length === 0) {\n value = element.toMarkdown(options);\n } else {\n const text = element.toMarkdown(options);\n value += fillNewlines(value) + text;\n }\n }\n return value.trim();\n }\n}\n\nclass JSDocTagImpl implements JSDocTag {\n name: string;\n content: JSDocParagraph;\n range: Range;\n inline: boolean;\n\n constructor(name: string, content: JSDocParagraph, inline: boolean, range: Range) {\n this.name = name;\n this.content = content;\n this.inline = inline;\n this.range = range;\n }\n\n toString(): string {\n let text = `@${this.name}`;\n const content = this.content.toString();\n if (this.content.inlines.length === 1) {\n text = `${text} ${content}`;\n } else if (this.content.inlines.length > 1) {\n text = `${text}\\n${content}`;\n }\n if (this.inline) {\n // Inline tags are surrounded by curly braces\n return `{${text}}`;\n } else {\n return text;\n }\n }\n\n toMarkdown(options?: JSDocRenderOptions): string {\n return options?.renderTag?.(this) ?? this.toMarkdownDefault(options);\n }\n\n private toMarkdownDefault(options?: JSDocRenderOptions): string {\n const content = this.content.toMarkdown(options);\n if (this.inline) {\n const rendered = renderInlineTag(this.name, content, options ?? {});\n if (typeof rendered === 'string') {\n return rendered;\n }\n }\n let marker = '';\n if (options?.tag === 'italic' || options?.tag === undefined) {\n marker = '*';\n } else if (options?.tag === 'bold') {\n marker = '**';\n } else if (options?.tag === 'bold-italic') {\n marker = '***';\n }\n let text = `${marker}@${this.name}${marker}`;\n if (this.content.inlines.length === 1) {\n text = `${text} \u2014 ${content}`;\n } else if (this.content.inlines.length > 1) {\n text = `${text}\\n${content}`;\n }\n if (this.inline) {\n // Inline tags are surrounded by curly braces\n return `{${text}}`;\n } else {\n return text;\n }\n }\n}\n\nfunction renderInlineTag(tag: string, content: string, options: JSDocRenderOptions): string | undefined {\n if (tag === 'linkplain' || tag === 'linkcode' || tag === 'link') {\n const index = content.indexOf(' ');\n let display = content;\n if (index > 0) {\n const displayStart = skipWhitespace(content, index);\n display = content.substring(displayStart);\n content = content.substring(0, index);\n }\n if (tag === 'linkcode' || (tag === 'link' && options.link === 'code')) {\n // Surround the display value in a markdown inline code block\n display = `\\`${display}\\``;\n }\n const renderedLink = options.renderLink?.(content, display) ?? renderLinkDefault(content, display);\n return renderedLink;\n }\n return undefined;\n}\n\nfunction renderLinkDefault(content: string, display: string): string {\n try {\n URI.parse(content, true);\n return `[${display}](${content})`;\n } catch {\n return content;\n }\n}\n\nclass JSDocTextImpl implements JSDocParagraph {\n inlines: JSDocInline[];\n range: Range;\n\n constructor(lines: JSDocInline[], range: Range) {\n this.inlines = lines;\n this.range = range;\n }\n\n toString(): string {\n let text = '';\n for (let i = 0; i < this.inlines.length; i++) {\n const inline = this.inlines[i];\n const next = this.inlines[i + 1];\n text += inline.toString();\n if (next && next.range.start.line > inline.range.start.line) {\n text += '\\n';\n }\n }\n return text;\n }\n\n toMarkdown(options?: JSDocRenderOptions): string {\n let text = '';\n for (let i = 0; i < this.inlines.length; i++) {\n const inline = this.inlines[i];\n const next = this.inlines[i + 1];\n text += inline.toMarkdown(options);\n if (next && next.range.start.line > inline.range.start.line) {\n text += '\\n';\n }\n }\n return text;\n }\n}\n\nclass JSDocLineImpl implements JSDocLine {\n text: string;\n range: Range;\n\n constructor(text: string, range: Range) {\n this.text = text;\n this.range = range;\n }\n\n toString(): string {\n return this.text;\n }\n toMarkdown(): string {\n return this.text;\n }\n\n}\n\nfunction fillNewlines(text: string): string {\n if (text.endsWith('\\n')) {\n return '\\n';\n } else {\n return '\\n\\n';\n }\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode, AstNodeDescription } from '../syntax-tree.js';\nimport type { IndexManager } from '../workspace/index-manager.js';\nimport type { CommentProvider } from './comment-provider.js';\nimport type { JSDocTag } from './jsdoc.js';\nimport { getDocument } from '../utils/ast-utils.js';\nimport { isJSDoc, parseJSDoc } from './jsdoc.js';\n\n/**\n * Provides documentation for AST nodes.\n */\nexport interface DocumentationProvider {\n /**\n * Returns a markdown documentation string for the specified AST node.\n *\n * The default implementation `JSDocDocumentationProvider` will inspect the comment associated with the specified node.\n */\n getDocumentation(node: AstNode): string | undefined;\n}\n\nexport class JSDocDocumentationProvider implements DocumentationProvider {\n\n protected readonly indexManager: IndexManager;\n protected readonly commentProvider: CommentProvider;\n\n constructor(services: LangiumCoreServices) {\n this.indexManager = services.shared.workspace.IndexManager;\n this.commentProvider = services.documentation.CommentProvider;\n }\n\n getDocumentation(node: AstNode): string | undefined {\n const comment = this.commentProvider.getComment(node);\n if (comment && isJSDoc(comment)) {\n const parsedJSDoc = parseJSDoc(comment);\n return parsedJSDoc.toMarkdown({\n renderLink: (link, display) => {\n return this.documentationLinkRenderer(node, link, display);\n },\n renderTag: (tag) => {\n return this.documentationTagRenderer(node, tag);\n }\n });\n }\n return undefined;\n }\n\n protected documentationLinkRenderer(node: AstNode, name: string, display: string): string | undefined {\n const description = this.findNameInPrecomputedScopes(node, name) ?? this.findNameInGlobalScope(node, name);\n if (description && description.nameSegment) {\n const line = description.nameSegment.range.start.line + 1;\n const character = description.nameSegment.range.start.character + 1;\n const uri = description.documentUri.with({ fragment: `L${line},${character}` });\n return `[${display}](${uri.toString()})`;\n } else {\n return undefined;\n }\n }\n\n protected documentationTagRenderer(_node: AstNode, _tag: JSDocTag): string | undefined {\n // Fall back to the default tag rendering\n return undefined;\n }\n\n protected findNameInPrecomputedScopes(node: AstNode, name: string): AstNodeDescription | undefined {\n const document = getDocument(node);\n const precomputed = document.precomputedScopes;\n if (!precomputed) {\n return undefined;\n }\n let currentNode: AstNode | undefined = node;\n do {\n const allDescriptions = precomputed.get(currentNode);\n const description = allDescriptions.find(e => e.name === name);\n if (description) {\n return description;\n }\n currentNode = currentNode.$container;\n } while (currentNode);\n\n return undefined;\n }\n\n protected findNameInGlobalScope(node: AstNode, name: string): AstNodeDescription | undefined {\n const description = this.indexManager.allElements().find(e => e.name === name);\n return description;\n }\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { GrammarConfig } from '../languages/grammar-config.js';\nimport { isAstNodeWithComment } from '../serializer/json-serializer.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport { findCommentNode } from '../utils/cst-utils.js';\n\n/**\n * Provides comments for AST nodes.\n */\nexport interface CommentProvider {\n /**\n * Returns the comment associated with the specified AST node.\n * @param node The AST node to get the comment for.\n * @returns The comment associated with the specified AST node or `undefined` if there is no comment.\n */\n getComment(node: AstNode): string | undefined;\n}\n\nexport class DefaultCommentProvider implements CommentProvider {\n protected readonly grammarConfig: () => GrammarConfig;\n constructor(services: LangiumCoreServices) {\n this.grammarConfig = () => services.parser.GrammarConfig;\n }\n getComment(node: AstNode): string | undefined {\n if(isAstNodeWithComment(node)) {\n return node.$comment;\n }\n return findCommentNode(node.$cstNode, this.grammarConfig().multilineCommentRules)?.text;\n }\n}\n", "/******************************************************************************\n * Copyright 2024 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n// eslint-disable-next-line no-restricted-imports\nexport * from 'vscode-jsonrpc/lib/common/events.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { CancellationToken } from '../utils/cancellation.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { AstNode } from '../syntax-tree.js';\nimport type { LangiumParser, ParseResult } from './langium-parser.js';\nimport type { Hydrator } from '../serializer/hydrator.js';\nimport type { Event } from '../utils/event.js';\nimport { Deferred, OperationCancelled } from '../utils/promise-utils.js';\nimport { Emitter } from '../utils/event.js';\n\n/**\n * Async parser that allows to cancel the current parsing process.\n * The sync parser implementation is blocking the event loop, which can become quite problematic for large files.\n *\n * Note that the default implementation is not actually async. It just wraps the sync parser in a promise.\n * A real implementation would create worker threads or web workers to offload the parsing work.\n */\nexport interface AsyncParser {\n parse(text: string, cancelToken: CancellationToken): Promise>;\n}\n\n/**\n * Default implementation of the async parser. This implementation only wraps the sync parser in a promise.\n *\n * A real implementation would create worker threads or web workers to offload the parsing work.\n */\nexport class DefaultAsyncParser implements AsyncParser {\n\n protected readonly syncParser: LangiumParser;\n\n constructor(services: LangiumCoreServices) {\n this.syncParser = services.parser.LangiumParser;\n }\n\n parse(text: string): Promise> {\n return Promise.resolve(this.syncParser.parse(text));\n }\n}\n\nexport abstract class AbstractThreadedAsyncParser implements AsyncParser {\n\n /**\n * The thread count determines how many threads are used to parse files in parallel.\n * The default value is 8. Decreasing this value increases startup performance, but decreases parallel parsing performance.\n */\n protected threadCount = 8;\n /**\n * The termination delay determines how long the parser waits for a thread to finish after a cancellation request.\n * The default value is 200(ms).\n */\n protected terminationDelay = 200;\n protected workerPool: ParserWorker[] = [];\n protected queue: Array> = [];\n\n protected readonly hydrator: Hydrator;\n\n constructor(services: LangiumCoreServices) {\n this.hydrator = services.serializer.Hydrator;\n }\n\n protected initializeWorkers(): void {\n while (this.workerPool.length < this.threadCount) {\n const worker = this.createWorker();\n worker.onReady(() => {\n if (this.queue.length > 0) {\n const deferred = this.queue.shift();\n if (deferred) {\n worker.lock();\n deferred.resolve(worker);\n }\n }\n });\n this.workerPool.push(worker);\n }\n }\n\n async parse(text: string, cancelToken: CancellationToken): Promise> {\n const worker = await this.acquireParserWorker(cancelToken);\n const deferred = new Deferred>();\n let timeout: NodeJS.Timeout | undefined;\n // If the cancellation token is requested, we wait for a certain time before terminating the worker.\n // Since the cancellation token lives longer than the parsing process, we need to dispose the event listener.\n // Otherwise, we might accidentally terminate the worker after the parsing process has finished.\n const cancellation = cancelToken.onCancellationRequested(() => {\n timeout = setTimeout(() => {\n this.terminateWorker(worker);\n }, this.terminationDelay);\n });\n worker.parse(text).then(result => {\n const hydrated = this.hydrator.hydrate(result);\n deferred.resolve(hydrated);\n }).catch(err => {\n deferred.reject(err);\n }).finally(() => {\n cancellation.dispose();\n clearTimeout(timeout);\n });\n return deferred.promise;\n }\n\n protected terminateWorker(worker: ParserWorker): void {\n worker.terminate();\n const index = this.workerPool.indexOf(worker);\n if (index >= 0) {\n this.workerPool.splice(index, 1);\n }\n }\n\n protected async acquireParserWorker(cancelToken: CancellationToken): Promise {\n this.initializeWorkers();\n for (const worker of this.workerPool) {\n if (worker.ready) {\n worker.lock();\n return worker;\n }\n }\n const deferred = new Deferred();\n cancelToken.onCancellationRequested(() => {\n const index = this.queue.indexOf(deferred);\n if (index >= 0) {\n this.queue.splice(index, 1);\n }\n deferred.reject(OperationCancelled);\n });\n this.queue.push(deferred);\n return deferred.promise;\n }\n\n protected abstract createWorker(): ParserWorker;\n}\n\nexport type WorkerMessagePost = (message: unknown) => void;\nexport type WorkerMessageCallback = (cb: (message: unknown) => void) => void;\n\nexport class ParserWorker {\n\n protected readonly sendMessage: WorkerMessagePost;\n protected readonly _terminate: () => void;\n protected readonly onReadyEmitter = new Emitter();\n\n protected deferred = new Deferred();\n protected _ready = true;\n protected _parsing = false;\n\n get ready(): boolean {\n return this._ready;\n }\n\n get onReady(): Event {\n return this.onReadyEmitter.event;\n }\n\n constructor(sendMessage: WorkerMessagePost, onMessage: WorkerMessageCallback, onError: WorkerMessageCallback, terminate: () => void) {\n this.sendMessage = sendMessage;\n this._terminate = terminate;\n onMessage(result => {\n const parseResult = result as ParseResult;\n this.deferred.resolve(parseResult);\n this.unlock();\n });\n onError(error => {\n this.deferred.reject(error);\n this.unlock();\n });\n }\n\n terminate(): void {\n this.deferred.reject(OperationCancelled);\n this._terminate();\n }\n\n lock(): void {\n this._ready = false;\n }\n\n unlock(): void {\n this._parsing = false;\n this._ready = true;\n this.onReadyEmitter.fire();\n }\n\n parse(text: string): Promise {\n if (this._parsing) {\n throw new Error('Parser worker is busy');\n }\n this._parsing = true;\n this.deferred = new Deferred();\n this.sendMessage(text);\n return this.deferred.promise;\n }\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { CancellationToken, CancellationTokenSource } from '../utils/cancellation.js';\nimport { Deferred, isOperationCancelled, type MaybePromise } from '../utils/promise-utils.js';\n\n/**\n * Utility service to execute mutually exclusive actions.\n */\nexport interface WorkspaceLock {\n /**\n * Performs a single async action, like initializing the workspace or processing document changes.\n * Only one action will be executed at a time.\n *\n * When another action is queued up, the token provided for the action will be cancelled.\n * Assuming the action makes use of this token, the next action only has to wait for the current action to finish cancellation.\n */\n write(action: (token: CancellationToken) => MaybePromise): Promise;\n\n /**\n * Performs a single action, like computing completion results or providing workspace symbols.\n * Read actions will only be executed after all write actions have finished. They will be executed in parallel if possible.\n *\n * If a write action is currently running, the read action will be queued up and executed afterwards.\n * If a new write action is queued up while a read action is waiting, the write action will receive priority and will be handled before the read action.\n *\n * Note that read actions are not allowed to modify anything in the workspace. Please use {@link write} instead.\n */\n read(action: () => MaybePromise): Promise;\n\n /**\n * Cancels the last queued write action. All previous write actions already have been cancelled.\n */\n cancelWrite(): void;\n}\n\ntype LockAction = (token: CancellationToken) => MaybePromise;\n\ninterface LockEntry {\n action: LockAction;\n deferred: Deferred;\n cancellationToken: CancellationToken;\n}\n\nexport class DefaultWorkspaceLock implements WorkspaceLock {\n\n private previousTokenSource = new CancellationTokenSource();\n private writeQueue: LockEntry[] = [];\n private readQueue: LockEntry[] = [];\n private done = true;\n\n write(action: (token: CancellationToken) => MaybePromise): Promise {\n this.cancelWrite();\n const tokenSource = new CancellationTokenSource();\n this.previousTokenSource = tokenSource;\n return this.enqueue(this.writeQueue, action, tokenSource.token);\n }\n\n read(action: () => MaybePromise): Promise {\n return this.enqueue(this.readQueue, action);\n }\n\n private enqueue(queue: LockEntry[], action: LockAction, cancellationToken?: CancellationToken): Promise {\n const deferred = new Deferred();\n const entry: LockEntry = {\n action,\n deferred,\n cancellationToken: cancellationToken ?? CancellationToken.None\n };\n queue.push(entry);\n this.performNextOperation();\n return deferred.promise as Promise;\n }\n\n private async performNextOperation(): Promise {\n if (!this.done) {\n return;\n }\n const entries: LockEntry[] = [];\n if (this.writeQueue.length > 0) {\n // Just perform the next write action\n entries.push(this.writeQueue.shift()!);\n } else if (this.readQueue.length > 0) {\n // Empty the read queue and perform all actions in parallel\n entries.push(...this.readQueue.splice(0, this.readQueue.length));\n } else {\n return;\n }\n this.done = false;\n await Promise.all(entries.map(async ({ action, deferred, cancellationToken }) => {\n try {\n // Move the execution of the action to the next event loop tick via `Promise.resolve()`\n const result = await Promise.resolve().then(() => action(cancellationToken));\n deferred.resolve(result);\n } catch (err) {\n if (isOperationCancelled(err)) {\n // If the operation was cancelled, we don't want to reject the promise\n deferred.resolve(undefined);\n } else {\n deferred.reject(err);\n }\n }\n }));\n this.done = true;\n this.performNextOperation();\n }\n\n cancelWrite(): void {\n this.previousTokenSource.cancel();\n }\n}\n", "/******************************************************************************\n * Copyright 2024 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { TokenType } from 'chevrotain';\nimport { CompositeCstNodeImpl, LeafCstNodeImpl, RootCstNodeImpl } from '../parser/cst-node-builder.js';\nimport { isAbstractElement, type AbstractElement, type Grammar } from '../languages/generated/ast.js';\nimport type { Linker } from '../references/linker.js';\nimport type { Lexer } from '../parser/lexer.js';\nimport type { LangiumCoreServices } from '../services.js';\nimport type { ParseResult } from '../parser/langium-parser.js';\nimport type { Reference, AstNode, CstNode, LeafCstNode, GenericAstNode, Mutable, RootCstNode } from '../syntax-tree.js';\nimport { isRootCstNode, isCompositeCstNode, isLeafCstNode, isAstNode, isReference } from '../syntax-tree.js';\nimport { streamAst } from '../utils/ast-utils.js';\nimport { BiMap } from '../utils/collections.js';\nimport { streamCst } from '../utils/cst-utils.js';\n\n/**\n * The hydrator service is responsible for allowing AST parse results to be sent across worker threads.\n */\nexport interface Hydrator {\n /**\n * Converts a parse result to a plain object. The resulting object can be sent across worker threads.\n */\n dehydrate(result: ParseResult): ParseResult;\n /**\n * Converts a plain object to a parse result. The included AST node can then be used in the main thread.\n * Calling this method on objects that have not been dehydrated first will result in undefined behavior.\n */\n hydrate(result: ParseResult): ParseResult;\n}\n\nexport interface DehydrateContext {\n astNodes: Map;\n cstNodes: Map;\n}\n\nexport interface HydrateContext {\n astNodes: Map;\n cstNodes: Map;\n}\n\nexport class DefaultHydrator implements Hydrator {\n\n protected readonly grammar: Grammar;\n protected readonly lexer: Lexer;\n protected readonly linker: Linker;\n\n protected readonly grammarElementIdMap = new BiMap();\n protected readonly tokenTypeIdMap = new BiMap();\n\n constructor(services: LangiumCoreServices) {\n this.grammar = services.Grammar;\n this.lexer = services.parser.Lexer;\n this.linker = services.references.Linker;\n }\n\n dehydrate(result: ParseResult): ParseResult {\n return {\n // We need to create shallow copies of the errors\n // The original errors inherit from the `Error` class, which is not transferable across worker threads\n lexerErrors: result.lexerErrors.map(e => ({ ...e })),\n parserErrors: result.parserErrors.map(e => ({ ...e })),\n value: this.dehydrateAstNode(result.value, this.createDehyrationContext(result.value))\n };\n }\n\n protected createDehyrationContext(node: AstNode): DehydrateContext {\n const astNodes = new Map();\n const cstNodes = new Map();\n for (const astNode of streamAst(node)) {\n astNodes.set(astNode, {});\n }\n if (node.$cstNode) {\n for (const cstNode of streamCst(node.$cstNode)) {\n cstNodes.set(cstNode, {});\n }\n }\n return {\n astNodes,\n cstNodes\n };\n }\n\n protected dehydrateAstNode(node: AstNode, context: DehydrateContext): object {\n const obj = context.astNodes.get(node) as Record;\n obj.$type = node.$type;\n obj.$containerIndex = node.$containerIndex;\n obj.$containerProperty = node.$containerProperty;\n if (node.$cstNode !== undefined) {\n obj.$cstNode = this.dehydrateCstNode(node.$cstNode, context);\n }\n for (const [name, value] of Object.entries(node)) {\n if (name.startsWith('$')) {\n continue;\n }\n if (Array.isArray(value)) {\n const arr: any[] = [];\n obj[name] = arr;\n for (const item of value) {\n if (isAstNode(item)) {\n arr.push(this.dehydrateAstNode(item, context));\n } else if (isReference(item)) {\n arr.push(this.dehydrateReference(item, context));\n } else {\n arr.push(item);\n }\n }\n } else if (isAstNode(value)) {\n obj[name] = this.dehydrateAstNode(value, context);\n } else if (isReference(value)) {\n obj[name] = this.dehydrateReference(value, context);\n } else if (value !== undefined) {\n obj[name] = value;\n }\n }\n return obj;\n }\n\n protected dehydrateReference(reference: Reference, context: DehydrateContext): any {\n const obj: Record = {};\n obj.$refText = reference.$refText;\n if (reference.$refNode) {\n obj.$refNode = context.cstNodes.get(reference.$refNode);\n }\n return obj;\n }\n\n protected dehydrateCstNode(node: CstNode, context: DehydrateContext): any {\n const cstNode = context.cstNodes.get(node) as Record;\n if (isRootCstNode(node)) {\n cstNode.fullText = node.fullText;\n } else {\n // Note: This returns undefined for hidden nodes (i.e. comments)\n cstNode.grammarSource = this.getGrammarElementId(node.grammarSource);\n }\n cstNode.hidden = node.hidden;\n cstNode.astNode = context.astNodes.get(node.astNode);\n if (isCompositeCstNode(node)) {\n cstNode.content = node.content.map(child => this.dehydrateCstNode(child, context));\n } else if (isLeafCstNode(node)) {\n cstNode.tokenType = node.tokenType.name;\n cstNode.offset = node.offset;\n cstNode.length = node.length;\n cstNode.startLine = node.range.start.line;\n cstNode.startColumn = node.range.start.character;\n cstNode.endLine = node.range.end.line;\n cstNode.endColumn = node.range.end.character;\n }\n return cstNode;\n }\n\n hydrate(result: ParseResult): ParseResult {\n const node = result.value;\n const context = this.createHydrationContext(node);\n if ('$cstNode' in node) {\n this.hydrateCstNode(node.$cstNode, context);\n }\n return {\n lexerErrors: result.lexerErrors,\n parserErrors: result.parserErrors,\n value: this.hydrateAstNode(node, context) as T\n };\n }\n\n protected createHydrationContext(node: any): HydrateContext {\n const astNodes = new Map();\n const cstNodes = new Map();\n for (const astNode of streamAst(node)) {\n astNodes.set(astNode, {} as AstNode);\n }\n let root: RootCstNode;\n if (node.$cstNode) {\n for (const cstNode of streamCst(node.$cstNode)) {\n let cst: Mutable | undefined;\n if ('fullText' in cstNode) {\n cst = new RootCstNodeImpl(cstNode.fullText as string);\n root = cst as RootCstNode;\n } else if ('content' in cstNode) {\n cst = new CompositeCstNodeImpl();\n } else if ('tokenType' in cstNode) {\n cst = this.hydrateCstLeafNode(cstNode);\n }\n if (cst) {\n cstNodes.set(cstNode, cst);\n cst.root = root!;\n }\n }\n }\n return {\n astNodes,\n cstNodes\n };\n }\n\n protected hydrateAstNode(node: any, context: HydrateContext): AstNode {\n const astNode = context.astNodes.get(node) as Mutable;\n astNode.$type = node.$type;\n astNode.$containerIndex = node.$containerIndex;\n astNode.$containerProperty = node.$containerProperty;\n if (node.$cstNode) {\n astNode.$cstNode = context.cstNodes.get(node.$cstNode);\n }\n for (const [name, value] of Object.entries(node)) {\n if (name.startsWith('$')) {\n continue;\n }\n if (Array.isArray(value)) {\n const arr: unknown[] = [];\n astNode[name] = arr;\n for (const item of value) {\n if (isAstNode(item)) {\n arr.push(this.setParent(this.hydrateAstNode(item, context), astNode));\n } else if (isReference(item)) {\n arr.push(this.hydrateReference(item, astNode, name, context));\n } else {\n arr.push(item);\n }\n }\n } else if (isAstNode(value)) {\n astNode[name] = this.setParent(this.hydrateAstNode(value, context), astNode);\n } else if (isReference(value)) {\n astNode[name] = this.hydrateReference(value, astNode, name, context);\n } else if (value !== undefined) {\n astNode[name] = value;\n }\n }\n return astNode;\n }\n\n protected setParent(node: any, parent: any): any {\n node.$container = parent as AstNode;\n return node;\n }\n\n protected hydrateReference(reference: any, node: AstNode, name: string, context: HydrateContext): Reference {\n return this.linker.buildReference(node, name, context.cstNodes.get(reference.$refNode)!, reference.$refText);\n }\n\n protected hydrateCstNode(cstNode: any, context: HydrateContext, num = 0): CstNode {\n const cstNodeObj = context.cstNodes.get(cstNode) as Mutable;\n if (typeof cstNode.grammarSource === 'number') {\n cstNodeObj.grammarSource = this.getGrammarElement(cstNode.grammarSource);\n }\n cstNodeObj.astNode = context.astNodes.get(cstNode.astNode)!;\n if (isCompositeCstNode(cstNodeObj)) {\n for (const child of cstNode.content) {\n const hydrated = this.hydrateCstNode(child, context, num++);\n cstNodeObj.content.push(hydrated);\n }\n }\n return cstNodeObj;\n }\n\n protected hydrateCstLeafNode(cstNode: any): LeafCstNode {\n const tokenType = this.getTokenType(cstNode.tokenType);\n const offset = cstNode.offset;\n const length = cstNode.length;\n const startLine = cstNode.startLine;\n const startColumn = cstNode.startColumn;\n const endLine = cstNode.endLine;\n const endColumn = cstNode.endColumn;\n const hidden = cstNode.hidden;\n const node = new LeafCstNodeImpl(\n offset,\n length,\n {\n start: {\n line: startLine,\n character: startColumn\n },\n end: {\n line: endLine,\n character: endColumn\n }\n },\n tokenType,\n hidden\n );\n return node;\n }\n\n protected getTokenType(name: string): TokenType {\n return this.lexer.definition[name];\n }\n\n protected getGrammarElementId(node: AbstractElement): number | undefined {\n if (this.grammarElementIdMap.size === 0) {\n this.createGrammarElementIdMap();\n }\n return this.grammarElementIdMap.get(node);\n }\n\n protected getGrammarElement(id: number): AbstractElement {\n if (this.grammarElementIdMap.size === 0) {\n this.createGrammarElementIdMap();\n }\n const element = this.grammarElementIdMap.getKey(id);\n if (element) {\n return element;\n } else {\n throw new Error('Invalid grammar element id: ' + id);\n }\n }\n\n protected createGrammarElementIdMap(): void {\n let id = 0;\n for (const element of streamAst(this.grammar)) {\n if (isAbstractElement(element)) {\n this.grammarElementIdMap.set(element, id++);\n }\n }\n }\n\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n******************************************************************************/\n\nimport type { Module } from './dependency-injection.js';\nimport type { LangiumDefaultCoreServices, LangiumDefaultSharedCoreServices, LangiumCoreServices, LangiumSharedCoreServices } from './services.js';\nimport type { FileSystemProvider } from './workspace/file-system-provider.js';\nimport { createGrammarConfig } from './languages/grammar-config.js';\nimport { createCompletionParser } from './parser/completion-parser-builder.js';\nimport { createLangiumParser } from './parser/langium-parser-builder.js';\nimport { DefaultTokenBuilder } from './parser/token-builder.js';\nimport { DefaultValueConverter } from './parser/value-converter.js';\nimport { DefaultLinker } from './references/linker.js';\nimport { DefaultNameProvider } from './references/name-provider.js';\nimport { DefaultReferences } from './references/references.js';\nimport { DefaultScopeComputation } from './references/scope-computation.js';\nimport { DefaultScopeProvider } from './references/scope-provider.js';\nimport { DefaultJsonSerializer } from './serializer/json-serializer.js';\nimport { DefaultServiceRegistry } from './service-registry.js';\nimport { DefaultDocumentValidator } from './validation/document-validator.js';\nimport { ValidationRegistry } from './validation/validation-registry.js';\nimport { DefaultAstNodeDescriptionProvider, DefaultReferenceDescriptionProvider } from './workspace/ast-descriptions.js';\nimport { DefaultAstNodeLocator } from './workspace/ast-node-locator.js';\nimport { DefaultConfigurationProvider } from './workspace/configuration.js';\nimport { DefaultDocumentBuilder } from './workspace/document-builder.js';\nimport { DefaultLangiumDocumentFactory, DefaultLangiumDocuments } from './workspace/documents.js';\nimport { DefaultIndexManager } from './workspace/index-manager.js';\nimport { DefaultWorkspaceManager } from './workspace/workspace-manager.js';\nimport { DefaultLexer } from './parser/lexer.js';\nimport { JSDocDocumentationProvider } from './documentation/documentation-provider.js';\nimport { DefaultCommentProvider } from './documentation/comment-provider.js';\nimport { LangiumParserErrorMessageProvider } from './parser/langium-parser.js';\nimport { DefaultAsyncParser } from './parser/async-parser.js';\nimport { DefaultWorkspaceLock } from './workspace/workspace-lock.js';\nimport { DefaultHydrator } from './serializer/hydrator.js';\n\n/**\n * Context required for creating the default language-specific dependency injection module.\n */\nexport interface DefaultCoreModuleContext {\n shared: LangiumSharedCoreServices;\n}\n\n/**\n * Creates a dependency injection module configuring the default core services.\n * This is a set of services that are dedicated to a specific language.\n */\nexport function createDefaultCoreModule(context: DefaultCoreModuleContext): Module {\n return {\n documentation: {\n CommentProvider: (services) => new DefaultCommentProvider(services),\n DocumentationProvider: (services) => new JSDocDocumentationProvider(services)\n },\n parser: {\n AsyncParser: (services) => new DefaultAsyncParser(services),\n GrammarConfig: (services) => createGrammarConfig(services),\n LangiumParser: (services) => createLangiumParser(services),\n CompletionParser: (services) => createCompletionParser(services),\n ValueConverter: () => new DefaultValueConverter(),\n TokenBuilder: () => new DefaultTokenBuilder(),\n Lexer: (services) => new DefaultLexer(services),\n ParserErrorMessageProvider: () => new LangiumParserErrorMessageProvider()\n },\n workspace: {\n AstNodeLocator: () => new DefaultAstNodeLocator(),\n AstNodeDescriptionProvider: (services) => new DefaultAstNodeDescriptionProvider(services),\n ReferenceDescriptionProvider: (services) => new DefaultReferenceDescriptionProvider(services)\n },\n references: {\n Linker: (services) => new DefaultLinker(services),\n NameProvider: () => new DefaultNameProvider(),\n ScopeProvider: (services) => new DefaultScopeProvider(services),\n ScopeComputation: (services) => new DefaultScopeComputation(services),\n References: (services) => new DefaultReferences(services)\n },\n serializer: {\n Hydrator: (services) => new DefaultHydrator(services),\n JsonSerializer: (services) => new DefaultJsonSerializer(services)\n },\n validation: {\n DocumentValidator: (services) => new DefaultDocumentValidator(services),\n ValidationRegistry: (services) => new ValidationRegistry(services)\n },\n shared: () => context.shared\n };\n}\n\n/**\n * Context required for creating the default shared dependency injection module.\n */\nexport interface DefaultSharedCoreModuleContext {\n /**\n * Factory function to create a {@link FileSystemProvider}.\n *\n * Langium exposes an `EmptyFileSystem` and `NodeFileSystem`, exported through `langium/node`.\n * When running Langium as part of a vscode language server or a Node.js app, using the `NodeFileSystem` is recommended,\n * the `EmptyFileSystem` in every other use case.\n */\n fileSystemProvider: (services: LangiumSharedCoreServices) => FileSystemProvider;\n}\n\n/**\n * Creates a dependency injection module configuring the default shared core services.\n * This is the set of services that are shared between multiple languages.\n */\nexport function createDefaultSharedCoreModule(context: DefaultSharedCoreModuleContext): Module {\n return {\n ServiceRegistry: () => new DefaultServiceRegistry(),\n workspace: {\n LangiumDocuments: (services) => new DefaultLangiumDocuments(services),\n LangiumDocumentFactory: (services) => new DefaultLangiumDocumentFactory(services),\n DocumentBuilder: (services) => new DefaultDocumentBuilder(services),\n IndexManager: (services) => new DefaultIndexManager(services),\n WorkspaceManager: (services) => new DefaultWorkspaceManager(services),\n FileSystemProvider: (services) => context.fileSystemProvider(services),\n WorkspaceLock: () => new DefaultWorkspaceLock(),\n ConfigurationProvider: (services) => new DefaultConfigurationProvider(services)\n }\n };\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * A `Module` is a description of possibly grouped service factories.\n *\n * Given a type I = { group: { service: A } },\n * Module := { group: { service: (injector: I) => A } }\n *\n * Making `I` available during the creation of `I` allows us to create cyclic\n * dependencies.\n */\nexport type Module = {\n [K in keyof T]: Module | ((injector: I) => T[K])\n}\n\nexport namespace Module {\n export const merge = (m1: Module, m2: Module) => (_merge(_merge({}, m1), m2) as Module);\n}\n\n/**\n * Given a set of modules, the inject function returns a lazily evaluated injector\n * that injects dependencies into the requested service when it is requested the\n * first time. Subsequent requests will return the same service.\n *\n * In the case of cyclic dependencies, an Error will be thrown. This can be fixed\n * by injecting a provider `() => T` instead of a `T`.\n *\n * Please note that the arguments may be objects or arrays. However, the result will\n * be an object. Using it with for..of will have no effect.\n *\n * @param module1 first Module\n * @param module2 (optional) second Module\n * @param module3 (optional) third Module\n * @param module4 (optional) fourth Module\n * @param module5 (optional) fifth Module\n * @param module6 (optional) sixth Module\n * @param module7 (optional) seventh Module\n * @param module8 (optional) eighth Module\n * @param module9 (optional) ninth Module\n * @returns a new object of type I\n */\nexport function inject(\n module1: Module, module2?: Module, module3?: Module, module4?: Module, module5?: Module, module6?: Module, module7?: Module, module8?: Module, module9?: Module\n): I {\n const module = [module1, module2, module3, module4, module5, module6, module7, module8, module9].reduce(_merge, {}) as Module;\n return _inject(module);\n}\n\nconst isProxy = Symbol('isProxy');\n\n/**\n * Eagerly load all services in the given dependency injection container. This is sometimes\n * necessary because services can register event listeners in their constructors.\n */\nexport function eagerLoad(item: T): T {\n if (item && (item as any)[isProxy]) {\n for (const value of Object.values(item)) {\n eagerLoad(value);\n }\n }\n return item;\n}\n\n/**\n * Helper function that returns an injector by creating a proxy.\n * Invariant: injector is of type I. If injector is undefined, then T = I.\n */\nfunction _inject(module: Module, injector?: any): T {\n const proxy: any = new Proxy({} as any, {\n deleteProperty: () => false,\n get: (obj, prop) => _resolve(obj, prop, module, injector || proxy),\n getOwnPropertyDescriptor: (obj, prop) => (_resolve(obj, prop, module, injector || proxy), Object.getOwnPropertyDescriptor(obj, prop)), // used by for..in\n has: (_, prop) => prop in module, // used by ..in..\n ownKeys: () => [...Reflect.ownKeys(module), isProxy] // used by for..in\n });\n proxy[isProxy] = true;\n return proxy;\n}\n\n/**\n * Internally used to tag a requested dependency, directly before calling the factory.\n * This allows us to find cycles during instance creation.\n */\nconst __requested__ = Symbol();\n\n/**\n * Returns the value `obj[prop]`. If the value does not exist, yet, it is resolved from\n * the module description. The result of service factories is cached. Groups are\n * recursively proxied.\n *\n * @param obj an object holding all group proxies and services\n * @param prop the key of a value within obj\n * @param module an object containing groups and service factories\n * @param injector the first level proxy that provides access to all values\n * @returns the requested value `obj[prop]`\n * @throws Error if a dependency cycle is detected\n */\nfunction _resolve(obj: any, prop: string | symbol | number, module: Module, injector: I): T[keyof T] | undefined {\n if (prop in obj) {\n if (obj[prop] instanceof Error) {\n throw new Error('Construction failure. Please make sure that your dependencies are constructable.', {cause: obj[prop]});\n }\n if (obj[prop] === __requested__) {\n throw new Error('Cycle detected. Please make \"' + String(prop) + '\" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');\n }\n return obj[prop];\n } else if (prop in module) {\n const value: Module | ((injector: I) => T[keyof T]) = module[prop as keyof T];\n obj[prop] = __requested__;\n try {\n obj[prop] = (typeof value === 'function') ? value(injector) : _inject(value, injector);\n } catch (error) {\n obj[prop] = error instanceof Error ? error : undefined;\n throw error;\n }\n return obj[prop];\n } else {\n return undefined;\n }\n}\n\n/**\n * Performs a deep-merge of two modules by writing source entries into the target module.\n *\n * @param target the module which is written\n * @param source the module which is read\n * @returns the target module\n */\nfunction _merge(target: Module, source?: Module): Module {\n if (source) {\n for (const [key, value2] of Object.entries(source)) {\n if (value2 !== undefined) {\n const value1 = target[key];\n if (value1 !== null && value2 !== null && typeof value1 === 'object' && typeof value2 === 'object') {\n target[key] = _merge(value1, value2);\n } else {\n target[key] = value2;\n }\n }\n }\n }\n return target;\n}\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\n// Ensure that all imports are erased at runtime to avoid circular dependencies.\nimport type { IParserErrorMessageProvider } from 'chevrotain';\nimport type { CommentProvider } from './documentation/comment-provider.js';\nimport type { DocumentationProvider } from './documentation/documentation-provider.js';\nimport type { Grammar } from './languages/generated/ast.js';\nimport type { GrammarConfig } from './languages/grammar-config.js';\nimport type { LanguageMetaData } from './languages/language-meta-data.js';\nimport type { AsyncParser } from './parser/async-parser.js';\nimport type { LangiumCompletionParser, LangiumParser } from './parser/langium-parser.js';\nimport type { Lexer } from './parser/lexer.js';\nimport type { IParserConfig } from './parser/parser-config.js';\nimport type { TokenBuilder } from './parser/token-builder.js';\nimport type { ValueConverter } from './parser/value-converter.js';\nimport type { Linker } from './references/linker.js';\nimport type { NameProvider } from './references/name-provider.js';\nimport type { References } from './references/references.js';\nimport type { ScopeComputation } from './references/scope-computation.js';\nimport type { ScopeProvider } from './references/scope-provider.js';\nimport type { JsonSerializer } from './serializer/json-serializer.js';\nimport type { ServiceRegistry } from './service-registry.js';\nimport type { AstReflection } from './syntax-tree.js';\nimport type { DocumentValidator } from './validation/document-validator.js';\nimport type { ValidationRegistry } from './validation/validation-registry.js';\nimport type { AstNodeDescriptionProvider, ReferenceDescriptionProvider } from './workspace/ast-descriptions.js';\nimport type { AstNodeLocator } from './workspace/ast-node-locator.js';\nimport type { ConfigurationProvider } from './workspace/configuration.js';\nimport type { DocumentBuilder } from './workspace/document-builder.js';\nimport type { LangiumDocumentFactory, LangiumDocuments, TextDocumentProvider } from './workspace/documents.js';\nimport type { FileSystemProvider } from './workspace/file-system-provider.js';\nimport type { IndexManager } from './workspace/index-manager.js';\nimport type { WorkspaceLock } from './workspace/workspace-lock.js';\nimport type { Hydrator } from './serializer/hydrator.js';\nimport type { WorkspaceManager } from './workspace/workspace-manager.js';\n\n/**\n * The services generated by `langium-cli` for a specific language. These are derived from the\n * grammar definition and the language configuration.\n */\nexport type LangiumGeneratedCoreServices = {\n Grammar: Grammar\n LanguageMetaData: LanguageMetaData\n parser: {\n ParserConfig?: IParserConfig\n }\n}\n\n/**\n * Core services for a specific language of which Langium provides default implementations.\n */\nexport type LangiumDefaultCoreServices = {\n parser: {\n AsyncParser: AsyncParser\n GrammarConfig: GrammarConfig\n ValueConverter: ValueConverter\n LangiumParser: LangiumParser\n ParserErrorMessageProvider: IParserErrorMessageProvider\n CompletionParser: LangiumCompletionParser\n TokenBuilder: TokenBuilder\n Lexer: Lexer\n }\n documentation: {\n CommentProvider: CommentProvider\n DocumentationProvider: DocumentationProvider\n }\n references: {\n Linker: Linker\n NameProvider: NameProvider\n References: References\n ScopeProvider: ScopeProvider\n ScopeComputation: ScopeComputation\n }\n serializer: {\n Hydrator: Hydrator\n JsonSerializer: JsonSerializer\n }\n validation: {\n DocumentValidator: DocumentValidator\n ValidationRegistry: ValidationRegistry\n }\n workspace: {\n AstNodeLocator: AstNodeLocator\n AstNodeDescriptionProvider: AstNodeDescriptionProvider\n ReferenceDescriptionProvider: ReferenceDescriptionProvider\n }\n shared: LangiumSharedCoreServices\n}\n\n/**\n * The core set of services available for a language. These are either generated by `langium-cli`\n * or provided as default implementations.\n */\nexport type LangiumCoreServices = LangiumGeneratedCoreServices & LangiumDefaultCoreServices\n\n/**\n * The services generated by `langium-cli` that are shared between multiple languages. These are\n * derived from the grammar definition.\n */\nexport type LangiumGeneratedSharedCoreServices = {\n AstReflection: AstReflection\n}\n\n/**\n * Core services shared between multiple languages where Langium provides default implementations.\n */\nexport type LangiumDefaultSharedCoreServices = {\n ServiceRegistry: ServiceRegistry\n workspace: {\n ConfigurationProvider: ConfigurationProvider\n DocumentBuilder: DocumentBuilder\n FileSystemProvider: FileSystemProvider\n IndexManager: IndexManager\n LangiumDocuments: LangiumDocuments\n LangiumDocumentFactory: LangiumDocumentFactory\n TextDocuments?: TextDocumentProvider\n WorkspaceLock: WorkspaceLock\n WorkspaceManager: WorkspaceManager\n }\n}\n\n/**\n * The shared core services are a set of services that are used by every language within a Langium project (excluding LSP services)\n * This is necessary to enable features like cross references across different languages.\n */\nexport type LangiumSharedCoreServices = LangiumDefaultSharedCoreServices & LangiumGeneratedSharedCoreServices\n\n/**\n * A deep partial type definition for services. We look into T to see whether its type definition contains\n * any methods. If it does, it's one of our services and therefore should not be partialized.\n */\n//eslint-disable-next-line @typescript-eslint/ban-types\nexport type DeepPartial = T[keyof T] extends Function ? T : {\n [P in keyof T]?: DeepPartial;\n}\n\n/**\n * Language-specific core services to be partially overridden via dependency injection.\n */\nexport type PartialLangiumCoreServices = DeepPartial\n\n/**\n * Shared core services to be partially overridden via dependency injection.\n */\nexport type PartialLangiumSharedCoreServices = DeepPartial\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './comment-provider.js';\nexport * from './documentation-provider.js';\nexport * from './jsdoc.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport interface LanguageMetaData {\n languageId: string;\n fileExtensions: readonly string[];\n caseInsensitive: boolean;\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './grammar-config.js';\nexport * from './language-meta-data.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport type { IParserConfig } from 'chevrotain';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './async-parser.js';\nexport * from './completion-parser-builder.js';\nexport * from './cst-node-builder.js';\nexport * from './langium-parser-builder.js';\nexport * from './langium-parser.js';\nexport * from './lexer.js';\nexport * from './parser-config.js';\nexport * from './token-builder.js';\nexport * from './value-converter.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './linker.js';\nexport * from './name-provider.js';\nexport * from './references.js';\nexport * from './scope.js';\nexport * from './scope-computation.js';\nexport * from './scope-provider.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './hydrator.js';\nexport * from './json-serializer.js';\n", "/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport type { URI } from '../utils/uri-utils.js';\n\nexport interface FileSystemNode {\n readonly isFile: boolean;\n readonly isDirectory: boolean;\n readonly uri: URI;\n}\n\nexport type FileSystemFilter = (node: FileSystemNode) => boolean;\n\n/**\n * Provides methods to interact with an abstract file system. The default implementation is based on the node.js `fs` API.\n */\nexport interface FileSystemProvider {\n /**\n * Reads a document asynchronously from a given URI.\n * @returns The string content of the file with the specified URI.\n */\n readFile(uri: URI): Promise;\n /**\n * Reads the directory information for the given URI.\n * @returns The list of file system entries that are contained within the specified directory.\n */\n readDirectory(uri: URI): Promise;\n}\n\nexport class EmptyFileSystemProvider implements FileSystemProvider {\n\n readFile(): Promise {\n throw new Error('No file system is available.');\n }\n\n async readDirectory(): Promise {\n return [];\n }\n\n}\n\nexport const EmptyFileSystem = {\n fileSystemProvider: () => new EmptyFileSystemProvider()\n};\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nimport { createDefaultCoreModule, createDefaultSharedCoreModule } from '../default-module.js';\nimport type { Module } from '../dependency-injection.js';\nimport { inject } from '../dependency-injection.js';\nimport * as ast from '../languages/generated/ast.js';\nimport type { LangiumCoreServices, LangiumSharedCoreServices, PartialLangiumCoreServices, PartialLangiumSharedCoreServices } from '../services.js';\nimport type { Mutable } from '../syntax-tree.js';\nimport { EmptyFileSystem } from '../workspace/file-system-provider.js';\nimport { URI } from './uri-utils.js';\n\nconst minimalGrammarModule: Module = {\n Grammar: () => undefined as unknown as ast.Grammar,\n LanguageMetaData: () => ({\n caseInsensitive: false,\n fileExtensions: ['.langium'],\n languageId: 'langium'\n })\n};\n\nconst minimalSharedGrammarModule: Module = {\n AstReflection: () => new ast.LangiumGrammarAstReflection()\n};\n\nfunction createMinimalGrammarServices(): LangiumCoreServices {\n const shared = inject(\n createDefaultSharedCoreModule(EmptyFileSystem),\n minimalSharedGrammarModule\n );\n const grammar = inject(\n createDefaultCoreModule({ shared }),\n minimalGrammarModule\n );\n shared.ServiceRegistry.register(grammar);\n return grammar;\n}\n\n/**\n * Load a Langium grammar for your language from a JSON string. This is used by several services,\n * most notably the parser builder which interprets the grammar to create a parser.\n */\nexport function loadGrammarFromJson(json: string): ast.Grammar {\n const services = createMinimalGrammarServices();\n const astNode = services.serializer.JsonSerializer.deserialize(json) as Mutable;\n services.shared.workspace.LangiumDocumentFactory.fromModel(astNode, URI.parse(`memory://${astNode.name ?? 'grammar'}.langium`));\n return astNode;\n}\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './caching.js';\nexport * from './event.js';\nexport * from './collections.js';\nexport * from './disposable.js';\nexport * from './errors.js';\nexport * from './grammar-loader.js';\nexport * from './promise-utils.js';\nexport * from './stream.js';\nexport * from './uri-utils.js';\n\nimport * as AstUtils from './ast-utils.js';\nimport * as Cancellation from './cancellation.js';\nimport * as CstUtils from './cst-utils.js';\nimport * as GrammarUtils from './grammar-utils.js';\nimport * as RegExpUtils from './regexp-utils.js';\nexport { AstUtils, Cancellation, CstUtils, GrammarUtils, RegExpUtils };\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './document-validator.js';\nexport * from './validation-registry.js';\n", "/******************************************************************************\n * Copyright 2023 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './ast-descriptions.js';\nexport * from './ast-node-locator.js';\nexport * from './configuration.js';\nexport * from './document-builder.js';\nexport * from './documents.js';\nexport * from './file-system-provider.js';\nexport * from './index-manager.js';\nexport * from './workspace-lock.js';\nexport * from './workspace-manager.js';\n", "/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n\nexport * from './default-module.js';\nexport * from './dependency-injection.js';\nexport * from './service-registry.js';\nexport * from './services.js';\nexport * from './syntax-tree.js';\nexport * from './documentation/index.js';\nexport * from './languages/index.js';\nexport * from './parser/index.js';\nexport * from './references/index.js';\nexport * from './serializer/index.js';\nexport * from './utils/index.js';\nexport * from './validation/index.js';\nexport * from './workspace/index.js';\n\n// Export the Langium Grammar AST definitions in the `GrammarAST` namespace\nimport * as GrammarAST from './languages/generated/ast.js';\nimport type { Grammar } from './languages/generated/ast.js';\nexport { Grammar, GrammarAST };\n", "var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/language/generated/ast.ts\nimport { AbstractAstReflection } from \"langium\";\nvar Statement = \"Statement\";\nvar Branch = \"Branch\";\nfunction isBranch(item) {\n return reflection.isInstance(item, Branch);\n}\n__name(isBranch, \"isBranch\");\nvar Checkout = \"Checkout\";\nvar CherryPicking = \"CherryPicking\";\nvar Commit = \"Commit\";\nfunction isCommit(item) {\n return reflection.isInstance(item, Commit);\n}\n__name(isCommit, \"isCommit\");\nvar Common = \"Common\";\nfunction isCommon(item) {\n return reflection.isInstance(item, Common);\n}\n__name(isCommon, \"isCommon\");\nvar GitGraph = \"GitGraph\";\nfunction isGitGraph(item) {\n return reflection.isInstance(item, GitGraph);\n}\n__name(isGitGraph, \"isGitGraph\");\nvar Info = \"Info\";\nfunction isInfo(item) {\n return reflection.isInstance(item, Info);\n}\n__name(isInfo, \"isInfo\");\nvar Merge = \"Merge\";\nfunction isMerge(item) {\n return reflection.isInstance(item, Merge);\n}\n__name(isMerge, \"isMerge\");\nvar Packet = \"Packet\";\nfunction isPacket(item) {\n return reflection.isInstance(item, Packet);\n}\n__name(isPacket, \"isPacket\");\nvar PacketBlock = \"PacketBlock\";\nfunction isPacketBlock(item) {\n return reflection.isInstance(item, PacketBlock);\n}\n__name(isPacketBlock, \"isPacketBlock\");\nvar Pie = \"Pie\";\nfunction isPie(item) {\n return reflection.isInstance(item, Pie);\n}\n__name(isPie, \"isPie\");\nvar PieSection = \"PieSection\";\nfunction isPieSection(item) {\n return reflection.isInstance(item, PieSection);\n}\n__name(isPieSection, \"isPieSection\");\nvar Direction = \"Direction\";\nvar MermaidAstReflection = class extends AbstractAstReflection {\n static {\n __name(this, \"MermaidAstReflection\");\n }\n getAllTypes() {\n return [\"Branch\", \"Checkout\", \"CherryPicking\", \"Commit\", \"Common\", \"Direction\", \"GitGraph\", \"Info\", \"Merge\", \"Packet\", \"PacketBlock\", \"Pie\", \"PieSection\", \"Statement\"];\n }\n computeIsSubtype(subtype, supertype) {\n switch (subtype) {\n case Branch:\n case Checkout:\n case CherryPicking:\n case Commit:\n case Merge: {\n return this.isSubtype(Statement, supertype);\n }\n case Direction: {\n return this.isSubtype(GitGraph, supertype);\n }\n default: {\n return false;\n }\n }\n }\n getReferenceType(refInfo) {\n const referenceId = `${refInfo.container.$type}:${refInfo.property}`;\n switch (referenceId) {\n default: {\n throw new Error(`${referenceId} is not a valid reference id.`);\n }\n }\n }\n getTypeMetaData(type) {\n switch (type) {\n case \"Branch\": {\n return {\n name: \"Branch\",\n properties: [\n { name: \"name\" },\n { name: \"order\" }\n ]\n };\n }\n case \"Checkout\": {\n return {\n name: \"Checkout\",\n properties: [\n { name: \"branch\" }\n ]\n };\n }\n case \"CherryPicking\": {\n return {\n name: \"CherryPicking\",\n properties: [\n { name: \"id\" },\n { name: \"parent\" },\n { name: \"tags\", defaultValue: [] }\n ]\n };\n }\n case \"Commit\": {\n return {\n name: \"Commit\",\n properties: [\n { name: \"id\" },\n { name: \"message\" },\n { name: \"tags\", defaultValue: [] },\n { name: \"type\" }\n ]\n };\n }\n case \"Common\": {\n return {\n name: \"Common\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"title\" }\n ]\n };\n }\n case \"GitGraph\": {\n return {\n name: \"GitGraph\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"statements\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n case \"Info\": {\n return {\n name: \"Info\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"title\" }\n ]\n };\n }\n case \"Merge\": {\n return {\n name: \"Merge\",\n properties: [\n { name: \"branch\" },\n { name: \"id\" },\n { name: \"tags\", defaultValue: [] },\n { name: \"type\" }\n ]\n };\n }\n case \"Packet\": {\n return {\n name: \"Packet\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"blocks\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n case \"PacketBlock\": {\n return {\n name: \"PacketBlock\",\n properties: [\n { name: \"end\" },\n { name: \"label\" },\n { name: \"start\" }\n ]\n };\n }\n case \"Pie\": {\n return {\n name: \"Pie\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"sections\", defaultValue: [] },\n { name: \"showData\", defaultValue: false },\n { name: \"title\" }\n ]\n };\n }\n case \"PieSection\": {\n return {\n name: \"PieSection\",\n properties: [\n { name: \"label\" },\n { name: \"value\" }\n ]\n };\n }\n case \"Direction\": {\n return {\n name: \"Direction\",\n properties: [\n { name: \"accDescr\" },\n { name: \"accTitle\" },\n { name: \"dir\" },\n { name: \"statements\", defaultValue: [] },\n { name: \"title\" }\n ]\n };\n }\n default: {\n return {\n name: type,\n properties: []\n };\n }\n }\n }\n};\nvar reflection = new MermaidAstReflection();\n\n// src/language/generated/grammar.ts\nimport { loadGrammarFromJson } from \"langium\";\nvar loadedInfoGrammar;\nvar InfoGrammar = /* @__PURE__ */ __name(() => loadedInfoGrammar ?? (loadedInfoGrammar = loadGrammarFromJson('{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Info\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Info\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"info\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"showInfo\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"*\"}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[],\"cardinality\":\"?\"}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}')), \"InfoGrammar\");\nvar loadedPacketGrammar;\nvar PacketGrammar = /* @__PURE__ */ __name(() => loadedPacketGrammar ?? (loadedPacketGrammar = loadGrammarFromJson(`{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Packet\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Packet\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"packet-beta\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"blocks\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"*\"}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"Assignment\",\"feature\":\"blocks\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"+\"}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"PacketBlock\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"start\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"-\"},{\"$type\":\"Assignment\",\"feature\":\"end\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"Keyword\",\"value\":\":\"},{\"$type\":\"Assignment\",\"feature\":\"label\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"INT\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"number\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/0|[1-9][0-9]*/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"STRING\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\"[^\\\\\"]*\\\\\"|'[^']*'/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@7\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@8\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@9\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}`)), \"PacketGrammar\");\nvar loadedPieGrammar;\nvar PieGrammar = /* @__PURE__ */ __name(() => loadedPieGrammar ?? (loadedPieGrammar = loadGrammarFromJson('{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"Pie\",\"imports\":[],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"Pie\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Keyword\",\"value\":\"pie\"},{\"$type\":\"Assignment\",\"feature\":\"showData\",\"operator\":\"?=\",\"terminal\":{\"$type\":\"Keyword\",\"value\":\"showData\"},\"cardinality\":\"?\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"sections\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"*\"}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"Assignment\",\"feature\":\"sections\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]},\"cardinality\":\"+\"}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"PieSection\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"label\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}},{\"$type\":\"Keyword\",\"value\":\":\"},{\"$type\":\"Assignment\",\"feature\":\"value\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"PIE_SECTION_LABEL\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\"[^\\\\\"]+\\\\\"/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"PIE_SECTION_VALUE\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"number\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/(0|[1-9][0-9]*)(\\\\\\\\.[0-9]+)?/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@7\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@8\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@9\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@6\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"types\":[],\"usedGrammars\":[]}')), \"PieGrammar\");\nvar loadedGitGraphGrammar;\nvar GitGraphGrammar = /* @__PURE__ */ __name(() => loadedGitGraphGrammar ?? (loadedGitGraphGrammar = loadGrammarFromJson(`{\"$type\":\"Grammar\",\"isDeclared\":true,\"name\":\"GitGraph\",\"interfaces\":[{\"$type\":\"Interface\",\"name\":\"Common\",\"attributes\":[{\"$type\":\"TypeAttribute\",\"name\":\"accDescr\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"accTitle\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}},{\"$type\":\"TypeAttribute\",\"name\":\"title\",\"isOptional\":true,\"type\":{\"$type\":\"SimpleType\",\"primitiveType\":\"string\"}}],\"superTypes\":[]}],\"rules\":[{\"$type\":\"ParserRule\",\"name\":\"TitleAndAccessibilities\",\"fragment\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Assignment\",\"feature\":\"accDescr\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@3\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"accTitle\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@4\"},\"arguments\":[]}},{\"$type\":\"Assignment\",\"feature\":\"title\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@5\"},\"arguments\":[]}}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}],\"cardinality\":\"+\"},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"EOL\",\"fragment\":true,\"dataType\":\"string\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"+\"},{\"$type\":\"EndOfFile\"}]},\"definesHiddenTokens\":false,\"entry\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"NEWLINE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\r?\\\\\\\\n/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_DESCR\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accDescr(?:[\\\\\\\\t ]*:([^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)|\\\\\\\\s*{([^}]*)})/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ACC_TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*accTitle[\\\\\\\\t ]*:(?:[^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[^\\\\\\\\n\\\\\\\\r]*)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"TITLE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*title(?:[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*?(?=%%)|[\\\\\\\\t ][^\\\\\\\\n\\\\\\\\r]*|)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"WHITESPACE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]+/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"YAML\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/---[\\\\\\\\t ]*\\\\\\\\r?\\\\\\\\n(?:[\\\\\\\\S\\\\\\\\s]*?\\\\\\\\r?\\\\\\\\n)?---(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"DIRECTIVE\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%{[\\\\\\\\S\\\\\\\\s]*?}%%(?:\\\\\\\\r?\\\\\\\\n|(?!\\\\\\\\S))/\"},\"fragment\":false},{\"$type\":\"TerminalRule\",\"hidden\":true,\"name\":\"SINGLE_LINE_COMMENT\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[\\\\\\\\t ]*%%[^\\\\\\\\n\\\\\\\\r]*/\"},\"fragment\":false},{\"$type\":\"ParserRule\",\"name\":\"GitGraph\",\"entry\":true,\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"gitGraph\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"gitGraph\"},{\"$type\":\"Keyword\",\"value\":\":\"}]},{\"$type\":\"Keyword\",\"value\":\"gitGraph:\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"gitGraph\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@12\"},\"arguments\":[]},{\"$type\":\"Keyword\",\"value\":\":\"}]}]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[],\"cardinality\":\"*\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@0\"},\"arguments\":[]},{\"$type\":\"Assignment\",\"feature\":\"statements\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@11\"},\"arguments\":[]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@2\"},\"arguments\":[]}],\"cardinality\":\"*\"}]}]},\"definesHiddenTokens\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Statement\",\"definition\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@13\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@14\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@15\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@16\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@17\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Direction\",\"definition\":{\"$type\":\"Assignment\",\"feature\":\"dir\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"LR\"},{\"$type\":\"Keyword\",\"value\":\"TB\"},{\"$type\":\"Keyword\",\"value\":\"BT\"}]}},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Commit\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"commit\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"id:\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"msg:\",\"cardinality\":\"?\"},{\"$type\":\"Assignment\",\"feature\":\"message\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"tag:\"},{\"$type\":\"Assignment\",\"feature\":\"tags\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"type:\"},{\"$type\":\"Assignment\",\"feature\":\"type\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"NORMAL\"},{\"$type\":\"Keyword\",\"value\":\"REVERSE\"},{\"$type\":\"Keyword\",\"value\":\"HIGHLIGHT\"}]}}]}],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Branch\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"branch\"},{\"$type\":\"Assignment\",\"feature\":\"name\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}]}},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"order:\"},{\"$type\":\"Assignment\",\"feature\":\"order\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@18\"},\"arguments\":[]}}],\"cardinality\":\"?\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Merge\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"merge\"},{\"$type\":\"Assignment\",\"feature\":\"branch\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}]}},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"id:\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"tag:\"},{\"$type\":\"Assignment\",\"feature\":\"tags\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"type:\"},{\"$type\":\"Assignment\",\"feature\":\"type\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"NORMAL\"},{\"$type\":\"Keyword\",\"value\":\"REVERSE\"},{\"$type\":\"Keyword\",\"value\":\"HIGHLIGHT\"}]}}]}],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"Checkout\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"checkout\"},{\"$type\":\"Keyword\",\"value\":\"switch\"}]},{\"$type\":\"Assignment\",\"feature\":\"branch\",\"operator\":\"=\",\"terminal\":{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@19\"},\"arguments\":[]},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}]}},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"ParserRule\",\"name\":\"CherryPicking\",\"definition\":{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"cherry-pick\"},{\"$type\":\"Alternatives\",\"elements\":[{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"id:\"},{\"$type\":\"Assignment\",\"feature\":\"id\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"tag:\"},{\"$type\":\"Assignment\",\"feature\":\"tags\",\"operator\":\"+=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]},{\"$type\":\"Group\",\"elements\":[{\"$type\":\"Keyword\",\"value\":\"parent:\"},{\"$type\":\"Assignment\",\"feature\":\"parent\",\"operator\":\"=\",\"terminal\":{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@20\"},\"arguments\":[]}}]}],\"cardinality\":\"*\"},{\"$type\":\"RuleCall\",\"rule\":{\"$ref\":\"#/rules@1\"},\"arguments\":[]}]},\"definesHiddenTokens\":false,\"entry\":false,\"fragment\":false,\"hiddenTokens\":[],\"parameters\":[],\"wildcard\":false},{\"$type\":\"TerminalRule\",\"name\":\"INT\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"number\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/[0-9]+(?=\\\\\\\\s)/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"ID\",\"type\":{\"$type\":\"ReturnType\",\"name\":\"string\"},\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\\\\w([-\\\\\\\\./\\\\\\\\w]*[-\\\\\\\\w])?/\"},\"fragment\":false,\"hidden\":false},{\"$type\":\"TerminalRule\",\"name\":\"STRING\",\"definition\":{\"$type\":\"RegexToken\",\"regex\":\"/\\\\\"[^\\\\\"]*\\\\\"|'[^']*'/\"},\"fragment\":false,\"hidden\":false}],\"definesHiddenTokens\":false,\"hiddenTokens\":[],\"imports\":[],\"types\":[],\"usedGrammars\":[]}`)), \"GitGraphGrammar\");\n\n// src/language/generated/module.ts\nvar InfoLanguageMetaData = {\n languageId: \"info\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar PacketLanguageMetaData = {\n languageId: \"packet\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar PieLanguageMetaData = {\n languageId: \"pie\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar GitGraphLanguageMetaData = {\n languageId: \"gitGraph\",\n fileExtensions: [\".mmd\", \".mermaid\"],\n caseInsensitive: false\n};\nvar MermaidGeneratedSharedModule = {\n AstReflection: /* @__PURE__ */ __name(() => new MermaidAstReflection(), \"AstReflection\")\n};\nvar InfoGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => InfoGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => InfoLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar PacketGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => PacketGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => PacketLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar PieGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => PieGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => PieLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\nvar GitGraphGeneratedModule = {\n Grammar: /* @__PURE__ */ __name(() => GitGraphGrammar(), \"Grammar\"),\n LanguageMetaData: /* @__PURE__ */ __name(() => GitGraphLanguageMetaData, \"LanguageMetaData\"),\n parser: {}\n};\n\n// src/language/common/valueConverter.ts\nimport { DefaultValueConverter } from \"langium\";\n\n// src/language/common/matcher.ts\nvar accessibilityDescrRegex = /accDescr(?:[\\t ]*:([^\\n\\r]*)|\\s*{([^}]*)})/;\nvar accessibilityTitleRegex = /accTitle[\\t ]*:([^\\n\\r]*)/;\nvar titleRegex = /title([\\t ][^\\n\\r]*|)/;\n\n// src/language/common/valueConverter.ts\nvar rulesRegexes = {\n ACC_DESCR: accessibilityDescrRegex,\n ACC_TITLE: accessibilityTitleRegex,\n TITLE: titleRegex\n};\nvar AbstractMermaidValueConverter = class extends DefaultValueConverter {\n static {\n __name(this, \"AbstractMermaidValueConverter\");\n }\n runConverter(rule, input, cstNode) {\n let value = this.runCommonConverter(rule, input, cstNode);\n if (value === void 0) {\n value = this.runCustomConverter(rule, input, cstNode);\n }\n if (value === void 0) {\n return super.runConverter(rule, input, cstNode);\n }\n return value;\n }\n runCommonConverter(rule, input, _cstNode) {\n const regex = rulesRegexes[rule.name];\n if (regex === void 0) {\n return void 0;\n }\n const match = regex.exec(input);\n if (match === null) {\n return void 0;\n }\n if (match[1] !== void 0) {\n return match[1].trim().replace(/[\\t ]{2,}/gm, \" \");\n }\n if (match[2] !== void 0) {\n return match[2].replace(/^\\s*/gm, \"\").replace(/\\s+$/gm, \"\").replace(/[\\t ]{2,}/gm, \" \").replace(/[\\n\\r]{2,}/gm, \"\\n\");\n }\n return void 0;\n }\n};\nvar CommonValueConverter = class extends AbstractMermaidValueConverter {\n static {\n __name(this, \"CommonValueConverter\");\n }\n runCustomConverter(_rule, _input, _cstNode) {\n return void 0;\n }\n};\n\n// src/language/common/tokenBuilder.ts\nimport { DefaultTokenBuilder } from \"langium\";\nvar AbstractMermaidTokenBuilder = class extends DefaultTokenBuilder {\n static {\n __name(this, \"AbstractMermaidTokenBuilder\");\n }\n constructor(keywords) {\n super();\n this.keywords = new Set(keywords);\n }\n buildKeywordTokens(rules, terminalTokens, options) {\n const tokenTypes = super.buildKeywordTokens(rules, terminalTokens, options);\n tokenTypes.forEach((tokenType) => {\n if (this.keywords.has(tokenType.name) && tokenType.PATTERN !== void 0) {\n tokenType.PATTERN = new RegExp(tokenType.PATTERN.toString() + \"(?:(?=%%)|(?!\\\\S))\");\n }\n });\n return tokenTypes;\n }\n};\nvar CommonTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"CommonTokenBuilder\");\n }\n};\n\nexport {\n __name,\n Statement,\n Branch,\n isBranch,\n Commit,\n isCommit,\n isCommon,\n GitGraph,\n isGitGraph,\n Info,\n isInfo,\n Merge,\n isMerge,\n Packet,\n isPacket,\n PacketBlock,\n isPacketBlock,\n Pie,\n isPie,\n PieSection,\n isPieSection,\n MermaidGeneratedSharedModule,\n InfoGeneratedModule,\n PacketGeneratedModule,\n PieGeneratedModule,\n GitGraphGeneratedModule,\n AbstractMermaidValueConverter,\n CommonValueConverter,\n AbstractMermaidTokenBuilder,\n CommonTokenBuilder\n};\n", "import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n GitGraphGeneratedModule,\n MermaidGeneratedSharedModule,\n __name\n} from \"./chunk-U3TRWOCV.mjs\";\n\n// src/language/gitGraph/module.ts\nimport {\n inject,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n EmptyFileSystem\n} from \"langium\";\n\n// src/language/gitGraph/tokenBuilder.ts\nvar GitGraphTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"GitGraphTokenBuilder\");\n }\n constructor() {\n super([\"gitGraph\"]);\n }\n};\n\n// src/language/gitGraph/module.ts\nvar GitGraphModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new GitGraphTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createGitGraphServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const GitGraph = inject(\n createDefaultCoreModule({ shared }),\n GitGraphGeneratedModule,\n GitGraphModule\n );\n shared.ServiceRegistry.register(GitGraph);\n return { shared, GitGraph };\n}\n__name(createGitGraphServices, \"createGitGraphServices\");\n\nexport {\n GitGraphModule,\n createGitGraphServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n InfoGeneratedModule,\n MermaidGeneratedSharedModule,\n __name\n} from \"./chunk-U3TRWOCV.mjs\";\n\n// src/language/info/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/info/tokenBuilder.ts\nvar InfoTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"InfoTokenBuilder\");\n }\n constructor() {\n super([\"info\", \"showInfo\"]);\n }\n};\n\n// src/language/info/module.ts\nvar InfoModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new InfoTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createInfoServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Info = inject(\n createDefaultCoreModule({ shared }),\n InfoGeneratedModule,\n InfoModule\n );\n shared.ServiceRegistry.register(Info);\n return { shared, Info };\n}\n__name(createInfoServices, \"createInfoServices\");\n\nexport {\n InfoModule,\n createInfoServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n MermaidGeneratedSharedModule,\n PacketGeneratedModule,\n __name\n} from \"./chunk-U3TRWOCV.mjs\";\n\n// src/language/packet/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/packet/tokenBuilder.ts\nvar PacketTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"PacketTokenBuilder\");\n }\n constructor() {\n super([\"packet-beta\"]);\n }\n};\n\n// src/language/packet/module.ts\nvar PacketModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new PacketTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createPacketServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Packet = inject(\n createDefaultCoreModule({ shared }),\n PacketGeneratedModule,\n PacketModule\n );\n shared.ServiceRegistry.register(Packet);\n return { shared, Packet };\n}\n__name(createPacketServices, \"createPacketServices\");\n\nexport {\n PacketModule,\n createPacketServices\n};\n", "import {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n MermaidGeneratedSharedModule,\n PieGeneratedModule,\n __name\n} from \"./chunk-U3TRWOCV.mjs\";\n\n// src/language/pie/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/pie/tokenBuilder.ts\nvar PieTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"PieTokenBuilder\");\n }\n constructor() {\n super([\"pie\", \"showData\"]);\n }\n};\n\n// src/language/pie/valueConverter.ts\nvar PieValueConverter = class extends AbstractMermaidValueConverter {\n static {\n __name(this, \"PieValueConverter\");\n }\n runCustomConverter(rule, input, _cstNode) {\n if (rule.name !== \"PIE_SECTION_LABEL\") {\n return void 0;\n }\n return input.replace(/\"/g, \"\").trim();\n }\n};\n\n// src/language/pie/module.ts\nvar PieModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new PieTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new PieValueConverter(), \"ValueConverter\")\n }\n};\nfunction createPieServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Pie = inject(\n createDefaultCoreModule({ shared }),\n PieGeneratedModule,\n PieModule\n );\n shared.ServiceRegistry.register(Pie);\n return { shared, Pie };\n}\n__name(createPieServices, \"createPieServices\");\n\nexport {\n PieModule,\n createPieServices\n};\n", "import {\n InfoModule,\n createInfoServices\n} from \"./chunk-O2VHLUZY.mjs\";\nimport \"./chunk-U3TRWOCV.mjs\";\nexport {\n InfoModule,\n createInfoServices\n};\n", "import {\n PacketModule,\n createPacketServices\n} from \"./chunk-HTBTGXD4.mjs\";\nimport \"./chunk-U3TRWOCV.mjs\";\nexport {\n PacketModule,\n createPacketServices\n};\n", "import {\n PieModule,\n createPieServices\n} from \"./chunk-NM56GJBF.mjs\";\nimport \"./chunk-U3TRWOCV.mjs\";\nexport {\n PieModule,\n createPieServices\n};\n", "import {\n GitGraphModule,\n createGitGraphServices\n} from \"./chunk-QE2ZKFLT.mjs\";\nimport \"./chunk-U3TRWOCV.mjs\";\nexport {\n GitGraphModule,\n createGitGraphServices\n};\n", "import {\n GitGraphModule,\n createGitGraphServices\n} from \"./chunks/mermaid-parser.core/chunk-QE2ZKFLT.mjs\";\nimport {\n InfoModule,\n createInfoServices\n} from \"./chunks/mermaid-parser.core/chunk-O2VHLUZY.mjs\";\nimport {\n PacketModule,\n createPacketServices\n} from \"./chunks/mermaid-parser.core/chunk-HTBTGXD4.mjs\";\nimport {\n PieModule,\n createPieServices\n} from \"./chunks/mermaid-parser.core/chunk-NM56GJBF.mjs\";\nimport {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n Branch,\n Commit,\n CommonTokenBuilder,\n CommonValueConverter,\n GitGraph,\n GitGraphGeneratedModule,\n Info,\n InfoGeneratedModule,\n Merge,\n MermaidGeneratedSharedModule,\n Packet,\n PacketBlock,\n PacketGeneratedModule,\n Pie,\n PieGeneratedModule,\n PieSection,\n Statement,\n __name,\n isBranch,\n isCommit,\n isCommon,\n isGitGraph,\n isInfo,\n isMerge,\n isPacket,\n isPacketBlock,\n isPie,\n isPieSection\n} from \"./chunks/mermaid-parser.core/chunk-U3TRWOCV.mjs\";\n\n// src/parse.ts\nvar parsers = {};\nvar initializers = {\n info: /* @__PURE__ */ __name(async () => {\n const { createInfoServices: createInfoServices2 } = await import(\"./chunks/mermaid-parser.core/info-PWGDJKR5.mjs\");\n const parser = createInfoServices2().Info.parser.LangiumParser;\n parsers.info = parser;\n }, \"info\"),\n packet: /* @__PURE__ */ __name(async () => {\n const { createPacketServices: createPacketServices2 } = await import(\"./chunks/mermaid-parser.core/packet-7PPW3X5M.mjs\");\n const parser = createPacketServices2().Packet.parser.LangiumParser;\n parsers.packet = parser;\n }, \"packet\"),\n pie: /* @__PURE__ */ __name(async () => {\n const { createPieServices: createPieServices2 } = await import(\"./chunks/mermaid-parser.core/pie-RF5LNP4B.mjs\");\n const parser = createPieServices2().Pie.parser.LangiumParser;\n parsers.pie = parser;\n }, \"pie\"),\n gitGraph: /* @__PURE__ */ __name(async () => {\n const { createGitGraphServices: createGitGraphServices2 } = await import(\"./chunks/mermaid-parser.core/gitGraph-F2EDSAW4.mjs\");\n const parser = createGitGraphServices2().GitGraph.parser.LangiumParser;\n parsers.gitGraph = parser;\n }, \"gitGraph\")\n};\nasync function parse(diagramType, text) {\n const initializer = initializers[diagramType];\n if (!initializer) {\n throw new Error(`Unknown diagram type: ${diagramType}`);\n }\n if (!parsers[diagramType]) {\n await initializer();\n }\n const parser = parsers[diagramType];\n const result = parser.parse(text);\n if (result.lexerErrors.length > 0 || result.parserErrors.length > 0) {\n throw new MermaidParseError(result);\n }\n return result.value;\n}\n__name(parse, \"parse\");\nvar MermaidParseError = class extends Error {\n constructor(result) {\n const lexerErrors = result.lexerErrors.map((err) => err.message).join(\"\\n\");\n const parserErrors = result.parserErrors.map((err) => err.message).join(\"\\n\");\n super(`Parsing failed: ${lexerErrors} ${parserErrors}`);\n this.result = result;\n }\n static {\n __name(this, \"MermaidParseError\");\n }\n};\nexport {\n AbstractMermaidTokenBuilder,\n AbstractMermaidValueConverter,\n Branch,\n Commit,\n CommonTokenBuilder,\n CommonValueConverter,\n GitGraph,\n GitGraphGeneratedModule,\n GitGraphModule,\n Info,\n InfoGeneratedModule,\n InfoModule,\n Merge,\n MermaidGeneratedSharedModule,\n MermaidParseError,\n Packet,\n PacketBlock,\n PacketGeneratedModule,\n PacketModule,\n Pie,\n PieGeneratedModule,\n PieModule,\n PieSection,\n Statement,\n createGitGraphServices,\n createInfoServices,\n createPacketServices,\n createPieServices,\n isBranch,\n isCommit,\n isCommon,\n isGitGraph,\n isInfo,\n isMerge,\n isPacket,\n isPacketBlock,\n isPie,\n isPieSection,\n parse\n};\n", "import type { DiagramAST } from '@mermaid-js/parser';\nimport type { DiagramDB } from '../../diagram-api/types.js';\n\nexport function populateCommonDb(ast: DiagramAST, db: DiagramDB) {\n if (ast.accDescr) {\n db.setAccDescription?.(ast.accDescr);\n }\n if (ast.accTitle) {\n db.setAccTitle?.(ast.accTitle);\n }\n if (ast.title) {\n db.setDiagramTitle?.(ast.title);\n }\n}\n", "import type { GitGraphDiagramConfig } from '../../config.type.js';\nimport type { DiagramDBBase } from '../../diagram-api/types.js';\n\nexport const commitType = {\n NORMAL: 0,\n REVERSE: 1,\n HIGHLIGHT: 2,\n MERGE: 3,\n CHERRY_PICK: 4,\n} as const;\n\nexport interface CommitDB {\n msg: string;\n id: string;\n type: number;\n tags?: string[];\n}\n\nexport interface BranchDB {\n name: string;\n order: number;\n}\n\nexport interface MergeDB {\n branch: string;\n id: string;\n type?: number;\n tags?: string[];\n}\n\nexport interface CherryPickDB {\n id: string;\n targetId: string;\n parent: string;\n tags?: string[];\n}\n\nexport interface Commit {\n id: string;\n message: string;\n seq: number;\n type: number;\n tags: string[];\n parents: string[];\n branch: string;\n customType?: number;\n customId?: boolean;\n}\n\nexport interface GitGraph {\n statements: Statement[];\n}\n\nexport type Statement = CommitAst | BranchAst | MergeAst | CheckoutAst | CherryPickingAst;\n\nexport interface CommitAst {\n $type: 'Commit';\n id: string;\n message?: string;\n tags?: string[];\n type?: 'NORMAL' | 'REVERSE' | 'HIGHLIGHT';\n}\n\nexport interface BranchAst {\n $type: 'Branch';\n name: string;\n order?: number;\n}\n\nexport interface MergeAst {\n $type: 'Merge';\n branch: string;\n id?: string;\n tags?: string[];\n type?: 'NORMAL' | 'REVERSE' | 'HIGHLIGHT';\n}\n\nexport interface CheckoutAst {\n $type: 'Checkout';\n branch: string;\n}\n\nexport interface CherryPickingAst {\n $type: 'CherryPicking';\n id: string;\n parent: string;\n tags?: string[];\n}\n\nexport interface GitGraphDB extends DiagramDBBase {\n commitType: typeof commitType;\n setDirection: (dir: DiagramOrientation) => void;\n setOptions: (rawOptString: string) => void;\n getOptions: () => any;\n commit: (commitDB: CommitDB) => void;\n branch: (branchDB: BranchDB) => void;\n merge: (mergeDB: MergeDB) => void;\n cherryPick: (cherryPickDB: CherryPickDB) => void;\n checkout: (branch: string) => void;\n prettyPrint: () => void;\n clear: () => void;\n getBranchesAsObjArray: () => { name: string }[];\n getBranches: () => Map;\n getCommits: () => Map;\n getCommitsArray: () => Commit[];\n getCurrentBranch: () => string;\n getDirection: () => DiagramOrientation;\n getHead: () => Commit | null;\n}\n\nexport interface GitGraphDBParseProvider extends Partial {\n commitType: typeof commitType;\n setDirection: (dir: DiagramOrientation) => void;\n commit: (commitDB: CommitDB) => void;\n branch: (branchDB: BranchDB) => void;\n merge: (mergeDB: MergeDB) => void;\n cherryPick: (cherryPickDB: CherryPickDB) => void;\n checkout: (branch: string) => void;\n}\n\nexport interface GitGraphDBRenderProvider extends Partial {\n prettyPrint: () => void;\n clear: () => void;\n getBranchesAsObjArray: () => { name: string }[];\n getBranches: () => Map;\n getCommits: () => Map;\n getCommitsArray: () => Commit[];\n getCurrentBranch: () => string;\n getDirection: () => DiagramOrientation;\n getHead: () => Commit | null;\n getDiagramTitle: () => string;\n}\n\nexport type DiagramOrientation = 'LR' | 'TB' | 'BT';\n", "/**\n * Resettable state storage.\n * @example\n * ```\n * const state = new ImperativeState(() => ({\n * foo: undefined as string | undefined,\n * bar: [] as number[],\n * baz: 1 as number | undefined,\n * }));\n *\n * state.records.foo = \"hi\";\n * console.log(state.records.foo); // prints \"hi\";\n * state.reset();\n * console.log(state.records.foo); // prints \"default\";\n *\n * // typeof state.records:\n * // {\n * // foo: string | undefined, // actual: undefined\n * // bar: number[], // actual: []\n * // baz: number | undefined, // actual: 1\n * // }\n * ```\n */\nexport class ImperativeState {\n public records: S;\n\n /**\n * @param init - Function that creates the default state.\n */\n constructor(private init: () => S) {\n this.records = this.init();\n }\n\n reset() {\n this.records = this.init();\n }\n}\n", "import { log } from '../../logger.js';\nimport { cleanAndMerge, random } from '../../utils.js';\nimport { getConfig as commonGetConfig } from '../../config.js';\nimport common from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport type {\n DiagramOrientation,\n Commit,\n GitGraphDB,\n CommitDB,\n MergeDB,\n BranchDB,\n CherryPickDB,\n} from './gitGraphTypes.js';\nimport { commitType } from './gitGraphTypes.js';\nimport { ImperativeState } from '../../utils/imperativeState.js';\n\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\n\nimport type { GitGraphDiagramConfig } from '../../config.type.js';\ninterface GitGraphState {\n commits: Map;\n head: Commit | null;\n branchConfig: Map;\n branches: Map;\n currBranch: string;\n direction: DiagramOrientation;\n seq: number;\n options: any;\n}\n\nconst DEFAULT_GITGRAPH_CONFIG: Required = DEFAULT_CONFIG.gitGraph;\nconst getConfig = (): Required => {\n const config = cleanAndMerge({\n ...DEFAULT_GITGRAPH_CONFIG,\n ...commonGetConfig().gitGraph,\n });\n return config;\n};\n\nconst state = new ImperativeState(() => {\n const config = getConfig();\n const mainBranchName = config.mainBranchName;\n const mainBranchOrder = config.mainBranchOrder;\n return {\n mainBranchName,\n commits: new Map(),\n head: null,\n branchConfig: new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]),\n branches: new Map([[mainBranchName, null]]),\n currBranch: mainBranchName,\n direction: 'LR',\n seq: 0,\n options: {},\n };\n});\n\nfunction getID() {\n return random({ length: 7 });\n}\n\n/**\n * @param list - list of items\n * @param fn - function to get the key\n */\nfunction uniqBy(list: any[], fn: (item: any) => any) {\n const recordMap = Object.create(null);\n return list.reduce((out, item) => {\n const key = fn(item);\n if (!recordMap[key]) {\n recordMap[key] = true;\n out.push(item);\n }\n return out;\n }, []);\n}\n\nexport const setDirection = function (dir: DiagramOrientation) {\n state.records.direction = dir;\n};\n\nexport const setOptions = function (rawOptString: string) {\n log.debug('options str', rawOptString);\n rawOptString = rawOptString?.trim();\n rawOptString = rawOptString || '{}';\n try {\n state.records.options = JSON.parse(rawOptString);\n } catch (e: any) {\n log.error('error while parsing gitGraph options', e.message);\n }\n};\n\nexport const getOptions = function () {\n return state.records.options;\n};\n\nexport const commit = function (commitDB: CommitDB) {\n let msg = commitDB.msg;\n let id = commitDB.id;\n const type = commitDB.type;\n let tags = commitDB.tags;\n\n log.info('commit', msg, id, type, tags);\n log.debug('Entering commit:', msg, id, type, tags);\n const config = getConfig();\n id = common.sanitizeText(id, config);\n msg = common.sanitizeText(msg, config);\n tags = tags?.map((tag) => common.sanitizeText(tag, config));\n const newCommit: Commit = {\n id: id ? id : state.records.seq + '-' + getID(),\n message: msg,\n seq: state.records.seq++,\n type: type ?? commitType.NORMAL,\n tags: tags ?? [],\n parents: state.records.head == null ? [] : [state.records.head.id],\n branch: state.records.currBranch,\n };\n state.records.head = newCommit;\n log.info('main branch', config.mainBranchName);\n state.records.commits.set(newCommit.id, newCommit);\n state.records.branches.set(state.records.currBranch, newCommit.id);\n log.debug('in pushCommit ' + newCommit.id);\n};\n\nexport const branch = function (branchDB: BranchDB) {\n let name = branchDB.name;\n const order = branchDB.order;\n name = common.sanitizeText(name, getConfig());\n if (state.records.branches.has(name)) {\n throw new Error(\n `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using \"checkout ${name}\")`\n );\n }\n\n state.records.branches.set(name, state.records.head != null ? state.records.head.id : null);\n state.records.branchConfig.set(name, { name, order });\n checkout(name);\n log.debug('in createBranch');\n};\n\nexport const merge = (mergeDB: MergeDB): void => {\n let otherBranch = mergeDB.branch;\n let customId = mergeDB.id;\n const overrideType = mergeDB.type;\n const customTags = mergeDB.tags;\n const config = getConfig();\n otherBranch = common.sanitizeText(otherBranch, config);\n if (customId) {\n customId = common.sanitizeText(customId, config);\n }\n const currentBranchCheck = state.records.branches.get(state.records.currBranch);\n const otherBranchCheck = state.records.branches.get(otherBranch);\n const currentCommit = currentBranchCheck\n ? state.records.commits.get(currentBranchCheck)\n : undefined;\n const otherCommit: Commit | undefined = otherBranchCheck\n ? state.records.commits.get(otherBranchCheck)\n : undefined;\n if (currentCommit && otherCommit && currentCommit.branch === otherBranch) {\n throw new Error(`Cannot merge branch '${otherBranch}' into itself.`);\n }\n if (state.records.currBranch === otherBranch) {\n const error: any = new Error('Incorrect usage of \"merge\". Cannot merge a branch to itself');\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['branch abc'],\n };\n throw error;\n }\n if (currentCommit === undefined || !currentCommit) {\n const error: any = new Error(\n `Incorrect usage of \"merge\". Current branch (${state.records.currBranch})has no commits`\n );\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['commit'],\n };\n throw error;\n }\n if (!state.records.branches.has(otherBranch)) {\n const error: any = new Error(\n 'Incorrect usage of \"merge\". Branch to be merged (' + otherBranch + ') does not exist'\n );\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: [`branch ${otherBranch}`],\n };\n throw error;\n }\n if (otherCommit === undefined || !otherCommit) {\n const error: any = new Error(\n 'Incorrect usage of \"merge\". Branch to be merged (' + otherBranch + ') has no commits'\n );\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['\"commit\"'],\n };\n throw error;\n }\n if (currentCommit === otherCommit) {\n const error: any = new Error('Incorrect usage of \"merge\". Both branches have same head');\n error.hash = {\n text: `merge ${otherBranch}`,\n token: `merge ${otherBranch}`,\n expected: ['branch abc'],\n };\n throw error;\n }\n if (customId && state.records.commits.has(customId)) {\n const error: any = new Error(\n 'Incorrect usage of \"merge\". Commit with id:' +\n customId +\n ' already exists, use different custom Id'\n );\n error.hash = {\n text: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(' ')}`,\n token: `merge ${otherBranch} ${customId} ${overrideType} ${customTags?.join(' ')}`,\n expected: [\n `merge ${otherBranch} ${customId}_UNIQUE ${overrideType} ${customTags?.join(' ')}`,\n ],\n };\n\n throw error;\n }\n\n const verifiedBranch: string = otherBranchCheck ? otherBranchCheck : ''; //figure out a cleaner way to do this\n\n const commit = {\n id: customId || `${state.records.seq}-${getID()}`,\n message: `merged branch ${otherBranch} into ${state.records.currBranch}`,\n seq: state.records.seq++,\n parents: state.records.head == null ? [] : [state.records.head.id, verifiedBranch],\n branch: state.records.currBranch,\n type: commitType.MERGE,\n customType: overrideType,\n customId: customId ? true : false,\n tags: customTags ?? [],\n } satisfies Commit;\n state.records.head = commit;\n state.records.commits.set(commit.id, commit);\n state.records.branches.set(state.records.currBranch, commit.id);\n log.debug(state.records.branches);\n log.debug('in mergeBranch');\n};\n\nexport const cherryPick = function (cherryPickDB: CherryPickDB) {\n let sourceId = cherryPickDB.id;\n let targetId = cherryPickDB.targetId;\n let tags = cherryPickDB.tags;\n let parentCommitId = cherryPickDB.parent;\n log.debug('Entering cherryPick:', sourceId, targetId, tags);\n const config = getConfig();\n sourceId = common.sanitizeText(sourceId, config);\n targetId = common.sanitizeText(targetId, config);\n\n tags = tags?.map((tag) => common.sanitizeText(tag, config));\n\n parentCommitId = common.sanitizeText(parentCommitId, config);\n\n if (!sourceId || !state.records.commits.has(sourceId)) {\n const error: any = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit id should exist and provided'\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n\n const sourceCommit = state.records.commits.get(sourceId);\n if (sourceCommit === undefined || !sourceCommit) {\n throw new Error('Incorrect usage of \"cherryPick\". Source commit id should exist and provided');\n }\n if (\n parentCommitId &&\n !(Array.isArray(sourceCommit.parents) && sourceCommit.parents.includes(parentCommitId))\n ) {\n const error = new Error(\n 'Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.'\n );\n throw error;\n }\n const sourceCommitBranch = sourceCommit.branch;\n if (sourceCommit.type === commitType.MERGE && !parentCommitId) {\n const error = new Error(\n 'Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.'\n );\n throw error;\n }\n if (!targetId || !state.records.commits.has(targetId)) {\n // cherry-pick source commit to current branch\n\n if (sourceCommitBranch === state.records.currBranch) {\n const error: any = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit is already on current branch'\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n const currentCommitId = state.records.branches.get(state.records.currBranch);\n if (currentCommitId === undefined || !currentCommitId) {\n const error: any = new Error(\n `Incorrect usage of \"cherry-pick\". Current branch (${state.records.currBranch})has no commits`\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n\n const currentCommit = state.records.commits.get(currentCommitId);\n if (currentCommit === undefined || !currentCommit) {\n const error: any = new Error(\n `Incorrect usage of \"cherry-pick\". Current branch (${state.records.currBranch})has no commits`\n );\n error.hash = {\n text: `cherryPick ${sourceId} ${targetId}`,\n token: `cherryPick ${sourceId} ${targetId}`,\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n const commit = {\n id: state.records.seq + '-' + getID(),\n message: `cherry-picked ${sourceCommit?.message} into ${state.records.currBranch}`,\n seq: state.records.seq++,\n parents: state.records.head == null ? [] : [state.records.head.id, sourceCommit.id],\n branch: state.records.currBranch,\n type: commitType.CHERRY_PICK,\n tags: tags\n ? tags.filter(Boolean)\n : [\n `cherry-pick:${sourceCommit.id}${\n sourceCommit.type === commitType.MERGE ? `|parent:${parentCommitId}` : ''\n }`,\n ],\n };\n\n state.records.head = commit;\n state.records.commits.set(commit.id, commit);\n state.records.branches.set(state.records.currBranch, commit.id);\n log.debug(state.records.branches);\n log.debug('in cherryPick');\n }\n};\nexport const checkout = function (branch: string) {\n branch = common.sanitizeText(branch, getConfig());\n if (!state.records.branches.has(branch)) {\n const error: any = new Error(\n `Trying to checkout branch which is not yet created. (Help try using \"branch ${branch}\")`\n );\n error.hash = {\n text: `checkout ${branch}`,\n token: `checkout ${branch}`,\n expected: [`branch ${branch}`],\n };\n throw error;\n } else {\n state.records.currBranch = branch;\n const id = state.records.branches.get(state.records.currBranch);\n if (id === undefined || !id) {\n state.records.head = null;\n } else {\n state.records.head = state.records.commits.get(id) ?? null;\n }\n }\n};\n\n/**\n * @param arr - array\n * @param key - key\n * @param newVal - new value\n */\nfunction upsert(arr: any[], key: any, newVal: any) {\n const index = arr.indexOf(key);\n if (index === -1) {\n arr.push(newVal);\n } else {\n arr.splice(index, 1, newVal);\n }\n}\n\nfunction prettyPrintCommitHistory(commitArr: Commit[]) {\n const commit = commitArr.reduce((out, commit) => {\n if (out.seq > commit.seq) {\n return out;\n }\n return commit;\n }, commitArr[0]);\n let line = '';\n commitArr.forEach(function (c) {\n if (c === commit) {\n line += '\\t*';\n } else {\n line += '\\t|';\n }\n });\n const label = [line, commit.id, commit.seq];\n for (const branch in state.records.branches) {\n if (state.records.branches.get(branch) === commit.id) {\n label.push(branch);\n }\n }\n log.debug(label.join(' '));\n if (commit.parents && commit.parents.length == 2 && commit.parents[0] && commit.parents[1]) {\n const newCommit = state.records.commits.get(commit.parents[0]);\n upsert(commitArr, commit, newCommit);\n if (commit.parents[1]) {\n commitArr.push(state.records.commits.get(commit.parents[1])!);\n }\n } else if (commit.parents.length == 0) {\n return;\n } else {\n if (commit.parents[0]) {\n const newCommit = state.records.commits.get(commit.parents[0]);\n upsert(commitArr, commit, newCommit);\n }\n }\n commitArr = uniqBy(commitArr, (c) => c.id);\n prettyPrintCommitHistory(commitArr);\n}\n\nexport const prettyPrint = function () {\n log.debug(state.records.commits);\n const node = getCommitsArray()[0];\n prettyPrintCommitHistory([node]);\n};\n\nexport const clear = function () {\n state.reset();\n commonClear();\n};\n\nexport const getBranchesAsObjArray = function () {\n const branchesArray = [...state.records.branchConfig.values()]\n .map((branchConfig, i) => {\n if (branchConfig.order !== null && branchConfig.order !== undefined) {\n return branchConfig;\n }\n return {\n ...branchConfig,\n order: parseFloat(`0.${i}`),\n };\n })\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n .map(({ name }) => ({ name }));\n\n return branchesArray;\n};\n\nexport const getBranches = function () {\n return state.records.branches;\n};\nexport const getCommits = function () {\n return state.records.commits;\n};\nexport const getCommitsArray = function () {\n const commitArr = [...state.records.commits.values()];\n commitArr.forEach(function (o) {\n log.debug(o.id);\n });\n commitArr.sort((a, b) => a.seq - b.seq);\n return commitArr;\n};\nexport const getCurrentBranch = function () {\n return state.records.currBranch;\n};\nexport const getDirection = function () {\n return state.records.direction;\n};\nexport const getHead = function () {\n return state.records.head;\n};\n\nexport const db: GitGraphDB = {\n commitType,\n getConfig,\n setDirection,\n setOptions,\n getOptions,\n commit,\n branch,\n merge,\n cherryPick,\n checkout,\n //reset,\n prettyPrint,\n clear,\n getBranchesAsObjArray,\n getBranches,\n getCommits,\n getCommitsArray,\n getCurrentBranch,\n getDirection,\n getHead,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "import type { GitGraph } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport { db } from './gitGraphAst.js';\nimport { commitType } from './gitGraphTypes.js';\nimport type {\n CheckoutAst,\n CherryPickingAst,\n MergeAst,\n CommitAst,\n BranchAst,\n GitGraphDBParseProvider,\n CommitDB,\n BranchDB,\n MergeDB,\n CherryPickDB,\n} from './gitGraphTypes.js';\n\nconst populate = (ast: GitGraph, db: GitGraphDBParseProvider) => {\n populateCommonDb(ast, db);\n // @ts-ignore: this wont exist if the direction is not specified\n if (ast.dir) {\n // @ts-ignore: this wont exist if the direction is not specified\n db.setDirection(ast.dir);\n }\n for (const statement of ast.statements) {\n parseStatement(statement, db);\n }\n};\n\nconst parseStatement = (statement: any, db: GitGraphDBParseProvider) => {\n const parsers: Record void> = {\n Commit: (stmt) => db.commit(parseCommit(stmt)),\n Branch: (stmt) => db.branch(parseBranch(stmt)),\n Merge: (stmt) => db.merge(parseMerge(stmt)),\n Checkout: (stmt) => db.checkout(parseCheckout(stmt)),\n CherryPicking: (stmt) => db.cherryPick(parseCherryPicking(stmt)),\n };\n\n const parser = parsers[statement.$type];\n if (parser) {\n parser(statement);\n } else {\n log.error(`Unknown statement type: ${statement.$type}`);\n }\n};\n\nconst parseCommit = (commit: CommitAst): CommitDB => {\n const commitDB: CommitDB = {\n id: commit.id,\n msg: commit.message ?? '',\n type: commit.type !== undefined ? commitType[commit.type] : commitType.NORMAL,\n tags: commit.tags ?? undefined,\n };\n return commitDB;\n};\n\nconst parseBranch = (branch: BranchAst): BranchDB => {\n const branchDB: BranchDB = {\n name: branch.name,\n order: branch.order ?? 0,\n };\n return branchDB;\n};\n\nconst parseMerge = (merge: MergeAst): MergeDB => {\n const mergeDB: MergeDB = {\n branch: merge.branch,\n id: merge.id ?? '',\n type: merge.type !== undefined ? commitType[merge.type] : undefined,\n tags: merge.tags ?? undefined,\n };\n return mergeDB;\n};\n\nconst parseCheckout = (checkout: CheckoutAst): string => {\n const branch = checkout.branch;\n return branch;\n};\n\nconst parseCherryPicking = (cherryPicking: CherryPickingAst): CherryPickDB => {\n const cherryPickDB: CherryPickDB = {\n id: cherryPicking.id,\n targetId: '',\n tags: cherryPicking.tags?.length === 0 ? undefined : cherryPicking.tags,\n parent: cherryPicking.parent,\n };\n return cherryPickDB;\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: GitGraph = await parse('gitGraph', input);\n log.debug(ast);\n populate(ast, db);\n },\n};\n\nif (import.meta.vitest) {\n const { it, expect, describe } = import.meta.vitest;\n\n const mockDB: GitGraphDBParseProvider = {\n commitType: commitType,\n setDirection: vi.fn(),\n commit: vi.fn(),\n branch: vi.fn(),\n merge: vi.fn(),\n cherryPick: vi.fn(),\n checkout: vi.fn(),\n };\n\n describe('GitGraph Parser', () => {\n it('should parse a commit statement', () => {\n const commit = {\n $type: 'Commit',\n id: '1',\n message: 'test',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n };\n parseStatement(commit, mockDB);\n expect(mockDB.commit).toHaveBeenCalledWith({\n id: '1',\n msg: 'test',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n });\n it('should parse a branch statement', () => {\n const branch = {\n $type: 'Branch',\n name: 'newBranch',\n order: 1,\n };\n parseStatement(branch, mockDB);\n expect(mockDB.branch).toHaveBeenCalledWith({ name: 'newBranch', order: 1 });\n });\n it('should parse a checkout statement', () => {\n const checkout = {\n $type: 'Checkout',\n branch: 'newBranch',\n };\n parseStatement(checkout, mockDB);\n expect(mockDB.checkout).toHaveBeenCalledWith('newBranch');\n });\n it('should parse a merge statement', () => {\n const merge = {\n $type: 'Merge',\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n };\n parseStatement(merge, mockDB);\n expect(mockDB.merge).toHaveBeenCalledWith({\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n });\n it('should parse a cherry picking statement', () => {\n const cherryPick = {\n $type: 'CherryPicking',\n id: '1',\n tags: ['tag1', 'tag2'],\n parent: '2',\n };\n parseStatement(cherryPick, mockDB);\n expect(mockDB.cherryPick).toHaveBeenCalledWith({\n id: '1',\n targetId: '',\n parent: '2',\n tags: ['tag1', 'tag2'],\n });\n });\n\n it('should parse a langium generated gitGraph ast', () => {\n const dummy: GitGraph = {\n $type: 'GitGraph',\n statements: [],\n };\n const gitGraphAst: GitGraph = {\n $type: 'GitGraph',\n statements: [\n {\n $container: dummy,\n $type: 'Commit',\n id: '1',\n message: 'test',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n },\n {\n $container: dummy,\n $type: 'Branch',\n name: 'newBranch',\n order: 1,\n },\n {\n $container: dummy,\n $type: 'Merge',\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 'NORMAL',\n },\n {\n $container: dummy,\n $type: 'Checkout',\n branch: 'newBranch',\n },\n {\n $container: dummy,\n $type: 'CherryPicking',\n id: '1',\n tags: ['tag1', 'tag2'],\n parent: '2',\n },\n ],\n };\n\n populate(gitGraphAst, mockDB);\n\n expect(mockDB.commit).toHaveBeenCalledWith({\n id: '1',\n msg: 'test',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n expect(mockDB.branch).toHaveBeenCalledWith({ name: 'newBranch', order: 1 });\n expect(mockDB.merge).toHaveBeenCalledWith({\n branch: 'newBranch',\n id: '1',\n tags: ['tag1', 'tag2'],\n type: 0,\n });\n expect(mockDB.checkout).toHaveBeenCalledWith('newBranch');\n });\n });\n}\n", "import { select } from 'd3';\nimport { getConfig, setupGraphViewbox } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport utils from '../../utils.js';\nimport type { DrawDefinition } from '../../diagram-api/types.js';\nimport type d3 from 'd3';\nimport type { Commit, GitGraphDBRenderProvider, DiagramOrientation } from './gitGraphTypes.js';\nimport { commitType } from './gitGraphTypes.js';\n\ninterface BranchPosition {\n pos: number;\n index: number;\n}\n\ninterface CommitPosition {\n x: number;\n y: number;\n}\n\ninterface CommitPositionOffset extends CommitPosition {\n posWithOffset: number;\n}\n\nconst DEFAULT_CONFIG = getConfig();\nconst DEFAULT_GITGRAPH_CONFIG = DEFAULT_CONFIG?.gitGraph;\nconst LAYOUT_OFFSET = 10;\nconst COMMIT_STEP = 40;\nconst PX = 4;\nconst PY = 2;\n\nconst THEME_COLOR_LIMIT = 8;\nconst branchPos = new Map();\nconst commitPos = new Map();\nconst defaultPos = 30;\n\nlet allCommitsDict = new Map();\nlet lanes: number[] = [];\nlet maxPos = 0;\nlet dir: DiagramOrientation = 'LR';\n\nconst clear = () => {\n branchPos.clear();\n commitPos.clear();\n allCommitsDict.clear();\n maxPos = 0;\n lanes = [];\n dir = 'LR';\n};\n\nconst drawText = (txt: string | string[]) => {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n const rows = typeof txt === 'string' ? txt.split(/\\\\n|\\n|/gi) : txt;\n\n rows.forEach((row) => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n tspan.setAttribute('class', 'row');\n tspan.textContent = row.trim();\n svgLabel.appendChild(tspan);\n });\n\n return svgLabel;\n};\n\nconst findClosestParent = (parents: string[]): string | undefined => {\n let closestParent: string | undefined;\n let comparisonFunc;\n let targetPosition: number;\n if (dir === 'BT') {\n comparisonFunc = (a: number, b: number) => a <= b;\n targetPosition = Infinity;\n } else {\n comparisonFunc = (a: number, b: number) => a >= b;\n targetPosition = 0;\n }\n\n parents.forEach((parent) => {\n const parentPosition =\n dir === 'TB' || dir == 'BT' ? commitPos.get(parent)?.y : commitPos.get(parent)?.x;\n\n if (parentPosition !== undefined && comparisonFunc(parentPosition, targetPosition)) {\n closestParent = parent;\n targetPosition = parentPosition;\n }\n });\n\n return closestParent;\n};\n\nconst findClosestParentBT = (parents: string[]) => {\n let closestParent = '';\n let maxPosition = Infinity;\n\n parents.forEach((parent) => {\n const parentPosition = commitPos.get(parent)!.y;\n if (parentPosition <= maxPosition) {\n closestParent = parent;\n maxPosition = parentPosition;\n }\n });\n return closestParent || undefined;\n};\n\nconst setParallelBTPos = (\n sortedKeys: string[],\n commits: Map,\n defaultPos: number\n) => {\n let curPos = defaultPos;\n let maxPosition = defaultPos;\n const roots: Commit[] = [];\n\n sortedKeys.forEach((key) => {\n const commit = commits.get(key);\n if (!commit) {\n throw new Error(`Commit not found for key ${key}`);\n }\n\n if (commit.parents.length) {\n curPos = calculateCommitPosition(commit);\n maxPosition = Math.max(curPos, maxPosition);\n } else {\n roots.push(commit);\n }\n setCommitPosition(commit, curPos);\n });\n\n curPos = maxPosition;\n roots.forEach((commit) => {\n setRootPosition(commit, curPos, defaultPos);\n });\n sortedKeys.forEach((key) => {\n const commit = commits.get(key);\n\n if (commit?.parents.length) {\n const closestParent = findClosestParentBT(commit.parents)!;\n curPos = commitPos.get(closestParent)!.y - COMMIT_STEP;\n if (curPos <= maxPosition) {\n maxPosition = curPos;\n }\n const x = branchPos.get(commit.branch)!.pos;\n const y = curPos - LAYOUT_OFFSET;\n commitPos.set(commit.id, { x: x, y: y });\n }\n });\n};\n\nconst findClosestParentPos = (commit: Commit): number => {\n const closestParent = findClosestParent(commit.parents.filter((p) => p !== null));\n if (!closestParent) {\n throw new Error(`Closest parent not found for commit ${commit.id}`);\n }\n\n const closestParentPos = commitPos.get(closestParent)?.y;\n if (closestParentPos === undefined) {\n throw new Error(`Closest parent position not found for commit ${commit.id}`);\n }\n return closestParentPos;\n};\n\nconst calculateCommitPosition = (commit: Commit): number => {\n const closestParentPos = findClosestParentPos(commit);\n return closestParentPos + COMMIT_STEP;\n};\n\nconst setCommitPosition = (commit: Commit, curPos: number): CommitPosition => {\n const branch = branchPos.get(commit.branch);\n\n if (!branch) {\n throw new Error(`Branch not found for commit ${commit.id}`);\n }\n\n const x = branch.pos;\n const y = curPos + LAYOUT_OFFSET;\n commitPos.set(commit.id, { x, y });\n return { x, y };\n};\n\nconst setRootPosition = (commit: Commit, curPos: number, defaultPos: number) => {\n const branch = branchPos.get(commit.branch);\n if (!branch) {\n throw new Error(`Branch not found for commit ${commit.id}`);\n }\n\n const y = curPos + defaultPos;\n const x = branch.pos;\n commitPos.set(commit.id, { x, y });\n};\n\nconst drawCommitBullet = (\n gBullets: d3.Selection,\n commit: Commit,\n commitPosition: CommitPositionOffset,\n typeClass: string,\n branchIndex: number,\n commitSymbolType: number\n) => {\n if (commitSymbolType === commitType.HIGHLIGHT) {\n gBullets\n .append('rect')\n .attr('x', commitPosition.x - 10)\n .attr('y', commitPosition.y - 10)\n .attr('width', 20)\n .attr('height', 20)\n .attr(\n 'class',\n `commit ${commit.id} commit-highlight${branchIndex % THEME_COLOR_LIMIT} ${typeClass}-outer`\n );\n gBullets\n .append('rect')\n .attr('x', commitPosition.x - 6)\n .attr('y', commitPosition.y - 6)\n .attr('width', 12)\n .attr('height', 12)\n .attr(\n 'class',\n `commit ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT} ${typeClass}-inner`\n );\n } else if (commitSymbolType === commitType.CHERRY_PICK) {\n gBullets\n .append('circle')\n .attr('cx', commitPosition.x)\n .attr('cy', commitPosition.y)\n .attr('r', 10)\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('circle')\n .attr('cx', commitPosition.x - 3)\n .attr('cy', commitPosition.y + 2)\n .attr('r', 2.75)\n .attr('fill', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('circle')\n .attr('cx', commitPosition.x + 3)\n .attr('cy', commitPosition.y + 2)\n .attr('r', 2.75)\n .attr('fill', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('line')\n .attr('x1', commitPosition.x + 3)\n .attr('y1', commitPosition.y + 1)\n .attr('x2', commitPosition.x)\n .attr('y2', commitPosition.y - 5)\n .attr('stroke', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('line')\n .attr('x1', commitPosition.x - 3)\n .attr('y1', commitPosition.y + 1)\n .attr('x2', commitPosition.x)\n .attr('y2', commitPosition.y - 5)\n .attr('stroke', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n } else {\n const circle = gBullets.append('circle');\n circle.attr('cx', commitPosition.x);\n circle.attr('cy', commitPosition.y);\n circle.attr('r', commit.type === commitType.MERGE ? 9 : 10);\n circle.attr('class', `commit ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT}`);\n if (commitSymbolType === commitType.MERGE) {\n const circle2 = gBullets.append('circle');\n circle2.attr('cx', commitPosition.x);\n circle2.attr('cy', commitPosition.y);\n circle2.attr('r', 6);\n circle2.attr(\n 'class',\n `commit ${typeClass} ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT}`\n );\n }\n if (commitSymbolType === commitType.REVERSE) {\n const cross = gBullets.append('path');\n cross\n .attr(\n 'd',\n `M ${commitPosition.x - 5},${commitPosition.y - 5}L${commitPosition.x + 5},${commitPosition.y + 5}M${commitPosition.x - 5},${commitPosition.y + 5}L${commitPosition.x + 5},${commitPosition.y - 5}`\n )\n .attr('class', `commit ${typeClass} ${commit.id} commit${branchIndex % THEME_COLOR_LIMIT}`);\n }\n }\n};\n\nconst drawCommitLabel = (\n gLabels: d3.Selection,\n commit: Commit,\n commitPosition: CommitPositionOffset,\n pos: number\n) => {\n if (\n commit.type !== commitType.CHERRY_PICK &&\n ((commit.customId && commit.type === commitType.MERGE) || commit.type !== commitType.MERGE) &&\n DEFAULT_GITGRAPH_CONFIG?.showCommitLabel\n ) {\n const wrapper = gLabels.append('g');\n const labelBkg = wrapper.insert('rect').attr('class', 'commit-label-bkg');\n const text = wrapper\n .append('text')\n .attr('x', pos)\n .attr('y', commitPosition.y + 25)\n .attr('class', 'commit-label')\n .text(commit.id);\n const bbox = text.node()?.getBBox();\n\n if (bbox) {\n labelBkg\n .attr('x', commitPosition.posWithOffset - bbox.width / 2 - PY)\n .attr('y', commitPosition.y + 13.5)\n .attr('width', bbox.width + 2 * PY)\n .attr('height', bbox.height + 2 * PY);\n\n if (dir === 'TB' || dir === 'BT') {\n labelBkg\n .attr('x', commitPosition.x - (bbox.width + 4 * PX + 5))\n .attr('y', commitPosition.y - 12);\n text\n .attr('x', commitPosition.x - (bbox.width + 4 * PX))\n .attr('y', commitPosition.y + bbox.height - 12);\n } else {\n text.attr('x', commitPosition.posWithOffset - bbox.width / 2);\n }\n\n if (DEFAULT_GITGRAPH_CONFIG.rotateCommitLabel) {\n if (dir === 'TB' || dir === 'BT') {\n text.attr(\n 'transform',\n 'rotate(' + -45 + ', ' + commitPosition.x + ', ' + commitPosition.y + ')'\n );\n labelBkg.attr(\n 'transform',\n 'rotate(' + -45 + ', ' + commitPosition.x + ', ' + commitPosition.y + ')'\n );\n } else {\n const r_x = -7.5 - ((bbox.width + 10) / 25) * 9.5;\n const r_y = 10 + (bbox.width / 25) * 8.5;\n wrapper.attr(\n 'transform',\n 'translate(' +\n r_x +\n ', ' +\n r_y +\n ') rotate(' +\n -45 +\n ', ' +\n pos +\n ', ' +\n commitPosition.y +\n ')'\n );\n }\n }\n }\n }\n};\n\nconst drawCommitTags = (\n gLabels: d3.Selection,\n commit: Commit,\n commitPosition: CommitPositionOffset,\n pos: number\n) => {\n if (commit.tags.length > 0) {\n let yOffset = 0;\n let maxTagBboxWidth = 0;\n let maxTagBboxHeight = 0;\n const tagElements = [];\n\n for (const tagValue of commit.tags.reverse()) {\n const rect = gLabels.insert('polygon');\n const hole = gLabels.append('circle');\n const tag = gLabels\n .append('text')\n .attr('y', commitPosition.y - 16 - yOffset)\n .attr('class', 'tag-label')\n .text(tagValue);\n const tagBbox = tag.node()?.getBBox();\n if (!tagBbox) {\n throw new Error('Tag bbox not found');\n }\n\n maxTagBboxWidth = Math.max(maxTagBboxWidth, tagBbox.width);\n maxTagBboxHeight = Math.max(maxTagBboxHeight, tagBbox.height);\n\n tag.attr('x', commitPosition.posWithOffset - tagBbox.width / 2);\n\n tagElements.push({\n tag,\n hole,\n rect,\n yOffset,\n });\n\n yOffset += 20;\n }\n\n for (const { tag, hole, rect, yOffset } of tagElements) {\n const h2 = maxTagBboxHeight / 2;\n const ly = commitPosition.y - 19.2 - yOffset;\n rect.attr('class', 'tag-label-bkg').attr(\n 'points',\n `\n ${pos - maxTagBboxWidth / 2 - PX / 2},${ly + PY} \n ${pos - maxTagBboxWidth / 2 - PX / 2},${ly - PY}\n ${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly - h2 - PY}\n ${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly - h2 - PY}\n ${commitPosition.posWithOffset + maxTagBboxWidth / 2 + PX},${ly + h2 + PY}\n ${commitPosition.posWithOffset - maxTagBboxWidth / 2 - PX},${ly + h2 + PY}`\n );\n\n hole\n .attr('cy', ly)\n .attr('cx', pos - maxTagBboxWidth / 2 + PX / 2)\n .attr('r', 1.5)\n .attr('class', 'tag-hole');\n\n if (dir === 'TB' || dir === 'BT') {\n const yOrigin = pos + yOffset;\n\n rect\n .attr('class', 'tag-label-bkg')\n .attr(\n 'points',\n `\n ${commitPosition.x},${yOrigin + 2}\n ${commitPosition.x},${yOrigin - 2}\n ${commitPosition.x + LAYOUT_OFFSET},${yOrigin - h2 - 2}\n ${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin - h2 - 2}\n ${commitPosition.x + LAYOUT_OFFSET + maxTagBboxWidth + 4},${yOrigin + h2 + 2}\n ${commitPosition.x + LAYOUT_OFFSET},${yOrigin + h2 + 2}`\n )\n .attr('transform', 'translate(12,12) rotate(45, ' + commitPosition.x + ',' + pos + ')');\n hole\n .attr('cx', commitPosition.x + PX / 2)\n .attr('cy', yOrigin)\n .attr('transform', 'translate(12,12) rotate(45, ' + commitPosition.x + ',' + pos + ')');\n tag\n .attr('x', commitPosition.x + 5)\n .attr('y', yOrigin + 3)\n .attr('transform', 'translate(14,14) rotate(45, ' + commitPosition.x + ',' + pos + ')');\n }\n }\n }\n};\n\nconst getCommitClassType = (commit: Commit): string => {\n const commitSymbolType = commit.customType ?? commit.type;\n switch (commitSymbolType) {\n case commitType.NORMAL:\n return 'commit-normal';\n case commitType.REVERSE:\n return 'commit-reverse';\n case commitType.HIGHLIGHT:\n return 'commit-highlight';\n case commitType.MERGE:\n return 'commit-merge';\n case commitType.CHERRY_PICK:\n return 'commit-cherry-pick';\n default:\n return 'commit-normal';\n }\n};\n\nconst calculatePosition = (\n commit: Commit,\n dir: string,\n pos: number,\n commitPos: Map\n): number => {\n const defaultCommitPosition = { x: 0, y: 0 }; // Default position if commit is not found\n\n if (commit.parents.length > 0) {\n const closestParent = findClosestParent(commit.parents);\n if (closestParent) {\n const parentPosition = commitPos.get(closestParent) ?? defaultCommitPosition;\n\n if (dir === 'TB') {\n return parentPosition.y + COMMIT_STEP;\n } else if (dir === 'BT') {\n const currentPosition = commitPos.get(commit.id) ?? defaultCommitPosition;\n return currentPosition.y - COMMIT_STEP;\n } else {\n return parentPosition.x + COMMIT_STEP;\n }\n }\n } else {\n if (dir === 'TB') {\n return defaultPos;\n } else if (dir === 'BT') {\n const currentPosition = commitPos.get(commit.id) ?? defaultCommitPosition;\n return currentPosition.y - COMMIT_STEP;\n } else {\n return 0;\n }\n }\n return 0;\n};\n\nconst getCommitPosition = (\n commit: Commit,\n pos: number,\n isParallelCommits: boolean\n): CommitPositionOffset => {\n const posWithOffset = dir === 'BT' && isParallelCommits ? pos : pos + LAYOUT_OFFSET;\n const y = dir === 'TB' || dir === 'BT' ? posWithOffset : branchPos.get(commit.branch)?.pos;\n const x = dir === 'TB' || dir === 'BT' ? branchPos.get(commit.branch)?.pos : posWithOffset;\n if (x === undefined || y === undefined) {\n throw new Error(`Position were undefined for commit ${commit.id}`);\n }\n return { x, y, posWithOffset };\n};\n\nconst drawCommits = (\n svg: d3.Selection,\n commits: Map,\n modifyGraph: boolean\n) => {\n if (!DEFAULT_GITGRAPH_CONFIG) {\n throw new Error('GitGraph config not found');\n }\n const gBullets = svg.append('g').attr('class', 'commit-bullets');\n const gLabels = svg.append('g').attr('class', 'commit-labels');\n let pos = dir === 'TB' || dir === 'BT' ? defaultPos : 0;\n const keys = [...commits.keys()];\n const isParallelCommits = DEFAULT_GITGRAPH_CONFIG?.parallelCommits ?? false;\n\n const sortKeys = (a: string, b: string) => {\n const seqA = commits.get(a)?.seq;\n const seqB = commits.get(b)?.seq;\n return seqA !== undefined && seqB !== undefined ? seqA - seqB : 0;\n };\n\n let sortedKeys = keys.sort(sortKeys);\n if (dir === 'BT') {\n if (isParallelCommits) {\n setParallelBTPos(sortedKeys, commits, pos);\n }\n sortedKeys = sortedKeys.reverse();\n }\n\n sortedKeys.forEach((key) => {\n const commit = commits.get(key);\n if (!commit) {\n throw new Error(`Commit not found for key ${key}`);\n }\n if (isParallelCommits) {\n pos = calculatePosition(commit, dir, pos, commitPos);\n }\n\n const commitPosition = getCommitPosition(commit, pos, isParallelCommits);\n // Don't draw the commits now but calculate the positioning which is used by the branch lines etc.\n if (modifyGraph) {\n const typeClass = getCommitClassType(commit);\n const commitSymbolType = commit.customType ?? commit.type;\n const branchIndex = branchPos.get(commit.branch)?.index ?? 0;\n drawCommitBullet(gBullets, commit, commitPosition, typeClass, branchIndex, commitSymbolType);\n drawCommitLabel(gLabels, commit, commitPosition, pos);\n drawCommitTags(gLabels, commit, commitPosition, pos);\n }\n if (dir === 'TB' || dir === 'BT') {\n commitPos.set(commit.id, { x: commitPosition.x, y: commitPosition.posWithOffset });\n } else {\n commitPos.set(commit.id, { x: commitPosition.posWithOffset, y: commitPosition.y });\n }\n pos = dir === 'BT' && isParallelCommits ? pos + COMMIT_STEP : pos + COMMIT_STEP + LAYOUT_OFFSET;\n if (pos > maxPos) {\n maxPos = pos;\n }\n });\n};\n\nconst shouldRerouteArrow = (\n commitA: Commit,\n commitB: Commit,\n p1: CommitPosition,\n p2: CommitPosition,\n allCommits: Map\n) => {\n const commitBIsFurthest = dir === 'TB' || dir === 'BT' ? p1.x < p2.x : p1.y < p2.y;\n const branchToGetCurve = commitBIsFurthest ? commitB.branch : commitA.branch;\n const isOnBranchToGetCurve = (x: Commit) => x.branch === branchToGetCurve;\n const isBetweenCommits = (x: Commit) => x.seq > commitA.seq && x.seq < commitB.seq;\n return [...allCommits.values()].some((commitX) => {\n return isBetweenCommits(commitX) && isOnBranchToGetCurve(commitX);\n });\n};\n\nconst findLane = (y1: number, y2: number, depth = 0): number => {\n const candidate = y1 + Math.abs(y1 - y2) / 2;\n if (depth > 5) {\n return candidate;\n }\n\n const ok = lanes.every((lane) => Math.abs(lane - candidate) >= 10);\n if (ok) {\n lanes.push(candidate);\n return candidate;\n }\n const diff = Math.abs(y1 - y2);\n return findLane(y1, y2 - diff / 5, depth + 1);\n};\n\nconst drawArrow = (\n svg: d3.Selection,\n commitA: Commit,\n commitB: Commit,\n allCommits: Map\n) => {\n const p1 = commitPos.get(commitA.id); // arrowStart\n const p2 = commitPos.get(commitB.id); // arrowEnd\n if (p1 === undefined || p2 === undefined) {\n throw new Error(`Commit positions not found for commits ${commitA.id} and ${commitB.id}`);\n }\n const arrowNeedsRerouting = shouldRerouteArrow(commitA, commitB, p1, p2, allCommits);\n // log.debug('drawArrow', p1, p2, arrowNeedsRerouting, commitA.id, commitB.id);\n\n // Lower-right quadrant logic; top-left is 0,0\n\n let arc = '';\n let arc2 = '';\n let radius = 0;\n let offset = 0;\n\n let colorClassNum = branchPos.get(commitB.branch)?.index;\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n colorClassNum = branchPos.get(commitA.branch)?.index;\n }\n\n let lineDef;\n if (arrowNeedsRerouting) {\n arc = 'A 10 10, 0, 0, 0,';\n arc2 = 'A 10 10, 0, 0, 1,';\n radius = 10;\n offset = 10;\n\n const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);\n\n const lineX = p1.x < p2.x ? findLane(p1.x, p2.x) : findLane(p2.x, p1.x);\n\n if (dir === 'TB') {\n if (p1.x < p2.x) {\n // Source commit is on branch position left of destination commit\n // so render arrow rightward with colour of destination branch\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc2} ${lineX} ${\n p1.y + offset\n } L ${lineX} ${p2.y - radius} ${arc} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;\n } else {\n // Source commit is on branch position right of destination commit\n // so render arrow leftward with colour of source branch\n\n colorClassNum = branchPos.get(commitA.branch)?.index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc} ${lineX} ${p1.y + offset} L ${lineX} ${p2.y - radius} ${arc2} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;\n }\n } else if (dir === 'BT') {\n if (p1.x < p2.x) {\n // Source commit is on branch position left of destination commit\n // so render arrow rightward with colour of destination branch\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX - radius} ${p1.y} ${arc} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc2} ${lineX + offset} ${p2.y} L ${p2.x} ${p2.y}`;\n } else {\n // Source commit is on branch position right of destination commit\n // so render arrow leftward with colour of source branch\n\n colorClassNum = branchPos.get(commitA.branch)?.index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${lineX + radius} ${p1.y} ${arc2} ${lineX} ${p1.y - offset} L ${lineX} ${p2.y + radius} ${arc} ${lineX - offset} ${p2.y} L ${p2.x} ${p2.y}`;\n }\n } else {\n if (p1.y < p2.y) {\n // Source commit is on branch positioned above destination commit\n // so render arrow downward with colour of destination branch\n\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${\n p1.x + offset\n } ${lineY} L ${p2.x - radius} ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;\n } else {\n // Source commit is on branch positioned below destination commit\n // so render arrow upward with colour of source branch\n\n colorClassNum = branchPos.get(commitA.branch)?.index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${\n p1.x + offset\n } ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`;\n }\n }\n } else {\n arc = 'A 20 20, 0, 0, 0,';\n arc2 = 'A 20 20, 0, 0, 1,';\n radius = 20;\n offset = 20;\n\n if (dir === 'TB') {\n if (p1.x < p2.x) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${\n p1.y + offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n\n if (p1.x > p2.x) {\n arc = 'A 20 20, 0, 0, 0,';\n arc2 = 'A 20 20, 0, 0, 1,';\n radius = 20;\n offset = 20;\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc2} ${p1.x - offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x + radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y + offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n if (p1.x === p2.x) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;\n }\n } else if (dir === 'BT') {\n if (p1.x < p2.x) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y - offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n if (p1.x > p2.x) {\n arc = 'A 20 20, 0, 0, 0,';\n arc2 = 'A 20 20, 0, 0, 1,';\n radius = 20;\n offset = 20;\n\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc} ${p1.x - offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y - offset\n } L ${p2.x} ${p2.y}`;\n }\n }\n\n if (p1.x === p2.x) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;\n }\n } else {\n if (p1.y < p2.y) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc2} ${p2.x} ${\n p1.y + offset\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n }\n }\n if (p1.y > p2.y) {\n if (commitB.type === commitType.MERGE && commitA.id !== commitB.parents[0]) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${\n p1.y - offset\n } L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y + radius} ${arc2} ${p1.x + offset} ${\n p2.y\n } L ${p2.x} ${p2.y}`;\n }\n }\n\n if (p1.y === p2.y) {\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x} ${p2.y}`;\n }\n }\n }\n if (lineDef === undefined) {\n throw new Error('Line definition not found');\n }\n svg\n .append('path')\n .attr('d', lineDef)\n .attr('class', 'arrow arrow' + (colorClassNum! % THEME_COLOR_LIMIT));\n};\n\nconst drawArrows = (\n svg: d3.Selection,\n commits: Map\n) => {\n const gArrows = svg.append('g').attr('class', 'commit-arrows');\n [...commits.keys()].forEach((key) => {\n const commit = commits.get(key);\n\n if (commit!.parents && commit!.parents.length > 0) {\n commit!.parents.forEach((parent) => {\n drawArrow(gArrows, commits.get(parent)!, commit!, commits);\n });\n }\n });\n};\n\nconst drawBranches = (\n svg: d3.Selection,\n branches: { name: string }[]\n) => {\n const g = svg.append('g');\n branches.forEach((branch, index) => {\n const adjustIndexForTheme = index % THEME_COLOR_LIMIT;\n\n const pos = branchPos.get(branch.name)?.pos;\n if (pos === undefined) {\n throw new Error(`Position not found for branch ${branch.name}`);\n }\n const line = g.append('line');\n line.attr('x1', 0);\n line.attr('y1', pos);\n line.attr('x2', maxPos);\n line.attr('y2', pos);\n line.attr('class', 'branch branch' + adjustIndexForTheme);\n\n if (dir === 'TB') {\n line.attr('y1', defaultPos);\n line.attr('x1', pos);\n line.attr('y2', maxPos);\n line.attr('x2', pos);\n } else if (dir === 'BT') {\n line.attr('y1', maxPos);\n line.attr('x1', pos);\n line.attr('y2', defaultPos);\n line.attr('x2', pos);\n }\n lanes.push(pos);\n\n const name = branch.name;\n\n // Create the actual text element\n const labelElement = drawText(name);\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const bkg = g.insert('rect');\n const branchLabel = g.insert('g').attr('class', 'branchLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = branchLabel.insert('g').attr('class', 'label branch-label' + adjustIndexForTheme);\n\n label.node()!.appendChild(labelElement);\n const bbox = labelElement.getBBox();\n bkg\n .attr('class', 'branchLabelBkg label' + adjustIndexForTheme)\n .attr('rx', 4)\n .attr('ry', 4)\n .attr('x', -bbox.width - 4 - (DEFAULT_GITGRAPH_CONFIG?.rotateCommitLabel === true ? 30 : 0))\n .attr('y', -bbox.height / 2 + 8)\n .attr('width', bbox.width + 18)\n .attr('height', bbox.height + 4);\n label.attr(\n 'transform',\n 'translate(' +\n (-bbox.width - 14 - (DEFAULT_GITGRAPH_CONFIG?.rotateCommitLabel === true ? 30 : 0)) +\n ', ' +\n (pos - bbox.height / 2 - 1) +\n ')'\n );\n if (dir === 'TB') {\n bkg.attr('x', pos - bbox.width / 2 - 10).attr('y', 0);\n label.attr('transform', 'translate(' + (pos - bbox.width / 2 - 5) + ', ' + 0 + ')');\n } else if (dir === 'BT') {\n bkg.attr('x', pos - bbox.width / 2 - 10).attr('y', maxPos);\n label.attr('transform', 'translate(' + (pos - bbox.width / 2 - 5) + ', ' + maxPos + ')');\n } else {\n bkg.attr('transform', 'translate(' + -19 + ', ' + (pos - bbox.height / 2) + ')');\n }\n });\n};\n\nconst setBranchPosition = function (\n name: string,\n pos: number,\n index: number,\n bbox: DOMRect,\n rotateCommitLabel: boolean\n): number {\n branchPos.set(name, { pos, index });\n pos += 50 + (rotateCommitLabel ? 40 : 0) + (dir === 'TB' || dir === 'BT' ? bbox.width / 2 : 0);\n return pos;\n};\n\nexport const draw: DrawDefinition = function (txt, id, ver, diagObj) {\n clear();\n\n log.debug('in gitgraph renderer', txt + '\\n', 'id:', id, ver);\n if (!DEFAULT_GITGRAPH_CONFIG) {\n throw new Error('GitGraph config not found');\n }\n const rotateCommitLabel = DEFAULT_GITGRAPH_CONFIG.rotateCommitLabel ?? false;\n const db = diagObj.db as GitGraphDBRenderProvider;\n allCommitsDict = db.getCommits();\n const branches = db.getBranchesAsObjArray();\n dir = db.getDirection();\n const diagram = select(`[id=\"${id}\"]`);\n let pos = 0;\n\n branches.forEach((branch, index) => {\n const labelElement = drawText(branch.name);\n const g = diagram.append('g');\n const branchLabel = g.insert('g').attr('class', 'branchLabel');\n const label = branchLabel.insert('g').attr('class', 'label branch-label');\n label.node()?.appendChild(labelElement);\n const bbox = labelElement.getBBox();\n\n pos = setBranchPosition(branch.name, pos, index, bbox, rotateCommitLabel);\n label.remove();\n branchLabel.remove();\n g.remove();\n });\n\n drawCommits(diagram, allCommitsDict, false);\n if (DEFAULT_GITGRAPH_CONFIG.showBranches) {\n drawBranches(diagram, branches);\n }\n drawArrows(diagram, allCommitsDict);\n drawCommits(diagram, allCommitsDict, true);\n\n utils.insertTitle(\n diagram,\n 'gitTitleText',\n DEFAULT_GITGRAPH_CONFIG.titleTopMargin ?? 0,\n db.getDiagramTitle()\n );\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n diagram,\n DEFAULT_GITGRAPH_CONFIG.diagramPadding,\n DEFAULT_GITGRAPH_CONFIG.useMaxWidth\n );\n};\n\nexport default {\n draw,\n};\n\nif (import.meta.vitest) {\n const { it, expect, describe } = import.meta.vitest;\n\n describe('drawText', () => {\n it('should drawText', () => {\n const svgLabel = drawText('main');\n expect(svgLabel).toBeDefined();\n expect(svgLabel.children[0].innerHTML).toBe('main');\n });\n });\n\n describe('branchPosition', () => {\n const bbox: DOMRect = {\n x: 0,\n y: 0,\n width: 10,\n height: 10,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n toJSON: () => '',\n };\n\n it('should setBranchPositions LR with two branches', () => {\n dir = 'LR';\n\n const pos = setBranchPosition('main', 0, 0, bbox, true);\n expect(pos).toBe(90);\n expect(branchPos.get('main')).toEqual({ pos: 0, index: 0 });\n const posNext = setBranchPosition('develop', pos, 1, bbox, true);\n expect(posNext).toBe(180);\n expect(branchPos.get('develop')).toEqual({ pos: pos, index: 1 });\n });\n\n it('should setBranchPositions TB with two branches', () => {\n dir = 'TB';\n bbox.width = 34.9921875;\n\n const pos = setBranchPosition('main', 0, 0, bbox, true);\n expect(pos).toBe(107.49609375);\n expect(branchPos.get('main')).toEqual({ pos: 0, index: 0 });\n\n bbox.width = 56.421875;\n const posNext = setBranchPosition('develop', pos, 1, bbox, true);\n expect(posNext).toBe(225.70703125);\n expect(branchPos.get('develop')).toEqual({ pos: pos, index: 1 });\n });\n });\n\n describe('commitPosition', () => {\n const commits = new Map([\n [\n 'commitZero',\n {\n id: 'ZERO',\n message: '',\n seq: 0,\n type: commitType.NORMAL,\n tags: [],\n parents: [],\n branch: 'main',\n },\n ],\n [\n 'commitA',\n {\n id: 'A',\n message: '',\n seq: 1,\n type: commitType.NORMAL,\n tags: [],\n parents: ['ZERO'],\n branch: 'feature',\n },\n ],\n [\n 'commitB',\n {\n id: 'B',\n message: '',\n seq: 2,\n type: commitType.NORMAL,\n tags: [],\n parents: ['A'],\n branch: 'feature',\n },\n ],\n [\n 'commitM',\n {\n id: 'M',\n message: 'merged branch feature into main',\n seq: 3,\n type: commitType.MERGE,\n tags: [],\n parents: ['ZERO', 'B'],\n branch: 'main',\n customId: true,\n },\n ],\n [\n 'commitC',\n {\n id: 'C',\n message: '',\n seq: 4,\n type: commitType.NORMAL,\n tags: [],\n parents: ['ZERO'],\n branch: 'release',\n },\n ],\n [\n 'commit5_8928ea0',\n {\n id: '5-8928ea0',\n message: 'cherry-picked [object Object] into release',\n seq: 5,\n type: commitType.CHERRY_PICK,\n tags: [],\n parents: ['C', 'M'],\n branch: 'release',\n },\n ],\n [\n 'commitD',\n {\n id: 'D',\n message: '',\n seq: 6,\n type: commitType.NORMAL,\n tags: [],\n parents: ['5-8928ea0'],\n branch: 'release',\n },\n ],\n [\n 'commit7_ed848ba',\n {\n id: '7-ed848ba',\n message: 'cherry-picked [object Object] into release',\n seq: 7,\n type: commitType.CHERRY_PICK,\n tags: [],\n parents: ['D', 'M'],\n branch: 'release',\n },\n ],\n ]);\n let pos = 0;\n branchPos.set('main', { pos: 0, index: 0 });\n branchPos.set('feature', { pos: 107.49609375, index: 1 });\n branchPos.set('release', { pos: 224.03515625, index: 2 });\n\n describe('TB', () => {\n pos = 30;\n dir = 'TB';\n const expectedCommitPositionTB = new Map([\n ['commitZero', { x: 0, y: 40, posWithOffset: 40 }],\n ['commitA', { x: 107.49609375, y: 90, posWithOffset: 90 }],\n ['commitB', { x: 107.49609375, y: 140, posWithOffset: 140 }],\n ['commitM', { x: 0, y: 190, posWithOffset: 190 }],\n ['commitC', { x: 224.03515625, y: 240, posWithOffset: 240 }],\n ['commit5_8928ea0', { x: 224.03515625, y: 290, posWithOffset: 290 }],\n ['commitD', { x: 224.03515625, y: 340, posWithOffset: 340 }],\n ['commit7_ed848ba', { x: 224.03515625, y: 390, posWithOffset: 390 }],\n ]);\n commits.forEach((commit, key) => {\n it(`should give the correct position for commit ${key}`, () => {\n const position = getCommitPosition(commit, pos, false);\n expect(position).toEqual(expectedCommitPositionTB.get(key));\n pos += 50;\n });\n });\n });\n describe('LR', () => {\n let pos = 30;\n dir = 'LR';\n const expectedCommitPositionLR = new Map([\n ['commitZero', { x: 0, y: 40, posWithOffset: 40 }],\n ['commitA', { x: 107.49609375, y: 90, posWithOffset: 90 }],\n ['commitB', { x: 107.49609375, y: 140, posWithOffset: 140 }],\n ['commitM', { x: 0, y: 190, posWithOffset: 190 }],\n ['commitC', { x: 224.03515625, y: 240, posWithOffset: 240 }],\n ['commit5_8928ea0', { x: 224.03515625, y: 290, posWithOffset: 290 }],\n ['commitD', { x: 224.03515625, y: 340, posWithOffset: 340 }],\n ['commit7_ed848ba', { x: 224.03515625, y: 390, posWithOffset: 390 }],\n ]);\n commits.forEach((commit, key) => {\n it(`should give the correct position for commit ${key}`, () => {\n const position = getCommitPosition(commit, pos, false);\n expect(position).toEqual(expectedCommitPositionLR.get(key));\n pos += 50;\n });\n });\n });\n describe('getCommitClassType', () => {\n const expectedCommitClassType = new Map([\n ['commitZero', 'commit-normal'],\n ['commitA', 'commit-normal'],\n ['commitB', 'commit-normal'],\n ['commitM', 'commit-merge'],\n ['commitC', 'commit-normal'],\n ['commit5_8928ea0', 'commit-cherry-pick'],\n ['commitD', 'commit-normal'],\n ['commit7_ed848ba', 'commit-cherry-pick'],\n ]);\n commits.forEach((commit, key) => {\n it(`should give the correct class type for commit ${key}`, () => {\n const classType = getCommitClassType(commit);\n expect(classType).toBe(expectedCommitClassType.get(key));\n });\n });\n });\n });\n describe('building BT parallel commit diagram', () => {\n const commits = new Map([\n [\n '1-abcdefg',\n {\n id: '1-abcdefg',\n message: '',\n seq: 0,\n type: 0,\n tags: [],\n parents: [],\n branch: 'main',\n },\n ],\n [\n '2-abcdefg',\n {\n id: '2-abcdefg',\n message: '',\n seq: 1,\n type: 0,\n tags: [],\n parents: ['1-abcdefg'],\n branch: 'main',\n },\n ],\n [\n '3-abcdefg',\n {\n id: '3-abcdefg',\n message: '',\n seq: 2,\n type: 0,\n tags: [],\n parents: ['2-abcdefg'],\n branch: 'develop',\n },\n ],\n [\n '4-abcdefg',\n {\n id: '4-abcdefg',\n message: '',\n seq: 3,\n type: 0,\n tags: [],\n parents: ['3-abcdefg'],\n branch: 'develop',\n },\n ],\n [\n '5-abcdefg',\n {\n id: '5-abcdefg',\n message: '',\n seq: 4,\n type: 0,\n tags: [],\n parents: ['2-abcdefg'],\n branch: 'feature',\n },\n ],\n [\n '6-abcdefg',\n {\n id: '6-abcdefg',\n message: '',\n seq: 5,\n type: 0,\n tags: [],\n parents: ['5-abcdefg'],\n branch: 'feature',\n },\n ],\n [\n '7-abcdefg',\n {\n id: '7-abcdefg',\n message: '',\n seq: 6,\n type: 0,\n tags: [],\n parents: ['2-abcdefg'],\n branch: 'main',\n },\n ],\n [\n '8-abcdefg',\n {\n id: '8-abcdefg',\n message: '',\n seq: 7,\n type: 0,\n tags: [],\n parents: ['7-abcdefg'],\n branch: 'main',\n },\n ],\n ]);\n const expectedCommitPosition = new Map([\n ['1-abcdefg', { x: 0, y: 40 }],\n ['2-abcdefg', { x: 0, y: 90 }],\n ['3-abcdefg', { x: 107.49609375, y: 140 }],\n ['4-abcdefg', { x: 107.49609375, y: 190 }],\n ['5-abcdefg', { x: 225.70703125, y: 140 }],\n ['6-abcdefg', { x: 225.70703125, y: 190 }],\n ['7-abcdefg', { x: 0, y: 140 }],\n ['8-abcdefg', { x: 0, y: 190 }],\n ]);\n\n const expectedCommitPositionAfterParallel = new Map([\n ['1-abcdefg', { x: 0, y: 210 }],\n ['2-abcdefg', { x: 0, y: 160 }],\n ['3-abcdefg', { x: 107.49609375, y: 110 }],\n ['4-abcdefg', { x: 107.49609375, y: 60 }],\n ['5-abcdefg', { x: 225.70703125, y: 110 }],\n ['6-abcdefg', { x: 225.70703125, y: 60 }],\n ['7-abcdefg', { x: 0, y: 110 }],\n ['8-abcdefg', { x: 0, y: 60 }],\n ]);\n\n const expectedCommitCurrentPosition = new Map([\n ['1-abcdefg', 30],\n ['2-abcdefg', 80],\n ['3-abcdefg', 130],\n ['4-abcdefg', 180],\n ['5-abcdefg', 130],\n ['6-abcdefg', 180],\n ['7-abcdefg', 130],\n ['8-abcdefg', 180],\n ]);\n const sortedKeys = [...expectedCommitPosition.keys()];\n it('should get the correct commit position and current position', () => {\n dir = 'BT';\n let curPos = 30;\n commitPos.clear();\n branchPos.clear();\n branchPos.set('main', { pos: 0, index: 0 });\n branchPos.set('develop', { pos: 107.49609375, index: 1 });\n branchPos.set('feature', { pos: 225.70703125, index: 2 });\n DEFAULT_GITGRAPH_CONFIG!.parallelCommits = true;\n commits.forEach((commit, key) => {\n if (commit.parents.length > 0) {\n curPos = calculateCommitPosition(commit);\n }\n const position = setCommitPosition(commit, curPos);\n expect(position).toEqual(expectedCommitPosition.get(key));\n expect(curPos).toEqual(expectedCommitCurrentPosition.get(key));\n });\n });\n\n it('should get the correct commit position after parallel commits', () => {\n commitPos.clear();\n branchPos.clear();\n dir = 'BT';\n const curPos = 30;\n commitPos.clear();\n branchPos.clear();\n branchPos.set('main', { pos: 0, index: 0 });\n branchPos.set('develop', { pos: 107.49609375, index: 1 });\n branchPos.set('feature', { pos: 225.70703125, index: 2 });\n setParallelBTPos(sortedKeys, commits, curPos);\n sortedKeys.forEach((commit) => {\n const position = commitPos.get(commit);\n expect(position).toEqual(expectedCommitPositionAfterParallel.get(commit));\n });\n });\n });\n DEFAULT_GITGRAPH_CONFIG!.parallelCommits = false;\n it('add', () => {\n commitPos.set('parent1', { x: 1, y: 1 });\n commitPos.set('parent2', { x: 2, y: 2 });\n commitPos.set('parent3', { x: 3, y: 3 });\n dir = 'LR';\n const parents = ['parent1', 'parent2', 'parent3'];\n const closestParent = findClosestParent(parents);\n\n expect(closestParent).toBe('parent3');\n commitPos.clear();\n });\n}\n", "const getStyles = (options) =>\n `\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0, 1, 2, 3, 4, 5, 6, 7]\n .map(\n (i) =>\n `\n .branch-label${i} { fill: ${options['gitBranchLabel' + i]}; }\n .commit${i} { stroke: ${options['git' + i]}; fill: ${options['git' + i]}; }\n .commit-highlight${i} { stroke: ${options['gitInv' + i]}; fill: ${options['gitInv' + i]}; }\n .label${i} { fill: ${options['git' + i]}; }\n .arrow${i} { stroke: ${options['git' + i]}; }\n `\n )\n .join('\\n')}\n\n .branch {\n stroke-width: 1;\n stroke: ${options.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelColor};}\n .commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${\n options.commitLabelBackground\n }; opacity: 0.5; }\n .tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};}\n .tag-label-bkg { fill: ${options.tagLabelBackground}; stroke: ${options.tagLabelBorder}; }\n .tag-hole { fill: ${options.textColor}; }\n\n .commit-merge {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n }\n .commit-reverse {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport { parser } from './gitGraphParser.js';\nimport { db } from './gitGraphAst.js';\nimport gitGraphRenderer from './gitGraphRenderer.js';\nimport gitGraphStyles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer: gitGraphRenderer,\n styles: gitGraphStyles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],$V1=[1,26],$V2=[1,27],$V3=[1,28],$V4=[1,29],$V5=[1,30],$V6=[1,31],$V7=[1,32],$V8=[1,33],$V9=[1,34],$Va=[1,9],$Vb=[1,10],$Vc=[1,11],$Vd=[1,12],$Ve=[1,13],$Vf=[1,14],$Vg=[1,15],$Vh=[1,16],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,23],$Vn=[1,25],$Vo=[1,35];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"gantt\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NL\":10,\"weekday\":11,\"weekday_monday\":12,\"weekday_tuesday\":13,\"weekday_wednesday\":14,\"weekday_thursday\":15,\"weekday_friday\":16,\"weekday_saturday\":17,\"weekday_sunday\":18,\"weekend\":19,\"weekend_friday\":20,\"weekend_saturday\":21,\"dateFormat\":22,\"inclusiveEndDates\":23,\"topAxis\":24,\"axisFormat\":25,\"tickInterval\":26,\"excludes\":27,\"includes\":28,\"todayMarker\":29,\"title\":30,\"acc_title\":31,\"acc_title_value\":32,\"acc_descr\":33,\"acc_descr_value\":34,\"acc_descr_multiline_value\":35,\"section\":36,\"clickStatement\":37,\"taskTxt\":38,\"taskData\":39,\"click\":40,\"callbackname\":41,\"callbackargs\":42,\"href\":43,\"clickStatementDebug\":44,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"gantt\",6:\"EOF\",8:\"SPACE\",10:\"NL\",12:\"weekday_monday\",13:\"weekday_tuesday\",14:\"weekday_wednesday\",15:\"weekday_thursday\",16:\"weekday_friday\",17:\"weekday_saturday\",18:\"weekday_sunday\",20:\"weekend_friday\",21:\"weekend_saturday\",22:\"dateFormat\",23:\"inclusiveEndDates\",24:\"topAxis\",25:\"axisFormat\",26:\"tickInterval\",27:\"excludes\",28:\"includes\",29:\"todayMarker\",30:\"title\",31:\"acc_title\",32:\"acc_title_value\",33:\"acc_descr\",34:\"acc_descr_value\",35:\"acc_descr_multiline_value\",36:\"section\",38:\"taskTxt\",39:\"taskData\",40:\"click\",41:\"callbackname\",42:\"callbackargs\",43:\"href\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\n yy.setWeekday(\"monday\");\nbreak;\ncase 9:\n yy.setWeekday(\"tuesday\");\nbreak;\ncase 10:\n yy.setWeekday(\"wednesday\");\nbreak;\ncase 11:\n yy.setWeekday(\"thursday\");\nbreak;\ncase 12:\n yy.setWeekday(\"friday\");\nbreak;\ncase 13:\n yy.setWeekday(\"saturday\");\nbreak;\ncase 14:\n yy.setWeekday(\"sunday\");\nbreak;\ncase 15:\n yy.setWeekend(\"friday\");\nbreak;\ncase 16:\n yy.setWeekend(\"saturday\");\nbreak;\ncase 17:\nyy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 18:\nyy.enableInclusiveEndDates();this.$=$$[$0].substr(18);\nbreak;\ncase 19:\nyy.TopAxis();this.$=$$[$0].substr(8);\nbreak;\ncase 20:\nyy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);\nbreak;\ncase 21:\nyy.setTickInterval($$[$0].substr(13));this.$=$$[$0].substr(13);\nbreak;\ncase 22:\nyy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);\nbreak;\ncase 23:\nyy.setIncludes($$[$0].substr(9));this.$=$$[$0].substr(9);\nbreak;\ncase 24:\nyy.setTodayMarker($$[$0].substr(12));this.$=$$[$0].substr(12);\nbreak;\ncase 27:\nyy.setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 28:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 29: case 30:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 31:\n yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8); \nbreak;\ncase 33:\nyy.addTask($$[$0-1],$$[$0]);this.$='task';\nbreak;\ncase 34:\nthis.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);\nbreak;\ncase 35:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 36:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);\nbreak;\ncase 37:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);\nbreak;\ncase 38:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);\nbreak;\ncase 39:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);\nbreak;\ncase 40:\nthis.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 41: case 47:\nthis.$=$$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 42: case 43: case 45:\nthis.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\ncase 44: case 46:\nthis.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:$V1,13:$V2,14:$V3,15:$V4,16:$V5,17:$V6,18:$V7,19:18,20:$V8,21:$V9,22:$Va,23:$Vb,24:$Vc,25:$Vd,26:$Ve,27:$Vf,28:$Vg,29:$Vh,30:$Vi,31:$Vj,33:$Vk,35:$Vl,36:$Vm,37:24,38:$Vn,40:$Vo},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:36,11:17,12:$V1,13:$V2,14:$V3,15:$V4,16:$V5,17:$V6,18:$V7,19:18,20:$V8,21:$V9,22:$Va,23:$Vb,24:$Vc,25:$Vd,26:$Ve,27:$Vf,28:$Vg,29:$Vh,30:$Vi,31:$Vj,33:$Vk,35:$Vl,36:$Vm,37:24,38:$Vn,40:$Vo},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,17]),o($V0,[2,18]),o($V0,[2,19]),o($V0,[2,20]),o($V0,[2,21]),o($V0,[2,22]),o($V0,[2,23]),o($V0,[2,24]),o($V0,[2,25]),o($V0,[2,26]),o($V0,[2,27]),{32:[1,37]},{34:[1,38]},o($V0,[2,30]),o($V0,[2,31]),o($V0,[2,32]),{39:[1,39]},o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),{41:[1,40],43:[1,41]},o($V0,[2,4]),o($V0,[2,28]),o($V0,[2,29]),o($V0,[2,33]),o($V0,[2,34],{42:[1,42],43:[1,43]}),o($V0,[2,40],{41:[1,44]}),o($V0,[2,35],{43:[1,45]}),o($V0,[2,36]),o($V0,[2,38],{42:[1,46]}),o($V0,[2,37]),o($V0,[2,39])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 'open_directive'; \nbreak;\ncase 1: this.begin(\"acc_title\");return 31; \nbreak;\ncase 2: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 3: this.begin(\"acc_descr\");return 33; \nbreak;\ncase 4: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 5: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 6: this.popState(); \nbreak;\ncase 7:return \"acc_descr_multiline_value\";\nbreak;\ncase 8:/* skip comments */\nbreak;\ncase 9:/* skip comments */\nbreak;\ncase 10:/* do nothing */\nbreak;\ncase 11:return 10;\nbreak;\ncase 12:/* skip whitespace */\nbreak;\ncase 13:/* skip comments */\nbreak;\ncase 14:this.begin(\"href\");\nbreak;\ncase 15:this.popState();\nbreak;\ncase 16:return 43;\nbreak;\ncase 17:this.begin(\"callbackname\");\nbreak;\ncase 18:this.popState();\nbreak;\ncase 19:this.popState(); this.begin(\"callbackargs\");\nbreak;\ncase 20:return 41;\nbreak;\ncase 21:this.popState();\nbreak;\ncase 22:return 42;\nbreak;\ncase 23:this.begin(\"click\");\nbreak;\ncase 24:this.popState();\nbreak;\ncase 25:return 40;\nbreak;\ncase 26:return 4;\nbreak;\ncase 27:return 22;\nbreak;\ncase 28:return 23;\nbreak;\ncase 29:return 24;\nbreak;\ncase 30:return 25;\nbreak;\ncase 31:return 26;\nbreak;\ncase 32:return 28;\nbreak;\ncase 33:return 27;\nbreak;\ncase 34:return 29;\nbreak;\ncase 35:return 12\nbreak;\ncase 36:return 13\nbreak;\ncase 37:return 14\nbreak;\ncase 38:return 15\nbreak;\ncase 39:return 16\nbreak;\ncase 40:return 17\nbreak;\ncase 41:return 18\nbreak;\ncase 42:return 20\nbreak;\ncase 43:return 21\nbreak;\ncase 44:return 'date';\nbreak;\ncase 45:return 30;\nbreak;\ncase 46:return 'accDescription'\nbreak;\ncase 47:return 36;\nbreak;\ncase 48:return 38;\nbreak;\ncase 49:return 39;\nbreak;\ncase 50:return ':';\nbreak;\ncase 51:return 6;\nbreak;\ncase 52:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:%%(?!\\{)*[^\\n]*)/i,/^(?:[^\\}]%%*[^\\n]*)/i,/^(?:%%*[^\\n]*[\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:%[^\\n]*)/i,/^(?:href[\\s]+[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:call[\\s]+)/i,/^(?:\\([\\s]*\\))/i,/^(?:\\()/i,/^(?:[^(]*)/i,/^(?:\\))/i,/^(?:[^)]*)/i,/^(?:click[\\s]+)/i,/^(?:[\\s\\n])/i,/^(?:[^\\s\\n]*)/i,/^(?:gantt\\b)/i,/^(?:dateFormat\\s[^#\\n;]+)/i,/^(?:inclusiveEndDates\\b)/i,/^(?:topAxis\\b)/i,/^(?:axisFormat\\s[^#\\n;]+)/i,/^(?:tickInterval\\s[^#\\n;]+)/i,/^(?:includes\\s[^#\\n;]+)/i,/^(?:excludes\\s[^#\\n;]+)/i,/^(?:todayMarker\\s[^\\n;]+)/i,/^(?:weekday\\s+monday\\b)/i,/^(?:weekday\\s+tuesday\\b)/i,/^(?:weekday\\s+wednesday\\b)/i,/^(?:weekday\\s+thursday\\b)/i,/^(?:weekday\\s+friday\\b)/i,/^(?:weekday\\s+saturday\\b)/i,/^(?:weekday\\s+sunday\\b)/i,/^(?:weekend\\s+friday\\b)/i,/^(?:weekend\\s+saturday\\b)/i,/^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i,/^(?:title\\s[^\\n]+)/i,/^(?:accDescription\\s[^#\\n;]+)/i,/^(?:section\\s[^\\n]+)/i,/^(?:[^:\\n]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[6,7],\"inclusive\":false},\"acc_descr\":{\"rules\":[4],\"inclusive\":false},\"acc_title\":{\"rules\":[2],\"inclusive\":false},\"callbackargs\":{\"rules\":[21,22],\"inclusive\":false},\"callbackname\":{\"rules\":[18,19,20],\"inclusive\":false},\"href\":{\"rules\":[15,16],\"inclusive\":false},\"click\":{\"rules\":[24,25],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){\"use strict\";var e=\"day\";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf(\"year\"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,\"week\")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return\"isoweek\"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf(\"day\"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(\"day\"):n.bind(this)(e,t)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^-_:/,()\\s\\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(e){var t=h(\"months\"),n=(h(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date(\"\")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){\"use strict\";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||\"YYYY-MM-DDTHH:mm:ssZ\").replace(/\\[([^\\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case\"Q\":return Math.ceil((t.$M+1)/3);case\"Do\":return r.ordinal(t.$D);case\"gggg\":return t.weekYear();case\"GGGG\":return t.isoWeekYear();case\"wo\":return r.ordinal(t.week(),\"W\");case\"w\":case\"ww\":return s.s(t.week(),\"w\"===e?1:2,\"0\");case\"W\":case\"WW\":return s.s(t.isoWeek(),\"W\"===e?1:2,\"0\");case\"k\":case\"kk\":return s.s(String(0===t.$H?24:t.$H),\"k\"===e?1:2,\"0\");case\"X\":return Math.floor(t.$d.getTime()/1e3);case\"x\":return t.$d.getTime();case\"z\":return\"[\"+t.offsetName()+\"]\";case\"zzz\":return\"[\"+t.offsetName(\"long\")+\"]\";default:return e}}));return n.bind(this)(a)}}}));", "import { sanitizeUrl } from '@braintree/sanitize-url';\nimport dayjs from 'dayjs';\nimport dayjsIsoWeek from 'dayjs/plugin/isoWeek.js';\nimport dayjsCustomParseFormat from 'dayjs/plugin/customParseFormat.js';\nimport dayjsAdvancedFormat from 'dayjs/plugin/advancedFormat.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport utils from '../../utils.js';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\n\ndayjs.extend(dayjsIsoWeek);\ndayjs.extend(dayjsCustomParseFormat);\ndayjs.extend(dayjsAdvancedFormat);\n\nconst WEEKEND_START_DAY = { friday: 5, saturday: 6 };\nlet dateFormat = '';\nlet axisFormat = '';\nlet tickInterval = undefined;\nlet todayMarker = '';\nlet includes = [];\nlet excludes = [];\nlet links = new Map();\nlet sections = [];\nlet tasks = [];\nlet currentSection = '';\nlet displayMode = '';\nconst tags = ['active', 'done', 'crit', 'milestone'];\nlet funs = [];\nlet inclusiveEndDates = false;\nlet topAxis = false;\nlet weekday = 'sunday';\nlet weekend = 'saturday';\n\n// The serial order of the task in the script\nlet lastOrder = 0;\n\nexport const clear = function () {\n sections = [];\n tasks = [];\n currentSection = '';\n funs = [];\n taskCnt = 0;\n lastTask = undefined;\n lastTaskID = undefined;\n rawTasks = [];\n dateFormat = '';\n axisFormat = '';\n displayMode = '';\n tickInterval = undefined;\n todayMarker = '';\n includes = [];\n excludes = [];\n inclusiveEndDates = false;\n topAxis = false;\n lastOrder = 0;\n links = new Map();\n commonClear();\n weekday = 'sunday';\n weekend = 'saturday';\n};\n\nexport const setAxisFormat = function (txt) {\n axisFormat = txt;\n};\n\nexport const getAxisFormat = function () {\n return axisFormat;\n};\n\nexport const setTickInterval = function (txt) {\n tickInterval = txt;\n};\n\nexport const getTickInterval = function () {\n return tickInterval;\n};\n\nexport const setTodayMarker = function (txt) {\n todayMarker = txt;\n};\n\nexport const getTodayMarker = function () {\n return todayMarker;\n};\n\nexport const setDateFormat = function (txt) {\n dateFormat = txt;\n};\n\nexport const enableInclusiveEndDates = function () {\n inclusiveEndDates = true;\n};\n\nexport const endDatesAreInclusive = function () {\n return inclusiveEndDates;\n};\n\nexport const enableTopAxis = function () {\n topAxis = true;\n};\n\nexport const topAxisEnabled = function () {\n return topAxis;\n};\n\nexport const setDisplayMode = function (txt) {\n displayMode = txt;\n};\n\nexport const getDisplayMode = function () {\n return displayMode;\n};\n\nexport const getDateFormat = function () {\n return dateFormat;\n};\n\nexport const setIncludes = function (txt) {\n includes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getIncludes = function () {\n return includes;\n};\nexport const setExcludes = function (txt) {\n excludes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getExcludes = function () {\n return excludes;\n};\n\nexport const getLinks = function () {\n return links;\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 10;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks = rawTasks;\n\n return tasks;\n};\n\nexport const isInvalidDate = function (date, dateFormat, excludes, includes) {\n if (includes.includes(date.format(dateFormat.trim()))) {\n return false;\n }\n if (\n excludes.includes('weekends') &&\n (date.isoWeekday() === WEEKEND_START_DAY[weekend] ||\n date.isoWeekday() === WEEKEND_START_DAY[weekend] + 1)\n ) {\n return true;\n }\n if (excludes.includes(date.format('dddd').toLowerCase())) {\n return true;\n }\n return excludes.includes(date.format(dateFormat.trim()));\n};\n\nexport const setWeekday = function (txt) {\n weekday = txt;\n};\n\nexport const getWeekday = function () {\n return weekday;\n};\n\nexport const setWeekend = function (startDay) {\n weekend = startDay;\n};\n\n/**\n * TODO: fully document what this function does and what types it accepts\n *\n * @param {object} task - The task to check.\n * @param {string | Date} task.startTime - Might be a `Date` or a `string`.\n * TODO: is this always a Date?\n * @param {string | Date} task.endTime - Might be a `Date` or a `string`.\n * TODO: is this always a Date?\n * @param {string} dateFormat - Dayjs date format string.\n * @param {*} excludes\n * @param {*} includes\n */\nconst checkTaskDates = function (task, dateFormat, excludes, includes) {\n if (!excludes.length || task.manualEndTime) {\n return;\n }\n let startTime;\n if (task.startTime instanceof Date) {\n startTime = dayjs(task.startTime);\n } else {\n startTime = dayjs(task.startTime, dateFormat, true);\n }\n startTime = startTime.add(1, 'd');\n\n let originalEndTime;\n if (task.endTime instanceof Date) {\n originalEndTime = dayjs(task.endTime);\n } else {\n originalEndTime = dayjs(task.endTime, dateFormat, true);\n }\n const [fixedEndTime, renderEndTime] = fixTaskDates(\n startTime,\n originalEndTime,\n dateFormat,\n excludes,\n includes\n );\n task.endTime = fixedEndTime.toDate();\n task.renderEndTime = renderEndTime;\n};\n\n/**\n * TODO: what does this function do?\n *\n * @param {dayjs.Dayjs} startTime - The start time.\n * @param {dayjs.Dayjs} endTime - The original end time (will return a different end time if it's invalid).\n * @param {string} dateFormat - Dayjs date format string.\n * @param {*} excludes\n * @param {*} includes\n * @returns {[endTime: dayjs.Dayjs, renderEndTime: Date | null]} The new `endTime`, and the end time to render.\n * `renderEndTime` may be `null` if `startTime` is newer than `endTime`.\n */\nconst fixTaskDates = function (startTime, endTime, dateFormat, excludes, includes) {\n let invalid = false;\n let renderEndTime = null;\n while (startTime <= endTime) {\n if (!invalid) {\n renderEndTime = endTime.toDate();\n }\n invalid = isInvalidDate(startTime, dateFormat, excludes, includes);\n if (invalid) {\n endTime = endTime.add(1, 'd');\n }\n startTime = startTime.add(1, 'd');\n }\n return [endTime, renderEndTime];\n};\n\nconst getStartDate = function (prevTime, dateFormat, str) {\n str = str.trim();\n\n // Test for after\n const afterRePattern = /^after\\s+(?[\\d\\w- ]+)/;\n const afterStatement = afterRePattern.exec(str);\n\n if (afterStatement !== null) {\n // check all after ids and take the latest\n let latestTask = null;\n for (const id of afterStatement.groups.ids.split(' ')) {\n let task = findTaskById(id);\n if (task !== undefined && (!latestTask || task.endTime > latestTask.endTime)) {\n latestTask = task;\n }\n }\n\n if (latestTask) {\n return latestTask.endTime;\n }\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n }\n\n // Check for actual date set\n let mDate = dayjs(str, dateFormat.trim(), true);\n if (mDate.isValid()) {\n return mDate.toDate();\n } else {\n log.debug('Invalid date:' + str);\n log.debug('With date format:' + dateFormat.trim());\n const d = new Date(str);\n if (\n d === undefined ||\n isNaN(d.getTime()) ||\n // WebKit browsers can mis-parse invalid dates to be ridiculously\n // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.\n // This can cause virtually infinite loops while rendering, so for the\n // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as\n // invalid.\n d.getFullYear() < -10000 ||\n d.getFullYear() > 10000\n ) {\n throw new Error('Invalid date:' + str);\n }\n return d;\n }\n};\n\n/**\n * Parse a string into the args for `dayjs.add()`.\n *\n * The string have to be compound by a value and a shorthand duration unit. For example `5d`\n * represents 5 days.\n *\n * Please be aware that 1 day may be 23 or 25 hours, if the user lives in an area\n * that has daylight savings time (or even 23.5/24.5 hours in Lord Howe Island!)\n *\n * Shorthand unit supported are:\n *\n * - `y` for years\n * - `M` for months\n * - `w` for weeks\n * - `d` for days\n * - `h` for hours\n * - `s` for seconds\n * - `ms` for milliseconds\n *\n * @param {string} str - A string representing the duration.\n * @returns {[value: number, unit: dayjs.ManipulateType]} Arguments to pass to `dayjs.add()`\n */\nconst parseDuration = function (str) {\n // cspell:disable-next-line\n const statement = /^(\\d+(?:\\.\\d+)?)([Mdhmswy]|ms)$/.exec(str.trim());\n if (statement !== null) {\n return [Number.parseFloat(statement[1]), statement[2]];\n }\n // NaN means an invalid duration\n return [NaN, 'ms'];\n};\n\nconst getEndDate = function (prevTime, dateFormat, str, inclusive = false) {\n str = str.trim();\n\n // test for until\n const untilRePattern = /^until\\s+(?[\\d\\w- ]+)/;\n const untilStatement = untilRePattern.exec(str);\n\n if (untilStatement !== null) {\n // check all until ids and take the earliest\n let earliestTask = null;\n for (const id of untilStatement.groups.ids.split(' ')) {\n let task = findTaskById(id);\n if (task !== undefined && (!earliestTask || task.startTime < earliestTask.startTime)) {\n earliestTask = task;\n }\n }\n\n if (earliestTask) {\n return earliestTask.startTime;\n }\n const today = new Date();\n today.setHours(0, 0, 0, 0);\n return today;\n }\n\n // check for actual date\n let parsedDate = dayjs(str, dateFormat.trim(), true);\n if (parsedDate.isValid()) {\n if (inclusive) {\n parsedDate = parsedDate.add(1, 'd');\n }\n return parsedDate.toDate();\n }\n\n let endTime = dayjs(prevTime);\n const [durationValue, durationUnit] = parseDuration(str);\n if (!Number.isNaN(durationValue)) {\n const newEndTime = endTime.add(durationValue, durationUnit);\n if (newEndTime.isValid()) {\n endTime = newEndTime;\n }\n }\n return endTime.toDate();\n};\n\nlet taskCnt = 0;\nconst parseId = function (idStr) {\n if (idStr === undefined) {\n taskCnt = taskCnt + 1;\n return 'task' + taskCnt;\n }\n return idStr;\n};\n// id, startDate, endDate\n// id, startDate, length\n// id, after x, endDate\n// id, after x, length\n// startDate, endDate\n// startDate, length\n// after x, endDate\n// after x, length\n// endDate\n// length\n\nconst compileData = function (prevTask, dataStr) {\n let ds;\n\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n let endTimeData = '';\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = prevTask.endTime;\n endTimeData = data[0];\n break;\n case 2:\n task.id = parseId();\n task.startTime = getStartDate(undefined, dateFormat, data[0]);\n endTimeData = data[1];\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = getStartDate(undefined, dateFormat, data[1]);\n endTimeData = data[2];\n break;\n default:\n }\n\n if (endTimeData) {\n task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);\n task.manualEndTime = dayjs(endTimeData, 'YYYY-MM-DD', true).isValid();\n checkTaskDates(task, dateFormat, excludes, includes);\n }\n\n return task;\n};\n\nconst parseData = function (prevTaskId, dataStr) {\n let ds;\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = {\n type: 'prevTaskEnd',\n id: prevTaskId,\n };\n task.endTime = {\n data: data[0],\n };\n break;\n case 2:\n task.id = parseId();\n task.startTime = {\n type: 'getStartDate',\n startData: data[0],\n };\n task.endTime = {\n data: data[1],\n };\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = {\n type: 'getStartDate',\n startData: data[1],\n };\n task.endTime = {\n data: data[2],\n };\n break;\n default:\n }\n\n return task;\n};\n\nlet lastTask;\nlet lastTaskID;\nlet rawTasks = [];\nconst taskDb = {};\nexport const addTask = function (descr, data) {\n const rawTask = {\n section: currentSection,\n type: currentSection,\n processed: false,\n manualEndTime: false,\n renderEndTime: null,\n raw: { data: data },\n task: descr,\n classes: [],\n };\n const taskInfo = parseData(lastTaskID, data);\n rawTask.raw.startTime = taskInfo.startTime;\n rawTask.raw.endTime = taskInfo.endTime;\n rawTask.id = taskInfo.id;\n rawTask.prevTaskId = lastTaskID;\n rawTask.active = taskInfo.active;\n rawTask.done = taskInfo.done;\n rawTask.crit = taskInfo.crit;\n rawTask.milestone = taskInfo.milestone;\n rawTask.order = lastOrder;\n\n lastOrder++;\n\n const pos = rawTasks.push(rawTask);\n\n lastTaskID = rawTask.id;\n // Store cross ref\n taskDb[rawTask.id] = pos - 1;\n};\n\nexport const findTaskById = function (id) {\n const pos = taskDb[id];\n return rawTasks[pos];\n};\n\nexport const addTaskOrg = function (descr, data) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n const taskInfo = compileData(lastTask, data);\n newTask.startTime = taskInfo.startTime;\n newTask.endTime = taskInfo.endTime;\n newTask.id = taskInfo.id;\n newTask.active = taskInfo.active;\n newTask.done = taskInfo.done;\n newTask.crit = taskInfo.crit;\n newTask.milestone = taskInfo.milestone;\n lastTask = newTask;\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n const task = rawTasks[pos];\n let startTime = '';\n switch (rawTasks[pos].raw.startTime.type) {\n case 'prevTaskEnd': {\n const prevTask = findTaskById(task.prevTaskId);\n task.startTime = prevTask.endTime;\n break;\n }\n case 'getStartDate':\n startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);\n if (startTime) {\n rawTasks[pos].startTime = startTime;\n }\n break;\n }\n\n if (rawTasks[pos].startTime) {\n rawTasks[pos].endTime = getEndDate(\n rawTasks[pos].startTime,\n dateFormat,\n rawTasks[pos].raw.endTime.data,\n inclusiveEndDates\n );\n if (rawTasks[pos].endTime) {\n rawTasks[pos].processed = true;\n rawTasks[pos].manualEndTime = dayjs(\n rawTasks[pos].raw.endTime.data,\n 'YYYY-MM-DD',\n true\n ).isValid();\n checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);\n }\n }\n\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids Comma separated list of ids\n * @param _linkStr URL to create a link for\n */\nexport const setLink = function (ids, _linkStr) {\n let linkStr = _linkStr;\n if (getConfig().securityLevel !== 'loose') {\n linkStr = sanitizeUrl(_linkStr);\n }\n ids.split(',').forEach(function (id) {\n let rawTask = findTaskById(id);\n if (rawTask !== undefined) {\n pushFun(id, () => {\n window.open(linkStr, '_self');\n });\n links.set(id, linkStr);\n }\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setClass = function (ids, className) {\n ids.split(',').forEach(function (id) {\n let rawTask = findTaskById(id);\n if (rawTask !== undefined) {\n rawTask.classes.push(className);\n }\n });\n};\n\nconst setClickFun = function (id, functionName, functionArgs) {\n if (getConfig().securityLevel !== 'loose') {\n return;\n }\n if (functionName === undefined) {\n return;\n }\n\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n let rawTask = findTaskById(id);\n if (rawTask !== undefined) {\n pushFun(id, () => {\n utils.runFunc(functionName, ...argList);\n });\n }\n};\n\n/**\n * The callbackFunction is executed in a click event bound to the task with the specified id or the\n * task's assigned text\n *\n * @param id The task's id\n * @param callbackFunction A function to be executed when clicked on the task or the task's text\n */\nconst pushFun = function (id, callbackFunction) {\n funs.push(\n function () {\n // const elem = d3.select(element).select(`[id=\"${id}\"]`)\n const elem = document.querySelector(`[id=\"${id}\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n },\n function () {\n // const elem = d3.select(element).select(`[id=\"${id}-text\"]`)\n const elem = document.querySelector(`[id=\"${id}-text\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n }\n );\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\nexport const setClickEvent = function (ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Binds all functions previously added to fun (specified through click) to the element\n *\n * @param element\n */\nexport const bindFunctions = function (element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport default {\n getConfig: () => getConfig().gantt,\n clear,\n setDateFormat,\n getDateFormat,\n enableInclusiveEndDates,\n endDatesAreInclusive,\n enableTopAxis,\n topAxisEnabled,\n setAxisFormat,\n getAxisFormat,\n setTickInterval,\n getTickInterval,\n setTodayMarker,\n getTodayMarker,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n setDisplayMode,\n getDisplayMode,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n findTaskById,\n addTaskOrg,\n setIncludes,\n getIncludes,\n setExcludes,\n getExcludes,\n setClickEvent,\n setLink,\n getLinks,\n bindFunctions,\n parseDuration,\n isInvalidDate,\n setWeekday,\n getWeekday,\n setWeekend,\n};\n\n/**\n * @param data\n * @param task\n * @param tags\n */\nfunction getTaskTags(data, task, tags) {\n let matchFound = true;\n while (matchFound) {\n matchFound = false;\n tags.forEach(function (t) {\n const pattern = '^\\\\s*' + t + '\\\\s*$';\n const regex = new RegExp(pattern);\n if (data[0].match(regex)) {\n task[t] = true;\n data.shift(1);\n matchFound = true;\n }\n });\n }\n}\n", "import dayjs from 'dayjs';\nimport { log } from '../../logger.js';\nimport {\n select,\n scaleTime,\n min,\n max,\n scaleLinear,\n interpolateHcl,\n axisBottom,\n axisTop,\n timeFormat,\n timeMillisecond,\n timeSecond,\n timeMinute,\n timeHour,\n timeDay,\n timeMonday,\n timeTuesday,\n timeWednesday,\n timeThursday,\n timeFriday,\n timeSaturday,\n timeSunday,\n timeMonth,\n} from 'd3';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\nexport const setConf = function () {\n log.debug('Something is calling, setConf, remove the call');\n};\n\n/**\n * This will map any day of the week that can be set in the `weekday` option to\n * the corresponding d3-time function that is used to calculate the ticks.\n */\nconst mapWeekdayToTimeFunction = {\n monday: timeMonday,\n tuesday: timeTuesday,\n wednesday: timeWednesday,\n thursday: timeThursday,\n friday: timeFriday,\n saturday: timeSaturday,\n sunday: timeSunday,\n};\n\n/**\n * For this issue:\n * https://github.com/mermaid-js/mermaid/issues/1618\n *\n * Finds the number of intersections between tasks that happen at any point in time.\n * Used to figure out how many rows are needed to display the tasks when the display\n * mode is set to 'compact'.\n *\n * @param tasks\n * @param orderOffset\n */\nconst getMaxIntersections = (tasks, orderOffset) => {\n let timeline = [...tasks].map(() => -Infinity);\n let sorted = [...tasks].sort((a, b) => a.startTime - b.startTime || a.order - b.order);\n let maxIntersections = 0;\n for (const element of sorted) {\n for (let j = 0; j < timeline.length; j++) {\n if (element.startTime >= timeline[j]) {\n timeline[j] = element.endTime;\n element.order = j + orderOffset;\n if (j > maxIntersections) {\n maxIntersections = j;\n }\n break;\n }\n }\n }\n\n return maxIntersections;\n};\n\nlet w;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().gantt;\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n const elem = doc.getElementById(id);\n w = elem.parentElement.offsetWidth;\n\n if (w === undefined) {\n w = 1200;\n }\n\n if (conf.useWidth !== undefined) {\n w = conf.useWidth;\n }\n\n const taskArray = diagObj.db.getTasks();\n\n // Set height based on number of tasks\n\n let categories = [];\n\n for (const element of taskArray) {\n categories.push(element.type);\n }\n\n categories = checkUnique(categories);\n const categoryHeights = {};\n\n let h = 2 * conf.topPadding;\n if (diagObj.db.getDisplayMode() === 'compact' || conf.displayMode === 'compact') {\n const categoryElements = {};\n for (const element of taskArray) {\n if (categoryElements[element.section] === undefined) {\n categoryElements[element.section] = [element];\n } else {\n categoryElements[element.section].push(element);\n }\n }\n\n let intersections = 0;\n for (const category of Object.keys(categoryElements)) {\n const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1;\n intersections += categoryHeight;\n h += categoryHeight * (conf.barHeight + conf.barGap);\n categoryHeights[category] = categoryHeight;\n }\n } else {\n h += taskArray.length * (conf.barHeight + conf.barGap);\n for (const category of categories) {\n categoryHeights[category] = taskArray.filter((task) => task.type === category).length;\n }\n }\n\n // Set viewBox\n elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Set timescale\n const timeScale = scaleTime()\n .domain([\n min(taskArray, function (d) {\n return d.startTime;\n }),\n max(taskArray, function (d) {\n return d.endTime;\n }),\n ])\n .rangeRound([0, w - conf.leftPadding - conf.rightPadding]);\n\n /**\n * @param a\n * @param b\n */\n function taskCompare(a, b) {\n const taskA = a.startTime;\n const taskB = b.startTime;\n let result = 0;\n if (taskA > taskB) {\n result = 1;\n } else if (taskA < taskB) {\n result = -1;\n }\n return result;\n }\n\n // Sort the task array using the above taskCompare() so that\n // tasks are created based on their order of startTime\n taskArray.sort(taskCompare);\n\n makeGantt(taskArray, w, h);\n\n configureSvgSize(svg, h, w, conf.useMaxWidth);\n\n svg\n .append('text')\n .text(diagObj.db.getDiagramTitle())\n .attr('x', w / 2)\n .attr('y', conf.titleTopMargin)\n .attr('class', 'titleText');\n\n /**\n * @param tasks\n * @param pageWidth\n * @param pageHeight\n */\n function makeGantt(tasks, pageWidth, pageHeight) {\n const barHeight = conf.barHeight;\n const gap = barHeight + conf.barGap;\n const topPadding = conf.topPadding;\n const leftPadding = conf.leftPadding;\n\n const colorScale = scaleLinear()\n .domain([0, categories.length])\n .range(['#00B9FA', '#F95002'])\n .interpolate(interpolateHcl);\n\n drawExcludeDays(\n gap,\n topPadding,\n leftPadding,\n pageWidth,\n pageHeight,\n tasks,\n diagObj.db.getExcludes(),\n diagObj.db.getIncludes()\n );\n makeGrid(leftPadding, topPadding, pageWidth, pageHeight);\n drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);\n vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);\n drawToday(leftPadding, topPadding, pageWidth, pageHeight);\n }\n\n /**\n * @param theArray\n * @param theGap\n * @param theTopPad\n * @param theSidePad\n * @param theBarHeight\n * @param theColorScale\n * @param w\n */\n function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {\n // Get unique task orders. Required to draw the background rects when display mode is compact.\n const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];\n const uniqueTasks = uniqueTaskOrderIds.map((id) => theArray.find((item) => item.order === id));\n\n // Draw background rects covering the entire width of the graph, these form the section rows.\n svg\n .append('g')\n .selectAll('rect')\n .data(uniqueTasks)\n .enter()\n .append('rect')\n .attr('x', 0)\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad - 2;\n })\n .attr('width', function () {\n return w - conf.rightPadding / 2;\n })\n .attr('height', theGap)\n .attr('class', function (d) {\n for (const [i, category] of categories.entries()) {\n if (d.type === category) {\n return 'section section' + (i % conf.numberSectionStyles);\n }\n }\n return 'section section0';\n });\n\n // Draw the rects representing the tasks\n const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();\n\n const links = diagObj.db.getLinks();\n\n // Render the tasks with links\n // Render the other tasks\n rectangles\n .append('rect')\n .attr('id', function (d) {\n return d.id;\n })\n .attr('rx', 3)\n .attr('ry', 3)\n .attr('x', function (d) {\n if (d.milestone) {\n return (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) -\n 0.5 * theBarHeight\n );\n }\n return timeScale(d.startTime) + theSidePad;\n })\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad;\n })\n .attr('width', function (d) {\n if (d.milestone) {\n return theBarHeight;\n }\n return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);\n })\n .attr('height', theBarHeight)\n .attr('transform-origin', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n\n return (\n (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))\n ).toString() +\n 'px ' +\n (i * theGap + theTopPad + 0.5 * theBarHeight).toString() +\n 'px'\n );\n })\n .attr('class', function (d) {\n const res = 'task';\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (const [i, category] of categories.entries()) {\n if (d.type === category) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskClass = '';\n if (d.active) {\n if (d.crit) {\n taskClass += ' activeCrit';\n } else {\n taskClass = ' active';\n }\n } else if (d.done) {\n if (d.crit) {\n taskClass = ' doneCrit';\n } else {\n taskClass = ' done';\n }\n } else {\n if (d.crit) {\n taskClass += ' crit';\n }\n }\n\n if (taskClass.length === 0) {\n taskClass = ' task';\n }\n\n if (d.milestone) {\n taskClass = ' milestone ' + taskClass;\n }\n\n taskClass += secNum;\n\n taskClass += ' ' + classStr;\n\n return res + taskClass;\n });\n\n // Append task labels\n rectangles\n .append('text')\n .attr('id', function (d) {\n return d.id + '-text';\n })\n .text(function (d) {\n return d.task;\n })\n .attr('font-size', conf.fontSize)\n .attr('x', function (d) {\n let startX = timeScale(d.startTime);\n let endX = timeScale(d.renderEndTime || d.endTime);\n if (d.milestone) {\n startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n }\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return startX + theSidePad - 5;\n } else {\n return endX + theSidePad + 5;\n }\n } else {\n return (endX - startX) / 2 + startX + theSidePad;\n }\n })\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;\n })\n .attr('text-height', theBarHeight)\n .attr('class', function (d) {\n const startX = timeScale(d.startTime);\n let endX = timeScale(d.endTime);\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (const [i, category] of categories.entries()) {\n if (d.type === category) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskType = '';\n if (d.active) {\n if (d.crit) {\n taskType = 'activeCritText' + secNum;\n } else {\n taskType = 'activeText' + secNum;\n }\n }\n\n if (d.done) {\n if (d.crit) {\n taskType = taskType + ' doneCritText' + secNum;\n } else {\n taskType = taskType + ' doneText' + secNum;\n }\n } else {\n if (d.crit) {\n taskType = taskType + ' critText' + secNum;\n }\n }\n\n if (d.milestone) {\n taskType += ' milestoneText';\n }\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;\n } else {\n return (\n classStr +\n ' taskTextOutsideRight taskTextOutside' +\n secNum +\n ' ' +\n taskType +\n ' width-' +\n textWidth\n );\n }\n } else {\n return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;\n }\n });\n\n const securityLevel = getConfig().securityLevel;\n\n // Wrap the tasks in an a tag for working links without javascript\n if (securityLevel === 'sandbox') {\n let sandboxElement;\n sandboxElement = select('#i' + id);\n const doc = sandboxElement.nodes()[0].contentDocument;\n\n rectangles\n .filter(function (d) {\n return links.has(d.id);\n })\n .each(function (o) {\n var taskRect = doc.querySelector('#' + o.id);\n var taskText = doc.querySelector('#' + o.id + '-text');\n const oldParent = taskRect.parentNode;\n var Link = doc.createElement('a');\n Link.setAttribute('xlink:href', links.get(o.id));\n Link.setAttribute('target', '_top');\n oldParent.appendChild(Link);\n Link.appendChild(taskRect);\n Link.appendChild(taskText);\n });\n }\n }\n /**\n * @param theGap\n * @param theTopPad\n * @param theSidePad\n * @param w\n * @param h\n * @param tasks\n * @param {unknown[]} excludes\n * @param {unknown[]} includes\n */\n function drawExcludeDays(theGap, theTopPad, theSidePad, w, h, tasks, excludes, includes) {\n if (excludes.length === 0 && includes.length === 0) {\n return;\n }\n\n let minTime;\n let maxTime;\n for (const { startTime, endTime } of tasks) {\n if (minTime === undefined || startTime < minTime) {\n minTime = startTime;\n }\n if (maxTime === undefined || endTime > maxTime) {\n maxTime = endTime;\n }\n }\n\n if (!minTime || !maxTime) {\n return;\n }\n\n if (dayjs(maxTime).diff(dayjs(minTime), 'year') > 5) {\n log.warn(\n 'The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.'\n );\n return;\n }\n\n const dateFormat = diagObj.db.getDateFormat();\n const excludeRanges = [];\n let range = null;\n let d = dayjs(minTime);\n while (d.valueOf() <= maxTime) {\n if (diagObj.db.isInvalidDate(d, dateFormat, excludes, includes)) {\n if (!range) {\n range = {\n start: d,\n end: d,\n };\n } else {\n range.end = d;\n }\n } else {\n if (range) {\n excludeRanges.push(range);\n range = null;\n }\n }\n d = d.add(1, 'd');\n }\n\n const rectangles = svg.append('g').selectAll('rect').data(excludeRanges).enter();\n\n rectangles\n .append('rect')\n .attr('id', function (d) {\n return 'exclude-' + d.start.format('YYYY-MM-DD');\n })\n .attr('x', function (d) {\n return timeScale(d.start) + theSidePad;\n })\n .attr('y', conf.gridLineStartPadding)\n .attr('width', function (d) {\n const renderEnd = d.end.add(1, 'day');\n return timeScale(renderEnd) - timeScale(d.start);\n })\n .attr('height', h - theTopPad - conf.gridLineStartPadding)\n .attr('transform-origin', function (d, i) {\n return (\n (\n timeScale(d.start) +\n theSidePad +\n 0.5 * (timeScale(d.end) - timeScale(d.start))\n ).toString() +\n 'px ' +\n (i * theGap + 0.5 * h).toString() +\n 'px'\n );\n })\n .attr('class', 'exclude-range');\n }\n\n /**\n * @param theSidePad\n * @param theTopPad\n * @param w\n * @param h\n */\n function makeGrid(theSidePad, theTopPad, w, h) {\n let bottomXAxis = axisBottom(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n const reTickInterval = /^([1-9]\\d*)(millisecond|second|minute|hour|day|week|month)$/;\n const resultTickInterval = reTickInterval.exec(\n diagObj.db.getTickInterval() || conf.tickInterval\n );\n\n if (resultTickInterval !== null) {\n const every = resultTickInterval[1];\n const interval = resultTickInterval[2];\n const weekday = diagObj.db.getWeekday() || conf.weekday;\n\n switch (interval) {\n case 'millisecond':\n bottomXAxis.ticks(timeMillisecond.every(every));\n break;\n case 'second':\n bottomXAxis.ticks(timeSecond.every(every));\n break;\n case 'minute':\n bottomXAxis.ticks(timeMinute.every(every));\n break;\n case 'hour':\n bottomXAxis.ticks(timeHour.every(every));\n break;\n case 'day':\n bottomXAxis.ticks(timeDay.every(every));\n break;\n case 'week':\n bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday].every(every));\n break;\n case 'month':\n bottomXAxis.ticks(timeMonth.every(every));\n break;\n }\n }\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')')\n .call(bottomXAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10)\n .attr('dy', '1em');\n\n if (diagObj.db.topAxisEnabled() || conf.topAxis) {\n let topXAxis = axisTop(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n if (resultTickInterval !== null) {\n const every = resultTickInterval[1];\n const interval = resultTickInterval[2];\n const weekday = diagObj.db.getWeekday() || conf.weekday;\n\n switch (interval) {\n case 'millisecond':\n topXAxis.ticks(timeMillisecond.every(every));\n break;\n case 'second':\n topXAxis.ticks(timeSecond.every(every));\n break;\n case 'minute':\n topXAxis.ticks(timeMinute.every(every));\n break;\n case 'hour':\n topXAxis.ticks(timeHour.every(every));\n break;\n case 'day':\n topXAxis.ticks(timeDay.every(every));\n break;\n case 'week':\n topXAxis.ticks(mapWeekdayToTimeFunction[weekday].every(every));\n break;\n case 'month':\n topXAxis.ticks(timeMonth.every(every));\n break;\n }\n }\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + theTopPad + ')')\n .call(topXAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10);\n // .attr('dy', '1em');\n }\n }\n\n /**\n * @param theGap\n * @param theTopPad\n */\n function vertLabels(theGap, theTopPad) {\n let prevGap = 0;\n\n const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);\n\n svg\n .append('g') // without doing this, impossible to put grid lines behind text\n .selectAll('text')\n .data(numOccurrences)\n .enter()\n .append(function (d) {\n const rows = d[0].split(common.lineBreakRegex);\n const dy = -(rows.length - 1) / 2;\n\n const svgLabel = doc.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('dy', dy + 'em');\n\n for (const [j, row] of rows.entries()) {\n const tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttribute('alignment-baseline', 'central');\n tspan.setAttribute('x', '10');\n if (j > 0) {\n tspan.setAttribute('dy', '1em');\n }\n tspan.textContent = row;\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n })\n .attr('x', 10)\n .attr('y', function (d, i) {\n if (i > 0) {\n for (let j = 0; j < i; j++) {\n prevGap += numOccurrences[i - 1][1];\n return (d[1] * theGap) / 2 + prevGap * theGap + theTopPad;\n }\n } else {\n return (d[1] * theGap) / 2 + theTopPad;\n }\n })\n .attr('font-size', conf.sectionFontSize)\n .attr('class', function (d) {\n for (const [i, category] of categories.entries()) {\n if (d[0] === category) {\n return 'sectionTitle sectionTitle' + (i % conf.numberSectionStyles);\n }\n }\n return 'sectionTitle';\n });\n }\n\n /**\n * @param theSidePad\n * @param theTopPad\n * @param w\n * @param h\n */\n function drawToday(theSidePad, theTopPad, w, h) {\n const todayMarker = diagObj.db.getTodayMarker();\n if (todayMarker === 'off') {\n return;\n }\n\n const todayG = svg.append('g').attr('class', 'today');\n const today = new Date();\n const todayLine = todayG.append('line');\n\n todayLine\n .attr('x1', timeScale(today) + theSidePad)\n .attr('x2', timeScale(today) + theSidePad)\n .attr('y1', conf.titleTopMargin)\n .attr('y2', h - conf.titleTopMargin)\n .attr('class', 'today');\n\n if (todayMarker !== '') {\n todayLine.attr('style', todayMarker.replace(/,/g, ';'));\n }\n }\n\n /**\n * From this stack exchange question:\n * http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript\n *\n * @param arr\n */\n function checkUnique(arr) {\n const hash = {};\n const result = [];\n for (let i = 0, l = arr.length; i < l; ++i) {\n if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {\n // it works with objects! in FF, at least\n hash[arr[i]] = true;\n result.push(arr[i]);\n }\n }\n return result;\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n", "const getStyles = (options) =>\n `\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${options.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${options.sectionBkgColor};\n }\n\n .section2 {\n fill: ${options.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${options.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${options.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${options.fontFamily};\n fill: ${options.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${options.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${options.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${options.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${options.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${options.taskBkgColor};\n stroke: ${options.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${options.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${options.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${options.activeTaskBkgColor};\n stroke: ${options.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${options.doneTaskBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.titleColor || options.textColor};\n font-family: var(--mermaid-font-family, \"trebuchet ms\", verdana, arial, sans-serif);\n }\n`;\n\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport ganttParser from './parser/gantt.jison';\nimport ganttDb from './ganttDb.js';\nimport ganttRenderer from './ganttRenderer.js';\nimport ganttStyles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n parser: ganttParser,\n db: ganttDb,\n renderer: ganttRenderer,\n styles: ganttStyles,\n};\n", "import type { Info } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Info = await parse('info', input);\n log.debug(ast);\n },\n};\n", "{\n \"name\": \"mermaid\",\n \"version\": \"11.0.2\",\n \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.\",\n \"type\": \"module\",\n \"module\": \"./dist/mermaid.core.mjs\",\n \"types\": \"./dist/mermaid.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/mermaid.d.ts\",\n \"import\": \"./dist/mermaid.core.mjs\",\n \"default\": \"./dist/mermaid.core.mjs\"\n },\n \"./*\": \"./*\"\n },\n \"keywords\": [\n \"diagram\",\n \"markdown\",\n \"flowchart\",\n \"sequence diagram\",\n \"gantt\",\n \"class diagram\",\n \"git graph\",\n \"mindmap\",\n \"packet diagram\",\n \"c4 diagram\",\n \"er diagram\",\n \"pie chart\",\n \"pie diagram\",\n \"quadrant chart\",\n \"requirement diagram\",\n \"graph\"\n ],\n \"scripts\": {\n \"clean\": \"rimraf dist\",\n \"dev\": \"pnpm -w dev\",\n \"docs:code\": \"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup\",\n \"docs:build\": \"rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && tsx scripts/docs.cli.mts\",\n \"docs:verify\": \"pnpm docs:spellcheck && pnpm docs:code && tsx scripts/docs.cli.mts --verify\",\n \"docs:pre:vitepress\": \"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts\",\n \"docs:build:vitepress\": \"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing\",\n \"docs:dev\": \"pnpm docs:pre:vitepress && concurrently \\\"pnpm --filter ./src/vitepress dev\\\" \\\"tsx scripts/docs.cli.mts --watch --vitepress\\\"\",\n \"docs:dev:docker\": \"pnpm docs:pre:vitepress && concurrently \\\"pnpm --filter ./src/vitepress dev:docker\\\" \\\"tsx scripts/docs.cli.mts --watch --vitepress\\\"\",\n \"docs:serve\": \"pnpm docs:build:vitepress && vitepress serve src/vitepress\",\n \"docs:spellcheck\": \"cspell \\\"src/docs/**/*.md\\\"\",\n \"docs:release-version\": \"tsx scripts/update-release-version.mts\",\n \"docs:verify-version\": \"tsx scripts/update-release-version.mts --verify\",\n \"types:build-config\": \"tsx scripts/create-types-from-json-schema.mts\",\n \"types:verify-config\": \"tsx scripts/create-types-from-json-schema.mts --verify\",\n \"checkCircle\": \"npx madge --circular ./src\",\n \"prepublishOnly\": \"pnpm docs:verify-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/mermaid-js/mermaid\"\n },\n \"author\": \"Knut Sveidqvist\",\n \"license\": \"MIT\",\n \"standard\": {\n \"ignore\": [\n \"**/parser/*.js\",\n \"dist/**/*.js\",\n \"cypress/**/*.js\"\n ],\n \"globals\": [\n \"page\"\n ]\n },\n \"dependencies\": {\n \"@braintree/sanitize-url\": \"^7.0.1\",\n \"@mermaid-js/parser\": \"workspace:^\",\n \"cytoscape\": \"^3.29.2\",\n \"cytoscape-cose-bilkent\": \"^4.1.0\",\n \"d3\": \"^7.9.0\",\n \"d3-sankey\": \"^0.12.3\",\n \"dagre-d3-es\": \"7.0.10\",\n \"dayjs\": \"^1.11.10\",\n \"dompurify\": \"^3.0.11\",\n \"katex\": \"^0.16.9\",\n \"khroma\": \"^2.1.0\",\n \"lodash-es\": \"^4.17.21\",\n \"marked\": \"^13.0.2\",\n \"roughjs\": \"^4.6.6\",\n \"stylis\": \"^4.3.1\",\n \"ts-dedent\": \"^2.2.0\",\n \"uuid\": \"^9.0.1\"\n },\n \"devDependencies\": {\n \"@adobe/jsonschema2md\": \"^8.0.0\",\n \"@types/cytoscape\": \"^3.21.4\",\n \"@types/d3\": \"^7.4.3\",\n \"@types/d3-sankey\": \"^0.12.4\",\n \"@types/d3-scale\": \"^4.0.8\",\n \"@types/d3-scale-chromatic\": \"^3.0.3\",\n \"@types/d3-selection\": \"^3.0.10\",\n \"@types/d3-shape\": \"^3.1.6\",\n \"@types/dompurify\": \"^3.0.5\",\n \"@types/jsdom\": \"^21.1.6\",\n \"@types/katex\": \"^0.16.7\",\n \"@types/lodash-es\": \"^4.17.12\",\n \"@types/micromatch\": \"^4.0.6\",\n \"@types/prettier\": \"^3.0.0\",\n \"@types/stylis\": \"^4.2.5\",\n \"@types/uuid\": \"^9.0.8\",\n \"ajv\": \"^8.12.0\",\n \"chokidar\": \"^3.6.0\",\n \"concurrently\": \"^8.2.2\",\n \"csstree-validator\": \"^3.0.0\",\n \"globby\": \"^14.0.1\",\n \"jison\": \"^0.4.18\",\n \"js-base64\": \"^3.7.7\",\n \"jsdom\": \"^24.0.0\",\n \"json-schema-to-typescript\": \"^13.1.2\",\n \"micromatch\": \"^4.0.5\",\n \"path-browserify\": \"^1.0.1\",\n \"prettier\": \"^3.2.5\",\n \"remark\": \"^15.0.1\",\n \"remark-frontmatter\": \"^5.0.0\",\n \"remark-gfm\": \"^4.0.0\",\n \"rimraf\": \"^5.0.5\",\n \"start-server-and-test\": \"^2.0.3\",\n \"type-fest\": \"^4.13.1\",\n \"typedoc\": \"^0.25.12\",\n \"typedoc-plugin-markdown\": \"^3.17.1\",\n \"typescript\": \"~5.4.3\",\n \"unist-util-flatmap\": \"^1.0.0\",\n \"unist-util-visit\": \"^5.0.0\",\n \"vitepress\": \"^1.0.1\",\n \"vitepress-plugin-search\": \"1.0.4-alpha.22\"\n },\n \"files\": [\n \"dist/\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n }\n}\n", "import type { InfoFields, InfoDB } from './infoTypes.js';\nimport { version } from '../../../package.json';\n\nexport const DEFAULT_INFO_DB: InfoFields = { version } as const;\n\nexport const getVersion = (): string => DEFAULT_INFO_DB.version;\n\nexport const db: InfoDB = {\n getVersion,\n};\n", "import { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport type { HTML, SVG } from '../diagram-api/types.js';\n\n/**\n * Selects the SVG element using {@link id}.\n *\n * @param id - The diagram ID.\n * @returns The selected {@link SVG} element using {@link id}.\n */\nexport const selectSvgElement = (id: string): SVG => {\n const { securityLevel } = getConfig();\n // handle root and document for when rendering in sandbox mode\n let root: HTML = select('body');\n if (securityLevel === 'sandbox') {\n const sandboxElement: HTML = select(`#i${id}`);\n const doc: Document = sandboxElement.node()?.contentDocument ?? document;\n root = select(doc.body as HTMLIFrameElement);\n }\n const svg: SVG = root.select(`#${id}`);\n return svg;\n};\n", "import type { DrawDefinition, SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param text - The text of the diagram.\n * @param id - The id of the diagram which will be used as a DOM element id.\n * @param version - MermaidJS version.\n */\nconst draw: DrawDefinition = (text, id, version) => {\n log.debug('rendering info diagram\\n' + text);\n\n const svg: SVG = selectSvgElement(id);\n configureSvgSize(svg, 100, 400, true);\n\n const group: SVGGroup = svg.append('g');\n group\n .append('text')\n .attr('x', 100)\n .attr('y', 40)\n .attr('class', 'version')\n .attr('font-size', 32)\n .style('text-anchor', 'middle')\n .text(`v${version}`);\n};\n\nexport const renderer = { draw };\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { parser } from './infoParser.js';\nimport { db } from './infoDb.js';\nimport { renderer } from './infoRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n};\n", "import { log } from '../../logger.js';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\nimport type { PieFields, PieDB, Sections, D3Section } from './pieTypes.js';\nimport type { RequiredDeep } from 'type-fest';\nimport type { PieDiagramConfig } from '../../config.type.js';\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\n\nexport const DEFAULT_PIE_CONFIG: Required = DEFAULT_CONFIG.pie;\n\nexport const DEFAULT_PIE_DB: RequiredDeep = {\n sections: new Map(),\n showData: false,\n config: DEFAULT_PIE_CONFIG,\n} as const;\n\nlet sections: Sections = DEFAULT_PIE_DB.sections;\nlet showData: boolean = DEFAULT_PIE_DB.showData;\nconst config: Required = structuredClone(DEFAULT_PIE_CONFIG);\n\nconst getConfig = (): Required => structuredClone(config);\n\nconst clear = (): void => {\n sections = new Map();\n showData = DEFAULT_PIE_DB.showData;\n commonClear();\n};\n\nconst addSection = ({ label, value }: D3Section): void => {\n if (!sections.has(label)) {\n sections.set(label, value);\n log.debug(`added new section: ${label}, with value: ${value}`);\n }\n};\n\nconst getSections = (): Sections => sections;\n\nconst setShowData = (toggle: boolean): void => {\n showData = toggle;\n};\n\nconst getShowData = (): boolean => showData;\n\nexport const db: PieDB = {\n getConfig,\n\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n\n addSection,\n getSections,\n setShowData,\n getShowData,\n};\n", "import type { Pie } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport { log } from '../../logger.js';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport type { PieDB } from './pieTypes.js';\nimport { db } from './pieDb.js';\n\nconst populateDb = (ast: Pie, db: PieDB) => {\n populateCommonDb(ast, db);\n db.setShowData(ast.showData);\n ast.sections.map(db.addSection);\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Pie = await parse('pie', input);\n log.debug(ast);\n populateDb(ast, db);\n },\n};\n", "import type { DiagramStylesProvider } from '../../diagram-api/types.js';\nimport type { PieStyleOptions } from './pieTypes.js';\n\nconst getStyles: DiagramStylesProvider = (options: PieStyleOptions) =>\n `\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${options.pieOuterStrokeColor};\n stroke-width: ${options.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`;\n\nexport default getStyles;\n", "import type d3 from 'd3';\nimport { arc, pie as d3pie, scaleOrdinal } from 'd3';\nimport type { MermaidConfig, PieDiagramConfig } from '../../config.type.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DrawDefinition, SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport { cleanAndMerge, parseFontSize } from '../../utils.js';\nimport type { D3Section, PieDB, Sections } from './pieTypes.js';\n\nconst createPieArcs = (sections: Sections): d3.PieArcDatum[] => {\n // Compute the position of each group on the pie:\n const pieData: D3Section[] = [...sections.entries()]\n .map((element: [string, number]): D3Section => {\n return {\n label: element[0],\n value: element[1],\n };\n })\n .sort((a: D3Section, b: D3Section): number => {\n return b.value - a.value;\n });\n const pie: d3.Pie = d3pie().value(\n (d3Section: D3Section): number => d3Section.value\n );\n return pie(pieData);\n};\n\n/**\n * Draws a Pie Chart with the data given in text.\n *\n * @param text - pie chart code\n * @param id - diagram id\n * @param _version - MermaidJS version from package.json.\n * @param diagObj - A standard diagram containing the DB and the text and type etc of the diagram.\n */\nexport const draw: DrawDefinition = (text, id, _version, diagObj) => {\n log.debug('rendering pie chart\\n' + text);\n const db = diagObj.db as PieDB;\n const globalConfig: MermaidConfig = getConfig();\n const pieConfig: Required = cleanAndMerge(db.getConfig(), globalConfig.pie);\n const MARGIN = 40;\n const LEGEND_RECT_SIZE = 18;\n const LEGEND_SPACING = 4;\n const height = 450;\n const pieWidth: number = height;\n const svg: SVG = selectSvgElement(id);\n const group: SVGGroup = svg.append('g');\n group.attr('transform', 'translate(' + pieWidth / 2 + ',' + height / 2 + ')');\n\n const { themeVariables } = globalConfig;\n let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth);\n outerStrokeWidth ??= 2;\n\n const textPosition: number = pieConfig.textPosition;\n const radius: number = Math.min(pieWidth, height) / 2 - MARGIN;\n // Shape helper to build arcs:\n const arcGenerator: d3.Arc> = arc>()\n .innerRadius(0)\n .outerRadius(radius);\n const labelArcGenerator: d3.Arc> = arc<\n d3.PieArcDatum\n >()\n .innerRadius(radius * textPosition)\n .outerRadius(radius * textPosition);\n\n group\n .append('circle')\n .attr('cx', 0)\n .attr('cy', 0)\n .attr('r', radius + outerStrokeWidth / 2)\n .attr('class', 'pieOuterCircle');\n\n const sections: Sections = db.getSections();\n const arcs: d3.PieArcDatum[] = createPieArcs(sections);\n\n const myGeneratedColors = [\n themeVariables.pie1,\n themeVariables.pie2,\n themeVariables.pie3,\n themeVariables.pie4,\n themeVariables.pie5,\n themeVariables.pie6,\n themeVariables.pie7,\n themeVariables.pie8,\n themeVariables.pie9,\n themeVariables.pie10,\n themeVariables.pie11,\n themeVariables.pie12,\n ];\n // Set the color scale\n const color: d3.ScaleOrdinal = scaleOrdinal(myGeneratedColors);\n\n // Build the pie chart: each part of the pie is a path that we build using the arc function.\n group\n .selectAll('mySlices')\n .data(arcs)\n .enter()\n .append('path')\n .attr('d', arcGenerator)\n .attr('fill', (datum: d3.PieArcDatum) => {\n return color(datum.data.label);\n })\n .attr('class', 'pieCircle');\n\n let sum = 0;\n sections.forEach((section) => {\n sum += section;\n });\n // Now add the percentage.\n // Use the centroid method to get the best coordinates.\n group\n .selectAll('mySlices')\n .data(arcs)\n .enter()\n .append('text')\n .text((datum: d3.PieArcDatum): string => {\n return ((datum.data.value / sum) * 100).toFixed(0) + '%';\n })\n .attr('transform', (datum: d3.PieArcDatum): string => {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n return 'translate(' + labelArcGenerator.centroid(datum) + ')';\n })\n .style('text-anchor', 'middle')\n .attr('class', 'slice');\n\n group\n .append('text')\n .text(db.getDiagramTitle())\n .attr('x', 0)\n .attr('y', -(height - 50) / 2)\n .attr('class', 'pieTitleText');\n\n // Add the legends/annotations for each section\n const legend = group\n .selectAll('.legend')\n .data(color.domain())\n .enter()\n .append('g')\n .attr('class', 'legend')\n .attr('transform', (_datum, index: number): string => {\n const height = LEGEND_RECT_SIZE + LEGEND_SPACING;\n const offset = (height * color.domain().length) / 2;\n const horizontal = 12 * LEGEND_RECT_SIZE;\n const vertical = index * height - offset;\n return 'translate(' + horizontal + ',' + vertical + ')';\n });\n\n legend\n .append('rect')\n .attr('width', LEGEND_RECT_SIZE)\n .attr('height', LEGEND_RECT_SIZE)\n .style('fill', color)\n .style('stroke', color);\n\n legend\n .data(arcs)\n .append('text')\n .attr('x', LEGEND_RECT_SIZE + LEGEND_SPACING)\n .attr('y', LEGEND_RECT_SIZE - LEGEND_SPACING)\n .text((datum: d3.PieArcDatum): string => {\n const { label, value } = datum.data;\n if (db.getShowData()) {\n return `${label} [${value}]`;\n }\n return label;\n });\n\n const longestTextWidth = Math.max(\n ...legend\n .selectAll('text')\n .nodes()\n .map((node) => (node as Element)?.getBoundingClientRect().width ?? 0)\n );\n\n const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth;\n\n // Set viewBox\n svg.attr('viewBox', `0 0 ${totalWidth} ${height}`);\n configureSvgSize(svg, height, totalWidth, pieConfig.useMaxWidth);\n};\n\nexport const renderer = { draw };\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { parser } from './pieParser.js';\nimport { db } from './pieDb.js';\nimport styles from './pieStyles.js';\nimport { renderer } from './pieRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[1,7],$V5=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V6=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V7=[55,56,57],$V8=[2,36],$V9=[1,37],$Va=[1,36],$Vb=[1,38],$Vc=[1,35],$Vd=[1,43],$Ve=[1,41],$Vf=[1,14],$Vg=[1,23],$Vh=[1,18],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,24],$Vn=[1,25],$Vo=[1,26],$Vp=[1,27],$Vq=[1,28],$Vr=[1,29],$Vs=[1,32],$Vt=[1,33],$Vu=[1,34],$Vv=[1,39],$Vw=[1,40],$Vx=[1,42],$Vy=[1,44],$Vz=[1,62],$VA=[1,61],$VB=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$VC=[1,65],$VD=[1,66],$VE=[1,67],$VF=[1,68],$VG=[1,69],$VH=[1,70],$VI=[1,71],$VJ=[1,72],$VK=[1,73],$VL=[1,74],$VM=[1,75],$VN=[1,76],$VO=[4,5,6,7,8,9,10,11,12,13,14,15,18],$VP=[1,90],$VQ=[1,91],$VR=[1,92],$VS=[1,99],$VT=[1,93],$VU=[1,96],$VV=[1,94],$VW=[1,95],$VX=[1,97],$VY=[1,98],$VZ=[1,102],$V_=[10,55,56,57],$V$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"idStringToken\":3,\"ALPHA\":4,\"NUM\":5,\"NODE_STRING\":6,\"DOWN\":7,\"MINUS\":8,\"DEFAULT\":9,\"COMMA\":10,\"COLON\":11,\"AMP\":12,\"BRKT\":13,\"MULT\":14,\"UNICODE_TEXT\":15,\"styleComponent\":16,\"UNIT\":17,\"SPACE\":18,\"STYLE\":19,\"PCT\":20,\"idString\":21,\"style\":22,\"stylesOpt\":23,\"classDefStatement\":24,\"CLASSDEF\":25,\"start\":26,\"eol\":27,\"QUADRANT\":28,\"document\":29,\"line\":30,\"statement\":31,\"axisDetails\":32,\"quadrantDetails\":33,\"points\":34,\"title\":35,\"title_value\":36,\"acc_title\":37,\"acc_title_value\":38,\"acc_descr\":39,\"acc_descr_value\":40,\"acc_descr_multiline_value\":41,\"section\":42,\"text\":43,\"point_start\":44,\"point_x\":45,\"point_y\":46,\"class_name\":47,\"X-AXIS\":48,\"AXIS-TEXT-DELIMITER\":49,\"Y-AXIS\":50,\"QUADRANT_1\":51,\"QUADRANT_2\":52,\"QUADRANT_3\":53,\"QUADRANT_4\":54,\"NEWLINE\":55,\"SEMI\":56,\"EOF\":57,\"alphaNumToken\":58,\"textNoTagsToken\":59,\"STR\":60,\"MD_STR\":61,\"alphaNum\":62,\"PUNCTUATION\":63,\"PLUS\":64,\"EQUALS\":65,\"DOT\":66,\"UNDERSCORE\":67,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"ALPHA\",5:\"NUM\",6:\"NODE_STRING\",7:\"DOWN\",8:\"MINUS\",9:\"DEFAULT\",10:\"COMMA\",11:\"COLON\",12:\"AMP\",13:\"BRKT\",14:\"MULT\",15:\"UNICODE_TEXT\",17:\"UNIT\",18:\"SPACE\",19:\"STYLE\",20:\"PCT\",25:\"CLASSDEF\",28:\"QUADRANT\",35:\"title\",36:\"title_value\",37:\"acc_title\",38:\"acc_title_value\",39:\"acc_descr\",40:\"acc_descr_value\",41:\"acc_descr_multiline_value\",42:\"section\",44:\"point_start\",45:\"point_x\",46:\"point_y\",47:\"class_name\",48:\"X-AXIS\",49:\"AXIS-TEXT-DELIMITER\",50:\"Y-AXIS\",51:\"QUADRANT_1\",52:\"QUADRANT_2\",53:\"QUADRANT_3\",54:\"QUADRANT_4\",55:\"NEWLINE\",56:\"SEMI\",57:\"EOF\",60:\"STR\",61:\"MD_STR\",63:\"PUNCTUATION\",64:\"PLUS\",65:\"EQUALS\",66:\"DOT\",67:\"UNDERSCORE\"},\nproductions_: [0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 23:\nthis.$=$$[$0]\nbreak;\ncase 24:\nthis.$=$$[$0-1]+''+$$[$0]\nbreak;\ncase 26:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\ncase 27:\nthis.$ = [$$[$0].trim()]\nbreak;\ncase 28:\n$$[$0-2].push($$[$0].trim());this.$ = $$[$0-2];\nbreak;\ncase 29:\nthis.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);\nbreak;\ncase 37:\nthis.$=[];\nbreak;\ncase 42:\n this.$=$$[$0].trim();yy.setDiagramTitle(this.$); \nbreak;\ncase 43:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 44: case 45:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 46:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 47:\nyy.addPoint($$[$0-3], \"\", $$[$0-1], $$[$0], []);\nbreak;\ncase 48:\nyy.addPoint($$[$0-4], $$[$0-3], $$[$0-1], $$[$0], []);\nbreak;\ncase 49:\nyy.addPoint($$[$0-4], \"\", $$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 50:\nyy.addPoint($$[$0-5], $$[$0-4], $$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 51:\nyy.setXAxisLeftText($$[$0-2]); yy.setXAxisRightText($$[$0]);\nbreak;\ncase 52:\n$$[$0-1].text += \" \u27F6 \"; yy.setXAxisLeftText($$[$0-1]);\nbreak;\ncase 53:\nyy.setXAxisLeftText($$[$0]);\nbreak;\ncase 54:\nyy.setYAxisBottomText($$[$0-2]); yy.setYAxisTopText($$[$0]);\nbreak;\ncase 55:\n$$[$0-1].text += \" \u27F6 \"; yy.setYAxisBottomText($$[$0-1]);\nbreak;\ncase 56:\nyy.setYAxisBottomText($$[$0]);\nbreak;\ncase 57:\nyy.setQuadrant1Text($$[$0])\nbreak;\ncase 58:\nyy.setQuadrant2Text($$[$0])\nbreak;\ncase 59:\nyy.setQuadrant3Text($$[$0])\nbreak;\ncase 60:\nyy.setQuadrant4Text($$[$0])\nbreak;\ncase 64:\n this.$={text:$$[$0], type: 'text'};\nbreak;\ncase 65:\n this.$={text:$$[$0-1].text+''+$$[$0], type: $$[$0-1].type};\nbreak;\ncase 66:\n this.$={text: $$[$0], type: 'text'};\nbreak;\ncase 67:\n this.$={text: $$[$0], type: 'markdown'};\nbreak;\ncase 68:\nthis.$=$$[$0];\nbreak;\ncase 69:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\n}\n},\ntable: [{18:$V0,26:1,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{1:[3]},{18:$V0,26:8,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{18:$V0,26:9,27:2,28:$V1,55:$V2,56:$V3,57:$V4},o($V5,[2,33],{29:10}),o($V6,[2,61]),o($V6,[2,62]),o($V6,[2,63]),{1:[2,30]},{1:[2,31]},o($V7,$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vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:56,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,44:[1,57],47:[1,58],58:60,59:59,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},o($VB,[2,64]),o($VB,[2,66]),o($VB,[2,67]),o($VB,[2,70]),o($VB,[2,71]),o($VB,[2,72]),o($VB,[2,73]),o($VB,[2,74]),o($VB,[2,75]),o($VB,[2,76]),o($VB,[2,77]),o($VB,[2,78]),o($VB,[2,79]),o($VB,[2,80]),o($V5,[2,35]),o($V7,[2,38]),o($V7,[2,42]),o($V7,[2,43]),o($V7,[2,44]),{3:64,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,21:63},o($V7,[2,53],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,77],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,56],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,78],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,57],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,58],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,59],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,60],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{45:[1,79]},{44:[1,80]},o($VB,[2,65]),o($VB,[2,81]),o($VB,[2,82]),o($VB,[2,83]),{3:82,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,18:[1,81]},o($VO,[2,23]),o($VO,[2,1]),o($VO,[2,2]),o($VO,[2,3]),o($VO,[2,4]),o($VO,[2,5]),o($VO,[2,6]),o($VO,[2,7]),o($VO,[2,8]),o($VO,[2,9]),o($VO,[2,10]),o($VO,[2,11]),o($VO,[2,12]),o($V7,[2,52],{58:31,43:83,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,55],{58:31,43:84,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{46:[1,85]},{45:[1,86]},{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:88,23:87},o($VO,[2,24]),o($V7,[2,51],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,54],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,47],{22:88,16:89,23:100,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{46:[1,101]},o($V7,[2,29],{10:$VZ}),o($V_,[2,27],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),o($V$,[2,25]),o($V$,[2,13]),o($V$,[2,14]),o($V$,[2,15]),o($V$,[2,16]),o($V$,[2,17]),o($V$,[2,18]),o($V$,[2,19]),o($V$,[2,20]),o($V$,[2,21]),o($V$,[2,22]),o($V7,[2,49],{10:$VZ}),o($V7,[2,48],{22:88,16:89,23:104,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:105},o($V$,[2,26]),o($V7,[2,50],{10:$VZ}),o($V_,[2,28],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY})],\ndefaultActions: {8:[2,30],9:[2,31]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2:return 55;\nbreak;\ncase 3:/* do nothing */\nbreak;\ncase 4: this.begin(\"title\");return 35; \nbreak;\ncase 5: this.popState(); return \"title_value\"; \nbreak;\ncase 6: this.begin(\"acc_title\");return 37; \nbreak;\ncase 7: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 8: this.begin(\"acc_descr\");return 39; \nbreak;\ncase 9: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 10: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 11: this.popState(); \nbreak;\ncase 12:return \"acc_descr_multiline_value\";\nbreak;\ncase 13:return 48;\nbreak;\ncase 14:return 50;\nbreak;\ncase 15:return 49\nbreak;\ncase 16:return 51;\nbreak;\ncase 17:return 52;\nbreak;\ncase 18:return 53;\nbreak;\ncase 19:return 54;\nbreak;\ncase 20:return 25;\nbreak;\ncase 21: this.begin(\"md_string\");\nbreak;\ncase 22: return \"MD_STR\";\nbreak;\ncase 23: this.popState();\nbreak;\ncase 24:this.begin(\"string\");\nbreak;\ncase 25:this.popState();\nbreak;\ncase 26:return \"STR\";\nbreak;\ncase 27:this.begin('class_name')\nbreak;\ncase 28:this.popState(); return 47;\nbreak;\ncase 29:this.begin(\"point_start\"); return 44;\nbreak;\ncase 30:this.begin('point_x'); return 45;\nbreak;\ncase 31:this.popState();\nbreak;\ncase 32:this.popState(); this.begin('point_y');\nbreak;\ncase 33:this.popState(); return 46;\nbreak;\ncase 34:return 28;\nbreak;\ncase 35:return 4;\nbreak;\ncase 36:return 11;\nbreak;\ncase 37:return 64;\nbreak;\ncase 38:return 10;\nbreak;\ncase 39:return 65;\nbreak;\ncase 40:return 65;\nbreak;\ncase 41:return 14;\nbreak;\ncase 42:return 13;\nbreak;\ncase 43:return 67;\nbreak;\ncase 44:return 66;\nbreak;\ncase 45:return 12;\nbreak;\ncase 46:return 8;\nbreak;\ncase 47:return 5;\nbreak;\ncase 48:return 18;\nbreak;\ncase 49:return 56;\nbreak;\ncase 50:return 63;\nbreak;\ncase 51:return 57;\nbreak;\n}\n},\nrules: [/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:title\\b)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\\b)/i,/^(?:[\"][`])/i,/^(?:[^`\"]+)/i,/^(?:[`][\"])/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?::::)/i,/^(?:^\\w+)/i,/^(?:\\s*:\\s*\\[\\s*)/i,/^(?:(1)|(0(.\\d+)?))/i,/^(?:\\s*\\] *)/i,/^(?:\\s*,\\s*)/i,/^(?:(1)|(0(.\\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\\*)/i,/^(?:#)/i,/^(?:[\\_])/i,/^(?:\\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\\s)/i,/^(?:;)/i,/^(?:[!\"#$%&'*+,-.`?\\\\_/])/i,/^(?:$)/i],\nconditions: {\"class_name\":{\"rules\":[28],\"inclusive\":false},\"point_y\":{\"rules\":[33],\"inclusive\":false},\"point_x\":{\"rules\":[32],\"inclusive\":false},\"point_start\":{\"rules\":[30,31],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[11,12],\"inclusive\":false},\"acc_descr\":{\"rules\":[9],\"inclusive\":false},\"acc_title\":{\"rules\":[7],\"inclusive\":false},\"title\":{\"rules\":[5],\"inclusive\":false},\"md_string\":{\"rules\":[22,23],\"inclusive\":false},\"string\":{\"rules\":[25,26],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { scaleLinear } from 'd3';\nimport type { BaseDiagramConfig, QuadrantChartConfig } from '../../config.type.js';\nimport defaultConfig from '../../defaultConfig.js';\nimport { log } from '../../logger.js';\nimport { getThemeVariables } from '../../themes/theme-default.js';\nimport type { Point } from '../../types.js';\n\nconst defaultThemeVariables = getThemeVariables();\n\nexport type TextVerticalPos = 'left' | 'center' | 'right';\nexport type TextHorizontalPos = 'top' | 'middle' | 'bottom';\n\nexport interface StylesObject {\n className?: string;\n radius?: number;\n color?: string;\n strokeColor?: string;\n strokeWidth?: string;\n}\n\nexport interface QuadrantPointInputType extends Point, StylesObject {\n text: string;\n}\n\nexport interface QuadrantTextType extends Point {\n text: string;\n fill: string;\n verticalPos: TextVerticalPos;\n horizontalPos: TextHorizontalPos;\n fontSize: number;\n rotation: number;\n}\n\nexport interface QuadrantPointType\n extends Point,\n Pick {\n fill: string;\n radius: number;\n text: QuadrantTextType;\n}\n\nexport interface QuadrantQuadrantsType extends Point {\n text: QuadrantTextType;\n width: number;\n height: number;\n fill: string;\n}\n\nexport interface QuadrantLineType {\n strokeWidth: number;\n strokeFill: string;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n}\n\nexport interface QuadrantBuildType {\n points: QuadrantPointType[];\n quadrants: QuadrantQuadrantsType[];\n axisLabels: QuadrantTextType[];\n title?: QuadrantTextType;\n borderLines?: QuadrantLineType[];\n}\n\nexport interface QuadrantBuilderData {\n titleText: string;\n quadrant1Text: string;\n quadrant2Text: string;\n quadrant3Text: string;\n quadrant4Text: string;\n xAxisLeftText: string;\n xAxisRightText: string;\n yAxisBottomText: string;\n yAxisTopText: string;\n points: QuadrantPointInputType[];\n}\n\nexport interface QuadrantBuilderConfig\n extends Required> {\n showXAxis: boolean;\n showYAxis: boolean;\n showTitle: boolean;\n}\n\nexport interface QuadrantBuilderThemeConfig {\n quadrantTitleFill: string;\n quadrant1Fill: string;\n quadrant2Fill: string;\n quadrant3Fill: string;\n quadrant4Fill: string;\n quadrant1TextFill: string;\n quadrant2TextFill: string;\n quadrant3TextFill: string;\n quadrant4TextFill: string;\n quadrantPointFill: string;\n quadrantPointTextFill: string;\n quadrantXAxisTextFill: string;\n quadrantYAxisTextFill: string;\n quadrantInternalBorderStrokeFill: string;\n quadrantExternalBorderStrokeFill: string;\n}\n\ninterface CalculateSpaceData {\n xAxisSpace: {\n top: number;\n bottom: number;\n };\n yAxisSpace: {\n left: number;\n right: number;\n };\n titleSpace: {\n top: number;\n };\n quadrantSpace: {\n quadrantLeft: number;\n quadrantTop: number;\n quadrantWidth: number;\n quadrantHalfWidth: number;\n quadrantHeight: number;\n quadrantHalfHeight: number;\n };\n}\n\nexport class QuadrantBuilder {\n private config: QuadrantBuilderConfig;\n private themeConfig: QuadrantBuilderThemeConfig;\n private data: QuadrantBuilderData;\n private classes = new Map();\n\n constructor() {\n this.config = this.getDefaultConfig();\n this.themeConfig = this.getDefaultThemeConfig();\n this.data = this.getDefaultData();\n }\n\n getDefaultData(): QuadrantBuilderData {\n return {\n titleText: '',\n quadrant1Text: '',\n quadrant2Text: '',\n quadrant3Text: '',\n quadrant4Text: '',\n xAxisLeftText: '',\n xAxisRightText: '',\n yAxisBottomText: '',\n yAxisTopText: '',\n points: [],\n };\n }\n\n getDefaultConfig(): QuadrantBuilderConfig {\n return {\n showXAxis: true,\n showYAxis: true,\n showTitle: true,\n chartHeight: defaultConfig.quadrantChart?.chartWidth || 500,\n chartWidth: defaultConfig.quadrantChart?.chartHeight || 500,\n titlePadding: defaultConfig.quadrantChart?.titlePadding || 10,\n titleFontSize: defaultConfig.quadrantChart?.titleFontSize || 20,\n quadrantPadding: defaultConfig.quadrantChart?.quadrantPadding || 5,\n xAxisLabelPadding: defaultConfig.quadrantChart?.xAxisLabelPadding || 5,\n yAxisLabelPadding: defaultConfig.quadrantChart?.yAxisLabelPadding || 5,\n xAxisLabelFontSize: defaultConfig.quadrantChart?.xAxisLabelFontSize || 16,\n yAxisLabelFontSize: defaultConfig.quadrantChart?.yAxisLabelFontSize || 16,\n quadrantLabelFontSize: defaultConfig.quadrantChart?.quadrantLabelFontSize || 16,\n quadrantTextTopPadding: defaultConfig.quadrantChart?.quadrantTextTopPadding || 5,\n pointTextPadding: defaultConfig.quadrantChart?.pointTextPadding || 5,\n pointLabelFontSize: defaultConfig.quadrantChart?.pointLabelFontSize || 12,\n pointRadius: defaultConfig.quadrantChart?.pointRadius || 5,\n xAxisPosition: defaultConfig.quadrantChart?.xAxisPosition || 'top',\n yAxisPosition: defaultConfig.quadrantChart?.yAxisPosition || 'left',\n quadrantInternalBorderStrokeWidth:\n defaultConfig.quadrantChart?.quadrantInternalBorderStrokeWidth || 1,\n quadrantExternalBorderStrokeWidth:\n defaultConfig.quadrantChart?.quadrantExternalBorderStrokeWidth || 2,\n };\n }\n\n getDefaultThemeConfig(): QuadrantBuilderThemeConfig {\n return {\n quadrant1Fill: defaultThemeVariables.quadrant1Fill,\n quadrant2Fill: defaultThemeVariables.quadrant2Fill,\n quadrant3Fill: defaultThemeVariables.quadrant3Fill,\n quadrant4Fill: defaultThemeVariables.quadrant4Fill,\n quadrant1TextFill: defaultThemeVariables.quadrant1TextFill,\n quadrant2TextFill: defaultThemeVariables.quadrant2TextFill,\n quadrant3TextFill: defaultThemeVariables.quadrant3TextFill,\n quadrant4TextFill: defaultThemeVariables.quadrant4TextFill,\n quadrantPointFill: defaultThemeVariables.quadrantPointFill,\n quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill,\n quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill,\n quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill,\n quadrantTitleFill: defaultThemeVariables.quadrantTitleFill,\n quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill,\n quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill,\n };\n }\n\n clear() {\n this.config = this.getDefaultConfig();\n this.themeConfig = this.getDefaultThemeConfig();\n this.data = this.getDefaultData();\n this.classes = new Map();\n log.info('clear called');\n }\n\n setData(data: Partial) {\n this.data = { ...this.data, ...data };\n }\n\n addPoints(points: QuadrantPointInputType[]) {\n this.data.points = [...points, ...this.data.points];\n }\n\n addClass(className: string, styles: StylesObject) {\n this.classes.set(className, styles);\n }\n\n setConfig(config: Partial) {\n log.trace('setConfig called with: ', config);\n this.config = { ...this.config, ...config };\n }\n\n setThemeConfig(themeConfig: Partial) {\n log.trace('setThemeConfig called with: ', themeConfig);\n this.themeConfig = { ...this.themeConfig, ...themeConfig };\n }\n\n calculateSpace(\n xAxisPosition: typeof this.config.xAxisPosition,\n showXAxis: boolean,\n showYAxis: boolean,\n showTitle: boolean\n ): CalculateSpaceData {\n const xAxisSpaceCalculation =\n this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize;\n const xAxisSpace = {\n top: xAxisPosition === 'top' && showXAxis ? xAxisSpaceCalculation : 0,\n bottom: xAxisPosition === 'bottom' && showXAxis ? xAxisSpaceCalculation : 0,\n };\n\n const yAxisSpaceCalculation =\n this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize;\n const yAxisSpace = {\n left: this.config.yAxisPosition === 'left' && showYAxis ? yAxisSpaceCalculation : 0,\n right: this.config.yAxisPosition === 'right' && showYAxis ? yAxisSpaceCalculation : 0,\n };\n\n const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2;\n const titleSpace = {\n top: showTitle ? titleSpaceCalculation : 0,\n };\n\n const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left;\n const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top;\n const quadrantWidth =\n this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right;\n const quadrantHeight =\n this.config.chartHeight -\n this.config.quadrantPadding * 2 -\n xAxisSpace.top -\n xAxisSpace.bottom -\n titleSpace.top;\n\n const quadrantHalfWidth = quadrantWidth / 2;\n const quadrantHalfHeight = quadrantHeight / 2;\n const quadrantSpace = {\n quadrantLeft,\n quadrantTop,\n quadrantWidth,\n quadrantHalfWidth,\n quadrantHeight,\n quadrantHalfHeight,\n };\n\n return {\n xAxisSpace,\n yAxisSpace,\n titleSpace,\n quadrantSpace,\n };\n }\n\n getAxisLabels(\n xAxisPosition: typeof this.config.xAxisPosition,\n showXAxis: boolean,\n showYAxis: boolean,\n spaceData: CalculateSpaceData\n ): QuadrantTextType[] {\n const { quadrantSpace, titleSpace } = spaceData;\n const {\n quadrantHalfHeight,\n quadrantHeight,\n quadrantLeft,\n quadrantHalfWidth,\n quadrantTop,\n quadrantWidth,\n } = quadrantSpace;\n\n const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText);\n const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText);\n\n const axisLabels: QuadrantTextType[] = [];\n\n if (this.data.xAxisLeftText && showXAxis) {\n axisLabels.push({\n text: this.data.xAxisLeftText,\n fill: this.themeConfig.quadrantXAxisTextFill,\n x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),\n y:\n xAxisPosition === 'top'\n ? this.config.xAxisLabelPadding + titleSpace.top\n : this.config.xAxisLabelPadding +\n quadrantTop +\n quadrantHeight +\n this.config.quadrantPadding,\n fontSize: this.config.xAxisLabelFontSize,\n verticalPos: drawXAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: 0,\n });\n }\n if (this.data.xAxisRightText && showXAxis) {\n axisLabels.push({\n text: this.data.xAxisRightText,\n fill: this.themeConfig.quadrantXAxisTextFill,\n x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),\n y:\n xAxisPosition === 'top'\n ? this.config.xAxisLabelPadding + titleSpace.top\n : this.config.xAxisLabelPadding +\n quadrantTop +\n quadrantHeight +\n this.config.quadrantPadding,\n fontSize: this.config.xAxisLabelFontSize,\n verticalPos: drawXAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: 0,\n });\n }\n\n if (this.data.yAxisBottomText && showYAxis) {\n axisLabels.push({\n text: this.data.yAxisBottomText,\n fill: this.themeConfig.quadrantYAxisTextFill,\n x:\n this.config.yAxisPosition === 'left'\n ? this.config.yAxisLabelPadding\n : this.config.yAxisLabelPadding +\n quadrantLeft +\n quadrantWidth +\n this.config.quadrantPadding,\n y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),\n fontSize: this.config.yAxisLabelFontSize,\n verticalPos: drawYAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: -90,\n });\n }\n if (this.data.yAxisTopText && showYAxis) {\n axisLabels.push({\n text: this.data.yAxisTopText,\n fill: this.themeConfig.quadrantYAxisTextFill,\n x:\n this.config.yAxisPosition === 'left'\n ? this.config.yAxisLabelPadding\n : this.config.yAxisLabelPadding +\n quadrantLeft +\n quadrantWidth +\n this.config.quadrantPadding,\n y:\n quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),\n fontSize: this.config.yAxisLabelFontSize,\n verticalPos: drawYAxisLabelsInMiddle ? 'center' : 'left',\n horizontalPos: 'top',\n rotation: -90,\n });\n }\n return axisLabels;\n }\n\n getQuadrants(spaceData: CalculateSpaceData): QuadrantQuadrantsType[] {\n const { quadrantSpace } = spaceData;\n\n const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace;\n\n const quadrants: QuadrantQuadrantsType[] = [\n {\n text: {\n text: this.data.quadrant1Text,\n fill: this.themeConfig.quadrant1TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft + quadrantHalfWidth,\n y: quadrantTop,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant1Fill,\n },\n {\n text: {\n text: this.data.quadrant2Text,\n fill: this.themeConfig.quadrant2TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft,\n y: quadrantTop,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant2Fill,\n },\n {\n text: {\n text: this.data.quadrant3Text,\n fill: this.themeConfig.quadrant3TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft,\n y: quadrantTop + quadrantHalfHeight,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant3Fill,\n },\n {\n text: {\n text: this.data.quadrant4Text,\n fill: this.themeConfig.quadrant4TextFill,\n x: 0,\n y: 0,\n fontSize: this.config.quadrantLabelFontSize,\n verticalPos: 'center',\n horizontalPos: 'middle',\n rotation: 0,\n },\n x: quadrantLeft + quadrantHalfWidth,\n y: quadrantTop + quadrantHalfHeight,\n width: quadrantHalfWidth,\n height: quadrantHalfHeight,\n fill: this.themeConfig.quadrant4Fill,\n },\n ];\n for (const quadrant of quadrants) {\n quadrant.text.x = quadrant.x + quadrant.width / 2;\n // place the text in the center of the box\n if (this.data.points.length === 0) {\n quadrant.text.y = quadrant.y + quadrant.height / 2;\n quadrant.text.horizontalPos = 'middle';\n // place the text top of the quadrant square\n } else {\n quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding;\n quadrant.text.horizontalPos = 'top';\n }\n }\n\n return quadrants;\n }\n\n getQuadrantPoints(spaceData: CalculateSpaceData): QuadrantPointType[] {\n const { quadrantSpace } = spaceData;\n\n const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace;\n\n const xAxis = scaleLinear()\n .domain([0, 1])\n .range([quadrantLeft, quadrantWidth + quadrantLeft]);\n\n const yAxis = scaleLinear()\n .domain([0, 1])\n .range([quadrantHeight + quadrantTop, quadrantTop]);\n\n const points: QuadrantPointType[] = this.data.points.map((point) => {\n const classStyles = this.classes.get(point.className!);\n if (classStyles) {\n point = { ...classStyles, ...point };\n }\n const props: QuadrantPointType = {\n x: xAxis(point.x),\n y: yAxis(point.y),\n fill: point.color ?? this.themeConfig.quadrantPointFill,\n radius: point.radius ?? this.config.pointRadius,\n text: {\n text: point.text,\n fill: this.themeConfig.quadrantPointTextFill,\n x: xAxis(point.x),\n y: yAxis(point.y) + this.config.pointTextPadding,\n verticalPos: 'center',\n horizontalPos: 'top',\n fontSize: this.config.pointLabelFontSize,\n rotation: 0,\n },\n strokeColor: point.strokeColor ?? this.themeConfig.quadrantPointFill,\n strokeWidth: point.strokeWidth ?? '0px',\n };\n return props;\n });\n return points;\n }\n\n getBorders(spaceData: CalculateSpaceData): QuadrantLineType[] {\n const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2;\n const { quadrantSpace } = spaceData;\n\n const {\n quadrantHalfHeight,\n quadrantHeight,\n quadrantLeft,\n quadrantHalfWidth,\n quadrantTop,\n quadrantWidth,\n } = quadrantSpace;\n\n const borderLines: QuadrantLineType[] = [\n // top border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft - halfExternalBorderWidth,\n y1: quadrantTop,\n x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,\n y2: quadrantTop,\n },\n // right border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft + quadrantWidth,\n y1: quadrantTop + halfExternalBorderWidth,\n x2: quadrantLeft + quadrantWidth,\n y2: quadrantTop + quadrantHeight - halfExternalBorderWidth,\n },\n // bottom border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft - halfExternalBorderWidth,\n y1: quadrantTop + quadrantHeight,\n x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,\n y2: quadrantTop + quadrantHeight,\n },\n // left border\n {\n strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,\n strokeWidth: this.config.quadrantExternalBorderStrokeWidth,\n x1: quadrantLeft,\n y1: quadrantTop + halfExternalBorderWidth,\n x2: quadrantLeft,\n y2: quadrantTop + quadrantHeight - halfExternalBorderWidth,\n },\n // vertical inner border\n {\n strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,\n strokeWidth: this.config.quadrantInternalBorderStrokeWidth,\n x1: quadrantLeft + quadrantHalfWidth,\n y1: quadrantTop + halfExternalBorderWidth,\n x2: quadrantLeft + quadrantHalfWidth,\n y2: quadrantTop + quadrantHeight - halfExternalBorderWidth,\n },\n // horizontal inner border\n {\n strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,\n strokeWidth: this.config.quadrantInternalBorderStrokeWidth,\n x1: quadrantLeft + halfExternalBorderWidth,\n y1: quadrantTop + quadrantHalfHeight,\n x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth,\n y2: quadrantTop + quadrantHalfHeight,\n },\n ];\n return borderLines;\n }\n\n getTitle(showTitle: boolean): QuadrantTextType | undefined {\n if (showTitle) {\n return {\n text: this.data.titleText,\n fill: this.themeConfig.quadrantTitleFill,\n fontSize: this.config.titleFontSize,\n horizontalPos: 'top',\n verticalPos: 'center',\n rotation: 0,\n y: this.config.titlePadding,\n x: this.config.chartWidth / 2,\n };\n }\n return;\n }\n\n build(): QuadrantBuildType {\n const showXAxis =\n this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText);\n const showYAxis =\n this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText);\n const showTitle = this.config.showTitle && !!this.data.titleText;\n\n const xAxisPosition = this.data.points.length > 0 ? 'bottom' : this.config.xAxisPosition;\n\n const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle);\n\n return {\n points: this.getQuadrantPoints(calculatedSpace),\n quadrants: this.getQuadrants(calculatedSpace),\n axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace),\n borderLines: this.getBorders(calculatedSpace),\n title: this.getTitle(showTitle),\n };\n }\n}\n", "class InvalidStyleError extends Error {\n constructor(style: string, value: string, type: string) {\n super(`value for ${style} ${value} is invalid, please use a valid ${type}`);\n this.name = 'InvalidStyleError';\n }\n}\n\nfunction validateHexCode(value: string): boolean {\n return !/^#?([\\dA-Fa-f]{6}|[\\dA-Fa-f]{3})$/.test(value);\n}\n\nfunction validateNumber(value: string): boolean {\n return !/^\\d+$/.test(value);\n}\n\nfunction validateSizeInPixels(value: string): boolean {\n return !/^\\d+px$/.test(value);\n}\n\nexport { validateHexCode, validateNumber, validateSizeInPixels, InvalidStyleError };\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\nimport type { StylesObject } from './quadrantBuilder.js';\nimport { QuadrantBuilder } from './quadrantBuilder.js';\nimport {\n validateHexCode,\n validateSizeInPixels,\n validateNumber,\n InvalidStyleError,\n} from './utils.js';\n\nconst config = getConfig();\n\nfunction textSanitizer(text: string) {\n return sanitizeText(text.trim(), config);\n}\n\ninterface LexTextObj {\n text: string;\n type: 'text' | 'markdown';\n}\n\nconst quadrantBuilder = new QuadrantBuilder();\n\nfunction setQuadrant1Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) });\n}\n\nfunction setQuadrant2Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) });\n}\n\nfunction setQuadrant3Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) });\n}\n\nfunction setQuadrant4Text(textObj: LexTextObj) {\n quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) });\n}\n\nfunction setXAxisLeftText(textObj: LexTextObj) {\n quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) });\n}\n\nfunction setXAxisRightText(textObj: LexTextObj) {\n quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) });\n}\n\nfunction setYAxisTopText(textObj: LexTextObj) {\n quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) });\n}\n\nfunction setYAxisBottomText(textObj: LexTextObj) {\n quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) });\n}\n\nfunction parseStyles(styles: string[]): StylesObject {\n const stylesObject: StylesObject = {};\n for (const style of styles) {\n const [key, value] = style.trim().split(/\\s*:\\s*/);\n if (key === 'radius') {\n if (validateNumber(value)) {\n throw new InvalidStyleError(key, value, 'number');\n }\n stylesObject.radius = parseInt(value);\n } else if (key === 'color') {\n if (validateHexCode(value)) {\n throw new InvalidStyleError(key, value, 'hex code');\n }\n stylesObject.color = value;\n } else if (key === 'stroke-color') {\n if (validateHexCode(value)) {\n throw new InvalidStyleError(key, value, 'hex code');\n }\n stylesObject.strokeColor = value;\n } else if (key === 'stroke-width') {\n if (validateSizeInPixels(value)) {\n throw new InvalidStyleError(key, value, 'number of pixels (eg. 10px)');\n }\n stylesObject.strokeWidth = value;\n } else {\n throw new Error(`style named ${key} is not supported.`);\n }\n }\n return stylesObject;\n}\n\nfunction addPoint(textObj: LexTextObj, className: string, x: number, y: number, styles: string[]) {\n const stylesObject = parseStyles(styles);\n quadrantBuilder.addPoints([\n {\n x,\n y,\n text: textSanitizer(textObj.text),\n className,\n ...stylesObject,\n },\n ]);\n}\n\nfunction addClass(className: string, styles: string[]) {\n quadrantBuilder.addClass(className, parseStyles(styles));\n}\n\nfunction setWidth(width: number) {\n quadrantBuilder.setConfig({ chartWidth: width });\n}\n\nfunction setHeight(height: number) {\n quadrantBuilder.setConfig({ chartHeight: height });\n}\n\nfunction getQuadrantData() {\n const config = getConfig();\n const { themeVariables, quadrantChart: quadrantChartConfig } = config;\n if (quadrantChartConfig) {\n quadrantBuilder.setConfig(quadrantChartConfig);\n }\n quadrantBuilder.setThemeConfig({\n quadrant1Fill: themeVariables.quadrant1Fill,\n quadrant2Fill: themeVariables.quadrant2Fill,\n quadrant3Fill: themeVariables.quadrant3Fill,\n quadrant4Fill: themeVariables.quadrant4Fill,\n quadrant1TextFill: themeVariables.quadrant1TextFill,\n quadrant2TextFill: themeVariables.quadrant2TextFill,\n quadrant3TextFill: themeVariables.quadrant3TextFill,\n quadrant4TextFill: themeVariables.quadrant4TextFill,\n quadrantPointFill: themeVariables.quadrantPointFill,\n quadrantPointTextFill: themeVariables.quadrantPointTextFill,\n quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill,\n quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill,\n quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill,\n quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill,\n quadrantTitleFill: themeVariables.quadrantTitleFill,\n });\n quadrantBuilder.setData({ titleText: getDiagramTitle() });\n return quadrantBuilder.build();\n}\n\nconst clear = function () {\n quadrantBuilder.clear();\n commonClear();\n};\n\nexport default {\n setWidth,\n setHeight,\n setQuadrant1Text,\n setQuadrant2Text,\n setQuadrant3Text,\n setQuadrant4Text,\n setXAxisLeftText,\n setXAxisRightText,\n setYAxisTopText,\n setYAxisBottomText,\n parseStyles,\n addPoint,\n addClass,\n getQuadrantData,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n};\n", "// @ts-nocheck - don't check until handle it\nimport { select } from 'd3';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { Diagram } from '../../Diagram.js';\nimport type {\n QuadrantBuildType,\n QuadrantLineType,\n QuadrantPointType,\n QuadrantQuadrantsType,\n QuadrantTextType,\n TextHorizontalPos,\n TextVerticalPos,\n} from './quadrantBuilder.js';\n\nexport const draw = (txt: string, id: string, _version: string, diagObj: Diagram) => {\n function getDominantBaseLine(horizontalPos: TextHorizontalPos) {\n return horizontalPos === 'top' ? 'hanging' : 'middle';\n }\n\n function getTextAnchor(verticalPos: TextVerticalPos) {\n return verticalPos === 'left' ? 'start' : 'middle';\n }\n\n function getTransformation(data: { x: number; y: number; rotation: number }) {\n return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;\n }\n\n const conf = getConfig();\n\n log.debug('Rendering quadrant chart\\n' + txt);\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id=\"${id}\"]`);\n\n const group = svg.append('g').attr('class', 'main');\n\n const width = conf.quadrantChart?.chartWidth ?? 500;\n const height = conf.quadrantChart?.chartHeight ?? 500;\n\n configureSvgSize(svg, height, width, conf.quadrantChart?.useMaxWidth ?? true);\n\n svg.attr('viewBox', '0 0 ' + width + ' ' + height);\n\n // @ts-ignore: TODO Fix ts errors\n diagObj.db.setHeight(height);\n // @ts-ignore: TODO Fix ts errors\n diagObj.db.setWidth(width);\n\n // @ts-ignore: TODO Fix ts errors\n const quadrantData: QuadrantBuildType = diagObj.db.getQuadrantData();\n\n const quadrantsGroup = group.append('g').attr('class', 'quadrants');\n const borderGroup = group.append('g').attr('class', 'border');\n const dataPointGroup = group.append('g').attr('class', 'data-points');\n const labelGroup = group.append('g').attr('class', 'labels');\n const titleGroup = group.append('g').attr('class', 'title');\n\n if (quadrantData.title) {\n titleGroup\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .attr('fill', quadrantData.title.fill)\n .attr('font-size', quadrantData.title.fontSize)\n .attr('dominant-baseline', getDominantBaseLine(quadrantData.title.horizontalPos))\n .attr('text-anchor', getTextAnchor(quadrantData.title.verticalPos))\n .attr('transform', getTransformation(quadrantData.title))\n .text(quadrantData.title.text);\n }\n\n if (quadrantData.borderLines) {\n borderGroup\n .selectAll('line')\n .data(quadrantData.borderLines)\n .enter()\n .append('line')\n .attr('x1', (data: QuadrantLineType) => data.x1)\n .attr('y1', (data: QuadrantLineType) => data.y1)\n .attr('x2', (data: QuadrantLineType) => data.x2)\n .attr('y2', (data: QuadrantLineType) => data.y2)\n .style('stroke', (data: QuadrantLineType) => data.strokeFill)\n .style('stroke-width', (data: QuadrantLineType) => data.strokeWidth);\n }\n\n const quadrants = quadrantsGroup\n .selectAll('g.quadrant')\n .data(quadrantData.quadrants)\n .enter()\n .append('g')\n .attr('class', 'quadrant');\n\n quadrants\n .append('rect')\n .attr('x', (data: QuadrantQuadrantsType) => data.x)\n .attr('y', (data: QuadrantQuadrantsType) => data.y)\n .attr('width', (data: QuadrantQuadrantsType) => data.width)\n .attr('height', (data: QuadrantQuadrantsType) => data.height)\n .attr('fill', (data: QuadrantQuadrantsType) => data.fill);\n\n quadrants\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .attr('fill', (data: QuadrantQuadrantsType) => data.text.fill)\n .attr('font-size', (data: QuadrantQuadrantsType) => data.text.fontSize)\n .attr('dominant-baseline', (data: QuadrantQuadrantsType) =>\n getDominantBaseLine(data.text.horizontalPos)\n )\n .attr('text-anchor', (data: QuadrantQuadrantsType) => getTextAnchor(data.text.verticalPos))\n .attr('transform', (data: QuadrantQuadrantsType) => getTransformation(data.text))\n .text((data: QuadrantQuadrantsType) => data.text.text);\n\n const labels = labelGroup\n .selectAll('g.label')\n .data(quadrantData.axisLabels)\n .enter()\n .append('g')\n .attr('class', 'label');\n\n labels\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .text((data: QuadrantTextType) => data.text)\n .attr('fill', (data: QuadrantTextType) => data.fill)\n .attr('font-size', (data: QuadrantTextType) => data.fontSize)\n .attr('dominant-baseline', (data: QuadrantTextType) => getDominantBaseLine(data.horizontalPos))\n .attr('text-anchor', (data: QuadrantTextType) => getTextAnchor(data.verticalPos))\n .attr('transform', (data: QuadrantTextType) => getTransformation(data));\n\n const dataPoints = dataPointGroup\n .selectAll('g.data-point')\n .data(quadrantData.points)\n .enter()\n .append('g')\n .attr('class', 'data-point');\n\n dataPoints\n .append('circle')\n .attr('cx', (data: QuadrantPointType) => data.x)\n .attr('cy', (data: QuadrantPointType) => data.y)\n .attr('r', (data: QuadrantPointType) => data.radius)\n .attr('fill', (data: QuadrantPointType) => data.fill)\n .attr('stroke', (data: QuadrantPointType) => data.strokeColor)\n .attr('stroke-width', (data: QuadrantPointType) => data.strokeWidth);\n\n dataPoints\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .text((data: QuadrantPointType) => data.text.text)\n .attr('fill', (data: QuadrantPointType) => data.text.fill)\n .attr('font-size', (data: QuadrantPointType) => data.text.fontSize)\n .attr('dominant-baseline', (data: QuadrantPointType) =>\n getDominantBaseLine(data.text.horizontalPos)\n )\n .attr('text-anchor', (data: QuadrantPointType) => getTextAnchor(data.text.verticalPos))\n .attr('transform', (data: QuadrantPointType) => getTransformation(data.text));\n};\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/quadrant.jison';\nimport db from './quadrantDb.js';\nimport renderer from './quadrantRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles: () => '',\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,10,12,14,16,18,19,21,23],$V1=[2,6],$V2=[1,3],$V3=[1,5],$V4=[1,6],$V5=[1,7],$V6=[1,5,10,12,14,16,18,19,21,23,34,35,36],$V7=[1,25],$V8=[1,26],$V9=[1,28],$Va=[1,29],$Vb=[1,30],$Vc=[1,31],$Vd=[1,32],$Ve=[1,33],$Vf=[1,34],$Vg=[1,35],$Vh=[1,36],$Vi=[1,37],$Vj=[1,43],$Vk=[1,42],$Vl=[1,47],$Vm=[1,50],$Vn=[1,10,12,14,16,18,19,21,23,34,35,36],$Vo=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],$Vp=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],$Vq=[1,64];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"eol\":4,\"XYCHART\":5,\"chartConfig\":6,\"document\":7,\"CHART_ORIENTATION\":8,\"statement\":9,\"title\":10,\"text\":11,\"X_AXIS\":12,\"parseXAxis\":13,\"Y_AXIS\":14,\"parseYAxis\":15,\"LINE\":16,\"plotData\":17,\"BAR\":18,\"acc_title\":19,\"acc_title_value\":20,\"acc_descr\":21,\"acc_descr_value\":22,\"acc_descr_multiline_value\":23,\"SQUARE_BRACES_START\":24,\"commaSeparatedNumbers\":25,\"SQUARE_BRACES_END\":26,\"NUMBER_WITH_DECIMAL\":27,\"COMMA\":28,\"xAxisData\":29,\"bandData\":30,\"ARROW_DELIMITER\":31,\"commaSeparatedTexts\":32,\"yAxisData\":33,\"NEWLINE\":34,\"SEMI\":35,\"EOF\":36,\"alphaNum\":37,\"STR\":38,\"MD_STR\":39,\"alphaNumToken\":40,\"AMP\":41,\"NUM\":42,\"ALPHA\":43,\"PLUS\":44,\"EQUALS\":45,\"MULT\":46,\"DOT\":47,\"BRKT\":48,\"MINUS\":49,\"UNDERSCORE\":50,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"XYCHART\",8:\"CHART_ORIENTATION\",10:\"title\",12:\"X_AXIS\",14:\"Y_AXIS\",16:\"LINE\",18:\"BAR\",19:\"acc_title\",20:\"acc_title_value\",21:\"acc_descr\",22:\"acc_descr_value\",23:\"acc_descr_multiline_value\",24:\"SQUARE_BRACES_START\",26:\"SQUARE_BRACES_END\",27:\"NUMBER_WITH_DECIMAL\",28:\"COMMA\",31:\"ARROW_DELIMITER\",34:\"NEWLINE\",35:\"SEMI\",36:\"EOF\",38:\"STR\",39:\"MD_STR\",41:\"AMP\",42:\"NUM\",43:\"ALPHA\",44:\"PLUS\",45:\"EQUALS\",46:\"MULT\",47:\"DOT\",48:\"BRKT\",49:\"MINUS\",50:\"UNDERSCORE\"},\nproductions_: [0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 5:\n yy.setOrientation($$[$0]); \nbreak;\ncase 9:\n yy.setDiagramTitle($$[$0].text.trim()); \nbreak;\ncase 12:\n yy.setLineData({text: '', type: 'text'}, $$[$0]); \nbreak;\ncase 13:\n yy.setLineData($$[$0-1], $$[$0]); \nbreak;\ncase 14:\n yy.setBarData({text: '', type: 'text'}, $$[$0]); \nbreak;\ncase 15:\n yy.setBarData($$[$0-1], $$[$0]); \nbreak;\ncase 16:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 17: case 18:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 19:\n this.$ = $$[$0-1] \nbreak;\ncase 20:\n this.$ = [Number($$[$0-2]), ...$$[$0]] \nbreak;\ncase 21:\n this.$ = [Number($$[$0])] \nbreak;\ncase 22:\nyy.setXAxisTitle($$[$0]);\nbreak;\ncase 23:\nyy.setXAxisTitle($$[$0-1]);\nbreak;\ncase 24:\nyy.setXAxisTitle({type: 'text', text: ''});\nbreak;\ncase 25:\nyy.setXAxisBand($$[$0]);\nbreak;\ncase 26:\nyy.setXAxisRangeData(Number($$[$0-2]), Number($$[$0]));\nbreak;\ncase 27:\nthis.$ = $$[$0-1]\nbreak;\ncase 28:\n this.$ = [$$[$0-2], ...$$[$0]] \nbreak;\ncase 29:\n this.$ = [$$[$0]] \nbreak;\ncase 30:\nyy.setYAxisTitle($$[$0]);\nbreak;\ncase 31:\nyy.setYAxisTitle($$[$0-1]);\nbreak;\ncase 32:\nyy.setYAxisTitle({type: \"text\", text: \"\"});\nbreak;\ncase 33:\nyy.setYAxisRangeData(Number($$[$0-2]), Number($$[$0]));\nbreak;\ncase 37:\n this.$={text:$$[$0], type: 'text'};\nbreak;\ncase 38:\n this.$={text: $$[$0], type: 'text'};\nbreak;\ncase 39:\n this.$={text: $$[$0], type: 'markdown'};\nbreak;\ncase 40:\nthis.$=$$[$0];\nbreak;\ncase 41:\nthis.$=$$[$0-1]+''+$$[$0];\nbreak;\n}\n},\ntable: [o($V0,$V1,{3:1,4:2,7:4,5:$V2,34:$V3,35:$V4,36:$V5}),{1:[3]},o($V0,$V1,{4:2,7:4,3:8,5:$V2,34:$V3,35:$V4,36:$V5}),o($V0,$V1,{4:2,7:4,6:9,3:10,5:$V2,8:[1,11],34:$V3,35:$V4,36:$V5}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},o($V6,[2,34]),o($V6,[2,35]),o($V6,[2,36]),{1:[2,1]},o($V0,$V1,{4:2,7:4,3:21,5:$V2,34:$V3,35:$V4,36:$V5}),{1:[2,3]},o($V6,[2,5]),o($V0,[2,7],{4:22,34:$V3,35:$V4,36:$V5}),{11:23,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:39,13:38,24:$Vj,27:$Vk,29:40,30:41,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:45,15:44,27:$Vl,33:46,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:49,17:48,24:$Vm,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{11:52,17:51,24:$Vm,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},{20:[1,53]},{22:[1,54]},o($Vn,[2,18]),{1:[2,2]},o($Vn,[2,8]),o($Vn,[2,9]),o($Vo,[2,37],{40:55,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi}),o($Vo,[2,38]),o($Vo,[2,39]),o($Vp,[2,40]),o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($Vp,[2,48]),o($Vp,[2,49]),o($Vp,[2,50]),o($Vp,[2,51]),o($Vn,[2,10]),o($Vn,[2,22],{30:41,29:56,24:$Vj,27:$Vk}),o($Vn,[2,24]),o($Vn,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},o($Vn,[2,11]),o($Vn,[2,30],{33:60,27:$Vl}),o($Vn,[2,32]),{31:[1,61]},o($Vn,[2,12]),{17:62,24:$Vm},{25:63,27:$Vq},o($Vn,[2,14]),{17:65,24:$Vm},o($Vn,[2,16]),o($Vn,[2,17]),o($Vp,[2,41]),o($Vn,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},o($Vn,[2,31]),{27:[1,69]},o($Vn,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},o($Vn,[2,15]),o($Vn,[2,26]),o($Vn,[2,27]),{11:59,32:72,37:24,38:$V7,39:$V8,40:27,41:$V9,42:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:$Vf,48:$Vg,49:$Vh,50:$Vi},o($Vn,[2,33]),o($Vn,[2,19]),{25:73,27:$Vq},{26:[2,28]},{26:[2,20]}],\ndefaultActions: {8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2: this.popState(); return 34; \nbreak;\ncase 3: this.popState(); return 34; \nbreak;\ncase 4:return 34;\nbreak;\ncase 5:/* do nothing */\nbreak;\ncase 6: return 10; \nbreak;\ncase 7: this.pushState(\"acc_title\");return 19; \nbreak;\ncase 8: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 9: this.pushState(\"acc_descr\");return 21; \nbreak;\ncase 10: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 11: this.pushState(\"acc_descr_multiline\");\nbreak;\ncase 12: this.popState(); \nbreak;\ncase 13: return \"acc_descr_multiline_value\"; \nbreak;\ncase 14:return 5;\nbreak;\ncase 15:return 8\nbreak;\ncase 16: this.pushState(\"axis_data\"); return \"X_AXIS\"; \nbreak;\ncase 17: this.pushState(\"axis_data\"); return \"Y_AXIS\"; \nbreak;\ncase 18: this.pushState(\"axis_band_data\"); return 24; \nbreak;\ncase 19: return 31; \nbreak;\ncase 20: this.pushState(\"data\"); return 16; \nbreak;\ncase 21: this.pushState(\"data\"); return 18; \nbreak;\ncase 22: this.pushState(\"data_inner\"); return 24; \nbreak;\ncase 23: return 27; \nbreak;\ncase 24: this.popState(); return 26; \nbreak;\ncase 25: this.popState(); \nbreak;\ncase 26:this.pushState(\"string\");\nbreak;\ncase 27:this.popState();\nbreak;\ncase 28:return \"STR\";\nbreak;\ncase 29:return 24\nbreak;\ncase 30:return 26\nbreak;\ncase 31:return 43;\nbreak;\ncase 32:return 'COLON';\nbreak;\ncase 33:return 44;\nbreak;\ncase 34:return 28;\nbreak;\ncase 35:return 45;\nbreak;\ncase 36:return 46;\nbreak;\ncase 37:return 48;\nbreak;\ncase 38:return 50;\nbreak;\ncase 39:return 47;\nbreak;\ncase 40:return 41;\nbreak;\ncase 41:return 49;\nbreak;\ncase 42:return 42;\nbreak;\ncase 43:/* skip */\nbreak;\ncase 44:return 35;\nbreak;\ncase 45:return 36;\nbreak;\n}\n},\nrules: [/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:(\\r?\\n))/i,/^(?:(\\r?\\n))/i,/^(?:[\\n\\r]+)/i,/^(?:%%[^\\n]*)/i,/^(?:title\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:\\{)/i,/^(?:[^\\}]*)/i,/^(?:xychart-beta\\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\\b)/i,/^(?:y-axis\\b)/i,/^(?:\\[)/i,/^(?:-->)/i,/^(?:line\\b)/i,/^(?:bar\\b)/i,/^(?:\\[)/i,/^(?:[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+))/i,/^(?:\\])/i,/^(?:(?:`\\) \\{ this\\.pushState\\(md_string\\); \\}\\n\\(\\?:\\(\\?!`\"\\)\\.\\)\\+ \\{ return MD_STR; \\}\\n\\(\\?:`))/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:\\[)/i,/^(?:\\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\\*)/i,/^(?:#)/i,/^(?:[\\_])/i,/^(?:\\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\\s+)/i,/^(?:;)/i,/^(?:$)/i],\nconditions: {\"data_inner\":{\"rules\":[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"data\":{\"rules\":[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"axis_band_data\":{\"rules\":[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"axis_data\":{\"rules\":[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true},\"acc_descr_multiline\":{\"rules\":[12,13],\"inclusive\":false},\"acc_descr\":{\"rules\":[10],\"inclusive\":false},\"acc_title\":{\"rules\":[8],\"inclusive\":false},\"title\":{\"rules\":[],\"inclusive\":false},\"md_string\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[27,28],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "export interface XYChartAxisThemeConfig {\n titleColor: string;\n labelColor: string;\n tickColor: string;\n axisLineColor: string;\n}\n\nexport interface XYChartThemeConfig {\n backgroundColor: string;\n titleColor: string;\n xAxisLabelColor: string;\n xAxisTitleColor: string;\n xAxisTickColor: string;\n xAxisLineColor: string;\n yAxisLabelColor: string;\n yAxisTitleColor: string;\n yAxisTickColor: string;\n yAxisLineColor: string;\n plotColorPalette: string;\n}\n\nexport interface ChartComponent {\n calculateSpace(availableSpace: Dimension): Dimension;\n setBoundingBoxXY(point: Point): void;\n getDrawableElements(): DrawableElem[];\n}\n\nexport type SimplePlotDataType = [string, number][];\n\nexport interface LinePlotData {\n type: 'line';\n strokeFill: string;\n strokeWidth: number;\n data: SimplePlotDataType;\n}\n\nexport interface BarPlotData {\n type: 'bar';\n fill: string;\n data: SimplePlotDataType;\n}\n\nexport type PlotData = LinePlotData | BarPlotData;\n\nexport function isBarPlot(data: PlotData): data is BarPlotData {\n return data.type === 'bar';\n}\n\nexport interface BandAxisDataType {\n type: 'band';\n title: string;\n categories: string[];\n}\n\nexport interface LinearAxisDataType {\n type: 'linear';\n title: string;\n min: number;\n max: number;\n}\n\nexport type AxisDataType = LinearAxisDataType | BandAxisDataType;\n\nexport function isBandAxisData(data: AxisDataType): data is BandAxisDataType {\n return data.type === 'band';\n}\n\nexport function isLinearAxisData(data: AxisDataType): data is LinearAxisDataType {\n return data.type === 'linear';\n}\n\n/**\n * For now we are keeping this configs as we are removing the required fields while generating the config.type.ts file\n * we should remove `XYChartAxisConfig` and `XYChartConfig` after we started using required fields\n */\nexport interface XYChartAxisConfig {\n showLabel: boolean;\n labelFontSize: number;\n labelPadding: number;\n showTitle: boolean;\n titleFontSize: number;\n titlePadding: number;\n showTick: boolean;\n tickLength: number;\n tickWidth: number;\n showAxisLine: boolean;\n axisLineWidth: number;\n}\n\nexport interface XYChartConfig {\n width: number;\n height: number;\n titleFontSize: number;\n titlePadding: number;\n showTitle: boolean;\n xAxis: XYChartAxisConfig;\n yAxis: XYChartAxisConfig;\n chartOrientation: 'vertical' | 'horizontal';\n plotReservedSpacePercent: number;\n}\n\nexport interface XYChartData {\n xAxis: AxisDataType;\n yAxis: AxisDataType;\n title: string;\n plots: PlotData[];\n}\n\nexport interface Dimension {\n width: number;\n height: number;\n}\n\nexport interface BoundingRect extends Point, Dimension {}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport type TextHorizontalPos = 'left' | 'center' | 'right';\nexport type TextVerticalPos = 'top' | 'middle';\n\nexport interface RectElem extends Point {\n width: number;\n height: number;\n fill: string;\n strokeWidth: number;\n strokeFill: string;\n}\n\nexport interface TextElem extends Point {\n text: string;\n fill: string;\n verticalPos: TextVerticalPos;\n horizontalPos: TextHorizontalPos;\n fontSize: number;\n rotation: number;\n}\n\nexport interface PathElem {\n path: string;\n fill?: string;\n strokeWidth: number;\n strokeFill: string;\n}\n\nexport type DrawableElem =\n | {\n groupTexts: string[];\n type: 'rect';\n data: RectElem[];\n }\n | {\n groupTexts: string[];\n type: 'text';\n data: TextElem[];\n }\n | {\n groupTexts: string[];\n type: 'path';\n data: PathElem[];\n };\n", "import type { SVGGroup } from '../../../diagram-api/types.js';\nimport { computeDimensionOfText } from '../../../rendering-util/createText.js';\nimport type { Dimension } from './interfaces.js';\n\nexport interface TextDimensionCalculator {\n getMaxDimension(texts: string[], fontSize: number): Dimension;\n}\n\nexport class TextDimensionCalculatorWithFont implements TextDimensionCalculator {\n constructor(private parentGroup: SVGGroup) {}\n getMaxDimension(texts: string[], fontSize: number): Dimension {\n if (!this.parentGroup) {\n return {\n width: texts.reduce((acc, cur) => Math.max(cur.length, acc), 0) * fontSize,\n height: fontSize,\n };\n }\n\n const dimension: Dimension = {\n width: 0,\n height: 0,\n };\n\n const elem = this.parentGroup\n .append('g')\n .attr('visibility', 'hidden')\n .attr('font-size', fontSize);\n\n for (const t of texts) {\n const bbox = computeDimensionOfText(elem, 1, t);\n const width = bbox ? bbox.width : t.length * fontSize;\n const height = bbox ? bbox.height : fontSize;\n dimension.width = Math.max(dimension.width, width);\n dimension.height = Math.max(dimension.height, height);\n }\n elem.remove();\n return dimension;\n }\n}\n", "import type {\n BoundingRect,\n Dimension,\n DrawableElem,\n Point,\n XYChartAxisConfig,\n XYChartAxisThemeConfig,\n} from '../../interfaces.js';\nimport type { TextDimensionCalculator } from '../../textDimensionCalculator.js';\nimport type { Axis, AxisPosition } from './index.js';\n\nconst BAR_WIDTH_TO_TICK_WIDTH_RATIO = 0.7;\nconst MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL = 0.2;\n\nexport abstract class BaseAxis implements Axis {\n protected boundingRect: BoundingRect = { x: 0, y: 0, width: 0, height: 0 };\n protected axisPosition: AxisPosition = 'left';\n private range: [number, number];\n protected showTitle = false;\n protected showLabel = false;\n protected showTick = false;\n protected showAxisLine = false;\n protected outerPadding = 0;\n protected titleTextHeight = 0;\n protected labelTextHeight = 0;\n\n constructor(\n protected axisConfig: XYChartAxisConfig,\n protected title: string,\n protected textDimensionCalculator: TextDimensionCalculator,\n protected axisThemeConfig: XYChartAxisThemeConfig\n ) {\n this.range = [0, 10];\n this.boundingRect = { x: 0, y: 0, width: 0, height: 0 };\n this.axisPosition = 'left';\n }\n\n setRange(range: [number, number]): void {\n this.range = range;\n if (this.axisPosition === 'left' || this.axisPosition === 'right') {\n this.boundingRect.height = range[1] - range[0];\n } else {\n this.boundingRect.width = range[1] - range[0];\n }\n this.recalculateScale();\n }\n\n getRange(): [number, number] {\n return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];\n }\n\n setAxisPosition(axisPosition: AxisPosition): void {\n this.axisPosition = axisPosition;\n this.setRange(this.range);\n }\n\n abstract getScaleValue(value: number | string): number;\n\n abstract recalculateScale(): void;\n\n abstract getTickValues(): (string | number)[];\n\n getTickDistance(): number {\n const range = this.getRange();\n return Math.abs(range[0] - range[1]) / this.getTickValues().length;\n }\n\n getAxisOuterPadding(): number {\n return this.outerPadding;\n }\n\n private getLabelDimension(): Dimension {\n return this.textDimensionCalculator.getMaxDimension(\n this.getTickValues().map((tick) => tick.toString()),\n this.axisConfig.labelFontSize\n );\n }\n\n recalculateOuterPaddingToDrawBar(): void {\n if (BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance() > this.outerPadding * 2) {\n this.outerPadding = Math.floor((BAR_WIDTH_TO_TICK_WIDTH_RATIO * this.getTickDistance()) / 2);\n }\n this.recalculateScale();\n }\n\n private calculateSpaceIfDrawnHorizontally(availableSpace: Dimension) {\n let availableHeight = availableSpace.height;\n if (this.axisConfig.showAxisLine && availableHeight > this.axisConfig.axisLineWidth) {\n availableHeight -= this.axisConfig.axisLineWidth;\n this.showAxisLine = true;\n }\n if (this.axisConfig.showLabel) {\n const spaceRequired = this.getLabelDimension();\n const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.width;\n this.outerPadding = Math.min(spaceRequired.width / 2, maxPadding);\n\n const heightRequired = spaceRequired.height + this.axisConfig.labelPadding * 2;\n this.labelTextHeight = spaceRequired.height;\n if (heightRequired <= availableHeight) {\n availableHeight -= heightRequired;\n this.showLabel = true;\n }\n }\n if (this.axisConfig.showTick && availableHeight >= this.axisConfig.tickLength) {\n this.showTick = true;\n availableHeight -= this.axisConfig.tickLength;\n }\n if (this.axisConfig.showTitle && this.title) {\n const spaceRequired = this.textDimensionCalculator.getMaxDimension(\n [this.title],\n this.axisConfig.titleFontSize\n );\n const heightRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;\n this.titleTextHeight = spaceRequired.height;\n if (heightRequired <= availableHeight) {\n availableHeight -= heightRequired;\n this.showTitle = true;\n }\n }\n this.boundingRect.width = availableSpace.width;\n this.boundingRect.height = availableSpace.height - availableHeight;\n }\n\n private calculateSpaceIfDrawnVertical(availableSpace: Dimension) {\n let availableWidth = availableSpace.width;\n if (this.axisConfig.showAxisLine && availableWidth > this.axisConfig.axisLineWidth) {\n availableWidth -= this.axisConfig.axisLineWidth;\n this.showAxisLine = true;\n }\n if (this.axisConfig.showLabel) {\n const spaceRequired = this.getLabelDimension();\n const maxPadding = MAX_OUTER_PADDING_PERCENT_FOR_WRT_LABEL * availableSpace.height;\n this.outerPadding = Math.min(spaceRequired.height / 2, maxPadding);\n const widthRequired = spaceRequired.width + this.axisConfig.labelPadding * 2;\n if (widthRequired <= availableWidth) {\n availableWidth -= widthRequired;\n this.showLabel = true;\n }\n }\n if (this.axisConfig.showTick && availableWidth >= this.axisConfig.tickLength) {\n this.showTick = true;\n availableWidth -= this.axisConfig.tickLength;\n }\n if (this.axisConfig.showTitle && this.title) {\n const spaceRequired = this.textDimensionCalculator.getMaxDimension(\n [this.title],\n this.axisConfig.titleFontSize\n );\n const widthRequired = spaceRequired.height + this.axisConfig.titlePadding * 2;\n this.titleTextHeight = spaceRequired.height;\n if (widthRequired <= availableWidth) {\n availableWidth -= widthRequired;\n this.showTitle = true;\n }\n }\n this.boundingRect.width = availableSpace.width - availableWidth;\n this.boundingRect.height = availableSpace.height;\n }\n\n calculateSpace(availableSpace: Dimension): Dimension {\n if (this.axisPosition === 'left' || this.axisPosition === 'right') {\n this.calculateSpaceIfDrawnVertical(availableSpace);\n } else {\n this.calculateSpaceIfDrawnHorizontally(availableSpace);\n }\n this.recalculateScale();\n return {\n width: this.boundingRect.width,\n height: this.boundingRect.height,\n };\n }\n\n setBoundingBoxXY(point: Point): void {\n this.boundingRect.x = point.x;\n this.boundingRect.y = point.y;\n }\n\n private getDrawableElementsForLeftAxis(): DrawableElem[] {\n const drawableElement: DrawableElem[] = [];\n if (this.showAxisLine) {\n const x = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;\n drawableElement.push({\n type: 'path',\n groupTexts: ['left-axis', 'axisl-line'],\n data: [\n {\n path: `M ${x},${this.boundingRect.y} L ${x},${\n this.boundingRect.y + this.boundingRect.height\n } `,\n strokeFill: this.axisThemeConfig.axisLineColor,\n strokeWidth: this.axisConfig.axisLineWidth,\n },\n ],\n });\n }\n if (this.showLabel) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['left-axis', 'label'],\n data: this.getTickValues().map((tick) => ({\n text: tick.toString(),\n x:\n this.boundingRect.x +\n this.boundingRect.width -\n (this.showLabel ? this.axisConfig.labelPadding : 0) -\n (this.showTick ? this.axisConfig.tickLength : 0) -\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),\n y: this.getScaleValue(tick),\n fill: this.axisThemeConfig.labelColor,\n fontSize: this.axisConfig.labelFontSize,\n rotation: 0,\n verticalPos: 'middle',\n horizontalPos: 'right',\n })),\n });\n }\n if (this.showTick) {\n const x =\n this.boundingRect.x +\n this.boundingRect.width -\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);\n drawableElement.push({\n type: 'path',\n groupTexts: ['left-axis', 'ticks'],\n data: this.getTickValues().map((tick) => ({\n path: `M ${x},${this.getScaleValue(tick)} L ${\n x - this.axisConfig.tickLength\n },${this.getScaleValue(tick)}`,\n strokeFill: this.axisThemeConfig.tickColor,\n strokeWidth: this.axisConfig.tickWidth,\n })),\n });\n }\n if (this.showTitle) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['left-axis', 'title'],\n data: [\n {\n text: this.title,\n x: this.boundingRect.x + this.axisConfig.titlePadding,\n y: this.boundingRect.y + this.boundingRect.height / 2,\n fill: this.axisThemeConfig.titleColor,\n fontSize: this.axisConfig.titleFontSize,\n rotation: 270,\n verticalPos: 'top',\n horizontalPos: 'center',\n },\n ],\n });\n }\n return drawableElement;\n }\n private getDrawableElementsForBottomAxis(): DrawableElem[] {\n const drawableElement: DrawableElem[] = [];\n if (this.showAxisLine) {\n const y = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;\n drawableElement.push({\n type: 'path',\n groupTexts: ['bottom-axis', 'axis-line'],\n data: [\n {\n path: `M ${this.boundingRect.x},${y} L ${\n this.boundingRect.x + this.boundingRect.width\n },${y}`,\n strokeFill: this.axisThemeConfig.axisLineColor,\n strokeWidth: this.axisConfig.axisLineWidth,\n },\n ],\n });\n }\n if (this.showLabel) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['bottom-axis', 'label'],\n data: this.getTickValues().map((tick) => ({\n text: tick.toString(),\n x: this.getScaleValue(tick),\n y:\n this.boundingRect.y +\n this.axisConfig.labelPadding +\n (this.showTick ? this.axisConfig.tickLength : 0) +\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0),\n fill: this.axisThemeConfig.labelColor,\n fontSize: this.axisConfig.labelFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n })),\n });\n }\n if (this.showTick) {\n const y = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);\n drawableElement.push({\n type: 'path',\n groupTexts: ['bottom-axis', 'ticks'],\n data: this.getTickValues().map((tick) => ({\n path: `M ${this.getScaleValue(tick)},${y} L ${this.getScaleValue(tick)},${\n y + this.axisConfig.tickLength\n }`,\n strokeFill: this.axisThemeConfig.tickColor,\n strokeWidth: this.axisConfig.tickWidth,\n })),\n });\n }\n if (this.showTitle) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['bottom-axis', 'title'],\n data: [\n {\n text: this.title,\n x: this.range[0] + (this.range[1] - this.range[0]) / 2,\n y:\n this.boundingRect.y +\n this.boundingRect.height -\n this.axisConfig.titlePadding -\n this.titleTextHeight,\n fill: this.axisThemeConfig.titleColor,\n fontSize: this.axisConfig.titleFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n },\n ],\n });\n }\n return drawableElement;\n }\n private getDrawableElementsForTopAxis(): DrawableElem[] {\n const drawableElement: DrawableElem[] = [];\n if (this.showAxisLine) {\n const y = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;\n drawableElement.push({\n type: 'path',\n groupTexts: ['top-axis', 'axis-line'],\n data: [\n {\n path: `M ${this.boundingRect.x},${y} L ${\n this.boundingRect.x + this.boundingRect.width\n },${y}`,\n strokeFill: this.axisThemeConfig.axisLineColor,\n strokeWidth: this.axisConfig.axisLineWidth,\n },\n ],\n });\n }\n if (this.showLabel) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['top-axis', 'label'],\n data: this.getTickValues().map((tick) => ({\n text: tick.toString(),\n x: this.getScaleValue(tick),\n y:\n this.boundingRect.y +\n (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) +\n this.axisConfig.labelPadding,\n fill: this.axisThemeConfig.labelColor,\n fontSize: this.axisConfig.labelFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n })),\n });\n }\n if (this.showTick) {\n const y = this.boundingRect.y;\n drawableElement.push({\n type: 'path',\n groupTexts: ['top-axis', 'ticks'],\n data: this.getTickValues().map((tick) => ({\n path: `M ${this.getScaleValue(tick)},${\n y + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)\n } L ${this.getScaleValue(tick)},${\n y +\n this.boundingRect.height -\n this.axisConfig.tickLength -\n (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)\n }`,\n strokeFill: this.axisThemeConfig.tickColor,\n strokeWidth: this.axisConfig.tickWidth,\n })),\n });\n }\n if (this.showTitle) {\n drawableElement.push({\n type: 'text',\n groupTexts: ['top-axis', 'title'],\n data: [\n {\n text: this.title,\n x: this.boundingRect.x + this.boundingRect.width / 2,\n y: this.boundingRect.y + this.axisConfig.titlePadding,\n fill: this.axisThemeConfig.titleColor,\n fontSize: this.axisConfig.titleFontSize,\n rotation: 0,\n verticalPos: 'top',\n horizontalPos: 'center',\n },\n ],\n });\n }\n return drawableElement;\n }\n\n getDrawableElements(): DrawableElem[] {\n if (this.axisPosition === 'left') {\n return this.getDrawableElementsForLeftAxis();\n }\n if (this.axisPosition === 'right') {\n throw Error('Drawing of right axis is not implemented');\n }\n if (this.axisPosition === 'bottom') {\n return this.getDrawableElementsForBottomAxis();\n }\n if (this.axisPosition === 'top') {\n return this.getDrawableElementsForTopAxis();\n }\n return [];\n }\n}\n", "import type { ScaleBand } from 'd3';\nimport { scaleBand } from 'd3';\nimport { log } from '../../../../../logger.js';\nimport type { TextDimensionCalculator } from '../../textDimensionCalculator.js';\nimport { BaseAxis } from './baseAxis.js';\nimport type { XYChartAxisThemeConfig, XYChartAxisConfig } from '../../interfaces.js';\n\nexport class BandAxis extends BaseAxis {\n private scale: ScaleBand;\n private categories: string[];\n\n constructor(\n axisConfig: XYChartAxisConfig,\n axisThemeConfig: XYChartAxisThemeConfig,\n categories: string[],\n title: string,\n textDimensionCalculator: TextDimensionCalculator\n ) {\n super(axisConfig, title, textDimensionCalculator, axisThemeConfig);\n this.categories = categories;\n this.scale = scaleBand().domain(this.categories).range(this.getRange());\n }\n\n setRange(range: [number, number]): void {\n super.setRange(range);\n }\n\n recalculateScale(): void {\n this.scale = scaleBand()\n .domain(this.categories)\n .range(this.getRange())\n .paddingInner(1)\n .paddingOuter(0)\n .align(0.5);\n log.trace('BandAxis axis final categories, range: ', this.categories, this.getRange());\n }\n\n getTickValues(): (string | number)[] {\n return this.categories;\n }\n\n getScaleValue(value: string): number {\n return this.scale(value) ?? this.getRange()[0];\n }\n}\n", "import type { ScaleLinear } from 'd3';\nimport { scaleLinear } from 'd3';\nimport type { TextDimensionCalculator } from '../../textDimensionCalculator.js';\nimport { BaseAxis } from './baseAxis.js';\nimport type { XYChartAxisThemeConfig, XYChartAxisConfig } from '../../interfaces.js';\n\nexport class LinearAxis extends BaseAxis {\n private scale: ScaleLinear;\n private domain: [number, number];\n\n constructor(\n axisConfig: XYChartAxisConfig,\n axisThemeConfig: XYChartAxisThemeConfig,\n domain: [number, number],\n title: string,\n textDimensionCalculator: TextDimensionCalculator\n ) {\n super(axisConfig, title, textDimensionCalculator, axisThemeConfig);\n this.domain = domain;\n this.scale = scaleLinear().domain(this.domain).range(this.getRange());\n }\n\n getTickValues(): (string | number)[] {\n return this.scale.ticks();\n }\n\n recalculateScale(): void {\n const domain = [...this.domain]; // copy the array so if reverse is called two times it should not cancel the reverse effect\n if (this.axisPosition === 'left') {\n domain.reverse(); // since y-axis in svg start from top\n }\n this.scale = scaleLinear().domain(domain).range(this.getRange());\n }\n\n getScaleValue(value: number): number {\n return this.scale(value);\n }\n}\n", "import type { SVGGroup } from '../../../../../diagram-api/types.js';\nimport type {\n AxisDataType,\n ChartComponent,\n XYChartAxisConfig,\n XYChartAxisThemeConfig,\n} from '../../interfaces.js';\nimport { isBandAxisData } from '../../interfaces.js';\nimport { TextDimensionCalculatorWithFont } from '../../textDimensionCalculator.js';\nimport { BandAxis } from './bandAxis.js';\nimport { LinearAxis } from './linearAxis.js';\n\nexport type AxisPosition = 'left' | 'right' | 'top' | 'bottom';\n\nexport interface Axis extends ChartComponent {\n getScaleValue(value: string | number): number;\n setAxisPosition(axisPosition: AxisPosition): void;\n getAxisOuterPadding(): number;\n getTickDistance(): number;\n recalculateOuterPaddingToDrawBar(): void;\n setRange(range: [number, number]): void;\n}\n\nexport function getAxis(\n data: AxisDataType,\n axisConfig: XYChartAxisConfig,\n axisThemeConfig: XYChartAxisThemeConfig,\n tmpSVGGroup: SVGGroup\n): Axis {\n const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup);\n if (isBandAxisData(data)) {\n return new BandAxis(\n axisConfig,\n axisThemeConfig,\n data.categories,\n data.title,\n textDimensionCalculator\n );\n }\n return new LinearAxis(\n axisConfig,\n axisThemeConfig,\n [data.min, data.max],\n data.title,\n textDimensionCalculator\n );\n}\n", "import type { SVGGroup } from '../../../../diagram-api/types.js';\nimport type {\n BoundingRect,\n ChartComponent,\n Dimension,\n DrawableElem,\n Point,\n XYChartConfig,\n XYChartData,\n XYChartThemeConfig,\n} from '../interfaces.js';\nimport type { TextDimensionCalculator } from '../textDimensionCalculator.js';\nimport { TextDimensionCalculatorWithFont } from '../textDimensionCalculator.js';\n\nexport class ChartTitle implements ChartComponent {\n private boundingRect: BoundingRect;\n private showChartTitle: boolean;\n constructor(\n private textDimensionCalculator: TextDimensionCalculator,\n private chartConfig: XYChartConfig,\n private chartData: XYChartData,\n private chartThemeConfig: XYChartThemeConfig\n ) {\n this.boundingRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n this.showChartTitle = false;\n }\n setBoundingBoxXY(point: Point): void {\n this.boundingRect.x = point.x;\n this.boundingRect.y = point.y;\n }\n calculateSpace(availableSpace: Dimension): Dimension {\n const titleDimension = this.textDimensionCalculator.getMaxDimension(\n [this.chartData.title],\n this.chartConfig.titleFontSize\n );\n const widthRequired = Math.max(titleDimension.width, availableSpace.width);\n const heightRequired = titleDimension.height + 2 * this.chartConfig.titlePadding;\n if (\n titleDimension.width <= widthRequired &&\n titleDimension.height <= heightRequired &&\n this.chartConfig.showTitle &&\n this.chartData.title\n ) {\n this.boundingRect.width = widthRequired;\n this.boundingRect.height = heightRequired;\n this.showChartTitle = true;\n }\n\n return {\n width: this.boundingRect.width,\n height: this.boundingRect.height,\n };\n }\n getDrawableElements(): DrawableElem[] {\n const drawableElem: DrawableElem[] = [];\n if (this.showChartTitle) {\n drawableElem.push({\n groupTexts: ['chart-title'],\n type: 'text',\n data: [\n {\n fontSize: this.chartConfig.titleFontSize,\n text: this.chartData.title,\n verticalPos: 'middle',\n horizontalPos: 'center',\n x: this.boundingRect.x + this.boundingRect.width / 2,\n y: this.boundingRect.y + this.boundingRect.height / 2,\n fill: this.chartThemeConfig.titleColor,\n rotation: 0,\n },\n ],\n });\n }\n return drawableElem;\n }\n}\n\nexport function getChartTitleComponent(\n chartConfig: XYChartConfig,\n chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig,\n tmpSVGGroup: SVGGroup\n): ChartComponent {\n const textDimensionCalculator = new TextDimensionCalculatorWithFont(tmpSVGGroup);\n return new ChartTitle(textDimensionCalculator, chartConfig, chartData, chartThemeConfig);\n}\n", "import { line } from 'd3';\nimport type { DrawableElem, LinePlotData, XYChartConfig } from '../../interfaces.js';\nimport type { Axis } from '../axis/index.js';\n\nexport class LinePlot {\n constructor(\n private plotData: LinePlotData,\n private xAxis: Axis,\n private yAxis: Axis,\n private orientation: XYChartConfig['chartOrientation'],\n private plotIndex: number\n ) {}\n\n getDrawableElement(): DrawableElem[] {\n const finalData: [number, number][] = this.plotData.data.map((d) => [\n this.xAxis.getScaleValue(d[0]),\n this.yAxis.getScaleValue(d[1]),\n ]);\n\n let path: string | null;\n if (this.orientation === 'horizontal') {\n path = line()\n .y((d) => d[0])\n .x((d) => d[1])(finalData);\n } else {\n path = line()\n .x((d) => d[0])\n .y((d) => d[1])(finalData);\n }\n if (!path) {\n return [];\n }\n return [\n {\n groupTexts: ['plot', `line-plot-${this.plotIndex}`],\n type: 'path',\n data: [\n {\n path,\n strokeFill: this.plotData.strokeFill,\n strokeWidth: this.plotData.strokeWidth,\n },\n ],\n },\n ];\n }\n}\n", "import type { BarPlotData, BoundingRect, DrawableElem, XYChartConfig } from '../../interfaces.js';\nimport type { Axis } from '../axis/index.js';\n\nexport class BarPlot {\n constructor(\n private barData: BarPlotData,\n private boundingRect: BoundingRect,\n private xAxis: Axis,\n private yAxis: Axis,\n private orientation: XYChartConfig['chartOrientation'],\n private plotIndex: number\n ) {}\n\n getDrawableElement(): DrawableElem[] {\n const finalData: [number, number][] = this.barData.data.map((d) => [\n this.xAxis.getScaleValue(d[0]),\n this.yAxis.getScaleValue(d[1]),\n ]);\n\n const barPaddingPercent = 0.05;\n\n const barWidth =\n Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) *\n (1 - barPaddingPercent);\n const barWidthHalf = barWidth / 2;\n\n if (this.orientation === 'horizontal') {\n return [\n {\n groupTexts: ['plot', `bar-plot-${this.plotIndex}`],\n type: 'rect',\n data: finalData.map((data) => ({\n x: this.boundingRect.x,\n y: data[0] - barWidthHalf,\n height: barWidth,\n width: data[1] - this.boundingRect.x,\n fill: this.barData.fill,\n strokeWidth: 0,\n strokeFill: this.barData.fill,\n })),\n },\n ];\n }\n return [\n {\n groupTexts: ['plot', `bar-plot-${this.plotIndex}`],\n type: 'rect',\n data: finalData.map((data) => ({\n x: data[0] - barWidthHalf,\n y: data[1],\n width: barWidth,\n height: this.boundingRect.y + this.boundingRect.height - data[1],\n fill: this.barData.fill,\n strokeWidth: 0,\n strokeFill: this.barData.fill,\n })),\n },\n ];\n }\n}\n", "import type {\n XYChartData,\n Dimension,\n BoundingRect,\n DrawableElem,\n Point,\n XYChartThemeConfig,\n XYChartConfig,\n} from '../../interfaces.js';\nimport type { Axis } from '../axis/index.js';\nimport type { ChartComponent } from '../../interfaces.js';\nimport { LinePlot } from './linePlot.js';\nimport { BarPlot } from './barPlot.js';\n\nexport interface Plot extends ChartComponent {\n setAxes(xAxis: Axis, yAxis: Axis): void;\n}\n\nexport class BasePlot implements Plot {\n private boundingRect: BoundingRect;\n private xAxis?: Axis;\n private yAxis?: Axis;\n\n constructor(\n private chartConfig: XYChartConfig,\n private chartData: XYChartData,\n private chartThemeConfig: XYChartThemeConfig\n ) {\n this.boundingRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n setAxes(xAxis: Axis, yAxis: Axis) {\n this.xAxis = xAxis;\n this.yAxis = yAxis;\n }\n setBoundingBoxXY(point: Point): void {\n this.boundingRect.x = point.x;\n this.boundingRect.y = point.y;\n }\n calculateSpace(availableSpace: Dimension): Dimension {\n this.boundingRect.width = availableSpace.width;\n this.boundingRect.height = availableSpace.height;\n\n return {\n width: this.boundingRect.width,\n height: this.boundingRect.height,\n };\n }\n getDrawableElements(): DrawableElem[] {\n if (!(this.xAxis && this.yAxis)) {\n throw Error('Axes must be passed to render Plots');\n }\n const drawableElem: DrawableElem[] = [];\n for (const [i, plot] of this.chartData.plots.entries()) {\n switch (plot.type) {\n case 'line':\n {\n const linePlot = new LinePlot(\n plot,\n this.xAxis,\n this.yAxis,\n this.chartConfig.chartOrientation,\n i\n );\n drawableElem.push(...linePlot.getDrawableElement());\n }\n break;\n case 'bar':\n {\n const barPlot = new BarPlot(\n plot,\n this.boundingRect,\n this.xAxis,\n this.yAxis,\n this.chartConfig.chartOrientation,\n i\n );\n drawableElem.push(...barPlot.getDrawableElement());\n }\n break;\n }\n }\n return drawableElem;\n }\n}\n\nexport function getPlotComponent(\n chartConfig: XYChartConfig,\n chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig\n): Plot {\n return new BasePlot(chartConfig, chartData, chartThemeConfig);\n}\n", "import type { SVGGroup } from '../../../diagram-api/types.js';\nimport type { Axis } from './components/axis/index.js';\nimport { getAxis } from './components/axis/index.js';\nimport { getChartTitleComponent } from './components/chartTitle.js';\nimport type { Plot } from './components/plot/index.js';\nimport { getPlotComponent } from './components/plot/index.js';\nimport type {\n ChartComponent,\n DrawableElem,\n XYChartConfig,\n XYChartData,\n XYChartThemeConfig,\n} from './interfaces.js';\nimport { isBarPlot } from './interfaces.js';\n\nexport class Orchestrator {\n private componentStore: {\n title: ChartComponent;\n plot: Plot;\n xAxis: Axis;\n yAxis: Axis;\n };\n constructor(\n private chartConfig: XYChartConfig,\n private chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig,\n tmpSVGGroup: SVGGroup\n ) {\n this.componentStore = {\n title: getChartTitleComponent(chartConfig, chartData, chartThemeConfig, tmpSVGGroup),\n plot: getPlotComponent(chartConfig, chartData, chartThemeConfig),\n xAxis: getAxis(\n chartData.xAxis,\n chartConfig.xAxis,\n {\n titleColor: chartThemeConfig.xAxisTitleColor,\n labelColor: chartThemeConfig.xAxisLabelColor,\n tickColor: chartThemeConfig.xAxisTickColor,\n axisLineColor: chartThemeConfig.xAxisLineColor,\n },\n tmpSVGGroup\n ),\n yAxis: getAxis(\n chartData.yAxis,\n chartConfig.yAxis,\n {\n titleColor: chartThemeConfig.yAxisTitleColor,\n labelColor: chartThemeConfig.yAxisLabelColor,\n tickColor: chartThemeConfig.yAxisTickColor,\n axisLineColor: chartThemeConfig.yAxisLineColor,\n },\n tmpSVGGroup\n ),\n };\n }\n\n private calculateVerticalSpace() {\n let availableWidth = this.chartConfig.width;\n let availableHeight = this.chartConfig.height;\n let plotX = 0;\n let plotY = 0;\n let chartWidth = Math.floor((availableWidth * this.chartConfig.plotReservedSpacePercent) / 100);\n let chartHeight = Math.floor(\n (availableHeight * this.chartConfig.plotReservedSpacePercent) / 100\n );\n let spaceUsed = this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n availableWidth -= spaceUsed.width;\n availableHeight -= spaceUsed.height;\n\n spaceUsed = this.componentStore.title.calculateSpace({\n width: this.chartConfig.width,\n height: availableHeight,\n });\n plotY = spaceUsed.height;\n availableHeight -= spaceUsed.height;\n this.componentStore.xAxis.setAxisPosition('bottom');\n spaceUsed = this.componentStore.xAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n availableHeight -= spaceUsed.height;\n this.componentStore.yAxis.setAxisPosition('left');\n spaceUsed = this.componentStore.yAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n plotX = spaceUsed.width;\n availableWidth -= spaceUsed.width;\n if (availableWidth > 0) {\n chartWidth += availableWidth;\n availableWidth = 0;\n }\n if (availableHeight > 0) {\n chartHeight += availableHeight;\n availableHeight = 0;\n }\n this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n\n this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });\n this.componentStore.xAxis.setRange([plotX, plotX + chartWidth]);\n this.componentStore.xAxis.setBoundingBoxXY({ x: plotX, y: plotY + chartHeight });\n this.componentStore.yAxis.setRange([plotY, plotY + chartHeight]);\n this.componentStore.yAxis.setBoundingBoxXY({ x: 0, y: plotY });\n if (this.chartData.plots.some((p) => isBarPlot(p))) {\n this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();\n }\n }\n\n private calculateHorizontalSpace() {\n let availableWidth = this.chartConfig.width;\n let availableHeight = this.chartConfig.height;\n let titleYEnd = 0;\n let plotX = 0;\n let plotY = 0;\n let chartWidth = Math.floor((availableWidth * this.chartConfig.plotReservedSpacePercent) / 100);\n let chartHeight = Math.floor(\n (availableHeight * this.chartConfig.plotReservedSpacePercent) / 100\n );\n let spaceUsed = this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n availableWidth -= spaceUsed.width;\n availableHeight -= spaceUsed.height;\n\n spaceUsed = this.componentStore.title.calculateSpace({\n width: this.chartConfig.width,\n height: availableHeight,\n });\n titleYEnd = spaceUsed.height;\n availableHeight -= spaceUsed.height;\n this.componentStore.xAxis.setAxisPosition('left');\n spaceUsed = this.componentStore.xAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n availableWidth -= spaceUsed.width;\n plotX = spaceUsed.width;\n this.componentStore.yAxis.setAxisPosition('top');\n spaceUsed = this.componentStore.yAxis.calculateSpace({\n width: availableWidth,\n height: availableHeight,\n });\n availableHeight -= spaceUsed.height;\n plotY = titleYEnd + spaceUsed.height;\n if (availableWidth > 0) {\n chartWidth += availableWidth;\n availableWidth = 0;\n }\n if (availableHeight > 0) {\n chartHeight += availableHeight;\n availableHeight = 0;\n }\n this.componentStore.plot.calculateSpace({\n width: chartWidth,\n height: chartHeight,\n });\n\n this.componentStore.plot.setBoundingBoxXY({ x: plotX, y: plotY });\n this.componentStore.yAxis.setRange([plotX, plotX + chartWidth]);\n this.componentStore.yAxis.setBoundingBoxXY({ x: plotX, y: titleYEnd });\n this.componentStore.xAxis.setRange([plotY, plotY + chartHeight]);\n this.componentStore.xAxis.setBoundingBoxXY({ x: 0, y: plotY });\n if (this.chartData.plots.some((p) => isBarPlot(p))) {\n this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();\n }\n }\n\n private calculateSpace() {\n if (this.chartConfig.chartOrientation === 'horizontal') {\n this.calculateHorizontalSpace();\n } else {\n this.calculateVerticalSpace();\n }\n }\n\n getDrawableElement() {\n this.calculateSpace();\n const drawableElem: DrawableElem[] = [];\n this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);\n for (const component of Object.values(this.componentStore)) {\n drawableElem.push(...component.getDrawableElements());\n }\n return drawableElem;\n }\n}\n", "import type { SVGGroup } from '../../../diagram-api/types.js';\nimport type { DrawableElem, XYChartConfig, XYChartData, XYChartThemeConfig } from './interfaces.js';\nimport { Orchestrator } from './orchestrator.js';\n\nexport class XYChartBuilder {\n static build(\n config: XYChartConfig,\n chartData: XYChartData,\n chartThemeConfig: XYChartThemeConfig,\n tmpSVGGroup: SVGGroup\n ): DrawableElem[] {\n const orchestrator = new Orchestrator(config, chartData, chartThemeConfig, tmpSVGGroup);\n return orchestrator.getDrawableElement();\n }\n}\n", "import * as configApi from '../../config.js';\nimport defaultConfig from '../../defaultConfig.js';\nimport type { SVGGroup } from '../../diagram-api/types.js';\nimport { getThemeVariables } from '../../themes/theme-default.js';\nimport { cleanAndMerge } from '../../utils.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport { XYChartBuilder } from './chartBuilder/index.js';\nimport type {\n DrawableElem,\n SimplePlotDataType,\n XYChartConfig,\n XYChartData,\n XYChartThemeConfig,\n} from './chartBuilder/interfaces.js';\nimport { isBandAxisData, isLinearAxisData } from './chartBuilder/interfaces.js';\n\nlet plotIndex = 0;\n\nlet tmpSVGGroup: SVGGroup;\n\nlet xyChartConfig: XYChartConfig = getChartDefaultConfig();\nlet xyChartThemeConfig: XYChartThemeConfig = getChartDefaultThemeConfig();\nlet xyChartData: XYChartData = getChartDefaultData();\nlet plotColorPalette = xyChartThemeConfig.plotColorPalette.split(',').map((color) => color.trim());\nlet hasSetXAxis = false;\nlet hasSetYAxis = false;\n\ninterface NormalTextType {\n type: 'text';\n text: string;\n}\n\nfunction getChartDefaultThemeConfig(): XYChartThemeConfig {\n const defaultThemeVariables = getThemeVariables();\n const config = configApi.getConfig();\n return cleanAndMerge(defaultThemeVariables.xyChart, config.themeVariables.xyChart);\n}\nfunction getChartDefaultConfig(): XYChartConfig {\n const config = configApi.getConfig();\n return cleanAndMerge(\n defaultConfig.xyChart as XYChartConfig,\n config.xyChart as XYChartConfig\n );\n}\n\nfunction getChartDefaultData(): XYChartData {\n return {\n yAxis: {\n type: 'linear',\n title: '',\n min: Infinity,\n max: -Infinity,\n },\n xAxis: {\n type: 'band',\n title: '',\n categories: [],\n },\n title: '',\n plots: [],\n };\n}\n\nfunction textSanitizer(text: string) {\n const config = configApi.getConfig();\n return sanitizeText(text.trim(), config);\n}\n\nfunction setTmpSVGG(SVGG: SVGGroup) {\n tmpSVGGroup = SVGG;\n}\nfunction setOrientation(orientation: string) {\n if (orientation === 'horizontal') {\n xyChartConfig.chartOrientation = 'horizontal';\n } else {\n xyChartConfig.chartOrientation = 'vertical';\n }\n}\nfunction setXAxisTitle(title: NormalTextType) {\n xyChartData.xAxis.title = textSanitizer(title.text);\n}\nfunction setXAxisRangeData(min: number, max: number) {\n xyChartData.xAxis = { type: 'linear', title: xyChartData.xAxis.title, min, max };\n hasSetXAxis = true;\n}\nfunction setXAxisBand(categories: NormalTextType[]) {\n xyChartData.xAxis = {\n type: 'band',\n title: xyChartData.xAxis.title,\n categories: categories.map((c) => textSanitizer(c.text)),\n };\n hasSetXAxis = true;\n}\nfunction setYAxisTitle(title: NormalTextType) {\n xyChartData.yAxis.title = textSanitizer(title.text);\n}\nfunction setYAxisRangeData(min: number, max: number) {\n xyChartData.yAxis = { type: 'linear', title: xyChartData.yAxis.title, min, max };\n hasSetYAxis = true;\n}\n\n// this function does not set `hasSetYAxis` as there can be multiple data so we should calculate the range accordingly\nfunction setYAxisRangeFromPlotData(data: number[]) {\n const minValue = Math.min(...data);\n const maxValue = Math.max(...data);\n const prevMinValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.min : Infinity;\n const prevMaxValue = isLinearAxisData(xyChartData.yAxis) ? xyChartData.yAxis.max : -Infinity;\n xyChartData.yAxis = {\n type: 'linear',\n title: xyChartData.yAxis.title,\n min: Math.min(prevMinValue, minValue),\n max: Math.max(prevMaxValue, maxValue),\n };\n}\n\nfunction transformDataWithoutCategory(data: number[]): SimplePlotDataType {\n let retData: SimplePlotDataType = [];\n if (data.length === 0) {\n return retData;\n }\n if (!hasSetXAxis) {\n const prevMinValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.min : Infinity;\n const prevMaxValue = isLinearAxisData(xyChartData.xAxis) ? xyChartData.xAxis.max : -Infinity;\n setXAxisRangeData(Math.min(prevMinValue, 1), Math.max(prevMaxValue, data.length));\n }\n if (!hasSetYAxis) {\n setYAxisRangeFromPlotData(data);\n }\n\n if (isBandAxisData(xyChartData.xAxis)) {\n retData = xyChartData.xAxis.categories.map((c, i) => [c, data[i]]);\n }\n\n if (isLinearAxisData(xyChartData.xAxis)) {\n const min = xyChartData.xAxis.min;\n const max = xyChartData.xAxis.max;\n const step = (max - min) / (data.length - 1);\n const categories: string[] = [];\n for (let i = min; i <= max; i += step) {\n categories.push(`${i}`);\n }\n retData = categories.map((c, i) => [c, data[i]]);\n }\n\n return retData;\n}\n\nfunction getPlotColorFromPalette(plotIndex: number): string {\n return plotColorPalette[plotIndex === 0 ? 0 : plotIndex % plotColorPalette.length];\n}\n\nfunction setLineData(title: NormalTextType, data: number[]) {\n const plotData = transformDataWithoutCategory(data);\n xyChartData.plots.push({\n type: 'line',\n strokeFill: getPlotColorFromPalette(plotIndex),\n strokeWidth: 2,\n data: plotData,\n });\n plotIndex++;\n}\n\nfunction setBarData(title: NormalTextType, data: number[]) {\n const plotData = transformDataWithoutCategory(data);\n xyChartData.plots.push({\n type: 'bar',\n fill: getPlotColorFromPalette(plotIndex),\n data: plotData,\n });\n plotIndex++;\n}\n\nfunction getDrawableElem(): DrawableElem[] {\n if (xyChartData.plots.length === 0) {\n throw Error('No Plot to render, please provide a plot with some data');\n }\n xyChartData.title = getDiagramTitle();\n return XYChartBuilder.build(xyChartConfig, xyChartData, xyChartThemeConfig, tmpSVGGroup);\n}\n\nfunction getChartThemeConfig() {\n return xyChartThemeConfig;\n}\n\nfunction getChartConfig() {\n return xyChartConfig;\n}\n\nconst clear = function () {\n commonClear();\n plotIndex = 0;\n xyChartConfig = getChartDefaultConfig();\n xyChartData = getChartDefaultData();\n xyChartThemeConfig = getChartDefaultThemeConfig();\n plotColorPalette = xyChartThemeConfig.plotColorPalette.split(',').map((color) => color.trim());\n hasSetXAxis = false;\n hasSetYAxis = false;\n};\n\nexport default {\n getDrawableElem,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n setOrientation,\n setXAxisTitle,\n setXAxisRangeData,\n setXAxisBand,\n setYAxisTitle,\n setYAxisRangeData,\n setLineData,\n setBarData,\n setTmpSVGG,\n getChartThemeConfig,\n getChartConfig,\n};\n", "import type { Diagram } from '../../Diagram.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type {\n DrawableElem,\n TextElem,\n TextHorizontalPos,\n TextVerticalPos,\n} from './chartBuilder/interfaces.js';\nimport type XYChartDB from './xychartDb.js';\n\nexport const draw = (txt: string, id: string, _version: string, diagObj: Diagram) => {\n const db = diagObj.db as typeof XYChartDB;\n const themeConfig = db.getChartThemeConfig();\n const chartConfig = db.getChartConfig();\n function getDominantBaseLine(horizontalPos: TextVerticalPos) {\n return horizontalPos === 'top' ? 'text-before-edge' : 'middle';\n }\n\n function getTextAnchor(verticalPos: TextHorizontalPos) {\n return verticalPos === 'left' ? 'start' : verticalPos === 'right' ? 'end' : 'middle';\n }\n\n function getTextTransformation(data: TextElem) {\n return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;\n }\n\n log.debug('Rendering xychart chart\\n' + txt);\n\n const svg = selectSvgElement(id);\n const group = svg.append('g').attr('class', 'main');\n const background = group\n .append('rect')\n .attr('width', chartConfig.width)\n .attr('height', chartConfig.height)\n .attr('class', 'background');\n\n // @ts-ignore: TODO Fix ts errors\n configureSvgSize(svg, chartConfig.height, chartConfig.width, true);\n\n svg.attr('viewBox', `0 0 ${chartConfig.width} ${chartConfig.height}`);\n\n background.attr('fill', themeConfig.backgroundColor);\n\n db.setTmpSVGG(svg.append('g').attr('class', 'mermaid-tmp-group'));\n\n const shapes: DrawableElem[] = db.getDrawableElem();\n\n const groups: Record = {};\n\n function getGroup(gList: string[]) {\n let elem = group;\n let prefix = '';\n for (const [i] of gList.entries()) {\n let parent = group;\n if (i > 0 && groups[prefix]) {\n parent = groups[prefix];\n }\n prefix += gList[i];\n elem = groups[prefix];\n if (!elem) {\n elem = groups[prefix] = parent.append('g').attr('class', gList[i]);\n }\n }\n return elem;\n }\n\n for (const shape of shapes) {\n if (shape.data.length === 0) {\n continue;\n }\n\n const shapeGroup = getGroup(shape.groupTexts);\n\n switch (shape.type) {\n case 'rect':\n shapeGroup\n .selectAll('rect')\n .data(shape.data)\n .enter()\n .append('rect')\n .attr('x', (data) => data.x)\n .attr('y', (data) => data.y)\n .attr('width', (data) => data.width)\n .attr('height', (data) => data.height)\n .attr('fill', (data) => data.fill)\n .attr('stroke', (data) => data.strokeFill)\n .attr('stroke-width', (data) => data.strokeWidth);\n break;\n case 'text':\n shapeGroup\n .selectAll('text')\n .data(shape.data)\n .enter()\n .append('text')\n .attr('x', 0)\n .attr('y', 0)\n .attr('fill', (data) => data.fill)\n .attr('font-size', (data) => data.fontSize)\n .attr('dominant-baseline', (data) => getDominantBaseLine(data.verticalPos))\n .attr('text-anchor', (data) => getTextAnchor(data.horizontalPos))\n .attr('transform', (data) => getTextTransformation(data))\n .text((data) => data.text);\n break;\n case 'path':\n shapeGroup\n .selectAll('path')\n .data(shape.data)\n .enter()\n .append('path')\n .attr('d', (data) => data.path)\n .attr('fill', (data) => (data.fill ? data.fill : 'none'))\n .attr('stroke', (data) => data.strokeFill)\n .attr('stroke-width', (data) => data.strokeWidth);\n break;\n }\n }\n};\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: Jison doesn't support types.\nimport parser from './parser/xychart.jison';\nimport db from './xychartDb.js';\nimport renderer from './xychartRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],$V5=[1,18],$V6=[2,7],$V7=[1,22],$V8=[1,23],$V9=[1,24],$Va=[1,25],$Vb=[1,26],$Vc=[1,27],$Vd=[1,20],$Ve=[1,28],$Vf=[1,29],$Vg=[62,63],$Vh=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],$Vi=[1,47],$Vj=[1,48],$Vk=[1,49],$Vl=[1,50],$Vm=[1,51],$Vn=[1,52],$Vo=[1,53],$Vp=[53,54],$Vq=[1,64],$Vr=[1,60],$Vs=[1,61],$Vt=[1,62],$Vu=[1,63],$Vv=[1,65],$Vw=[1,69],$Vx=[1,70],$Vy=[1,67],$Vz=[1,68],$VA=[5,8,9,11,13,31,32,33,34,35,36,44,62,63];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"directive\":4,\"NEWLINE\":5,\"RD\":6,\"diagram\":7,\"EOF\":8,\"acc_title\":9,\"acc_title_value\":10,\"acc_descr\":11,\"acc_descr_value\":12,\"acc_descr_multiline_value\":13,\"requirementDef\":14,\"elementDef\":15,\"relationshipDef\":16,\"requirementType\":17,\"requirementName\":18,\"STRUCT_START\":19,\"requirementBody\":20,\"ID\":21,\"COLONSEP\":22,\"id\":23,\"TEXT\":24,\"text\":25,\"RISK\":26,\"riskLevel\":27,\"VERIFYMTHD\":28,\"verifyType\":29,\"STRUCT_STOP\":30,\"REQUIREMENT\":31,\"FUNCTIONAL_REQUIREMENT\":32,\"INTERFACE_REQUIREMENT\":33,\"PERFORMANCE_REQUIREMENT\":34,\"PHYSICAL_REQUIREMENT\":35,\"DESIGN_CONSTRAINT\":36,\"LOW_RISK\":37,\"MED_RISK\":38,\"HIGH_RISK\":39,\"VERIFY_ANALYSIS\":40,\"VERIFY_DEMONSTRATION\":41,\"VERIFY_INSPECTION\":42,\"VERIFY_TEST\":43,\"ELEMENT\":44,\"elementName\":45,\"elementBody\":46,\"TYPE\":47,\"type\":48,\"DOCREF\":49,\"ref\":50,\"END_ARROW_L\":51,\"relationship\":52,\"LINE\":53,\"END_ARROW_R\":54,\"CONTAINS\":55,\"COPIES\":56,\"DERIVES\":57,\"SATISFIES\":58,\"VERIFIES\":59,\"REFINES\":60,\"TRACES\":61,\"unqString\":62,\"qString\":63,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"NEWLINE\",6:\"RD\",8:\"EOF\",9:\"acc_title\",10:\"acc_title_value\",11:\"acc_descr\",12:\"acc_descr_value\",13:\"acc_descr_multiline_value\",19:\"STRUCT_START\",21:\"ID\",22:\"COLONSEP\",24:\"TEXT\",26:\"RISK\",28:\"VERIFYMTHD\",30:\"STRUCT_STOP\",31:\"REQUIREMENT\",32:\"FUNCTIONAL_REQUIREMENT\",33:\"INTERFACE_REQUIREMENT\",34:\"PERFORMANCE_REQUIREMENT\",35:\"PHYSICAL_REQUIREMENT\",36:\"DESIGN_CONSTRAINT\",37:\"LOW_RISK\",38:\"MED_RISK\",39:\"HIGH_RISK\",40:\"VERIFY_ANALYSIS\",41:\"VERIFY_DEMONSTRATION\",42:\"VERIFY_INSPECTION\",43:\"VERIFY_TEST\",44:\"ELEMENT\",47:\"TYPE\",49:\"DOCREF\",51:\"END_ARROW_L\",53:\"LINE\",54:\"END_ARROW_R\",55:\"CONTAINS\",56:\"COPIES\",57:\"DERIVES\",58:\"SATISFIES\",59:\"VERIFIES\",60:\"REFINES\",61:\"TRACES\",62:\"unqString\",63:\"qString\"},\nproductions_: [0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 5: case 6:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 7:\n this.$ = [] \nbreak;\ncase 13:\n yy.addRequirement($$[$0-3], $$[$0-4]) \nbreak;\ncase 14:\n yy.setNewReqId($$[$0-2]); \nbreak;\ncase 15:\n yy.setNewReqText($$[$0-2]); \nbreak;\ncase 16:\n yy.setNewReqRisk($$[$0-2]); \nbreak;\ncase 17:\n yy.setNewReqVerifyMethod($$[$0-2]); \nbreak;\ncase 20:\n this.$=yy.RequirementType.REQUIREMENT;\nbreak;\ncase 21:\n this.$=yy.RequirementType.FUNCTIONAL_REQUIREMENT;\nbreak;\ncase 22:\n this.$=yy.RequirementType.INTERFACE_REQUIREMENT;\nbreak;\ncase 23:\n this.$=yy.RequirementType.PERFORMANCE_REQUIREMENT;\nbreak;\ncase 24:\n this.$=yy.RequirementType.PHYSICAL_REQUIREMENT;\nbreak;\ncase 25:\n this.$=yy.RequirementType.DESIGN_CONSTRAINT;\nbreak;\ncase 26:\n this.$=yy.RiskLevel.LOW_RISK;\nbreak;\ncase 27:\n this.$=yy.RiskLevel.MED_RISK;\nbreak;\ncase 28:\n this.$=yy.RiskLevel.HIGH_RISK;\nbreak;\ncase 29:\n this.$=yy.VerifyType.VERIFY_ANALYSIS;\nbreak;\ncase 30:\n this.$=yy.VerifyType.VERIFY_DEMONSTRATION;\nbreak;\ncase 31:\n this.$=yy.VerifyType.VERIFY_INSPECTION;\nbreak;\ncase 32:\n this.$=yy.VerifyType.VERIFY_TEST;\nbreak;\ncase 33:\n yy.addElement($$[$0-3]) \nbreak;\ncase 34:\n yy.setNewElementType($$[$0-2]); \nbreak;\ncase 35:\n yy.setNewElementDocRef($$[$0-2]); \nbreak;\ncase 38:\n yy.addRelationship($$[$0-2], $$[$0], $$[$0-4]) \nbreak;\ncase 39:\n yy.addRelationship($$[$0-2], $$[$0-4], $$[$0]) \nbreak;\ncase 40:\n this.$=yy.Relationships.CONTAINS;\nbreak;\ncase 41:\n this.$=yy.Relationships.COPIES;\nbreak;\ncase 42:\n this.$=yy.Relationships.DERIVES;\nbreak;\ncase 43:\n this.$=yy.Relationships.SATISFIES;\nbreak;\ncase 44:\n this.$=yy.Relationships.VERIFIES;\nbreak;\ncase 45:\n this.$=yy.Relationships.REFINES;\nbreak;\ncase 46:\n this.$=yy.Relationships.TRACES;\nbreak;\n}\n},\ntable: [{3:1,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[3]},{3:8,4:2,5:[1,7],6:$V0,9:$V1,11:$V2,13:$V3},{5:[1,9]},{10:[1,10]},{12:[1,11]},o($V4,[2,6]),{3:12,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[2,2]},{4:17,5:$V5,7:13,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},o($V4,[2,4]),o($V4,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:$V5,7:31,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:32,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:33,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:34,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{4:17,5:$V5,7:35,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:19,23:21,31:$V7,32:$V8,33:$V9,34:$Va,35:$Vb,36:$Vc,44:$Vd,62:$Ve,63:$Vf},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},o($Vg,[2,20]),o($Vg,[2,21]),o($Vg,[2,22]),o($Vg,[2,23]),o($Vg,[2,24]),o($Vg,[2,25]),o($Vh,[2,49]),o($Vh,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:$Vi,56:$Vj,57:$Vk,58:$Vl,59:$Vm,60:$Vn,61:$Vo},{52:54,55:$Vi,56:$Vj,57:$Vk,58:$Vl,59:$Vm,60:$Vn,61:$Vo},{5:[1,55]},{5:[1,56]},{53:[1,57]},o($Vp,[2,40]),o($Vp,[2,41]),o($Vp,[2,42]),o($Vp,[2,43]),o($Vp,[2,44]),o($Vp,[2,45]),o($Vp,[2,46]),{54:[1,58]},{5:$Vq,20:59,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vw,30:$Vx,46:66,47:$Vy,49:$Vz},{23:71,62:$Ve,63:$Vf},{23:72,62:$Ve,63:$Vf},o($VA,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:$Vq,20:77,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},o($VA,[2,19]),o($VA,[2,33]),{22:[1,78]},{22:[1,79]},{5:$Vw,30:$Vx,46:80,47:$Vy,49:$Vz},o($VA,[2,37]),o($VA,[2,38]),o($VA,[2,39]),{23:81,62:$Ve,63:$Vf},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},o($VA,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},o($VA,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:$Vq,20:106,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vq,20:107,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vq,20:108,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vq,20:109,21:$Vr,24:$Vs,26:$Vt,28:$Vu,30:$Vv},{5:$Vw,30:$Vx,46:110,47:$Vy,49:$Vz},{5:$Vw,30:$Vx,46:111,47:$Vy,49:$Vz},o($VA,[2,14]),o($VA,[2,15]),o($VA,[2,16]),o($VA,[2,17]),o($VA,[2,34]),o($VA,[2,35])],\ndefaultActions: {8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 'title';\nbreak;\ncase 1: this.begin(\"acc_title\");return 9; \nbreak;\ncase 2: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 3: this.begin(\"acc_descr\");return 11; \nbreak;\ncase 4: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 5: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 6: this.popState(); \nbreak;\ncase 7:return \"acc_descr_multiline_value\";\nbreak;\ncase 8:return 5;\nbreak;\ncase 9:/* skip all whitespace */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:/* skip comments */\nbreak;\ncase 12:return 8;\nbreak;\ncase 13:return 6;\nbreak;\ncase 14:return 19;\nbreak;\ncase 15:return 30;\nbreak;\ncase 16:return 22;\nbreak;\ncase 17:return 21;\nbreak;\ncase 18:return 24;\nbreak;\ncase 19:return 26;\nbreak;\ncase 20:return 28;\nbreak;\ncase 21:return 31;\nbreak;\ncase 22:return 32;\nbreak;\ncase 23:return 33;\nbreak;\ncase 24:return 34;\nbreak;\ncase 25:return 35;\nbreak;\ncase 26:return 36;\nbreak;\ncase 27:return 37;\nbreak;\ncase 28:return 38;\nbreak;\ncase 29:return 39;\nbreak;\ncase 30:return 40;\nbreak;\ncase 31:return 41;\nbreak;\ncase 32:return 42;\nbreak;\ncase 33:return 43;\nbreak;\ncase 34:return 44;\nbreak;\ncase 35:return 55;\nbreak;\ncase 36:return 56;\nbreak;\ncase 37:return 57;\nbreak;\ncase 38:return 58;\nbreak;\ncase 39:return 59;\nbreak;\ncase 40:return 60;\nbreak;\ncase 41:return 61;\nbreak;\ncase 42:return 47;\nbreak;\ncase 43:return 49;\nbreak;\ncase 44:return 51;\nbreak;\ncase 45:return 54;\nbreak;\ncase 46:return 53;\nbreak;\ncase 47: this.begin(\"string\"); \nbreak;\ncase 48: this.popState(); \nbreak;\ncase 49: return \"qString\"; \nbreak;\ncase 50: yy_.yytext = yy_.yytext.trim(); return 62;\nbreak;\n}\n},\nrules: [/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:(\\r?\\n)+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\\b)/i,/^(?:\\{)/i,/^(?:\\})/i,/^(?::)/i,/^(?:id\\b)/i,/^(?:text\\b)/i,/^(?:risk\\b)/i,/^(?:verifyMethod\\b)/i,/^(?:requirement\\b)/i,/^(?:functionalRequirement\\b)/i,/^(?:interfaceRequirement\\b)/i,/^(?:performanceRequirement\\b)/i,/^(?:physicalRequirement\\b)/i,/^(?:designConstraint\\b)/i,/^(?:low\\b)/i,/^(?:medium\\b)/i,/^(?:high\\b)/i,/^(?:analysis\\b)/i,/^(?:demonstration\\b)/i,/^(?:inspection\\b)/i,/^(?:test\\b)/i,/^(?:element\\b)/i,/^(?:contains\\b)/i,/^(?:copies\\b)/i,/^(?:derives\\b)/i,/^(?:satisfies\\b)/i,/^(?:verifies\\b)/i,/^(?:refines\\b)/i,/^(?:traces\\b)/i,/^(?:type\\b)/i,/^(?:docref\\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:[\"])/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[\\w][^\\r\\n\\{\\<\\>\\-\\=]*)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[6,7],\"inclusive\":false},\"acc_descr\":{\"rules\":[4],\"inclusive\":false},\"acc_title\":{\"rules\":[2],\"inclusive\":false},\"unqString\":{\"rules\":[],\"inclusive\":false},\"token\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[48,49],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\n\nlet relations = [];\nlet latestRequirement = {};\nlet requirements = new Map();\nlet latestElement = {};\nlet elements = new Map();\n\nconst RequirementType = {\n REQUIREMENT: 'Requirement',\n FUNCTIONAL_REQUIREMENT: 'Functional Requirement',\n INTERFACE_REQUIREMENT: 'Interface Requirement',\n PERFORMANCE_REQUIREMENT: 'Performance Requirement',\n PHYSICAL_REQUIREMENT: 'Physical Requirement',\n DESIGN_CONSTRAINT: 'Design Constraint',\n};\n\nconst RiskLevel = {\n LOW_RISK: 'Low',\n MED_RISK: 'Medium',\n HIGH_RISK: 'High',\n};\n\nconst VerifyType = {\n VERIFY_ANALYSIS: 'Analysis',\n VERIFY_DEMONSTRATION: 'Demonstration',\n VERIFY_INSPECTION: 'Inspection',\n VERIFY_TEST: 'Test',\n};\n\nconst Relationships = {\n CONTAINS: 'contains',\n COPIES: 'copies',\n DERIVES: 'derives',\n SATISFIES: 'satisfies',\n VERIFIES: 'verifies',\n REFINES: 'refines',\n TRACES: 'traces',\n};\n\nconst addRequirement = (name, type) => {\n if (!requirements.has(name)) {\n requirements.set(name, {\n name,\n type,\n\n id: latestRequirement.id,\n text: latestRequirement.text,\n risk: latestRequirement.risk,\n verifyMethod: latestRequirement.verifyMethod,\n });\n }\n latestRequirement = {};\n\n return requirements.get(name);\n};\n\nconst getRequirements = () => requirements;\n\nconst setNewReqId = (id) => {\n if (latestRequirement !== undefined) {\n latestRequirement.id = id;\n }\n};\n\nconst setNewReqText = (text) => {\n if (latestRequirement !== undefined) {\n latestRequirement.text = text;\n }\n};\n\nconst setNewReqRisk = (risk) => {\n if (latestRequirement !== undefined) {\n latestRequirement.risk = risk;\n }\n};\n\nconst setNewReqVerifyMethod = (verifyMethod) => {\n if (latestRequirement !== undefined) {\n latestRequirement.verifyMethod = verifyMethod;\n }\n};\n\nconst addElement = (name) => {\n if (!elements.has(name)) {\n elements.set(name, {\n name,\n type: latestElement.type,\n docRef: latestElement.docRef,\n });\n log.info('Added new requirement: ', name);\n }\n latestElement = {};\n\n return elements.get(name);\n};\n\nconst getElements = () => elements;\n\nconst setNewElementType = (type) => {\n if (latestElement !== undefined) {\n latestElement.type = type;\n }\n};\n\nconst setNewElementDocRef = (docRef) => {\n if (latestElement !== undefined) {\n latestElement.docRef = docRef;\n }\n};\n\nconst addRelationship = (type, src, dst) => {\n relations.push({\n type,\n src,\n dst,\n });\n};\n\nconst getRelationships = () => relations;\n\nconst clear = () => {\n relations = [];\n latestRequirement = {};\n requirements = new Map();\n latestElement = {};\n elements = new Map();\n commonClear();\n};\n\nexport default {\n RequirementType,\n RiskLevel,\n VerifyType,\n Relationships,\n\n getConfig: () => getConfig().req,\n\n addRequirement,\n getRequirements,\n setNewReqId,\n setNewReqText,\n setNewReqRisk,\n setNewReqVerifyMethod,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n\n addElement,\n getElements,\n setNewElementType,\n setNewElementDocRef,\n\n addRelationship,\n getRelationships,\n\n clear,\n};\n", "const getStyles = (options) => `\n\n marker {\n fill: ${options.relationColor};\n stroke: ${options.relationColor};\n }\n\n marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n .reqBox {\n fill: ${options.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${options.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${options.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${options.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${options.relationLabelColor};\n }\n\n`;\n// fill', conf.rect_fill)\nexport default getStyles;\n", "const ReqMarkers = {\n CONTAINS: 'contains',\n ARROW: 'arrow',\n};\n\nconst insertLineEndings = (parentNode, conf) => {\n let containsNode = parentNode\n .append('defs')\n .append('marker')\n .attr('id', ReqMarkers.CONTAINS + '_line_ending')\n .attr('refX', 0)\n .attr('refY', conf.line_height / 2)\n .attr('markerWidth', conf.line_height)\n .attr('markerHeight', conf.line_height)\n .attr('orient', 'auto')\n .append('g');\n\n containsNode\n .append('circle')\n .attr('cx', conf.line_height / 2)\n .attr('cy', conf.line_height / 2)\n .attr('r', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n // .attr('stroke-width', 1)\n .attr('fill', 'none');\n\n containsNode\n .append('line')\n .attr('x1', 0)\n .attr('x2', conf.line_height)\n .attr('y1', conf.line_height / 2)\n .attr('y2', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n .attr('stroke-width', 1);\n\n containsNode\n .append('line')\n .attr('y1', 0)\n .attr('y2', conf.line_height)\n .attr('x1', conf.line_height / 2)\n .attr('x2', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n .attr('stroke-width', 1);\n\n parentNode\n .append('defs')\n .append('marker')\n .attr('id', ReqMarkers.ARROW + '_line_ending')\n .attr('refX', conf.line_height)\n .attr('refY', 0.5 * conf.line_height)\n .attr('markerWidth', conf.line_height)\n .attr('markerHeight', conf.line_height)\n .attr('orient', 'auto')\n .append('path')\n .attr(\n 'd',\n `M0,0\n L${conf.line_height},${conf.line_height / 2}\n M${conf.line_height},${conf.line_height / 2}\n L0,${conf.line_height}`\n )\n .attr('stroke-width', 1);\n // .attr('stroke', conf.rect_border_color);\n};\n\nexport default {\n ReqMarkers,\n insertLineEndings,\n};\n", "import { line, select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport common from '../common/common.js';\nimport markers from './requirementMarkers.js';\n\nlet conf = {};\nlet relCnt = 0;\n\nconst newRectNode = (parentNode, id) => {\n return parentNode\n .insert('rect', '#' + id)\n .attr('class', 'req reqBox')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', conf.rect_min_width + 'px')\n .attr('height', conf.rect_min_height + 'px');\n};\n\nconst newTitleNode = (parentNode, id, txts) => {\n let x = conf.rect_min_width / 2;\n\n let title = parentNode\n .append('text')\n .attr('class', 'req reqLabel reqTitle')\n .attr('id', id)\n .attr('x', x)\n .attr('y', conf.rect_padding)\n .attr('dominant-baseline', 'hanging');\n // .attr(\n // 'style',\n // 'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n // )\n let i = 0;\n txts.forEach((textStr) => {\n if (i == 0) {\n title\n .append('tspan')\n .attr('text-anchor', 'middle')\n .attr('x', conf.rect_min_width / 2)\n .attr('dy', 0)\n .text(textStr);\n } else {\n title\n .append('tspan')\n .attr('text-anchor', 'middle')\n .attr('x', conf.rect_min_width / 2)\n .attr('dy', conf.line_height * 0.75)\n .text(textStr);\n }\n i++;\n });\n\n let yPadding = 1.5 * conf.rect_padding;\n let linePadding = i * conf.line_height * 0.75;\n let totalY = yPadding + linePadding;\n\n parentNode\n .append('line')\n .attr('class', 'req-title-line')\n .attr('x1', '0')\n .attr('x2', conf.rect_min_width)\n .attr('y1', totalY)\n .attr('y2', totalY);\n\n return {\n titleNode: title,\n y: totalY,\n };\n};\n\nconst newBodyNode = (parentNode, id, txts, yStart) => {\n let body = parentNode\n .append('text')\n .attr('class', 'req reqLabel')\n .attr('id', id)\n .attr('x', conf.rect_padding)\n .attr('y', yStart)\n .attr('dominant-baseline', 'hanging');\n // .attr(\n // 'style',\n // 'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n // );\n\n let currentRow = 0;\n const charLimit = 30;\n let wrappedTxts = [];\n txts.forEach((textStr) => {\n let currentTextLen = textStr.length;\n while (currentTextLen > charLimit && currentRow < 3) {\n let firstPart = textStr.substring(0, charLimit);\n textStr = textStr.substring(charLimit, textStr.length);\n currentTextLen = textStr.length;\n wrappedTxts[wrappedTxts.length] = firstPart;\n currentRow++;\n }\n if (currentRow == 3) {\n let lastStr = wrappedTxts[wrappedTxts.length - 1];\n wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + '...';\n } else {\n wrappedTxts[wrappedTxts.length] = textStr;\n }\n currentRow = 0;\n });\n\n wrappedTxts.forEach((textStr) => {\n body.append('tspan').attr('x', conf.rect_padding).attr('dy', conf.line_height).text(textStr);\n });\n\n return body;\n};\n\nconst addEdgeLabel = (parentNode, svgPath, conf, txt) => {\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n relCnt++;\n\n const labelNode = parentNode\n .append('text')\n .attr('class', 'req relationshipLabel')\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n // .attr('style', 'font-family: ' + conf.fontFamily + '; font-size: ' + conf.fontSize + 'px')\n .text(txt);\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n parentNode\n .insert('rect', '#' + labelId)\n .attr('class', 'req reqLabelBox')\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height)\n .attr('fill', 'white')\n .attr('fill-opacity', '85%');\n};\n\nconst drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {\n // Find the edge relating to this relationship\n const edge = g.edge(elementString(rel.src), elementString(rel.dst));\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n });\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .attr('class', 'er relationshipLine')\n .attr('d', lineFunction(edge.points))\n .attr('fill', 'none');\n\n if (rel.type == diagObj.db.Relationships.CONTAINS) {\n svgPath.attr(\n 'marker-start',\n 'url(' + common.getUrl(conf.arrowMarkerAbsolute) + '#' + rel.type + '_line_ending' + ')'\n );\n } else {\n svgPath.attr('stroke-dasharray', '10,7');\n svgPath.attr(\n 'marker-end',\n 'url(' +\n common.getUrl(conf.arrowMarkerAbsolute) +\n '#' +\n markers.ReqMarkers.ARROW +\n '_line_ending' +\n ')'\n );\n }\n\n addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);\n\n return;\n};\n\n/**\n * @param {Map} reqs\n * @param graph\n * @param svgNode\n */\nexport const drawReqs = (reqs, graph, svgNode) => {\n reqs.forEach((req, reqName) => {\n reqName = elementString(reqName);\n log.info('Added new requirement: ', reqName);\n\n const groupNode = svgNode.append('g').attr('id', reqName);\n const textId = 'req-' + reqName;\n const rectNode = newRectNode(groupNode, textId);\n\n let nodes = [];\n\n let titleNodeInfo = newTitleNode(groupNode, reqName + '_title', [\n `<<${req.type}>>`,\n `${req.name}`,\n ]);\n\n nodes.push(titleNodeInfo.titleNode);\n\n let bodyNode = newBodyNode(\n groupNode,\n reqName + '_body',\n [\n `Id: ${req.id}`,\n `Text: ${req.text}`,\n `Risk: ${req.risk}`,\n `Verification: ${req.verifyMethod}`,\n ],\n titleNodeInfo.y\n );\n\n nodes.push(bodyNode);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(reqName, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: reqName,\n });\n });\n};\n\n/**\n * @param {Map} els\n * @param graph\n * @param svgNode\n */\nexport const drawElements = (els, graph, svgNode) => {\n els.forEach((el, elName) => {\n const id = elementString(elName);\n\n const groupNode = svgNode.append('g').attr('id', id);\n const textId = 'element-' + id;\n const rectNode = newRectNode(groupNode, textId);\n\n let nodes = [];\n\n let titleNodeInfo = newTitleNode(groupNode, textId + '_title', [`<>`, `${elName}`]);\n\n nodes.push(titleNodeInfo.titleNode);\n\n let bodyNode = newBodyNode(\n groupNode,\n textId + '_body',\n [`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docRef || 'None'}`],\n titleNodeInfo.y\n );\n\n nodes.push(bodyNode);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(id, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: id,\n });\n });\n};\n\nconst addRelationships = (relationships, g) => {\n relationships.forEach(function (r) {\n let src = elementString(r.src);\n let dst = elementString(r.dst);\n g.setEdge(src, dst, { relationship: r });\n });\n return relationships;\n};\n\nconst adjustEntities = function (svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n svgNode.select('#' + v);\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n return;\n};\n\nconst elementString = (str) => {\n return str.replace(/\\s/g, '').replace(/\\./g, '_');\n};\n\nexport const draw = (text, id, _version, diagObj) => {\n conf = getConfig().requirement;\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id='${id}']`);\n markers.insertLineEndings(svg, conf);\n\n const g = new graphlib.Graph({\n multigraph: false,\n compound: false,\n directed: true,\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n let requirements = diagObj.db.getRequirements();\n let elements = diagObj.db.getElements();\n let relationships = diagObj.db.getRelationships();\n\n drawReqs(requirements, g, svg);\n drawElements(elements, g, svg);\n addRelationships(relationships, g);\n dagreLayout(g);\n adjustEntities(svg, g);\n\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, id, diagObj);\n });\n\n const padding = conf.rect_padding;\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n};\n\n// cspell:ignore txts\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/requirementDiagram.jison';\nimport db from './requirementDb.js';\nimport styles from './styles.js';\nimport renderer from './requirementRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,13],$V7=[1,14],$V8=[1,16],$V9=[1,17],$Va=[1,18],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,29],$Vh=[1,30],$Vi=[1,31],$Vj=[1,32],$Vk=[1,33],$Vl=[1,34],$Vm=[1,35],$Vn=[1,36],$Vo=[1,37],$Vp=[1,38],$Vq=[1,39],$Vr=[1,41],$Vs=[1,42],$Vt=[1,43],$Vu=[1,44],$Vv=[1,45],$Vw=[1,46],$Vx=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],$Vy=[4,5,16,50,52,53],$Vz=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$VA=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],$VB=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],$VC=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],$VD=[68,69,70],$VE=[1,122];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NEWLINE\":5,\"SD\":6,\"document\":7,\"line\":8,\"statement\":9,\"box_section\":10,\"box_line\":11,\"participant_statement\":12,\"create\":13,\"box\":14,\"restOfLine\":15,\"end\":16,\"signal\":17,\"autonumber\":18,\"NUM\":19,\"off\":20,\"activate\":21,\"actor\":22,\"deactivate\":23,\"note_statement\":24,\"links_statement\":25,\"link_statement\":26,\"properties_statement\":27,\"details_statement\":28,\"title\":29,\"legacy_title\":30,\"acc_title\":31,\"acc_title_value\":32,\"acc_descr\":33,\"acc_descr_value\":34,\"acc_descr_multiline_value\":35,\"loop\":36,\"rect\":37,\"opt\":38,\"alt\":39,\"else_sections\":40,\"par\":41,\"par_sections\":42,\"par_over\":43,\"critical\":44,\"option_sections\":45,\"break\":46,\"option\":47,\"and\":48,\"else\":49,\"participant\":50,\"AS\":51,\"participant_actor\":52,\"destroy\":53,\"note\":54,\"placement\":55,\"text2\":56,\"over\":57,\"actor_pair\":58,\"links\":59,\"link\":60,\"properties\":61,\"details\":62,\"spaceList\":63,\",\":64,\"left_of\":65,\"right_of\":66,\"signaltype\":67,\"+\":68,\"-\":69,\"ACTOR\":70,\"SOLID_OPEN_ARROW\":71,\"DOTTED_OPEN_ARROW\":72,\"SOLID_ARROW\":73,\"BIDIRECTIONAL_SOLID_ARROW\":74,\"DOTTED_ARROW\":75,\"BIDIRECTIONAL_DOTTED_ARROW\":76,\"SOLID_CROSS\":77,\"DOTTED_CROSS\":78,\"SOLID_POINT\":79,\"DOTTED_POINT\":80,\"TXT\":81,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NEWLINE\",6:\"SD\",13:\"create\",14:\"box\",15:\"restOfLine\",16:\"end\",18:\"autonumber\",19:\"NUM\",20:\"off\",21:\"activate\",23:\"deactivate\",29:\"title\",30:\"legacy_title\",31:\"acc_title\",32:\"acc_title_value\",33:\"acc_descr\",34:\"acc_descr_value\",35:\"acc_descr_multiline_value\",36:\"loop\",37:\"rect\",38:\"opt\",39:\"alt\",41:\"par\",43:\"par_over\",44:\"critical\",46:\"break\",47:\"option\",48:\"and\",49:\"else\",50:\"participant\",51:\"AS\",52:\"participant_actor\",53:\"destroy\",54:\"note\",57:\"over\",59:\"links\",60:\"link\",61:\"properties\",62:\"details\",64:\",\",65:\"left_of\",66:\"right_of\",68:\"+\",69:\"-\",70:\"ACTOR\",71:\"SOLID_OPEN_ARROW\",72:\"DOTTED_OPEN_ARROW\",73:\"SOLID_ARROW\",74:\"BIDIRECTIONAL_SOLID_ARROW\",75:\"DOTTED_ARROW\",76:\"BIDIRECTIONAL_DOTTED_ARROW\",77:\"SOLID_CROSS\",78:\"DOTTED_CROSS\",79:\"SOLID_POINT\",80:\"DOTTED_POINT\",81:\"TXT\"},\nproductions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n yy.apply($$[$0]);return $$[$0]; \nbreak;\ncase 4: case 9:\n this.$ = [] \nbreak;\ncase 5: case 10:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 6: case 7: case 11: case 12:\n this.$ = $$[$0] \nbreak;\ncase 8: case 13:\n this.$=[]; \nbreak;\ncase 15:\n$$[$0].type='createParticipant'; this.$=$$[$0];\nbreak;\ncase 16:\n\n\t\t$$[$0-1].unshift({type: 'boxStart', boxData:yy.parseBoxData($$[$0-2]) });\n\t\t$$[$0-1].push({type: 'boxEnd', boxText:$$[$0-2]});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 18:\n this.$= {type:'sequenceIndex',sequenceIndex: Number($$[$0-2]), sequenceIndexStep:Number($$[$0-1]), sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};\nbreak;\ncase 19:\n this.$ = {type:'sequenceIndex',sequenceIndex: Number($$[$0-1]), sequenceIndexStep:1, sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};\nbreak;\ncase 20:\n this.$ = {type:'sequenceIndex', sequenceVisible:false, signalType:yy.LINETYPE.AUTONUMBER};\nbreak;\ncase 21:\nthis.$ = {type:'sequenceIndex', sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; \nbreak;\ncase 22:\nthis.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1].actor};\nbreak;\ncase 23:\nthis.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1].actor};\nbreak;\ncase 29:\nyy.setDiagramTitle($$[$0].substring(6));this.$=$$[$0].substring(6);\nbreak;\ncase 30:\nyy.setDiagramTitle($$[$0].substring(7));this.$=$$[$0].substring(7);\nbreak;\ncase 31:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 32: case 33:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 34:\n\n\t\t$$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START});\n\t\t$$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 35:\n\n\t\t$$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START });\n\t\t$$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END });\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 36:\n\n\t\t$$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START});\n\t\t$$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 37:\n\n\t\t// Alt start\n\t\t$$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START});\n\t\t// Content in alt is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 38:\n\n\t\t// Parallel start\n\t\t$$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START});\n\t\t// Content in par is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 39:\n\n\t\t// Parallel (overlapped) start\n\t\t$$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_OVER_START});\n\t\t// Content in par is already in $$[$0-1]\n\t\t// End\n\t\t$$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 40:\n\n\t\t// critical start\n\t\t$$[$0-1].unshift({type: 'criticalStart', criticalText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.CRITICAL_START});\n\t\t// Content in critical is already in $$[$0-1]\n\t\t// critical end\n\t\t$$[$0-1].push({type: 'criticalEnd', signalType: yy.LINETYPE.CRITICAL_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 41:\n\n\t\t$$[$0-1].unshift({type: 'breakStart', breakText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.BREAK_START});\n\t\t$$[$0-1].push({type: 'breakEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.BREAK_END});\n\t\tthis.$=$$[$0-1];\nbreak;\ncase 43:\n this.$ = $$[$0-3].concat([{type: 'option', optionText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.CRITICAL_OPTION}, $$[$0]]); \nbreak;\ncase 45:\n this.$ = $$[$0-3].concat([{type: 'and', parText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.PAR_AND}, $$[$0]]); \nbreak;\ncase 47:\n this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); \nbreak;\ncase 48:\n$$[$0-3].draw='participant'; $$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 49:\n$$[$0-1].draw='participant'; $$[$0-1].type='addParticipant';this.$=$$[$0-1];\nbreak;\ncase 50:\n$$[$0-3].draw='actor'; $$[$0-3].type='addParticipant';$$[$0-3].description=yy.parseMessage($$[$0-1]); this.$=$$[$0-3];\nbreak;\ncase 51:\n$$[$0-1].draw='actor'; $$[$0-1].type='addParticipant'; this.$=$$[$0-1];\nbreak;\ncase 52:\n$$[$0-1].type='destroyParticipant'; this.$=$$[$0-1];\nbreak;\ncase 53:\n\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];\nbreak;\ncase 54:\n\n\t\t// Coerce actor_pair into a [to, from, ...] array\n\t\t$$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);\n\t\t$$[$0-2][0] = $$[$0-2][0].actor;\n\t\t$$[$0-2][1] = $$[$0-2][1].actor;\n\t\tthis.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];\nbreak;\ncase 55:\n\n\t\tthis.$ = [$$[$0-1], {type:'addLinks', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 56:\n\n\t\tthis.$ = [$$[$0-1], {type:'addALink', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 57:\n\n\t\tthis.$ = [$$[$0-1], {type:'addProperties', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 58:\n\n\t\tthis.$ = [$$[$0-1], {type:'addDetails', actor:$$[$0-1].actor, text:$$[$0]}];\n \nbreak;\ncase 61:\n this.$ = [$$[$0-2], $$[$0]]; \nbreak;\ncase 62:\n this.$ = $$[$0]; \nbreak;\ncase 63:\n this.$ = yy.PLACEMENT.LEFTOF; \nbreak;\ncase 64:\n this.$ = yy.PLACEMENT.RIGHTOF; \nbreak;\ncase 65:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0], activate: true},\n\t {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1].actor}\n\t ]\nbreak;\ncase 66:\n this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},\n\t {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4].actor}\n\t ]\nbreak;\ncase 67:\n this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]\nbreak;\ncase 68:\nthis.$={ type: 'addParticipant', actor:$$[$0]}\nbreak;\ncase 69:\n this.$ = yy.LINETYPE.SOLID_OPEN; \nbreak;\ncase 70:\n this.$ = yy.LINETYPE.DOTTED_OPEN; \nbreak;\ncase 71:\n this.$ = yy.LINETYPE.SOLID; \nbreak;\ncase 72:\n this.$ = yy.LINETYPE.BIDIRECTIONAL_SOLID; \nbreak;\ncase 73:\n this.$ = yy.LINETYPE.DOTTED; \nbreak;\ncase 74:\n this.$ = yy.LINETYPE.BIDIRECTIONAL_DOTTED; \nbreak;\ncase 75:\n this.$ = yy.LINETYPE.SOLID_CROSS; \nbreak;\ncase 76:\n this.$ = yy.LINETYPE.DOTTED_CROSS; \nbreak;\ncase 77:\n this.$ = yy.LINETYPE.SOLID_POINT; \nbreak;\ncase 78:\n this.$ = yy.LINETYPE.DOTTED_POINT; \nbreak;\ncase 79:\nthis.$ = yy.parseMessage($$[$0].trim().substring(1)) \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},o($Vx,[2,5]),{9:47,12:12,13:$V6,14:$V7,17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},o($Vx,[2,7]),o($Vx,[2,8]),o($Vx,[2,14]),{12:48,50:$Vo,52:$Vp,53:$Vq},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:$Vw},{22:55,70:$Vw},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},o($Vx,[2,29]),o($Vx,[2,30]),{32:[1,61]},{34:[1,62]},o($Vx,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:$Vw},{22:72,70:$Vw},{22:73,70:$Vw},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:$Vw},{22:90,70:$Vw},{22:91,70:$Vw},{22:92,70:$Vw},o([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),o($Vx,[2,6]),o($Vx,[2,15]),o($Vy,[2,9],{10:93}),o($Vx,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},o($Vx,[2,21]),{5:[1,97]},{5:[1,98]},o($Vx,[2,24]),o($Vx,[2,25]),o($Vx,[2,26]),o($Vx,[2,27]),o($Vx,[2,28]),o($Vx,[2,31]),o($Vx,[2,32]),o($Vz,$V3,{7:99}),o($Vz,$V3,{7:100}),o($Vz,$V3,{7:101}),o($VA,$V3,{40:102,7:103}),o($VB,$V3,{42:104,7:105}),o($VB,$V3,{7:105,42:106}),o($VC,$V3,{45:107,7:108}),o($Vz,$V3,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:$Vw},o($VD,[2,69]),o($VD,[2,70]),o($VD,[2,71]),o($VD,[2,72]),o($VD,[2,73]),o($VD,[2,74]),o($VD,[2,75]),o($VD,[2,76]),o($VD,[2,77]),o($VD,[2,78]),{22:118,70:$Vw},{22:120,58:119,70:$Vw},{70:[2,63]},{70:[2,64]},{56:121,81:$VE},{56:123,81:$VE},{56:124,81:$VE},{56:125,81:$VE},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:$Vo,52:$Vp,53:$Vq},{5:[1,131]},o($Vx,[2,19]),o($Vx,[2,20]),o($Vx,[2,22]),o($Vx,[2,23]),{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,132],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,133],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,134],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{16:[1,135]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,46],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,49:[1,136],50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{16:[1,137]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,44],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,48:[1,138],50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{16:[1,139]},{16:[1,140]},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[2,42],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,47:[1,141],50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{4:$V4,5:$V5,8:8,9:10,12:12,13:$V6,14:$V7,16:[1,142],17:15,18:$V8,21:$V9,22:40,23:$Va,24:19,25:20,26:21,27:22,28:23,29:$Vb,30:$Vc,31:$Vd,33:$Ve,35:$Vf,36:$Vg,37:$Vh,38:$Vi,39:$Vj,41:$Vk,43:$Vl,44:$Vm,46:$Vn,50:$Vo,52:$Vp,53:$Vq,54:$Vr,59:$Vs,60:$Vt,61:$Vu,62:$Vv,70:$Vw},{15:[1,143]},o($Vx,[2,49]),{15:[1,144]},o($Vx,[2,51]),o($Vx,[2,52]),{22:145,70:$Vw},{22:146,70:$Vw},{56:147,81:$VE},{56:148,81:$VE},{56:149,81:$VE},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},o($Vx,[2,16]),o($Vy,[2,10]),{12:151,50:$Vo,52:$Vp,53:$Vq},o($Vy,[2,12]),o($Vy,[2,13]),o($Vx,[2,18]),o($Vx,[2,34]),o($Vx,[2,35]),o($Vx,[2,36]),o($Vx,[2,37]),{15:[1,152]},o($Vx,[2,38]),{15:[1,153]},o($Vx,[2,39]),o($Vx,[2,40]),{15:[1,154]},o($Vx,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:$VE},{56:158,81:$VE},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:$Vw},o($Vy,[2,11]),o($VA,$V3,{7:103,40:160}),o($VB,$V3,{7:105,42:161}),o($VC,$V3,{7:108,45:162}),o($Vx,[2,48]),o($Vx,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],\ndefaultActions: {5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 5;\nbreak;\ncase 1:/* skip all whitespace */\nbreak;\ncase 2:/* skip same-line whitespace */\nbreak;\ncase 3:/* skip comments */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:return 19;\nbreak;\ncase 7: this.begin('LINE'); return 14; \nbreak;\ncase 8: this.begin('ID'); return 50; \nbreak;\ncase 9: this.begin('ID'); return 52; \nbreak;\ncase 10:return 13;\nbreak;\ncase 11: this.begin('ID'); return 53; \nbreak;\ncase 12: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 70; \nbreak;\ncase 13: this.popState(); this.popState(); this.begin('LINE'); return 51; \nbreak;\ncase 14: this.popState(); this.popState(); return 5; \nbreak;\ncase 15: this.begin('LINE'); return 36; \nbreak;\ncase 16: this.begin('LINE'); return 37; \nbreak;\ncase 17: this.begin('LINE'); return 38; \nbreak;\ncase 18: this.begin('LINE'); return 39; \nbreak;\ncase 19: this.begin('LINE'); return 49; \nbreak;\ncase 20: this.begin('LINE'); return 41; \nbreak;\ncase 21: this.begin('LINE'); return 43; \nbreak;\ncase 22: this.begin('LINE'); return 48; \nbreak;\ncase 23: this.begin('LINE'); return 44; \nbreak;\ncase 24: this.begin('LINE'); return 47; \nbreak;\ncase 25: this.begin('LINE'); return 46; \nbreak;\ncase 26: this.popState(); return 15; \nbreak;\ncase 27:return 16;\nbreak;\ncase 28:return 65;\nbreak;\ncase 29:return 66;\nbreak;\ncase 30:return 59;\nbreak;\ncase 31:return 60;\nbreak;\ncase 32:return 61;\nbreak;\ncase 33:return 62;\nbreak;\ncase 34:return 57;\nbreak;\ncase 35:return 54;\nbreak;\ncase 36: this.begin('ID'); return 21; \nbreak;\ncase 37: this.begin('ID'); return 23; \nbreak;\ncase 38:return 29;\nbreak;\ncase 39:return 30;\nbreak;\ncase 40: this.begin(\"acc_title\");return 31; \nbreak;\ncase 41: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 42: this.begin(\"acc_descr\");return 33; \nbreak;\ncase 43: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 44: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 45: this.popState(); \nbreak;\ncase 46:return \"acc_descr_multiline_value\";\nbreak;\ncase 47:return 6;\nbreak;\ncase 48:return 18;\nbreak;\ncase 49:return 20;\nbreak;\ncase 50:return 64;\nbreak;\ncase 51:return 5;\nbreak;\ncase 52: yy_.yytext = yy_.yytext.trim(); return 70; \nbreak;\ncase 53:return 73;\nbreak;\ncase 54:return 74;\nbreak;\ncase 55:return 75;\nbreak;\ncase 56:return 76;\nbreak;\ncase 57:return 71;\nbreak;\ncase 58:return 72;\nbreak;\ncase 59:return 77;\nbreak;\ncase 60:return 78;\nbreak;\ncase 61:return 79;\nbreak;\ncase 62:return 80;\nbreak;\ncase 63:return 81;\nbreak;\ncase 64:return 68;\nbreak;\ncase 65:return 69;\nbreak;\ncase 66:return 5;\nbreak;\ncase 67:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[0-9]+(?=[ \\n]+))/i,/^(?:box\\b)/i,/^(?:participant\\b)/i,/^(?:actor\\b)/i,/^(?:create\\b)/i,/^(?:destroy\\b)/i,/^(?:[^\\<->\\->:\\n,;]+?([\\-]*[^\\<->\\->:\\n,;]+?)*?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i,/^(?:as\\b)/i,/^(?:(?:))/i,/^(?:loop\\b)/i,/^(?:rect\\b)/i,/^(?:opt\\b)/i,/^(?:alt\\b)/i,/^(?:else\\b)/i,/^(?:par\\b)/i,/^(?:par_over\\b)/i,/^(?:and\\b)/i,/^(?:critical\\b)/i,/^(?:option\\b)/i,/^(?:break\\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i,/^(?:end\\b)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:links\\b)/i,/^(?:link\\b)/i,/^(?:properties\\b)/i,/^(?:details\\b)/i,/^(?:over\\b)/i,/^(?:note\\b)/i,/^(?:activate\\b)/i,/^(?:deactivate\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:title:\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:sequenceDiagram\\b)/i,/^(?:autonumber\\b)/i,/^(?:off\\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\\+\\<->\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+\\<->\\->:\\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\\)])/i,/^(?:--[\\)])/i,/^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i,/^(?:\\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[45,46],\"inclusive\":false},\"acc_descr\":{\"rules\":[43],\"inclusive\":false},\"acc_title\":{\"rules\":[41],\"inclusive\":false},\"ID\":{\"rules\":[2,3,12],\"inclusive\":false},\"ALIAS\":{\"rules\":[2,3,13,14],\"inclusive\":false},\"LINE\":{\"rules\":[2,3,26],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport { ImperativeState } from '../../utils/imperativeState.js';\nimport { sanitizeText } from '../common/common.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport type { Actor, AddMessageParams, Box, Message, Note } from './types.js';\n\ninterface SequenceState {\n prevActor?: string;\n actors: Map;\n createdActors: Map;\n destroyedActors: Map;\n boxes: Box[];\n messages: Message[];\n notes: Note[];\n sequenceNumbersEnabled: boolean;\n wrapEnabled?: boolean;\n currentBox?: Box;\n lastCreated?: Actor;\n lastDestroyed?: Actor;\n}\n\nconst state = new ImperativeState(() => ({\n prevActor: undefined,\n actors: new Map(),\n createdActors: new Map(),\n destroyedActors: new Map(),\n boxes: [],\n messages: [],\n notes: [],\n sequenceNumbersEnabled: false,\n wrapEnabled: undefined,\n currentBox: undefined,\n lastCreated: undefined,\n lastDestroyed: undefined,\n}));\n\nexport const addBox = function (data: { text: string; color: string; wrap: boolean }) {\n state.records.boxes.push({\n name: data.text,\n wrap: data.wrap ?? autoWrap(),\n fill: data.color,\n actorKeys: [],\n });\n state.records.currentBox = state.records.boxes.slice(-1)[0];\n};\n\nexport const addActor = function (\n id: string,\n name: string,\n description: { text: string; wrap?: boolean | null; type: string },\n type: string\n) {\n let assignedBox = state.records.currentBox;\n const old = state.records.actors.get(id);\n if (old) {\n // If already set and trying to set to a new one throw error\n if (state.records.currentBox && old.box && state.records.currentBox !== old.box) {\n throw new Error(\n `A same participant should only be defined in one Box: ${old.name} can't be in '${old.box.name}' and in '${state.records.currentBox.name}' at the same time.`\n );\n }\n\n // Don't change the box if already\n assignedBox = old.box ? old.box : state.records.currentBox;\n old.box = assignedBox;\n\n // Don't allow description nulling\n if (old && name === old.name && description == null) {\n return;\n }\n }\n\n // Don't allow null descriptions, either\n if (description?.text == null) {\n description = { text: name, type };\n }\n if (type == null || description.text == null) {\n description = { text: name, type };\n }\n\n state.records.actors.set(id, {\n box: assignedBox,\n name: name,\n description: description.text,\n wrap: description.wrap ?? autoWrap(),\n prevActor: state.records.prevActor,\n links: {},\n properties: {},\n actorCnt: null,\n rectData: null,\n type: type ?? 'participant',\n });\n if (state.records.prevActor) {\n const prevActorInRecords = state.records.actors.get(state.records.prevActor);\n if (prevActorInRecords) {\n prevActorInRecords.nextActor = id;\n }\n }\n\n if (state.records.currentBox) {\n state.records.currentBox.actorKeys.push(id);\n }\n state.records.prevActor = id;\n};\n\nconst activationCount = (part: string) => {\n let i;\n let count = 0;\n if (!part) {\n return 0;\n }\n for (i = 0; i < state.records.messages.length; i++) {\n if (\n state.records.messages[i].type === LINETYPE.ACTIVE_START &&\n state.records.messages[i].from === part\n ) {\n count++;\n }\n if (\n state.records.messages[i].type === LINETYPE.ACTIVE_END &&\n state.records.messages[i].from === part\n ) {\n count--;\n }\n }\n return count;\n};\n\nexport const addMessage = function (\n idFrom: Message['from'],\n idTo: Message['to'],\n message: { text: string; wrap?: boolean },\n answer: Message['answer']\n) {\n state.records.messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: message.wrap ?? autoWrap(),\n answer: answer,\n });\n};\n\nexport const addSignal = function (\n idFrom?: Message['from'],\n idTo?: Message['to'],\n message?: { text: string; wrap: boolean },\n messageType?: number,\n activate = false\n) {\n if (messageType === LINETYPE.ACTIVE_END) {\n const cnt = activationCount(idFrom ?? '');\n if (cnt < 1) {\n // Bail out as there is an activation signal from an inactive participant\n const error = new Error('Trying to inactivate an inactive participant (' + idFrom + ')');\n\n // @ts-ignore: we are passing hash param to the error object, however we should define our own custom error class to make it type safe\n error.hash = {\n text: '->>-',\n token: '->>-',\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: [\"'ACTIVE_PARTICIPANT'\"],\n };\n throw error;\n }\n }\n state.records.messages.push({\n from: idFrom,\n to: idTo,\n message: message?.text ?? '',\n wrap: message?.wrap ?? autoWrap(),\n type: messageType,\n activate,\n });\n return true;\n};\n\nexport const hasAtLeastOneBox = function () {\n return state.records.boxes.length > 0;\n};\n\nexport const hasAtLeastOneBoxWithTitle = function () {\n return state.records.boxes.some((b) => b.name);\n};\n\nexport const getMessages = function () {\n return state.records.messages;\n};\n\nexport const getBoxes = function () {\n return state.records.boxes;\n};\nexport const getActors = function () {\n return state.records.actors;\n};\nexport const getCreatedActors = function () {\n return state.records.createdActors;\n};\nexport const getDestroyedActors = function () {\n return state.records.destroyedActors;\n};\nexport const getActor = function (id: string) {\n // TODO: do we ever use this function in a way that it might return undefined?\n return state.records.actors.get(id)!;\n};\nexport const getActorKeys = function () {\n return [...state.records.actors.keys()];\n};\nexport const enableSequenceNumbers = function () {\n state.records.sequenceNumbersEnabled = true;\n};\nexport const disableSequenceNumbers = function () {\n state.records.sequenceNumbersEnabled = false;\n};\nexport const showSequenceNumbers = () => state.records.sequenceNumbersEnabled;\n\nexport const setWrap = function (wrapSetting?: boolean) {\n state.records.wrapEnabled = wrapSetting;\n};\n\nconst extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => {\n if (text === undefined) {\n return {};\n }\n text = text.trim();\n const wrap =\n /^:?wrap:/.exec(text) !== null ? true : /^:?nowrap:/.exec(text) !== null ? false : undefined;\n const cleanedText = (wrap === undefined ? text : text.replace(/^:?(?:no)?wrap:/, '')).trim();\n return { cleanedText, wrap };\n};\n\nexport const autoWrap = () => {\n // if setWrap has been called, use that value, otherwise use the value from the config\n // TODO: refactor, always use the config value let setWrap update the config value\n if (state.records.wrapEnabled !== undefined) {\n return state.records.wrapEnabled;\n }\n return getConfig().sequence?.wrap ?? false;\n};\n\nexport const clear = function () {\n state.reset();\n commonClear();\n};\n\nexport const parseMessage = function (str: string) {\n const trimmedStr = str.trim();\n const { wrap, cleanedText } = extractWrap(trimmedStr);\n const message = {\n text: cleanedText,\n wrap,\n };\n log.debug(`parseMessage: ${JSON.stringify(message)}`);\n return message;\n};\n\n// We expect the box statement to be color first then description\n// The color can be rgb,rgba,hsl,hsla, or css code names #hex codes are not supported for now because of the way the char # is handled\n// We extract first segment as color, the rest of the line is considered as text\nexport const parseBoxData = function (str: string) {\n const match = /^((?:rgba?|hsla?)\\s*\\(.*\\)|\\w*)(.*)$/.exec(str);\n let color = match?.[1] ? match[1].trim() : 'transparent';\n let title = match?.[2] ? match[2].trim() : undefined;\n\n // check that the string is a color\n if (window?.CSS) {\n if (!window.CSS.supports('color', color)) {\n color = 'transparent';\n title = str.trim();\n }\n } else {\n const style = new Option().style;\n style.color = color;\n if (style.color !== color) {\n color = 'transparent';\n title = str.trim();\n }\n }\n const { wrap, cleanedText } = extractWrap(title);\n return {\n text: cleanedText ? sanitizeText(cleanedText, getConfig()) : undefined,\n color,\n wrap,\n };\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n AUTONUMBER: 26,\n CRITICAL_START: 27,\n CRITICAL_OPTION: 28,\n CRITICAL_END: 29,\n BREAK_START: 30,\n BREAK_END: 31,\n PAR_OVER_START: 32,\n BIDIRECTIONAL_SOLID: 33,\n BIDIRECTIONAL_DOTTED: 34,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const addNote = function (\n actor: { actor: string },\n placement: Message['placement'],\n message: { text: string; wrap?: boolean }\n) {\n const note: Note = {\n actor: actor,\n placement: placement,\n message: message.text,\n wrap: message.wrap ?? autoWrap(),\n };\n\n //@ts-ignore: Coerce actor into a [to, from, ...] array\n // eslint-disable-next-line unicorn/prefer-spread\n const actors = [].concat(actor, actor);\n state.records.notes.push(note);\n state.records.messages.push({\n from: actors[0],\n to: actors[1],\n message: message.text,\n wrap: message.wrap ?? autoWrap(),\n type: LINETYPE.NOTE,\n placement: placement,\n });\n};\n\nexport const addLinks = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n // JSON.parse the text\n try {\n let sanitizedText = sanitizeText(text.text, getConfig());\n sanitizedText = sanitizedText.replace(/&/g, '&');\n sanitizedText = sanitizedText.replace(/=/g, '=');\n const links = JSON.parse(sanitizedText);\n // add the deserialized text to the actor's links field.\n insertLinks(actor, links);\n } catch (e) {\n log.error('error while parsing actor link text', e);\n }\n};\n\nexport const addALink = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n try {\n const links: Record = {};\n let sanitizedText = sanitizeText(text.text, getConfig());\n const sep = sanitizedText.indexOf('@');\n sanitizedText = sanitizedText.replace(/&/g, '&');\n sanitizedText = sanitizedText.replace(/=/g, '=');\n const label = sanitizedText.slice(0, sep - 1).trim();\n const link = sanitizedText.slice(sep + 1).trim();\n\n links[label] = link;\n // add the deserialized text to the actor's links field.\n insertLinks(actor, links);\n } catch (e) {\n log.error('error while parsing actor link text', e);\n }\n};\n\n/**\n * @param actor - the actor to add the links to\n * @param links - the links to add to the actor\n */\nfunction insertLinks(actor: Actor, links: Record) {\n if (actor.links == null) {\n actor.links = links;\n } else {\n for (const key in links) {\n actor.links[key] = links[key];\n }\n }\n}\n\nexport const addProperties = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n // JSON.parse the text\n try {\n const sanitizedText = sanitizeText(text.text, getConfig());\n const properties: Record = JSON.parse(sanitizedText);\n // add the deserialized text to the actor's property field.\n insertProperties(actor, properties);\n } catch (e) {\n log.error('error while parsing actor properties text', e);\n }\n};\n\n/**\n * @param actor - the actor to add the properties to\n * @param properties - the properties to add to the actor's properties\n */\nfunction insertProperties(actor: Actor, properties: Record) {\n if (actor.properties == null) {\n actor.properties = properties;\n } else {\n for (const key in properties) {\n actor.properties[key] = properties[key];\n }\n }\n}\n\nfunction boxEnd() {\n state.records.currentBox = undefined;\n}\n\nexport const addDetails = function (actorId: string, text: { text: string }) {\n // find the actor\n const actor = getActor(actorId);\n const elem = document.getElementById(text.text)!;\n\n // JSON.parse the text\n try {\n const text = elem.innerHTML;\n const details = JSON.parse(text);\n // add the deserialized text to the actor's property field.\n if (details.properties) {\n insertProperties(actor, details.properties);\n }\n\n if (details.links) {\n insertLinks(actor, details.links);\n }\n } catch (e) {\n log.error('error while parsing actor details text', e);\n }\n};\n\nexport const getActorProperty = function (actor: Actor, key: string) {\n if (actor?.properties !== undefined) {\n return actor.properties[key];\n }\n\n return undefined;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents\nexport const apply = function (param: any | AddMessageParams | AddMessageParams[]) {\n if (Array.isArray(param)) {\n param.forEach(function (item) {\n apply(item);\n });\n } else {\n switch (param.type) {\n case 'sequenceIndex':\n state.records.messages.push({\n from: undefined,\n to: undefined,\n message: {\n start: param.sequenceIndex,\n step: param.sequenceIndexStep,\n visible: param.sequenceVisible,\n },\n wrap: false,\n type: param.signalType,\n });\n break;\n case 'addParticipant':\n addActor(param.actor, param.actor, param.description, param.draw);\n break;\n case 'createParticipant':\n if (state.records.actors.has(param.actor)) {\n throw new Error(\n \"It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior\"\n );\n }\n state.records.lastCreated = param.actor;\n addActor(param.actor, param.actor, param.description, param.draw);\n state.records.createdActors.set(param.actor, state.records.messages.length);\n break;\n case 'destroyParticipant':\n state.records.lastDestroyed = param.actor;\n state.records.destroyedActors.set(param.actor, state.records.messages.length);\n break;\n case 'activeStart':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'activeEnd':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'addNote':\n addNote(param.actor, param.placement, param.text);\n break;\n case 'addLinks':\n addLinks(param.actor, param.text);\n break;\n case 'addALink':\n addALink(param.actor, param.text);\n break;\n case 'addProperties':\n addProperties(param.actor, param.text);\n break;\n case 'addDetails':\n addDetails(param.actor, param.text);\n break;\n case 'addMessage':\n if (state.records.lastCreated) {\n if (param.to !== state.records.lastCreated) {\n throw new Error(\n 'The created participant ' +\n state.records.lastCreated.name +\n ' does not have an associated creating message after its declaration. Please check the sequence diagram.'\n );\n } else {\n state.records.lastCreated = undefined;\n }\n } else if (state.records.lastDestroyed) {\n if (\n param.to !== state.records.lastDestroyed &&\n param.from !== state.records.lastDestroyed\n ) {\n throw new Error(\n 'The destroyed participant ' +\n state.records.lastDestroyed.name +\n ' does not have an associated destroying message after its declaration. Please check the sequence diagram.'\n );\n } else {\n state.records.lastDestroyed = undefined;\n }\n }\n addSignal(param.from, param.to, param.msg, param.signalType, param.activate);\n break;\n case 'boxStart':\n addBox(param.boxData);\n break;\n case 'boxEnd':\n boxEnd();\n break;\n case 'loopStart':\n addSignal(undefined, undefined, param.loopText, param.signalType);\n break;\n case 'loopEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'rectStart':\n addSignal(undefined, undefined, param.color, param.signalType);\n break;\n case 'rectEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'optStart':\n addSignal(undefined, undefined, param.optText, param.signalType);\n break;\n case 'optEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'altStart':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'else':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'altEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'setAccTitle':\n setAccTitle(param.text);\n break;\n case 'parStart':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'and':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'parEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'criticalStart':\n addSignal(undefined, undefined, param.criticalText, param.signalType);\n break;\n case 'option':\n addSignal(undefined, undefined, param.optionText, param.signalType);\n break;\n case 'criticalEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'breakStart':\n addSignal(undefined, undefined, param.breakText, param.signalType);\n break;\n case 'breakEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n }\n }\n};\n\nexport default {\n addActor,\n addMessage,\n addSignal,\n addLinks,\n addDetails,\n addProperties,\n autoWrap,\n setWrap,\n enableSequenceNumbers,\n disableSequenceNumbers,\n showSequenceNumbers,\n getMessages,\n getActors,\n getCreatedActors,\n getDestroyedActors,\n getActor,\n getActorKeys,\n getActorProperty,\n getAccTitle,\n getBoxes,\n getDiagramTitle,\n setDiagramTitle,\n getConfig: () => getConfig().sequence,\n clear,\n parseMessage,\n parseBoxData,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n addNote,\n setAccTitle,\n apply,\n setAccDescription,\n getAccDescription,\n hasAtLeastOneBox,\n hasAtLeastOneBoxWithTitle,\n};\n", "const getStyles = (options) =>\n `.actor {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${options.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${options.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${options.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${options.signalColor};\n }\n\n #arrowhead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .sequenceNumber {\n fill: ${options.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${options.signalColor};\n }\n\n #crosshead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .messageText {\n fill: ${options.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${options.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${options.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${options.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation1 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation2 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${options.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n stroke-width: 2px;\n }\n`;\n\nexport default getStyles;\n", "import common, { calculateMathMLDimensions, hasKatex, renderKatex } from '../common/common.js';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\nimport { ZERO_WIDTH_SPACE, parseFontSize } from '../../utils.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport * as configApi from '../../config.js';\n\nexport const ACTOR_TYPE_WIDTH = 18 * 2;\nconst TOP_ACTOR_CLASS = 'actor-top';\nconst BOTTOM_ACTOR_CLASS = 'actor-bottom';\nconst ACTOR_BOX_CLASS = 'actor-box';\nconst ACTOR_MAN_FIGURE_CLASS = 'actor-man';\n\nexport const drawRect = function (elem, rectData) {\n return svgDrawCommon.drawRect(elem, rectData);\n};\n\nexport const drawPopup = function (elem, actor, minMenuWidth, textAttrs, forceMenus) {\n if (actor.links === undefined || actor.links === null || Object.keys(actor.links).length === 0) {\n return { height: 0, width: 0 };\n }\n\n const links = actor.links;\n const actorCnt = actor.actorCnt;\n const rectData = actor.rectData;\n\n var displayValue = 'none';\n if (forceMenus) {\n displayValue = 'block !important';\n }\n\n const g = elem.append('g');\n g.attr('id', 'actor' + actorCnt + '_popup');\n g.attr('class', 'actorPopupMenu');\n g.attr('display', displayValue);\n var actorClass = '';\n if (rectData.class !== undefined) {\n actorClass = ' ' + rectData.class;\n }\n\n let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;\n\n const rectElem = g.append('rect');\n rectElem.attr('class', 'actorPopupMenuPanel' + actorClass);\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.height);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', menuWidth);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n if (links != null) {\n var linkY = 20;\n for (let key in links) {\n var linkElem = g.append('a');\n var sanitizedLink = sanitizeUrl(links[key]);\n linkElem.attr('xlink:href', sanitizedLink);\n linkElem.attr('target', '_blank');\n\n _drawMenuItemTextCandidateFunc(textAttrs)(\n key,\n linkElem,\n rectData.x + 10,\n rectData.height + linkY,\n menuWidth,\n 20,\n { class: 'actor' },\n textAttrs\n );\n\n linkY += 30;\n }\n }\n\n rectElem.attr('height', linkY);\n\n return { height: rectData.height + linkY, width: menuWidth };\n};\n\nconst popupMenuToggle = function (popId) {\n return (\n \"var pu = document.getElementById('\" +\n popId +\n \"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }\"\n );\n};\n\nexport const drawKatex = async function (elem, textData, msgModel = null) {\n let textElem = elem.append('foreignObject');\n const lines = await renderKatex(textData.text, configApi.getConfig());\n\n const divElem = textElem\n .append('xhtml:div')\n .attr('style', 'width: fit-content;')\n .attr('xmlns', 'http://www.w3.org/1999/xhtml')\n .html(lines);\n const dim = divElem.node().getBoundingClientRect();\n\n textElem.attr('height', Math.round(dim.height)).attr('width', Math.round(dim.width));\n\n if (textData.class === 'noteText') {\n const rectElem = elem.node().firstChild;\n\n rectElem.setAttribute('height', dim.height + 2 * textData.textMargin);\n const rectDim = rectElem.getBBox();\n\n textElem\n .attr('x', Math.round(rectDim.x + rectDim.width / 2 - dim.width / 2))\n .attr('y', Math.round(rectDim.y + rectDim.height / 2 - dim.height / 2));\n } else if (msgModel) {\n let { startx, stopx, starty } = msgModel;\n if (startx > stopx) {\n const temp = startx;\n startx = stopx;\n stopx = temp;\n }\n\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n textElem.attr('x', Math.round(startx + Math.abs(startx - stopx) / 2 - dim.width / 2));\n if (textData.class === 'loopText') {\n textElem.attr('y', Math.round(starty));\n } else {\n textElem.attr('y', Math.round(starty - dim.height));\n }\n }\n\n return [textElem];\n};\n\nexport const drawText = function (elem, textData) {\n let prevTextHeight = 0;\n let textHeight = 0;\n const lines = textData.text.split(common.lineBreakRegex);\n\n const [_textFontSize, _textFontSizePx] = parseFontSize(textData.fontSize);\n\n let textElems = [];\n let dy = 0;\n let yfunc = () => textData.y;\n if (\n textData.valign !== undefined &&\n textData.textMargin !== undefined &&\n textData.textMargin > 0\n ) {\n switch (textData.valign) {\n case 'top':\n case 'start':\n yfunc = () => Math.round(textData.y + textData.textMargin);\n break;\n case 'middle':\n case 'center':\n yfunc = () =>\n Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n break;\n case 'bottom':\n case 'end':\n yfunc = () =>\n Math.round(\n textData.y +\n (prevTextHeight + textHeight + 2 * textData.textMargin) -\n textData.textMargin\n );\n break;\n }\n }\n\n if (\n textData.anchor !== undefined &&\n textData.textMargin !== undefined &&\n textData.width !== undefined\n ) {\n switch (textData.anchor) {\n case 'left':\n case 'start':\n textData.x = Math.round(textData.x + textData.textMargin);\n textData.anchor = 'start';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'middle':\n case 'center':\n textData.x = Math.round(textData.x + textData.width / 2);\n textData.anchor = 'middle';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'right':\n case 'end':\n textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n textData.anchor = 'end';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n }\n }\n\n for (let [i, line] of lines.entries()) {\n if (\n textData.textMargin !== undefined &&\n textData.textMargin === 0 &&\n _textFontSize !== undefined\n ) {\n dy = i * _textFontSize;\n }\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', yfunc());\n if (textData.anchor !== undefined) {\n textElem\n .attr('text-anchor', textData.anchor)\n .attr('dominant-baseline', textData.dominantBaseline)\n .attr('alignment-baseline', textData.alignmentBaseline);\n }\n if (textData.fontFamily !== undefined) {\n textElem.style('font-family', textData.fontFamily);\n }\n if (_textFontSizePx !== undefined) {\n textElem.style('font-size', _textFontSizePx);\n }\n if (textData.fontWeight !== undefined) {\n textElem.style('font-weight', textData.fontWeight);\n }\n if (textData.fill !== undefined) {\n textElem.attr('fill', textData.fill);\n }\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n if (textData.dy !== undefined) {\n textElem.attr('dy', textData.dy);\n } else if (dy !== 0) {\n textElem.attr('dy', dy);\n }\n\n const text = line || ZERO_WIDTH_SPACE;\n if (textData.tspan) {\n const span = textElem.append('tspan');\n span.attr('x', textData.x);\n if (textData.fill !== undefined) {\n span.attr('fill', textData.fill);\n }\n span.text(text);\n } else {\n textElem.text(text);\n }\n if (\n textData.valign !== undefined &&\n textData.textMargin !== undefined &&\n textData.textMargin > 0\n ) {\n textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n prevTextHeight = textHeight;\n }\n\n textElems.push(textElem);\n }\n\n return textElems;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n * @returns {any}\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.height / 2;\n\n drawText(elem, txtObject);\n return polygon;\n};\n\nlet actorCnt = -1;\n\nexport const fixLifeLineHeights = (diagram, actors, actorKeys, conf) => {\n if (!diagram.select) {\n return;\n }\n actorKeys.forEach((actorKey) => {\n const actor = actors.get(actorKey);\n const actorDOM = diagram.select('#actor' + actor.actorCnt);\n if (!conf.mirrorActors && actor.stopy) {\n actorDOM.attr('y2', actor.stopy + actor.height / 2);\n } else if (conf.mirrorActors) {\n actorDOM.attr('y2', actor.stopy);\n }\n });\n};\n\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} actor - The actor to draw.\n * @param {any} conf - DrawText implementation discriminator object\n * @param {boolean} isFooter - If the actor is the footer one\n */\nconst drawActorTypeParticipant = function (elem, actor, conf, isFooter) {\n const actorY = isFooter ? actor.stopy : actor.starty;\n const center = actor.x + actor.width / 2;\n const centerY = actorY + 5;\n\n const boxplusLineGroup = elem.append('g').lower();\n var g = boxplusLineGroup;\n\n if (!isFooter) {\n actorCnt++;\n if (Object.keys(actor.links || {}).length && !conf.forceMenus) {\n g.attr('onclick', popupMenuToggle(`actor${actorCnt}_popup`)).attr('cursor', 'pointer');\n }\n g.append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', centerY)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line 200')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999')\n .attr('name', actor.name);\n\n g = boxplusLineGroup.append('g');\n actor.actorCnt = actorCnt;\n\n if (actor.links != null) {\n g.attr('id', 'root-' + actorCnt);\n }\n }\n\n const rect = svgDrawCommon.getNoteRect();\n var cssclass = 'actor';\n if (actor.properties?.class) {\n cssclass = actor.properties.class;\n } else {\n rect.fill = '#eaeaea';\n }\n if (isFooter) {\n cssclass += ` ${BOTTOM_ACTOR_CLASS}`;\n } else {\n cssclass += ` ${TOP_ACTOR_CLASS}`;\n }\n rect.x = actor.x;\n rect.y = actorY;\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = cssclass;\n rect.rx = 3;\n rect.ry = 3;\n rect.name = actor.name;\n const rectElem = drawRect(g, rect);\n actor.rectData = rect;\n\n if (actor.properties?.icon) {\n const iconSrc = actor.properties.icon.trim();\n if (iconSrc.charAt(0) === '@') {\n svgDrawCommon.drawEmbeddedImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));\n } else {\n svgDrawCommon.drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);\n }\n }\n\n _drawTextCandidateFunc(conf, hasKatex(actor.description))(\n actor.description,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: `actor ${ACTOR_BOX_CLASS}` },\n conf\n );\n\n let height = actor.height;\n if (rectElem.node) {\n const bounds = rectElem.node().getBBox();\n actor.height = bounds.height;\n height = bounds.height;\n }\n\n return height;\n};\n\nconst drawActorTypeActor = function (elem, actor, conf, isFooter) {\n const actorY = isFooter ? actor.stopy : actor.starty;\n const center = actor.x + actor.width / 2;\n const centerY = actorY + 80;\n\n const line = elem.append('g').lower();\n\n if (!isFooter) {\n actorCnt++;\n line\n .append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', centerY)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line 200')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999')\n .attr('name', actor.name);\n\n actor.actorCnt = actorCnt;\n }\n const actElem = elem.append('g');\n let cssClass = ACTOR_MAN_FIGURE_CLASS;\n if (isFooter) {\n cssClass += ` ${BOTTOM_ACTOR_CLASS}`;\n } else {\n cssClass += ` ${TOP_ACTOR_CLASS}`;\n }\n actElem.attr('class', cssClass);\n actElem.attr('name', actor.name);\n\n const rect = svgDrawCommon.getNoteRect();\n rect.x = actor.x;\n rect.y = actorY;\n rect.fill = '#eaeaea';\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = 'actor';\n rect.rx = 3;\n rect.ry = 3;\n\n actElem\n .append('line')\n .attr('id', 'actor-man-torso' + actorCnt)\n .attr('x1', center)\n .attr('y1', actorY + 25)\n .attr('x2', center)\n .attr('y2', actorY + 45);\n\n actElem\n .append('line')\n .attr('id', 'actor-man-arms' + actorCnt)\n .attr('x1', center - ACTOR_TYPE_WIDTH / 2)\n .attr('y1', actorY + 33)\n .attr('x2', center + ACTOR_TYPE_WIDTH / 2)\n .attr('y2', actorY + 33);\n actElem\n .append('line')\n .attr('x1', center - ACTOR_TYPE_WIDTH / 2)\n .attr('y1', actorY + 60)\n .attr('x2', center)\n .attr('y2', actorY + 45);\n actElem\n .append('line')\n .attr('x1', center)\n .attr('y1', actorY + 45)\n .attr('x2', center + ACTOR_TYPE_WIDTH / 2 - 2)\n .attr('y2', actorY + 60);\n\n const circle = actElem.append('circle');\n circle.attr('cx', actor.x + actor.width / 2);\n circle.attr('cy', actorY + 10);\n circle.attr('r', 15);\n circle.attr('width', actor.width);\n circle.attr('height', actor.height);\n\n const bounds = actElem.node().getBBox();\n actor.height = bounds.height;\n\n _drawTextCandidateFunc(conf, hasKatex(actor.description))(\n actor.description,\n actElem,\n rect.x,\n rect.y + 35,\n rect.width,\n rect.height,\n { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },\n conf\n );\n\n return actor.height;\n};\n\nexport const drawActor = async function (elem, actor, conf, isFooter) {\n switch (actor.type) {\n case 'actor':\n return await drawActorTypeActor(elem, actor, conf, isFooter);\n case 'participant':\n return await drawActorTypeParticipant(elem, actor, conf, isFooter);\n }\n};\n\nexport const drawBox = function (elem, box, conf) {\n const boxplusTextGroup = elem.append('g');\n const g = boxplusTextGroup;\n drawBackgroundRect(g, box);\n if (box.name) {\n _drawTextCandidateFunc(conf)(\n box.name,\n g,\n box.x,\n box.y + (box.textMaxHeight || 0) / 2,\n box.width,\n 0,\n { class: 'text' },\n conf\n );\n }\n g.lower();\n};\n\nexport const anchorElement = function (elem) {\n return elem.append('g');\n};\n\n/**\n * Draws an activation in the diagram\n *\n * @param {any} elem - Element to append activation rect.\n * @param {any} bounds - Activation box bounds.\n * @param {any} verticalPos - Precise y coordinate of bottom activation box edge.\n * @param {any} conf - Sequence diagram config object.\n * @param {any} actorActivations - Number of activations on the actor.\n */\nexport const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {\n const rect = svgDrawCommon.getNoteRect();\n const g = bounds.anchored;\n rect.x = bounds.startx;\n rect.y = bounds.starty;\n rect.class = 'activation' + (actorActivations % 3); // Will evaluate to 0, 1 or 2\n rect.width = bounds.stopx - bounds.startx;\n rect.height = verticalPos - bounds.starty;\n drawRect(g, rect);\n};\n\n/**\n * Draws a loop in the diagram\n *\n * @param {any} elem - Element to append the loop to.\n * @param {any} loopModel - LoopModel of the given loop.\n * @param {any} labelText - Text within the loop.\n * @param {any} conf - Diagram configuration\n * @returns {any}\n */\nexport const drawLoop = async function (elem, loopModel, labelText, conf) {\n const {\n boxMargin,\n boxTextMargin,\n labelBoxHeight,\n labelBoxWidth,\n messageFontFamily: fontFamily,\n messageFontSize: fontSize,\n messageFontWeight: fontWeight,\n } = conf;\n const g = elem.append('g');\n const drawLoopLine = function (startx, starty, stopx, stopy) {\n return g\n .append('line')\n .attr('x1', startx)\n .attr('y1', starty)\n .attr('x2', stopx)\n .attr('y2', stopy)\n .attr('class', 'loopLine');\n };\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n if (loopModel.sections !== undefined) {\n loopModel.sections.forEach(function (item) {\n drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(\n 'stroke-dasharray',\n '3, 3'\n );\n });\n }\n\n let txt = svgDrawCommon.getTextObj();\n txt.text = labelText;\n txt.x = loopModel.startx;\n txt.y = loopModel.starty;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.width = labelBoxWidth || 50;\n txt.height = labelBoxHeight || 20;\n txt.textMargin = boxTextMargin;\n txt.class = 'labelText';\n\n drawLabel(g, txt);\n txt = getTextObj();\n txt.text = loopModel.title;\n txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.starty + boxMargin + boxTextMargin;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.textMargin = boxTextMargin;\n txt.class = 'loopText';\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = true;\n\n let textElem = hasKatex(txt.text) ? await drawKatex(g, txt, loopModel) : drawText(g, txt);\n\n if (loopModel.sectionTitles !== undefined) {\n for (const [idx, item] of Object.entries(loopModel.sectionTitles)) {\n if (item.message) {\n txt.text = item.message;\n txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n txt.class = 'loopText';\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = loopModel.wrap;\n\n if (hasKatex(txt.text)) {\n loopModel.starty = loopModel.sections[idx].y;\n await drawKatex(g, txt, loopModel);\n } else {\n drawText(g, txt);\n }\n let sectionHeight = Math.round(\n textElem\n .map((te) => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n }\n }\n }\n\n loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n return g;\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem Diagram (reference for bounds)\n * @param {any} bounds Shape of the rectangle\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n svgDrawCommon.drawBackgroundRect(elem, bounds);\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n 'M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 7.9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto-start-reverse')\n .append('path')\n .attr('d', 'M -1 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 15.5)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertSequenceNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n\n/**\n * Setup cross head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 4)\n .attr('refY', 4.5);\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1pt')\n .attr('d', 'M 1,2 L 6,7 M 6,2 L 1,7');\n // this is actual shape for arrowhead\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: undefined,\n style: '#666',\n width: undefined,\n height: undefined,\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n valign: undefined,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n const [_actorFontSize, _actorFontSizePx] = parseFontSize(actorFontSize);\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * _actorFontSize - (_actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .style('font-size', _actorFontSizePx)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n *\n * @param content\n * @param g\n * @param x\n * @param y\n * @param width\n * @param height\n * @param textAttrs\n * @param conf\n */\n async function byKatex(content, g, x, y, width, height, textAttrs, conf) {\n // TODO duplicate render calls, optimize\n\n const dim = await calculateMathMLDimensions(content, configApi.getConfig());\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x + width / 2 - dim.width / 2)\n .attr('y', y + height / 2 - dim.height / 2)\n .attr('width', dim.width)\n .attr('height', dim.height);\n\n const text = f.append('xhtml:div').style('height', '100%').style('width', '100%');\n\n text\n .append('div')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .html(await renderKatex(content, configApi.getConfig()));\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf, hasKatex = false) {\n if (hasKatex) {\n return byKatex;\n }\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst _drawMenuItemTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x)\n .attr('y', y)\n .style('text-anchor', 'start')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * actorFontSize - (actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x)\n .attr('y', y)\n .style('text-anchor', 'start')\n .style('font-size', actorFontSize)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text.append('tspan').attr('x', x).attr('dy', dy).text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawText,\n drawLabel,\n drawActor,\n drawBox,\n drawPopup,\n anchorElement,\n drawActivation,\n drawLoop,\n drawBackgroundRect,\n insertArrowHead,\n insertArrowFilledHead,\n insertSequenceNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n getTextObj,\n getNoteRect,\n fixLifeLineHeights,\n sanitizeUrl,\n};\n", "// @ts-nocheck TODO: fix file\nimport { select } from 'd3';\nimport svgDraw, { drawKatex, ACTOR_TYPE_WIDTH, drawText, fixLifeLineHeights } from './svgDraw.js';\nimport { log } from '../../logger.js';\nimport common, { calculateMathMLDimensions, hasKatex } from '../common/common.js';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport assignWithDepth from '../../assignWithDepth.js';\nimport utils from '../../utils.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { Diagram } from '../../Diagram.js';\n\nlet conf = {};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n sequenceItems: [],\n activations: [],\n models: {\n getHeight: function () {\n return (\n Math.max.apply(\n null,\n this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0)\n ) +\n (this.loops.length === 0\n ? 0\n : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.messages.length === 0\n ? 0\n : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.notes.length === 0\n ? 0\n : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h))\n );\n },\n clear: function () {\n this.actors = [];\n this.boxes = [];\n this.loops = [];\n this.messages = [];\n this.notes = [];\n },\n addBox: function (boxModel) {\n this.boxes.push(boxModel);\n },\n addActor: function (actorModel) {\n this.actors.push(actorModel);\n },\n addLoop: function (loopModel) {\n this.loops.push(loopModel);\n },\n addMessage: function (msgModel) {\n this.messages.push(msgModel);\n },\n addNote: function (noteModel) {\n this.notes.push(noteModel);\n },\n lastActor: function () {\n return this.actors[this.actors.length - 1];\n },\n lastLoop: function () {\n return this.loops[this.loops.length - 1];\n },\n lastMessage: function () {\n return this.messages[this.messages.length - 1];\n },\n lastNote: function () {\n return this.notes[this.notes.length - 1];\n },\n actors: [],\n boxes: [],\n loops: [],\n messages: [],\n notes: [],\n },\n init: function () {\n this.sequenceItems = [];\n this.activations = [];\n this.models.clear();\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n setConf(getConfig());\n },\n updateVal: function (obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param type - Either `activation` or `undefined` */\n function updateFn(type?: 'activation') {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n this.activations.forEach(updateFn('activation'));\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = common.getMin(startx, stopx);\n const _stopx = common.getMax(startx, stopx);\n const _starty = common.getMin(starty, stopy);\n const _stopy = common.getMax(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n newActivation: function (message, diagram, actors) {\n const actorRect = actors.get(message.from);\n const stackedSize = actorActivations(message.from).length || 0;\n const x = actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n this.activations.push({\n startx: x,\n starty: this.verticalPos + 2,\n stopx: x + conf.activationWidth,\n stopy: undefined,\n actor: message.from,\n anchored: svgDraw.anchorElement(diagram),\n });\n },\n endActivation: function (message) {\n // find most recent activation for given actor\n const lastActorActivationIdx = this.activations\n .map(function (activation) {\n return activation.actor;\n })\n .lastIndexOf(message.from);\n return this.activations.splice(lastActorActivationIdx, 1)[0];\n },\n createLoop: function (title = { message: undefined, wrap: false, width: undefined }, fill) {\n return {\n startx: undefined,\n starty: this.verticalPos,\n stopx: undefined,\n stopy: undefined,\n title: title.message,\n wrap: title.wrap,\n width: title.width,\n height: 0,\n fill: fill,\n };\n },\n newLoop: function (title = { message: undefined, wrap: false, width: undefined }, fill) {\n this.sequenceItems.push(this.createLoop(title, fill));\n },\n endLoop: function () {\n return this.sequenceItems.pop();\n },\n isLoopOverlap: function () {\n return this.sequenceItems.length\n ? this.sequenceItems[this.sequenceItems.length - 1].overlap\n : false;\n },\n addSectionToLoop: function (message) {\n const loop = this.sequenceItems.pop();\n loop.sections = loop.sections || [];\n loop.sectionTitles = loop.sectionTitles || [];\n loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });\n loop.sectionTitles.push(message);\n this.sequenceItems.push(loop);\n },\n saveVerticalPos: function () {\n if (this.isLoopOverlap()) {\n this.savedVerticalPos = this.verticalPos;\n }\n },\n resetVerticalPos: function () {\n if (this.isLoopOverlap()) {\n this.verticalPos = this.savedVerticalPos;\n }\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = common.getMax(this.data.stopy, this.verticalPos);\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return { bounds: this.data, models: this.models };\n },\n};\n\n/** Options for drawing a note in {@link drawNote} */\ninterface NoteModel {\n /** x axis start position */\n startx: number;\n /** y axis position */\n starty: number;\n /** the message to be shown */\n message: string;\n /** Set this with a custom width to override the default configured width. */\n width: number;\n}\n\n/**\n * Draws an note in the diagram with the attached line\n *\n * @param elem - The diagram to draw to.\n * @param noteModel - Note model options.\n */\nconst drawNote = async function (elem: any, noteModel: NoteModel) {\n bounds.bumpVerticalPos(conf.boxMargin);\n noteModel.height = conf.boxMargin;\n noteModel.starty = bounds.getVerticalPos();\n const rect = svgDrawCommon.getNoteRect();\n rect.x = noteModel.startx;\n rect.y = noteModel.starty;\n rect.width = noteModel.width || conf.width;\n rect.class = 'note';\n\n const g = elem.append('g');\n const rectElem = svgDraw.drawRect(g, rect);\n const textObj = svgDrawCommon.getTextObj();\n textObj.x = noteModel.startx;\n textObj.y = noteModel.starty;\n textObj.width = rect.width;\n textObj.dy = '1em';\n textObj.text = noteModel.message;\n textObj.class = 'noteText';\n textObj.fontFamily = conf.noteFontFamily;\n textObj.fontSize = conf.noteFontSize;\n textObj.fontWeight = conf.noteFontWeight;\n textObj.anchor = conf.noteAlign;\n textObj.textMargin = conf.noteMargin;\n textObj.valign = 'center';\n\n const textElem = hasKatex(textObj.text) ? await drawKatex(g, textObj) : drawText(g, textObj);\n\n const textHeight = Math.round(\n textElem\n .map((te) => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n\n rectElem.attr('height', textHeight + 2 * conf.noteMargin);\n noteModel.height += textHeight + 2 * conf.noteMargin;\n bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n noteModel.stopx = noteModel.startx + rect.width;\n bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n bounds.models.addNote(noteModel);\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\nconst noteFont = (cnf) => {\n return {\n fontFamily: cnf.noteFontFamily,\n fontSize: cnf.noteFontSize,\n fontWeight: cnf.noteFontWeight,\n };\n};\nconst actorFont = (cnf) => {\n return {\n fontFamily: cnf.actorFontFamily,\n fontSize: cnf.actorFontSize,\n fontWeight: cnf.actorFontWeight,\n };\n};\n\n/**\n * Process a message by adding its dimensions to the bound. It returns the Y coordinate of the\n * message so it can be drawn later. We do not draw the message at this point so the arrowhead can\n * be on top of the activation box.\n *\n * @param _diagram - The parent of the message element.\n * @param msgModel - The model containing fields describing a message\n * @returns `lineStartY` - The Y coordinate at which the message line starts\n */\nasync function boundMessage(_diagram, msgModel): Promise {\n bounds.bumpVerticalPos(10);\n const { startx, stopx, message } = msgModel;\n const lines = common.splitBreaks(message).length;\n const isKatexMsg = hasKatex(message);\n const textDims = isKatexMsg\n ? await calculateMathMLDimensions(message, getConfig())\n : utils.calculateTextDimensions(message, messageFont(conf));\n\n if (!isKatexMsg) {\n const lineHeight = textDims.height / lines;\n msgModel.height += lineHeight;\n bounds.bumpVerticalPos(lineHeight);\n }\n\n let lineStartY;\n let totalOffset = textDims.height - 10;\n const textWidth = textDims.width;\n\n if (startx === stopx) {\n lineStartY = bounds.getVerticalPos() + totalOffset;\n if (!conf.rightAngles) {\n totalOffset += conf.boxMargin;\n lineStartY = bounds.getVerticalPos() + totalOffset;\n }\n totalOffset += 30;\n const dx = common.getMax(textWidth / 2, conf.width / 2);\n bounds.insert(\n startx - dx,\n bounds.getVerticalPos() - 10 + totalOffset,\n stopx + dx,\n bounds.getVerticalPos() + 30 + totalOffset\n );\n } else {\n totalOffset += conf.boxMargin;\n lineStartY = bounds.getVerticalPos() + totalOffset;\n bounds.insert(startx, lineStartY - 10, stopx, lineStartY);\n }\n bounds.bumpVerticalPos(totalOffset);\n msgModel.height += totalOffset;\n msgModel.stopy = msgModel.starty + msgModel.height;\n bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n\n return lineStartY;\n}\n\n/**\n * Draws a message. Note that the bounds have previously been updated by boundMessage.\n *\n * @param diagram - The parent of the message element\n * @param msgModel - The model containing fields describing a message\n * @param lineStartY - The Y coordinate at which the message line starts\n * @param diagObj - The diagram object.\n */\nconst drawMessage = async function (diagram, msgModel, lineStartY: number, diagObj: Diagram) {\n const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel;\n const textDims = utils.calculateTextDimensions(message, messageFont(conf));\n const textObj = svgDrawCommon.getTextObj();\n textObj.x = startx;\n textObj.y = starty + 10;\n textObj.width = stopx - startx;\n textObj.class = 'messageText';\n textObj.dy = '1em';\n textObj.text = message;\n textObj.fontFamily = conf.messageFontFamily;\n textObj.fontSize = conf.messageFontSize;\n textObj.fontWeight = conf.messageFontWeight;\n textObj.anchor = conf.messageAlign;\n textObj.valign = 'center';\n textObj.textMargin = conf.wrapPadding;\n textObj.tspan = false;\n\n if (hasKatex(textObj.text)) {\n await drawKatex(diagram, textObj, { startx, stopx, starty: lineStartY });\n } else {\n drawText(diagram, textObj);\n }\n\n const textWidth = textDims.width;\n\n let line;\n if (startx === stopx) {\n if (conf.rightAngles) {\n line = diagram\n .append('path')\n .attr(\n 'd',\n `M ${startx},${lineStartY} H ${\n startx + common.getMax(conf.width / 2, textWidth / 2)\n } V ${lineStartY + 25} H ${startx}`\n );\n } else {\n line = diagram\n .append('path')\n .attr(\n 'd',\n 'M ' +\n startx +\n ',' +\n lineStartY +\n ' C ' +\n (startx + 60) +\n ',' +\n (lineStartY - 10) +\n ' ' +\n (startx + 60) +\n ',' +\n (lineStartY + 30) +\n ' ' +\n startx +\n ',' +\n (lineStartY + 20)\n );\n }\n } else {\n line = diagram.append('line');\n line.attr('x1', startx);\n line.attr('y1', lineStartY);\n line.attr('x2', stopx);\n line.attr('y2', lineStartY);\n }\n // Make an SVG Container\n // Draw the line\n if (\n type === diagObj.db.LINETYPE.DOTTED ||\n type === diagObj.db.LINETYPE.DOTTED_CROSS ||\n type === diagObj.db.LINETYPE.DOTTED_POINT ||\n type === diagObj.db.LINETYPE.DOTTED_OPEN ||\n type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED\n ) {\n line.style('stroke-dasharray', '3, 3');\n line.attr('class', 'messageLine1');\n } else {\n line.attr('class', 'messageLine0');\n }\n\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n line.attr('stroke-width', 2);\n line.attr('stroke', 'none'); // handled by theme/css anyway\n line.style('fill', 'none'); // remove any fill colour\n if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (\n type === diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID ||\n type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED\n ) {\n line.attr('marker-start', 'url(' + url + '#arrowhead)');\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) {\n line.attr('marker-end', 'url(' + url + '#filled-head)');\n }\n\n if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) {\n line.attr('marker-end', 'url(' + url + '#crosshead)');\n }\n\n // add node number\n if (sequenceVisible || conf.showSequenceNumbers) {\n line.attr('marker-start', 'url(' + url + '#sequencenumber)');\n diagram\n .append('text')\n .attr('x', startx)\n .attr('y', lineStartY + 4)\n .attr('font-family', 'sans-serif')\n .attr('font-size', '12px')\n .attr('text-anchor', 'middle')\n .attr('class', 'sequenceNumber')\n .text(sequenceIndex);\n }\n};\n\nconst addActorRenderingData = function (\n diagram,\n actors,\n createdActors: Map,\n actorKeys,\n verticalPos,\n messages,\n isFooter\n) {\n let prevWidth = 0;\n let prevMargin = 0;\n let prevBox = undefined;\n let maxHeight = 0;\n\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n const box = actor.box;\n\n // end of box\n if (prevBox && prevBox != box) {\n if (!isFooter) {\n bounds.models.addBox(prevBox);\n }\n prevMargin += conf.boxMargin + prevBox.margin;\n }\n\n // new box\n if (box && box != prevBox) {\n if (!isFooter) {\n box.x = prevWidth + prevMargin;\n box.y = verticalPos;\n }\n prevMargin += box.margin;\n }\n\n // Add some rendering data to the object\n actor.width = actor.width || conf.width;\n actor.height = common.getMax(actor.height || conf.height, conf.height);\n actor.margin = actor.margin || conf.actorMargin;\n\n maxHeight = common.getMax(maxHeight, actor.height);\n\n // if the actor is created by a message, widen margin\n if (createdActors.get(actor.name)) {\n prevMargin += actor.width / 2;\n }\n\n actor.x = prevWidth + prevMargin;\n actor.starty = bounds.getVerticalPos();\n\n bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n\n prevWidth += actor.width + prevMargin;\n if (actor.box) {\n actor.box.width = prevWidth + box.margin - actor.box.x;\n }\n prevMargin = actor.margin;\n prevBox = actor.box;\n bounds.models.addActor(actor);\n }\n\n // end of box\n if (prevBox && !isFooter) {\n bounds.models.addBox(prevBox);\n }\n\n // Add a margin between the actor boxes and the first arrow\n bounds.bumpVerticalPos(maxHeight);\n};\n\nexport const drawActors = async function (diagram, actors, actorKeys, isFooter) {\n if (!isFooter) {\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n // Draw the box with the attached line\n await svgDraw.drawActor(diagram, actor, conf, false);\n }\n } else {\n let maxHeight = 0;\n bounds.bumpVerticalPos(conf.boxMargin * 2);\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n if (!actor.stopy) {\n actor.stopy = bounds.getVerticalPos();\n }\n const height = await svgDraw.drawActor(diagram, actor, conf, true);\n maxHeight = common.getMax(maxHeight, height);\n }\n bounds.bumpVerticalPos(maxHeight + conf.boxMargin);\n }\n};\n\nexport const drawActorsPopup = function (diagram, actors, actorKeys, doc) {\n let maxHeight = 0;\n let maxWidth = 0;\n for (const actorKey of actorKeys) {\n const actor = actors.get(actorKey);\n const minMenuWidth = getRequiredPopupWidth(actor);\n const menuDimensions = svgDraw.drawPopup(\n diagram,\n actor,\n minMenuWidth,\n conf,\n conf.forceMenus,\n doc\n );\n if (menuDimensions.height > maxHeight) {\n maxHeight = menuDimensions.height;\n }\n if (menuDimensions.width + actor.x > maxWidth) {\n maxWidth = menuDimensions.width + actor.x;\n }\n }\n\n return { maxHeight: maxHeight, maxWidth: maxWidth };\n};\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst actorActivations = function (actor) {\n return bounds.activations.filter(function (activation) {\n return activation.actor === actor;\n });\n};\n\nconst activationBounds = function (actor, actors) {\n // handle multiple stacked activations for same actor\n const actorObj = actors.get(actor);\n const activations = actorActivations(actor);\n\n const left = activations.reduce(\n function (acc, activation) {\n return common.getMin(acc, activation.startx);\n },\n actorObj.x + actorObj.width / 2 - 1\n );\n const right = activations.reduce(\n function (acc, activation) {\n return common.getMax(acc, activation.stopx);\n },\n actorObj.x + actorObj.width / 2 + 1\n );\n return [left, right];\n};\n\nfunction adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n bounds.bumpVerticalPos(preMargin);\n let heightAdjust = postMargin;\n if (msg.id && msg.message && loopWidths[msg.id]) {\n const loopWidth = loopWidths[msg.id].width;\n const textConf = messageFont(conf);\n msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);\n msg.width = loopWidth;\n msg.wrap = true;\n\n // const lines = common.splitBreaks(msg.message).length;\n const textDims = utils.calculateTextDimensions(msg.message, textConf);\n const totalOffset = common.getMax(textDims.height, conf.labelBoxHeight);\n heightAdjust = postMargin + totalOffset;\n log.debug(`${totalOffset} - ${msg.message}`);\n }\n addLoopFn(msg);\n bounds.bumpVerticalPos(heightAdjust);\n}\n\n/**\n * Adjust the msgModel and the actor for the rendering in case the latter is created or destroyed by the msg\n * @param msg - the potentially creating or destroying message\n * @param msgModel - the model associated with the message\n * @param lineStartY - the y position of the message line\n * @param index - the index of the current actor under consideration\n * @param actors - the array of all actors\n * @param createdActors - the array of actors created in the diagram\n * @param destroyedActors - the array of actors destroyed in the diagram\n */\nfunction adjustCreatedDestroyedData(\n msg,\n msgModel,\n lineStartY,\n index,\n actors,\n createdActors,\n destroyedActors\n) {\n function receiverAdjustment(actor, adjustment) {\n if (actor.x < actors.get(msg.from).x) {\n bounds.insert(\n msgModel.stopx - adjustment,\n msgModel.starty,\n msgModel.startx,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.stopx = msgModel.stopx + adjustment;\n } else {\n bounds.insert(\n msgModel.startx,\n msgModel.starty,\n msgModel.stopx + adjustment,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.stopx = msgModel.stopx - adjustment;\n }\n }\n\n function senderAdjustment(actor, adjustment) {\n if (actor.x < actors.get(msg.to).x) {\n bounds.insert(\n msgModel.startx - adjustment,\n msgModel.starty,\n msgModel.stopx,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.startx = msgModel.startx + adjustment;\n } else {\n bounds.insert(\n msgModel.stopx,\n msgModel.starty,\n msgModel.startx + adjustment,\n msgModel.stopy + actor.height / 2 + conf.noteMargin\n );\n msgModel.startx = msgModel.startx - adjustment;\n }\n }\n\n // if it is a create message\n if (createdActors.get(msg.to) == index) {\n const actor = actors.get(msg.to);\n const adjustment = actor.type == 'actor' ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;\n receiverAdjustment(actor, adjustment);\n actor.starty = lineStartY - actor.height / 2;\n bounds.bumpVerticalPos(actor.height / 2);\n }\n // if it is a destroy sender message\n else if (destroyedActors.get(msg.from) == index) {\n const actor = actors.get(msg.from);\n if (conf.mirrorActors) {\n const adjustment = actor.type == 'actor' ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2;\n senderAdjustment(actor, adjustment);\n }\n actor.stopy = lineStartY - actor.height / 2;\n bounds.bumpVerticalPos(actor.height / 2);\n }\n // if it is a destroy receiver message\n else if (destroyedActors.get(msg.to) == index) {\n const actor = actors.get(msg.to);\n if (conf.mirrorActors) {\n const adjustment = actor.type == 'actor' ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;\n receiverAdjustment(actor, adjustment);\n }\n actor.stopy = lineStartY - actor.height / 2;\n bounds.bumpVerticalPos(actor.height / 2);\n }\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param _text - The text of the diagram\n * @param id - The id of the diagram which will be used as a DOM element id\u00A8\n * @param _version - Mermaid version from package.json\n * @param diagObj - A standard diagram containing the db and the text and type etc of the diagram\n */\nexport const draw = async function (_text: string, id: string, _version: string, diagObj: Diagram) {\n const { securityLevel, sequence } = getConfig();\n conf = sequence;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n bounds.init();\n log.debug(diagObj.db);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n // Fetch data from the parsing\n const actors = diagObj.db.getActors();\n const createdActors = diagObj.db.getCreatedActors();\n const destroyedActors = diagObj.db.getDestroyedActors();\n const boxes = diagObj.db.getBoxes();\n let actorKeys = diagObj.db.getActorKeys();\n const messages = diagObj.db.getMessages();\n const title = diagObj.db.getDiagramTitle();\n const hasBoxes = diagObj.db.hasAtLeastOneBox();\n const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle();\n const maxMessageWidthPerActor = await getMaxMessageWidthPerActor(actors, messages, diagObj);\n conf.height = await calculateActorMargins(actors, maxMessageWidthPerActor, boxes);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n if (hasBoxes) {\n bounds.bumpVerticalPos(conf.boxMargin);\n if (hasBoxTitles) {\n bounds.bumpVerticalPos(boxes[0].textMaxHeight);\n }\n }\n\n if (conf.hideUnusedParticipants === true) {\n const newActors = new Set();\n messages.forEach((message) => {\n newActors.add(message.from);\n newActors.add(message.to);\n });\n actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey));\n }\n\n addActorRenderingData(diagram, actors, createdActors, actorKeys, 0, messages, false);\n const loopWidths = await calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj);\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n svgDraw.insertSequenceNumber(diagram);\n\n /**\n * @param msg - The message to draw.\n * @param verticalPos - The vertical position of the message.\n */\n function activeEnd(msg: any, verticalPos: number) {\n const activationData = bounds.endActivation(msg);\n if (activationData.starty + 18 > verticalPos) {\n activationData.starty = verticalPos - 6;\n verticalPos += 12;\n }\n svgDraw.drawActivation(\n diagram,\n activationData,\n verticalPos,\n conf,\n actorActivations(msg.from).length\n );\n\n bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n }\n\n // Draw the messages/signals\n let sequenceIndex = 1;\n let sequenceIndexStep = 1;\n const messagesToDraw = [];\n const backgrounds = [];\n let index = 0;\n for (const msg of messages) {\n let loopModel, noteModel, msgModel;\n\n switch (msg.type) {\n case diagObj.db.LINETYPE.NOTE:\n bounds.resetVerticalPos();\n noteModel = msg.noteModel;\n await drawNote(diagram, noteModel);\n break;\n case diagObj.db.LINETYPE.ACTIVE_START:\n bounds.newActivation(msg, diagram, actors);\n break;\n case diagObj.db.LINETYPE.ACTIVE_END:\n activeEnd(msg, bounds.getVerticalPos());\n break;\n case diagObj.db.LINETYPE.LOOP_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.LOOP_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'loop', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.RECT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, (message) =>\n bounds.newLoop(undefined, message.message)\n );\n break;\n case diagObj.db.LINETYPE.RECT_END:\n loopModel = bounds.endLoop();\n backgrounds.push(loopModel);\n bounds.models.addLoop(loopModel);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n break;\n case diagObj.db.LINETYPE.OPT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.OPT_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'opt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.ALT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.ALT_ELSE:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.ALT_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'alt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.PAR_START:\n case diagObj.db.LINETYPE.PAR_OVER_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n bounds.saveVerticalPos();\n break;\n case diagObj.db.LINETYPE.PAR_AND:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.PAR_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'par', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.AUTONUMBER:\n sequenceIndex = msg.message.start || sequenceIndex;\n sequenceIndexStep = msg.message.step || sequenceIndexStep;\n if (msg.message.visible) {\n diagObj.db.enableSequenceNumbers();\n } else {\n diagObj.db.disableSequenceNumbers();\n }\n break;\n case diagObj.db.LINETYPE.CRITICAL_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.CRITICAL_OPTION:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.CRITICAL_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'critical', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.BREAK_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.BREAK_END:\n loopModel = bounds.endLoop();\n await svgDraw.drawLoop(diagram, loopModel, 'break', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n default:\n try {\n msgModel = msg.msgModel;\n msgModel.starty = bounds.getVerticalPos();\n msgModel.sequenceIndex = sequenceIndex;\n msgModel.sequenceVisible = diagObj.db.showSequenceNumbers();\n const lineStartY = await boundMessage(diagram, msgModel);\n adjustCreatedDestroyedData(\n msg,\n msgModel,\n lineStartY,\n index,\n actors,\n createdActors,\n destroyedActors\n );\n messagesToDraw.push({ messageModel: msgModel, lineStartY: lineStartY });\n bounds.models.addMessage(msgModel);\n } catch (e) {\n log.error('error while drawing message', e);\n }\n }\n\n // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)\n if (\n [\n diagObj.db.LINETYPE.SOLID_OPEN,\n diagObj.db.LINETYPE.DOTTED_OPEN,\n diagObj.db.LINETYPE.SOLID,\n diagObj.db.LINETYPE.DOTTED,\n diagObj.db.LINETYPE.SOLID_CROSS,\n diagObj.db.LINETYPE.DOTTED_CROSS,\n diagObj.db.LINETYPE.SOLID_POINT,\n diagObj.db.LINETYPE.DOTTED_POINT,\n diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID,\n diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED,\n ].includes(msg.type)\n ) {\n sequenceIndex = sequenceIndex + sequenceIndexStep;\n }\n index++;\n }\n\n log.debug('createdActors', createdActors);\n log.debug('destroyedActors', destroyedActors);\n await drawActors(diagram, actors, actorKeys, false);\n\n for (const e of messagesToDraw) {\n await drawMessage(diagram, e.messageModel, e.lineStartY, diagObj);\n }\n if (conf.mirrorActors) {\n await drawActors(diagram, actors, actorKeys, true);\n }\n backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram, e));\n fixLifeLineHeights(diagram, actors, actorKeys, conf);\n\n for (const box of bounds.models.boxes) {\n box.height = bounds.getVerticalPos() - box.y;\n bounds.insert(box.x, box.y, box.x + box.width, box.height);\n box.startx = box.x;\n box.starty = box.y;\n box.stopx = box.startx + box.width;\n box.stopy = box.starty + box.height;\n box.stroke = 'rgb(0,0,0, 0.5)';\n svgDraw.drawBox(diagram, box, conf);\n }\n\n if (hasBoxes) {\n bounds.bumpVerticalPos(conf.boxMargin);\n }\n\n // only draw popups for the top row of actors.\n const requiredBoxSize = drawActorsPopup(diagram, actors, actorKeys, doc);\n\n const { bounds: box } = bounds.getBounds();\n\n if (box.startx === undefined) {\n box.startx = 0;\n }\n if (box.starty === undefined) {\n box.starty = 0;\n }\n if (box.stopx === undefined) {\n box.stopx = 0;\n }\n if (box.stopy === undefined) {\n box.stopy = 0;\n }\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n if (boxHeight < requiredBoxSize.maxHeight) {\n boxHeight = requiredBoxSize.maxHeight;\n }\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n if (conf.mirrorActors) {\n height = height - conf.boxMargin + conf.bottomMarginAdj;\n }\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n if (boxWidth < requiredBoxSize.maxWidth) {\n boxWidth = requiredBoxSize.maxWidth;\n }\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX)\n .attr('y', -25);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 40 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n log.debug(`models:`, bounds.models);\n};\n\n/**\n * Retrieves the max message width of each actor, supports signals (messages, loops) and notes.\n *\n * It will enumerate each given message, and will determine its text width, in relation to the actor\n * it originates from, and destined to.\n *\n * @param actors - The actors map\n * @param messages - A list of message objects to iterate\n * @param diagObj - The diagram object.\n * @returns The max message width of each actor.\n */\nasync function getMaxMessageWidthPerActor(\n actors: Map,\n messages: any[],\n diagObj: Diagram\n): Promise> {\n const maxMessageWidthPerActor = {};\n\n for (const msg of messages) {\n if (actors.get(msg.to) && actors.get(msg.from)) {\n const actor = actors.get(msg.to);\n\n // If this is the first actor, and the message is left of it, no need to calculate the margin\n if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) {\n continue;\n }\n\n // If this is the last actor, and the message is right of it, no need to calculate the margin\n if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) {\n continue;\n }\n\n const isNote = msg.placement !== undefined;\n const isMessage = !isNote;\n\n const textFont = isNote ? noteFont(conf) : messageFont(conf);\n const wrappedMessage = msg.wrap\n ? utils.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont)\n : msg.message;\n const messageDimensions = hasKatex(wrappedMessage)\n ? await calculateMathMLDimensions(msg.message, getConfig())\n : utils.calculateTextDimensions(wrappedMessage, textFont);\n const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n\n /*\n * The following scenarios should be supported:\n *\n * - There's a message (non-note) between fromActor and toActor\n * - If fromActor is on the right and toActor is on the left, we should\n * define the toActor's margin\n * - If fromActor is on the left and toActor is on the right, we should\n * define the fromActor's margin\n * - There's a note, in which case fromActor == toActor\n * - If the note is to the left of the actor, we should define the previous actor\n * margin\n * - If the note is on the actor, we should define both the previous and next actor\n * margins, each being the half of the note size\n * - If the note is on the right of the actor, we should define the current actor\n * margin\n */\n if (isMessage && msg.from === actor.nextActor) {\n maxMessageWidthPerActor[msg.to] = common.getMax(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === actor.prevActor) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === msg.to) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n\n maxMessageWidthPerActor[msg.to] = common.getMax(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth / 2\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n maxMessageWidthPerActor[actor.prevActor] = common.getMax(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.OVER) {\n if (actor.prevActor) {\n maxMessageWidthPerActor[actor.prevActor] = common.getMax(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth / 2\n );\n }\n\n if (actor.nextActor) {\n maxMessageWidthPerActor[msg.from] = common.getMax(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n }\n }\n }\n }\n\n log.debug('maxMessageWidthPerActor:', maxMessageWidthPerActor);\n return maxMessageWidthPerActor;\n}\n\nconst getRequiredPopupWidth = function (actor) {\n let requiredPopupWidth = 0;\n const textFont = actorFont(conf);\n for (const key in actor.links) {\n const labelDimensions = utils.calculateTextDimensions(key, textFont);\n const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;\n if (requiredPopupWidth < labelWidth) {\n requiredPopupWidth = labelWidth;\n }\n }\n\n return requiredPopupWidth;\n};\n\n/**\n * This will calculate the optimal margin for each given actor,\n * for a given actor \u2192 messageWidth map.\n *\n * An actor's margin is determined by the width of the actor, the width of the largest message that\n * originates from it, and the configured conf.actorMargin.\n *\n * @param actors - The actors map to calculate margins for\n * @param actorToMessageWidth - A map of actor key \u2192 max message width it holds\n * @param boxes - The boxes around the actors if any\n */\nasync function calculateActorMargins(\n actors: Map,\n actorToMessageWidth: Awaited>,\n boxes\n) {\n let maxHeight = 0;\n for (const prop of actors.keys()) {\n const actor = actors.get(prop);\n if (actor.wrap) {\n actor.description = utils.wrapLabel(\n actor.description,\n conf.width - 2 * conf.wrapPadding,\n actorFont(conf)\n );\n }\n const actDims = hasKatex(actor.description)\n ? await calculateMathMLDimensions(actor.description, getConfig())\n : utils.calculateTextDimensions(actor.description, actorFont(conf));\n\n actor.width = actor.wrap\n ? conf.width\n : common.getMax(conf.width, actDims.width + 2 * conf.wrapPadding);\n\n actor.height = actor.wrap ? common.getMax(actDims.height, conf.height) : conf.height;\n maxHeight = common.getMax(maxHeight, actor.height);\n }\n\n for (const actorKey in actorToMessageWidth) {\n const actor = actors.get(actorKey);\n\n if (!actor) {\n continue;\n }\n\n const nextActor = actors.get(actor.nextActor);\n\n // No need to space out an actor that doesn't have a next link\n if (!nextActor) {\n const messageWidth = actorToMessageWidth[actorKey];\n const actorWidth = messageWidth + conf.actorMargin - actor.width / 2;\n actor.margin = common.getMax(actorWidth, conf.actorMargin);\n continue;\n }\n\n const messageWidth = actorToMessageWidth[actorKey];\n const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n\n actor.margin = common.getMax(actorWidth, conf.actorMargin);\n }\n\n let maxBoxHeight = 0;\n boxes.forEach((box) => {\n const textFont = messageFont(conf);\n let totalWidth = box.actorKeys.reduce((total, aKey) => {\n return (total += actors.get(aKey).width + (actors.get(aKey).margin || 0));\n }, 0);\n\n totalWidth -= 2 * conf.boxTextMargin;\n if (box.wrap) {\n box.name = utils.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont);\n }\n\n const boxMsgDimensions = utils.calculateTextDimensions(box.name, textFont);\n maxBoxHeight = common.getMax(boxMsgDimensions.height, maxBoxHeight);\n const minWidth = common.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding);\n box.margin = conf.boxTextMargin;\n if (totalWidth < minWidth) {\n const missing = (minWidth - totalWidth) / 2;\n box.margin += missing;\n }\n });\n boxes.forEach((box) => (box.textMaxHeight = maxBoxHeight));\n\n return common.getMax(maxHeight, conf.height);\n}\n\nconst buildNoteModel = async function (msg, actors, diagObj) {\n const fromActor = actors.get(msg.from);\n const toActor = actors.get(msg.to);\n const startx = fromActor.x;\n const stopx = toActor.x;\n const shouldWrap = msg.wrap && msg.message;\n\n let textDimensions: { width: number; height: number; lineHeight?: number } = hasKatex(msg.message)\n ? await calculateMathMLDimensions(msg.message, getConfig())\n : utils.calculateTextDimensions(\n shouldWrap ? utils.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message,\n noteFont(conf)\n );\n const noteModel = {\n width: shouldWrap\n ? conf.width\n : common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin),\n height: 0,\n startx: fromActor.x,\n stopx: 0,\n starty: 0,\n stopy: 0,\n message: msg.message,\n };\n if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n noteModel.width = shouldWrap\n ? common.getMax(conf.width, textDimensions.width)\n : common.getMax(\n fromActor.width / 2 + toActor.width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx + (fromActor.width + conf.actorMargin) / 2;\n } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n noteModel.width = shouldWrap\n ? common.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin)\n : common.getMax(\n fromActor.width / 2 + toActor.width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx - noteModel.width + (fromActor.width - conf.actorMargin) / 2;\n } else if (msg.to === msg.from) {\n textDimensions = utils.calculateTextDimensions(\n shouldWrap\n ? utils.wrapLabel(msg.message, common.getMax(conf.width, fromActor.width), noteFont(conf))\n : msg.message,\n noteFont(conf)\n );\n noteModel.width = shouldWrap\n ? common.getMax(conf.width, fromActor.width)\n : common.getMax(fromActor.width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx + (fromActor.width - noteModel.width) / 2;\n } else {\n noteModel.width =\n Math.abs(startx + fromActor.width / 2 - (stopx + toActor.width / 2)) + conf.actorMargin;\n noteModel.startx =\n startx < stopx\n ? startx + fromActor.width / 2 - conf.actorMargin / 2\n : stopx + toActor.width / 2 - conf.actorMargin / 2;\n }\n if (shouldWrap) {\n noteModel.message = utils.wrapLabel(\n msg.message,\n noteModel.width - 2 * conf.wrapPadding,\n noteFont(conf)\n );\n }\n log.debug(\n `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`\n );\n return noteModel;\n};\n\nconst buildMessageModel = function (msg, actors, diagObj) {\n if (\n ![\n diagObj.db.LINETYPE.SOLID_OPEN,\n diagObj.db.LINETYPE.DOTTED_OPEN,\n diagObj.db.LINETYPE.SOLID,\n diagObj.db.LINETYPE.DOTTED,\n diagObj.db.LINETYPE.SOLID_CROSS,\n diagObj.db.LINETYPE.DOTTED_CROSS,\n diagObj.db.LINETYPE.SOLID_POINT,\n diagObj.db.LINETYPE.DOTTED_POINT,\n diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID,\n diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED,\n ].includes(msg.type)\n ) {\n return {};\n }\n const [fromLeft, fromRight] = activationBounds(msg.from, actors);\n const [toLeft, toRight] = activationBounds(msg.to, actors);\n const isArrowToRight = fromLeft <= toLeft;\n let startx = isArrowToRight ? fromRight : fromLeft;\n let stopx = isArrowToRight ? toLeft : toRight;\n\n // As the line width is considered, the left and right values will be off by 2.\n const isArrowToActivation = Math.abs(toLeft - toRight) > 2;\n\n /**\n * Adjust the value based on the arrow direction\n * @param value - The value to adjust\n * @returns The adjustment with correct sign to be added to the actual value.\n */\n const adjustValue = (value: number) => {\n return isArrowToRight ? -value : value;\n };\n\n if (msg.from === msg.to) {\n // This is a self reference, so we need to make sure the arrow is drawn correctly\n // There are many checks in the downstream rendering that checks for equality.\n // The lines on loops will be off by few pixels, but that's fine for now.\n stopx = startx;\n } else {\n /**\n * This is an edge case for the first activation.\n * Proper fix would require significant changes.\n * So, we set an activate flag in the message, and cross check that with isToActivation\n * In cases where the message is to an activation that was properly detected, we don't want to move the arrow head\n * The activation will not be detected on the first message, so we need to move the arrow head\n */\n if (msg.activate && !isArrowToActivation) {\n stopx += adjustValue(conf.activationWidth / 2 - 1);\n }\n\n /**\n * Shorten the length of arrow at the end and move the marker forward (using refX) to have a clean arrowhead\n * This is not required for open arrows that don't have arrowheads\n */\n if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) {\n stopx += adjustValue(3);\n }\n\n /**\n * Shorten start position of bidirectional arrow to accommodate for second arrowhead\n */\n if (\n [diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID, diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(\n msg.type\n )\n ) {\n startx -= adjustValue(3);\n }\n }\n\n const allBounds = [fromLeft, fromRight, toLeft, toRight];\n const boundedWidth = Math.abs(startx - stopx);\n if (msg.wrap && msg.message) {\n msg.message = utils.wrapLabel(\n msg.message,\n common.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width),\n messageFont(conf)\n );\n }\n const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf));\n\n return {\n width: common.getMax(\n msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,\n boundedWidth + 2 * conf.wrapPadding,\n conf.width\n ),\n height: 0,\n startx,\n stopx,\n starty: 0,\n stopy: 0,\n message: msg.message,\n type: msg.type,\n wrap: msg.wrap,\n fromBounds: Math.min.apply(null, allBounds),\n toBounds: Math.max.apply(null, allBounds),\n };\n};\n\nconst calculateLoopBounds = async function (messages, actors, _maxWidthPerActor, diagObj) {\n const loops = {};\n const stack = [];\n let current, noteModel, msgModel;\n\n for (const msg of messages) {\n msg.id = utils.random({ length: 10 });\n switch (msg.type) {\n case diagObj.db.LINETYPE.LOOP_START:\n case diagObj.db.LINETYPE.ALT_START:\n case diagObj.db.LINETYPE.OPT_START:\n case diagObj.db.LINETYPE.PAR_START:\n case diagObj.db.LINETYPE.PAR_OVER_START:\n case diagObj.db.LINETYPE.CRITICAL_START:\n case diagObj.db.LINETYPE.BREAK_START:\n stack.push({\n id: msg.id,\n msg: msg.message,\n from: Number.MAX_SAFE_INTEGER,\n to: Number.MIN_SAFE_INTEGER,\n width: 0,\n });\n break;\n case diagObj.db.LINETYPE.ALT_ELSE:\n case diagObj.db.LINETYPE.PAR_AND:\n case diagObj.db.LINETYPE.CRITICAL_OPTION:\n if (msg.message) {\n current = stack.pop();\n loops[current.id] = current;\n loops[msg.id] = current;\n stack.push(current);\n }\n break;\n case diagObj.db.LINETYPE.LOOP_END:\n case diagObj.db.LINETYPE.ALT_END:\n case diagObj.db.LINETYPE.OPT_END:\n case diagObj.db.LINETYPE.PAR_END:\n case diagObj.db.LINETYPE.CRITICAL_END:\n case diagObj.db.LINETYPE.BREAK_END:\n current = stack.pop();\n loops[current.id] = current;\n break;\n case diagObj.db.LINETYPE.ACTIVE_START:\n {\n const actorRect = actors.get(msg.from ? msg.from : msg.to.actor);\n const stackedSize = actorActivations(msg.from ? msg.from : msg.to.actor).length;\n const x =\n actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n const toAdd = {\n startx: x,\n stopx: x + conf.activationWidth,\n actor: msg.from,\n enabled: true,\n };\n bounds.activations.push(toAdd);\n }\n break;\n case diagObj.db.LINETYPE.ACTIVE_END:\n {\n const lastActorActivationIdx = bounds.activations\n .map((a) => a.actor)\n .lastIndexOf(msg.from);\n bounds.activations.splice(lastActorActivationIdx, 1).splice(0, 1);\n }\n break;\n }\n const isNote = msg.placement !== undefined;\n if (isNote) {\n noteModel = await buildNoteModel(msg, actors, diagObj);\n msg.noteModel = noteModel;\n stack.forEach((stk) => {\n current = stk;\n current.from = common.getMin(current.from, noteModel.startx);\n current.to = common.getMax(current.to, noteModel.startx + noteModel.width);\n current.width =\n common.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n });\n } else {\n msgModel = buildMessageModel(msg, actors, diagObj);\n msg.msgModel = msgModel;\n if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n stack.forEach((stk) => {\n current = stk;\n if (msgModel.startx === msgModel.stopx) {\n const from = actors.get(msg.from);\n const to = actors.get(msg.to);\n current.from = common.getMin(\n from.x - msgModel.width / 2,\n from.x - from.width / 2,\n current.from\n );\n current.to = common.getMax(\n to.x + msgModel.width / 2,\n to.x + from.width / 2,\n current.to\n );\n current.width =\n common.getMax(current.width, Math.abs(current.to - current.from)) -\n conf.labelBoxWidth;\n } else {\n current.from = common.getMin(msgModel.startx, current.from);\n current.to = common.getMax(msgModel.stopx, current.to);\n current.width = common.getMax(current.width, msgModel.width) - conf.labelBoxWidth;\n }\n });\n }\n }\n }\n bounds.activations = [];\n log.debug('Loop type widths:', loops);\n return loops;\n};\n\nexport default {\n bounds,\n drawActors,\n drawActorsPopup,\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/sequenceDiagram.jison';\nimport db from './sequenceDb.js';\nimport styles from './styles.js';\nimport renderer from './sequenceRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: ({ wrap }) => {\n db.setWrap(wrap);\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,17],$V1=[1,18],$V2=[1,19],$V3=[1,39],$V4=[1,40],$V5=[1,25],$V6=[1,23],$V7=[1,24],$V8=[1,31],$V9=[1,32],$Va=[1,33],$Vb=[1,34],$Vc=[1,35],$Vd=[1,36],$Ve=[1,26],$Vf=[1,27],$Vg=[1,28],$Vh=[1,29],$Vi=[1,43],$Vj=[1,30],$Vk=[1,42],$Vl=[1,44],$Vm=[1,41],$Vn=[1,45],$Vo=[1,9],$Vp=[1,8,9],$Vq=[1,56],$Vr=[1,57],$Vs=[1,58],$Vt=[1,59],$Vu=[1,60],$Vv=[1,61],$Vw=[1,62],$Vx=[1,8,9,39],$Vy=[1,74],$Vz=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],$VA=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],$VB=[13,74,80,95,97,98],$VC=[13,64,65,74,80,95,97,98],$VD=[13,59,60,61,62,63,74,80,95,97,98],$VE=[1,93],$VF=[1,110],$VG=[1,108],$VH=[1,102],$VI=[1,103],$VJ=[1,104],$VK=[1,105],$VL=[1,106],$VM=[1,107],$VN=[1,109],$VO=[1,8,9,37,39,42],$VP=[1,8,9,21],$VQ=[1,8,9,78],$VR=[1,8,9,21,73,74,78,80,81,82,83,84,85];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"statements\":5,\"graphConfig\":6,\"CLASS_DIAGRAM\":7,\"NEWLINE\":8,\"EOF\":9,\"statement\":10,\"classLabel\":11,\"SQS\":12,\"STR\":13,\"SQE\":14,\"namespaceName\":15,\"alphaNumToken\":16,\"className\":17,\"classLiteralName\":18,\"GENERICTYPE\":19,\"relationStatement\":20,\"LABEL\":21,\"namespaceStatement\":22,\"classStatement\":23,\"memberStatement\":24,\"annotationStatement\":25,\"clickStatement\":26,\"styleStatement\":27,\"cssClassStatement\":28,\"noteStatement\":29,\"direction\":30,\"acc_title\":31,\"acc_title_value\":32,\"acc_descr\":33,\"acc_descr_value\":34,\"acc_descr_multiline_value\":35,\"namespaceIdentifier\":36,\"STRUCT_START\":37,\"classStatements\":38,\"STRUCT_STOP\":39,\"NAMESPACE\":40,\"classIdentifier\":41,\"STYLE_SEPARATOR\":42,\"members\":43,\"CLASS\":44,\"ANNOTATION_START\":45,\"ANNOTATION_END\":46,\"MEMBER\":47,\"SEPARATOR\":48,\"relation\":49,\"NOTE_FOR\":50,\"noteText\":51,\"NOTE\":52,\"direction_tb\":53,\"direction_bt\":54,\"direction_rl\":55,\"direction_lr\":56,\"relationType\":57,\"lineType\":58,\"AGGREGATION\":59,\"EXTENSION\":60,\"COMPOSITION\":61,\"DEPENDENCY\":62,\"LOLLIPOP\":63,\"LINE\":64,\"DOTTED_LINE\":65,\"CALLBACK\":66,\"LINK\":67,\"LINK_TARGET\":68,\"CLICK\":69,\"CALLBACK_NAME\":70,\"CALLBACK_ARGS\":71,\"HREF\":72,\"STYLE\":73,\"ALPHA\":74,\"stylesOpt\":75,\"CSSCLASS\":76,\"style\":77,\"COMMA\":78,\"styleComponent\":79,\"NUM\":80,\"COLON\":81,\"UNIT\":82,\"SPACE\":83,\"BRKT\":84,\"PCT\":85,\"commentToken\":86,\"textToken\":87,\"graphCodeTokens\":88,\"textNoTagsToken\":89,\"TAGSTART\":90,\"TAGEND\":91,\"==\":92,\"--\":93,\"DEFAULT\":94,\"MINUS\":95,\"keywords\":96,\"UNICODE_TEXT\":97,\"BQUOTE_STR\":98,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",7:\"CLASS_DIAGRAM\",8:\"NEWLINE\",9:\"EOF\",12:\"SQS\",13:\"STR\",14:\"SQE\",19:\"GENERICTYPE\",21:\"LABEL\",31:\"acc_title\",32:\"acc_title_value\",33:\"acc_descr\",34:\"acc_descr_value\",35:\"acc_descr_multiline_value\",37:\"STRUCT_START\",39:\"STRUCT_STOP\",40:\"NAMESPACE\",42:\"STYLE_SEPARATOR\",44:\"CLASS\",45:\"ANNOTATION_START\",46:\"ANNOTATION_END\",47:\"MEMBER\",48:\"SEPARATOR\",50:\"NOTE_FOR\",52:\"NOTE\",53:\"direction_tb\",54:\"direction_bt\",55:\"direction_rl\",56:\"direction_lr\",59:\"AGGREGATION\",60:\"EXTENSION\",61:\"COMPOSITION\",62:\"DEPENDENCY\",63:\"LOLLIPOP\",64:\"LINE\",65:\"DOTTED_LINE\",66:\"CALLBACK\",67:\"LINK\",68:\"LINK_TARGET\",69:\"CLICK\",70:\"CALLBACK_NAME\",71:\"CALLBACK_ARGS\",72:\"HREF\",73:\"STYLE\",74:\"ALPHA\",76:\"CSSCLASS\",78:\"COMMA\",80:\"NUM\",81:\"COLON\",82:\"UNIT\",83:\"SPACE\",84:\"BRKT\",85:\"PCT\",88:\"graphCodeTokens\",90:\"TAGSTART\",91:\"TAGEND\",92:\"==\",93:\"--\",94:\"DEFAULT\",95:\"MINUS\",96:\"keywords\",97:\"UNICODE_TEXT\",98:\"BQUOTE_STR\"},\nproductions_: [0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 8:\n this.$=$$[$0-1]; \nbreak;\ncase 9: case 11: case 12:\n this.$=$$[$0]; \nbreak;\ncase 10: case 13:\n this.$=$$[$0-1]+$$[$0]; \nbreak;\ncase 14: case 15:\n this.$=$$[$0-1]+'~'+$$[$0]+'~'; \nbreak;\ncase 16:\n yy.addRelation($$[$0]); \nbreak;\ncase 17:\n $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]); \nbreak;\ncase 27:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 28: case 29:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 30:\nyy.addClassesToNamespace($$[$0-3], $$[$0-1]);\nbreak;\ncase 31:\nyy.addClassesToNamespace($$[$0-4], $$[$0-1]);\nbreak;\ncase 32:\nthis.$=$$[$0]; yy.addNamespace($$[$0]);\nbreak;\ncase 33:\nthis.$=[$$[$0]]\nbreak;\ncase 34:\nthis.$=[$$[$0-1]]\nbreak;\ncase 35:\n$$[$0].unshift($$[$0-2]); this.$=$$[$0]\nbreak;\ncase 37:\nyy.setCssClass($$[$0-2], $$[$0]);\nbreak;\ncase 38:\nyy.addMembers($$[$0-3],$$[$0-1]);\nbreak;\ncase 39:\nyy.setCssClass($$[$0-5], $$[$0-3]);yy.addMembers($$[$0-5],$$[$0-1]);\nbreak;\ncase 40:\nthis.$=$$[$0]; yy.addClass($$[$0]);\nbreak;\ncase 41:\nthis.$=$$[$0-1]; yy.addClass($$[$0-1]);yy.setClassLabel($$[$0-1], $$[$0]);\nbreak;\ncase 42:\n yy.addAnnotation($$[$0],$$[$0-2]); \nbreak;\ncase 43:\n this.$ = [$$[$0]]; \nbreak;\ncase 44:\n $$[$0].push($$[$0-1]);this.$=$$[$0];\nbreak;\ncase 45:\n/*console.log('Rel found',$$[$0]);*/\nbreak;\ncase 46:\nyy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));\nbreak;\ncase 47:\n/*console.warn('Member',$$[$0]);*/\nbreak;\ncase 48:\n/*console.log('sep found',$$[$0]);*/\nbreak;\ncase 49:\n this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'}; \nbreak;\ncase 50:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}\nbreak;\ncase 51:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]}; \nbreak;\ncase 52:\n this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]} \nbreak;\ncase 53:\n yy.addNote($$[$0], $$[$0-1]); \nbreak;\ncase 54:\n yy.addNote($$[$0]); \nbreak;\ncase 55:\n yy.setDirection('TB');\nbreak;\ncase 56:\n yy.setDirection('BT');\nbreak;\ncase 57:\n yy.setDirection('RL');\nbreak;\ncase 58:\n yy.setDirection('LR');\nbreak;\ncase 59:\n this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 60:\n this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 61:\n this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]}; \nbreak;\ncase 62:\n this.$={type1:'none',type2:'none',lineType:$$[$0]}; \nbreak;\ncase 63:\n this.$=yy.relationType.AGGREGATION;\nbreak;\ncase 64:\n this.$=yy.relationType.EXTENSION;\nbreak;\ncase 65:\n this.$=yy.relationType.COMPOSITION;\nbreak;\ncase 66:\n this.$=yy.relationType.DEPENDENCY;\nbreak;\ncase 67:\n this.$=yy.relationType.LOLLIPOP;\nbreak;\ncase 68:\nthis.$=yy.lineType.LINE;\nbreak;\ncase 69:\nthis.$=yy.lineType.DOTTED_LINE;\nbreak;\ncase 70: case 76:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 71: case 77:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 72:\nthis.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 73:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1],$$[$0]);\nbreak;\ncase 74:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 75:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-3], $$[$0-1]);\nbreak;\ncase 78:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 79:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 80:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0]);\nbreak;\ncase 81:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-1], $$[$0]);\nbreak;\ncase 82:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 83:\nthis.$ = $$[$0-5];yy.setLink($$[$0-4], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-4], $$[$0-1]);\nbreak;\ncase 84:\nthis.$ = $$[$0-2];yy.setCssStyle($$[$0-1],$$[$0]);\nbreak;\ncase 85:\nyy.setCssClass($$[$0-1], $$[$0]);\nbreak;\ncase 86:\nthis.$ = [$$[$0]]\nbreak;\ncase 87:\n$$[$0-2].push($$[$0]);this.$ = $$[$0-2];\nbreak;\ncase 89:\nthis.$ = $$[$0-1] + $$[$0];\nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:$V0,33:$V1,35:$V2,36:21,40:$V3,41:22,44:$V4,45:$V5,47:$V6,48:$V7,50:$V8,52:$V9,53:$Va,54:$Vb,55:$Vc,56:$Vd,66:$Ve,67:$Vf,69:$Vg,73:$Vh,74:$Vi,76:$Vj,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},o($Vo,[2,5],{8:[1,46]}),{8:[1,47]},o($Vp,[2,16],{21:[1,48]}),o($Vp,[2,18]),o($Vp,[2,19]),o($Vp,[2,20]),o($Vp,[2,21]),o($Vp,[2,22]),o($Vp,[2,23]),o($Vp,[2,24]),o($Vp,[2,25]),o($Vp,[2,26]),{32:[1,49]},{34:[1,50]},o($Vp,[2,29]),o($Vp,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:$Vq,60:$Vr,61:$Vs,62:$Vt,63:$Vu,64:$Vv,65:$Vw}),{37:[1,63]},o($Vx,[2,36],{37:[1,65],42:[1,64]}),o($Vp,[2,47]),o($Vp,[2,48]),{16:66,74:$Vi,80:$Vk,95:$Vl,97:$Vm},{16:37,17:67,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{16:37,17:68,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{16:37,17:69,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{13:$Vy,51:73},o($Vp,[2,55]),o($Vp,[2,56]),o($Vp,[2,57]),o($Vp,[2,58]),o($Vz,[2,11],{16:37,18:38,17:75,19:[1,76],74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn}),o($Vz,[2,12],{19:[1,77]}),{15:78,16:79,74:$Vi,80:$Vk,95:$Vl,97:$Vm},{16:37,17:80,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},o($VA,[2,112]),o($VA,[2,113]),o($VA,[2,114]),o($VA,[2,115]),o([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),o($Vo,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:$V0,33:$V1,35:$V2,40:$V3,44:$V4,45:$V5,47:$V6,48:$V7,50:$V8,52:$V9,53:$Va,54:$Vb,55:$Vc,56:$Vd,66:$Ve,67:$Vf,69:$Vg,73:$Vh,74:$Vi,76:$Vj,80:$Vk,95:$Vl,97:$Vm,98:$Vn}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:$V0,33:$V1,35:$V2,36:21,40:$V3,41:22,44:$V4,45:$V5,47:$V6,48:$V7,50:$V8,52:$V9,53:$Va,54:$Vb,55:$Vc,56:$Vd,66:$Ve,67:$Vf,69:$Vg,73:$Vh,74:$Vi,76:$Vj,80:$Vk,95:$Vl,97:$Vm,98:$Vn},o($Vp,[2,17]),o($Vp,[2,27]),o($Vp,[2,28]),{13:[1,84],16:37,17:83,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{49:85,57:54,58:55,59:$Vq,60:$Vr,61:$Vs,62:$Vt,63:$Vu,64:$Vv,65:$Vw},o($Vp,[2,46]),{58:86,64:$Vv,65:$Vw},o($VB,[2,62],{57:87,59:$Vq,60:$Vr,61:$Vs,62:$Vt,63:$Vu}),o($VC,[2,63]),o($VC,[2,64]),o($VC,[2,65]),o($VC,[2,66]),o($VC,[2,67]),o($VD,[2,68]),o($VD,[2,69]),{8:[1,89],23:90,38:88,41:22,44:$V4},{16:91,74:$Vi,80:$Vk,95:$Vl,97:$Vm},{43:92,47:$VE},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:$VF,73:$VG,74:$VH,75:99,77:100,79:101,80:$VI,81:$VJ,82:$VK,83:$VL,84:$VM,85:$VN},{74:[1,111]},{13:$Vy,51:112},o($Vp,[2,54]),o($Vp,[2,117]),o($Vz,[2,13]),o($Vz,[2,14]),o($Vz,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:$Vi,80:$Vk,95:$Vl,97:$Vm},o($VO,[2,40],{11:114,12:[1,115]}),o($Vo,[2,7]),{9:[1,116]},o($VP,[2,49]),{16:37,17:117,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},{13:[1,119],16:37,17:118,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},o($VB,[2,61],{57:120,59:$Vq,60:$Vr,61:$Vs,62:$Vt,63:$Vu}),o($VB,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:$V4},{8:[1,123],39:[2,33]},o($Vx,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:$VE},{16:37,17:127,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},o($Vp,[2,70],{13:[1,128]}),o($Vp,[2,72],{13:[1,130],68:[1,129]}),o($Vp,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},o($Vp,[2,84],{78:[1,134]}),o($VQ,[2,86],{79:135,21:$VF,73:$VG,74:$VH,80:$VI,81:$VJ,82:$VK,83:$VL,84:$VM,85:$VN}),o($VR,[2,88]),o($VR,[2,90]),o($VR,[2,91]),o($VR,[2,92]),o($VR,[2,93]),o($VR,[2,94]),o($VR,[2,95]),o($VR,[2,96]),o($VR,[2,97]),o($VR,[2,98]),o($Vp,[2,85]),o($Vp,[2,53]),{37:[2,10]},o($VO,[2,41]),{13:[1,136]},{1:[2,4]},o($VP,[2,51]),o($VP,[2,50]),{16:37,17:137,18:38,74:$Vi,80:$Vk,95:$Vl,97:$Vm,98:$Vn},o($VB,[2,59]),o($Vp,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:$V4},{43:140,47:$VE},o($Vx,[2,38]),{39:[2,44]},o($Vp,[2,42]),o($Vp,[2,71]),o($Vp,[2,73]),o($Vp,[2,74],{68:[1,141]}),o($Vp,[2,77]),o($Vp,[2,78],{13:[1,142]}),o($Vp,[2,80],{13:[1,144],68:[1,143]}),{21:$VF,73:$VG,74:$VH,77:145,79:101,80:$VI,81:$VJ,82:$VK,83:$VL,84:$VM,85:$VN},o($VR,[2,89]),{14:[1,146]},o($VP,[2,52]),o($Vp,[2,31]),{39:[2,35]},{39:[1,147]},o($Vp,[2,75]),o($Vp,[2,79]),o($Vp,[2,81]),o($Vp,[2,82],{68:[1,148]}),o($VQ,[2,87],{79:135,21:$VF,73:$VG,74:$VH,80:$VI,81:$VJ,82:$VK,83:$VL,84:$VM,85:$VN}),o($VO,[2,8]),o($Vx,[2,39]),o($Vp,[2,83])],\ndefaultActions: {2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 53;\nbreak;\ncase 1:return 54;\nbreak;\ncase 2:return 55;\nbreak;\ncase 3:return 56;\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6: this.begin(\"acc_title\");return 31; \nbreak;\ncase 7: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 8: this.begin(\"acc_descr\");return 33; \nbreak;\ncase 9: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 10: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 11: this.popState(); \nbreak;\ncase 12:return \"acc_descr_multiline_value\";\nbreak;\ncase 13:return 8;\nbreak;\ncase 14:/* skip whitespace */\nbreak;\ncase 15:return 7;\nbreak;\ncase 16:return 7;\nbreak;\ncase 17:return 'EDGE_STATE';\nbreak;\ncase 18:this.begin(\"callback_name\");\nbreak;\ncase 19:this.popState();\nbreak;\ncase 20:this.popState(); this.begin(\"callback_args\");\nbreak;\ncase 21:return 70;\nbreak;\ncase 22:this.popState();\nbreak;\ncase 23:return 71;\nbreak;\ncase 24:this.popState();\nbreak;\ncase 25:return \"STR\";\nbreak;\ncase 26:this.begin(\"string\");\nbreak;\ncase 27:return 73;\nbreak;\ncase 28: this.begin('namespace'); return 40; \nbreak;\ncase 29: this.popState(); return 8; \nbreak;\ncase 30:/* skip whitespace */\nbreak;\ncase 31: this.begin(\"namespace-body\"); return 37;\nbreak;\ncase 32: this.popState(); return 39; \nbreak;\ncase 33:return \"EOF_IN_STRUCT\";\nbreak;\ncase 34:return 8;\nbreak;\ncase 35:/* skip whitespace */\nbreak;\ncase 36:return 'EDGE_STATE';\nbreak;\ncase 37: this.begin('class'); return 44;\nbreak;\ncase 38: this.popState(); return 8; \nbreak;\ncase 39:/* skip whitespace */\nbreak;\ncase 40: this.popState(); this.popState(); return 39;\nbreak;\ncase 41: this.begin(\"class-body\"); return 37;\nbreak;\ncase 42: this.popState(); return 39; \nbreak;\ncase 43:return \"EOF_IN_STRUCT\";\nbreak;\ncase 44: return 'EDGE_STATE';\nbreak;\ncase 45:return \"OPEN_IN_STRUCT\";\nbreak;\ncase 46:/* nothing */\nbreak;\ncase 47: return \"MEMBER\";\nbreak;\ncase 48:return 76;\nbreak;\ncase 49:return 66;\nbreak;\ncase 50:return 67;\nbreak;\ncase 51:return 69;\nbreak;\ncase 52:return 50;\nbreak;\ncase 53:return 52;\nbreak;\ncase 54:return 45;\nbreak;\ncase 55:return 46;\nbreak;\ncase 56:return 72;\nbreak;\ncase 57:this.popState();\nbreak;\ncase 58:return \"GENERICTYPE\";\nbreak;\ncase 59:this.begin(\"generic\");\nbreak;\ncase 60:this.popState();\nbreak;\ncase 61:return \"BQUOTE_STR\";\nbreak;\ncase 62:this.begin(\"bqstring\");\nbreak;\ncase 63:return 68;\nbreak;\ncase 64:return 68;\nbreak;\ncase 65:return 68;\nbreak;\ncase 66:return 68;\nbreak;\ncase 67:return 60;\nbreak;\ncase 68:return 60;\nbreak;\ncase 69:return 62;\nbreak;\ncase 70:return 62;\nbreak;\ncase 71:return 61;\nbreak;\ncase 72:return 59;\nbreak;\ncase 73:return 63;\nbreak;\ncase 74:return 64;\nbreak;\ncase 75:return 65;\nbreak;\ncase 76:return 21;\nbreak;\ncase 77:return 42;\nbreak;\ncase 78:return 95;\nbreak;\ncase 79:return 'DOT';\nbreak;\ncase 80:return 'PLUS';\nbreak;\ncase 81:return 81;\nbreak;\ncase 82:return 78;\nbreak;\ncase 83:return 84;\nbreak;\ncase 84:return 84;\nbreak;\ncase 85:return 85;\nbreak;\ncase 86:return 'EQUALS';\nbreak;\ncase 87:return 'EQUALS';\nbreak;\ncase 88:return 74;\nbreak;\ncase 89:return 12;\nbreak;\ncase 90:return 14;\nbreak;\ncase 91:return 'PUNCTUATION';\nbreak;\ncase 92:return 80;\nbreak;\ncase 93:return 97;\nbreak;\ncase 94:return 83;\nbreak;\ncase 95:return 83;\nbreak;\ncase 96:return 9;\nbreak;\n}\n},\nrules: [/^(?:.*direction\\s+TB[^\\n]*)/,/^(?:.*direction\\s+BT[^\\n]*)/,/^(?:.*direction\\s+RL[^\\n]*)/,/^(?:.*direction\\s+LR[^\\n]*)/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:classDiagram-v2\\b)/,/^(?:classDiagram\\b)/,/^(?:\\[\\*\\])/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[\"])/,/^(?:style\\b)/,/^(?:namespace\\b)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:\\[\\*\\])/,/^(?:class\\b)/,/^(?:\\s*(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\\[\\*\\])/,/^(?:[{])/,/^(?:[\\n])/,/^(?:[^{}\\n]*)/,/^(?:cssClass\\b)/,/^(?:callback\\b)/,/^(?:link\\b)/,/^(?:click\\b)/,/^(?:note for\\b)/,/^(?:note\\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:\\s*<\\|)/,/^(?:\\s*\\|>)/,/^(?:\\s*>)/,/^(?:\\s*<)/,/^(?:\\s*\\*)/,/^(?:\\s*o\\b)/,/^(?:\\s*\\(\\))/,/^(?:--)/,/^(?:\\.\\.)/,/^(?::{1}[^:\\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\\.)/,/^(?:\\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\\w+)/,/^(?:\\[)/,/^(?:\\])/,/^(?:[!\"#$%&'*+,-.`?\\\\/])/,/^(?:[0-9]+)/,/^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]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10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/,/^(?:\\s)/,/^(?:\\s)/,/^(?:$)/],\nconditions: {\"namespace-body\":{\"rules\":[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"namespace\":{\"rules\":[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"class-body\":{\"rules\":[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"class\":{\"rules\":[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"acc_descr\":{\"rules\":[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"acc_title\":{\"rules\":[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"callback_args\":{\"rules\":[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"callback_name\":{\"rules\":[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"href\":{\"rules\":[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"struct\":{\"rules\":[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"generic\":{\"rules\":[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"bqstring\":{\"rules\":[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"string\":{\"rules\":[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { parseGenericTypes, sanitizeText } from '../common/common.js';\n\nexport interface ClassNode {\n id: string;\n type: string;\n label: string;\n cssClasses: string[];\n methods: ClassMember[];\n members: ClassMember[];\n annotations: string[];\n domId: string;\n styles: string[];\n parent?: string;\n link?: string;\n linkTarget?: string;\n haveCallback?: boolean;\n tooltip?: string;\n}\n\nexport type Visibility = '#' | '+' | '~' | '-' | '';\nexport const visibilityValues = ['#', '+', '~', '-', ''];\n\n/**\n * Parses and stores class diagram member variables/methods.\n *\n */\nexport class ClassMember {\n id!: string;\n cssStyle!: string;\n memberType!: 'method' | 'attribute';\n visibility!: Visibility;\n /**\n * denote if static or to determine which css class to apply to the node\n * @defaultValue ''\n */\n classifier!: string;\n /**\n * parameters for method\n * @defaultValue ''\n */\n parameters!: string;\n /**\n * return type for method\n * @defaultValue ''\n */\n returnType!: string;\n\n constructor(input: string, memberType: 'method' | 'attribute') {\n this.memberType = memberType;\n this.visibility = '';\n this.classifier = '';\n const sanitizedInput = sanitizeText(input, getConfig());\n this.parseMember(sanitizedInput);\n }\n\n getDisplayDetails() {\n let displayText = this.visibility + parseGenericTypes(this.id);\n if (this.memberType === 'method') {\n displayText += `(${parseGenericTypes(this.parameters.trim())})`;\n if (this.returnType) {\n displayText += ' : ' + parseGenericTypes(this.returnType);\n }\n }\n\n displayText = displayText.trim();\n const cssStyle = this.parseClassifier();\n\n return {\n displayText,\n cssStyle,\n };\n }\n\n parseMember(input: string) {\n let potentialClassifier = '';\n\n if (this.memberType === 'method') {\n const methodRegEx = /([#+~-])?(.+)\\((.*)\\)([\\s$*])?(.*)([$*])?/;\n const match = methodRegEx.exec(input);\n if (match) {\n const detectedVisibility = match[1] ? match[1].trim() : '';\n\n if (visibilityValues.includes(detectedVisibility)) {\n this.visibility = detectedVisibility as Visibility;\n }\n\n this.id = match[2].trim();\n this.parameters = match[3] ? match[3].trim() : '';\n potentialClassifier = match[4] ? match[4].trim() : '';\n this.returnType = match[5] ? match[5].trim() : '';\n\n if (potentialClassifier === '') {\n const lastChar = this.returnType.substring(this.returnType.length - 1);\n if (/[$*]/.exec(lastChar)) {\n potentialClassifier = lastChar;\n this.returnType = this.returnType.substring(0, this.returnType.length - 1);\n }\n }\n }\n } else {\n const length = input.length;\n const firstChar = input.substring(0, 1);\n const lastChar = input.substring(length - 1);\n\n if (visibilityValues.includes(firstChar)) {\n this.visibility = firstChar as Visibility;\n }\n\n if (/[$*]/.exec(lastChar)) {\n potentialClassifier = lastChar;\n }\n\n this.id = input.substring(\n this.visibility === '' ? 0 : 1,\n potentialClassifier === '' ? length : length - 1\n );\n }\n\n this.classifier = potentialClassifier;\n }\n\n parseClassifier() {\n switch (this.classifier) {\n case '*':\n return 'font-style:italic;';\n case '$':\n return 'text-decoration:underline;';\n default:\n return '';\n }\n }\n}\n\nexport interface ClassNote {\n id: string;\n class: string;\n text: string;\n}\n\nexport interface ClassRelation {\n id1: string;\n id2: string;\n relationTitle1: string;\n relationTitle2: string;\n type: string;\n title: string;\n text: string;\n style: string[];\n relation: {\n type1: number;\n type2: number;\n lineType: number;\n };\n}\n\nexport interface NamespaceNode {\n id: string;\n domId: string;\n classes: ClassMap;\n children: NamespaceMap;\n}\n\nexport type ClassMap = Map;\nexport type NamespaceMap = Map;\n", "import type { Selection } from 'd3';\nimport { select } from 'd3';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport common from '../common/common.js';\nimport utils from '../../utils.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport { ClassMember } from './classTypes.js';\nimport type {\n ClassRelation,\n ClassNode,\n ClassNote,\n ClassMap,\n NamespaceMap,\n NamespaceNode,\n} from './classTypes.js';\n\nconst MERMAID_DOM_ID_PREFIX = 'classId-';\n\nlet relations: ClassRelation[] = [];\nlet classes = new Map();\nlet notes: ClassNote[] = [];\nlet classCounter = 0;\nlet namespaces = new Map();\nlet namespaceCounter = 0;\n\nlet functions: any[] = [];\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nconst splitClassNameAndType = function (_id: string) {\n const id = common.sanitizeText(_id, getConfig());\n let genericType = '';\n let className = id;\n\n if (id.indexOf('~') > 0) {\n const split = id.split('~');\n className = sanitizeText(split[0]);\n genericType = sanitizeText(split[1]);\n }\n\n return { className: className, type: genericType };\n};\n\nexport const setClassLabel = function (_id: string, label: string) {\n const id = common.sanitizeText(_id, getConfig());\n if (label) {\n label = sanitizeText(label);\n }\n\n const { className } = splitClassNameAndType(id);\n classes.get(className)!.label = label;\n};\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param id - Id of the class to add\n * @public\n */\nexport const addClass = function (_id: string) {\n const id = common.sanitizeText(_id, getConfig());\n const { className, type } = splitClassNameAndType(id);\n // Only add class if not exists\n if (classes.has(className)) {\n return;\n }\n // alert('Adding class: ' + className);\n const name = common.sanitizeText(className, getConfig());\n // alert('Adding class after: ' + name);\n classes.set(name, {\n id: name,\n type: type,\n label: name,\n cssClasses: [],\n methods: [],\n members: [],\n annotations: [],\n styles: [],\n domId: MERMAID_DOM_ID_PREFIX + name + '-' + classCounter,\n } as ClassNode);\n\n classCounter++;\n};\n\n/**\n * Function to lookup domId from id in the graph definition.\n *\n * @param id - class ID to lookup\n * @public\n */\nexport const lookUpDomId = function (_id: string): string {\n const id = common.sanitizeText(_id, getConfig());\n if (classes.has(id)) {\n return classes.get(id)!.domId;\n }\n throw new Error('Class not found: ' + id);\n};\n\nexport const clear = function () {\n relations = [];\n classes = new Map();\n notes = [];\n functions = [];\n functions.push(setupToolTips);\n namespaces = new Map();\n namespaceCounter = 0;\n direction = 'TB';\n commonClear();\n};\n\nexport const getClass = function (id: string): ClassNode {\n return classes.get(id)!;\n};\n\nexport const getClasses = function (): ClassMap {\n return classes;\n};\n\nexport const getRelations = function (): ClassRelation[] {\n return relations;\n};\n\nexport const getNotes = function () {\n return notes;\n};\n\nexport const addRelation = function (relation: ClassRelation) {\n log.debug('Adding relation: ' + JSON.stringify(relation));\n addClass(relation.id1);\n addClass(relation.id2);\n\n relation.id1 = splitClassNameAndType(relation.id1).className;\n relation.id2 = splitClassNameAndType(relation.id2).className;\n\n relation.relationTitle1 = common.sanitizeText(relation.relationTitle1.trim(), getConfig());\n\n relation.relationTitle2 = common.sanitizeText(relation.relationTitle2.trim(), getConfig());\n\n relations.push(relation);\n};\n\n/**\n * Adds an annotation to the specified class Annotations mark special properties of the given type\n * (like 'interface' or 'service')\n *\n * @param className - The class name\n * @param annotation - The name of the annotation without any brackets\n * @public\n */\nexport const addAnnotation = function (className: string, annotation: string) {\n const validatedClassName = splitClassNameAndType(className).className;\n classes.get(validatedClassName)!.annotations.push(annotation);\n};\n\n/**\n * Adds a member to the specified class\n *\n * @param className - The class name\n * @param member - The full name of the member. If the member is enclosed in `<>` it is\n * treated as an annotation If the member is ending with a closing bracket ) it is treated as a\n * method Otherwise the member will be treated as a normal property\n * @public\n */\nexport const addMember = function (className: string, member: string) {\n addClass(className);\n\n const validatedClassName = splitClassNameAndType(className).className;\n const theClass = classes.get(validatedClassName)!;\n\n if (typeof member === 'string') {\n // Member can contain white spaces, we trim them out\n const memberString = member.trim();\n\n if (memberString.startsWith('<<') && memberString.endsWith('>>')) {\n // its an annotation\n theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));\n } else if (memberString.indexOf(')') > 0) {\n //its a method\n theClass.methods.push(new ClassMember(memberString, 'method'));\n } else if (memberString) {\n theClass.members.push(new ClassMember(memberString, 'attribute'));\n }\n }\n};\n\nexport const addMembers = function (className: string, members: string[]) {\n if (Array.isArray(members)) {\n members.reverse();\n members.forEach((member) => addMember(className, member));\n }\n};\n\nexport const addNote = function (text: string, className: string) {\n const note = {\n id: `note${notes.length}`,\n class: className,\n text: text,\n };\n notes.push(note);\n};\n\nexport const cleanupLabel = function (label: string) {\n if (label.startsWith(':')) {\n label = label.substring(1);\n }\n return sanitizeText(label.trim());\n};\n\n/**\n * Called by parser when assigning cssClass to a class\n *\n * @param ids - Comma separated list of ids\n * @param className - Class to add\n */\nexport const setCssClass = function (ids: string, className: string) {\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (/\\d/.exec(_id[0])) {\n id = MERMAID_DOM_ID_PREFIX + id;\n }\n const classNode = classes.get(id);\n if (classNode) {\n classNode.cssClasses.push(className);\n }\n });\n};\n\n/**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n *\n * @param ids - Comma separated list of ids\n * @param tooltip - Tooltip to add\n */\nconst setTooltip = function (ids: string, tooltip?: string) {\n ids.split(',').forEach(function (id) {\n if (tooltip !== undefined) {\n classes.get(id)!.tooltip = sanitizeText(tooltip);\n }\n });\n};\n\nexport const getTooltip = function (id: string, namespace?: string) {\n if (namespace && namespaces.has(namespace)) {\n return namespaces.get(namespace)!.classes.get(id)!.tooltip;\n }\n\n return classes.get(id)!.tooltip;\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids - Comma separated list of ids\n * @param linkStr - URL to create a link for\n * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\nexport const setLink = function (ids: string, linkStr: string, target: string) {\n const config = getConfig();\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (/\\d/.exec(_id[0])) {\n id = MERMAID_DOM_ID_PREFIX + id;\n }\n const theClass = classes.get(id);\n if (theClass) {\n theClass.link = utils.formatUrl(linkStr, config);\n if (config.securityLevel === 'sandbox') {\n theClass.linkTarget = '_top';\n } else if (typeof target === 'string') {\n theClass.linkTarget = sanitizeText(target);\n } else {\n theClass.linkTarget = '_blank';\n }\n }\n });\n setCssClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids - Comma separated list of ids\n * @param functionName - Function to be called on click\n * @param functionArgs - Function args the function should be called with\n */\nexport const setClickEvent = function (ids: string, functionName: string, functionArgs: string) {\n ids.split(',').forEach(function (id) {\n setClickFunc(id, functionName, functionArgs);\n classes.get(id)!.haveCallback = true;\n });\n setCssClass(ids, 'clickable');\n};\n\nconst setClickFunc = function (_domId: string, functionName: string, functionArgs: string) {\n const domId = common.sanitizeText(_domId, getConfig());\n const config = getConfig();\n if (config.securityLevel !== 'loose') {\n return;\n }\n if (functionName === undefined) {\n return;\n }\n\n const id = domId;\n if (classes.has(id)) {\n const elemId = lookUpDomId(id);\n let argList: string[] = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(elemId);\n }\n\n functions.push(function () {\n const elem = document.querySelector(`[id=\"${elemId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\nexport const bindFunctions = function (element: Element) {\n functions.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n LOLLIPOP: 4,\n};\n\nconst setupToolTips = function (element: Element) {\n let tooltipElem: Selection =\n select('.mermaidTooltip');\n // @ts-expect-error - Incorrect types\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n // Don't try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n // @ts-ignore - getBoundingClientRect is not part of the d3 type definition\n const rect = this.getBoundingClientRect();\n\n // @ts-expect-error - Incorrect types\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .text(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n tooltipElem.html(tooltipElem.html().replace(/<br\\/>/g, '
    '));\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n // @ts-expect-error - Incorrect types\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfunctions.push(setupToolTips);\n\nlet direction = 'TB';\nconst getDirection = () => direction;\nconst setDirection = (dir: string) => {\n direction = dir;\n};\n\n/**\n * Function called by parser when a namespace definition has been found.\n *\n * @param id - Id of the namespace to add\n * @public\n */\nexport const addNamespace = function (id: string) {\n if (namespaces.has(id)) {\n return;\n }\n\n namespaces.set(id, {\n id: id,\n classes: new Map(),\n children: {},\n domId: MERMAID_DOM_ID_PREFIX + id + '-' + namespaceCounter,\n } as NamespaceNode);\n\n namespaceCounter++;\n};\n\nconst getNamespace = function (name: string): NamespaceNode {\n return namespaces.get(name)!;\n};\n\nconst getNamespaces = function (): NamespaceMap {\n return namespaces;\n};\n\n/**\n * Function called by parser when a namespace definition has been found.\n *\n * @param id - Id of the namespace to add\n * @param classNames - Ids of the class to add\n * @public\n */\nexport const addClassesToNamespace = function (id: string, classNames: string[]) {\n if (!namespaces.has(id)) {\n return;\n }\n for (const name of classNames) {\n const { className } = splitClassNameAndType(name);\n classes.get(className)!.parent = id;\n namespaces.get(id)!.classes.set(className, classes.get(className)!);\n }\n};\n\nexport const setCssStyle = function (id: string, styles: string[]) {\n const thisClass = classes.get(id);\n if (!styles || !thisClass) {\n return;\n }\n for (const s of styles) {\n if (s.includes(',')) {\n thisClass.styles.push(...s.split(','));\n } else {\n thisClass.styles.push(s);\n }\n }\n};\n\nexport default {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n getConfig: () => getConfig().class,\n addClass,\n bindFunctions,\n clear,\n getClass,\n getClasses,\n getNotes,\n addAnnotation,\n addNote,\n getRelations,\n addRelation,\n getDirection,\n setDirection,\n addMember,\n addMembers,\n cleanupLabel,\n lineType,\n relationType,\n setClickEvent,\n setCssClass,\n setLink,\n getTooltip,\n setTooltip,\n lookUpDomId,\n setDiagramTitle,\n getDiagramTitle,\n setClassLabel,\n addNamespace,\n addClassesToNamespace,\n getNamespace,\n getNamespaces,\n setCssStyle,\n};\n", "const getStyles = (options) =>\n `g.classGroup text {\n fill: ${options.nodeBorder || options.classText};\n stroke: none;\n font-family: ${options.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${options.classText};\n}\n.edgeLabel .label rect {\n fill: ${options.mainBkg};\n}\n.label text {\n fill: ${options.classText};\n}\n.edgeLabel .label span {\n background: ${options.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${options.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${options.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n}\n`;\n\nexport default getStyles;\n", "import { line, curveBasis } from 'd3';\nimport utils from '../../utils.js';\nimport { log } from '../../logger.js';\nimport { parseGenericTypes } from '../common/common.js';\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation, conf, diagObj) {\n const getRelationType = function (type) {\n switch (type) {\n case diagObj.db.relationType.AGGREGATION:\n return 'aggregation';\n case diagObj.db.relationType.EXTENSION:\n return 'extension';\n case diagObj.db.relationType.COMPOSITION:\n return 'composition';\n case diagObj.db.relationType.DEPENDENCY:\n return 'dependency';\n case diagObj.db.relationType.LOLLIPOP:\n return 'lollipop';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'relation');\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n if (relation.relation.lineType == 1) {\n svgPath.attr('class', 'relation dashed-line');\n }\n if (relation.relation.lineType == 10) {\n svgPath.attr('class', 'relation dotted-line');\n }\n if (relation.relation.type1 !== 'none') {\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')'\n );\n }\n if (relation.relation.type2 !== 'none') {\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')'\n );\n }\n\n let x, y;\n const l = path.points.length;\n // Calculate Label position\n let labelPosition = utils.calcLabelPosition(path.points);\n x = labelPosition.x;\n y = labelPosition.y;\n\n let p1_card_x, p1_card_y;\n let p2_card_x, p2_card_y;\n\n if (l % 2 !== 0 && l > 1) {\n let cardinality_1_point = utils.calcCardinalityPosition(\n relation.relation.type1 !== 'none',\n path.points,\n path.points[0]\n );\n let cardinality_2_point = utils.calcCardinalityPosition(\n relation.relation.type2 !== 'none',\n path.points,\n path.points[l - 1]\n );\n\n log.debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point));\n log.debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point));\n\n p1_card_x = cardinality_1_point.x;\n p1_card_y = cardinality_1_point.y;\n p2_card_x = cardinality_2_point.x;\n p2_card_y = cardinality_2_point.y;\n }\n\n if (relation.title !== undefined) {\n const g = elem.append('g').attr('class', 'classLabel');\n const label = g\n .append('text')\n .attr('class', 'label')\n .attr('x', x)\n .attr('y', y)\n .attr('fill', 'red')\n .attr('text-anchor', 'middle')\n .text(relation.title);\n\n window.label = label;\n const bounds = label.node().getBBox();\n\n g.insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', bounds.x - conf.padding / 2)\n .attr('y', bounds.y - conf.padding / 2)\n .attr('width', bounds.width + conf.padding)\n .attr('height', bounds.height + conf.padding);\n }\n\n log.info('Rendering relation ' + JSON.stringify(relation));\n if (relation.relationTitle1 !== undefined && relation.relationTitle1 !== 'none') {\n const g = elem.append('g').attr('class', 'cardinality');\n g.append('text')\n .attr('class', 'type1')\n .attr('x', p1_card_x)\n .attr('y', p1_card_y)\n .attr('fill', 'black')\n .attr('font-size', '6')\n .text(relation.relationTitle1);\n }\n if (relation.relationTitle2 !== undefined && relation.relationTitle2 !== 'none') {\n const g = elem.append('g').attr('class', 'cardinality');\n g.append('text')\n .attr('class', 'type2')\n .attr('x', p2_card_x)\n .attr('y', p2_card_y)\n .attr('fill', 'black')\n .attr('font-size', '6')\n .text(relation.relationTitle2);\n }\n\n edgeCount++;\n};\n\n/**\n * Renders a class diagram\n *\n * @param {SVGSVGElement} elem The element to draw it into\n * @param classDef\n * @param conf\n * @param diagObj\n * @todo Add more information in the JSDOC here\n */\nexport const drawClass = function (elem, classDef, conf, diagObj) {\n log.debug('Rendering class ', classDef, conf);\n\n const id = classDef.id;\n const classInfo = {\n id: id,\n label: classDef.id,\n width: 0,\n height: 0,\n };\n\n // add class group\n const g = elem.append('g').attr('id', diagObj.db.lookUpDomId(id)).attr('class', 'classGroup');\n\n let title;\n if (classDef.link) {\n title = g\n .append('svg:a')\n .attr('xlink:href', classDef.link)\n .attr('target', classDef.linkTarget)\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n } else {\n title = g\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n }\n\n // add annotations\n let isFirst = true;\n classDef.annotations.forEach(function (member) {\n const titleText2 = title.append('tspan').text('\u00AB' + member + '\u00BB');\n if (!isFirst) {\n titleText2.attr('dy', conf.textHeight);\n }\n isFirst = false;\n });\n\n let classTitleString = getClassTitleString(classDef);\n\n const classTitle = title.append('tspan').text(classTitleString).attr('class', 'title');\n\n // If class has annotations the title needs to have an offset of the text height\n if (!isFirst) {\n classTitle.attr('dy', conf.textHeight);\n }\n\n const titleHeight = title.node().getBBox().height;\n let membersLine;\n let membersBox;\n let methodsLine;\n\n // don't draw box if no members\n if (classDef.members.length > 0) {\n membersLine = g\n .append('line') // text label for the x axis\n .attr('x1', 0)\n .attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2)\n .attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);\n\n const members = g\n .append('text') // text label for the x axis\n .attr('x', conf.padding)\n .attr('y', titleHeight + conf.dividerMargin + conf.textHeight)\n .attr('fill', 'white')\n .attr('class', 'classText');\n\n isFirst = true;\n classDef.members.forEach(function (member) {\n addTspan(members, member, isFirst, conf);\n isFirst = false;\n });\n\n membersBox = members.node().getBBox();\n }\n\n // don't draw box if no methods\n if (classDef.methods.length > 0) {\n methodsLine = g\n .append('line') // text label for the x axis\n .attr('x1', 0)\n .attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)\n .attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);\n\n const methods = g\n .append('text') // text label for the x axis\n .attr('x', conf.padding)\n .attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight)\n .attr('fill', 'white')\n .attr('class', 'classText');\n\n isFirst = true;\n\n classDef.methods.forEach(function (method) {\n addTspan(methods, method, isFirst, conf);\n isFirst = false;\n });\n }\n\n const classBox = g.node().getBBox();\n var cssClassStr = ' ';\n\n if (classDef.cssClasses.length > 0) {\n cssClassStr = cssClassStr + classDef.cssClasses.join(' ');\n }\n\n const rect = g\n .insert('rect', ':first-child')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', classBox.width + 2 * conf.padding)\n .attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin)\n .attr('class', cssClassStr);\n\n const rectWidth = rect.node().getBBox().width;\n\n // Center title\n // We subtract the width of each text element from the class box width and divide it by 2\n title.node().childNodes.forEach(function (x) {\n x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);\n });\n\n if (classDef.tooltip) {\n title.insert('title').text(classDef.tooltip);\n }\n\n if (membersLine) {\n membersLine.attr('x2', rectWidth);\n }\n if (methodsLine) {\n methodsLine.attr('x2', rectWidth);\n }\n\n classInfo.width = rectWidth;\n classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;\n\n return classInfo;\n};\n\nexport const getClassTitleString = function (classDef) {\n let classTitleString = classDef.id;\n\n if (classDef.type) {\n classTitleString += '<' + parseGenericTypes(classDef.type) + '>';\n }\n\n return classTitleString;\n};\n\n/**\n * Renders a note diagram\n *\n * @param {SVGSVGElement} elem The element to draw it into\n * @param {{id: string; text: string; class: string;}} note\n * @param conf\n * @param _diagObj\n * @todo Add more information in the JSDOC here\n */\nexport const drawNote = function (elem, note, conf, _diagObj) {\n log.debug('Rendering note ', note, conf);\n\n const id = note.id;\n const noteInfo = {\n id: id,\n text: note.text,\n width: 0,\n height: 0,\n };\n\n // add class group\n const g = elem.append('g').attr('id', id).attr('class', 'classGroup');\n\n // add text\n let text = g\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n\n const lines = JSON.parse(`\"${note.text}\"`).split('\\n');\n\n lines.forEach(function (line) {\n log.debug(`Adding line: ${line}`);\n text.append('tspan').text(line).attr('class', 'title').attr('dy', conf.textHeight);\n });\n\n const noteBox = g.node().getBBox();\n\n const rect = g\n .insert('rect', ':first-child')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', noteBox.width + 2 * conf.padding)\n .attr(\n 'height',\n noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin\n );\n\n const rectWidth = rect.node().getBBox().width;\n\n // Center title\n // We subtract the width of each text element from the class box width and divide it by 2\n text.node().childNodes.forEach(function (x) {\n x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);\n });\n\n noteInfo.width = rectWidth;\n noteInfo.height =\n noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin;\n\n return noteInfo;\n};\n\n/**\n * Adds a for a member in a diagram\n *\n * @param {SVGElement} textEl The element to append to\n * @param {string} member The member\n * @param {boolean} isFirst\n * @param {{ padding: string; textHeight: string }} conf The configuration for the member\n */\nconst addTspan = function (textEl, member, isFirst, conf) {\n const { displayText, cssStyle } = member.getDisplayDetails();\n const tSpan = textEl.append('tspan').attr('x', conf.padding).text(displayText);\n\n if (cssStyle !== '') {\n tSpan.attr('style', member.cssStyle);\n }\n\n if (!isFirst) {\n tSpan.attr('dy', conf.textHeight);\n }\n};\n\nexport default {\n getClassTitleString,\n drawClass,\n drawEdge,\n drawNote,\n};\n", "import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger.js';\nimport svgDraw from './svgDraw.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = [...classes.keys()];\n\n for (const key of keys) {\n const classDef = classes.get(key);\n const node = svgDraw.drawClass(diagram, classDef, conf, diagObj);\n idCache[node.id] = node;\n\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n g.setNode(node.id, node);\n\n log.info('Org height: ' + node.height);\n }\n\n const relations = diagObj.db.getRelations();\n relations.forEach(function (relation) {\n log.info(\n // cspell:ignore tjoho\n 'tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)\n );\n g.setEdge(\n getGraphId(relation.id1),\n getGraphId(relation.id2),\n {\n relation: relation,\n },\n relation.title || 'DEFAULT'\n );\n });\n\n const notes = diagObj.db.getNotes();\n notes.forEach(function (note) {\n log.debug(`Adding note: ${JSON.stringify(note)}`);\n const node = svgDraw.drawNote(diagram, note, conf, diagObj);\n idCache[node.id] = node;\n\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n g.setNode(node.id, node);\n if (note.class && classes.has(note.class)) {\n g.setEdge(\n note.id,\n getGraphId(note.class),\n {\n relation: {\n id1: note.id,\n id2: note.class,\n relation: {\n type1: 'none',\n type2: 'none',\n lineType: 10,\n },\n },\n },\n 'DEFAULT'\n );\n }\n });\n\n dagreLayout(g);\n g.nodes().forEach(function (v) {\n if (v !== undefined && g.node(v) !== undefined) {\n log.debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n root\n .select('#' + (diagObj.db.lookUpDomId(v) || v))\n .attr(\n 'transform',\n 'translate(' +\n (g.node(v).x - g.node(v).width / 2) +\n ',' +\n (g.node(v).y - g.node(v).height / 2) +\n ' )'\n );\n }\n });\n\n g.edges().forEach(function (e) {\n if (e !== undefined && g.edge(e) !== undefined) {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n svgDraw.drawEdge(diagram, g.edge(e), g.edge(e).relation, conf, diagObj);\n }\n });\n\n const svgBounds = diagram.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n log.debug(`viewBox ${vBox}`);\n diagram.attr('viewBox', vBox);\n};\n\nexport default {\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/classDiagram.jison';\nimport db from './classDb.js';\nimport styles from './styles.js';\nimport renderer from './classRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "/** Setup arrow head and define the marker. The result is appended to the svg. */\n\nimport { log } from '../logger.js';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 6)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst lollipop = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopStart')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 13)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-lollipopEnd')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 1)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'transparent')\n .attr('cx', 7)\n .attr('cy', 7)\n .attr('r', 6);\n};\nconst point = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 6)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 4.5)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type, id) => {\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', id + '_' + type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type, id) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', id + '_' + type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'strokeWidth')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semantic free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n", "/** Decorates with functions required by mermaids dagre-wrapper. */\nimport { log } from '../logger.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\n\nexport let clusterDb = {};\nlet descendants = {};\nlet parents = {};\n\nexport const clear = () => {\n descendants = {};\n parents = {};\n clusterDb = {};\n};\n\nconst isDescendant = (id, ancestorId) => {\n // if (id === ancestorId) return true;\n\n log.trace('In isDescendant', ancestorId, ' ', id, ' = ', descendants[ancestorId].includes(id));\n if (descendants[ancestorId].includes(id)) {\n return true;\n }\n\n return false;\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n log.info('Descendants of ', clusterId, ' is ', descendants[clusterId]);\n log.info('Edge is ', edge);\n // Edges to/from the cluster is not in the cluster, they are in the parent\n if (edge.v === clusterId) {\n return false;\n }\n if (edge.w === clusterId) {\n return false;\n }\n\n if (!descendants[clusterId]) {\n log.debug('Tilt, ', clusterId, ',not in descendants');\n return false;\n }\n return (\n descendants[clusterId].includes(edge.v) ||\n isDescendant(edge.v, clusterId) ||\n isDescendant(edge.w, clusterId) ||\n descendants[clusterId].includes(edge.w)\n );\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n // Include cluster node if it is not the root\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n // Do not copy edges in and out of the root cluster, they belong to the parent graph\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\nexport const extractDescendants = (id, graph) => {\n // log.debug('Extracting ', id);\n const children = graph.children(id);\n let res = [...children];\n\n for (const child of children) {\n parents[child] = id;\n res = [...res, ...extractDescendants(child, graph)];\n }\n\n return res;\n};\n\n/**\n * Validates the graph, checking that all parent child relation points to existing nodes and that\n * edges between nodes also ia correct. When not correct the function logs the discrepancies.\n *\n * @param graph\n */\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (const edge of edges) {\n if (graph.children(edge.v).length > 0) {\n log.trace('The node ', edge.v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edge.w).length > 0) {\n log.trace('The node ', edge.w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\n/**\n * Finds a child that is not a cluster. When faking an edge between a node and a cluster.\n *\n * @param id\n * @param {any} graph\n */\nexport const findNonClusterChild = (id, graph) => {\n // const node = graph.node(id);\n log.trace('Searching', id);\n // const children = graph.children(id).reverse();\n const children = graph.children(id); //.reverse();\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n log.trace('This is a valid node', id);\n return id;\n }\n for (const child of children) {\n const _id = findNonClusterChild(child, graph);\n if (_id) {\n log.trace('Found replacement for', id, ' => ', _id);\n return _id;\n }\n }\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb[id]) {\n return id;\n }\n // If the cluster has no external connections\n if (!clusterDb[id].externalConnections) {\n return id;\n }\n\n // Return the replacement node\n if (clusterDb[id]) {\n return clusterDb[id].id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n // Go through the nodes and for each cluster found, save a replacement node, this can be used when\n // faking a link to a cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph)\n );\n descendants[id] = extractDescendants(id, graph);\n clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };\n }\n });\n\n // Check incoming and outgoing edges for each cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, descendants);\n edges.forEach((edge) => {\n // log.debug('Edge, descendants: ', edge, descendants[id]);\n\n // Check if any edge leaves the cluster (not the actual cluster, that's a link from the box)\n if (edge.v !== id && edge.w !== id) {\n // Any edge where either the one of the nodes is descending to the cluster but not the other\n // if (descendants[id].indexOf(edge.v) < 0 && descendants[id].indexOf(edge.w) < 0) {\n\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n\n // d1 xor d2 - if either d1 is true and d2 is false or the other way around\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Descendants of XXX ', id, ': ', descendants[id]);\n clusterDb[id].externalConnections = true;\n }\n }\n });\n } else {\n log.debug('Not a cluster ', id, descendants);\n }\n });\n\n for (let id of Object.keys(clusterDb)) {\n const nonClusterChild = clusterDb[id].id;\n const parent = graph.parent(nonClusterChild);\n\n // Change replacement node of id to parent of current replacement node if valid\n if (parent !== id && clusterDb[parent] && !clusterDb[parent].externalConnections) {\n clusterDb[id].id = parent;\n }\n }\n\n // For clusters with incoming and/or outgoing edges translate those edges to a real node\n // in the cluster in order to fake the edge\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n // Check if link is either from or to a cluster\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb[e.v],\n ' --- ',\n clusterDb[e.w]\n );\n if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) {\n // cspell:ignore trixing\n log.warn('Fixing and trixing link to self - removing XXX', e.v, e.w, e.name);\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n const specialId = e.w + '---' + e.v;\n graph.setNode(specialId, {\n domId: specialId,\n id: specialId,\n labelStyle: '',\n labelText: edge.label,\n padding: 0,\n shape: 'labelRect',\n style: '',\n });\n const edge1 = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = '';\n edge1.arrowTypeEnd = 'none';\n edge2.label = '';\n edge1.fromCluster = e.v;\n edge2.toCluster = e.v;\n\n graph.setEdge(v, specialId, edge1, e.name + '-cyclic-special');\n graph.setEdge(specialId, w, edge2, e.name + '-cyclic-special');\n } else if (clusterDb[e.v] || clusterDb[e.w]) {\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb[parent].externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb[parent].externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlibJson.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n\n // Remove references to extracted cluster\n // graph.edges().forEach(edge => {\n // if (isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlibJson.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n // For clusters without incoming and/or outgoing edges, create a new cluster-node\n // containing the nodes and edges in the custer in a new graph\n // for (let i = 0;)\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n // const clusters = Object.keys(clusterDb);\n // clusters.forEach(clusterId => {\n log.debug('Nodes = ', nodes, depth);\n for (const node of nodes) {\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb[node] && !clusterDb[node].externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n // Note that the node might have been removed after the Object.keys call so better check\n // that it still is in the game\n if (!clusterDb[node]) {\n // Skip if the node is not a cluster\n log.debug('Not a cluster', node, depth);\n // break;\n } else if (\n !clusterDb[node].externalConnections &&\n // !graph.parent(node) &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb[node]?.clusterData?.dir) {\n dir = clusterDb[node].clusterData.dir;\n log.warn('Fixing dir', clusterDb[node].clusterData.dir, dir);\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir, // Todo: set proper spacing\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb[node].clusterData,\n labelText: clusterDb[node].labelText,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlibJson.write(clusterGraph));\n log.debug('Old graph after copy', graphlibJson.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb[node].externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign(nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n", "import intersectRect from './intersect/intersect-rect.js';\nimport { log } from '../logger.js';\nimport createLabel from './createLabel.js';\nimport { createText } from '../rendering-util/createText.js';\nimport { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\n\nconst rect = (parent, node) => {\n log.info('Creating subgraph rect for ', node.id, node);\n const siteConfig = getConfig();\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const useHtmlLabels = evaluate(siteConfig.flowchart.htmlLabels);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n\n // const text = label\n // .node()\n // .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n const text =\n node.labelType === 'markdown'\n ? createText(label, node.labelText, { style: node.labelStyle, useHtmlLabels }, siteConfig)\n : label.node().appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;\n if (node.width <= bbox.width + padding) {\n node.diff = (bbox.width - node.width) / 2 - node.padding / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n log.trace('Data ', node, JSON.stringify(node));\n // center the rect around its coordinate\n rect\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - width / 2)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width)\n .attr('height', node.height + padding);\n\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n if (useHtmlLabels) {\n label.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n } else {\n label.attr(\n 'transform',\n // This puts the label on top of the box instead of inside it\n `translate(${node.x}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n }\n // Center the label\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * Non visible cluster where the note is group with its\n *\n * @param {any} parent\n * @param {any} node\n * @returns {any} ShapeSvg\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\nconst roundedWithTitle = (parent, node) => {\n const siteConfig = getConfig();\n\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n const innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n if (evaluate(siteConfig.flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (bbox.width + node.padding * 0 - node.width) / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n // center the rect around its coordinate\n rect\n .attr('class', 'outer')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width + padding)\n .attr('height', node.height + padding);\n innerRect\n .attr('class', 'inner')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1)\n .attr('width', width + padding)\n .attr('height', node.height + padding - bbox.height - 3);\n\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n // Center the label\n label.attr(\n 'transform',\n `translate(${node.x - bbox.width / 2}, ${\n node.y -\n node.height / 2 -\n node.padding / 3 +\n (evaluate(siteConfig.flowchart.htmlLabels) ? 5 : 3) +\n subGraphTitleTopMargin\n })`\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst divider = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'divider')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.diff = -node.padding / 2;\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = { rect, roundedWithTitle, noteGroup, divider };\n\nlet clusterElems = {};\n\nexport const insertCluster = (elem, node) => {\n log.trace('Inserting cluster');\n const shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n};\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = {};\n};\n\nexport const positionCluster = (node) => {\n log.info('Position cluster (' + node.id + ', ' + node.x + ', ' + node.y + ')');\n const el = clusterElems[node.id];\n\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n", "import type { SVG } from '../diagram-api/types.js';\nimport { log } from '../logger.js';\nimport type { EdgeData } from '../types.js';\n/**\n * Adds SVG markers to a path element based on the arrow types specified in the edge.\n *\n * @param svgPath - The SVG path element to add markers to.\n * @param edge - The edge data object containing the arrow types.\n * @param url - The URL of the SVG marker definitions.\n * @param id - The ID prefix for the SVG marker definitions.\n * @param diagramType - The type of diagram being rendered.\n */\nexport const addEdgeMarkers = (\n svgPath: SVG,\n edge: Pick,\n url: string,\n id: string,\n diagramType: string\n) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, 'start', edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, 'end', edge.arrowTypeEnd, url, id, diagramType);\n }\n};\n\nconst arrowTypesMap = {\n arrow_cross: 'cross',\n arrow_point: 'point',\n arrow_barb: 'barb',\n arrow_circle: 'circle',\n aggregation: 'aggregation',\n extension: 'extension',\n composition: 'composition',\n dependency: 'dependency',\n lollipop: 'lollipop',\n} as const;\n\nconst addEdgeMarker = (\n svgPath: SVG,\n position: 'start' | 'end',\n arrowType: string,\n url: string,\n id: string,\n diagramType: string\n) => {\n const endMarkerType = arrowTypesMap[arrowType as keyof typeof arrowTypesMap];\n\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return; // unknown arrow type, ignore\n }\n\n const suffix = position === 'start' ? 'Start' : 'End';\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n};\n", "import { log } from '../logger.js';\nimport createLabel from './createLabel.js';\nimport { createText } from '../rendering-util/createText.js';\nimport { line, curveBasis, select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport utils from '../utils.js';\nimport { evaluate } from '../diagrams/common/common.js';\nimport { getLineFunctionsWithOffset } from '../utils/lineWithOffset.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\nimport { addEdgeMarkers } from './edgeMarker.js';\n\nlet edgeLabels = {};\nlet terminalLabels = {};\n\nexport const clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\n\nexport const insertEdgeLabel = (elem, edge) => {\n const config = getConfig();\n const useHtmlLabels = evaluate(config.flowchart.htmlLabels);\n // Create the actual text element\n const labelElement =\n edge.labelType === 'markdown'\n ? createText(\n elem,\n edge.label,\n {\n style: edge.labelStyle,\n useHtmlLabels,\n addSvgBackground: true,\n },\n config\n )\n : createLabel(edge.label, edge.labelStyle);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels[edge.id] = edgeLabel;\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + 'px';\n fo.style.height = '12px';\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels[edge.id], paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // // debugger;\n const pos = utils.calcLabelPosition(path);\n log.debug(\n 'Moving label ' + edge.label + ' from (',\n x,\n ',',\n y,\n ') to (',\n pos.x,\n ',',\n pos.y,\n ') abc88'\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr('transform', `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n\n //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n 'start_right',\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', `translate(${x}, ${y})`);\n }\n};\n\nconst outsideNode = (node, point) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n // const dy = Math.abs(y - insidePoint.y);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // Intersection is top or bottom of rect.\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); // cspell: disable-line\n\n return res;\n } else {\n // Intersection onn sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n // r = outsidePoint.x - w - x;\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n // let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n/**\n * This function will page a path and node where the last point(s) in the path is inside the node\n * and return an update path ending by the border of the node.\n *\n * @param {Array} _points\n * @param {any} boundaryNode\n * @returns {Array} Points\n */\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n log.debug('abc88 cutPathAtIntersect', _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n // check if point is inside the boundary rect\n if (!outsideNode(boundaryNode, point) && !isInside) {\n // First point inside the rect found\n // Calc the intersection coord between the point anf the last point outside the rect\n const inter = intersection(boundaryNode, lastPointOutside, point);\n\n // // Check case where the intersection is the same as the last point\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n // // if (!pointPresent) {\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n }\n\n isInside = true;\n } else {\n // Outside\n lastPointOutside = point;\n // points.push(point);\n if (!isInside) {\n points.push(point);\n }\n }\n });\n return points;\n};\n\nexport const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph, id) {\n let points = edge.points;\n log.debug('abc88 InsertEdge: edge=', edge, 'e=', e);\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n\n if (head?.intersect && tail?.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n points.push(head.intersect(points[points.length - 1]));\n }\n\n if (edge.toCluster) {\n log.debug('to cluster abc88', clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.debug('from cluster abc88', clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n\n pointsHasChanged = true;\n }\n\n // The data for our line\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n\n // This is the accessor function we talked about above\n let curve = curveBasis;\n // Currently only flowcharts get the curve from the settings, perhaps this should\n // be expanded to a common setting? Restricting it for now in order not to cause side-effects that\n // have not been thought through\n if (edge.curve && (diagramType === 'graph' || diagramType === 'flowchart')) {\n curve = edge.curve;\n }\n\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n\n // Construct stroke classes based on properties\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n case 'invisible':\n strokeClasses = 'edge-thickness-thick';\n break;\n default:\n strokeClasses = '';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n }\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edge.style);\n\n // DEBUG code, adds a red circle at each edge coordinate\n // edge.points.forEach((point) => {\n // elem\n // .append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n // // TODO: Can we load this config only from the rendered graph type?\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n", "import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport insertMarkers from './markers.js';\nimport { updateNodeBounds } from './shapes/util.js';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib.js';\nimport { insertNode, positionNode, clear as clearNodes, setNodeElem } from './nodes.js';\nimport { insertCluster, clear as clearClusters } from './clusters.js';\nimport { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } from './edges.js';\nimport { log } from '../logger.js';\nimport { getSubGraphTitleMargins } from '../utils/subGraphTitleMargins.js';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\n\nconst recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.info('Graph in recursive render: XXX', graphlibJson.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root');\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.trace('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters');\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n await Promise.all(\n graph.nodes().map(async function (v) {\n const node = graph.node(v);\n if (parentCluster !== undefined) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.info('Setting data for cluster XXX (', v, ') ', data, parentCluster);\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified', v, node.width, graph.node(v));\n // `node.graph.setGraph` applies the graph configurations such as nodeSpacing to subgraphs as without this the default values would be used\n // We override only the `ranksep` and `nodesep` configurations to allow for setting subgraph spacing while avoiding overriding other properties\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep,\n nodesep,\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info('Node bounds (abc123)', v, node, node.width, node.x, node.y);\n setNodeElem(newEl, node);\n\n log.warn('Recursive render complete ', newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recursively\n // Render as before\n log.info('Cluster - the non recursive path XXX', v, node.id, node, graph);\n log.info(findNonClusterChild(node.id, graph));\n clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };\n // insertCluster(clusters, graph.node(v));\n } else {\n log.info('Node - the non recursive path', v, node.id, node);\n await insertNode(nodes, graph.node(v), dir);\n }\n }\n })\n );\n\n // Insert labels, this will insert them into the dom so that the width can be calculated\n // Also figure out which edges point to/from clusters and adjust them accordingly\n // Edges from/to clusters really points to the first child in the cluster.\n // TODO: pick optimal child in the cluster to us as link anchor\n graph.edges().forEach(async function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info('Fix', clusterDb, 'ids:', e.v, e.w, 'Translating: ', clusterDb[e.v], clusterDb[e.w]);\n await insertEdgeLabel(edgeLabels, edge);\n });\n\n graph.edges().forEach(function (e) {\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n });\n log.info('Graph before layout:', JSON.stringify(graphlibJson.write(graph)));\n log.info('#############################################');\n log.info('### Layout ###');\n log.info('#############################################');\n log.info(graph);\n dagreLayout(graph);\n log.info('Graph after layout:', JSON.stringify(graphlibJson.write(graph)));\n // Move the nodes to the correct place\n let diff = 0;\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n sortNodesByHierarchy(graph).forEach(function (v) {\n const node = graph.node(v);\n log.info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));\n log.info(\n 'Position ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node?.clusterNode) {\n // clusterDb[node.id].node = node;\n node.y += subGraphTitleTotalMargin;\n positionNode(node);\n } else {\n // Non cluster node\n if (graph.children(v).length > 0) {\n // A cluster in the non-recursive way\n // positionCluster(node);\n node.height += subGraphTitleTotalMargin;\n insertCluster(clusters, node);\n clusterDb[node.id].node = node;\n } else {\n node.y += subGraphTitleTotalMargin / 2;\n positionNode(node);\n }\n }\n });\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n edge.points.forEach((point) => (point.y += subGraphTitleTotalMargin / 2));\n const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramType, graph, id);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.type === 'group') {\n diff = n.diff;\n }\n });\n return { elem, diff };\n};\n\nexport const render = async (elem, graph, markers, diagramType, id) => {\n insertMarkers(elem, markers, diagramType, id);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n log.warn('Graph at first:', JSON.stringify(graphlibJson.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn('Graph after:', JSON.stringify(graphlibJson.write(graph)));\n // log.warn('Graph ever after:', graphlibJson.write(graph.node('A').graph));\n const siteConfig = getConfig();\n await recursiveRender(elem, graph, diagramType, id, undefined, siteConfig);\n};\n\n// const shapeDefinitions = {};\n// export const addShape = ({ shapeType: fun }) => {\n// shapeDefinitions[shapeType] = fun;\n// };\n\n// const arrowDefinitions = {};\n// export const addArrow = ({ arrowType: fun }) => {\n// arrowDefinitions[arrowType] = fun;\n// };\n", "// @ts-nocheck - don't check until handle it\nimport { select, curveLinear } from 'd3';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { render } from '../../dagre-wrapper/index.js';\nimport utils, { getEdgeId } from '../../utils.js';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport common from '../common/common.js';\nimport type { ClassRelation, ClassNote, ClassMap, NamespaceMap } from './classTypes.js';\nimport type { EdgeData } from '../../types.js';\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n curve: undefined,\n};\n\ninterface RectParameters {\n id: string;\n shape: 'rect';\n labelStyle: string;\n domId: string;\n labelText: string;\n padding: number | undefined;\n style?: string;\n}\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param namespaces - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n */\nexport const addNamespaces = function (\n namespaces: NamespaceMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any\n) {\n log.info('keys:', [...namespaces.keys()]);\n log.info(namespaces);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n namespaces.forEach(function (vertex) {\n // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]\n const shape = 'rect';\n\n const node: RectParameters = {\n shape: shape,\n id: vertex.id,\n domId: vertex.domId,\n labelText: sanitizeText(vertex.id),\n labelStyle: '',\n style: 'fill: none; stroke: black',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n\n g.setNode(vertex.id, node);\n addClasses(vertex.classes, g, _id, diagObj, vertex.id);\n\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param classes - Object containing the vertices.\n * @param g - The graph that is to be drawn.\n * @param _id - id of the graph\n * @param diagObj - The diagram object\n * @param parent - id of the parent namespace, if it exists\n */\nexport const addClasses = function (\n classes: ClassMap,\n g: graphlib.Graph,\n _id: string,\n diagObj: any,\n parent?: string\n) {\n log.info('keys:', [...classes.keys()]);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n [...classes.values()]\n .filter((vertex) => vertex.parent === parent)\n .forEach(function (vertex) {\n /**\n * Variable for storing the classes for the vertex\n */\n const cssClassStr = vertex.cssClasses.join(' ');\n\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label ?? vertex.id;\n const radius = 0;\n const shape = 'class_box';\n\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radius,\n ry: radius,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id, parent) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n\n if (parent) {\n g.setParent(vertex.id, parent);\n }\n\n log.info('setNode', node);\n });\n};\n\n/**\n * Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.\n *\n * @param notes - Object containing the additional vertices (notes).\n * @param g - The graph that is to be drawn.\n * @param startEdgeId - starting index for note edge\n * @param classes - Classes\n */\nexport const addNotes = function (\n notes: ClassNote[],\n g: graphlib.Graph,\n startEdgeId: number,\n classes: ClassMap\n) {\n log.info(notes);\n\n notes.forEach(function (note, i) {\n const vertex = note;\n\n const cssNoteStr = '';\n\n const styles = { labelStyle: '', style: '' };\n\n const vertexText = vertex.text;\n\n const radius = 0;\n const shape = 'note';\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: sanitizeText(vertexText),\n noteData: vertex,\n rx: radius,\n ry: radius,\n class: cssNoteStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.id,\n tooltip: '',\n type: 'note',\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n padding: getConfig().flowchart?.padding ?? getConfig().class?.padding,\n };\n g.setNode(vertex.id, node);\n log.info('setNode', node);\n\n if (!vertex.class || !classes.has(vertex.class)) {\n return;\n }\n const edgeId = startEdgeId + i;\n\n const edgeData: EdgeData = {\n id: `edgeNote${edgeId}`,\n //Set relationship style and line type\n classes: 'relation',\n pattern: 'dotted',\n // Set link type for rendering\n arrowhead: 'none',\n //Set edge extra labels\n startLabelRight: '',\n endLabelLeft: '',\n //Set relation arrow types\n arrowTypeStart: 'none',\n arrowTypeEnd: 'none',\n style: 'fill:none',\n labelStyle: '',\n curve: interpolateToCurve(conf.curve, curveLinear),\n };\n\n // Add the edge to the graph\n g.setEdge(vertex.id, vertex.class, edgeData, edgeId);\n });\n};\n\n/**\n * Add edges to graph based on parsed graph definition\n *\n * @param relations -\n * @param g - The graph object\n */\nexport const addRelations = function (relations: ClassRelation[], g: graphlib.Graph) {\n const conf = getConfig().flowchart;\n let cnt = 0;\n\n relations.forEach(function (edge) {\n cnt++;\n const edgeData: EdgeData = {\n //Set relationship style and line type\n classes: 'relation',\n pattern: edge.relation.lineType == 1 ? 'dashed' : 'solid',\n id: getEdgeId(edge.id1, edge.id2, {\n prefix: 'id',\n counter: cnt,\n }),\n // Set link type for rendering\n arrowhead: edge.type === 'arrow_open' ? 'none' : 'normal',\n //Set edge extra labels\n startLabelRight: edge.relationTitle1 === 'none' ? '' : edge.relationTitle1,\n endLabelLeft: edge.relationTitle2 === 'none' ? '' : edge.relationTitle2,\n //Set relation arrow types\n arrowTypeStart: getArrowMarker(edge.relation.type1),\n arrowTypeEnd: getArrowMarker(edge.relation.type2),\n style: 'fill:none',\n labelStyle: '',\n curve: interpolateToCurve(conf?.curve, curveLinear),\n };\n\n log.info(edgeData, edge);\n\n if (edge.style !== undefined) {\n const styles = getStylesFromArray(edge.style);\n edgeData.style = styles.style;\n edgeData.labelStyle = styles.labelStyle;\n }\n\n edge.text = edge.title;\n if (edge.text === undefined) {\n if (edge.style !== undefined) {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release\n if (getConfig().flowchart?.htmlLabels ?? getConfig().htmlLabels) {\n edgeData.labelType = 'html';\n edgeData.label = '' + edge.text + '';\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (edge.style === undefined) {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n // Add the edge to the graph\n g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n });\n};\n\n/**\n * Merges the value of `conf` with the passed `cnf`\n *\n * @param cnf - Config to merge\n */\nexport const setConf = function (cnf: any) {\n conf = {\n ...conf,\n ...cnf,\n };\n};\n\n/**\n * Draws a class diagram in the tag with id: id based on the definition in text.\n *\n * @param text -\n * @param id -\n * @param _version -\n * @param diagObj -\n */\nexport const draw = async function (text: string, id: string, _version: string, diagObj: any) {\n log.info('Drawing class - ', id);\n\n // TODO V10: Why flowchart? Might be a mistake when copying.\n const conf = getConfig().flowchart ?? getConfig().class;\n const securityLevel = getConfig().securityLevel;\n log.info('config:', conf);\n const nodeSpacing = conf?.nodeSpacing ?? 50;\n const rankSpacing = conf?.rankSpacing ?? 50;\n\n // Create the input mermaid.graph\n const g: graphlib.Graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: diagObj.db.getDirection(),\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // Fetch the vertices/nodes and edges/links from the parsed graph definition\n const namespaces: NamespaceMap = diagObj.db.getNamespaces();\n const classes: ClassMap = diagObj.db.getClasses();\n const relations: ClassRelation[] = diagObj.db.getRelations();\n const notes: ClassNote[] = diagObj.db.getNotes();\n log.info(relations);\n addNamespaces(namespaces, g, id, diagObj);\n addClasses(classes, g, id, diagObj);\n addRelations(relations, g);\n addNotes(notes, g, relations.length + 1, classes);\n\n // Set up an SVG group so that we can translate the final graph.\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0]!.contentDocument.body)\n : select('body');\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = root.select('#' + id + ' g');\n await render(\n element,\n g,\n ['aggregation', 'extension', 'composition', 'dependency', 'lollipop'],\n 'classDiagram',\n id\n );\n\n utils.insertTitle(svg, 'classTitleText', conf?.titleTopMargin ?? 5, diagObj.db.getDiagramTitle());\n\n setupGraphViewbox(g, svg, conf?.diagramPadding, conf?.useMaxWidth);\n\n // Add label rects for non html labels\n if (!conf?.htmlLabels) {\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0]!.contentDocument : document;\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (const label of labels) {\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n};\n\n/**\n * Gets the arrow marker for a type index\n *\n * @param type - The type to look for\n * @returns The arrow marker\n */\nfunction getArrowMarker(type: number) {\n let marker;\n switch (type) {\n case 0:\n marker = 'aggregation';\n break;\n case 1:\n marker = 'extension';\n break;\n case 2:\n marker = 'composition';\n break;\n case 3:\n marker = 'dependency';\n break;\n case 4:\n marker = 'lollipop';\n break;\n default:\n marker = 'none';\n }\n return marker;\n}\n\nexport default {\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/classDiagram.jison';\nimport db from './classDb.js';\nimport styles from './styles.js';\nimport renderer from './classRenderer-v2.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,16],$V7=[1,17],$V8=[1,18],$V9=[1,19],$Va=[1,32],$Vb=[1,20],$Vc=[1,21],$Vd=[1,22],$Ve=[1,23],$Vf=[1,24],$Vg=[1,26],$Vh=[1,27],$Vi=[1,28],$Vj=[1,29],$Vk=[1,30],$Vl=[1,31],$Vm=[1,34],$Vn=[1,35],$Vo=[1,36],$Vp=[1,37],$Vq=[1,33],$Vr=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$Vs=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NL\":5,\"SD\":6,\"document\":7,\"line\":8,\"statement\":9,\"classDefStatement\":10,\"styleStatement\":11,\"cssClassStatement\":12,\"idStatement\":13,\"DESCR\":14,\"-->\":15,\"HIDE_EMPTY\":16,\"scale\":17,\"WIDTH\":18,\"COMPOSIT_STATE\":19,\"STRUCT_START\":20,\"STRUCT_STOP\":21,\"STATE_DESCR\":22,\"AS\":23,\"ID\":24,\"FORK\":25,\"JOIN\":26,\"CHOICE\":27,\"CONCURRENT\":28,\"note\":29,\"notePosition\":30,\"NOTE_TEXT\":31,\"direction\":32,\"acc_title\":33,\"acc_title_value\":34,\"acc_descr\":35,\"acc_descr_value\":36,\"acc_descr_multiline_value\":37,\"classDef\":38,\"CLASSDEF_ID\":39,\"CLASSDEF_STYLEOPTS\":40,\"DEFAULT\":41,\"style\":42,\"STYLE_IDS\":43,\"STYLEDEF_STYLEOPTS\":44,\"class\":45,\"CLASSENTITY_IDS\":46,\"STYLECLASS\":47,\"direction_tb\":48,\"direction_bt\":49,\"direction_rl\":50,\"direction_lr\":51,\"eol\":52,\";\":53,\"EDGE_STATE\":54,\"STYLE_SEPARATOR\":55,\"left_of\":56,\"right_of\":57,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NL\",6:\"SD\",14:\"DESCR\",15:\"-->\",16:\"HIDE_EMPTY\",17:\"scale\",18:\"WIDTH\",19:\"COMPOSIT_STATE\",20:\"STRUCT_START\",21:\"STRUCT_STOP\",22:\"STATE_DESCR\",23:\"AS\",24:\"ID\",25:\"FORK\",26:\"JOIN\",27:\"CHOICE\",28:\"CONCURRENT\",29:\"note\",31:\"NOTE_TEXT\",33:\"acc_title\",34:\"acc_title_value\",35:\"acc_descr\",36:\"acc_descr_value\",37:\"acc_descr_multiline_value\",38:\"classDef\",39:\"CLASSDEF_ID\",40:\"CLASSDEF_STYLEOPTS\",41:\"DEFAULT\",42:\"style\",43:\"STYLE_IDS\",44:\"STYLEDEF_STYLEOPTS\",45:\"class\",46:\"CLASSENTITY_IDS\",47:\"STYLECLASS\",48:\"direction_tb\",49:\"direction_bt\",50:\"direction_rl\",51:\"direction_lr\",53:\";\",54:\"EDGE_STATE\",55:\"STYLE_SEPARATOR\",56:\"left_of\",57:\"right_of\"},\nproductions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n /* console.log('--> Root document', $$[$0]); */ yy.setRootDoc($$[$0]); return $$[$0]; \nbreak;\ncase 4:\n /*console.log('empty document'); */ this.$ = [] \nbreak;\ncase 5:\n\n if($$[$0] !='nl'){\n /* console.log(' document: 1: ', $$[$0-1], ' pushing 2: ', $$[$0]); */\n $$[$0-1].push($$[$0]); this.$ = $$[$0-1]\n }\n /* console.log('Got document',$$[$0-1], $$[$0]); */\n \nbreak;\ncase 6: case 7:\n this.$ = $$[$0] \nbreak;\ncase 8:\n this.$='nl';\nbreak;\ncase 12:\n /* console.log('got id', $$[$0]); */\n this.$=$$[$0];\n\t \nbreak;\ncase 13:\n\n const stateStmt = $$[$0-1];\n stateStmt.description = yy.trimColon($$[$0]);\n this.$ = stateStmt;\n\t \nbreak;\ncase 14:\n\n /* console.info('got ids: 1: ', $$[$0-2], ' 2:', $$[$0-1],' 3: ', $$[$0]); */\n // console.log(' idStatement --> idStatement : state1 =', $$[$0-2], ' state2 =', $$[$0]);\n this.$={ stmt: 'relation', state1: $$[$0-2], state2: $$[$0]};\n \nbreak;\ncase 15:\n\n const relDescription = yy.trimColon($$[$0]);\n /* console.log(' idStatement --> idStatement DESCR : state1 =', $$[$0-3], ' state2stmt =', $$[$0-1], ' description: ', relDescription); */\n this.$={ stmt: 'relation', state1: $$[$0-3], state2: $$[$0-1], description: relDescription};\n \nbreak;\ncase 19:\n\n // console.log('Adding document for state without id ', $$[$0-3]);\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] }\n \nbreak;\ncase 20:\n\n var id=$$[$0];\n var description = $$[$0-2].trim();\n if($$[$0].match(':')){\n var parts = $$[$0].split(':');\n id=parts[0];\n description = [description, parts[1]];\n }\n this.$={stmt: 'state', id: id, type: 'default', description: description};\n\n \nbreak;\ncase 21:\n\n // console.log('state with id ', $$[$0-3],' document = ', $$[$0-1], );\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] }\n \nbreak;\ncase 22:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'fork' }\n \nbreak;\ncase 23:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'join' }\n \nbreak;\ncase 24:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'choice' }\n \nbreak;\ncase 25:\n\n this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }\n \nbreak;\ncase 26:\n\n /* console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/\n this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}};\n \nbreak;\ncase 29:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 30: case 31:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 32: case 33:\n\n this.$ = { stmt: 'classDef', id: $$[$0-1].trim(), classes: $$[$0].trim() };\n \nbreak;\ncase 34:\n\n this.$ = { stmt: 'style', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 35:\n\n //console.log('apply class: id(s): ',$$[$0-1], ' style class: ', $$[$0]);\n this.$={ stmt: 'applyClass', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 36:\n yy.setDirection('TB');this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 37:\n yy.setDirection('BT');this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 38:\n yy.setDirection('RL'); this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 39:\n yy.setDirection('LR');this.$={stmt:'dir', value:'LR'};\nbreak;\ncase 42: case 43:\n /* console.log('idStatement id: ', $$[$0]); */\n this.$={ stmt: 'state', id: $$[$0].trim(), type: 'default', description: '' };\n \nbreak;\ncase 44:\n /*console.log('idStatement ID STYLE_SEPARATOR ID'); */\n this.$={ stmt: 'state', id: $$[$0-2].trim(), classes: [$$[$0].trim()], type: 'default', description: '' };\n \nbreak;\ncase 45:\n /*console.log('idStatement EDGE_STATE STYLE_SEPARATOR ID'); */\n this.$={ stmt: 'state', id: $$[$0-2].trim(), classes: [$$[$0].trim()], type: 'default', description: '' };\n \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,7]),o($Vr,[2,8]),o($Vr,[2,9]),o($Vr,[2,10]),o($Vr,[2,11]),o($Vr,[2,12],{14:[1,39],15:[1,40]}),o($Vr,[2,16]),{18:[1,41]},o($Vr,[2,18],{20:[1,42]}),{23:[1,43]},o($Vr,[2,22]),o($Vr,[2,23]),o($Vr,[2,24]),o($Vr,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},o($Vr,[2,28]),{34:[1,48]},{36:[1,49]},o($Vr,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},o($Vs,[2,42],{55:[1,54]}),o($Vs,[2,43],{55:[1,55]}),o($Vr,[2,36]),o($Vr,[2,37]),o($Vr,[2,38]),o($Vr,[2,39]),o($Vr,[2,6]),o($Vr,[2,13]),{13:56,24:$Va,54:$Vq},o($Vr,[2,17]),o($Vt,$V3,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},o($Vr,[2,29]),o($Vr,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},o($Vr,[2,14],{14:[1,67]}),{4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,21:[1,68],22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},o($Vr,[2,32]),o($Vr,[2,33]),o($Vr,[2,34]),o($Vr,[2,35]),o($Vs,[2,44]),o($Vs,[2,45]),o($Vr,[2,15]),o($Vr,[2,19]),o($Vt,$V3,{7:72}),o($Vr,[2,26]),o($Vr,[2,27]),{4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,21:[1,73],22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,21])],\ndefaultActions: {5:[2,1],6:[2,2],46:[2,46],47:[2,47]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 41;\nbreak;\ncase 1:return 48;\nbreak;\ncase 2:return 49;\nbreak;\ncase 3:return 50;\nbreak;\ncase 4:return 51;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */{ /*console.log('Crap after close');*/ }\nbreak;\ncase 7:return 5;\nbreak;\ncase 8:/* skip all whitespace */\nbreak;\ncase 9:/* skip same-line whitespace */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:/* skip comments */\nbreak;\ncase 12: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 17; \nbreak;\ncase 13:return 18;\nbreak;\ncase 14: this.popState(); \nbreak;\ncase 15: this.begin(\"acc_title\");return 33; \nbreak;\ncase 16: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 17: this.begin(\"acc_descr\");return 35; \nbreak;\ncase 18: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 19: this.begin(\"acc_descr_multiline\"); \nbreak;\ncase 20: this.popState(); \nbreak;\ncase 21:return \"acc_descr_multiline_value\";\nbreak;\ncase 22: this.pushState('CLASSDEF'); return 38; \nbreak;\ncase 23: this.popState(); this.pushState('CLASSDEFID'); return 'DEFAULT_CLASSDEF_ID' \nbreak;\ncase 24: this.popState(); this.pushState('CLASSDEFID'); return 39 \nbreak;\ncase 25: this.popState(); return 40 \nbreak;\ncase 26: this.pushState('CLASS'); return 45; \nbreak;\ncase 27: this.popState(); this.pushState('CLASS_STYLE'); return 46 \nbreak;\ncase 28: this.popState(); return 47 \nbreak;\ncase 29: this.pushState('STYLE'); return 42; \nbreak;\ncase 30: this.popState(); this.pushState('STYLEDEF_STYLES'); return 43 \nbreak;\ncase 31: this.popState(); return 44 \nbreak;\ncase 32: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 17; \nbreak;\ncase 33:return 18;\nbreak;\ncase 34:this.popState();\nbreak;\ncase 35: /* console.log('Starting STATE '); */ this.pushState('STATE'); \nbreak;\ncase 36:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 25;\nbreak;\ncase 37:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 26;\nbreak;\ncase 38:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 27;\nbreak;\ncase 39:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 25;\nbreak;\ncase 40:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 26;\nbreak;\ncase 41:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 27;\nbreak;\ncase 42: return 48;\nbreak;\ncase 43: return 49;\nbreak;\ncase 44: return 50;\nbreak;\ncase 45: return 51;\nbreak;\ncase 46: /* console.log('Starting STATE_STRING'); */ this.pushState(\"STATE_STRING\"); \nbreak;\ncase 47: this.pushState('STATE_ID'); /* console.log('pushState(STATE_ID)'); */ return \"AS\"; \nbreak;\ncase 48: this.popState(); /* console.log('STATE_ID', yy_.yytext); */ return \"ID\"; \nbreak;\ncase 49: this.popState(); \nbreak;\ncase 50: /* console.log('Long description:', yy_.yytext); */ return \"STATE_DESCR\"; \nbreak;\ncase 51: /* console.log('COMPOSIT_STATE', yy_.yytext); */ return 19; \nbreak;\ncase 52: this.popState(); \nbreak;\ncase 53: this.popState(); this.pushState('struct'); /* console.log('begin struct', yy_.yytext); */ return 20; \nbreak;\ncase 54:/* skip comments inside state*/\nbreak;\ncase 55: /*console.log('Ending struct');*/ this.popState(); return 21;\nbreak;\ncase 56:/* nothing */\nbreak;\ncase 57: this.begin('NOTE'); return 29; \nbreak;\ncase 58: this.popState(); this.pushState('NOTE_ID'); return 56; \nbreak;\ncase 59: this.popState(); this.pushState('NOTE_ID'); return 57; \nbreak;\ncase 60: this.popState(); this.pushState('FLOATING_NOTE'); \nbreak;\ncase 61: this.popState(); this.pushState('FLOATING_NOTE_ID'); return \"AS\"; \nbreak;\ncase 62:/**/\nbreak;\ncase 63: /* console.log('Floating note text: ', yy_.yytext); */ return \"NOTE_TEXT\"; \nbreak;\ncase 64: this.popState(); /* console.log('Floating note ID', yy_.yytext);*/ return \"ID\"; \nbreak;\ncase 65: this.popState(); this.pushState('NOTE_TEXT'); /*console.log('Got ID for note', yy_.yytext);*/ return 24; \nbreak;\ncase 66: this.popState(); /* console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim(); return 31; \nbreak;\ncase 67: this.popState(); /* console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim(); return 31; \nbreak;\ncase 68: /* console.log('Got state diagram', yy_.yytext,'#'); */ return 6; \nbreak;\ncase 69: /* console.log('Got state diagram', yy_.yytext,'#'); */ return 6; \nbreak;\ncase 70: /* console.log('HIDE_EMPTY', yy_.yytext,'#'); */ return 16; \nbreak;\ncase 71: /* console.log('EDGE_STATE=',yy_.yytext); */ return 54; \nbreak;\ncase 72: /* console.log('=>ID=',yy_.yytext); */ return 24; \nbreak;\ncase 73: yy_.yytext = yy_.yytext.trim(); /* console.log('Descr = ', yy_.yytext); */ return 14; \nbreak;\ncase 74:return 15;\nbreak;\ncase 75:return 28;\nbreak;\ncase 76:return 55;\nbreak;\ncase 77:return 5;\nbreak;\ncase 78:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:default\\b)/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:[\\s]+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:classDef\\s+)/i,/^(?:DEFAULT\\s+)/i,/^(?:\\w+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:class\\s+)/i,/^(?:(\\w+)+((,\\s*\\w+)*))/i,/^(?:[^\\n]*)/i,/^(?:style\\s+)/i,/^(?:[\\w,]+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:state\\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\\[\\[fork\\]\\])/i,/^(?:.*\\[\\[join\\]\\])/i,/^(?:.*\\[\\[choice\\]\\])/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:[\"])/i,/^(?:\\s*as\\s+)/i,/^(?:[^\\n\\{]*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n\\s\\{]+)/i,/^(?:\\n)/i,/^(?:\\{)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:\\})/i,/^(?:[\\n])/i,/^(?:note\\s+)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:\")/i,/^(?:\\s*as\\s*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n]*)/i,/^(?:\\s*[^:\\n\\s\\-]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:[\\s\\S]*?end note\\b)/i,/^(?:stateDiagram\\s+)/i,/^(?:stateDiagram-v2\\s+)/i,/^(?:hide empty description\\b)/i,/^(?:\\[\\*\\])/i,/^(?:[^:\\n\\s\\-\\{]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"LINE\":{\"rules\":[9,10],\"inclusive\":false},\"struct\":{\"rules\":[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],\"inclusive\":false},\"FLOATING_NOTE_ID\":{\"rules\":[64],\"inclusive\":false},\"FLOATING_NOTE\":{\"rules\":[61,62,63],\"inclusive\":false},\"NOTE_TEXT\":{\"rules\":[66,67],\"inclusive\":false},\"NOTE_ID\":{\"rules\":[65],\"inclusive\":false},\"NOTE\":{\"rules\":[58,59,60],\"inclusive\":false},\"STYLEDEF_STYLEOPTS\":{\"rules\":[],\"inclusive\":false},\"STYLEDEF_STYLES\":{\"rules\":[31],\"inclusive\":false},\"STYLE_IDS\":{\"rules\":[],\"inclusive\":false},\"STYLE\":{\"rules\":[30],\"inclusive\":false},\"CLASS_STYLE\":{\"rules\":[28],\"inclusive\":false},\"CLASS\":{\"rules\":[27],\"inclusive\":false},\"CLASSDEFID\":{\"rules\":[25],\"inclusive\":false},\"CLASSDEF\":{\"rules\":[23,24],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[20,21],\"inclusive\":false},\"acc_descr\":{\"rules\":[18],\"inclusive\":false},\"acc_title\":{\"rules\":[16],\"inclusive\":false},\"SCALE\":{\"rules\":[13,14,33,34],\"inclusive\":false},\"ALIAS\":{\"rules\":[],\"inclusive\":false},\"STATE_ID\":{\"rules\":[48],\"inclusive\":false},\"STATE_STRING\":{\"rules\":[49,50],\"inclusive\":false},\"FORK_STATE\":{\"rules\":[],\"inclusive\":false},\"STATE\":{\"rules\":[9,10,36,37,38,39,40,41,46,47,51,52,53],\"inclusive\":false},\"ID\":{\"rules\":[9,10],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "/**\n * Constants common to all State Diagram code\n */\n\n// default diagram direction\nexport const DEFAULT_DIAGRAM_DIRECTION = 'LR';\n\n// default direction for any nested documents (composites)\nexport const DEFAULT_NESTED_DOC_DIR = 'TB';\n\n// parsed statement type for a state\nexport const STMT_STATE = 'state';\n// parsed statement type for a relation\nexport const STMT_RELATION = 'relation';\n// parsed statement type for a classDef\nexport const STMT_CLASSDEF = 'classDef';\nexport const STMT_STYLEDEF = 'style';\n// parsed statement type for applyClass\nexport const STMT_APPLYCLASS = 'applyClass';\n\nexport const DEFAULT_STATE_TYPE = 'default';\nexport const DIVIDER_TYPE = 'divider';\n\n// Graph edge settings\nexport const G_EDGE_STYLE = 'fill:none';\nexport const G_EDGE_ARROWHEADSTYLE = 'fill: #333';\nexport const G_EDGE_LABELPOS = 'c';\nexport const G_EDGE_LABELTYPE = 'text';\nexport const G_EDGE_THICKNESS = 'normal';\n\nexport const SHAPE_STATE = 'rect';\nexport const SHAPE_STATE_WITH_DESC = 'rectWithTitle';\nexport const SHAPE_START = 'stateStart';\nexport const SHAPE_END = 'stateEnd';\nexport const SHAPE_DIVIDER = 'divider';\nexport const SHAPE_GROUP = 'roundedWithTitle';\nexport const SHAPE_NOTE = 'note';\nexport const SHAPE_NOTEGROUP = 'noteGroup';\n\n// CSS classes\nexport const CSS_DIAGRAM = 'statediagram';\nexport const CSS_STATE = 'state';\nexport const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;\nexport const CSS_EDGE = 'transition';\nexport const CSS_NOTE = 'note';\nexport const CSS_NOTE_EDGE = 'note-edge';\nexport const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;\nexport const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;\nexport const CSS_CLUSTER = 'cluster';\nexport const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;\nexport const CSS_CLUSTER_ALT = 'cluster-alt';\nexport const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;\n\nexport const PARENT = 'parent';\nexport const NOTE = 'note';\nexport const DOMID_STATE = 'state';\nexport const DOMID_TYPE_SPACER = '----';\nexport const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;\nexport const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;\n// --------------------------------------\n\nexport default {\n DEFAULT_DIAGRAM_DIRECTION,\n DEFAULT_NESTED_DOC_DIR,\n STMT_STATE,\n STMT_RELATION,\n STMT_CLASSDEF,\n STMT_STYLEDEF,\n STMT_APPLYCLASS,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n G_EDGE_STYLE,\n G_EDGE_ARROWHEADSTYLE,\n G_EDGE_LABELPOS,\n G_EDGE_LABELTYPE,\n G_EDGE_THICKNESS,\n CSS_EDGE,\n CSS_DIAGRAM,\n SHAPE_STATE,\n SHAPE_STATE_WITH_DESC,\n SHAPE_START,\n SHAPE_END,\n SHAPE_DIVIDER,\n SHAPE_GROUP,\n SHAPE_NOTE,\n SHAPE_NOTEGROUP,\n CSS_STATE,\n CSS_DIAGRAM_STATE,\n CSS_NOTE,\n CSS_NOTE_EDGE,\n CSS_EDGE_NOTE_EDGE,\n CSS_DIAGRAM_NOTE,\n CSS_CLUSTER,\n CSS_DIAGRAM_CLUSTER,\n CSS_CLUSTER_ALT,\n CSS_DIAGRAM_CLUSTER_ALT,\n PARENT,\n NOTE,\n DOMID_STATE,\n DOMID_TYPE_SPACER,\n NOTE_ID,\n PARENT_ID,\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport {\n CSS_DIAGRAM_CLUSTER,\n CSS_DIAGRAM_CLUSTER_ALT,\n CSS_DIAGRAM_NOTE,\n CSS_DIAGRAM_STATE,\n CSS_EDGE,\n CSS_EDGE_NOTE_EDGE,\n DEFAULT_NESTED_DOC_DIR,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n DOMID_STATE,\n DOMID_TYPE_SPACER,\n G_EDGE_ARROWHEADSTYLE,\n G_EDGE_LABELPOS,\n G_EDGE_LABELTYPE,\n G_EDGE_STYLE,\n G_EDGE_THICKNESS,\n NOTE,\n NOTE_ID,\n PARENT,\n PARENT_ID,\n SHAPE_DIVIDER,\n SHAPE_END,\n SHAPE_GROUP,\n SHAPE_NOTE,\n SHAPE_NOTEGROUP,\n SHAPE_START,\n SHAPE_STATE,\n SHAPE_STATE_WITH_DESC,\n STMT_RELATION,\n STMT_STATE,\n} from './stateCommon.js';\n\n// List of nodes created from the parsed diagram statement items\nlet nodeDb = new Map();\n\nlet graphItemCount = 0; // used to construct ids, etc.\n\n/**\n * Create a standard string for the dom ID of an item.\n * If a type is given, insert that before the counter, preceded by the type spacer\n *\n * @param itemId\n * @param counter\n * @param {string | null} type\n * @param typeSpacer\n * @returns {string}\n */\nexport function stateDomId(itemId = '', counter = 0, type = '', typeSpacer = DOMID_TYPE_SPACER) {\n const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : '';\n return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;\n}\n\nconst setupDoc = (parentParsedItem, doc, diagramStates, nodes, edges, altFlag, look, classes) => {\n // graphItemCount = 0;\n log.trace('items', doc);\n doc.forEach((item) => {\n switch (item.stmt) {\n case STMT_STATE:\n dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);\n break;\n case DEFAULT_STATE_TYPE:\n dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);\n break;\n case STMT_RELATION:\n {\n dataFetcher(\n parentParsedItem,\n item.state1,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n );\n dataFetcher(\n parentParsedItem,\n item.state2,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n );\n const edgeData = {\n id: 'edge' + graphItemCount,\n start: item.state1.id,\n end: item.state2.id,\n arrowhead: 'normal',\n arrowTypeEnd: 'arrow_barb',\n style: G_EDGE_STYLE,\n labelStyle: '',\n label: common.sanitizeText(item.description, getConfig()),\n arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n labelpos: G_EDGE_LABELPOS,\n labelType: G_EDGE_LABELTYPE,\n thickness: G_EDGE_THICKNESS,\n classes: CSS_EDGE,\n look,\n };\n edges.push(edgeData);\n graphItemCount++;\n }\n break;\n }\n });\n};\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param {object[]} parsedItem - the parsed statement item to look through\n * @param [defaultDir] - the direction to use if none is found\n * @returns {string}\n */\nconst getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n let dir = defaultDir;\n if (parsedItem.doc) {\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n }\n return dir;\n};\n\nfunction insertOrUpdateNode(nodes, nodeData, classes) {\n if (!nodeData.id || nodeData.id === '' || nodeData.id === '') {\n return;\n }\n\n //Populate node style attributes if nodeData has classes defined\n if (nodeData.cssClasses) {\n if (!Array.isArray(nodeData.cssCompiledStyles)) {\n nodeData.cssCompiledStyles = [];\n }\n\n nodeData.cssClasses.split(' ').forEach((cssClass) => {\n if (classes.get(cssClass)) {\n const classDef = classes.get(cssClass);\n nodeData.cssCompiledStyles = [...nodeData.cssCompiledStyles, ...classDef.styles];\n }\n });\n }\n const existingNodeData = nodes.find((node) => node.id === nodeData.id);\n if (existingNodeData) {\n //update the existing nodeData\n Object.assign(existingNodeData, nodeData);\n } else {\n nodes.push(nodeData);\n }\n}\n/**\n * Get classes from the db for the info item.\n * If there aren't any or if dbInfoItem isn't defined, return an empty string.\n * Else create 1 string from the list of classes found\n *\n * @param {undefined | null | object} dbInfoItem\n * @returns {string}\n */\nfunction getClassesFromDbInfo(dbInfoItem) {\n return dbInfoItem?.classes?.join(' ') ?? '';\n}\n\nfunction getStylesFromDbInfo(dbInfoItem) {\n return dbInfoItem?.styles ?? [];\n}\n\nexport const dataFetcher = (\n parent,\n parsedItem,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n) => {\n const itemId = parsedItem.id;\n const dbState = diagramStates.get(itemId);\n const classStr = getClassesFromDbInfo(dbState);\n const style = getStylesFromDbInfo(dbState);\n\n log.info('dataFetcher parsedItem', parsedItem, dbState, style);\n\n if (itemId !== 'root') {\n let shape = SHAPE_STATE;\n // The if === true / false can be removed if we can guarantee that the parsedItem.start is always a boolean\n if (parsedItem.start === true) {\n shape = SHAPE_START;\n } else if (parsedItem.start === false) {\n shape = SHAPE_END;\n }\n if (parsedItem.type !== DEFAULT_STATE_TYPE) {\n shape = parsedItem.type;\n }\n\n // Add the node to our list (nodeDb)\n if (!nodeDb.get(itemId)) {\n nodeDb.set(itemId, {\n id: itemId,\n shape,\n description: common.sanitizeText(itemId, getConfig()),\n cssClasses: `${classStr} ${CSS_DIAGRAM_STATE}`,\n cssStyles: style,\n });\n }\n\n const newNode = nodeDb.get(itemId);\n\n // Save data for description and group so that for instance a statement without description overwrites\n // one with description @todo TODO What does this mean? If important, add a test for it\n\n // Build of the array of description strings\n if (parsedItem.description) {\n if (Array.isArray(newNode.description)) {\n // There already is an array of strings,add to it\n newNode.shape = SHAPE_STATE_WITH_DESC;\n newNode.description.push(parsedItem.description);\n } else {\n if (newNode.description?.length > 0) {\n // if there is a description already transform it to an array\n newNode.shape = SHAPE_STATE_WITH_DESC;\n if (newNode.description === itemId) {\n // If the previous description was this, remove it\n newNode.description = [parsedItem.description];\n } else {\n newNode.description = [newNode.description, parsedItem.description];\n }\n } else {\n newNode.shape = SHAPE_STATE;\n newNode.description = parsedItem.description;\n }\n }\n newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig());\n }\n\n // If there's only 1 description entry, just use a regular state shape\n if (newNode.description?.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {\n if (newNode.type === 'group') {\n newNode.shape = SHAPE_GROUP;\n } else {\n newNode.shape = SHAPE_STATE;\n }\n }\n\n // group\n if (!newNode.type && parsedItem.doc) {\n log.info('Setting cluster for XCX', itemId, getDir(parsedItem));\n newNode.type = 'group';\n newNode.isGroup = true;\n newNode.dir = getDir(parsedItem);\n newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;\n newNode.cssClasses = `${newNode.cssClasses} ${CSS_DIAGRAM_CLUSTER} ${altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ''}`;\n }\n\n // This is what will be added to the graph\n const nodeData = {\n labelStyle: '',\n shape: newNode.shape,\n label: newNode.description,\n cssClasses: newNode.cssClasses,\n cssCompiledStyles: [],\n cssStyles: newNode.cssStyles,\n id: itemId,\n dir: newNode.dir,\n domId: stateDomId(itemId, graphItemCount),\n type: newNode.type,\n isGroup: newNode.type === 'group',\n padding: 8,\n rx: 10,\n ry: 10,\n look,\n };\n\n // Clear the label for dividers who have no description\n if (nodeData.shape === SHAPE_DIVIDER) {\n nodeData.label = '';\n }\n\n if (parent && parent.id !== 'root') {\n log.trace('Setting node ', itemId, ' to be child of its parent ', parent.id);\n nodeData.parentId = parent.id;\n }\n\n nodeData.centerLabel = true;\n\n if (parsedItem.note) {\n // Todo: set random id\n const noteData = {\n labelStyle: '',\n shape: SHAPE_NOTE,\n label: parsedItem.note.text,\n cssClasses: CSS_DIAGRAM_NOTE,\n // useHtmlLabels: false,\n cssStyles: [],\n cssCompilesStyles: [],\n id: itemId + NOTE_ID + '-' + graphItemCount,\n domId: stateDomId(itemId, graphItemCount, NOTE),\n type: newNode.type,\n isGroup: newNode.type === 'group',\n padding: getConfig().flowchart.padding,\n look,\n position: parsedItem.note.position,\n };\n const parentNodeId = itemId + PARENT_ID;\n const groupData = {\n labelStyle: '',\n shape: SHAPE_NOTEGROUP,\n label: parsedItem.note.text,\n cssClasses: newNode.cssClasses,\n cssStyles: [],\n id: itemId + PARENT_ID,\n domId: stateDomId(itemId, graphItemCount, PARENT),\n type: 'group',\n isGroup: true,\n padding: 16, //getConfig().flowchart.padding\n look,\n position: parsedItem.note.position,\n };\n graphItemCount++;\n\n //add parent id to groupData\n groupData.id = parentNodeId;\n //add parent id to noteData\n noteData.parentId = parentNodeId;\n //nodeData.parentId = parentNodeId;\n\n //insert groupData\n insertOrUpdateNode(nodes, groupData, classes);\n //insert noteData\n insertOrUpdateNode(nodes, noteData, classes);\n //insert nodeData\n insertOrUpdateNode(nodes, nodeData, classes);\n\n let from = itemId;\n let to = noteData.id;\n\n if (parsedItem.note.position === 'left of') {\n from = noteData.id;\n to = itemId;\n }\n\n edges.push({\n id: from + '-' + to,\n start: from,\n end: to,\n arrowhead: 'none',\n arrowTypeEnd: '',\n style: G_EDGE_STYLE,\n labelStyle: '',\n classes: CSS_EDGE_NOTE_EDGE,\n arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n labelpos: G_EDGE_LABELPOS,\n labelType: G_EDGE_LABELTYPE,\n thickness: G_EDGE_THICKNESS,\n look,\n });\n } else {\n insertOrUpdateNode(nodes, nodeData, classes);\n }\n }\n if (parsedItem.doc) {\n log.trace('Adding nodes children ');\n setupDoc(parsedItem, parsedItem.doc, diagramStates, nodes, edges, !altFlag, look, classes);\n }\n};\n\nexport const reset = () => {\n nodeDb.clear();\n graphItemCount = 0;\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramStyleClassDef } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { getDiagramElement } from '../../rendering-util/insertElementsForSize.js';\nimport { render } from '../../rendering-util/render.js';\nimport { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';\nimport type { LayoutData } from '../../rendering-util/types.js';\nimport utils from '../../utils.js';\nimport { CSS_DIAGRAM, DEFAULT_NESTED_DOC_DIR } from './stateCommon.js';\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param parsedItem - the parsed statement item to look through\n * @param defaultDir - the direction to use if none is found\n * @returns The direction to use\n */\nexport const getDir = (parsedItem: any, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n if (!parsedItem.doc) {\n return defaultDir;\n }\n\n let dir = defaultDir;\n\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n\n return dir;\n};\n\nexport const getClasses = function (\n text: string,\n diagramObj: any\n): Map {\n diagramObj.db.extract(diagramObj.db.getRootDocV2());\n return diagramObj.db.getClasses();\n};\n\nexport const draw = async function (text: string, id: string, _version: string, diag: any) {\n log.info('REF0:');\n log.info('Drawing state diagram (v2)', id);\n const { securityLevel, state: conf, layout } = getConfig();\n // Extracting the data from the parsed structure into a more usable form\n // Not related to the refactoring, but this is the first step in the rendering process\n diag.db.extract(diag.db.getRootDocV2());\n\n //const DIR = getDir(diag.db.getRootDocV2());\n\n // The getData method provided in all supported diagrams is used to extract the data from the parsed structure\n // into the Layout data format\n const data4Layout = diag.db.getData() as LayoutData;\n\n // Create the root SVG - the element is the div containing the SVG element\n const svg = getDiagramElement(id, securityLevel);\n\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = layout;\n\n // TODO: Should we move these two to baseConfig? These types are not there in StateConfig.\n\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = ['barb'];\n data4Layout.diagramId = id;\n // console.log('REF1:', data4Layout);\n await render(data4Layout, svg);\n const padding = 8;\n utils.insertTitle(\n svg,\n 'statediagramTitleText',\n conf?.titleTopMargin ?? 25,\n diag.db.getDiagramTitle()\n );\n setupViewPortForSVG(svg, padding, CSS_DIAGRAM, conf?.useMaxWidth ?? true);\n};\n\nexport default {\n getClasses,\n draw,\n getDir,\n};\n", "import { log } from '../../logger.js';\nimport { generateId } from '../../utils.js';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport { dataFetcher, reset as resetDataFetching } from './dataFetcher.js';\nimport { getDir } from './stateRenderer-v3-unified.js';\n\nimport {\n DEFAULT_DIAGRAM_DIRECTION,\n STMT_STATE,\n STMT_RELATION,\n STMT_CLASSDEF,\n STMT_STYLEDEF,\n STMT_APPLYCLASS,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n} from './stateCommon.js';\n\nconst START_NODE = '[*]';\nconst START_TYPE = 'start';\nconst END_NODE = START_NODE;\nconst END_TYPE = 'end';\n\nconst COLOR_KEYWORD = 'color';\nconst FILL_KEYWORD = 'fill';\nconst BG_FILL = 'bgFill';\nconst STYLECLASS_SEP = ',';\n\n/**\n * Returns a new list of classes.\n * In the future, this can be replaced with a class common to all diagrams.\n * ClassDef information = { id: id, styles: [], textStyles: [] }\n *\n * @returns {Map}\n */\nfunction newClassesList() {\n return new Map();\n}\n\nlet nodes = [];\nlet edges = [];\n\nlet direction = DEFAULT_DIAGRAM_DIRECTION;\nlet rootDoc = [];\nlet classes = newClassesList(); // style classes defined by a classDef\n\n// --------------------------------------\n\nconst newDoc = () => {\n return {\n /** @type {{ id1: string, id2: string, relationTitle: string }[]} */\n relations: [],\n states: new Map(),\n documents: {},\n };\n};\nlet documents = {\n root: newDoc(),\n};\n\nlet currentDocument = documents.root;\nlet startEndCount = 0;\nlet dividerCnt = 0;\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n};\n\nconst clone = (o) => JSON.parse(JSON.stringify(o));\n\nconst setRootDoc = (o) => {\n log.info('Setting root doc', o);\n // rootDoc = { id: 'root', doc: o };\n rootDoc = o;\n};\n\nconst getRootDoc = () => rootDoc;\n\nconst docTranslator = (parent, node, first) => {\n if (node.stmt === STMT_RELATION) {\n docTranslator(parent, node.state1, true);\n docTranslator(parent, node.state2, false);\n } else {\n if (node.stmt === STMT_STATE) {\n if (node.id === '[*]') {\n node.id = first ? parent.id + '_start' : parent.id + '_end';\n node.start = first;\n } else {\n // This is just a plain state, not a start or end\n node.id = node.id.trim();\n }\n }\n\n if (node.doc) {\n const doc = [];\n // Check for concurrency\n let currentDoc = [];\n let i;\n for (i = 0; i < node.doc.length; i++) {\n if (node.doc[i].type === DIVIDER_TYPE) {\n // debugger;\n const newNode = clone(node.doc[i]);\n newNode.doc = clone(currentDoc);\n doc.push(newNode);\n currentDoc = [];\n } else {\n currentDoc.push(node.doc[i]);\n }\n }\n\n // If any divider was encountered\n if (doc.length > 0 && currentDoc.length > 0) {\n const newNode = {\n stmt: STMT_STATE,\n id: generateId(),\n type: 'divider',\n doc: clone(currentDoc),\n };\n doc.push(clone(newNode));\n node.doc = doc;\n }\n\n node.doc.forEach((docNode) => docTranslator(node, docNode, true));\n }\n }\n};\nconst getRootDocV2 = () => {\n docTranslator({ id: 'root' }, { id: 'root', doc: rootDoc }, true);\n return { id: 'root', doc: rootDoc };\n // Here\n};\n\n/**\n * Convert all of the statements (stmts) that were parsed into states and relationships.\n * This is done because a state diagram may have nested sections,\n * where each section is a 'document' and has its own set of statements.\n * Ex: the section within a fork has its own statements, and incoming and outgoing statements\n * refer to the fork as a whole (document).\n * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.\n * This will push the statement into the list of statements for the current document.\n *\n * @param _doc\n */\nconst extract = (_doc) => {\n // const res = { states: [], relations: [] };\n let doc;\n if (_doc.doc) {\n doc = _doc.doc;\n } else {\n doc = _doc;\n }\n // let doc = root.doc;\n // if (!doc) {\n // doc = root;\n // }\n log.info(doc);\n clear(true);\n\n log.info('Extract initial document:', doc);\n\n doc.forEach((item) => {\n log.warn('Statement', item.stmt);\n switch (item.stmt) {\n case STMT_STATE:\n addState(\n item.id.trim(),\n item.type,\n item.doc,\n item.description,\n item.note,\n item.classes,\n item.styles,\n item.textStyles\n );\n break;\n case STMT_RELATION:\n addRelation(item.state1, item.state2, item.description);\n break;\n case STMT_CLASSDEF:\n addStyleClass(item.id.trim(), item.classes);\n break;\n case STMT_STYLEDEF:\n {\n const ids = item.id.trim().split(',');\n const styles = item.styleClass.split(',');\n ids.forEach((id) => {\n let foundState = getState(id);\n if (foundState === undefined) {\n const trimmedId = id.trim();\n addState(trimmedId);\n foundState = getState(trimmedId);\n }\n foundState.styles = styles.map((s) => s.replace(/;/g, '')?.trim());\n });\n }\n break;\n case STMT_APPLYCLASS:\n setCssClass(item.id.trim(), item.styleClass);\n break;\n }\n });\n\n const diagramStates = getStates();\n const config = getConfig();\n const look = config.look;\n resetDataFetching();\n dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);\n nodes.forEach((node) => {\n if (Array.isArray(node.label)) {\n // add the rest as description\n node.description = node.label.slice(1);\n if (node.isGroup && node.description.length > 0) {\n throw new Error(\n 'Group nodes can only have label. Remove the additional description for node [' +\n node.id +\n ']'\n );\n }\n // add first description as label\n node.label = node.label[0];\n }\n });\n};\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param {null | string} id\n * @param {null | string} type\n * @param {null | string} doc\n * @param {null | string | string[]} descr - description for the state. Can be a string or a list or strings\n * @param {null | string} note\n * @param {null | string | string[]} classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.\n * @param {null | string | string[]} styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.\n * @param {null | string | string[]} textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.\n */\nexport const addState = function (\n id,\n type = DEFAULT_STATE_TYPE,\n doc = null,\n descr = null,\n note = null,\n classes = null,\n styles = null,\n textStyles = null\n) {\n const trimmedId = id?.trim();\n // add the state if needed\n if (!currentDocument.states.has(trimmedId)) {\n log.info('Adding state ', trimmedId, descr);\n currentDocument.states.set(trimmedId, {\n id: trimmedId,\n descriptions: [],\n type,\n doc,\n note,\n classes: [],\n styles: [],\n textStyles: [],\n });\n } else {\n if (!currentDocument.states.get(trimmedId).doc) {\n currentDocument.states.get(trimmedId).doc = doc;\n }\n if (!currentDocument.states.get(trimmedId).type) {\n currentDocument.states.get(trimmedId).type = type;\n }\n }\n\n if (descr) {\n log.info('Setting state description', trimmedId, descr);\n if (typeof descr === 'string') {\n addDescription(trimmedId, descr.trim());\n }\n\n if (typeof descr === 'object') {\n descr.forEach((des) => addDescription(trimmedId, des.trim()));\n }\n }\n\n if (note) {\n const doc2 = currentDocument.states.get(trimmedId);\n doc2.note = note;\n doc2.note.text = common.sanitizeText(doc2.note.text, getConfig());\n }\n\n if (classes) {\n log.info('Setting state classes', trimmedId, classes);\n const classesList = typeof classes === 'string' ? [classes] : classes;\n classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim()));\n }\n\n if (styles) {\n log.info('Setting state styles', trimmedId, styles);\n const stylesList = typeof styles === 'string' ? [styles] : styles;\n stylesList.forEach((style) => setStyle(trimmedId, style.trim()));\n }\n\n if (textStyles) {\n log.info('Setting state styles', trimmedId, styles);\n const textStylesList = typeof textStyles === 'string' ? [textStyles] : textStyles;\n textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim()));\n }\n};\n\nexport const clear = function (saveCommon) {\n nodes = [];\n edges = [];\n documents = {\n root: newDoc(),\n };\n currentDocument = documents.root;\n\n // number of start and end nodes; used to construct ids\n startEndCount = 0;\n classes = newClassesList();\n if (!saveCommon) {\n commonClear();\n }\n};\n\nexport const getState = function (id) {\n return currentDocument.states.get(id);\n};\n\nexport const getStates = function () {\n return currentDocument.states;\n};\nexport const logDocuments = function () {\n log.info('Documents = ', documents);\n};\nexport const getRelations = function () {\n return currentDocument.relations;\n};\n\n/**\n * If the id is a start node ( [*] ), then return a new id constructed from\n * the start node name and the current start node count.\n * else return the given id\n *\n * @param {string} id\n * @returns {string} - the id (original or constructed)\n */\nfunction startIdIfNeeded(id = '') {\n let fixedId = id;\n if (id === START_NODE) {\n startEndCount++;\n fixedId = `${START_TYPE}${startEndCount}`;\n }\n return fixedId;\n}\n\n/**\n * If the id is a start node ( [*] ), then return the start type ('start')\n * else return the given type\n *\n * @param {string} id\n * @param {string} type\n * @returns {string} - the type that should be used\n */\nfunction startTypeIfNeeded(id = '', type = DEFAULT_STATE_TYPE) {\n return id === START_NODE ? START_TYPE : type;\n}\n\n/**\n * If the id is an end node ( [*] ), then return a new id constructed from\n * the end node name and the current start_end node count.\n * else return the given id\n *\n * @param {string} id\n * @returns {string} - the id (original or constructed)\n */\nfunction endIdIfNeeded(id = '') {\n let fixedId = id;\n if (id === END_NODE) {\n startEndCount++;\n fixedId = `${END_TYPE}${startEndCount}`;\n }\n return fixedId;\n}\n\n/**\n * If the id is an end node ( [*] ), then return the end type\n * else return the given type\n *\n * @param {string} id\n * @param {string} type\n * @returns {string} - the type that should be used\n */\nfunction endTypeIfNeeded(id = '', type = DEFAULT_STATE_TYPE) {\n return id === END_NODE ? END_TYPE : type;\n}\n\n/**\n *\n * @param item1\n * @param item2\n * @param relationTitle\n */\nexport function addRelationObjs(item1, item2, relationTitle) {\n let id1 = startIdIfNeeded(item1.id.trim());\n let type1 = startTypeIfNeeded(item1.id.trim(), item1.type);\n let id2 = startIdIfNeeded(item2.id.trim());\n let type2 = startTypeIfNeeded(item2.id.trim(), item2.type);\n\n addState(\n id1,\n type1,\n item1.doc,\n item1.description,\n item1.note,\n item1.classes,\n item1.styles,\n item1.textStyles\n );\n addState(\n id2,\n type2,\n item2.doc,\n item2.description,\n item2.note,\n item2.classes,\n item2.styles,\n item2.textStyles\n );\n\n currentDocument.relations.push({\n id1,\n id2,\n relationTitle: common.sanitizeText(relationTitle, getConfig()),\n });\n}\n\n/**\n * Add a relation between two items. The items may be full objects or just the string id of a state.\n *\n * @param {string | object} item1\n * @param {string | object} item2\n * @param {string} title\n */\nexport const addRelation = function (item1, item2, title) {\n if (typeof item1 === 'object') {\n addRelationObjs(item1, item2, title);\n } else {\n const id1 = startIdIfNeeded(item1.trim());\n const type1 = startTypeIfNeeded(item1);\n const id2 = endIdIfNeeded(item2.trim());\n const type2 = endTypeIfNeeded(item2);\n\n addState(id1, type1);\n addState(id2, type2);\n currentDocument.relations.push({\n id1,\n id2,\n title: common.sanitizeText(title, getConfig()),\n });\n }\n};\n\nexport const addDescription = function (id, descr) {\n const theState = currentDocument.states.get(id);\n const _descr = descr.startsWith(':') ? descr.replace(':', '').trim() : descr;\n theState.descriptions.push(common.sanitizeText(_descr, getConfig()));\n};\n\nexport const cleanupLabel = function (label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(2).trim();\n } else {\n return label.trim();\n }\n};\n\nconst getDividerId = () => {\n dividerCnt++;\n return 'divider-id-' + dividerCnt;\n};\n\n/**\n * Called when the parser comes across a (style) class definition\n * @example classDef my-style fill:#f96;\n *\n * @param {string} id - the id of this (style) class\n * @param {string | null} styleAttributes - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyleClass = function (id, styleAttributes = '') {\n // create a new style class object with this id\n if (!classes.has(id)) {\n classes.set(id, { id: id, styles: [], textStyles: [] }); // This is a classDef\n }\n const foundClass = classes.get(id);\n if (styleAttributes !== undefined && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n // remove any trailing ;\n const fixedAttrib = attrib.replace(/([^;]*);/, '$1').trim();\n\n // replace some style keywords\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n};\n\n/**\n * Return all of the style classes\n * @returns {{} | any | classes}\n */\nexport const getClasses = function () {\n return classes;\n};\n\n/**\n * Add a (style) class or css class to a state with the given id.\n * If the state isn't already in the list of known states, add it.\n * Might be called by parser when a style class or CSS class should be applied to a state\n *\n * @param {string | string[]} itemIds The id or a list of ids of the item(s) to apply the css class to\n * @param {string} cssClassName CSS class name\n */\nexport const setCssClass = function (itemIds, cssClassName) {\n itemIds.split(',').forEach(function (id) {\n let foundState = getState(id);\n if (foundState === undefined) {\n const trimmedId = id.trim();\n addState(trimmedId);\n foundState = getState(trimmedId);\n }\n foundState.classes.push(cssClassName);\n });\n};\n\n/**\n * Add a style to a state with the given id.\n * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px\n * where 'style' is the keyword\n * stateId is the id of a state\n * the rest of the string is the styleText (all of the attributes to be applied to the state)\n *\n * @param itemId The id of item to apply the style to\n * @param styleText - the text of the attributes for the style\n */\nexport const setStyle = function (itemId, styleText) {\n const item = getState(itemId);\n if (item !== undefined) {\n item.styles.push(styleText);\n }\n};\n\n/**\n * Add a text style to a state with the given id\n *\n * @param itemId The id of item to apply the css class to\n * @param cssClassName CSS class name\n */\nexport const setTextStyle = function (itemId, cssClassName) {\n const item = getState(itemId);\n if (item !== undefined) {\n item.textStyles.push(cssClassName);\n }\n};\n\nconst getDirection = () => direction;\nconst setDirection = (dir) => {\n direction = dir;\n};\n\nconst trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());\n\nexport const getData = () => {\n const config = getConfig();\n return { nodes, edges, other: {}, config, direction: getDir(getRootDocV2()) };\n};\n\nexport default {\n getConfig: () => getConfig().state,\n getData,\n addState,\n clear,\n getState,\n getStates,\n getRelations,\n getClasses,\n getDirection,\n addRelation,\n getDividerId,\n setDirection,\n cleanupLabel,\n lineType,\n relationType,\n logDocuments,\n getRootDoc,\n setRootDoc,\n getRootDocV2,\n extract,\n trimColon,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n addStyleClass,\n setCssClass,\n addDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "const getStyles = (options) =>\n `\ndefs #statediagram-barbEnd {\n fill: ${options.transitionColor};\n stroke: ${options.transitionColor};\n }\ng.stateGroup text {\n fill: ${options.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${options.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${options.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${options.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${options.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n\n text {\n fill: ${options.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${options.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${options.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${options.innerEndBackground};\n stroke: ${options.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${options.compositeBackground || options.background};\n // stroke: ${options.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${options.stateBkg || options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${options.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${options.compositeTitleBackground};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${options.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${options.stateBorder || options.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${options.compositeBackground || options.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${options.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${options.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${options.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n}\n`;\n\n// todo: change composit to composite\n// cspell:ignore composit\n\nexport default getStyles;\n", "const idCache = {};\n\nexport const set = (key, val) => {\n idCache[key] = val;\n};\n\nexport const get = (k) => idCache[k];\nexport const keys = () => Object.keys(idCache);\nexport const size = () => keys().length;\n\nexport default {\n get,\n set,\n keys,\n size,\n};\n", "import { line, curveBasis } from 'd3';\nimport idCache from './id-cache.js';\nimport stateDb from './stateDb.js';\nimport utils from '../../utils.js';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawStartState = (g) =>\n g\n .append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'start-state')\n .attr('r', getConfig().state.sizeUnit)\n .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit)\n .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit);\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawDivider = (g) =>\n g\n .append('line')\n .style('stroke', 'grey')\n .style('stroke-dasharray', '3')\n .attr('x1', getConfig().state.textHeight)\n .attr('class', 'divider')\n .attr('x2', getConfig().state.textHeight * 2)\n .attr('y1', 0)\n .attr('y2', 0);\n\n/**\n * Draws a an end state as a black circle\n *\n * @param {any} g\n * @param {any} stateDef\n */\nexport const drawSimpleState = (g, stateDef) => {\n const state = g\n .append('text')\n .attr('x', 2 * getConfig().state.padding)\n .attr('y', getConfig().state.textHeight + 2 * getConfig().state.padding)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.id);\n\n const classBox = state.node().getBBox();\n g.insert('rect', ':first-child')\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding)\n .attr('width', classBox.width + 2 * getConfig().state.padding)\n .attr('height', classBox.height + 2 * getConfig().state.padding)\n .attr('rx', getConfig().state.radius);\n\n return state;\n};\n\n/**\n * Draws a state with descriptions\n *\n * @param {any} g The d3 svg object to add the state to\n * @param {any} stateDef\n * @returns {any} The d3 svg state\n */\nexport const drawDescrState = (g, stateDef) => {\n const addTspan = function (textEl, txt, isFirst) {\n const tSpan = textEl\n .append('tspan')\n .attr('x', 2 * getConfig().state.padding)\n .text(txt);\n if (!isFirst) {\n tSpan.attr('dy', getConfig().state.textHeight);\n }\n };\n const title = g\n .append('text')\n .attr('x', 2 * getConfig().state.padding)\n .attr('y', getConfig().state.textHeight + 1.3 * getConfig().state.padding)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.descriptions[0]);\n\n const titleBox = title.node().getBBox();\n const titleHeight = titleBox.height;\n\n const description = g\n .append('text') // text label for the x axis\n .attr('x', getConfig().state.padding)\n .attr(\n 'y',\n titleHeight +\n getConfig().state.padding * 0.4 +\n getConfig().state.dividerMargin +\n getConfig().state.textHeight\n )\n .attr('class', 'state-description');\n\n let isFirst = true;\n let isSecond = true;\n stateDef.descriptions.forEach(function (descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n isFirst = false;\n });\n\n const descrLine = g\n .append('line') // text label for the x axis\n .attr('x1', getConfig().state.padding)\n .attr('y1', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n .attr('y2', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n .attr('class', 'descr-divider');\n const descrBox = description.node().getBBox();\n const width = Math.max(descrBox.width, titleBox.width);\n\n descrLine.attr('x2', width + 3 * getConfig().state.padding);\n // const classBox = title.node().getBBox();\n\n g.insert('rect', ':first-child')\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding)\n .attr('width', width + 2 * getConfig().state.padding)\n .attr('height', descrBox.height + titleHeight + 2 * getConfig().state.padding)\n .attr('rx', getConfig().state.radius);\n\n return g;\n};\n\n/** Adds the creates a box around the existing content and adds a panel for the id on top of the content. */\n/**\n * Function that creates an title row and a frame around a substate for a composite state diagram.\n * The function returns a new d3 svg object with updated width and height properties;\n *\n * @param {any} g The d3 svg object for the substate to framed\n * @param {any} stateDef The info about the\n * @param {any} altBkg\n */\nexport const addTitleAndBox = (g, stateDef, altBkg) => {\n const pad = getConfig().state.padding;\n const dblPad = 2 * getConfig().state.padding;\n const orgBox = g.node().getBBox();\n const orgWidth = orgBox.width;\n const orgX = orgBox.x;\n\n const title = g\n .append('text')\n .attr('x', 0)\n .attr('y', getConfig().state.titleShift)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.id);\n\n const titleBox = title.node().getBBox();\n const titleWidth = titleBox.width + dblPad;\n let width = Math.max(titleWidth, orgWidth); // + dblPad;\n if (width === orgWidth) {\n width = width + dblPad;\n }\n let startX;\n // const lineY = 1 - getConfig().state.textHeight;\n // const descrLine = g\n // .append('line') // text label for the x axis\n // .attr('x1', 0)\n // .attr('y1', lineY)\n // .attr('y2', lineY)\n // .attr('class', 'descr-divider');\n\n const graphBox = g.node().getBBox();\n // descrLine.attr('x2', graphBox.width + getConfig().state.padding);\n\n if (stateDef.doc) {\n // console.warn(\n // stateDef.id,\n // 'orgX: ',\n // orgX,\n // 'width: ',\n // width,\n // 'titleWidth: ',\n // titleWidth,\n // 'orgWidth: ',\n // orgWidth,\n // 'width',\n // width\n // );\n }\n\n startX = orgX - pad;\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n\n const lineY = 1 - getConfig().state.textHeight;\n // White color\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr('y', lineY)\n .attr('class', altBkg ? 'alt-composit' : 'composit') // cspell:disable-line\n .attr('width', width)\n .attr(\n 'height',\n graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1\n )\n .attr('rx', '0');\n\n title.attr('x', startX + pad);\n if (titleWidth <= orgWidth) {\n title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n }\n\n // Title background\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr(\n 'y',\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n )\n .attr('width', width)\n // Just needs to be higher then the descr line, will be clipped by the white color box\n .attr('height', getConfig().state.textHeight * 3)\n .attr('rx', getConfig().state.radius);\n\n // Full background\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr(\n 'y',\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n )\n .attr('width', width)\n .attr('height', graphBox.height + 3 + 2 * getConfig().state.textHeight)\n .attr('rx', getConfig().state.radius);\n\n return g;\n};\n\nconst drawEndState = (g) => {\n g.append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'white')\n .attr('class', 'end-state-outer')\n .attr('r', getConfig().state.sizeUnit + getConfig().state.miniPadding)\n .attr(\n 'cx',\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n )\n .attr(\n 'cy',\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n );\n\n return (\n g\n .append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'end-state-inner')\n .attr('r', getConfig().state.sizeUnit)\n .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n );\n};\nconst drawForkJoinState = (g, stateDef) => {\n let width = getConfig().state.forkWidth;\n let height = getConfig().state.forkHeight;\n\n if (stateDef.parentId) {\n let tmp = width;\n width = height;\n height = tmp;\n }\n return g\n .append('rect')\n .style('stroke', 'black')\n .style('fill', 'black')\n .attr('width', width)\n .attr('height', height)\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding);\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.attr('fill', textData.fill);\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nconst _drawLongText = (_text, x, y, g) => {\n let textHeight = 0;\n\n const textElem = g.append('text');\n textElem.style('text-anchor', 'start');\n textElem.attr('class', 'noteText');\n\n let text = _text.replace(/\\r\\n/g, '
    ');\n text = text.replace(/\\n/g, '
    ');\n const lines = text.split(common.lineBreakRegex);\n\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line of lines) {\n const txt = line.trim();\n\n if (txt.length > 0) {\n const span = textElem.append('tspan');\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr('x', x + getConfig().state.noteMargin);\n span.attr('y', y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n};\n\n/**\n * Draws a note to the diagram\n *\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\nexport const drawNote = (text, g) => {\n g.attr('class', 'state-note');\n const note = g.append('rect').attr('x', 0).attr('y', getConfig().state.padding);\n const rectElem = g.append('g');\n\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr('height', textHeight + 2 * getConfig().state.noteMargin);\n note.attr('width', textWidth + getConfig().state.noteMargin * 2);\n\n return note;\n};\n\n/**\n * Starting point for drawing a state. The function finds out the specifics about the state and\n * renders with appropriate function.\n *\n * @param {any} elem\n * @param {any} stateDef\n */\n\nexport const drawState = function (elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id: id,\n label: stateDef.id,\n width: 0,\n height: 0,\n };\n\n const g = elem.append('g').attr('id', id).attr('class', 'stateGroup');\n\n if (stateDef.type === 'start') {\n drawStartState(g);\n }\n if (stateDef.type === 'end') {\n drawEndState(g);\n }\n if (stateDef.type === 'fork' || stateDef.type === 'join') {\n drawForkJoinState(g, stateDef);\n }\n if (stateDef.type === 'note') {\n drawNote(stateDef.note.text, g);\n }\n if (stateDef.type === 'divider') {\n drawDivider(g);\n }\n if (stateDef.type === 'default' && stateDef.descriptions.length === 0) {\n drawSimpleState(g, stateDef);\n }\n if (stateDef.type === 'default' && stateDef.descriptions.length > 0) {\n drawDescrState(g, stateDef);\n }\n\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n\n idCache.set(id, stateInfo);\n // stateCnt++;\n return stateInfo;\n};\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation) {\n const getRelationType = function (type) {\n switch (type) {\n case stateDb.relationType.AGGREGATION:\n return 'aggregation';\n case stateDb.relationType.EXTENSION:\n return 'extension';\n case stateDb.relationType.COMPOSITION:\n return 'composition';\n case stateDb.relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'transition');\n let url = '';\n if (getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(stateDb.relationType.DEPENDENCY) + 'End' + ')'\n );\n\n if (relation.title !== undefined) {\n const label = elem.append('g').attr('class', 'stateLabel');\n\n const { x, y } = utils.calcLabelPosition(path.points);\n\n const rows = common.getRows(relation.title);\n\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n\n for (let i = 0; i <= rows.length; i++) {\n const title = label\n .append('text')\n .attr('text-anchor', 'middle')\n .text(rows[i])\n .attr('x', x)\n .attr('y', y + titleHeight);\n\n const boundsTmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundsTmp.width);\n minX = Math.min(minX, boundsTmp.x);\n\n log.info(boundsTmp.x, x, y + titleHeight);\n\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n log.info('Title height', titleHeight, y);\n }\n titleRows.push(title);\n }\n\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n\n titleRows.forEach((title, i) => title.attr('y', y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n\n const bounds = label.node().getBBox();\n\n label\n .insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', x - maxWidth / 2 - getConfig().state.padding / 2)\n .attr('y', y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5)\n .attr('width', maxWidth + getConfig().state.padding)\n .attr('height', boxHeight + getConfig().state.padding);\n\n log.info(bounds);\n\n //label.attr('transform', '0 -' + (bounds.y / 2));\n\n // Debug points\n // path.points.forEach(point => {\n // g.append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // g.append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 1)\n // .attr('cx', x)\n // .attr('cy', y);\n }\n\n edgeCount++;\n};\n", "import { select } from 'd3';\nimport { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport { drawState, addTitleAndBox, drawEdge } from './shapes.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n// TODO Move conf object to main conf in mermaidAPI\nlet conf;\n\nconst transformationLog = {};\n\nexport const setConf = function () {\n //no-op\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().state;\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n log.debug('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n const rootDoc = diagObj.db.getRootDoc();\n renderDoc(rootDoc, diagram, undefined, false, root, doc, diagObj);\n\n const padding = conf.padding;\n const bounds = diagram.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n // zoom in a bit\n const svgWidth = width * 1.75;\n configureSvgSize(diagram, height, svgWidth, conf.useMaxWidth);\n\n diagram.attr(\n 'viewBox',\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height\n );\n};\nconst getLabelWidth = (text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n};\n\nconst renderDoc = (doc, diagram, parentId, altBkg, root, domDocument, diagObj) => {\n // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true,\n });\n\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === 'relation') {\n edgeFreeDoc = false;\n break;\n }\n }\n\n // Set an object for the graph label\n if (parentId) {\n graph.setGraph({\n rankdir: 'LR',\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: 'tight-tree',\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true,\n // ranksep: 5,\n // nodesep: 1\n });\n } else {\n graph.setGraph({\n rankdir: 'TB',\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: 'tight-tree',\n // ranker: 'network-simplex'\n isMultiGraph: true,\n });\n }\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n diagObj.db.extract(doc);\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n\n const keys = Object.keys(states);\n\n let first = true;\n\n for (const key of keys) {\n const stateDef = states[key];\n\n if (parentId) {\n stateDef.parentId = parentId;\n }\n\n let node;\n if (stateDef.doc) {\n let sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n\n if (first) {\n // first = false;\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n // sub = addIdAndBox(sub, stateDef);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n }\n } else {\n node = drawState(diagram, stateDef, graph);\n }\n\n if (stateDef.note) {\n // Draw note note\n const noteDef = {\n descriptions: [],\n id: stateDef.id + '-note',\n note: stateDef.note,\n type: 'note',\n };\n const note = drawState(diagram, noteDef, graph);\n\n // graph.setNode(node.id, node);\n if (stateDef.note.position === 'left of') {\n graph.setNode(node.id + '-note', note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + '-note', note);\n }\n // graph.setNode(node.id);\n graph.setParent(node.id, node.id + '-group');\n graph.setParent(node.id + '-note', node.id + '-group');\n } else {\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n graph.setNode(node.id, node);\n }\n }\n\n log.debug('Count=', graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function (relation) {\n cnt++;\n log.debug('Setting edge', relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation: relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common.getRows(relation.title).length,\n labelpos: 'c',\n },\n 'id' + cnt\n );\n });\n\n dagreLayout(graph);\n\n log.debug('Graph after layout', graph.nodes());\n const svgElem = diagram.node();\n\n graph.nodes().forEach(function (v) {\n if (v !== undefined && graph.node(v) !== undefined) {\n log.warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y +\n (transformationLog[v] ? transformationLog[v].y : 0) -\n graph.node(v).height / 2) +\n ' )'\n );\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) {\n pWidth = parent.parentElement.getBBox().width;\n }\n pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute('x1', 0 - pShift + 8);\n divider.setAttribute('x2', pWidth - pShift - 8);\n });\n } else {\n log.debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n }\n });\n\n let stateBox = svgElem.getBBox();\n\n graph.edges().forEach(function (e) {\n if (e !== undefined && graph.edge(e) !== undefined) {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n drawEdge(diagram, graph.edge(e), graph.edge(e).relation);\n }\n });\n\n stateBox = svgElem.getBBox();\n\n const stateInfo = {\n id: parentId ? parentId : 'root',\n label: parentId ? parentId : 'root',\n width: 0,\n height: 0,\n };\n\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n\n log.debug('Doc rendered', stateInfo, graph);\n return stateInfo;\n};\n\nexport default {\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/stateDiagram.jison';\nimport db from './stateDb.js';\nimport styles from './styles.js';\nimport renderer from './stateRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/stateDiagram.jison';\nimport db from './stateDb.js';\nimport styles from './styles.js';\nimport renderer from './stateRenderer-v3-unified.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n db.clear();\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,14,16,17,18],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"journey\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NEWLINE\":10,\"title\":11,\"acc_title\":12,\"acc_title_value\":13,\"acc_descr\":14,\"acc_descr_value\":15,\"acc_descr_multiline_value\":16,\"section\":17,\"taskName\":18,\"taskData\":19,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"journey\",6:\"EOF\",8:\"SPACE\",10:\"NEWLINE\",11:\"title\",12:\"acc_title\",13:\"acc_title_value\",14:\"acc_descr\",15:\"acc_descr_value\",16:\"acc_descr_multiline_value\",17:\"section\",18:\"taskName\",19:\"taskData\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\nyy.setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 9:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 10: case 11:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 12:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 13:\nyy.addTask($$[$0-1], $$[$0]);this.$='task';\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:$V6},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:15,11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:$V6},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),{13:[1,16]},{15:[1,17]},o($V0,[2,11]),o($V0,[2,12]),{19:[1,18]},o($V0,[2,4]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,13])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2:return 10;\nbreak;\ncase 3:/* skip whitespace */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:return 4;\nbreak;\ncase 6:return 11;\nbreak;\ncase 7: this.begin(\"acc_title\");return 12; \nbreak;\ncase 8: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 9: this.begin(\"acc_descr\");return 14; \nbreak;\ncase 10: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 11: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 12: this.popState(); \nbreak;\ncase 13:return \"acc_descr_multiline_value\";\nbreak;\ncase 14:return 17;\nbreak;\ncase 15:return 18;\nbreak;\ncase 16:return 19;\nbreak;\ncase 17:return ':';\nbreak;\ncase 18:return 6;\nbreak;\ncase 19:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:journey\\b)/i,/^(?:title\\s[^#\\n;]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^#:\\n;]+)/i,/^(?:[^#:\\n;]+)/i,/^(?::[^#\\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[12,13],\"inclusive\":false},\"acc_descr\":{\"rules\":[10],\"inclusive\":false},\"acc_title\":{\"rules\":[8],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../common/commonDb.js';\n\nlet currentSection = '';\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const clear = function () {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n rawTasks.length = 0;\n commonClear();\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nconst updateActors = function () {\n const tempActors = [];\n tasks.forEach((task) => {\n if (task.people) {\n tempActors.push(...task.people);\n }\n });\n\n const unique = new Set(tempActors);\n return [...unique].sort();\n};\n\nexport const addTask = function (descr, taskData) {\n const pieces = taskData.substr(1).split(':');\n\n let score = 0;\n let peeps = [];\n if (pieces.length === 1) {\n score = Number(pieces[0]);\n peeps = [];\n } else {\n score = Number(pieces[0]);\n peeps = pieces[1].split(',');\n }\n const peopleList = peeps.map((s) => s.trim());\n\n const rawTask = {\n section: currentSection,\n type: currentSection,\n people: peopleList,\n task: descr,\n score,\n };\n\n rawTasks.push(rawTask);\n};\n\nexport const addTaskOrg = function (descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\nconst getActors = function () {\n return updateActors();\n};\n\nexport default {\n getConfig: () => getConfig().journey,\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n getActors,\n};\n", "const getStyles = (options) =>\n `.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${options.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${options.textColor}\n }\n\n .legend {\n fill: ${options.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${options.textColor}\n }\n\n .face {\n ${options.faceColor ? `fill: ${options.faceColor}` : 'fill: #FFF8DC'};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${options.fillType0 ? `fill: ${options.fillType0}` : ''};\n }\n .task-type-1, .section-type-1 {\n ${options.fillType0 ? `fill: ${options.fillType1}` : ''};\n }\n .task-type-2, .section-type-2 {\n ${options.fillType0 ? `fill: ${options.fillType2}` : ''};\n }\n .task-type-3, .section-type-3 {\n ${options.fillType0 ? `fill: ${options.fillType3}` : ''};\n }\n .task-type-4, .section-type-4 {\n ${options.fillType0 ? `fill: ${options.fillType4}` : ''};\n }\n .task-type-5, .section-type-5 {\n ${options.fillType0 ? `fill: ${options.fillType5}` : ''};\n }\n .task-type-6, .section-type-6 {\n ${options.fillType0 ? `fill: ${options.fillType6}` : ''};\n }\n .task-type-7, .section-type-7 {\n ${options.fillType0 ? `fill: ${options.fillType7}` : ''};\n }\n\n .actor-0 {\n ${options.actor0 ? `fill: ${options.actor0}` : ''};\n }\n .actor-1 {\n ${options.actor1 ? `fill: ${options.actor1}` : ''};\n }\n .actor-2 {\n ${options.actor2 ? `fill: ${options.actor2}` : ''};\n }\n .actor-3 {\n ${options.actor3 ? `fill: ${options.actor3}` : ''};\n }\n .actor-4 {\n ${options.actor4 ? `fill: ${options.actor4}` : ''};\n }\n .actor-5 {\n ${options.actor5 ? `fill: ${options.actor5}` : ''};\n }\n`;\n\nexport default getStyles;\n", "import { arc as d3arc } from 'd3';\nimport * as svgDrawCommon from '../common/svgDrawCommon.js';\n\nexport const drawRect = function (elem, rectData) {\n return svgDrawCommon.drawRect(elem, rectData);\n};\n\nexport const drawFace = function (element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n /** @param {any} face */\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n /** @param {any} face */\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n /** @param {any} face */\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function (element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('class', 'actor-' + circleData.pos);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (circleElement.class !== undefined) {\n circleElement.attr('class', circleElement.class);\n }\n\n if (circleData.title !== undefined) {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function (elem, textData) {\n return svgDrawCommon.drawText(elem, textData);\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function (elem, section, conf) {\n const g = elem.append('g');\n\n const rect = svgDrawCommon.getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n // section width covers all nested tasks\n rect.width =\n conf.width * section.taskCount + // width of the tasks\n conf.diagramMarginX * (section.taskCount - 1); // width of space between tasks\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem The HTML element\n * @param {any} task The task to render\n * @param {any} conf The global configuration\n */\nexport const drawTask = function (elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score,\n });\n\n const rect = svgDrawCommon.getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n let xPos = task.x + 14;\n task.people.forEach((person) => {\n const colour = task.actors[person].color;\n\n const circle = {\n cx: xPos,\n cy: task.y,\n r: 7,\n fill: colour,\n stroke: '#000',\n title: person,\n pos: task.actors[person].position,\n };\n\n drawCircle(g, circle);\n xPos += 10;\n });\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem The html element\n * @param {any} bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n svgDrawCommon.drawBackgroundRect(elem, bounds);\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} colour\n */\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n * @param {any} colour\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(//gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function (graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n initGraphics,\n};\n", "// @ts-nocheck TODO: fix file\nimport { select } from 'd3';\nimport svgDraw from './svgDraw.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\nconst actors = {};\n\n/** @param diagram - The diagram to draw to. */\nfunction drawActorLegend(diagram) {\n const conf = getConfig().journey;\n // Draw the actors\n let yPos = 60;\n Object.keys(actors).forEach((person) => {\n const colour = actors[person].color;\n\n const circleData = {\n cx: 20,\n cy: yPos,\n r: 7,\n fill: colour,\n stroke: '#000',\n pos: actors[person].position,\n };\n svgDraw.drawCircle(diagram, circleData);\n\n const labelData = {\n x: 40,\n y: yPos + 7,\n fill: '#666',\n text: person,\n textMargin: conf.boxTextMargin | 5,\n };\n svgDraw.drawText(diagram, labelData);\n\n yPos += 20;\n });\n}\n// TODO: Cleanup?\nconst conf = getConfig().journey;\nconst LEFT_MARGIN = conf.leftMargin;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().journey;\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n bounds.init();\n const diagram = root.select('#' + id);\n\n svgDraw.initGraphics(diagram);\n\n const tasks = diagObj.db.getTasks();\n const title = diagObj.db.getDiagramTitle();\n\n const actorNames = diagObj.db.getActors();\n for (const member in actors) {\n delete actors[member];\n }\n let actorPos = 0;\n actorNames.forEach((actorName) => {\n actors[actorName] = {\n color: conf.actorColours[actorPos % conf.actorColours.length],\n position: actorPos,\n };\n actorPos++;\n });\n\n drawActorLegend(diagram);\n bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n drawTasks(diagram, tasks, 0);\n\n const box = bounds.getBounds();\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 25);\n }\n\n const height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n const width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Draw activity line\n diagram\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', conf.height * 4) // One section head + one task + margins\n .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n .attr('y2', conf.height * 4)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n const extraVertForTitle = title ? 70 : 0;\n diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);\n diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n diagram.attr('height', height + extraVertForTitle + 25);\n};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n\n sequenceItems: [],\n init: function () {\n this.sequenceItems = [];\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n },\n updateVal: function (obj, key, val, fun) {\n if (obj[key] === undefined) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n const conf = getConfig().journey;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param type - Set to `activation` if activation */\n function updateFn(type?: 'activation') {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return this.data;\n },\n};\n\nconst fills = conf.sectionFills;\nconst textColours = conf.sectionColours;\n\nexport const drawTasks = function (diagram, tasks, verticalPos) {\n const conf = getConfig().journey;\n let lastSection = '';\n const sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n const taskPos = verticalPos + sectionVHeight;\n\n let sectionNumber = 0;\n let fill = '#CCC';\n let colour = 'black';\n let num = 0;\n\n // Draw the tasks\n for (const [i, task] of tasks.entries()) {\n if (lastSection !== task.section) {\n fill = fills[sectionNumber % fills.length];\n num = sectionNumber % fills.length;\n colour = textColours[sectionNumber % textColours.length];\n\n // count how many consecutive tasks have the same section\n let taskInSectionCount = 0;\n const currentSection = task.section;\n for (let taskIndex = i; taskIndex < tasks.length; taskIndex++) {\n if (tasks[taskIndex].section == currentSection) {\n taskInSectionCount = taskInSectionCount + 1;\n } else {\n break;\n }\n }\n\n const section = {\n x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n y: 50,\n text: task.section,\n fill,\n num,\n colour,\n taskCount: taskInSectionCount,\n };\n\n svgDraw.drawSection(diagram, section, conf);\n lastSection = task.section;\n sectionNumber++;\n }\n\n // Collect the actors involved in the task\n const taskActors = task.people.reduce((acc, actorName) => {\n if (actors[actorName]) {\n acc[actorName] = actors[actorName];\n }\n\n return acc;\n }, {});\n\n // Add some rendering data to the object\n task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n task.y = taskPos;\n task.width = conf.diagramMarginX;\n task.height = conf.diagramMarginY;\n task.colour = colour;\n task.fill = fill;\n task.num = num;\n task.actors = taskActors;\n\n // Draw the box with the attached line\n svgDraw.drawTask(diagram, task, conf);\n bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopY is the length of the descenders.\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: JISON doesn't support types\nimport parser from './parser/journey.jison';\nimport db from './journeyDb.js';\nimport styles from './styles.js';\nimport renderer from './journeyRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n init: (cnf) => {\n renderer.setConf(cnf.journey);\n db.clear();\n },\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,14,16,17,20,21],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,16],$V7=[1,17];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"timeline\":4,\"document\":5,\"EOF\":6,\"line\":7,\"SPACE\":8,\"statement\":9,\"NEWLINE\":10,\"title\":11,\"acc_title\":12,\"acc_title_value\":13,\"acc_descr\":14,\"acc_descr_value\":15,\"acc_descr_multiline_value\":16,\"section\":17,\"period_statement\":18,\"event_statement\":19,\"period\":20,\"event\":21,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"timeline\",6:\"EOF\",8:\"SPACE\",10:\"NEWLINE\",11:\"title\",12:\"acc_title\",13:\"acc_title_value\",14:\"acc_descr\",15:\"acc_descr_value\",16:\"acc_descr_multiline_value\",17:\"section\",20:\"period\",21:\"event\"},\nproductions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n return $$[$0-1]; \nbreak;\ncase 2:\n this.$ = [] \nbreak;\ncase 3:\n$$[$0-1].push($$[$0]);this.$ = $$[$0-1]\nbreak;\ncase 4: case 5:\n this.$ = $$[$0] \nbreak;\ncase 6: case 7:\n this.$=[];\nbreak;\ncase 8:\nyy.getCommonDb().setDiagramTitle($$[$0].substr(6));this.$=$$[$0].substr(6);\nbreak;\ncase 9:\n this.$=$$[$0].trim();yy.getCommonDb().setAccTitle(this.$); \nbreak;\ncase 10: case 11:\n this.$=$$[$0].trim();yy.getCommonDb().setAccDescription(this.$); \nbreak;\ncase 12:\nyy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);\nbreak;\ncase 15:\nyy.addTask($$[$0],0,'');this.$=$$[$0];\nbreak;\ncase 16:\nyy.addEvent($$[$0].substr(2));this.$=$$[$0];\nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:14,19:15,20:$V6,21:$V7},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:18,11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:14,19:15,20:$V6,21:$V7},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),{13:[1,19]},{15:[1,20]},o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,4]),o($V0,[2,9]),o($V0,[2,10])],\ndefaultActions: {},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip comments */\nbreak;\ncase 1:/* skip comments */\nbreak;\ncase 2:return 10;\nbreak;\ncase 3:/* skip whitespace */\nbreak;\ncase 4:/* skip comments */\nbreak;\ncase 5:return 4;\nbreak;\ncase 6:return 11;\nbreak;\ncase 7: this.begin(\"acc_title\");return 12; \nbreak;\ncase 8: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 9: this.begin(\"acc_descr\");return 14; \nbreak;\ncase 10: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 11: this.begin(\"acc_descr_multiline\");\nbreak;\ncase 12: this.popState(); \nbreak;\ncase 13:return \"acc_descr_multiline_value\";\nbreak;\ncase 14:return 17;\nbreak;\ncase 15:return 21;\nbreak;\ncase 16:return 20;\nbreak;\ncase 17:return 6;\nbreak;\ncase 18:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:\\s+)/i,/^(?:#[^\\n]*)/i,/^(?:timeline\\b)/i,/^(?:title\\s[^\\n]+)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:section\\s[^:\\n]+)/i,/^(?::\\s[^:\\n]+)/i,/^(?:[^#:\\n]+)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"acc_descr_multiline\":{\"rules\":[12,13],\"inclusive\":false},\"acc_descr\":{\"rules\":[10],\"inclusive\":false},\"acc_title\":{\"rules\":[8],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import * as commonDb from '../common/commonDb.js';\nlet currentSection = '';\nlet currentTaskId = 0;\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const getCommonDb = () => commonDb;\n\nexport const clear = function () {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n rawTasks.length = 0;\n commonDb.clear();\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nexport const addTask = function (period, length, event) {\n const rawTask = {\n id: currentTaskId++,\n section: currentSection,\n type: currentSection,\n task: period,\n score: length ? length : 0,\n //if event is defined, then add it the events array\n events: event ? [event] : [],\n };\n rawTasks.push(rawTask);\n};\n\nexport const addEvent = function (event) {\n // fetch current task with currentTaskId\n const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1);\n //add event to the events array\n currentTask.events.push(event);\n};\n\nexport const addTaskOrg = function (descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n tasks.push(newTask);\n};\n\n/**\n * Compiles the raw tasks into a list of tasks with events\n * @returns {boolean} true if all items are processed\n * @private\n * @memberof timelineDb\n */\nconst compileTasks = function () {\n const compileTask = function (pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (const [i, rawTask] of rawTasks.entries()) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTask.processed;\n }\n return allProcessed;\n};\n\nexport default {\n clear,\n getCommonDb,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n addEvent,\n};\n", "import { arc as d3arc, select } from 'd3';\nconst MAX_SECTIONS = 12;\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (rectData.class !== undefined) {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawFace = function (element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n /** @param {any} face */\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n /** @param {any} face */\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n /** @param {any} face */\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function (element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('class', 'actor-' + circleData.pos);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (circleElement.class !== undefined) {\n circleElement.attr('class', circleElement.class);\n }\n\n if (circleData.title !== undefined) {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(//gi, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n\n if (textData.class !== undefined) {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.text(nText);\n\n return textElem;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function (elem, section, conf) {\n const g = elem.append('g');\n\n const rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem The HTML element\n * @param {any} task The task to render\n * @param {any} conf The global configuration\n */\nexport const drawTask = function (elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score,\n });\n\n const rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem The html element\n * @param {any} bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect',\n });\n rectElem.lower();\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n 'text-anchor': 'start',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} colour\n */\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n * @param {any} colour\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(//gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function (graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\n/**\n * @param {string} text The text to be wrapped\n * @param {number} width The max width of the text\n */\nfunction wrap(text, width) {\n text.each(function () {\n var text = select(this),\n words = text\n .text()\n .split(/(\\s+|
    )/)\n .reverse(),\n word,\n line = [],\n lineHeight = 1.1, // ems\n y = text.attr('y'),\n dy = parseFloat(text.attr('dy')),\n tspan = text\n .text(null)\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', dy + 'em');\n for (let j = 0; j < words.length; j++) {\n word = words[words.length - 1 - j];\n line.push(word);\n tspan.text(line.join(' ').trim());\n if (tspan.node().getComputedTextLength() > width || word === '
    ') {\n line.pop();\n tspan.text(line.join(' ').trim());\n if (word === '
    ') {\n line = [''];\n } else {\n line = [word];\n }\n\n tspan = text\n .append('tspan')\n .attr('x', 0)\n .attr('y', y)\n .attr('dy', lineHeight + 'em')\n .text(word);\n }\n }\n });\n}\n\nexport const drawNode = function (elem, node, fullSection, conf) {\n const section = (fullSection % MAX_SECTIONS) - 1;\n const nodeElem = elem.append('g');\n node.section = section;\n nodeElem.attr(\n 'class',\n (node.class ? node.class + ' ' : '') + 'timeline-node ' + ('section-' + section)\n );\n const bkgElem = nodeElem.append('g');\n\n // Create the wrapped text element\n const textElem = nodeElem.append('g');\n\n const txt = textElem\n .append('text')\n .text(node.descr)\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize?.replace ? conf.fontSize.replace('px', '') : conf.fontSize;\n node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n node.height = Math.max(node.height, node.maxHeight);\n node.width = node.width + 2 * node.padding;\n\n textElem.attr('transform', 'translate(' + node.width / 2 + ', ' + node.padding / 2 + ')');\n\n // Create the background element\n defaultBkg(bkgElem, node, section, conf);\n\n return node;\n};\n\nexport const getVirtualNodeHeight = function (elem, node, conf) {\n const textElem = elem.append('g');\n const txt = textElem\n .append('text')\n .text(node.descr)\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .call(wrap, node.width);\n const bbox = txt.node().getBBox();\n const fontSize = conf.fontSize?.replace ? conf.fontSize.replace('px', '') : conf.fontSize;\n textElem.remove();\n return bbox.height + fontSize * 1.1 * 0.5 + node.padding;\n};\n\nconst defaultBkg = function (elem, node, section) {\n const rd = 5;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + node.type)\n .attr(\n 'd',\n `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${\n node.width - 2 * rd\n } q5,0 5,5 v${node.height - rd} H0 Z`\n );\n\n elem\n .append('line')\n .attr('class', 'node-line-' + section)\n .attr('x1', 0)\n .attr('y1', node.height)\n .attr('x2', node.width)\n .attr('y2', node.height);\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n getTextObj,\n getNoteRect,\n initGraphics,\n drawNode,\n getVirtualNodeHeight,\n};\n", "// @ts-nocheck - don't check until handle it\nimport type { Selection } from 'd3';\nimport { select } from 'd3';\nimport svgDraw from './svgDraw.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport type { Diagram } from '../../Diagram.js';\nimport type { MermaidConfig } from '../../config.type.js';\n\ninterface Block {\n number: number;\n descr: TDesc;\n section: TSection;\n width: number;\n padding: number;\n maxHeight: number;\n}\n\ninterface TimelineTask {\n id: number;\n section: string;\n type: string;\n task: string;\n score: number;\n events: string[];\n}\nexport const draw = function (text: string, id: string, version: string, diagObj: Diagram) {\n //1. Fetch the configuration\n const conf = getConfig();\n // @ts-expect-error - wrong config?\n const LEFT_MARGIN = conf.leftMargin ?? 50;\n\n log.debug('timeline', diagObj.db);\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select('#' + id);\n\n svg.append('g');\n\n //4. Fetch the diagram data\n // @ts-expect-error - db not typed yet\n const tasks: TimelineTask[] = diagObj.db.getTasks();\n // @ts-expect-error - db not typed yet\n const title = diagObj.db.getCommonDb().getDiagramTitle();\n log.debug('task', tasks);\n\n //5. Initialize the diagram\n svgDraw.initGraphics(svg);\n\n // fetch Sections\n // @ts-expect-error - db not typed yet\n const sections: string[] = diagObj.db.getSections();\n log.debug('sections', sections);\n\n let maxSectionHeight = 0;\n let maxTaskHeight = 0;\n //let sectionBeginX = 0;\n let depthY = 0;\n let sectionBeginY = 0;\n let masterX = 50 + LEFT_MARGIN;\n //sectionBeginX = masterX;\n let masterY = 50;\n sectionBeginY = 50;\n //draw sections\n let sectionNumber = 0;\n let hasSections = true;\n\n //Calculate the max height of the sections\n sections.forEach(function (section: string) {\n const sectionNode: Block = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: 150,\n padding: 20,\n maxHeight: maxSectionHeight,\n };\n const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf);\n log.debug('sectionHeight before draw', sectionHeight);\n maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20);\n });\n\n //tasks length and maxEventCount\n let maxEventCount = 0;\n let maxEventLineLength = 0;\n log.debug('tasks.length', tasks.length);\n //calculate max task height\n // for loop till tasks.length\n\n for (const [i, task] of tasks.entries()) {\n const taskNode: Block = {\n number: i,\n descr: task,\n section: task.section,\n width: 150,\n padding: 20,\n maxHeight: maxTaskHeight,\n };\n const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf);\n log.debug('taskHeight before draw', taskHeight);\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20);\n\n //calculate maxEventCount\n maxEventCount = Math.max(maxEventCount, task.events.length);\n //calculate maxEventLineLength\n let maxEventLineLengthTemp = 0;\n for (const event of task.events) {\n const eventNode = {\n descr: event,\n section: task.section,\n number: task.section,\n width: 150,\n padding: 20,\n maxHeight: 50,\n };\n maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf);\n }\n maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp);\n }\n\n log.debug('maxSectionHeight before draw', maxSectionHeight);\n log.debug('maxTaskHeight before draw', maxTaskHeight);\n\n if (sections && sections.length > 0) {\n sections.forEach((section) => {\n //filter task where tasks.section == section\n const tasksForSection = tasks.filter((task) => task.section === section);\n\n const sectionNode: Block = {\n number: sectionNumber,\n descr: section,\n section: sectionNumber,\n width: 200 * Math.max(tasksForSection.length, 1) - 50,\n padding: 20,\n maxHeight: maxSectionHeight,\n };\n log.debug('sectionNode', sectionNode);\n const sectionNodeWrapper = svg.append('g');\n const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf);\n log.debug('sectionNode output', node);\n\n sectionNodeWrapper.attr('transform', `translate(${masterX}, ${sectionBeginY})`);\n\n masterY += maxSectionHeight + 50;\n\n //draw tasks for this section\n if (tasksForSection.length > 0) {\n drawTasks(\n svg,\n tasksForSection,\n sectionNumber,\n masterX,\n masterY,\n maxTaskHeight,\n conf,\n maxEventCount,\n maxEventLineLength,\n maxSectionHeight,\n false\n );\n }\n // todo replace with total width of section and its tasks\n masterX += 200 * Math.max(tasksForSection.length, 1);\n\n masterY = sectionBeginY;\n sectionNumber++;\n });\n } else {\n //draw tasks\n hasSections = false;\n drawTasks(\n svg,\n tasks,\n sectionNumber,\n masterX,\n masterY,\n maxTaskHeight,\n conf,\n maxEventCount,\n maxEventLineLength,\n maxSectionHeight,\n true\n );\n }\n\n // Get BBox of the diagram\n const box = svg.node().getBBox();\n log.debug('bounds', box);\n\n if (title) {\n svg\n .append('text')\n .text(title)\n .attr('x', box.width / 2 - LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 20);\n }\n //5. Draw the diagram\n depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100;\n\n const lineWrapper = svg.append('g').attr('class', 'lineWrapper');\n // Draw activity line\n lineWrapper\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', depthY) // One section head + one task + margins\n .attr('x2', box.width + 3 * LEFT_MARGIN) // Subtract stroke width so arrow point is retained\n .attr('y2', depthY)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n svg,\n conf.timeline?.padding ?? 50,\n conf.timeline?.useMaxWidth ?? false\n );\n\n // addSVGAccessibilityFields(diagObj.db, diagram, id);\n};\n\nexport const drawTasks = function (\n diagram: Selection,\n tasks: TimelineTask[],\n sectionColor: number,\n masterX: number,\n masterY: number,\n maxTaskHeight: number,\n conf: MermaidConfig,\n maxEventCount: number,\n maxEventLineLength: number,\n maxSectionHeight: number,\n isWithoutSections: boolean\n) {\n // Draw the tasks\n for (const task of tasks) {\n // create node from task\n const taskNode = {\n descr: task.task,\n section: sectionColor,\n number: sectionColor,\n width: 150,\n padding: 20,\n maxHeight: maxTaskHeight,\n };\n\n log.debug('taskNode', taskNode);\n // create task wrapper\n\n const taskWrapper = diagram.append('g').attr('class', 'taskWrapper');\n const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf);\n const taskHeight = node.height;\n //log task height\n log.debug('taskHeight after draw', taskHeight);\n taskWrapper.attr('transform', `translate(${masterX}, ${masterY})`);\n\n // update max task height\n maxTaskHeight = Math.max(maxTaskHeight, taskHeight);\n\n // if task has events, draw them\n if (task.events) {\n // draw a line between the task and the events\n const lineWrapper = diagram.append('g').attr('class', 'lineWrapper');\n let lineLength = maxTaskHeight;\n //add margin to task\n masterY += 100;\n lineLength =\n lineLength + drawEvents(diagram, task.events, sectionColor, masterX, masterY, conf);\n masterY -= 100;\n\n lineWrapper\n .append('line')\n .attr('x1', masterX + 190 / 2)\n .attr('y1', masterY + maxTaskHeight) // One section head + one task + margins\n .attr('x2', masterX + 190 / 2) // Subtract stroke width so arrow point is retained\n .attr(\n 'y2',\n masterY +\n maxTaskHeight +\n (isWithoutSections ? maxTaskHeight : maxSectionHeight) +\n maxEventLineLength +\n 120\n )\n .attr('stroke-width', 2)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)')\n .attr('stroke-dasharray', '5,5');\n }\n\n masterX = masterX + 200;\n if (isWithoutSections && !conf.timeline?.disableMulticolor) {\n sectionColor++;\n }\n }\n\n // reset Y coordinate for next section\n masterY = masterY - 10;\n};\n\nexport const drawEvents = function (\n diagram: Selection,\n events: string[],\n sectionColor: number,\n masterX: number,\n masterY: number,\n conf: MermaidConfig\n) {\n let maxEventHeight = 0;\n const eventBeginY = masterY;\n masterY = masterY + 100;\n // Draw the events\n for (const event of events) {\n // create node from event\n const eventNode: Block = {\n descr: event,\n section: sectionColor,\n number: sectionColor,\n width: 150,\n padding: 20,\n maxHeight: 50,\n };\n\n //log task node\n log.debug('eventNode', eventNode);\n // create event wrapper\n const eventWrapper = diagram.append('g').attr('class', 'eventWrapper');\n const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf);\n const eventHeight = node.height;\n maxEventHeight = maxEventHeight + eventHeight;\n eventWrapper.attr('transform', `translate(${masterX}, ${masterY})`);\n masterY = masterY + 10 + eventHeight;\n }\n // set masterY back to eventBeginY\n masterY = eventBeginY;\n return maxEventHeight;\n};\n\nexport default {\n setConf: () => {\n // no-op\n },\n draw,\n};\n", "import { darken, lighten, isDark } from 'khroma';\n\nconst genSections = (options) => {\n let sections = '';\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];\n if (isDark(options['lineColor' + i])) {\n options['lineColor' + i] = lighten(options['lineColor' + i], 20);\n } else {\n options['lineColor' + i] = darken(options['lineColor' + i], 20);\n }\n }\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = '' + (17 - 3 * i);\n sections += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${\n i - 1\n } path {\n fill: ${options['cScale' + i]};\n }\n .section-${i - 1} text {\n fill: ${options['cScaleLabel' + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options['cScaleLabel' + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options['cScale' + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options['cScaleInv' + i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${options['cScaleLabel' + i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `;\n }\n return sections;\n};\n\nconst getStyles = (options) =>\n `\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`;\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/timeline.jison';\nimport * as db from './timelineDb.js';\nimport renderer from './timelineRenderer.js';\nimport styles from './styles.js';\n\nexport const diagram = {\n db,\n renderer,\n parser,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,6,13,15,16,19,22],$Vd=[1,33],$Ve=[1,34],$Vf=[1,6,7,11,13,15,16,19,22];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mindMap\":4,\"spaceLines\":5,\"SPACELINE\":6,\"NL\":7,\"MINDMAP\":8,\"document\":9,\"stop\":10,\"EOF\":11,\"statement\":12,\"SPACELIST\":13,\"node\":14,\"ICON\":15,\"CLASS\":16,\"nodeWithId\":17,\"nodeWithoutId\":18,\"NODE_DSTART\":19,\"NODE_DESCR\":20,\"NODE_DEND\":21,\"NODE_ID\":22,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",6:\"SPACELINE\",7:\"NL\",8:\"MINDMAP\",11:\"EOF\",13:\"SPACELIST\",15:\"ICON\",16:\"CLASS\",19:\"NODE_DSTART\",20:\"NODE_DESCR\",21:\"NODE_DEND\",22:\"NODE_ID\"},\nproductions_: [0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 6: case 7:\n return yy; \nbreak;\ncase 8:\nyy.getLogger().trace('Stop NL ');\nbreak;\ncase 9:\nyy.getLogger().trace('Stop EOF ');\nbreak;\ncase 11:\nyy.getLogger().trace('Stop NL2 ');\nbreak;\ncase 12:\nyy.getLogger().trace('Stop EOF2 ');\nbreak;\ncase 15:\n yy.getLogger().info('Node: ',$$[$0].id);yy.addNode($$[$0-1].length, $$[$0].id, $$[$0].descr, $$[$0].type); \nbreak;\ncase 16:\n yy.getLogger().trace('Icon: ',$$[$0]);yy.decorateNode({icon: $$[$0]}); \nbreak;\ncase 17: case 21:\n yy.decorateNode({class: $$[$0]}); \nbreak;\ncase 18:\n yy.getLogger().trace('SPACELIST');\nbreak;\ncase 19:\n yy.getLogger().trace('Node: ',$$[$0].id);yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); \nbreak;\ncase 20:\n yy.decorateNode({icon: $$[$0]}); \nbreak;\ncase 25:\n yy.getLogger().trace(\"node found ..\", $$[$0-2]); this.$ = { id: $$[$0-1], descr: $$[$0-1], type: yy.getType($$[$0-2], $$[$0]) }; \nbreak;\ncase 26:\n this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; \nbreak;\ncase 27:\n yy.getLogger().trace(\"node found ..\", $$[$0-3]); this.$ = { id: $$[$0-3], descr: $$[$0-1], type: yy.getType($$[$0-2], $$[$0]) }; \nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:$V5,22:$V6}),o($Vb,[2,18]),o($Vb,[2,19]),o($Vb,[2,20]),o($Vb,[2,21]),o($Vb,[2,23]),o($Vb,[2,24]),o($Vb,[2,26],{19:[1,30]}),{20:[1,31]},{6:$V8,7:$V9,10:32,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($Vc,[2,14],{7:$Vd,11:$Ve}),o($Vf,[2,8]),o($Vf,[2,9]),o($Vf,[2,10]),o($Vb,[2,15]),o($Vb,[2,16]),o($Vb,[2,17]),{20:[1,35]},{21:[1,36]},o($Vc,[2,13],{7:$Vd,11:$Ve}),o($Vf,[2,11]),o($Vf,[2,12]),{21:[1,37]},o($Vb,[2,25]),o($Vb,[2,27])],\ndefaultActions: {2:[2,1],6:[2,2]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\t// Pre-lexer code can go here\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:yy.getLogger().trace('Found comment',yy_.yytext); return 6;\nbreak;\ncase 1:return 8;\nbreak;\ncase 2: this.begin('CLASS'); \nbreak;\ncase 3: this.popState();return 16; \nbreak;\ncase 4: this.popState();\nbreak;\ncase 5: yy.getLogger().trace('Begin icon');this.begin('ICON'); \nbreak;\ncase 6:yy.getLogger().trace('SPACELINE');return 6 /* skip all whitespace */ ;\nbreak;\ncase 7:return 7;\nbreak;\ncase 8: return 15; \nbreak;\ncase 9:yy.getLogger().trace('end icon');this.popState();\nbreak;\ncase 10: yy.getLogger().trace('Exploding node'); this.begin('NODE');return 19; \nbreak;\ncase 11: yy.getLogger().trace('Cloud'); this.begin('NODE');return 19; \nbreak;\ncase 12: yy.getLogger().trace('Explosion Bang'); this.begin('NODE');return 19; \nbreak;\ncase 13: yy.getLogger().trace('Cloud Bang'); this.begin('NODE');return 19; \nbreak;\ncase 14: this.begin('NODE');return 19; \nbreak;\ncase 15: this.begin('NODE');return 19; \nbreak;\ncase 16: this.begin('NODE');return 19; \nbreak;\ncase 17: this.begin('NODE');return 19; \nbreak;\ncase 18:return 13 /* skip all whitespace */ ;\nbreak;\ncase 19:return 22;\nbreak;\ncase 20:return 11;\nbreak;\ncase 21: this.begin(\"NSTR2\");\nbreak;\ncase 22: return \"NODE_DESCR\";\nbreak;\ncase 23: this.popState();\nbreak;\ncase 24: yy.getLogger().trace('Starting NSTR');this.begin(\"NSTR\");\nbreak;\ncase 25: yy.getLogger().trace('description:', yy_.yytext); return \"NODE_DESCR\";\nbreak;\ncase 26:this.popState();\nbreak;\ncase 27:this.popState();yy.getLogger().trace('node end ))');return \"NODE_DEND\";\nbreak;\ncase 28:this.popState();yy.getLogger().trace('node end )');return \"NODE_DEND\";\nbreak;\ncase 29:this.popState();yy.getLogger().trace('node end ...',yy_.yytext);return \"NODE_DEND\";\nbreak;\ncase 30:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 31:this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";\nbreak;\ncase 32:this.popState();yy.getLogger().trace('node end (-');return \"NODE_DEND\";\nbreak;\ncase 33:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 34:this.popState();yy.getLogger().trace('node end ((');return \"NODE_DEND\";\nbreak;\ncase 35: yy.getLogger().trace('Long description:', yy_.yytext); return 20;\nbreak;\ncase 36: yy.getLogger().trace('Long description:', yy_.yytext); return 20;\nbreak;\n}\n},\nrules: [/^(?:\\s*%%.*)/i,/^(?:mindmap\\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\\n)/i,/^(?:::icon\\()/i,/^(?:[\\s]+[\\n])/i,/^(?:[\\n]+)/i,/^(?:[^\\)]+)/i,/^(?:\\))/i,/^(?:-\\))/i,/^(?:\\(-)/i,/^(?:\\)\\))/i,/^(?:\\))/i,/^(?:\\(\\()/i,/^(?:\\{\\{)/i,/^(?:\\()/i,/^(?:\\[)/i,/^(?:[\\s]+)/i,/^(?:[^\\(\\[\\n\\)\\{\\}]+)/i,/^(?:$)/i,/^(?:[\"][`])/i,/^(?:[^`\"]+)/i,/^(?:[`][\"])/i,/^(?:[\"])/i,/^(?:[^\"]+)/i,/^(?:[\"])/i,/^(?:[\\)]\\))/i,/^(?:[\\)])/i,/^(?:[\\]])/i,/^(?:\\}\\})/i,/^(?:\\(-)/i,/^(?:-\\))/i,/^(?:\\(\\()/i,/^(?:\\()/i,/^(?:[^\\)\\]\\(\\}]+)/i,/^(?:.+(?!\\(\\())/i],\nconditions: {\"CLASS\":{\"rules\":[3,4],\"inclusive\":false},\"ICON\":{\"rules\":[8,9],\"inclusive\":false},\"NSTR2\":{\"rules\":[22,23],\"inclusive\":false},\"NSTR\":{\"rules\":[25,26],\"inclusive\":false},\"NODE\":{\"rules\":[21,24,27,28,29,30,31,32,33,34,35,36],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { D3Element } from '../../types.js';\nimport { sanitizeText } from '../../diagrams/common/common.js';\nimport { log } from '../../logger.js';\nimport type { MindmapNode } from './mindmapTypes.js';\nimport defaultConfig from '../../defaultConfig.js';\n\nlet nodes: MindmapNode[] = [];\nlet cnt = 0;\nlet elements: Record = {};\n\nconst clear = () => {\n nodes = [];\n cnt = 0;\n elements = {};\n};\n\nconst getParent = function (level: number) {\n for (let i = nodes.length - 1; i >= 0; i--) {\n if (nodes[i].level < level) {\n return nodes[i];\n }\n }\n // No parent found\n return null;\n};\n\nconst getMindmap = () => {\n return nodes.length > 0 ? nodes[0] : null;\n};\n\nconst addNode = (level: number, id: string, descr: string, type: number) => {\n log.info('addNode', level, id, descr, type);\n const conf = getConfig();\n let padding: number = conf.mindmap?.padding ?? defaultConfig.mindmap.padding;\n switch (type) {\n case nodeType.ROUNDED_RECT:\n case nodeType.RECT:\n case nodeType.HEXAGON:\n padding *= 2;\n }\n\n const node = {\n id: cnt++,\n nodeId: sanitizeText(id, conf),\n level,\n descr: sanitizeText(descr, conf),\n type,\n children: [],\n width: conf.mindmap?.maxNodeWidth ?? defaultConfig.mindmap.maxNodeWidth,\n padding,\n } satisfies MindmapNode;\n\n const parent = getParent(level);\n if (parent) {\n parent.children.push(node);\n // Keep all nodes in the list\n nodes.push(node);\n } else {\n if (nodes.length === 0) {\n // First node, the root\n nodes.push(node);\n } else {\n // Syntax error ... there can only bee one root\n throw new Error(\n 'There can be only one root. No parent could be found for (\"' + node.descr + '\")'\n );\n }\n }\n};\n\nconst nodeType = {\n DEFAULT: 0,\n NO_BORDER: 0,\n ROUNDED_RECT: 1,\n RECT: 2,\n CIRCLE: 3,\n CLOUD: 4,\n BANG: 5,\n HEXAGON: 6,\n};\n\nconst getType = (startStr: string, endStr: string): number => {\n log.debug('In get type', startStr, endStr);\n switch (startStr) {\n case '[':\n return nodeType.RECT;\n case '(':\n return endStr === ')' ? nodeType.ROUNDED_RECT : nodeType.CLOUD;\n case '((':\n return nodeType.CIRCLE;\n case ')':\n return nodeType.CLOUD;\n case '))':\n return nodeType.BANG;\n case '{{':\n return nodeType.HEXAGON;\n default:\n return nodeType.DEFAULT;\n }\n};\n\nconst setElementForId = (id: number, element: D3Element) => {\n elements[id] = element;\n};\n\nconst decorateNode = (decoration?: { class?: string; icon?: string }) => {\n if (!decoration) {\n return;\n }\n const config = getConfig();\n const node = nodes[nodes.length - 1];\n if (decoration.icon) {\n node.icon = sanitizeText(decoration.icon, config);\n }\n if (decoration.class) {\n node.class = sanitizeText(decoration.class, config);\n }\n};\n\nconst type2Str = (type: number) => {\n switch (type) {\n case nodeType.DEFAULT:\n return 'no-border';\n case nodeType.RECT:\n return 'rect';\n case nodeType.ROUNDED_RECT:\n return 'rounded-rect';\n case nodeType.CIRCLE:\n return 'circle';\n case nodeType.CLOUD:\n return 'cloud';\n case nodeType.BANG:\n return 'bang';\n case nodeType.HEXAGON:\n return 'hexgon'; // cspell: disable-line\n default:\n return 'no-border';\n }\n};\n\n// Expose logger to grammar\nconst getLogger = () => log;\nconst getElementById = (id: number) => elements[id];\n\nconst db = {\n clear,\n addNode,\n getMindmap,\n nodeType,\n getType,\n setElementForId,\n decorateNode,\n type2Str,\n getLogger,\n getElementById,\n} as const;\n\nexport default db;\n", "/**\n * Copyright (c) 2016-2024, The Cytoscape Consortium.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \u201CSoftware\u201D), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \u201CAS IS\u201D, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty$1(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function () {};\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = it.call(o);\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nvar _window = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef\n\nvar navigator = _window ? _window.navigator : null;\n_window ? _window.document : null;\nvar typeofstr = _typeof('');\nvar typeofobj = _typeof({});\nvar typeoffn = _typeof(function () {});\nvar typeofhtmlele = typeof HTMLElement === \"undefined\" ? \"undefined\" : _typeof(HTMLElement);\nvar instanceStr = function instanceStr(obj) {\n return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null;\n};\n\nvar string = function string(obj) {\n return obj != null && _typeof(obj) == typeofstr;\n};\nvar fn$6 = function fn(obj) {\n return obj != null && _typeof(obj) === typeoffn;\n};\nvar array = function array(obj) {\n return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array);\n};\nvar plainObject = function plainObject(obj) {\n return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object;\n};\nvar object = function object(obj) {\n return obj != null && _typeof(obj) === typeofobj;\n};\nvar number$1 = function number(obj) {\n return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj);\n};\nvar integer = function integer(obj) {\n return number$1(obj) && Math.floor(obj) === obj;\n};\nvar htmlElement = function htmlElement(obj) {\n if ('undefined' === typeofhtmlele) {\n return undefined;\n } else {\n return null != obj && obj instanceof HTMLElement;\n }\n};\nvar elementOrCollection = function elementOrCollection(obj) {\n return element(obj) || collection(obj);\n};\nvar element = function element(obj) {\n return instanceStr(obj) === 'collection' && obj._private.single;\n};\nvar collection = function collection(obj) {\n return instanceStr(obj) === 'collection' && !obj._private.single;\n};\nvar core = function core(obj) {\n return instanceStr(obj) === 'core';\n};\nvar stylesheet = function stylesheet(obj) {\n return instanceStr(obj) === 'stylesheet';\n};\nvar event = function event(obj) {\n return instanceStr(obj) === 'event';\n};\nvar emptyString = function emptyString(obj) {\n if (obj === undefined || obj === null) {\n // null is empty\n return true;\n } else if (obj === '' || obj.match(/^\\s+$/)) {\n return true; // empty string is empty\n }\n\n return false; // otherwise, we don't know what we've got\n};\nvar domElement = function domElement(obj) {\n if (typeof HTMLElement === 'undefined') {\n return false; // we're not in a browser so it doesn't matter\n } else {\n return obj instanceof HTMLElement;\n }\n};\nvar boundingBox = function boundingBox(obj) {\n return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2);\n};\nvar promise = function promise(obj) {\n return object(obj) && fn$6(obj.then);\n};\nvar ms = function ms() {\n return navigator && navigator.userAgent.match(/msie|trident|edge/i);\n}; // probably a better way to detect this...\n\nvar memoize$1 = function memoize(fn, keyFn) {\n if (!keyFn) {\n keyFn = function keyFn() {\n if (arguments.length === 1) {\n return arguments[0];\n } else if (arguments.length === 0) {\n return 'undefined';\n }\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n return args.join('$');\n };\n }\n var memoizedFn = function memoizedFn() {\n var self = this;\n var args = arguments;\n var ret;\n var k = keyFn.apply(self, args);\n var cache = memoizedFn.cache;\n if (!(ret = cache[k])) {\n ret = cache[k] = fn.apply(self, args);\n }\n return ret;\n };\n memoizedFn.cache = {};\n return memoizedFn;\n};\n\nvar camel2dash = memoize$1(function (str) {\n return str.replace(/([A-Z])/g, function (v) {\n return '-' + v.toLowerCase();\n });\n});\nvar dash2camel = memoize$1(function (str) {\n return str.replace(/(-\\w)/g, function (v) {\n return v[1].toUpperCase();\n });\n});\nvar prependCamel = memoize$1(function (prefix, str) {\n return prefix + str[0].toUpperCase() + str.substring(1);\n}, function (prefix, str) {\n return prefix + '$' + str;\n});\nvar capitalize = function capitalize(str) {\n if (emptyString(str)) {\n return str;\n }\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nvar number = '(?:[-+]?(?:(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[Ee][+-]?\\\\d+)?))';\nvar rgba = 'rgb[a]?\\\\((' + number + '[%]?)\\\\s*,\\\\s*(' + number + '[%]?)\\\\s*,\\\\s*(' + number + '[%]?)(?:\\\\s*,\\\\s*(' + number + '))?\\\\)';\nvar rgbaNoBackRefs = 'rgb[a]?\\\\((?:' + number + '[%]?)\\\\s*,\\\\s*(?:' + number + '[%]?)\\\\s*,\\\\s*(?:' + number + '[%]?)(?:\\\\s*,\\\\s*(?:' + number + '))?\\\\)';\nvar hsla = 'hsl[a]?\\\\((' + number + ')\\\\s*,\\\\s*(' + number + '[%])\\\\s*,\\\\s*(' + number + '[%])(?:\\\\s*,\\\\s*(' + number + '))?\\\\)';\nvar hslaNoBackRefs = 'hsl[a]?\\\\((?:' + number + ')\\\\s*,\\\\s*(?:' + number + '[%])\\\\s*,\\\\s*(?:' + number + '[%])(?:\\\\s*,\\\\s*(?:' + number + '))?\\\\)';\nvar hex3 = '\\\\#[0-9a-fA-F]{3}';\nvar hex6 = '\\\\#[0-9a-fA-F]{6}';\n\nvar ascending = function ascending(a, b) {\n if (a < b) {\n return -1;\n } else if (a > b) {\n return 1;\n } else {\n return 0;\n }\n};\nvar descending = function descending(a, b) {\n return -1 * ascending(a, b);\n};\n\nvar extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {\n var args = arguments;\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (obj == null) {\n continue;\n }\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; j++) {\n var k = keys[j];\n tgt[k] = obj[k];\n }\n }\n return tgt;\n};\n\n// get [r, g, b] from #abc or #aabbcc\nvar hex2tuple = function hex2tuple(hex) {\n if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') {\n return;\n }\n var shortHex = hex.length === 4;\n var r, g, b;\n var base = 16;\n if (shortHex) {\n r = parseInt(hex[1] + hex[1], base);\n g = parseInt(hex[2] + hex[2], base);\n b = parseInt(hex[3] + hex[3], base);\n } else {\n r = parseInt(hex[1] + hex[2], base);\n g = parseInt(hex[3] + hex[4], base);\n b = parseInt(hex[5] + hex[6], base);\n }\n return [r, g, b];\n};\n\n// get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0)\nvar hsl2tuple = function hsl2tuple(hsl) {\n var ret;\n var h, s, l, a, r, g, b;\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n var m = new RegExp('^' + hsla + '$').exec(hsl);\n if (m) {\n // get hue\n h = parseInt(m[1]);\n if (h < 0) {\n h = (360 - -1 * h % 360) % 360;\n } else if (h > 360) {\n h = h % 360;\n }\n h /= 360; // normalise on [0, 1]\n\n s = parseFloat(m[2]);\n if (s < 0 || s > 100) {\n return;\n } // saturation is [0, 100]\n s = s / 100; // normalise on [0, 1]\n\n l = parseFloat(m[3]);\n if (l < 0 || l > 100) {\n return;\n } // lightness is [0, 100]\n l = l / 100; // normalise on [0, 1]\n\n a = m[4];\n if (a !== undefined) {\n a = parseFloat(a);\n if (a < 0 || a > 1) {\n return;\n } // alpha is [0, 1]\n }\n\n // now, convert to rgb\n // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript\n if (s === 0) {\n r = g = b = Math.round(l * 255); // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = Math.round(255 * hue2rgb(p, q, h + 1 / 3));\n g = Math.round(255 * hue2rgb(p, q, h));\n b = Math.round(255 * hue2rgb(p, q, h - 1 / 3));\n }\n ret = [r, g, b, a];\n }\n return ret;\n};\n\n// get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0)\nvar rgb2tuple = function rgb2tuple(rgb) {\n var ret;\n var m = new RegExp('^' + rgba + '$').exec(rgb);\n if (m) {\n ret = [];\n var isPct = [];\n for (var i = 1; i <= 3; i++) {\n var channel = m[i];\n if (channel[channel.length - 1] === '%') {\n isPct[i] = true;\n }\n channel = parseFloat(channel);\n if (isPct[i]) {\n channel = channel / 100 * 255; // normalise to [0, 255]\n }\n\n if (channel < 0 || channel > 255) {\n return;\n } // invalid channel value\n\n ret.push(Math.floor(channel));\n }\n var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3];\n var allArePct = isPct[1] && isPct[2] && isPct[3];\n if (atLeastOneIsPct && !allArePct) {\n return;\n } // must all be percent values if one is\n\n var alpha = m[4];\n if (alpha !== undefined) {\n alpha = parseFloat(alpha);\n if (alpha < 0 || alpha > 1) {\n return;\n } // invalid alpha value\n\n ret.push(alpha);\n }\n }\n return ret;\n};\nvar colorname2tuple = function colorname2tuple(color) {\n return colors[color.toLowerCase()];\n};\nvar color2tuple = function color2tuple(color) {\n return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color);\n};\nvar colors = {\n // special colour names\n transparent: [0, 0, 0, 0],\n // NB alpha === 0\n\n // regular colours\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 134, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 250, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n grey: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 221],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [112, 128, 144],\n slategrey: [112, 128, 144],\n snow: [255, 250, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 50]\n};\n\n// sets the value in a map (map may not be built)\nvar setMap = function setMap(options) {\n var obj = options.map;\n var keys = options.keys;\n var l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (plainObject(key)) {\n throw Error('Tried to set map with object key');\n }\n if (i < keys.length - 1) {\n // extend the map if necessary\n if (obj[key] == null) {\n obj[key] = {};\n }\n obj = obj[key];\n } else {\n // set the value\n obj[key] = options.value;\n }\n }\n};\n\n// gets the value in a map even if it's not built in places\nvar getMap = function getMap(options) {\n var obj = options.map;\n var keys = options.keys;\n var l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (plainObject(key)) {\n throw Error('Tried to get map with object key');\n }\n obj = obj[key];\n if (obj == null) {\n return obj;\n }\n }\n return obj;\n};\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nvar isObject_1 = isObject;\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\nvar _freeGlobal = freeGlobal;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = _freeGlobal || freeSelf || Function('return this')();\n\nvar _root = root;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return _root.Date.now();\n};\n\nvar now_1 = now;\n\n/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nvar _trimmedEndIndex = trimmedEndIndex;\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nvar _baseTrim = baseTrim;\n\n/** Built-in value references. */\nvar Symbol$1 = _root.Symbol;\n\nvar _Symbol = Symbol$1;\n\n/** Used for built-in method references. */\nvar objectProto$5 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$4 = objectProto$5.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString$1 = objectProto$5.toString;\n\n/** Built-in value references. */\nvar symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty$4.call(value, symToStringTag$1),\n tag = value[symToStringTag$1];\n\n try {\n value[symToStringTag$1] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString$1.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag$1] = tag;\n } else {\n delete value[symToStringTag$1];\n }\n }\n return result;\n}\n\nvar _getRawTag = getRawTag;\n\n/** Used for built-in method references. */\nvar objectProto$4 = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto$4.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nvar _objectToString = objectToString;\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? _getRawTag(value)\n : _objectToString(value);\n}\n\nvar _baseGetTag = baseGetTag;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nvar isObjectLike_1 = isObjectLike;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);\n}\n\nvar isSymbol_1 = isSymbol;\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol_1(value)) {\n return NAN;\n }\n if (isObject_1(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject_1(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = _baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nvar toNumber_1 = toNumber;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT$1 = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT$1);\n }\n wait = toNumber_1(wait) || 0;\n if (isObject_1(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now_1();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now_1());\n }\n\n function debounced() {\n var time = now_1(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nvar debounce_1 = debounce;\n\nvar performance = _window ? _window.performance : null;\nvar pnow = performance && performance.now ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\nvar raf = function () {\n if (_window) {\n if (_window.requestAnimationFrame) {\n return function (fn) {\n _window.requestAnimationFrame(fn);\n };\n } else if (_window.mozRequestAnimationFrame) {\n return function (fn) {\n _window.mozRequestAnimationFrame(fn);\n };\n } else if (_window.webkitRequestAnimationFrame) {\n return function (fn) {\n _window.webkitRequestAnimationFrame(fn);\n };\n } else if (_window.msRequestAnimationFrame) {\n return function (fn) {\n _window.msRequestAnimationFrame(fn);\n };\n }\n }\n return function (fn) {\n if (fn) {\n setTimeout(function () {\n fn(pnow());\n }, 1000 / 60);\n }\n };\n}();\nvar requestAnimationFrame = function requestAnimationFrame(fn) {\n return raf(fn);\n};\nvar performanceNow = pnow;\n\nvar DEFAULT_HASH_SEED = 9261;\nvar K = 65599; // 37 also works pretty well\nvar DEFAULT_HASH_SEED_ALT = 5381;\nvar hashIterableInts = function hashIterableInts(iterator) {\n var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED;\n // sdbm/string-hash\n var hash = seed;\n var entry;\n for (;;) {\n entry = iterator.next();\n if (entry.done) {\n break;\n }\n hash = hash * K + entry.value | 0;\n }\n return hash;\n};\nvar hashInt = function hashInt(num) {\n var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED;\n // sdbm/string-hash\n return seed * K + num | 0;\n};\nvar hashIntAlt = function hashIntAlt(num) {\n var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT;\n // djb2/string-hash\n return (seed << 5) + seed + num | 0;\n};\nvar combineHashes = function combineHashes(hash1, hash2) {\n return hash1 * 0x200000 + hash2;\n};\nvar combineHashesArray = function combineHashesArray(hashes) {\n return hashes[0] * 0x200000 + hashes[1];\n};\nvar hashArrays = function hashArrays(hashes1, hashes2) {\n return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])];\n};\nvar hashIntsArray = function hashIntsArray(ints, seed) {\n var entry = {\n value: 0,\n done: false\n };\n var i = 0;\n var length = ints.length;\n var iterator = {\n next: function next() {\n if (i < length) {\n entry.value = ints[i++];\n } else {\n entry.done = true;\n }\n return entry;\n }\n };\n return hashIterableInts(iterator, seed);\n};\nvar hashString = function hashString(str, seed) {\n var entry = {\n value: 0,\n done: false\n };\n var i = 0;\n var length = str.length;\n var iterator = {\n next: function next() {\n if (i < length) {\n entry.value = str.charCodeAt(i++);\n } else {\n entry.done = true;\n }\n return entry;\n }\n };\n return hashIterableInts(iterator, seed);\n};\nvar hashStrings = function hashStrings() {\n return hashStringsArray(arguments);\n};\nvar hashStringsArray = function hashStringsArray(strs) {\n var hash;\n for (var i = 0; i < strs.length; i++) {\n var str = strs[i];\n if (i === 0) {\n hash = hashString(str);\n } else {\n hash = hashString(str, hash);\n }\n }\n return hash;\n};\n\n/*global console */\nvar warningsEnabled = true;\nvar warnSupported = console.warn != null; // eslint-disable-line no-console\nvar traceSupported = console.trace != null; // eslint-disable-line no-console\n\nvar MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;\nvar trueify = function trueify() {\n return true;\n};\nvar falsify = function falsify() {\n return false;\n};\nvar zeroify = function zeroify() {\n return 0;\n};\nvar noop$1 = function noop() {};\nvar error = function error(msg) {\n throw new Error(msg);\n};\nvar warnings = function warnings(enabled) {\n if (enabled !== undefined) {\n warningsEnabled = !!enabled;\n } else {\n return warningsEnabled;\n }\n};\nvar warn = function warn(msg) {\n /* eslint-disable no-console */\n if (!warnings()) {\n return;\n }\n if (warnSupported) {\n console.warn(msg);\n } else {\n console.log(msg);\n if (traceSupported) {\n console.trace();\n }\n }\n}; /* eslint-enable */\n\nvar clone = function clone(obj) {\n return extend({}, obj);\n};\n\n// gets a shallow copy of the argument\nvar copy = function copy(obj) {\n if (obj == null) {\n return obj;\n }\n if (array(obj)) {\n return obj.slice();\n } else if (plainObject(obj)) {\n return clone(obj);\n } else {\n return obj;\n }\n};\nvar copyArray$1 = function copyArray(arr) {\n return arr.slice();\n};\nvar uuid = function uuid(a, b /* placeholders */) {\n for (\n // loop :)\n b = a = '';\n // b - result , a - numeric letiable\n a++ < 36;\n //\n b += a * 51 & 52 // if \"a\" is not 9 or 14 or 19 or 24\n ?\n // return a random number or 4\n (a ^ 15 // if \"a\" is not 15\n ?\n // generate a random number from 0 to 15\n 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless \"a\" is 20, in which case a random number from 8 to 11\n : 4 // otherwise 4\n ).toString(16) : '-' // in other cases (if \"a\" is 9,14,19,24) insert \"-\"\n ) {\n }\n return b;\n};\nvar _staticEmptyObject = {};\nvar staticEmptyObject = function staticEmptyObject() {\n return _staticEmptyObject;\n};\nvar defaults$g = function defaults(_defaults) {\n var keys = Object.keys(_defaults);\n return function (opts) {\n var filledOpts = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var optVal = opts == null ? undefined : opts[key];\n filledOpts[key] = optVal === undefined ? _defaults[key] : optVal;\n }\n return filledOpts;\n };\n};\nvar removeFromArray = function removeFromArray(arr, ele, oneCopy) {\n for (var i = arr.length - 1; i >= 0; i--) {\n if (arr[i] === ele) {\n arr.splice(i, 1);\n if (oneCopy) {\n break;\n }\n }\n }\n};\nvar clearArray = function clearArray(arr) {\n arr.splice(0, arr.length);\n};\nvar push = function push(arr, otherArr) {\n for (var i = 0; i < otherArr.length; i++) {\n var el = otherArr[i];\n arr.push(el);\n }\n};\nvar getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) {\n if (prefix) {\n propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth\n }\n\n return obj[propName];\n};\nvar setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) {\n if (prefix) {\n propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth\n }\n\n obj[propName] = value;\n};\n\n/* global Map */\nvar ObjectMap = /*#__PURE__*/function () {\n function ObjectMap() {\n _classCallCheck(this, ObjectMap);\n this._obj = {};\n }\n _createClass(ObjectMap, [{\n key: \"set\",\n value: function set(key, val) {\n this._obj[key] = val;\n return this;\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this._obj[key] = undefined;\n return this;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this._obj = {};\n }\n }, {\n key: \"has\",\n value: function has(key) {\n return this._obj[key] !== undefined;\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this._obj[key];\n }\n }]);\n return ObjectMap;\n}();\nvar Map$2 = typeof Map !== 'undefined' ? Map : ObjectMap;\n\n/* global Set */\n\nvar undef = \"undefined\" ;\nvar ObjectSet = /*#__PURE__*/function () {\n function ObjectSet(arrayOrObjectSet) {\n _classCallCheck(this, ObjectSet);\n this._obj = Object.create(null);\n this.size = 0;\n if (arrayOrObjectSet != null) {\n var arr;\n if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) {\n arr = arrayOrObjectSet.toArray();\n } else {\n arr = arrayOrObjectSet;\n }\n for (var i = 0; i < arr.length; i++) {\n this.add(arr[i]);\n }\n }\n }\n _createClass(ObjectSet, [{\n key: \"instanceString\",\n value: function instanceString() {\n return 'set';\n }\n }, {\n key: \"add\",\n value: function add(val) {\n var o = this._obj;\n if (o[val] !== 1) {\n o[val] = 1;\n this.size++;\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(val) {\n var o = this._obj;\n if (o[val] === 1) {\n o[val] = 0;\n this.size--;\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this._obj = Object.create(null);\n }\n }, {\n key: \"has\",\n value: function has(val) {\n return this._obj[val] === 1;\n }\n }, {\n key: \"toArray\",\n value: function toArray() {\n var _this = this;\n return Object.keys(this._obj).filter(function (key) {\n return _this.has(key);\n });\n }\n }, {\n key: \"forEach\",\n value: function forEach(callback, thisArg) {\n return this.toArray().forEach(callback, thisArg);\n }\n }]);\n return ObjectSet;\n}();\nvar Set$1 = (typeof Set === \"undefined\" ? \"undefined\" : _typeof(Set)) !== undef ? Set : ObjectSet;\n\n// represents a node or an edge\nvar Element = function Element(cy, params) {\n var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n if (cy === undefined || params === undefined || !core(cy)) {\n error('An element must have a core reference and parameters set');\n return;\n }\n var group = params.group;\n\n // try to automatically infer the group if unspecified\n if (group == null) {\n if (params.data && params.data.source != null && params.data.target != null) {\n group = 'edges';\n } else {\n group = 'nodes';\n }\n }\n\n // validate group\n if (group !== 'nodes' && group !== 'edges') {\n error('An element must be of type `nodes` or `edges`; you specified `' + group + '`');\n return;\n }\n\n // make the element array-like, just like a collection\n this.length = 1;\n this[0] = this;\n\n // NOTE: when something is added here, add also to ele.json()\n var _p = this._private = {\n cy: cy,\n single: true,\n // indicates this is an element\n data: params.data || {},\n // data object\n position: params.position || {\n x: 0,\n y: 0\n },\n // (x, y) position pair\n autoWidth: undefined,\n // width and height of nodes calculated by the renderer when set to special 'auto' value\n autoHeight: undefined,\n autoPadding: undefined,\n compoundBoundsClean: false,\n // whether the compound dimensions need to be recalculated the next time dimensions are read\n listeners: [],\n // array of bound listeners\n group: group,\n // string; 'nodes' or 'edges'\n style: {},\n // properties as set by the style\n rstyle: {},\n // properties for style sent from the renderer to the core\n styleCxts: [],\n // applied style contexts from the styler\n styleKeys: {},\n // per-group keys of style property values\n removed: true,\n // whether it's inside the vis; true if removed (set true here since we call restore)\n selected: params.selected ? true : false,\n // whether it's selected\n selectable: params.selectable === undefined ? true : params.selectable ? true : false,\n // whether it's selectable\n locked: params.locked ? true : false,\n // whether the element is locked (cannot be moved)\n grabbed: false,\n // whether the element is grabbed by the mouse; renderer sets this privately\n grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false,\n // whether the element can be grabbed\n pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false,\n // whether the element has passthrough panning enabled\n active: false,\n // whether the element is active from user interaction\n classes: new Set$1(),\n // map ( className => true )\n animation: {\n // object for currently-running animations\n current: [],\n queue: []\n },\n rscratch: {},\n // object in which the renderer can store information\n scratch: params.scratch || {},\n // scratch objects\n edges: [],\n // array of connected edges\n children: [],\n // array of children\n parent: params.parent && params.parent.isNode() ? params.parent : null,\n // parent ref\n traversalCache: {},\n // cache of output of traversal functions\n backgrounding: false,\n // whether background images are loading\n bbCache: null,\n // cache of the current bounding box\n bbCacheShift: {\n x: 0,\n y: 0\n },\n // shift applied to cached bb to be applied on next get\n bodyBounds: null,\n // bounds cache of element body, w/o overlay\n overlayBounds: null,\n // bounds cache of element body, including overlay\n labelBounds: {\n // bounds cache of labels\n all: null,\n source: null,\n target: null,\n main: null\n },\n arrowBounds: {\n // bounds cache of edge arrows\n source: null,\n target: null,\n 'mid-source': null,\n 'mid-target': null\n }\n };\n if (_p.position.x == null) {\n _p.position.x = 0;\n }\n if (_p.position.y == null) {\n _p.position.y = 0;\n }\n\n // renderedPosition overrides if specified\n if (params.renderedPosition) {\n var rpos = params.renderedPosition;\n var pan = cy.pan();\n var zoom = cy.zoom();\n _p.position = {\n x: (rpos.x - pan.x) / zoom,\n y: (rpos.y - pan.y) / zoom\n };\n }\n var classes = [];\n if (array(params.classes)) {\n classes = params.classes;\n } else if (string(params.classes)) {\n classes = params.classes.split(/\\s+/);\n }\n for (var i = 0, l = classes.length; i < l; i++) {\n var cls = classes[i];\n if (!cls || cls === '') {\n continue;\n }\n _p.classes.add(cls);\n }\n this.createEmitter();\n var bypass = params.style || params.css;\n if (bypass) {\n warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.');\n this.style(bypass);\n }\n if (restore === undefined || restore) {\n this.restore();\n }\n};\n\nvar defineSearch = function defineSearch(params) {\n params = {\n bfs: params.bfs || !params.dfs,\n dfs: params.dfs || !params.bfs\n };\n\n // from pseudocode on wikipedia\n return function searchFn(roots, fn, directed) {\n var options;\n if (plainObject(roots) && !elementOrCollection(roots)) {\n options = roots;\n roots = options.roots || options.root;\n fn = options.visit;\n directed = options.directed;\n }\n directed = arguments.length === 2 && !fn$6(fn) ? fn : directed;\n fn = fn$6(fn) ? fn : function () {};\n var cy = this._private.cy;\n var v = roots = string(roots) ? this.filter(roots) : roots;\n var Q = [];\n var connectedNodes = [];\n var connectedBy = {};\n var id2depth = {};\n var V = {};\n var j = 0;\n var found;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n\n // enqueue v\n for (var i = 0; i < v.length; i++) {\n var vi = v[i];\n var viId = vi.id();\n if (vi.isNode()) {\n Q.unshift(vi);\n if (params.bfs) {\n V[viId] = true;\n connectedNodes.push(vi);\n }\n id2depth[viId] = 0;\n }\n }\n var _loop = function _loop() {\n var v = params.bfs ? Q.shift() : Q.pop();\n var vId = v.id();\n if (params.dfs) {\n if (V[vId]) {\n return \"continue\";\n }\n V[vId] = true;\n connectedNodes.push(v);\n }\n var depth = id2depth[vId];\n var prevEdge = connectedBy[vId];\n var src = prevEdge != null ? prevEdge.source() : null;\n var tgt = prevEdge != null ? prevEdge.target() : null;\n var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0];\n var ret = void 0;\n ret = fn(v, prevEdge, prevNode, j++, depth);\n if (ret === true) {\n found = v;\n return \"break\";\n }\n if (ret === false) {\n return \"break\";\n }\n var vwEdges = v.connectedEdges().filter(function (e) {\n return (!directed || e.source().same(v)) && edges.has(e);\n });\n for (var _i2 = 0; _i2 < vwEdges.length; _i2++) {\n var e = vwEdges[_i2];\n var w = e.connectedNodes().filter(function (n) {\n return !n.same(v) && nodes.has(n);\n });\n var wId = w.id();\n if (w.length !== 0 && !V[wId]) {\n w = w[0];\n Q.push(w);\n if (params.bfs) {\n V[wId] = true;\n connectedNodes.push(w);\n }\n connectedBy[wId] = e;\n id2depth[wId] = id2depth[vId] + 1;\n }\n }\n };\n while (Q.length !== 0) {\n var _ret = _loop();\n if (_ret === \"continue\") continue;\n if (_ret === \"break\") break;\n }\n var connectedEles = cy.collection();\n for (var _i = 0; _i < connectedNodes.length; _i++) {\n var node = connectedNodes[_i];\n var edge = connectedBy[node.id()];\n if (edge != null) {\n connectedEles.push(edge);\n }\n connectedEles.push(node);\n }\n return {\n path: cy.collection(connectedEles),\n found: cy.collection(found)\n };\n };\n};\n\n// search, spanning trees, etc\nvar elesfn$v = {\n breadthFirstSearch: defineSearch({\n bfs: true\n }),\n depthFirstSearch: defineSearch({\n dfs: true\n })\n};\n\n// nice, short mathematical alias\nelesfn$v.bfs = elesfn$v.breadthFirstSearch;\nelesfn$v.dfs = elesfn$v.depthFirstSearch;\n\nvar heap$1 = createCommonjsModule(function (module, exports) {\n// Generated by CoffeeScript 1.8.0\n(function() {\n var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup;\n\n floor = Math.floor, min = Math.min;\n\n\n /*\n Default comparison function to be used\n */\n\n defaultCmp = function(x, y) {\n if (x < y) {\n return -1;\n }\n if (x > y) {\n return 1;\n }\n return 0;\n };\n\n\n /*\n Insert item x in list a, and keep it sorted assuming a is sorted.\n \n If x is already in a, insert it to the right of the rightmost x.\n \n Optional args lo (default 0) and hi (default a.length) bound the slice\n of a to be searched.\n */\n\n insort = function(a, x, lo, hi, cmp) {\n var mid;\n if (lo == null) {\n lo = 0;\n }\n if (cmp == null) {\n cmp = defaultCmp;\n }\n if (lo < 0) {\n throw new Error('lo must be non-negative');\n }\n if (hi == null) {\n hi = a.length;\n }\n while (lo < hi) {\n mid = floor((lo + hi) / 2);\n if (cmp(x, a[mid]) < 0) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n return ([].splice.apply(a, [lo, lo - lo].concat(x)), x);\n };\n\n\n /*\n Push item onto heap, maintaining the heap invariant.\n */\n\n heappush = function(array, item, cmp) {\n if (cmp == null) {\n cmp = defaultCmp;\n }\n array.push(item);\n return _siftdown(array, 0, array.length - 1, cmp);\n };\n\n\n /*\n Pop the smallest item off the heap, maintaining the heap invariant.\n */\n\n heappop = function(array, cmp) {\n var lastelt, returnitem;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n lastelt = array.pop();\n if (array.length) {\n returnitem = array[0];\n array[0] = lastelt;\n _siftup(array, 0, cmp);\n } else {\n returnitem = lastelt;\n }\n return returnitem;\n };\n\n\n /*\n Pop and return the current smallest value, and add the new item.\n \n This is more efficient than heappop() followed by heappush(), and can be\n more appropriate when using a fixed size heap. Note that the value\n returned may be larger than item! That constrains reasonable use of\n this routine unless written as part of a conditional replacement:\n if item > array[0]\n item = heapreplace(array, item)\n */\n\n heapreplace = function(array, item, cmp) {\n var returnitem;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n returnitem = array[0];\n array[0] = item;\n _siftup(array, 0, cmp);\n return returnitem;\n };\n\n\n /*\n Fast version of a heappush followed by a heappop.\n */\n\n heappushpop = function(array, item, cmp) {\n var _ref;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n if (array.length && cmp(array[0], item) < 0) {\n _ref = [array[0], item], item = _ref[0], array[0] = _ref[1];\n _siftup(array, 0, cmp);\n }\n return item;\n };\n\n\n /*\n Transform list into a heap, in-place, in O(array.length) time.\n */\n\n heapify = function(array, cmp) {\n var i, _i, _len, _ref1, _results, _results1;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n _ref1 = (function() {\n _results1 = [];\n for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); }\n return _results1;\n }).apply(this).reverse();\n _results = [];\n for (_i = 0, _len = _ref1.length; _i < _len; _i++) {\n i = _ref1[_i];\n _results.push(_siftup(array, i, cmp));\n }\n return _results;\n };\n\n\n /*\n Update the position of the given item in the heap.\n This function should be called every time the item is being modified.\n */\n\n updateItem = function(array, item, cmp) {\n var pos;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n pos = array.indexOf(item);\n if (pos === -1) {\n return;\n }\n _siftdown(array, 0, pos, cmp);\n return _siftup(array, pos, cmp);\n };\n\n\n /*\n Find the n largest elements in a dataset.\n */\n\n nlargest = function(array, n, cmp) {\n var elem, result, _i, _len, _ref;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n result = array.slice(0, n);\n if (!result.length) {\n return result;\n }\n heapify(result, cmp);\n _ref = array.slice(n);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n elem = _ref[_i];\n heappushpop(result, elem, cmp);\n }\n return result.sort(cmp).reverse();\n };\n\n\n /*\n Find the n smallest elements in a dataset.\n */\n\n nsmallest = function(array, n, cmp) {\n var elem, los, result, _i, _j, _len, _ref, _ref1, _results;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n if (n * 10 <= array.length) {\n result = array.slice(0, n).sort(cmp);\n if (!result.length) {\n return result;\n }\n los = result[result.length - 1];\n _ref = array.slice(n);\n for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n elem = _ref[_i];\n if (cmp(elem, los) < 0) {\n insort(result, elem, 0, null, cmp);\n result.pop();\n los = result[result.length - 1];\n }\n }\n return result;\n }\n heapify(array, cmp);\n _results = [];\n for (_j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) {\n _results.push(heappop(array, cmp));\n }\n return _results;\n };\n\n _siftdown = function(array, startpos, pos, cmp) {\n var newitem, parent, parentpos;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n newitem = array[pos];\n while (pos > startpos) {\n parentpos = (pos - 1) >> 1;\n parent = array[parentpos];\n if (cmp(newitem, parent) < 0) {\n array[pos] = parent;\n pos = parentpos;\n continue;\n }\n break;\n }\n return array[pos] = newitem;\n };\n\n _siftup = function(array, pos, cmp) {\n var childpos, endpos, newitem, rightpos, startpos;\n if (cmp == null) {\n cmp = defaultCmp;\n }\n endpos = array.length;\n startpos = pos;\n newitem = array[pos];\n childpos = 2 * pos + 1;\n while (childpos < endpos) {\n rightpos = childpos + 1;\n if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) {\n childpos = rightpos;\n }\n array[pos] = array[childpos];\n pos = childpos;\n childpos = 2 * pos + 1;\n }\n array[pos] = newitem;\n return _siftdown(array, startpos, pos, cmp);\n };\n\n Heap = (function() {\n Heap.push = heappush;\n\n Heap.pop = heappop;\n\n Heap.replace = heapreplace;\n\n Heap.pushpop = heappushpop;\n\n Heap.heapify = heapify;\n\n Heap.updateItem = updateItem;\n\n Heap.nlargest = nlargest;\n\n Heap.nsmallest = nsmallest;\n\n function Heap(cmp) {\n this.cmp = cmp != null ? cmp : defaultCmp;\n this.nodes = [];\n }\n\n Heap.prototype.push = function(x) {\n return heappush(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.pop = function() {\n return heappop(this.nodes, this.cmp);\n };\n\n Heap.prototype.peek = function() {\n return this.nodes[0];\n };\n\n Heap.prototype.contains = function(x) {\n return this.nodes.indexOf(x) !== -1;\n };\n\n Heap.prototype.replace = function(x) {\n return heapreplace(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.pushpop = function(x) {\n return heappushpop(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.heapify = function() {\n return heapify(this.nodes, this.cmp);\n };\n\n Heap.prototype.updateItem = function(x) {\n return updateItem(this.nodes, x, this.cmp);\n };\n\n Heap.prototype.clear = function() {\n return this.nodes = [];\n };\n\n Heap.prototype.empty = function() {\n return this.nodes.length === 0;\n };\n\n Heap.prototype.size = function() {\n return this.nodes.length;\n };\n\n Heap.prototype.clone = function() {\n var heap;\n heap = new Heap();\n heap.nodes = this.nodes.slice(0);\n return heap;\n };\n\n Heap.prototype.toArray = function() {\n return this.nodes.slice(0);\n };\n\n Heap.prototype.insert = Heap.prototype.push;\n\n Heap.prototype.top = Heap.prototype.peek;\n\n Heap.prototype.front = Heap.prototype.peek;\n\n Heap.prototype.has = Heap.prototype.contains;\n\n Heap.prototype.copy = Heap.prototype.clone;\n\n return Heap;\n\n })();\n\n (function(root, factory) {\n {\n return module.exports = factory();\n }\n })(this, function() {\n return Heap;\n });\n\n}).call(commonjsGlobal);\n});\n\nvar heap = heap$1;\n\nvar dijkstraDefaults = defaults$g({\n root: null,\n weight: function weight(edge) {\n return 1;\n },\n directed: false\n});\nvar elesfn$u = {\n dijkstra: function dijkstra(options) {\n if (!plainObject(options)) {\n var args = arguments;\n options = {\n root: args[0],\n weight: args[1],\n directed: args[2]\n };\n }\n var _dijkstraDefaults = dijkstraDefaults(options),\n root = _dijkstraDefaults.root,\n weight = _dijkstraDefaults.weight,\n directed = _dijkstraDefaults.directed;\n var eles = this;\n var weightFn = weight;\n var source = string(root) ? this.filter(root)[0] : root[0];\n var dist = {};\n var prev = {};\n var knownDist = {};\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n edges.unmergeBy(function (ele) {\n return ele.isLoop();\n });\n var getDist = function getDist(node) {\n return dist[node.id()];\n };\n var setDist = function setDist(node, d) {\n dist[node.id()] = d;\n Q.updateItem(node);\n };\n var Q = new heap(function (a, b) {\n return getDist(a) - getDist(b);\n });\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n dist[node.id()] = node.same(source) ? 0 : Infinity;\n Q.push(node);\n }\n var distBetween = function distBetween(u, v) {\n var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges);\n var smallestDistance = Infinity;\n var smallestEdge;\n for (var _i = 0; _i < uvs.length; _i++) {\n var edge = uvs[_i];\n var _weight = weightFn(edge);\n if (_weight < smallestDistance || !smallestEdge) {\n smallestDistance = _weight;\n smallestEdge = edge;\n }\n }\n return {\n edge: smallestEdge,\n dist: smallestDistance\n };\n };\n while (Q.size() > 0) {\n var u = Q.pop();\n var smalletsDist = getDist(u);\n var uid = u.id();\n knownDist[uid] = smalletsDist;\n if (smalletsDist === Infinity) {\n continue;\n }\n var neighbors = u.neighborhood().intersect(nodes);\n for (var _i2 = 0; _i2 < neighbors.length; _i2++) {\n var v = neighbors[_i2];\n var vid = v.id();\n var vDist = distBetween(u, v);\n var alt = smalletsDist + vDist.dist;\n if (alt < getDist(v)) {\n setDist(v, alt);\n prev[vid] = {\n node: u,\n edge: vDist.edge\n };\n }\n } // for\n } // while\n\n return {\n distanceTo: function distanceTo(node) {\n var target = string(node) ? nodes.filter(node)[0] : node[0];\n return knownDist[target.id()];\n },\n pathTo: function pathTo(node) {\n var target = string(node) ? nodes.filter(node)[0] : node[0];\n var S = [];\n var u = target;\n var uid = u.id();\n if (target.length > 0) {\n S.unshift(target);\n while (prev[uid]) {\n var p = prev[uid];\n S.unshift(p.edge);\n S.unshift(p.node);\n u = p.node;\n uid = u.id();\n }\n }\n return eles.spawn(S);\n }\n };\n }\n};\n\nvar elesfn$t = {\n // kruskal's algorithm (finds min spanning tree, assuming undirected graph)\n // implemented from pseudocode from wikipedia\n kruskal: function kruskal(weightFn) {\n weightFn = weightFn || function (edge) {\n return 1;\n };\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n var numNodes = nodes.length;\n var forest = new Array(numNodes);\n var A = nodes; // assumes byGroup() creates new collections that can be safely mutated\n\n var findSetIndex = function findSetIndex(ele) {\n for (var i = 0; i < forest.length; i++) {\n var eles = forest[i];\n if (eles.has(ele)) {\n return i;\n }\n }\n };\n\n // start with one forest per node\n for (var i = 0; i < numNodes; i++) {\n forest[i] = this.spawn(nodes[i]);\n }\n var S = edges.sort(function (a, b) {\n return weightFn(a) - weightFn(b);\n });\n for (var _i = 0; _i < S.length; _i++) {\n var edge = S[_i];\n var u = edge.source()[0];\n var v = edge.target()[0];\n var setUIndex = findSetIndex(u);\n var setVIndex = findSetIndex(v);\n var setU = forest[setUIndex];\n var setV = forest[setVIndex];\n if (setUIndex !== setVIndex) {\n A.merge(edge);\n\n // combine forests for u and v\n setU.merge(setV);\n forest.splice(setVIndex, 1);\n }\n }\n return A;\n }\n};\n\nvar aStarDefaults = defaults$g({\n root: null,\n goal: null,\n weight: function weight(edge) {\n return 1;\n },\n heuristic: function heuristic(edge) {\n return 0;\n },\n directed: false\n});\nvar elesfn$s = {\n // Implemented from pseudocode from wikipedia\n aStar: function aStar(options) {\n var cy = this.cy();\n var _aStarDefaults = aStarDefaults(options),\n root = _aStarDefaults.root,\n goal = _aStarDefaults.goal,\n heuristic = _aStarDefaults.heuristic,\n directed = _aStarDefaults.directed,\n weight = _aStarDefaults.weight;\n root = cy.collection(root)[0];\n goal = cy.collection(goal)[0];\n var sid = root.id();\n var tid = goal.id();\n var gScore = {};\n var fScore = {};\n var closedSetIds = {};\n var openSet = new heap(function (a, b) {\n return fScore[a.id()] - fScore[b.id()];\n });\n var openSetIds = new Set$1();\n var cameFrom = {};\n var cameFromEdge = {};\n var addToOpenSet = function addToOpenSet(ele, id) {\n openSet.push(ele);\n openSetIds.add(id);\n };\n var cMin, cMinId;\n var popFromOpenSet = function popFromOpenSet() {\n cMin = openSet.pop();\n cMinId = cMin.id();\n openSetIds[\"delete\"](cMinId);\n };\n var isInOpenSet = function isInOpenSet(id) {\n return openSetIds.has(id);\n };\n addToOpenSet(root, sid);\n gScore[sid] = 0;\n fScore[sid] = heuristic(root);\n\n // Counter\n var steps = 0;\n\n // Main loop\n while (openSet.size() > 0) {\n popFromOpenSet();\n steps++;\n\n // If we've found our goal, then we are done\n if (cMinId === tid) {\n var path = [];\n var pathNode = goal;\n var pathNodeId = tid;\n var pathEdge = cameFromEdge[pathNodeId];\n for (;;) {\n path.unshift(pathNode);\n if (pathEdge != null) {\n path.unshift(pathEdge);\n }\n pathNode = cameFrom[pathNodeId];\n if (pathNode == null) {\n break;\n }\n pathNodeId = pathNode.id();\n pathEdge = cameFromEdge[pathNodeId];\n }\n return {\n found: true,\n distance: gScore[cMinId],\n path: this.spawn(path),\n steps: steps\n };\n }\n\n // Add cMin to processed nodes\n closedSetIds[cMinId] = true;\n\n // Update scores for neighbors of cMin\n // Take into account if graph is directed or not\n var vwEdges = cMin._private.edges;\n for (var i = 0; i < vwEdges.length; i++) {\n var e = vwEdges[i];\n\n // edge must be in set of calling eles\n if (!this.hasElementWithId(e.id())) {\n continue;\n }\n\n // cMin must be the source of edge if directed\n if (directed && e.data('source') !== cMinId) {\n continue;\n }\n var wSrc = e.source();\n var wTgt = e.target();\n var w = wSrc.id() !== cMinId ? wSrc : wTgt;\n var wid = w.id();\n\n // node must be in set of calling eles\n if (!this.hasElementWithId(wid)) {\n continue;\n }\n\n // if node is in closedSet, ignore it\n if (closedSetIds[wid]) {\n continue;\n }\n\n // New tentative score for node w\n var tempScore = gScore[cMinId] + weight(e);\n\n // Update gScore for node w if:\n // w not present in openSet\n // OR\n // tentative gScore is less than previous value\n\n // w not in openSet\n if (!isInOpenSet(wid)) {\n gScore[wid] = tempScore;\n fScore[wid] = tempScore + heuristic(w);\n addToOpenSet(w, wid);\n cameFrom[wid] = cMin;\n cameFromEdge[wid] = e;\n continue;\n }\n\n // w already in openSet, but with greater gScore\n if (tempScore < gScore[wid]) {\n gScore[wid] = tempScore;\n fScore[wid] = tempScore + heuristic(w);\n cameFrom[wid] = cMin;\n cameFromEdge[wid] = e;\n }\n } // End of neighbors update\n } // End of main loop\n\n // If we've reached here, then we've not reached our goal\n return {\n found: false,\n distance: undefined,\n path: undefined,\n steps: steps\n };\n }\n}; // elesfn\n\nvar floydWarshallDefaults = defaults$g({\n weight: function weight(edge) {\n return 1;\n },\n directed: false\n});\nvar elesfn$r = {\n // Implemented from pseudocode from wikipedia\n floydWarshall: function floydWarshall(options) {\n var cy = this.cy();\n var _floydWarshallDefault = floydWarshallDefaults(options),\n weight = _floydWarshallDefault.weight,\n directed = _floydWarshallDefault.directed;\n var weightFn = weight;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n var N = nodes.length;\n var Nsq = N * N;\n var indexOf = function indexOf(node) {\n return nodes.indexOf(node);\n };\n var atIndex = function atIndex(i) {\n return nodes[i];\n };\n\n // Initialize distance matrix\n var dist = new Array(Nsq);\n for (var n = 0; n < Nsq; n++) {\n var j = n % N;\n var i = (n - j) / N;\n if (i === j) {\n dist[n] = 0;\n } else {\n dist[n] = Infinity;\n }\n }\n\n // Initialize matrix used for path reconstruction\n // Initialize distance matrix\n var next = new Array(Nsq);\n var edgeNext = new Array(Nsq);\n\n // Process edges\n for (var _i = 0; _i < edges.length; _i++) {\n var edge = edges[_i];\n var src = edge.source()[0];\n var tgt = edge.target()[0];\n if (src === tgt) {\n continue;\n } // exclude loops\n\n var s = indexOf(src);\n var t = indexOf(tgt);\n var st = s * N + t; // source to target index\n var _weight = weightFn(edge);\n\n // Check if already process another edge between same 2 nodes\n if (dist[st] > _weight) {\n dist[st] = _weight;\n next[st] = t;\n edgeNext[st] = edge;\n }\n\n // If undirected graph, process 'reversed' edge\n if (!directed) {\n var ts = t * N + s; // target to source index\n\n if (!directed && dist[ts] > _weight) {\n dist[ts] = _weight;\n next[ts] = s;\n edgeNext[ts] = edge;\n }\n }\n }\n\n // Main loop\n for (var k = 0; k < N; k++) {\n for (var _i2 = 0; _i2 < N; _i2++) {\n var ik = _i2 * N + k;\n for (var _j = 0; _j < N; _j++) {\n var ij = _i2 * N + _j;\n var kj = k * N + _j;\n if (dist[ik] + dist[kj] < dist[ij]) {\n dist[ij] = dist[ik] + dist[kj];\n next[ij] = next[ik];\n }\n }\n }\n }\n var getArgEle = function getArgEle(ele) {\n return (string(ele) ? cy.filter(ele) : ele)[0];\n };\n var indexOfArgEle = function indexOfArgEle(ele) {\n return indexOf(getArgEle(ele));\n };\n var res = {\n distance: function distance(from, to) {\n var i = indexOfArgEle(from);\n var j = indexOfArgEle(to);\n return dist[i * N + j];\n },\n path: function path(from, to) {\n var i = indexOfArgEle(from);\n var j = indexOfArgEle(to);\n var fromNode = atIndex(i);\n if (i === j) {\n return fromNode.collection();\n }\n if (next[i * N + j] == null) {\n return cy.collection();\n }\n var path = cy.collection();\n var prev = i;\n var edge;\n path.merge(fromNode);\n while (i !== j) {\n prev = i;\n i = next[i * N + j];\n edge = edgeNext[prev * N + i];\n path.merge(edge);\n path.merge(atIndex(i));\n }\n return path;\n }\n };\n return res;\n } // floydWarshall\n}; // elesfn\n\nvar bellmanFordDefaults = defaults$g({\n weight: function weight(edge) {\n return 1;\n },\n directed: false,\n root: null\n});\nvar elesfn$q = {\n // Implemented from pseudocode from wikipedia\n bellmanFord: function bellmanFord(options) {\n var _this = this;\n var _bellmanFordDefaults = bellmanFordDefaults(options),\n weight = _bellmanFordDefaults.weight,\n directed = _bellmanFordDefaults.directed,\n root = _bellmanFordDefaults.root;\n var weightFn = weight;\n var eles = this;\n var cy = this.cy();\n var _this$byGroup = this.byGroup(),\n edges = _this$byGroup.edges,\n nodes = _this$byGroup.nodes;\n var numNodes = nodes.length;\n var infoMap = new Map$2();\n var hasNegativeWeightCycle = false;\n var negativeWeightCycles = [];\n root = cy.collection(root)[0]; // in case selector passed\n\n edges.unmergeBy(function (edge) {\n return edge.isLoop();\n });\n var numEdges = edges.length;\n var getInfo = function getInfo(node) {\n var obj = infoMap.get(node.id());\n if (!obj) {\n obj = {};\n infoMap.set(node.id(), obj);\n }\n return obj;\n };\n var getNodeFromTo = function getNodeFromTo(to) {\n return (string(to) ? cy.$(to) : to)[0];\n };\n var distanceTo = function distanceTo(to) {\n return getInfo(getNodeFromTo(to)).dist;\n };\n var pathTo = function pathTo(to) {\n var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root;\n var end = getNodeFromTo(to);\n var path = [];\n var node = end;\n for (;;) {\n if (node == null) {\n return _this.spawn();\n }\n var _getInfo = getInfo(node),\n edge = _getInfo.edge,\n pred = _getInfo.pred;\n path.unshift(node[0]);\n if (node.same(thisStart) && path.length > 0) {\n break;\n }\n if (edge != null) {\n path.unshift(edge);\n }\n node = pred;\n }\n return eles.spawn(path);\n };\n\n // Initializations { dist, pred, edge }\n for (var i = 0; i < numNodes; i++) {\n var node = nodes[i];\n var info = getInfo(node);\n if (node.same(root)) {\n info.dist = 0;\n } else {\n info.dist = Infinity;\n }\n info.pred = null;\n info.edge = null;\n }\n\n // Edges relaxation\n var replacedEdge = false;\n var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) {\n var dist = info1.dist + weight;\n if (dist < info2.dist && !edge.same(info1.edge)) {\n info2.dist = dist;\n info2.pred = node1;\n info2.edge = edge;\n replacedEdge = true;\n }\n };\n for (var _i = 1; _i < numNodes; _i++) {\n replacedEdge = false;\n for (var e = 0; e < numEdges; e++) {\n var edge = edges[e];\n var src = edge.source();\n var tgt = edge.target();\n var _weight = weightFn(edge);\n var srcInfo = getInfo(src);\n var tgtInfo = getInfo(tgt);\n checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight);\n\n // If undirected graph, we need to take into account the 'reverse' edge\n if (!directed) {\n checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight);\n }\n }\n if (!replacedEdge) {\n break;\n }\n }\n if (replacedEdge) {\n // Check for negative weight cycles\n var negativeWeightCycleIds = [];\n for (var _e = 0; _e < numEdges; _e++) {\n var _edge = edges[_e];\n var _src = _edge.source();\n var _tgt = _edge.target();\n var _weight2 = weightFn(_edge);\n var srcDist = getInfo(_src).dist;\n var tgtDist = getInfo(_tgt).dist;\n if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) {\n if (!hasNegativeWeightCycle) {\n warn('Graph contains a negative weight cycle for Bellman-Ford');\n hasNegativeWeightCycle = true;\n }\n if (options.findNegativeWeightCycles !== false) {\n var negativeNodes = [];\n if (srcDist + _weight2 < tgtDist) {\n negativeNodes.push(_src);\n }\n if (!directed && tgtDist + _weight2 < srcDist) {\n negativeNodes.push(_tgt);\n }\n var numNegativeNodes = negativeNodes.length;\n for (var n = 0; n < numNegativeNodes; n++) {\n var start = negativeNodes[n];\n var cycle = [start];\n cycle.push(getInfo(start).edge);\n var _node = getInfo(start).pred;\n while (cycle.indexOf(_node) === -1) {\n cycle.push(_node);\n cycle.push(getInfo(_node).edge);\n _node = getInfo(_node).pred;\n }\n cycle = cycle.slice(cycle.indexOf(_node));\n var smallestId = cycle[0].id();\n var smallestIndex = 0;\n for (var c = 2; c < cycle.length; c += 2) {\n if (cycle[c].id() < smallestId) {\n smallestId = cycle[c].id();\n smallestIndex = c;\n }\n }\n cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex));\n cycle.push(cycle[0]);\n var cycleId = cycle.map(function (el) {\n return el.id();\n }).join(\",\");\n if (negativeWeightCycleIds.indexOf(cycleId) === -1) {\n negativeWeightCycles.push(eles.spawn(cycle));\n negativeWeightCycleIds.push(cycleId);\n }\n }\n } else {\n break;\n }\n }\n }\n }\n return {\n distanceTo: distanceTo,\n pathTo: pathTo,\n hasNegativeWeightCycle: hasNegativeWeightCycle,\n negativeWeightCycles: negativeWeightCycles\n };\n } // bellmanFord\n}; // elesfn\n\nvar sqrt2 = Math.sqrt(2);\n\n// Function which colapses 2 (meta) nodes into one\n// Updates the remaining edge lists\n// Receives as a paramater the edge which causes the collapse\nvar collapse = function collapse(edgeIndex, nodeMap, remainingEdges) {\n if (remainingEdges.length === 0) {\n error(\"Karger-Stein must be run on a connected (sub)graph\");\n }\n var edgeInfo = remainingEdges[edgeIndex];\n var sourceIn = edgeInfo[1];\n var targetIn = edgeInfo[2];\n var partition1 = nodeMap[sourceIn];\n var partition2 = nodeMap[targetIn];\n var newEdges = remainingEdges; // re-use array\n\n // Delete all edges between partition1 and partition2\n for (var i = newEdges.length - 1; i >= 0; i--) {\n var edge = newEdges[i];\n var src = edge[1];\n var tgt = edge[2];\n if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) {\n newEdges.splice(i, 1);\n }\n }\n\n // All edges pointing to partition2 should now point to partition1\n for (var _i = 0; _i < newEdges.length; _i++) {\n var _edge = newEdges[_i];\n if (_edge[1] === partition2) {\n // Check source\n newEdges[_i] = _edge.slice(); // copy\n newEdges[_i][1] = partition1;\n } else if (_edge[2] === partition2) {\n // Check target\n newEdges[_i] = _edge.slice(); // copy\n newEdges[_i][2] = partition1;\n }\n }\n\n // Move all nodes from partition2 to partition1\n for (var _i2 = 0; _i2 < nodeMap.length; _i2++) {\n if (nodeMap[_i2] === partition2) {\n nodeMap[_i2] = partition1;\n }\n }\n return newEdges;\n};\n\n// Contracts a graph until we reach a certain number of meta nodes\nvar contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) {\n while (size > sizeLimit) {\n // Choose an edge randomly\n var edgeIndex = Math.floor(Math.random() * remainingEdges.length);\n\n // Collapse graph based on edge\n remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges);\n size--;\n }\n return remainingEdges;\n};\nvar elesfn$p = {\n // Computes the minimum cut of an undirected graph\n // Returns the correct answer with high probability\n kargerStein: function kargerStein() {\n var _this = this;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n edges.unmergeBy(function (edge) {\n return edge.isLoop();\n });\n var numNodes = nodes.length;\n var numEdges = edges.length;\n var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2));\n var stopSize = Math.floor(numNodes / sqrt2);\n if (numNodes < 2) {\n error('At least 2 nodes are required for Karger-Stein algorithm');\n return undefined;\n }\n\n // Now store edge destination as indexes\n // Format for each edge (edge index, source node index, target node index)\n var edgeIndexes = [];\n for (var i = 0; i < numEdges; i++) {\n var e = edges[i];\n edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]);\n }\n\n // We will store the best cut found here\n var minCutSize = Infinity;\n var minCutEdgeIndexes = [];\n var minCutNodeMap = new Array(numNodes);\n\n // Initial meta node partition\n var metaNodeMap = new Array(numNodes);\n var metaNodeMap2 = new Array(numNodes);\n var copyNodesMap = function copyNodesMap(from, to) {\n for (var _i3 = 0; _i3 < numNodes; _i3++) {\n to[_i3] = from[_i3];\n }\n };\n\n // Main loop\n for (var iter = 0; iter <= numIter; iter++) {\n // Reset meta node partition\n for (var _i4 = 0; _i4 < numNodes; _i4++) {\n metaNodeMap[_i4] = _i4;\n }\n\n // Contract until stop point (stopSize nodes)\n var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize);\n var edgesState2 = edgesState.slice(); // copy\n\n // Create a copy of the colapsed nodes state\n copyNodesMap(metaNodeMap, metaNodeMap2);\n\n // Run 2 iterations starting in the stop state\n var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2);\n var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2);\n\n // Is any of the 2 results the best cut so far?\n if (res1.length <= res2.length && res1.length < minCutSize) {\n minCutSize = res1.length;\n minCutEdgeIndexes = res1;\n copyNodesMap(metaNodeMap, minCutNodeMap);\n } else if (res2.length <= res1.length && res2.length < minCutSize) {\n minCutSize = res2.length;\n minCutEdgeIndexes = res2;\n copyNodesMap(metaNodeMap2, minCutNodeMap);\n }\n } // end of main loop\n\n // Construct result\n var cut = this.spawn(minCutEdgeIndexes.map(function (e) {\n return edges[e[0]];\n }));\n var partition1 = this.spawn();\n var partition2 = this.spawn();\n\n // traverse metaNodeMap for best cut\n var witnessNodePartition = minCutNodeMap[0];\n for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) {\n var partitionId = minCutNodeMap[_i5];\n var node = nodes[_i5];\n if (partitionId === witnessNodePartition) {\n partition1.merge(node);\n } else {\n partition2.merge(node);\n }\n }\n\n // construct components corresponding to each disjoint subset of nodes\n var constructComponent = function constructComponent(subset) {\n var component = _this.spawn();\n subset.forEach(function (node) {\n component.merge(node);\n node.connectedEdges().forEach(function (edge) {\n // ensure edge is within calling collection and edge is not in cut\n if (_this.contains(edge) && !cut.contains(edge)) {\n component.merge(edge);\n }\n });\n });\n return component;\n };\n var components = [constructComponent(partition1), constructComponent(partition2)];\n var ret = {\n cut: cut,\n components: components,\n // n.b. partitions are included to be compatible with the old api spec\n // (could be removed in a future major version)\n partition1: partition1,\n partition2: partition2\n };\n return ret;\n }\n}; // elesfn\n\nvar copyPosition = function copyPosition(p) {\n return {\n x: p.x,\n y: p.y\n };\n};\nvar modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) {\n return {\n x: p.x * zoom + pan.x,\n y: p.y * zoom + pan.y\n };\n};\nvar renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) {\n return {\n x: (p.x - pan.x) / zoom,\n y: (p.y - pan.y) / zoom\n };\n};\nvar array2point = function array2point(arr) {\n return {\n x: arr[0],\n y: arr[1]\n };\n};\nvar min = function min(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var min = Infinity;\n for (var i = begin; i < end; i++) {\n var val = arr[i];\n if (isFinite(val)) {\n min = Math.min(val, min);\n }\n }\n return min;\n};\nvar max = function max(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var max = -Infinity;\n for (var i = begin; i < end; i++) {\n var val = arr[i];\n if (isFinite(val)) {\n max = Math.max(val, max);\n }\n }\n return max;\n};\nvar mean = function mean(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var total = 0;\n var n = 0;\n for (var i = begin; i < end; i++) {\n var val = arr[i];\n if (isFinite(val)) {\n total += val;\n n++;\n }\n }\n return total / n;\n};\nvar median = function median(arr) {\n var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length;\n var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n if (copy) {\n arr = arr.slice(begin, end);\n } else {\n if (end < arr.length) {\n arr.splice(end, arr.length - end);\n }\n if (begin > 0) {\n arr.splice(0, begin);\n }\n }\n\n // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start\n var off = 0; // offset from non-finite values\n for (var i = arr.length - 1; i >= 0; i--) {\n var v = arr[i];\n if (includeHoles) {\n if (!isFinite(v)) {\n arr[i] = -Infinity;\n off++;\n }\n } else {\n // just remove it if we don't want to consider holes\n arr.splice(i, 1);\n }\n }\n if (sort) {\n arr.sort(function (a, b) {\n return a - b;\n }); // requires copy = true if you don't want to change the orig\n }\n\n var len = arr.length;\n var mid = Math.floor(len / 2);\n if (len % 2 !== 0) {\n return arr[mid + 1 + off];\n } else {\n return (arr[mid - 1 + off] + arr[mid + off]) / 2;\n }\n};\nvar deg2rad = function deg2rad(deg) {\n return Math.PI * deg / 180;\n};\nvar getAngleFromDisp = function getAngleFromDisp(dispX, dispY) {\n return Math.atan2(dispY, dispX) - Math.PI / 2;\n};\nvar log2 = Math.log2 || function (n) {\n return Math.log(n) / Math.log(2);\n};\nvar signum = function signum(x) {\n if (x > 0) {\n return 1;\n } else if (x < 0) {\n return -1;\n } else {\n return 0;\n }\n};\nvar dist = function dist(p1, p2) {\n return Math.sqrt(sqdist(p1, p2));\n};\nvar sqdist = function sqdist(p1, p2) {\n var dx = p2.x - p1.x;\n var dy = p2.y - p1.y;\n return dx * dx + dy * dy;\n};\nvar inPlaceSumNormalize = function inPlaceSumNormalize(v) {\n var length = v.length;\n\n // First, get sum of all elements\n var total = 0;\n for (var i = 0; i < length; i++) {\n total += v[i];\n }\n\n // Now, divide each by the sum of all elements\n for (var _i = 0; _i < length; _i++) {\n v[_i] = v[_i] / total;\n }\n return v;\n};\n\n// from http://en.wikipedia.org/wiki/B\u00E9zier_curve#Quadratic_curves\nvar qbezierAt = function qbezierAt(p0, p1, p2, t) {\n return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2;\n};\nvar qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) {\n return {\n x: qbezierAt(p0.x, p1.x, p2.x, t),\n y: qbezierAt(p0.y, p1.y, p2.y, t)\n };\n};\nvar lineAt = function lineAt(p0, p1, t, d) {\n var vec = {\n x: p1.x - p0.x,\n y: p1.y - p0.y\n };\n var vecDist = dist(p0, p1);\n var normVec = {\n x: vec.x / vecDist,\n y: vec.y / vecDist\n };\n t = t == null ? 0 : t;\n d = d != null ? d : t * vecDist;\n return {\n x: p0.x + normVec.x * d,\n y: p0.y + normVec.y * d\n };\n};\nvar bound = function bound(min, val, max) {\n return Math.max(min, Math.min(max, val));\n};\n\n// makes a full bb (x1, y1, x2, y2, w, h) from implicit params\nvar makeBoundingBox = function makeBoundingBox(bb) {\n if (bb == null) {\n return {\n x1: Infinity,\n y1: Infinity,\n x2: -Infinity,\n y2: -Infinity,\n w: 0,\n h: 0\n };\n } else if (bb.x1 != null && bb.y1 != null) {\n if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) {\n return {\n x1: bb.x1,\n y1: bb.y1,\n x2: bb.x2,\n y2: bb.y2,\n w: bb.x2 - bb.x1,\n h: bb.y2 - bb.y1\n };\n } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) {\n return {\n x1: bb.x1,\n y1: bb.y1,\n x2: bb.x1 + bb.w,\n y2: bb.y1 + bb.h,\n w: bb.w,\n h: bb.h\n };\n }\n }\n};\nvar copyBoundingBox = function copyBoundingBox(bb) {\n return {\n x1: bb.x1,\n x2: bb.x2,\n w: bb.w,\n y1: bb.y1,\n y2: bb.y2,\n h: bb.h\n };\n};\nvar clearBoundingBox = function clearBoundingBox(bb) {\n bb.x1 = Infinity;\n bb.y1 = Infinity;\n bb.x2 = -Infinity;\n bb.y2 = -Infinity;\n bb.w = 0;\n bb.h = 0;\n};\nvar shiftBoundingBox = function shiftBoundingBox(bb, dx, dy) {\n return {\n x1: bb.x1 + dx,\n x2: bb.x2 + dx,\n y1: bb.y1 + dy,\n y2: bb.y2 + dy,\n w: bb.w,\n h: bb.h\n };\n};\nvar updateBoundingBox = function updateBoundingBox(bb1, bb2) {\n // update bb1 with bb2 bounds\n\n bb1.x1 = Math.min(bb1.x1, bb2.x1);\n bb1.x2 = Math.max(bb1.x2, bb2.x2);\n bb1.w = bb1.x2 - bb1.x1;\n bb1.y1 = Math.min(bb1.y1, bb2.y1);\n bb1.y2 = Math.max(bb1.y2, bb2.y2);\n bb1.h = bb1.y2 - bb1.y1;\n};\nvar expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) {\n bb.x1 = Math.min(bb.x1, x);\n bb.x2 = Math.max(bb.x2, x);\n bb.w = bb.x2 - bb.x1;\n bb.y1 = Math.min(bb.y1, y);\n bb.y2 = Math.max(bb.y2, y);\n bb.h = bb.y2 - bb.y1;\n};\nvar expandBoundingBox = function expandBoundingBox(bb) {\n var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n bb.x1 -= padding;\n bb.x2 += padding;\n bb.y1 -= padding;\n bb.y2 += padding;\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n return bb;\n};\nvar expandBoundingBoxSides = function expandBoundingBoxSides(bb) {\n var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0];\n var top, right, bottom, left;\n if (padding.length === 1) {\n top = right = bottom = left = padding[0];\n } else if (padding.length === 2) {\n top = bottom = padding[0];\n left = right = padding[1];\n } else if (padding.length === 4) {\n var _padding = _slicedToArray(padding, 4);\n top = _padding[0];\n right = _padding[1];\n bottom = _padding[2];\n left = _padding[3];\n }\n bb.x1 -= left;\n bb.x2 += right;\n bb.y1 -= top;\n bb.y2 += bottom;\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n return bb;\n};\n\n// assign the values of bb2 into bb1\nvar assignBoundingBox = function assignBoundingBox(bb1, bb2) {\n bb1.x1 = bb2.x1;\n bb1.y1 = bb2.y1;\n bb1.x2 = bb2.x2;\n bb1.y2 = bb2.y2;\n bb1.w = bb1.x2 - bb1.x1;\n bb1.h = bb1.y2 - bb1.y1;\n};\nvar boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) {\n // case: one bb to right of other\n if (bb1.x1 > bb2.x2) {\n return false;\n }\n if (bb2.x1 > bb1.x2) {\n return false;\n }\n\n // case: one bb to left of other\n if (bb1.x2 < bb2.x1) {\n return false;\n }\n if (bb2.x2 < bb1.x1) {\n return false;\n }\n\n // case: one bb above other\n if (bb1.y2 < bb2.y1) {\n return false;\n }\n if (bb2.y2 < bb1.y1) {\n return false;\n }\n\n // case: one bb below other\n if (bb1.y1 > bb2.y2) {\n return false;\n }\n if (bb2.y1 > bb1.y2) {\n return false;\n }\n\n // otherwise, must have some overlap\n return true;\n};\nvar inBoundingBox = function inBoundingBox(bb, x, y) {\n return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2;\n};\nvar pointInBoundingBox = function pointInBoundingBox(bb, pt) {\n return inBoundingBox(bb, pt.x, pt.y);\n};\nvar boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) {\n return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2);\n};\nvar roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) {\n var radius = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'auto';\n var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : radius;\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n cornerRadius = Math.min(cornerRadius, halfWidth, halfHeight);\n var doWidth = cornerRadius !== halfWidth,\n doHeight = cornerRadius !== halfHeight;\n\n // Check intersections with straight line segments\n var straightLineIntersections;\n\n // Top segment, left to right\n if (doWidth) {\n var topStartX = nodeX - halfWidth + cornerRadius - padding;\n var topStartY = nodeY - halfHeight - padding;\n var topEndX = nodeX + halfWidth - cornerRadius + padding;\n var topEndY = topStartY;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Right segment, top to bottom\n if (doHeight) {\n var rightStartX = nodeX + halfWidth + padding;\n var rightStartY = nodeY - halfHeight + cornerRadius - padding;\n var rightEndX = rightStartX;\n var rightEndY = nodeY + halfHeight - cornerRadius + padding;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Bottom segment, left to right\n if (doWidth) {\n var bottomStartX = nodeX - halfWidth + cornerRadius - padding;\n var bottomStartY = nodeY + halfHeight + padding;\n var bottomEndX = nodeX + halfWidth - cornerRadius + padding;\n var bottomEndY = bottomStartY;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Left segment, top to bottom\n if (doHeight) {\n var leftStartX = nodeX - halfWidth - padding;\n var leftStartY = nodeY - halfHeight + cornerRadius - padding;\n var leftEndX = leftStartX;\n var leftEndY = nodeY + halfHeight - cornerRadius + padding;\n straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false);\n if (straightLineIntersections.length > 0) {\n return straightLineIntersections;\n }\n }\n\n // Check intersections with arc segments\n var arcIntersections;\n\n // Top Left\n {\n var topLeftCenterX = nodeX - halfWidth + cornerRadius;\n var topLeftCenterY = nodeY - halfHeight + cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n\n // Top Right\n {\n var topRightCenterX = nodeX + halfWidth - cornerRadius;\n var topRightCenterY = nodeY - halfHeight + cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n\n // Bottom Right\n {\n var bottomRightCenterX = nodeX + halfWidth - cornerRadius;\n var bottomRightCenterY = nodeY + halfHeight - cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n\n // Bottom Left\n {\n var bottomLeftCenterX = nodeX - halfWidth + cornerRadius;\n var bottomLeftCenterY = nodeY + halfHeight - cornerRadius;\n arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding);\n\n // Ensure the intersection is on the desired quarter of the circle\n if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) {\n return [arcIntersections[0], arcIntersections[1]];\n }\n }\n return []; // if nothing\n};\n\nvar inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) {\n var t = tolerance;\n var x1 = Math.min(lx1, lx2);\n var x2 = Math.max(lx1, lx2);\n var y1 = Math.min(ly1, ly2);\n var y2 = Math.max(ly1, ly2);\n return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t;\n};\nvar inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) {\n var bb = {\n x1: Math.min(x1, x3, x2) - tolerance,\n x2: Math.max(x1, x3, x2) + tolerance,\n y1: Math.min(y1, y3, y2) - tolerance,\n y2: Math.max(y1, y3, y2) + tolerance\n };\n\n // if outside the rough bounding box for the bezier, then it can't be a hit\n if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) {\n // console.log('bezier out of rough bb')\n return false;\n } else {\n // console.log('do more expensive check');\n return true;\n }\n};\nvar solveQuadratic = function solveQuadratic(a, b, c, val) {\n c -= val;\n var r = b * b - 4 * a * c;\n if (r < 0) {\n return [];\n }\n var sqrtR = Math.sqrt(r);\n var denom = 2 * a;\n var root1 = (-b + sqrtR) / denom;\n var root2 = (-b - sqrtR) / denom;\n return [root1, root2];\n};\nvar solveCubic = function solveCubic(a, b, c, d, result) {\n // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where\n // r is the real component, i is the imaginary component\n\n // An implementation of the Cardano method from the year 1545\n // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots\n\n var epsilon = 0.00001;\n\n // avoid division by zero while keeping the overall expression close in value\n if (a === 0) {\n a = epsilon;\n }\n b /= a;\n c /= a;\n d /= a;\n var discriminant, q, r, dum1, s, t, term1, r13;\n q = (3.0 * c - b * b) / 9.0;\n r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b));\n r /= 54.0;\n discriminant = q * q * q + r * r;\n result[1] = 0;\n term1 = b / 3.0;\n if (discriminant > 0) {\n s = r + Math.sqrt(discriminant);\n s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0);\n t = r - Math.sqrt(discriminant);\n t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0);\n result[0] = -term1 + s + t;\n term1 += (s + t) / 2.0;\n result[4] = result[2] = -term1;\n term1 = Math.sqrt(3.0) * (-t + s) / 2;\n result[3] = term1;\n result[5] = -term1;\n return;\n }\n result[5] = result[3] = 0;\n if (discriminant === 0) {\n r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0);\n result[0] = -term1 + 2.0 * r13;\n result[4] = result[2] = -(r13 + term1);\n return;\n }\n q = -q;\n dum1 = q * q * q;\n dum1 = Math.acos(r / Math.sqrt(dum1));\n r13 = 2.0 * Math.sqrt(q);\n result[0] = -term1 + r13 * Math.cos(dum1 / 3.0);\n result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0);\n result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0);\n return;\n};\nvar sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) {\n // Find minimum distance by using the minimum of the distance\n // function between the given point and the curve\n\n // This gives the coefficients of the resulting cubic equation\n // whose roots tell us where a possible minimum is\n // (Coefficients are divided by 4)\n\n var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3;\n var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3;\n var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y;\n var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y;\n\n // debug(\"coefficients: \" + a / a + \", \" + b / a + \", \" + c / a + \", \" + d / a);\n\n var roots = [];\n\n // Use the cubic solving algorithm\n solveCubic(a, b, c, d, roots);\n var zeroThreshold = 0.0000001;\n var params = [];\n for (var index = 0; index < 6; index += 2) {\n if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) {\n params.push(roots[index]);\n }\n }\n params.push(1.0);\n params.push(0.0);\n var minDistanceSquared = -1;\n var curX, curY, distSquared;\n for (var i = 0; i < params.length; i++) {\n curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3;\n curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3;\n distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2);\n // debug('distance for param ' + params[i] + \": \" + Math.sqrt(distSquared));\n if (minDistanceSquared >= 0) {\n if (distSquared < minDistanceSquared) {\n minDistanceSquared = distSquared;\n }\n } else {\n minDistanceSquared = distSquared;\n }\n }\n return minDistanceSquared;\n};\nvar sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) {\n var offset = [x - x1, y - y1];\n var line = [x2 - x1, y2 - y1];\n var lineSq = line[0] * line[0] + line[1] * line[1];\n var hypSq = offset[0] * offset[0] + offset[1] * offset[1];\n var dotProduct = offset[0] * line[0] + offset[1] * line[1];\n var adjSq = dotProduct * dotProduct / lineSq;\n if (dotProduct < 0) {\n return hypSq;\n }\n if (adjSq > lineSq) {\n return (x - x2) * (x - x2) + (y - y2) * (y - y2);\n }\n return hypSq - adjSq;\n};\nvar pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) {\n var x1, y1, x2, y2;\n var y3;\n\n // Intersect with vertical line through (x, y)\n var up = 0;\n // let down = 0;\n for (var i = 0; i < points.length / 2; i++) {\n x1 = points[i * 2];\n y1 = points[i * 2 + 1];\n if (i + 1 < points.length / 2) {\n x2 = points[(i + 1) * 2];\n y2 = points[(i + 1) * 2 + 1];\n } else {\n x2 = points[(i + 1 - points.length / 2) * 2];\n y2 = points[(i + 1 - points.length / 2) * 2 + 1];\n }\n if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) {\n y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1;\n if (y3 > y) {\n up++;\n }\n\n // if( y3 < y ){\n // down++;\n // }\n } else {\n continue;\n }\n }\n if (up % 2 === 0) {\n return false;\n } else {\n return true;\n }\n};\nvar pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) {\n var transformedPoints = new Array(basePoints.length);\n\n // Gives negative angle\n var angle;\n if (direction[0] != null) {\n angle = Math.atan(direction[1] / direction[0]);\n if (direction[0] < 0) {\n angle = angle + Math.PI / 2;\n } else {\n angle = -angle - Math.PI / 2;\n }\n } else {\n angle = direction;\n }\n var cos = Math.cos(-angle);\n var sin = Math.sin(-angle);\n\n // console.log(\"base: \" + basePoints);\n for (var i = 0; i < transformedPoints.length / 2; i++) {\n transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin);\n transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin);\n transformedPoints[i * 2] += centerX;\n transformedPoints[i * 2 + 1] += centerY;\n }\n var points;\n if (padding > 0) {\n var expandedLineSet = expandPolygon(transformedPoints, -padding);\n points = joinLines(expandedLineSet);\n } else {\n points = transformedPoints;\n }\n return pointInsidePolygonPoints(x, y, points);\n};\nvar pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height, corners) {\n var cutPolygonPoints = new Array(basePoints.length * 2);\n for (var i = 0; i < corners.length; i++) {\n var corner = corners[i];\n cutPolygonPoints[i * 4 + 0] = corner.startX;\n cutPolygonPoints[i * 4 + 1] = corner.startY;\n cutPolygonPoints[i * 4 + 2] = corner.stopX;\n cutPolygonPoints[i * 4 + 3] = corner.stopY;\n var squaredDistance = Math.pow(corner.cx - x, 2) + Math.pow(corner.cy - y, 2);\n if (squaredDistance <= Math.pow(corner.radius, 2)) {\n return true;\n }\n }\n return pointInsidePolygonPoints(x, y, cutPolygonPoints);\n};\nvar joinLines = function joinLines(lineSet) {\n var vertices = new Array(lineSet.length / 2);\n var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY;\n var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY;\n for (var i = 0; i < lineSet.length / 4; i++) {\n currentLineStartX = lineSet[i * 4];\n currentLineStartY = lineSet[i * 4 + 1];\n currentLineEndX = lineSet[i * 4 + 2];\n currentLineEndY = lineSet[i * 4 + 3];\n if (i < lineSet.length / 4 - 1) {\n nextLineStartX = lineSet[(i + 1) * 4];\n nextLineStartY = lineSet[(i + 1) * 4 + 1];\n nextLineEndX = lineSet[(i + 1) * 4 + 2];\n nextLineEndY = lineSet[(i + 1) * 4 + 3];\n } else {\n nextLineStartX = lineSet[0];\n nextLineStartY = lineSet[1];\n nextLineEndX = lineSet[2];\n nextLineEndY = lineSet[3];\n }\n var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true);\n vertices[i * 2] = intersection[0];\n vertices[i * 2 + 1] = intersection[1];\n }\n return vertices;\n};\nvar expandPolygon = function expandPolygon(points, pad) {\n var expandedLineSet = new Array(points.length * 2);\n var currentPointX, currentPointY, nextPointX, nextPointY;\n for (var i = 0; i < points.length / 2; i++) {\n currentPointX = points[i * 2];\n currentPointY = points[i * 2 + 1];\n if (i < points.length / 2 - 1) {\n nextPointX = points[(i + 1) * 2];\n nextPointY = points[(i + 1) * 2 + 1];\n } else {\n nextPointX = points[0];\n nextPointY = points[1];\n }\n\n // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY]\n\n // Assume CCW polygon winding\n\n var offsetX = nextPointY - currentPointY;\n var offsetY = -(nextPointX - currentPointX);\n\n // Normalize\n var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY);\n var normalizedOffsetX = offsetX / offsetLength;\n var normalizedOffsetY = offsetY / offsetLength;\n expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad;\n expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad;\n expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad;\n expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad;\n }\n return expandedLineSet;\n};\nvar intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) {\n var dispX = centerX - x;\n var dispY = centerY - y;\n dispX /= ellipseWradius;\n dispY /= ellipseHradius;\n var len = Math.sqrt(dispX * dispX + dispY * dispY);\n var newLength = len - 1;\n if (newLength < 0) {\n return [];\n }\n var lenProportion = newLength / len;\n return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y];\n};\nvar checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) {\n x -= centerX;\n y -= centerY;\n x /= width / 2 + padding;\n y /= height / 2 + padding;\n return x * x + y * y <= 1;\n};\n\n// Returns intersections of increasing distance from line's start point\nvar intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) {\n // Calculate d, direction vector of line\n var d = [x2 - x1, y2 - y1]; // Direction vector of line\n var f = [x1 - centerX, y1 - centerY];\n var a = d[0] * d[0] + d[1] * d[1];\n var b = 2 * (f[0] * d[0] + f[1] * d[1]);\n var c = f[0] * f[0] + f[1] * f[1] - radius * radius;\n var discriminant = b * b - 4 * a * c;\n if (discriminant < 0) {\n return [];\n }\n var t1 = (-b + Math.sqrt(discriminant)) / (2 * a);\n var t2 = (-b - Math.sqrt(discriminant)) / (2 * a);\n var tMin = Math.min(t1, t2);\n var tMax = Math.max(t1, t2);\n var inRangeParams = [];\n if (tMin >= 0 && tMin <= 1) {\n inRangeParams.push(tMin);\n }\n if (tMax >= 0 && tMax <= 1) {\n inRangeParams.push(tMax);\n }\n if (inRangeParams.length === 0) {\n return [];\n }\n var nearIntersectionX = inRangeParams[0] * d[0] + x1;\n var nearIntersectionY = inRangeParams[0] * d[1] + y1;\n if (inRangeParams.length > 1) {\n if (inRangeParams[0] == inRangeParams[1]) {\n return [nearIntersectionX, nearIntersectionY];\n } else {\n var farIntersectionX = inRangeParams[1] * d[0] + x1;\n var farIntersectionY = inRangeParams[1] * d[1] + y1;\n return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY];\n }\n } else {\n return [nearIntersectionX, nearIntersectionY];\n }\n};\nvar midOfThree = function midOfThree(a, b, c) {\n if (b <= a && a <= c || c <= a && a <= b) {\n return a;\n } else if (a <= b && b <= c || c <= b && b <= a) {\n return b;\n } else {\n return c;\n }\n};\n\n// (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4)\nvar finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) {\n var dx13 = x1 - x3;\n var dx21 = x2 - x1;\n var dx43 = x4 - x3;\n var dy13 = y1 - y3;\n var dy21 = y2 - y1;\n var dy43 = y4 - y3;\n var ua_t = dx43 * dy13 - dy43 * dx13;\n var ub_t = dx21 * dy13 - dy21 * dx13;\n var u_b = dy43 * dx21 - dx43 * dy21;\n if (u_b !== 0) {\n var ua = ua_t / u_b;\n var ub = ub_t / u_b;\n var flptThreshold = 0.001;\n var _min = 0 - flptThreshold;\n var _max = 1 + flptThreshold;\n if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) {\n return [x1 + ua * dx21, y1 + ua * dy21];\n } else {\n if (!infiniteLines) {\n return [];\n } else {\n return [x1 + ua * dx21, y1 + ua * dy21];\n }\n }\n } else {\n if (ua_t === 0 || ub_t === 0) {\n // Parallel, coincident lines. Check if overlap\n\n // Check endpoint of second line\n if (midOfThree(x1, x2, x4) === x4) {\n return [x4, y4];\n }\n\n // Check start point of second line\n if (midOfThree(x1, x2, x3) === x3) {\n return [x3, y3];\n }\n\n // Endpoint of first line\n if (midOfThree(x3, x4, x2) === x2) {\n return [x2, y2];\n }\n return [];\n } else {\n // Parallel, non-coincident\n return [];\n }\n }\n};\n\n// math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding )\n// intersect a node polygon (pts transformed)\n//\n// math.polygonIntersectLine( x, y, basePoints, centerX, centerY )\n// intersect the points (no transform)\nvar polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) {\n var intersections = [];\n var intersection;\n var transformedPoints = new Array(basePoints.length);\n var doTransform = true;\n if (width == null) {\n doTransform = false;\n }\n var points;\n if (doTransform) {\n for (var i = 0; i < transformedPoints.length / 2; i++) {\n transformedPoints[i * 2] = basePoints[i * 2] * width + centerX;\n transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY;\n }\n if (padding > 0) {\n var expandedLineSet = expandPolygon(transformedPoints, -padding);\n points = joinLines(expandedLineSet);\n } else {\n points = transformedPoints;\n }\n } else {\n points = basePoints;\n }\n var currentX, currentY, nextX, nextY;\n for (var _i2 = 0; _i2 < points.length / 2; _i2++) {\n currentX = points[_i2 * 2];\n currentY = points[_i2 * 2 + 1];\n if (_i2 < points.length / 2 - 1) {\n nextX = points[(_i2 + 1) * 2];\n nextY = points[(_i2 + 1) * 2 + 1];\n } else {\n nextX = points[0];\n nextY = points[1];\n }\n intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY);\n if (intersection.length !== 0) {\n intersections.push(intersection[0], intersection[1]);\n }\n }\n return intersections;\n};\nvar roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding, corners) {\n var intersections = [];\n var intersection;\n var lines = new Array(basePoints.length * 2);\n corners.forEach(function (corner, i) {\n if (i === 0) {\n lines[lines.length - 2] = corner.startX;\n lines[lines.length - 1] = corner.startY;\n } else {\n lines[i * 4 - 2] = corner.startX;\n lines[i * 4 - 1] = corner.startY;\n }\n lines[i * 4] = corner.stopX;\n lines[i * 4 + 1] = corner.stopY;\n intersection = intersectLineCircle(x, y, centerX, centerY, corner.cx, corner.cy, corner.radius);\n if (intersection.length !== 0) {\n intersections.push(intersection[0], intersection[1]);\n }\n });\n for (var i = 0; i < lines.length / 4; i++) {\n intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[i * 4], lines[i * 4 + 1], lines[i * 4 + 2], lines[i * 4 + 3], false);\n if (intersection.length !== 0) {\n intersections.push(intersection[0], intersection[1]);\n }\n }\n if (intersections.length > 2) {\n var lowestIntersection = [intersections[0], intersections[1]];\n var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2);\n for (var _i3 = 1; _i3 < intersections.length / 2; _i3++) {\n var squaredDistance = Math.pow(intersections[_i3 * 2] - x, 2) + Math.pow(intersections[_i3 * 2 + 1] - y, 2);\n if (squaredDistance <= lowestSquaredDistance) {\n lowestIntersection[0] = intersections[_i3 * 2];\n lowestIntersection[1] = intersections[_i3 * 2 + 1];\n lowestSquaredDistance = squaredDistance;\n }\n }\n return lowestIntersection;\n }\n return intersections;\n};\nvar shortenIntersection = function shortenIntersection(intersection, offset, amount) {\n var disp = [intersection[0] - offset[0], intersection[1] - offset[1]];\n var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]);\n var lenRatio = (length - amount) / length;\n if (lenRatio < 0) {\n lenRatio = 0.00001;\n }\n return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]];\n};\nvar generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) {\n var points = generateUnitNgonPoints(sides, rotationRadians);\n points = fitPolygonToSquare(points);\n return points;\n};\nvar fitPolygonToSquare = function fitPolygonToSquare(points) {\n var x, y;\n var sides = points.length / 2;\n var minX = Infinity,\n minY = Infinity,\n maxX = -Infinity,\n maxY = -Infinity;\n for (var i = 0; i < sides; i++) {\n x = points[2 * i];\n y = points[2 * i + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n\n // stretch factors\n var sx = 2 / (maxX - minX);\n var sy = 2 / (maxY - minY);\n for (var _i4 = 0; _i4 < sides; _i4++) {\n x = points[2 * _i4] = points[2 * _i4] * sx;\n y = points[2 * _i4 + 1] = points[2 * _i4 + 1] * sy;\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n if (minY < -1) {\n for (var _i5 = 0; _i5 < sides; _i5++) {\n y = points[2 * _i5 + 1] = points[2 * _i5 + 1] + (-1 - minY);\n }\n }\n return points;\n};\nvar generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) {\n var increment = 1.0 / sides * 2 * Math.PI;\n var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0;\n startAngle += rotationRadians;\n var points = new Array(sides * 2);\n var currentAngle;\n for (var i = 0; i < sides; i++) {\n currentAngle = i * increment + startAngle;\n points[2 * i] = Math.cos(currentAngle); // x\n points[2 * i + 1] = Math.sin(-currentAngle); // y\n }\n\n return points;\n};\n\n// Set the default radius, unless half of width or height is smaller than default\nvar getRoundRectangleRadius = function getRoundRectangleRadius(width, height) {\n return Math.min(width / 4, height / 4, 8);\n};\n\n// Set the default radius\nvar getRoundPolygonRadius = function getRoundPolygonRadius(width, height) {\n return Math.min(width / 10, height / 10, 8);\n};\nvar getCutRectangleCornerLength = function getCutRectangleCornerLength() {\n return 8;\n};\nvar bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) {\n return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0];\n};\n\n// get curve width, height, and control point position offsets as a percentage of node height / width\nvar getBarrelCurveConstants = function getBarrelCurveConstants(width, height) {\n return {\n heightOffset: Math.min(15, 0.05 * height),\n widthOffset: Math.min(100, 0.25 * width),\n ctrlPtOffsetPct: 0.05\n };\n};\n\nvar pageRankDefaults = defaults$g({\n dampingFactor: 0.8,\n precision: 0.000001,\n iterations: 200,\n weight: function weight(edge) {\n return 1;\n }\n});\nvar elesfn$o = {\n pageRank: function pageRank(options) {\n var _pageRankDefaults = pageRankDefaults(options),\n dampingFactor = _pageRankDefaults.dampingFactor,\n precision = _pageRankDefaults.precision,\n iterations = _pageRankDefaults.iterations,\n weight = _pageRankDefaults.weight;\n var cy = this._private.cy;\n var _this$byGroup = this.byGroup(),\n nodes = _this$byGroup.nodes,\n edges = _this$byGroup.edges;\n var numNodes = nodes.length;\n var numNodesSqd = numNodes * numNodes;\n var numEdges = edges.length;\n\n // Construct transposed adjacency matrix\n // First lets have a zeroed matrix of the right size\n // We'll also keep track of the sum of each column\n var matrix = new Array(numNodesSqd);\n var columnSum = new Array(numNodes);\n var additionalProb = (1 - dampingFactor) / numNodes;\n\n // Create null matrix\n for (var i = 0; i < numNodes; i++) {\n for (var j = 0; j < numNodes; j++) {\n var n = i * numNodes + j;\n matrix[n] = 0;\n }\n columnSum[i] = 0;\n }\n\n // Now, process edges\n for (var _i = 0; _i < numEdges; _i++) {\n var edge = edges[_i];\n var srcId = edge.data('source');\n var tgtId = edge.data('target');\n\n // Don't include loops in the matrix\n if (srcId === tgtId) {\n continue;\n }\n var s = nodes.indexOfId(srcId);\n var t = nodes.indexOfId(tgtId);\n var w = weight(edge);\n var _n = t * numNodes + s;\n\n // Update matrix\n matrix[_n] += w;\n\n // Update column sum\n columnSum[s] += w;\n }\n\n // Add additional probability based on damping factor\n // Also, take into account columns that have sum = 0\n var p = 1.0 / numNodes + additionalProb; // Shorthand\n\n // Traverse matrix, column by column\n for (var _j = 0; _j < numNodes; _j++) {\n if (columnSum[_j] === 0) {\n // No 'links' out from node jth, assume equal probability for each possible node\n for (var _i2 = 0; _i2 < numNodes; _i2++) {\n var _n2 = _i2 * numNodes + _j;\n matrix[_n2] = p;\n }\n } else {\n // Node jth has outgoing link, compute normalized probabilities\n for (var _i3 = 0; _i3 < numNodes; _i3++) {\n var _n3 = _i3 * numNodes + _j;\n matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb;\n }\n }\n }\n\n // Compute dominant eigenvector using power method\n var eigenvector = new Array(numNodes);\n var temp = new Array(numNodes);\n var previous;\n\n // Start with a vector of all 1's\n // Also, initialize a null vector which will be used as shorthand\n for (var _i4 = 0; _i4 < numNodes; _i4++) {\n eigenvector[_i4] = 1;\n }\n for (var iter = 0; iter < iterations; iter++) {\n // Temp array with all 0's\n for (var _i5 = 0; _i5 < numNodes; _i5++) {\n temp[_i5] = 0;\n }\n\n // Multiply matrix with previous result\n for (var _i6 = 0; _i6 < numNodes; _i6++) {\n for (var _j2 = 0; _j2 < numNodes; _j2++) {\n var _n4 = _i6 * numNodes + _j2;\n temp[_i6] += matrix[_n4] * eigenvector[_j2];\n }\n }\n inPlaceSumNormalize(temp);\n previous = eigenvector;\n eigenvector = temp;\n temp = previous;\n var diff = 0;\n // Compute difference (squared module) of both vectors\n for (var _i7 = 0; _i7 < numNodes; _i7++) {\n var delta = previous[_i7] - eigenvector[_i7];\n diff += delta * delta;\n }\n\n // If difference is less than the desired threshold, stop iterating\n if (diff < precision) {\n break;\n }\n }\n\n // Construct result\n var res = {\n rank: function rank(node) {\n node = cy.collection(node)[0];\n return eigenvector[nodes.indexOf(node)];\n }\n };\n return res;\n } // pageRank\n}; // elesfn\n\nvar defaults$f = defaults$g({\n root: null,\n weight: function weight(edge) {\n return 1;\n },\n directed: false,\n alpha: 0\n});\nvar elesfn$n = {\n degreeCentralityNormalized: function degreeCentralityNormalized(options) {\n options = defaults$f(options);\n var cy = this.cy();\n var nodes = this.nodes();\n var numNodes = nodes.length;\n if (!options.directed) {\n var degrees = {};\n var maxDegree = 0;\n for (var i = 0; i < numNodes; i++) {\n var node = nodes[i];\n\n // add current node to the current options object and call degreeCentrality\n options.root = node;\n var currDegree = this.degreeCentrality(options);\n if (maxDegree < currDegree.degree) {\n maxDegree = currDegree.degree;\n }\n degrees[node.id()] = currDegree.degree;\n }\n return {\n degree: function degree(node) {\n if (maxDegree === 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node);\n }\n return degrees[node.id()] / maxDegree;\n }\n };\n } else {\n var indegrees = {};\n var outdegrees = {};\n var maxIndegree = 0;\n var maxOutdegree = 0;\n for (var _i = 0; _i < numNodes; _i++) {\n var _node = nodes[_i];\n var id = _node.id();\n\n // add current node to the current options object and call degreeCentrality\n options.root = _node;\n var _currDegree = this.degreeCentrality(options);\n if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree;\n if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree;\n indegrees[id] = _currDegree.indegree;\n outdegrees[id] = _currDegree.outdegree;\n }\n return {\n indegree: function indegree(node) {\n if (maxIndegree == 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node);\n }\n return indegrees[node.id()] / maxIndegree;\n },\n outdegree: function outdegree(node) {\n if (maxOutdegree === 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node);\n }\n return outdegrees[node.id()] / maxOutdegree;\n }\n };\n }\n },\n // degreeCentralityNormalized\n\n // Implemented from the algorithm in Opsahl's paper\n // \"Node centrality in weighted networks: Generalizing degree and shortest paths\"\n // check the heading 2 \"Degree\"\n degreeCentrality: function degreeCentrality(options) {\n options = defaults$f(options);\n var cy = this.cy();\n var callingEles = this;\n var _options = options,\n root = _options.root,\n weight = _options.weight,\n directed = _options.directed,\n alpha = _options.alpha;\n root = cy.collection(root)[0];\n if (!directed) {\n var connEdges = root.connectedEdges().intersection(callingEles);\n var k = connEdges.length;\n var s = 0;\n\n // Now, sum edge weights\n for (var i = 0; i < connEdges.length; i++) {\n s += weight(connEdges[i]);\n }\n return {\n degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha)\n };\n } else {\n var edges = root.connectedEdges();\n var incoming = edges.filter(function (edge) {\n return edge.target().same(root) && callingEles.has(edge);\n });\n var outgoing = edges.filter(function (edge) {\n return edge.source().same(root) && callingEles.has(edge);\n });\n var k_in = incoming.length;\n var k_out = outgoing.length;\n var s_in = 0;\n var s_out = 0;\n\n // Now, sum incoming edge weights\n for (var _i2 = 0; _i2 < incoming.length; _i2++) {\n s_in += weight(incoming[_i2]);\n }\n\n // Now, sum outgoing edge weights\n for (var _i3 = 0; _i3 < outgoing.length; _i3++) {\n s_out += weight(outgoing[_i3]);\n }\n return {\n indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha),\n outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha)\n };\n }\n } // degreeCentrality\n}; // elesfn\n\n// nice, short mathematical alias\nelesfn$n.dc = elesfn$n.degreeCentrality;\nelesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized;\n\nvar defaults$e = defaults$g({\n harmonic: true,\n weight: function weight() {\n return 1;\n },\n directed: false,\n root: null\n});\nvar elesfn$m = {\n closenessCentralityNormalized: function closenessCentralityNormalized(options) {\n var _defaults = defaults$e(options),\n harmonic = _defaults.harmonic,\n weight = _defaults.weight,\n directed = _defaults.directed;\n var cy = this.cy();\n var closenesses = {};\n var maxCloseness = 0;\n var nodes = this.nodes();\n var fw = this.floydWarshall({\n weight: weight,\n directed: directed\n });\n\n // Compute closeness for every node and find the maximum closeness\n for (var i = 0; i < nodes.length; i++) {\n var currCloseness = 0;\n var node_i = nodes[i];\n for (var j = 0; j < nodes.length; j++) {\n if (i !== j) {\n var d = fw.distance(node_i, nodes[j]);\n if (harmonic) {\n currCloseness += 1 / d;\n } else {\n currCloseness += d;\n }\n }\n }\n if (!harmonic) {\n currCloseness = 1 / currCloseness;\n }\n if (maxCloseness < currCloseness) {\n maxCloseness = currCloseness;\n }\n closenesses[node_i.id()] = currCloseness;\n }\n return {\n closeness: function closeness(node) {\n if (maxCloseness == 0) {\n return 0;\n }\n if (string(node)) {\n // from is a selector string\n node = cy.filter(node)[0].id();\n } else {\n // from is a node\n node = node.id();\n }\n return closenesses[node] / maxCloseness;\n }\n };\n },\n // Implemented from pseudocode from wikipedia\n closenessCentrality: function closenessCentrality(options) {\n var _defaults2 = defaults$e(options),\n root = _defaults2.root,\n weight = _defaults2.weight,\n directed = _defaults2.directed,\n harmonic = _defaults2.harmonic;\n root = this.filter(root)[0];\n\n // we need distance from this node to every other node\n var dijkstra = this.dijkstra({\n root: root,\n weight: weight,\n directed: directed\n });\n var totalDistance = 0;\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n if (!n.same(root)) {\n var d = dijkstra.distanceTo(n);\n if (harmonic) {\n totalDistance += 1 / d;\n } else {\n totalDistance += d;\n }\n }\n }\n return harmonic ? totalDistance : 1 / totalDistance;\n } // closenessCentrality\n}; // elesfn\n\n// nice, short mathematical alias\nelesfn$m.cc = elesfn$m.closenessCentrality;\nelesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized;\n\nvar defaults$d = defaults$g({\n weight: null,\n directed: false\n});\nvar elesfn$l = {\n // Implemented from the algorithm in the paper \"On Variants of Shortest-Path Betweenness Centrality and their Generic Computation\" by Ulrik Brandes\n betweennessCentrality: function betweennessCentrality(options) {\n var _defaults = defaults$d(options),\n directed = _defaults.directed,\n weight = _defaults.weight;\n var weighted = weight != null;\n var cy = this.cy();\n\n // starting\n var V = this.nodes();\n var A = {};\n var _C = {};\n var max = 0;\n var C = {\n set: function set(key, val) {\n _C[key] = val;\n if (val > max) {\n max = val;\n }\n },\n get: function get(key) {\n return _C[key];\n }\n };\n\n // A contains the neighborhoods of every node\n for (var i = 0; i < V.length; i++) {\n var v = V[i];\n var vid = v.id();\n if (directed) {\n A[vid] = v.outgoers().nodes(); // get outgoers of every node\n } else {\n A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node\n }\n\n C.set(vid, 0);\n }\n var _loop = function _loop(s) {\n var sid = V[s].id();\n var S = []; // stack\n var P = {};\n var g = {};\n var d = {};\n var Q = new heap(function (a, b) {\n return d[a] - d[b];\n }); // queue\n\n // init dictionaries\n for (var _i = 0; _i < V.length; _i++) {\n var _vid = V[_i].id();\n P[_vid] = [];\n g[_vid] = 0;\n d[_vid] = Infinity;\n }\n g[sid] = 1; // sigma\n d[sid] = 0; // distance to s\n\n Q.push(sid);\n while (!Q.empty()) {\n var _v = Q.pop();\n S.push(_v);\n if (weighted) {\n for (var j = 0; j < A[_v].length; j++) {\n var w = A[_v][j];\n var vEle = cy.getElementById(_v);\n var edge = void 0;\n if (vEle.edgesTo(w).length > 0) {\n edge = vEle.edgesTo(w)[0];\n } else {\n edge = w.edgesTo(vEle)[0];\n }\n var edgeWeight = weight(edge);\n w = w.id();\n if (d[w] > d[_v] + edgeWeight) {\n d[w] = d[_v] + edgeWeight;\n if (Q.nodes.indexOf(w) < 0) {\n //if w is not in Q\n Q.push(w);\n } else {\n // update position if w is in Q\n Q.updateItem(w);\n }\n g[w] = 0;\n P[w] = [];\n }\n if (d[w] == d[_v] + edgeWeight) {\n g[w] = g[w] + g[_v];\n P[w].push(_v);\n }\n }\n } else {\n for (var _j = 0; _j < A[_v].length; _j++) {\n var _w = A[_v][_j].id();\n if (d[_w] == Infinity) {\n Q.push(_w);\n d[_w] = d[_v] + 1;\n }\n if (d[_w] == d[_v] + 1) {\n g[_w] = g[_w] + g[_v];\n P[_w].push(_v);\n }\n }\n }\n }\n var e = {};\n for (var _i2 = 0; _i2 < V.length; _i2++) {\n e[V[_i2].id()] = 0;\n }\n while (S.length > 0) {\n var _w2 = S.pop();\n for (var _j2 = 0; _j2 < P[_w2].length; _j2++) {\n var _v2 = P[_w2][_j2];\n e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]);\n }\n if (_w2 != V[s].id()) {\n C.set(_w2, C.get(_w2) + e[_w2]);\n }\n }\n };\n for (var s = 0; s < V.length; s++) {\n _loop(s);\n }\n var ret = {\n betweenness: function betweenness(node) {\n var id = cy.collection(node).id();\n return C.get(id);\n },\n betweennessNormalized: function betweennessNormalized(node) {\n if (max == 0) {\n return 0;\n }\n var id = cy.collection(node).id();\n return C.get(id) / max;\n }\n };\n\n // alias\n ret.betweennessNormalised = ret.betweennessNormalized;\n return ret;\n } // betweennessCentrality\n}; // elesfn\n\n// nice, short mathematical alias\nelesfn$l.bc = elesfn$l.betweennessCentrality;\n\n// Implemented by Zoe Xi @zoexi for GSOC 2016\n\n/* eslint-disable no-unused-vars */\nvar defaults$c = defaults$g({\n expandFactor: 2,\n // affects time of computation and cluster granularity to some extent: M * M\n inflateFactor: 2,\n // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j)\n multFactor: 1,\n // optional self loops for each node. Use a neutral value to improve cluster computations.\n maxIterations: 20,\n // maximum number of iterations of the MCL algorithm in a single run\n attributes: [\n // attributes/features used to group nodes, ie. similarity values between nodes\n function (edge) {\n return 1;\n }]\n});\n/* eslint-enable */\n\nvar setOptions$3 = function setOptions(options) {\n return defaults$c(options);\n};\n/* eslint-enable */\n\nvar getSimilarity$1 = function getSimilarity(edge, attributes) {\n var total = 0;\n for (var i = 0; i < attributes.length; i++) {\n total += attributes[i](edge);\n }\n return total;\n};\nvar addLoops = function addLoops(M, n, val) {\n for (var i = 0; i < n; i++) {\n M[i * n + i] = val;\n }\n};\nvar normalize = function normalize(M, n) {\n var sum;\n for (var col = 0; col < n; col++) {\n sum = 0;\n for (var row = 0; row < n; row++) {\n sum += M[row * n + col];\n }\n for (var _row = 0; _row < n; _row++) {\n M[_row * n + col] = M[_row * n + col] / sum;\n }\n }\n};\n\n// TODO: blocked matrix multiplication?\nvar mmult = function mmult(A, B, n) {\n var C = new Array(n * n);\n for (var i = 0; i < n; i++) {\n for (var j = 0; j < n; j++) {\n C[i * n + j] = 0;\n }\n for (var k = 0; k < n; k++) {\n for (var _j = 0; _j < n; _j++) {\n C[i * n + _j] += A[i * n + k] * B[k * n + _j];\n }\n }\n }\n return C;\n};\nvar expand = function expand(M, n, expandFactor /** power **/) {\n var _M = M.slice(0);\n for (var p = 1; p < expandFactor; p++) {\n M = mmult(M, _M, n);\n }\n return M;\n};\nvar inflate = function inflate(M, n, inflateFactor /** r **/) {\n var _M = new Array(n * n);\n\n // M(i,j) ^ inflatePower\n for (var i = 0; i < n * n; i++) {\n _M[i] = Math.pow(M[i], inflateFactor);\n }\n normalize(_M, n);\n return _M;\n};\nvar hasConverged = function hasConverged(M, _M, n2, roundFactor) {\n // Check that both matrices have the same elements (i,j)\n for (var i = 0; i < n2; i++) {\n var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places\n var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor);\n if (v1 !== v2) {\n return false;\n }\n }\n return true;\n};\nvar assign$2 = function assign(M, n, nodes, cy) {\n var clusters = [];\n for (var i = 0; i < n; i++) {\n var cluster = [];\n for (var j = 0; j < n; j++) {\n // Row-wise attractors and elements that they attract belong in same cluster\n if (Math.round(M[i * n + j] * 1000) / 1000 > 0) {\n cluster.push(nodes[j]);\n }\n }\n if (cluster.length !== 0) {\n clusters.push(cy.collection(cluster));\n }\n }\n return clusters;\n};\nvar isDuplicate = function isDuplicate(c1, c2) {\n for (var i = 0; i < c1.length; i++) {\n if (!c2[i] || c1[i].id() !== c2[i].id()) {\n return false;\n }\n }\n return true;\n};\nvar removeDuplicates = function removeDuplicates(clusters) {\n for (var i = 0; i < clusters.length; i++) {\n for (var j = 0; j < clusters.length; j++) {\n if (i != j && isDuplicate(clusters[i], clusters[j])) {\n clusters.splice(j, 1);\n }\n }\n }\n return clusters;\n};\nvar markovClustering = function markovClustering(options) {\n var nodes = this.nodes();\n var edges = this.edges();\n var cy = this.cy();\n\n // Set parameters of algorithm:\n var opts = setOptions$3(options);\n\n // Map each node to its position in node array\n var id2position = {};\n for (var i = 0; i < nodes.length; i++) {\n id2position[nodes[i].id()] = i;\n }\n\n // Generate stochastic matrix M from input graph G (should be symmetric/undirected)\n var n = nodes.length,\n n2 = n * n;\n var M = new Array(n2),\n _M;\n for (var _i = 0; _i < n2; _i++) {\n M[_i] = 0;\n }\n for (var e = 0; e < edges.length; e++) {\n var edge = edges[e];\n var _i2 = id2position[edge.source().id()];\n var j = id2position[edge.target().id()];\n var sim = getSimilarity$1(edge, opts.attributes);\n M[_i2 * n + j] += sim; // G should be symmetric and undirected\n M[j * n + _i2] += sim;\n }\n\n // Begin Markov cluster algorithm\n\n // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal\n addLoops(M, n, opts.multFactor);\n\n // Step 2: M = normalize( M );\n normalize(M, n);\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n isStillMoving = false;\n\n // Step 3:\n _M = expand(M, n, opts.expandFactor);\n\n // Step 4:\n M = inflate(_M, n, opts.inflateFactor);\n\n // Step 5: check to see if ~steady state has been reached\n if (!hasConverged(M, _M, n2, 4)) {\n isStillMoving = true;\n }\n iterations++;\n }\n\n // Build clusters from matrix\n var clusters = assign$2(M, n, nodes, cy);\n\n // Remove duplicate clusters due to symmetry of graph and M matrix\n clusters = removeDuplicates(clusters);\n return clusters;\n};\nvar markovClustering$1 = {\n markovClustering: markovClustering,\n mcl: markovClustering\n};\n\n// Common distance metrics for clustering algorithms\nvar identity = function identity(x) {\n return x;\n};\nvar absDiff = function absDiff(p, q) {\n return Math.abs(q - p);\n};\nvar addAbsDiff = function addAbsDiff(total, p, q) {\n return total + absDiff(p, q);\n};\nvar addSquaredDiff = function addSquaredDiff(total, p, q) {\n return total + Math.pow(q - p, 2);\n};\nvar sqrt = function sqrt(x) {\n return Math.sqrt(x);\n};\nvar maxAbsDiff = function maxAbsDiff(currentMax, p, q) {\n return Math.max(currentMax, absDiff(p, q));\n};\nvar getDistance = function getDistance(length, getP, getQ, init, visit) {\n var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity;\n var ret = init;\n var p, q;\n for (var dim = 0; dim < length; dim++) {\n p = getP(dim);\n q = getQ(dim);\n ret = visit(ret, p, q);\n }\n return post(ret);\n};\nvar distances = {\n euclidean: function euclidean(length, getP, getQ) {\n if (length >= 2) {\n return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt);\n } else {\n // for single attr case, more efficient to avoid sqrt\n return getDistance(length, getP, getQ, 0, addAbsDiff);\n }\n },\n squaredEuclidean: function squaredEuclidean(length, getP, getQ) {\n return getDistance(length, getP, getQ, 0, addSquaredDiff);\n },\n manhattan: function manhattan(length, getP, getQ) {\n return getDistance(length, getP, getQ, 0, addAbsDiff);\n },\n max: function max(length, getP, getQ) {\n return getDistance(length, getP, getQ, -Infinity, maxAbsDiff);\n }\n};\n\n// in case the user accidentally doesn't use camel case\ndistances['squared-euclidean'] = distances['squaredEuclidean'];\ndistances['squaredeuclidean'] = distances['squaredEuclidean'];\nfunction clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) {\n var impl;\n if (fn$6(method)) {\n impl = method;\n } else {\n impl = distances[method] || distances.euclidean;\n }\n if (length === 0 && fn$6(method)) {\n return impl(nodeP, nodeQ);\n } else {\n return impl(length, getP, getQ, nodeP, nodeQ);\n }\n}\n\nvar defaults$b = defaults$g({\n k: 2,\n m: 2,\n sensitivityThreshold: 0.0001,\n distance: 'euclidean',\n maxIterations: 10,\n attributes: [],\n testMode: false,\n testCentroids: null\n});\nvar setOptions$2 = function setOptions(options) {\n return defaults$b(options);\n};\n\nvar getDist = function getDist(type, node, centroid, attributes, mode) {\n var noNodeP = mode !== 'kMedoids';\n var getP = noNodeP ? function (i) {\n return centroid[i];\n } : function (i) {\n return attributes[i](centroid);\n };\n var getQ = function getQ(i) {\n return attributes[i](node);\n };\n var nodeP = centroid;\n var nodeQ = node;\n return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ);\n};\nvar randomCentroids = function randomCentroids(nodes, k, attributes) {\n var ndim = attributes.length;\n var min = new Array(ndim);\n var max = new Array(ndim);\n var centroids = new Array(k);\n var centroid = null;\n\n // Find min, max values for each attribute dimension\n for (var i = 0; i < ndim; i++) {\n min[i] = nodes.min(attributes[i]).value;\n max[i] = nodes.max(attributes[i]).value;\n }\n\n // Build k centroids, each represented as an n-dim feature vector\n for (var c = 0; c < k; c++) {\n centroid = [];\n for (var _i = 0; _i < ndim; _i++) {\n centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value\n }\n\n centroids[c] = centroid;\n }\n return centroids;\n};\nvar classify = function classify(node, centroids, distance, attributes, type) {\n var min = Infinity;\n var index = 0;\n for (var i = 0; i < centroids.length; i++) {\n var dist = getDist(distance, node, centroids[i], attributes, type);\n if (dist < min) {\n min = dist;\n index = i;\n }\n }\n return index;\n};\nvar buildCluster = function buildCluster(centroid, nodes, assignment) {\n var cluster = [];\n var node = null;\n for (var n = 0; n < nodes.length; n++) {\n node = nodes[n];\n if (assignment[node.id()] === centroid) {\n //console.log(\"Node \" + node.id() + \" is associated with medoid #: \" + m);\n cluster.push(node);\n }\n }\n return cluster;\n};\nvar haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) {\n return Math.abs(v2 - v1) <= sensitivityThreshold;\n};\nvar haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) {\n for (var i = 0; i < v1.length; i++) {\n for (var j = 0; j < v1[i].length; j++) {\n var diff = Math.abs(v1[i][j] - v2[i][j]);\n if (diff > sensitivityThreshold) {\n return false;\n }\n }\n }\n return true;\n};\nvar seenBefore = function seenBefore(node, medoids, n) {\n for (var i = 0; i < n; i++) {\n if (node === medoids[i]) return true;\n }\n return false;\n};\nvar randomMedoids = function randomMedoids(nodes, k) {\n var medoids = new Array(k);\n\n // For small data sets, the probability of medoid conflict is greater,\n // so we need to check to see if we've already seen or chose this node before.\n if (nodes.length < 50) {\n // Randomly select k medoids from the n nodes\n for (var i = 0; i < k; i++) {\n var node = nodes[Math.floor(Math.random() * nodes.length)];\n\n // If we've already chosen this node to be a medoid, don't choose it again (for small data sets).\n // Instead choose a different random node.\n while (seenBefore(node, medoids, i)) {\n node = nodes[Math.floor(Math.random() * nodes.length)];\n }\n medoids[i] = node;\n }\n } else {\n // Relatively large data set, so pretty safe to not check and just select random nodes\n for (var _i2 = 0; _i2 < k; _i2++) {\n medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)];\n }\n }\n return medoids;\n};\nvar findCost = function findCost(potentialNewMedoid, cluster, attributes) {\n var cost = 0;\n for (var n = 0; n < cluster.length; n++) {\n cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids');\n }\n return cost;\n};\nvar kMeans = function kMeans(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var node = null;\n\n // Set parameters of algorithm: # of clusters, distance metric, etc.\n var opts = setOptions$2(options);\n\n // Begin k-means algorithm\n var clusters = new Array(opts.k);\n var assignment = {};\n var centroids;\n\n // Step 1: Initialize centroid positions\n if (opts.testMode) {\n if (typeof opts.testCentroids === 'number') {\n // TODO: implement a seeded random number generator.\n opts.testCentroids;\n centroids = randomCentroids(nodes, opts.k, opts.attributes);\n } else if (_typeof(opts.testCentroids) === 'object') {\n centroids = opts.testCentroids;\n } else {\n centroids = randomCentroids(nodes, opts.k, opts.attributes);\n }\n } else {\n centroids = randomCentroids(nodes, opts.k, opts.attributes);\n }\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n // Step 2: Assign nodes to the nearest centroid\n for (var n = 0; n < nodes.length; n++) {\n node = nodes[n];\n // Determine which cluster this node belongs to: node id => cluster #\n assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans');\n }\n\n // Step 3: For each of the k clusters, update its centroid\n isStillMoving = false;\n for (var c = 0; c < opts.k; c++) {\n // Get all nodes that belong to this cluster\n var cluster = buildCluster(c, nodes, assignment);\n if (cluster.length === 0) {\n // If cluster is empty, break out early & move to next cluster\n continue;\n }\n\n // Update centroids by calculating avg of all nodes within the cluster.\n var ndim = opts.attributes.length;\n var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ]\n var newCentroid = new Array(ndim);\n var sum = new Array(ndim);\n for (var d = 0; d < ndim; d++) {\n sum[d] = 0.0;\n for (var i = 0; i < cluster.length; i++) {\n node = cluster[i];\n sum[d] += opts.attributes[d](node);\n }\n newCentroid[d] = sum[d] / cluster.length;\n\n // Check to see if algorithm has converged, i.e. when centroids no longer change\n if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) {\n isStillMoving = true;\n }\n }\n centroids[c] = newCentroid;\n clusters[c] = cy.collection(cluster);\n }\n iterations++;\n }\n return clusters;\n};\nvar kMedoids = function kMedoids(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var node = null;\n var opts = setOptions$2(options);\n\n // Begin k-medoids algorithm\n var clusters = new Array(opts.k);\n var medoids;\n var assignment = {};\n var curCost;\n var minCosts = new Array(opts.k); // minimum cost configuration for each cluster\n\n // Step 1: Initialize k medoids\n if (opts.testMode) {\n if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') {\n medoids = opts.testCentroids;\n } else {\n medoids = randomMedoids(nodes, opts.k);\n }\n } else {\n medoids = randomMedoids(nodes, opts.k);\n }\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n // Step 2: Assign nodes to the nearest medoid\n for (var n = 0; n < nodes.length; n++) {\n node = nodes[n];\n // Determine which cluster this node belongs to: node id => cluster #\n assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids');\n }\n isStillMoving = false;\n // Step 3: For each medoid m, and for each node associated with mediod m,\n // select the node with the lowest configuration cost as new medoid.\n for (var m = 0; m < medoids.length; m++) {\n // Get all nodes that belong to this medoid\n var cluster = buildCluster(m, nodes, assignment);\n if (cluster.length === 0) {\n // If cluster is empty, break out early & move to next cluster\n continue;\n }\n minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost\n\n // Select different medoid if its configuration has the lowest cost\n for (var _n = 0; _n < cluster.length; _n++) {\n curCost = findCost(cluster[_n], cluster, opts.attributes);\n if (curCost < minCosts[m]) {\n minCosts[m] = curCost;\n medoids[m] = cluster[_n];\n isStillMoving = true;\n }\n }\n clusters[m] = cy.collection(cluster);\n }\n iterations++;\n }\n return clusters;\n};\nvar updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) {\n var numerator, denominator;\n for (var n = 0; n < nodes.length; n++) {\n for (var c = 0; c < centroids.length; c++) {\n weight[n][c] = Math.pow(U[n][c], opts.m);\n }\n }\n for (var _c = 0; _c < centroids.length; _c++) {\n for (var dim = 0; dim < opts.attributes.length; dim++) {\n numerator = 0;\n denominator = 0;\n for (var _n2 = 0; _n2 < nodes.length; _n2++) {\n numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]);\n denominator += weight[_n2][_c];\n }\n centroids[_c][dim] = numerator / denominator;\n }\n }\n};\nvar updateMembership = function updateMembership(U, _U, centroids, nodes, opts) {\n // Save previous step\n for (var i = 0; i < U.length; i++) {\n _U[i] = U[i].slice();\n }\n var sum, numerator, denominator;\n var pow = 2 / (opts.m - 1);\n for (var c = 0; c < centroids.length; c++) {\n for (var n = 0; n < nodes.length; n++) {\n sum = 0;\n for (var k = 0; k < centroids.length; k++) {\n // against all other centroids\n numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans');\n denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans');\n sum += Math.pow(numerator / denominator, pow);\n }\n U[n][c] = 1 / sum;\n }\n }\n};\nvar assign$1 = function assign(nodes, U, opts, cy) {\n var clusters = new Array(opts.k);\n for (var c = 0; c < clusters.length; c++) {\n clusters[c] = [];\n }\n var max;\n var index;\n for (var n = 0; n < U.length; n++) {\n // for each node (U is N x C matrix)\n max = -Infinity;\n index = -1;\n // Determine which cluster the node is most likely to belong in\n for (var _c2 = 0; _c2 < U[0].length; _c2++) {\n if (U[n][_c2] > max) {\n max = U[n][_c2];\n index = _c2;\n }\n }\n clusters[index].push(nodes[n]);\n }\n\n // Turn every array into a collection of nodes\n for (var _c3 = 0; _c3 < clusters.length; _c3++) {\n clusters[_c3] = cy.collection(clusters[_c3]);\n }\n return clusters;\n};\nvar fuzzyCMeans = function fuzzyCMeans(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var opts = setOptions$2(options);\n\n // Begin fuzzy c-means algorithm\n var clusters;\n var centroids;\n var U;\n var _U;\n var weight;\n\n // Step 1: Initialize letiables.\n _U = new Array(nodes.length);\n for (var i = 0; i < nodes.length; i++) {\n // N x C matrix\n _U[i] = new Array(opts.k);\n }\n U = new Array(nodes.length);\n for (var _i3 = 0; _i3 < nodes.length; _i3++) {\n // N x C matrix\n U[_i3] = new Array(opts.k);\n }\n for (var _i4 = 0; _i4 < nodes.length; _i4++) {\n var total = 0;\n for (var j = 0; j < opts.k; j++) {\n U[_i4][j] = Math.random();\n total += U[_i4][j];\n }\n for (var _j = 0; _j < opts.k; _j++) {\n U[_i4][_j] = U[_i4][_j] / total;\n }\n }\n centroids = new Array(opts.k);\n for (var _i5 = 0; _i5 < opts.k; _i5++) {\n centroids[_i5] = new Array(opts.attributes.length);\n }\n weight = new Array(nodes.length);\n for (var _i6 = 0; _i6 < nodes.length; _i6++) {\n // N x C matrix\n weight[_i6] = new Array(opts.k);\n }\n // end init FCM\n\n var isStillMoving = true;\n var iterations = 0;\n while (isStillMoving && iterations < opts.maxIterations) {\n isStillMoving = false;\n\n // Step 2: Calculate the centroids for each step.\n updateCentroids(centroids, nodes, U, weight, opts);\n\n // Step 3: Update the partition matrix U.\n updateMembership(U, _U, centroids, nodes, opts);\n\n // Step 4: Check for convergence.\n if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) {\n isStillMoving = true;\n }\n iterations++;\n }\n\n // Assign nodes to clusters with highest probability.\n clusters = assign$1(nodes, U, opts, cy);\n return {\n clusters: clusters,\n degreeOfMembership: U\n };\n};\nvar kClustering = {\n kMeans: kMeans,\n kMedoids: kMedoids,\n fuzzyCMeans: fuzzyCMeans,\n fcm: fuzzyCMeans\n};\n\n// Implemented by Zoe Xi @zoexi for GSOC 2016\nvar defaults$a = defaults$g({\n distance: 'euclidean',\n // distance metric to compare nodes\n linkage: 'min',\n // linkage criterion : how to determine the distance between clusters of nodes\n mode: 'threshold',\n // mode:'threshold' => clusters must be threshold distance apart\n threshold: Infinity,\n // the distance threshold\n // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters\n addDendrogram: false,\n // whether to add the dendrogram to the graph for viz\n dendrogramDepth: 0,\n // depth at which dendrogram branches are merged into the returned clusters\n attributes: [] // array of attr functions\n});\n\nvar linkageAliases = {\n 'single': 'min',\n 'complete': 'max'\n};\nvar setOptions$1 = function setOptions(options) {\n var opts = defaults$a(options);\n var preferredAlias = linkageAliases[opts.linkage];\n if (preferredAlias != null) {\n opts.linkage = preferredAlias;\n }\n return opts;\n};\nvar mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) {\n // Find two closest clusters from cached mins\n var minKey = 0;\n var min = Infinity;\n var dist;\n var attrs = opts.attributes;\n var getDist = function getDist(n1, n2) {\n return clusteringDistance(opts.distance, attrs.length, function (i) {\n return attrs[i](n1);\n }, function (i) {\n return attrs[i](n2);\n }, n1, n2);\n };\n for (var i = 0; i < clusters.length; i++) {\n var key = clusters[i].key;\n var _dist = dists[key][mins[key]];\n if (_dist < min) {\n minKey = key;\n min = _dist;\n }\n }\n if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) {\n return false;\n }\n var c1 = index[minKey];\n var c2 = index[mins[minKey]];\n var merged;\n\n // Merge two closest clusters\n if (opts.mode === 'dendrogram') {\n merged = {\n left: c1,\n right: c2,\n key: c1.key\n };\n } else {\n merged = {\n value: c1.value.concat(c2.value),\n key: c1.key\n };\n }\n clusters[c1.index] = merged;\n clusters.splice(c2.index, 1);\n index[c1.key] = merged;\n\n // Update distances with new merged cluster\n for (var _i = 0; _i < clusters.length; _i++) {\n var cur = clusters[_i];\n if (c1.key === cur.key) {\n dist = Infinity;\n } else if (opts.linkage === 'min') {\n dist = dists[c1.key][cur.key];\n if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) {\n dist = dists[c2.key][cur.key];\n }\n } else if (opts.linkage === 'max') {\n dist = dists[c1.key][cur.key];\n if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) {\n dist = dists[c2.key][cur.key];\n }\n } else if (opts.linkage === 'mean') {\n dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size);\n } else {\n if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]);\n }\n dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric\n }\n\n // Update cached mins\n for (var _i2 = 0; _i2 < clusters.length; _i2++) {\n var key1 = clusters[_i2].key;\n if (mins[key1] === c1.key || mins[key1] === c2.key) {\n var _min = key1;\n for (var j = 0; j < clusters.length; j++) {\n var key2 = clusters[j].key;\n if (dists[key1][key2] < dists[key1][_min]) {\n _min = key2;\n }\n }\n mins[key1] = _min;\n }\n clusters[_i2].index = _i2;\n }\n\n // Clean up meta data used for clustering\n c1.key = c2.key = c1.index = c2.index = null;\n return true;\n};\nvar getAllChildren = function getAllChildren(root, arr, cy) {\n if (!root) return;\n if (root.value) {\n arr.push(root.value);\n } else {\n if (root.left) getAllChildren(root.left, arr);\n if (root.right) getAllChildren(root.right, arr);\n }\n};\nvar buildDendrogram = function buildDendrogram(root, cy) {\n if (!root) return '';\n if (root.left && root.right) {\n var leftStr = buildDendrogram(root.left, cy);\n var rightStr = buildDendrogram(root.right, cy);\n var node = cy.add({\n group: 'nodes',\n data: {\n id: leftStr + ',' + rightStr\n }\n });\n cy.add({\n group: 'edges',\n data: {\n source: leftStr,\n target: node.id()\n }\n });\n cy.add({\n group: 'edges',\n data: {\n source: rightStr,\n target: node.id()\n }\n });\n return node.id();\n } else if (root.value) {\n return root.value.id();\n }\n};\nvar buildClustersFromTree = function buildClustersFromTree(root, k, cy) {\n if (!root) return [];\n var left = [],\n right = [],\n leaves = [];\n if (k === 0) {\n // don't cut tree, simply return all nodes as 1 single cluster\n if (root.left) getAllChildren(root.left, left);\n if (root.right) getAllChildren(root.right, right);\n leaves = left.concat(right);\n return [cy.collection(leaves)];\n } else if (k === 1) {\n // cut at root\n\n if (root.value) {\n // leaf node\n return [cy.collection(root.value)];\n } else {\n if (root.left) getAllChildren(root.left, left);\n if (root.right) getAllChildren(root.right, right);\n return [cy.collection(left), cy.collection(right)];\n }\n } else {\n if (root.value) {\n return [cy.collection(root.value)];\n } else {\n if (root.left) left = buildClustersFromTree(root.left, k - 1, cy);\n if (root.right) right = buildClustersFromTree(root.right, k - 1, cy);\n return left.concat(right);\n }\n }\n};\n\nvar hierarchicalClustering = function hierarchicalClustering(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n\n // Set parameters of algorithm: linkage type, distance metric, etc.\n var opts = setOptions$1(options);\n var attrs = opts.attributes;\n var getDist = function getDist(n1, n2) {\n return clusteringDistance(opts.distance, attrs.length, function (i) {\n return attrs[i](n1);\n }, function (i) {\n return attrs[i](n2);\n }, n1, n2);\n };\n\n // Begin hierarchical algorithm\n var clusters = [];\n var dists = []; // distances between each pair of clusters\n var mins = []; // closest cluster for each cluster\n var index = []; // hash of all clusters by key\n\n // In agglomerative (bottom-up) clustering, each node starts as its own cluster\n for (var n = 0; n < nodes.length; n++) {\n var cluster = {\n value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]],\n key: n,\n index: n\n };\n clusters[n] = cluster;\n index[n] = cluster;\n dists[n] = [];\n mins[n] = 0;\n }\n\n // Calculate the distance between each pair of clusters\n for (var i = 0; i < clusters.length; i++) {\n for (var j = 0; j <= i; j++) {\n var dist = void 0;\n if (opts.mode === 'dendrogram') {\n // modes store cluster values differently\n dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value);\n } else {\n dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]);\n }\n dists[i][j] = dist;\n dists[j][i] = dist;\n if (dist < dists[i][mins[i]]) {\n mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j\n }\n }\n }\n\n // Find the closest pair of clusters and merge them into a single cluster.\n // Update distances between new cluster and each of the old clusters, and loop until threshold reached.\n var merged = mergeClosest(clusters, index, dists, mins, opts);\n while (merged) {\n merged = mergeClosest(clusters, index, dists, mins, opts);\n }\n var retClusters;\n\n // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges\n // in addition to returning the clusters.\n if (opts.mode === 'dendrogram') {\n retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy);\n if (opts.addDendrogram) buildDendrogram(clusters[0], cy);\n } else {\n // Regular mode simply returns the clusters\n\n retClusters = new Array(clusters.length);\n clusters.forEach(function (cluster, i) {\n // Clean up meta data used for clustering\n cluster.key = cluster.index = null;\n retClusters[i] = cy.collection(cluster.value);\n });\n }\n return retClusters;\n};\nvar hierarchicalClustering$1 = {\n hierarchicalClustering: hierarchicalClustering,\n hca: hierarchicalClustering\n};\n\n// Implemented by Zoe Xi @zoexi for GSOC 2016\nvar defaults$9 = defaults$g({\n distance: 'euclidean',\n // distance metric to compare attributes between two nodes\n preference: 'median',\n // suitability of a data point to serve as an exemplar\n damping: 0.8,\n // damping factor between [0.5, 1)\n maxIterations: 1000,\n // max number of iterations to run\n minIterations: 100,\n // min number of iterations to run in order for clustering to stop\n attributes: [// functions to quantify the similarity between any two points\n // e.g. node => node.data('weight')\n ]\n});\nvar setOptions = function setOptions(options) {\n var dmp = options.damping;\n var pref = options.preference;\n if (!(0.5 <= dmp && dmp < 1)) {\n error(\"Damping must range on [0.5, 1). Got: \".concat(dmp));\n }\n var validPrefs = ['median', 'mean', 'min', 'max'];\n if (!(validPrefs.some(function (v) {\n return v === pref;\n }) || number$1(pref))) {\n error(\"Preference must be one of [\".concat(validPrefs.map(function (p) {\n return \"'\".concat(p, \"'\");\n }).join(', '), \"] or a number. Got: \").concat(pref));\n }\n return defaults$9(options);\n};\n\nvar getSimilarity = function getSimilarity(type, n1, n2, attributes) {\n var attr = function attr(n, i) {\n return attributes[i](n);\n };\n\n // nb negative because similarity should have an inverse relationship to distance\n return -clusteringDistance(type, attributes.length, function (i) {\n return attr(n1, i);\n }, function (i) {\n return attr(n2, i);\n }, n1, n2);\n};\nvar getPreference = function getPreference(S, preference) {\n // larger preference = greater # of clusters\n var p = null;\n if (preference === 'median') {\n p = median(S);\n } else if (preference === 'mean') {\n p = mean(S);\n } else if (preference === 'min') {\n p = min(S);\n } else if (preference === 'max') {\n p = max(S);\n } else {\n // Custom preference number, as set by user\n p = preference;\n }\n return p;\n};\nvar findExemplars = function findExemplars(n, R, A) {\n var indices = [];\n for (var i = 0; i < n; i++) {\n if (R[i * n + i] + A[i * n + i] > 0) {\n indices.push(i);\n }\n }\n return indices;\n};\nvar assignClusters = function assignClusters(n, S, exemplars) {\n var clusters = [];\n for (var i = 0; i < n; i++) {\n var index = -1;\n var max = -Infinity;\n for (var ei = 0; ei < exemplars.length; ei++) {\n var e = exemplars[ei];\n if (S[i * n + e] > max) {\n index = e;\n max = S[i * n + e];\n }\n }\n if (index > 0) {\n clusters.push(index);\n }\n }\n for (var _ei = 0; _ei < exemplars.length; _ei++) {\n clusters[exemplars[_ei]] = exemplars[_ei];\n }\n return clusters;\n};\nvar assign = function assign(n, S, exemplars) {\n var clusters = assignClusters(n, S, exemplars);\n for (var ei = 0; ei < exemplars.length; ei++) {\n var ii = [];\n for (var c = 0; c < clusters.length; c++) {\n if (clusters[c] === exemplars[ei]) {\n ii.push(c);\n }\n }\n var maxI = -1;\n var maxSum = -Infinity;\n for (var i = 0; i < ii.length; i++) {\n var sum = 0;\n for (var j = 0; j < ii.length; j++) {\n sum += S[ii[j] * n + ii[i]];\n }\n if (sum > maxSum) {\n maxI = i;\n maxSum = sum;\n }\n }\n exemplars[ei] = ii[maxI];\n }\n clusters = assignClusters(n, S, exemplars);\n return clusters;\n};\nvar affinityPropagation = function affinityPropagation(options) {\n var cy = this.cy();\n var nodes = this.nodes();\n var opts = setOptions(options);\n\n // Map each node to its position in node array\n var id2position = {};\n for (var i = 0; i < nodes.length; i++) {\n id2position[nodes[i].id()] = i;\n }\n\n // Begin affinity propagation algorithm\n\n var n; // number of data points\n var n2; // size of matrices\n var S; // similarity matrix (1D array)\n var p; // preference/suitability of a data point to serve as an exemplar\n var R; // responsibility matrix (1D array)\n var A; // availability matrix (1D array)\n\n n = nodes.length;\n n2 = n * n;\n\n // Initialize and build S similarity matrix\n S = new Array(n2);\n for (var _i = 0; _i < n2; _i++) {\n S[_i] = -Infinity; // for cases where two data points shouldn't be linked together\n }\n\n for (var _i2 = 0; _i2 < n; _i2++) {\n for (var j = 0; j < n; j++) {\n if (_i2 !== j) {\n S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes);\n }\n }\n }\n\n // Place preferences on the diagonal of S\n p = getPreference(S, opts.preference);\n for (var _i3 = 0; _i3 < n; _i3++) {\n S[_i3 * n + _i3] = p;\n }\n\n // Initialize R responsibility matrix\n R = new Array(n2);\n for (var _i4 = 0; _i4 < n2; _i4++) {\n R[_i4] = 0.0;\n }\n\n // Initialize A availability matrix\n A = new Array(n2);\n for (var _i5 = 0; _i5 < n2; _i5++) {\n A[_i5] = 0.0;\n }\n var old = new Array(n);\n var Rp = new Array(n);\n var se = new Array(n);\n for (var _i6 = 0; _i6 < n; _i6++) {\n old[_i6] = 0.0;\n Rp[_i6] = 0.0;\n se[_i6] = 0;\n }\n var e = new Array(n * opts.minIterations);\n for (var _i7 = 0; _i7 < e.length; _i7++) {\n e[_i7] = 0;\n }\n var iter;\n for (iter = 0; iter < opts.maxIterations; iter++) {\n // main algorithmic loop\n\n // Update R responsibility matrix\n for (var _i8 = 0; _i8 < n; _i8++) {\n var max = -Infinity,\n max2 = -Infinity,\n maxI = -1,\n AS = 0.0;\n for (var _j = 0; _j < n; _j++) {\n old[_j] = R[_i8 * n + _j];\n AS = A[_i8 * n + _j] + S[_i8 * n + _j];\n if (AS >= max) {\n max2 = max;\n max = AS;\n maxI = _j;\n } else if (AS > max2) {\n max2 = AS;\n }\n }\n for (var _j2 = 0; _j2 < n; _j2++) {\n R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2];\n }\n R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI];\n }\n\n // Update A availability matrix\n for (var _i9 = 0; _i9 < n; _i9++) {\n var sum = 0;\n for (var _j3 = 0; _j3 < n; _j3++) {\n old[_j3] = A[_j3 * n + _i9];\n Rp[_j3] = Math.max(0, R[_j3 * n + _i9]);\n sum += Rp[_j3];\n }\n sum -= Rp[_i9];\n Rp[_i9] = R[_i9 * n + _i9];\n sum += Rp[_i9];\n for (var _j4 = 0; _j4 < n; _j4++) {\n A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4];\n }\n A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9];\n }\n\n // Check for convergence\n var K = 0;\n for (var _i10 = 0; _i10 < n; _i10++) {\n var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0;\n e[iter % opts.minIterations * n + _i10] = E;\n K += E;\n }\n if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) {\n var _sum = 0;\n for (var _i11 = 0; _i11 < n; _i11++) {\n se[_i11] = 0;\n for (var _j5 = 0; _j5 < opts.minIterations; _j5++) {\n se[_i11] += e[_j5 * n + _i11];\n }\n if (se[_i11] === 0 || se[_i11] === opts.minIterations) {\n _sum++;\n }\n }\n if (_sum === n) {\n // then we have convergence\n break;\n }\n }\n }\n\n // Identify exemplars (cluster centers)\n var exemplarsIndices = findExemplars(n, R, A);\n\n // Assign nodes to clusters\n var clusterIndices = assign(n, S, exemplarsIndices);\n var clusters = {};\n for (var c = 0; c < exemplarsIndices.length; c++) {\n clusters[exemplarsIndices[c]] = [];\n }\n for (var _i12 = 0; _i12 < nodes.length; _i12++) {\n var pos = id2position[nodes[_i12].id()];\n var clusterIndex = clusterIndices[pos];\n if (clusterIndex != null) {\n // the node may have not been assigned a cluster if no valid attributes were specified\n clusters[clusterIndex].push(nodes[_i12]);\n }\n }\n var retClusters = new Array(exemplarsIndices.length);\n for (var _c = 0; _c < exemplarsIndices.length; _c++) {\n retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]);\n }\n return retClusters;\n};\nvar affinityPropagation$1 = {\n affinityPropagation: affinityPropagation,\n ap: affinityPropagation\n};\n\nvar hierholzerDefaults = defaults$g({\n root: undefined,\n directed: false\n});\nvar elesfn$k = {\n hierholzer: function hierholzer(options) {\n if (!plainObject(options)) {\n var args = arguments;\n options = {\n root: args[0],\n directed: args[1]\n };\n }\n var _hierholzerDefaults = hierholzerDefaults(options),\n root = _hierholzerDefaults.root,\n directed = _hierholzerDefaults.directed;\n var eles = this;\n var dflag = false;\n var oddIn;\n var oddOut;\n var startVertex;\n if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id();\n var nodes = {};\n var edges = {};\n if (directed) {\n eles.forEach(function (ele) {\n var id = ele.id();\n if (ele.isNode()) {\n var ind = ele.indegree(true);\n var outd = ele.outdegree(true);\n var d1 = ind - outd;\n var d2 = outd - ind;\n if (d1 == 1) {\n if (oddIn) dflag = true;else oddIn = id;\n } else if (d2 == 1) {\n if (oddOut) dflag = true;else oddOut = id;\n } else if (d2 > 1 || d1 > 1) {\n dflag = true;\n }\n nodes[id] = [];\n ele.outgoers().forEach(function (e) {\n if (e.isEdge()) nodes[id].push(e.id());\n });\n } else {\n edges[id] = [undefined, ele.target().id()];\n }\n });\n } else {\n eles.forEach(function (ele) {\n var id = ele.id();\n if (ele.isNode()) {\n var d = ele.degree(true);\n if (d % 2) {\n if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true;\n }\n nodes[id] = [];\n ele.connectedEdges().forEach(function (e) {\n return nodes[id].push(e.id());\n });\n } else {\n edges[id] = [ele.source().id(), ele.target().id()];\n }\n });\n }\n var result = {\n found: false,\n trail: undefined\n };\n if (dflag) return result;else if (oddOut && oddIn) {\n if (directed) {\n if (startVertex && oddOut != startVertex) {\n return result;\n }\n startVertex = oddOut;\n } else {\n if (startVertex && oddOut != startVertex && oddIn != startVertex) {\n return result;\n } else if (!startVertex) {\n startVertex = oddOut;\n }\n }\n } else {\n if (!startVertex) startVertex = eles[0].id();\n }\n var walk = function walk(v) {\n var currentNode = v;\n var subtour = [v];\n var adj, adjTail, adjHead;\n while (nodes[currentNode].length) {\n adj = nodes[currentNode].shift();\n adjTail = edges[adj][0];\n adjHead = edges[adj][1];\n if (currentNode != adjHead) {\n nodes[adjHead] = nodes[adjHead].filter(function (e) {\n return e != adj;\n });\n currentNode = adjHead;\n } else if (!directed && currentNode != adjTail) {\n nodes[adjTail] = nodes[adjTail].filter(function (e) {\n return e != adj;\n });\n currentNode = adjTail;\n }\n subtour.unshift(adj);\n subtour.unshift(currentNode);\n }\n return subtour;\n };\n var trail = [];\n var subtour = [];\n subtour = walk(startVertex);\n while (subtour.length != 1) {\n if (nodes[subtour[0]].length == 0) {\n trail.unshift(eles.getElementById(subtour.shift()));\n trail.unshift(eles.getElementById(subtour.shift()));\n } else {\n subtour = walk(subtour.shift()).concat(subtour);\n }\n }\n trail.unshift(eles.getElementById(subtour.shift())); // final node\n\n for (var d in nodes) {\n if (nodes[d].length) {\n return result;\n }\n }\n result.found = true;\n result.trail = this.spawn(trail, true);\n return result;\n }\n};\n\nvar hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() {\n var eles = this;\n var nodes = {};\n var id = 0;\n var edgeCount = 0;\n var components = [];\n var stack = [];\n var visitedEdges = {};\n var buildComponent = function buildComponent(x, y) {\n var i = stack.length - 1;\n var cutset = [];\n var component = eles.spawn();\n while (stack[i].x != x || stack[i].y != y) {\n cutset.push(stack.pop().edge);\n i--;\n }\n cutset.push(stack.pop().edge);\n cutset.forEach(function (edge) {\n var connectedNodes = edge.connectedNodes().intersection(eles);\n component.merge(edge);\n connectedNodes.forEach(function (node) {\n var nodeId = node.id();\n var connectedEdges = node.connectedEdges().intersection(eles);\n component.merge(node);\n if (!nodes[nodeId].cutVertex) {\n component.merge(connectedEdges);\n } else {\n component.merge(connectedEdges.filter(function (edge) {\n return edge.isLoop();\n }));\n }\n });\n });\n components.push(component);\n };\n var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) {\n if (root === parent) edgeCount += 1;\n nodes[currentNode] = {\n id: id,\n low: id++,\n cutVertex: false\n };\n var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles);\n if (edges.size() === 0) {\n components.push(eles.spawn(eles.getElementById(currentNode)));\n } else {\n var sourceId, targetId, otherNodeId, edgeId;\n edges.forEach(function (edge) {\n sourceId = edge.source().id();\n targetId = edge.target().id();\n otherNodeId = sourceId === currentNode ? targetId : sourceId;\n if (otherNodeId !== parent) {\n edgeId = edge.id();\n if (!visitedEdges[edgeId]) {\n visitedEdges[edgeId] = true;\n stack.push({\n x: currentNode,\n y: otherNodeId,\n edge: edge\n });\n }\n if (!(otherNodeId in nodes)) {\n biconnectedSearch(root, otherNodeId, currentNode);\n nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low);\n if (nodes[currentNode].id <= nodes[otherNodeId].low) {\n nodes[currentNode].cutVertex = true;\n buildComponent(currentNode, otherNodeId);\n }\n } else {\n nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id);\n }\n }\n });\n }\n };\n eles.forEach(function (ele) {\n if (ele.isNode()) {\n var nodeId = ele.id();\n if (!(nodeId in nodes)) {\n edgeCount = 0;\n biconnectedSearch(nodeId, nodeId);\n nodes[nodeId].cutVertex = edgeCount > 1;\n }\n }\n });\n var cutVertices = Object.keys(nodes).filter(function (id) {\n return nodes[id].cutVertex;\n }).map(function (id) {\n return eles.getElementById(id);\n });\n return {\n cut: eles.spawn(cutVertices),\n components: components\n };\n};\nvar hopcroftTarjanBiconnected$1 = {\n hopcroftTarjanBiconnected: hopcroftTarjanBiconnected,\n htbc: hopcroftTarjanBiconnected,\n htb: hopcroftTarjanBiconnected,\n hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected\n};\n\nvar tarjanStronglyConnected = function tarjanStronglyConnected() {\n var eles = this;\n var nodes = {};\n var index = 0;\n var components = [];\n var stack = [];\n var cut = eles.spawn(eles);\n var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) {\n stack.push(sourceNodeId);\n nodes[sourceNodeId] = {\n index: index,\n low: index++,\n explored: false\n };\n var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles);\n connectedEdges.forEach(function (edge) {\n var targetNodeId = edge.target().id();\n if (targetNodeId !== sourceNodeId) {\n if (!(targetNodeId in nodes)) {\n stronglyConnectedSearch(targetNodeId);\n }\n if (!nodes[targetNodeId].explored) {\n nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low);\n }\n }\n });\n if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) {\n var componentNodes = eles.spawn();\n for (;;) {\n var nodeId = stack.pop();\n componentNodes.merge(eles.getElementById(nodeId));\n nodes[nodeId].low = nodes[sourceNodeId].index;\n nodes[nodeId].explored = true;\n if (nodeId === sourceNodeId) {\n break;\n }\n }\n var componentEdges = componentNodes.edgesWith(componentNodes);\n var component = componentNodes.merge(componentEdges);\n components.push(component);\n cut = cut.difference(component);\n }\n };\n eles.forEach(function (ele) {\n if (ele.isNode()) {\n var nodeId = ele.id();\n if (!(nodeId in nodes)) {\n stronglyConnectedSearch(nodeId);\n }\n }\n });\n return {\n cut: cut,\n components: components\n };\n};\nvar tarjanStronglyConnected$1 = {\n tarjanStronglyConnected: tarjanStronglyConnected,\n tsc: tarjanStronglyConnected,\n tscc: tarjanStronglyConnected,\n tarjanStronglyConnectedComponents: tarjanStronglyConnected\n};\n\nvar elesfn$j = {};\n[elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) {\n extend(elesfn$j, props);\n});\n\n/*!\nEmbeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable\nCopyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)\nLicensed under The MIT License (http://opensource.org/licenses/MIT)\n*/\n\n/* promise states [Promises/A+ 2.1] */\nvar STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */\nvar STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */\nvar STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */\n\n/* promise object constructor */\nvar api = function api(executor) {\n /* optionally support non-constructor/plain-function call */\n if (!(this instanceof api)) return new api(executor);\n\n /* initialize object */\n this.id = 'Thenable/1.0.7';\n this.state = STATE_PENDING; /* initial state */\n this.fulfillValue = undefined; /* initial value */ /* [Promises/A+ 1.3, 2.1.2.2] */\n this.rejectReason = undefined; /* initial reason */ /* [Promises/A+ 1.5, 2.1.3.2] */\n this.onFulfilled = []; /* initial handlers */\n this.onRejected = []; /* initial handlers */\n\n /* provide optional information-hiding proxy */\n this.proxy = {\n then: this.then.bind(this)\n };\n\n /* support optional executor function */\n if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this));\n};\n\n/* promise API methods */\napi.prototype = {\n /* promise resolving methods */\n fulfill: function fulfill(value) {\n return deliver(this, STATE_FULFILLED, 'fulfillValue', value);\n },\n reject: function reject(value) {\n return deliver(this, STATE_REJECTED, 'rejectReason', value);\n },\n /* \"The then Method\" [Promises/A+ 1.1, 1.2, 2.2] */\n then: function then(onFulfilled, onRejected) {\n var curr = this;\n var next = new api(); /* [Promises/A+ 2.2.7] */\n curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); /* [Promises/A+ 2.2.2/2.2.6] */\n curr.onRejected.push(resolver(onRejected, next, 'reject')); /* [Promises/A+ 2.2.3/2.2.6] */\n execute(curr);\n return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */\n }\n};\n\n/* deliver an action */\nvar deliver = function deliver(curr, state, name, value) {\n if (curr.state === STATE_PENDING) {\n curr.state = state; /* [Promises/A+ 2.1.2.1, 2.1.3.1] */\n curr[name] = value; /* [Promises/A+ 2.1.2.2, 2.1.3.2] */\n execute(curr);\n }\n return curr;\n};\n\n/* execute all handlers */\nvar execute = function execute(curr) {\n if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason);\n};\n\n/* execute particular set of handlers */\nvar execute_handlers = function execute_handlers(curr, name, value) {\n /* global setImmediate: true */\n /* global setTimeout: true */\n\n /* short-circuit processing */\n if (curr[name].length === 0) return;\n\n /* iterate over all handlers, exactly once */\n var handlers = curr[name];\n curr[name] = []; /* [Promises/A+ 2.2.2.3, 2.2.3.3] */\n var func = function func() {\n for (var i = 0; i < handlers.length; i++) {\n handlers[i](value);\n } /* [Promises/A+ 2.2.5] */\n };\n\n /* execute procedure asynchronously */ /* [Promises/A+ 2.2.4, 3.1] */\n if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0);\n};\n\n/* generate a resolver function */\nvar resolver = function resolver(cb, next, method) {\n return function (value) {\n if (typeof cb !== 'function') /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */\n next[method].call(next, value); /* [Promises/A+ 2.2.7.3, 2.2.7.4] */else {\n var result;\n try {\n result = cb(value);\n } /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ catch (e) {\n next.reject(e); /* [Promises/A+ 2.2.7.2] */\n return;\n }\n resolve(next, result); /* [Promises/A+ 2.2.7.1] */\n }\n };\n};\n\n/* \"Promise Resolution Procedure\" */ /* [Promises/A+ 2.3] */\nvar resolve = function resolve(promise, x) {\n /* sanity check arguments */ /* [Promises/A+ 2.3.1] */\n if (promise === x || promise.proxy === x) {\n promise.reject(new TypeError('cannot resolve promise with itself'));\n return;\n }\n\n /* surgically check for a \"then\" method\n (mainly to just call the \"getter\" of \"then\" only once) */\n var then;\n if (_typeof(x) === 'object' && x !== null || typeof x === 'function') {\n try {\n then = x.then;\n } /* [Promises/A+ 2.3.3.1, 3.5] */ catch (e) {\n promise.reject(e); /* [Promises/A+ 2.3.3.2] */\n return;\n }\n }\n\n /* handle own Thenables [Promises/A+ 2.3.2]\n and similar \"thenables\" [Promises/A+ 2.3.3] */\n if (typeof then === 'function') {\n var resolved = false;\n try {\n /* call retrieved \"then\" method */ /* [Promises/A+ 2.3.3.3] */\n then.call(x, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */\n function (y) {\n if (resolved) return;\n resolved = true; /* [Promises/A+ 2.3.3.3.3] */\n if (y === x) /* [Promises/A+ 3.6] */\n promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y);\n }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */\n function (r) {\n if (resolved) return;\n resolved = true; /* [Promises/A+ 2.3.3.3.3] */\n promise.reject(r);\n });\n } catch (e) {\n if (!resolved) /* [Promises/A+ 2.3.3.3.3] */\n promise.reject(e); /* [Promises/A+ 2.3.3.3.4] */\n }\n\n return;\n }\n\n /* handle other values */\n promise.fulfill(x); /* [Promises/A+ 2.3.4, 2.3.3.4] */\n};\n\n// so we always have Promise.all()\napi.all = function (ps) {\n return new api(function (resolveAll, rejectAll) {\n var vals = new Array(ps.length);\n var doneCount = 0;\n var fulfill = function fulfill(i, val) {\n vals[i] = val;\n doneCount++;\n if (doneCount === ps.length) {\n resolveAll(vals);\n }\n };\n for (var i = 0; i < ps.length; i++) {\n (function (i) {\n var p = ps[i];\n var isPromise = p != null && p.then != null;\n if (isPromise) {\n p.then(function (val) {\n fulfill(i, val);\n }, function (err) {\n rejectAll(err);\n });\n } else {\n var val = p;\n fulfill(i, val);\n }\n })(i);\n }\n });\n};\napi.resolve = function (val) {\n return new api(function (resolve, reject) {\n resolve(val);\n });\n};\napi.reject = function (val) {\n return new api(function (resolve, reject) {\n reject(val);\n });\n};\nvar Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef\n\nvar Animation = function Animation(target, opts, opts2) {\n var isCore = core(target);\n var isEle = !isCore;\n var _p = this._private = extend({\n duration: 1000\n }, opts, opts2);\n _p.target = target;\n _p.style = _p.style || _p.css;\n _p.started = false;\n _p.playing = false;\n _p.hooked = false;\n _p.applying = false;\n _p.progress = 0;\n _p.completes = [];\n _p.frames = [];\n if (_p.complete && fn$6(_p.complete)) {\n _p.completes.push(_p.complete);\n }\n if (isEle) {\n var pos = target.position();\n _p.startPosition = _p.startPosition || {\n x: pos.x,\n y: pos.y\n };\n _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style);\n }\n if (isCore) {\n var pan = target.pan();\n _p.startPan = {\n x: pan.x,\n y: pan.y\n };\n _p.startZoom = target.zoom();\n }\n\n // for future timeline/animations impl\n this.length = 1;\n this[0] = this;\n};\nvar anifn = Animation.prototype;\nextend(anifn, {\n instanceString: function instanceString() {\n return 'animation';\n },\n hook: function hook() {\n var _p = this._private;\n if (!_p.hooked) {\n // add to target's animation queue\n var q;\n var tAni = _p.target._private.animation;\n if (_p.queue) {\n q = tAni.queue;\n } else {\n q = tAni.current;\n }\n q.push(this);\n\n // add to the animation loop pool\n if (elementOrCollection(_p.target)) {\n _p.target.cy().addToAnimationPool(_p.target);\n }\n _p.hooked = true;\n }\n return this;\n },\n play: function play() {\n var _p = this._private;\n\n // autorewind\n if (_p.progress === 1) {\n _p.progress = 0;\n }\n _p.playing = true;\n _p.started = false; // needs to be started by animation loop\n _p.stopped = false;\n this.hook();\n\n // the animation loop will start the animation...\n\n return this;\n },\n playing: function playing() {\n return this._private.playing;\n },\n apply: function apply() {\n var _p = this._private;\n _p.applying = true;\n _p.started = false; // needs to be started by animation loop\n _p.stopped = false;\n this.hook();\n\n // the animation loop will apply the animation at this progress\n\n return this;\n },\n applying: function applying() {\n return this._private.applying;\n },\n pause: function pause() {\n var _p = this._private;\n _p.playing = false;\n _p.started = false;\n return this;\n },\n stop: function stop() {\n var _p = this._private;\n _p.playing = false;\n _p.started = false;\n _p.stopped = true; // to be removed from animation queues\n\n return this;\n },\n rewind: function rewind() {\n return this.progress(0);\n },\n fastforward: function fastforward() {\n return this.progress(1);\n },\n time: function time(t) {\n var _p = this._private;\n if (t === undefined) {\n return _p.progress * _p.duration;\n } else {\n return this.progress(t / _p.duration);\n }\n },\n progress: function progress(p) {\n var _p = this._private;\n var wasPlaying = _p.playing;\n if (p === undefined) {\n return _p.progress;\n } else {\n if (wasPlaying) {\n this.pause();\n }\n _p.progress = p;\n _p.started = false;\n if (wasPlaying) {\n this.play();\n }\n }\n return this;\n },\n completed: function completed() {\n return this._private.progress === 1;\n },\n reverse: function reverse() {\n var _p = this._private;\n var wasPlaying = _p.playing;\n if (wasPlaying) {\n this.pause();\n }\n _p.progress = 1 - _p.progress;\n _p.started = false;\n var swap = function swap(a, b) {\n var _pa = _p[a];\n if (_pa == null) {\n return;\n }\n _p[a] = _p[b];\n _p[b] = _pa;\n };\n swap('zoom', 'startZoom');\n swap('pan', 'startPan');\n swap('position', 'startPosition');\n\n // swap styles\n if (_p.style) {\n for (var i = 0; i < _p.style.length; i++) {\n var prop = _p.style[i];\n var name = prop.name;\n var startStyleProp = _p.startStyle[name];\n _p.startStyle[name] = prop;\n _p.style[i] = startStyleProp;\n }\n }\n if (wasPlaying) {\n this.play();\n }\n return this;\n },\n promise: function promise(type) {\n var _p = this._private;\n var arr;\n switch (type) {\n case 'frame':\n arr = _p.frames;\n break;\n default:\n case 'complete':\n case 'completed':\n arr = _p.completes;\n }\n return new Promise$1(function (resolve, reject) {\n arr.push(function () {\n resolve();\n });\n });\n }\n});\nanifn.complete = anifn.completed;\nanifn.run = anifn.play;\nanifn.running = anifn.playing;\n\nvar define$3 = {\n animated: function animated() {\n return function animatedImpl() {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return false;\n }\n var ele = all[0];\n if (ele) {\n return ele._private.animation.current.length > 0;\n }\n };\n },\n // animated\n\n clearQueue: function clearQueue() {\n return function clearQueueImpl() {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n for (var i = 0; i < all.length; i++) {\n var ele = all[i];\n ele._private.animation.queue = [];\n }\n return this;\n };\n },\n // clearQueue\n\n delay: function delay() {\n return function delayImpl(time, complete) {\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n return this.animate({\n delay: time,\n duration: time,\n complete: complete\n });\n };\n },\n // delay\n\n delayAnimation: function delayAnimation() {\n return function delayAnimationImpl(time, complete) {\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n return this.animation({\n delay: time,\n duration: time,\n complete: complete\n });\n };\n },\n // delay\n\n animation: function animation() {\n return function animationImpl(properties, params) {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n var isCore = !selfIsArrayLike;\n var isEles = !isCore;\n if (!cy.styleEnabled()) {\n return this;\n }\n var style = cy.style();\n properties = extend({}, properties, params);\n var propertiesEmpty = Object.keys(properties).length === 0;\n if (propertiesEmpty) {\n return new Animation(all[0], properties); // nothing to animate\n }\n\n if (properties.duration === undefined) {\n properties.duration = 400;\n }\n switch (properties.duration) {\n case 'slow':\n properties.duration = 600;\n break;\n case 'fast':\n properties.duration = 200;\n break;\n }\n if (isEles) {\n properties.style = style.getPropsList(properties.style || properties.css);\n properties.css = undefined;\n }\n if (isEles && properties.renderedPosition != null) {\n var rpos = properties.renderedPosition;\n var pan = cy.pan();\n var zoom = cy.zoom();\n properties.position = renderedToModelPosition(rpos, zoom, pan);\n }\n\n // override pan w/ panBy if set\n if (isCore && properties.panBy != null) {\n var panBy = properties.panBy;\n var cyPan = cy.pan();\n properties.pan = {\n x: cyPan.x + panBy.x,\n y: cyPan.y + panBy.y\n };\n }\n\n // override pan w/ center if set\n var center = properties.center || properties.centre;\n if (isCore && center != null) {\n var centerPan = cy.getCenterPan(center.eles, properties.zoom);\n if (centerPan != null) {\n properties.pan = centerPan;\n }\n }\n\n // override pan & zoom w/ fit if set\n if (isCore && properties.fit != null) {\n var fit = properties.fit;\n var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding);\n if (fitVp != null) {\n properties.pan = fitVp.pan;\n properties.zoom = fitVp.zoom;\n }\n }\n\n // override zoom (& potentially pan) w/ zoom obj if set\n if (isCore && plainObject(properties.zoom)) {\n var vp = cy.getZoomedViewport(properties.zoom);\n if (vp != null) {\n if (vp.zoomed) {\n properties.zoom = vp.zoom;\n }\n if (vp.panned) {\n properties.pan = vp.pan;\n }\n } else {\n properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed\n }\n }\n\n return new Animation(all[0], properties);\n };\n },\n // animate\n\n animate: function animate() {\n return function animateImpl(properties, params) {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n if (params) {\n properties = extend({}, properties, params);\n }\n\n // manually hook and run the animation\n for (var i = 0; i < all.length; i++) {\n var ele = all[i];\n var queue = ele.animated() && (properties.queue === undefined || properties.queue);\n var ani = ele.animation(properties, queue ? {\n queue: true\n } : undefined);\n ani.play();\n }\n return this; // chaining\n };\n },\n\n // animate\n\n stop: function stop() {\n return function stopImpl(clearQueue, jumpToEnd) {\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var cy = this._private.cy || this;\n if (!cy.styleEnabled()) {\n return this;\n }\n for (var i = 0; i < all.length; i++) {\n var ele = all[i];\n var _p = ele._private;\n var anis = _p.animation.current;\n for (var j = 0; j < anis.length; j++) {\n var ani = anis[j];\n var ani_p = ani._private;\n if (jumpToEnd) {\n // next iteration of the animation loop, the animation\n // will go straight to the end and be removed\n ani_p.duration = 0;\n }\n }\n\n // clear the queue of future animations\n if (clearQueue) {\n _p.animation.queue = [];\n }\n if (!jumpToEnd) {\n _p.animation.current = [];\n }\n }\n\n // we have to notify (the animation loop doesn't do it for us on `stop`)\n cy.notify('draw');\n return this;\n };\n } // stop\n}; // define\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nvar isArray_1 = isArray;\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray_1(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol_1(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nvar _isKey = isKey;\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject_1(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = _baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nvar isFunction_1 = isFunction;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = _root['__core-js_shared__'];\n\nvar _coreJsData = coreJsData;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nvar _isMasked = isMasked;\n\n/** Used for built-in method references. */\nvar funcProto$1 = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString$1 = funcProto$1.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString$1.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nvar _toSource = toSource;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto$3 = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$3 = objectProto$3.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject_1(value) || _isMasked(value)) {\n return false;\n }\n var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;\n return pattern.test(_toSource(value));\n}\n\nvar _baseIsNative = baseIsNative;\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue$1(object, key) {\n return object == null ? undefined : object[key];\n}\n\nvar _getValue = getValue$1;\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = _getValue(object, key);\n return _baseIsNative(value) ? value : undefined;\n}\n\nvar _getNative = getNative;\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = _getNative(Object, 'create');\n\nvar _nativeCreate = nativeCreate;\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = _nativeCreate ? _nativeCreate(null) : {};\n this.size = 0;\n}\n\nvar _hashClear = hashClear;\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _hashDelete = hashDelete;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED$1 = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto$2 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$2 = objectProto$2.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (_nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED$1 ? undefined : result;\n }\n return hasOwnProperty$2.call(data, key) ? data[key] : undefined;\n}\n\nvar _hashGet = hashGet;\n\n/** Used for built-in method references. */\nvar objectProto$1 = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty$1 = objectProto$1.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);\n}\n\nvar _hashHas = hashHas;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nvar _hashSet = hashSet;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = _hashClear;\nHash.prototype['delete'] = _hashDelete;\nHash.prototype.get = _hashGet;\nHash.prototype.has = _hashHas;\nHash.prototype.set = _hashSet;\n\nvar _Hash = Hash;\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nvar _listCacheClear = listCacheClear;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nvar eq_1 = eq;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq_1(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nvar _assocIndexOf = assocIndexOf;\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nvar _listCacheDelete = listCacheDelete;\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nvar _listCacheGet = listCacheGet;\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return _assocIndexOf(this.__data__, key) > -1;\n}\n\nvar _listCacheHas = listCacheHas;\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = _assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nvar _listCacheSet = listCacheSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = _listCacheClear;\nListCache.prototype['delete'] = _listCacheDelete;\nListCache.prototype.get = _listCacheGet;\nListCache.prototype.has = _listCacheHas;\nListCache.prototype.set = _listCacheSet;\n\nvar _ListCache = ListCache;\n\n/* Built-in method references that are verified to be native. */\nvar Map$1 = _getNative(_root, 'Map');\n\nvar _Map = Map$1;\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n}\n\nvar _mapCacheClear = mapCacheClear;\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nvar _isKeyable = isKeyable;\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return _isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nvar _getMapData = getMapData;\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = _getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nvar _mapCacheDelete = mapCacheDelete;\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return _getMapData(this, key).get(key);\n}\n\nvar _mapCacheGet = mapCacheGet;\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return _getMapData(this, key).has(key);\n}\n\nvar _mapCacheHas = mapCacheHas;\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = _getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nvar _mapCacheSet = mapCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = _mapCacheClear;\nMapCache.prototype['delete'] = _mapCacheDelete;\nMapCache.prototype.get = _mapCacheGet;\nMapCache.prototype.has = _mapCacheHas;\nMapCache.prototype.set = _mapCacheSet;\n\nvar _MapCache = MapCache;\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || _MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = _MapCache;\n\nvar memoize_1 = memoize;\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize_1(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nvar _memoizeCapped = memoizeCapped;\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = _memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nvar _stringToPath = stringToPath;\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nvar _arrayMap = arrayMap;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY$1 = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = _Symbol ? _Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray_1(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return _arrayMap(value, baseToString) + '';\n }\n if (isSymbol_1(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;\n}\n\nvar _baseToString = baseToString;\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString$1(value) {\n return value == null ? '' : _baseToString(value);\n}\n\nvar toString_1 = toString$1;\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray_1(value)) {\n return value;\n }\n return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));\n}\n\nvar _castPath = castPath;\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol_1(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nvar _toKey = toKey;\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = _castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[_toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nvar _baseGet = baseGet;\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : _baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nvar get_1 = get;\n\nvar defineProperty = (function() {\n try {\n var func = _getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nvar _defineProperty = defineProperty;\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && _defineProperty) {\n _defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nvar _baseAssignValue = baseAssignValue;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq_1(objValue, value)) ||\n (value === undefined && !(key in object))) {\n _baseAssignValue(object, key, value);\n }\n}\n\nvar _assignValue = assignValue;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nvar _isIndex = isIndex;\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject_1(object)) {\n return object;\n }\n path = _castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = _toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject_1(objValue)\n ? objValue\n : (_isIndex(path[index + 1]) ? [] : {});\n }\n }\n _assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nvar _baseSet = baseSet;\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : _baseSet(object, path, value);\n}\n\nvar set_1 = set;\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nvar _copyArray = copyArray;\n\n/**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\nfunction toPath(value) {\n if (isArray_1(value)) {\n return _arrayMap(value, _toKey);\n }\n return isSymbol_1(value) ? [value] : _copyArray(_stringToPath(toString_1(value)));\n}\n\nvar toPath_1 = toPath;\n\nvar define$2 = {\n // access data field\n data: function data(params) {\n var defaults = {\n field: 'data',\n bindingEvent: 'data',\n allowBinding: false,\n allowSetting: false,\n allowGetting: false,\n settingEvent: 'data',\n settingTriggersEvent: false,\n triggerFnName: 'trigger',\n immutableKeys: {},\n // key => true if immutable\n updateStyle: false,\n beforeGet: function beforeGet(self) {},\n beforeSet: function beforeSet(self, obj) {},\n onSet: function onSet(self) {},\n canSet: function canSet(self) {\n return true;\n }\n };\n params = extend({}, defaults, params);\n return function dataImpl(name, value) {\n var p = params;\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n var single = selfIsArrayLike ? self[0] : self;\n\n // .data('foo', ...)\n if (string(name)) {\n // set or get property\n var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot \n var path = isPathLike && toPath_1(name);\n\n // .data('foo')\n if (p.allowGetting && value === undefined) {\n // get\n\n var ret;\n if (single) {\n p.beforeGet(single);\n\n // check if it's path and a field with the same name doesn't exist\n if (path && single._private[p.field][name] === undefined) {\n ret = get_1(single._private[p.field], path);\n } else {\n ret = single._private[p.field][name];\n }\n }\n return ret;\n\n // .data('foo', 'bar')\n } else if (p.allowSetting && value !== undefined) {\n // set\n var valid = !p.immutableKeys[name];\n if (valid) {\n var change = _defineProperty$1({}, name, value);\n p.beforeSet(self, change);\n for (var i = 0, l = all.length; i < l; i++) {\n var ele = all[i];\n if (p.canSet(ele)) {\n if (path && single._private[p.field][name] === undefined) {\n set_1(ele._private[p.field], path, value);\n } else {\n ele._private[p.field][name] = value;\n }\n }\n }\n\n // update mappers if asked\n if (p.updateStyle) {\n self.updateStyle();\n }\n\n // call onSet callback\n p.onSet(self);\n if (p.settingTriggersEvent) {\n self[p.triggerFnName](p.settingEvent);\n }\n }\n }\n\n // .data({ 'foo': 'bar' })\n } else if (p.allowSetting && plainObject(name)) {\n // extend\n var obj = name;\n var k, v;\n var keys = Object.keys(obj);\n p.beforeSet(self, obj);\n for (var _i = 0; _i < keys.length; _i++) {\n k = keys[_i];\n v = obj[k];\n var _valid = !p.immutableKeys[k];\n if (_valid) {\n for (var j = 0; j < all.length; j++) {\n var _ele = all[j];\n if (p.canSet(_ele)) {\n _ele._private[p.field][k] = v;\n }\n }\n }\n }\n\n // update mappers if asked\n if (p.updateStyle) {\n self.updateStyle();\n }\n\n // call onSet callback\n p.onSet(self);\n if (p.settingTriggersEvent) {\n self[p.triggerFnName](p.settingEvent);\n }\n\n // .data(function(){ ... })\n } else if (p.allowBinding && fn$6(name)) {\n // bind to event\n var fn = name;\n self.on(p.bindingEvent, fn);\n\n // .data()\n } else if (p.allowGetting && name === undefined) {\n // get whole object\n var _ret;\n if (single) {\n p.beforeGet(single);\n _ret = single._private[p.field];\n }\n return _ret;\n }\n return self; // maintain chainability\n }; // function\n },\n\n // data\n\n // remove data field\n removeData: function removeData(params) {\n var defaults = {\n field: 'data',\n event: 'data',\n triggerFnName: 'trigger',\n triggerEvent: false,\n immutableKeys: {} // key => true if immutable\n };\n\n params = extend({}, defaults, params);\n return function removeDataImpl(names) {\n var p = params;\n var self = this;\n var selfIsArrayLike = self.length !== undefined;\n var all = selfIsArrayLike ? self : [self]; // put in array if not array-like\n\n // .removeData('foo bar')\n if (string(names)) {\n // then get the list of keys, and delete them\n var keys = names.split(/\\s+/);\n var l = keys.length;\n for (var i = 0; i < l; i++) {\n // delete each non-empty key\n var key = keys[i];\n if (emptyString(key)) {\n continue;\n }\n var valid = !p.immutableKeys[key]; // not valid if immutable\n if (valid) {\n for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) {\n all[i_a]._private[p.field][key] = undefined;\n }\n }\n }\n if (p.triggerEvent) {\n self[p.triggerFnName](p.event);\n }\n\n // .removeData()\n } else if (names === undefined) {\n // then delete all keys\n\n for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) {\n var _privateFields = all[_i_a]._private[p.field];\n var _keys = Object.keys(_privateFields);\n for (var _i2 = 0; _i2 < _keys.length; _i2++) {\n var _key = _keys[_i2];\n var validKeyToDelete = !p.immutableKeys[_key];\n if (validKeyToDelete) {\n _privateFields[_key] = undefined;\n }\n }\n }\n if (p.triggerEvent) {\n self[p.triggerFnName](p.event);\n }\n }\n return self; // maintain chaining\n }; // function\n } // removeData\n}; // define\n\nvar define$1 = {\n eventAliasesOn: function eventAliasesOn(proto) {\n var p = proto;\n p.addListener = p.listen = p.bind = p.on;\n p.unlisten = p.unbind = p.off = p.removeListener;\n p.trigger = p.emit;\n\n // this is just a wrapper alias of .on()\n p.pon = p.promiseOn = function (events, selector) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 0);\n return new Promise$1(function (resolve, reject) {\n var callback = function callback(e) {\n self.off.apply(self, offArgs);\n resolve(e);\n };\n var onArgs = args.concat([callback]);\n var offArgs = onArgs.concat([]);\n self.on.apply(self, onArgs);\n });\n };\n }\n}; // define\n\n// use this module to cherry pick functions into your prototype\nvar define = {};\n[define$3, define$2, define$1].forEach(function (m) {\n extend(define, m);\n});\n\nvar elesfn$i = {\n animate: define.animate(),\n animation: define.animation(),\n animated: define.animated(),\n clearQueue: define.clearQueue(),\n delay: define.delay(),\n delayAnimation: define.delayAnimation(),\n stop: define.stop()\n};\n\nvar elesfn$h = {\n classes: function classes(_classes) {\n var self = this;\n if (_classes === undefined) {\n var ret = [];\n self[0]._private.classes.forEach(function (cls) {\n return ret.push(cls);\n });\n return ret;\n } else if (!array(_classes)) {\n // extract classes from string\n _classes = (_classes || '').match(/\\S+/g) || [];\n }\n var changed = [];\n var classesSet = new Set$1(_classes);\n\n // check and update each ele\n for (var j = 0; j < self.length; j++) {\n var ele = self[j];\n var _p = ele._private;\n var eleClasses = _p.classes;\n var changedEle = false;\n\n // check if ele has all of the passed classes\n for (var i = 0; i < _classes.length; i++) {\n var cls = _classes[i];\n var eleHasClass = eleClasses.has(cls);\n if (!eleHasClass) {\n changedEle = true;\n break;\n }\n }\n\n // check if ele has classes outside of those passed\n if (!changedEle) {\n changedEle = eleClasses.size !== _classes.length;\n }\n if (changedEle) {\n _p.classes = classesSet;\n changed.push(ele);\n }\n }\n\n // trigger update style on those eles that had class changes\n if (changed.length > 0) {\n this.spawn(changed).updateStyle().emit('class');\n }\n return self;\n },\n addClass: function addClass(classes) {\n return this.toggleClass(classes, true);\n },\n hasClass: function hasClass(className) {\n var ele = this[0];\n return ele != null && ele._private.classes.has(className);\n },\n toggleClass: function toggleClass(classes, toggle) {\n if (!array(classes)) {\n // extract classes from string\n classes = classes.match(/\\S+/g) || [];\n }\n var self = this;\n var toggleUndefd = toggle === undefined;\n var changed = []; // eles who had classes changed\n\n for (var i = 0, il = self.length; i < il; i++) {\n var ele = self[i];\n var eleClasses = ele._private.classes;\n var changedEle = false;\n for (var j = 0; j < classes.length; j++) {\n var cls = classes[j];\n var hasClass = eleClasses.has(cls);\n var changedNow = false;\n if (toggle || toggleUndefd && !hasClass) {\n eleClasses.add(cls);\n changedNow = true;\n } else if (!toggle || toggleUndefd && hasClass) {\n eleClasses[\"delete\"](cls);\n changedNow = true;\n }\n if (!changedEle && changedNow) {\n changed.push(ele);\n changedEle = true;\n }\n } // for j classes\n } // for i eles\n\n // trigger update style on those eles that had class changes\n if (changed.length > 0) {\n this.spawn(changed).updateStyle().emit('class');\n }\n return self;\n },\n removeClass: function removeClass(classes) {\n return this.toggleClass(classes, false);\n },\n flashClass: function flashClass(classes, duration) {\n var self = this;\n if (duration == null) {\n duration = 250;\n } else if (duration === 0) {\n return self; // nothing to do really\n }\n\n self.addClass(classes);\n setTimeout(function () {\n self.removeClass(classes);\n }, duration);\n return self;\n }\n};\nelesfn$h.className = elesfn$h.classNames = elesfn$h.classes;\n\n// tokens in the query language\nvar tokens = {\n metaChar: '[\\\\!\\\\\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\.\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\]\\\\^\\\\`\\\\{\\\\|\\\\}\\\\~]',\n // chars we need to escape in let names, etc\n comparatorOp: '=|\\\\!=|>|>=|<|<=|\\\\$=|\\\\^=|\\\\*=',\n // binary comparison op (used in data selectors)\n boolOp: '\\\\?|\\\\!|\\\\^',\n // boolean (unary) operators (used in data selectors)\n string: '\"(?:\\\\\\\\\"|[^\"])*\"' + '|' + \"'(?:\\\\\\\\'|[^'])*'\",\n // string literals (used in data selectors) -- doublequotes | singlequotes\n number: number,\n // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123\n meta: 'degree|indegree|outdegree',\n // allowed metadata fields (i.e. allowed functions to use from Collection)\n separator: '\\\\s*,\\\\s*',\n // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass\n descendant: '\\\\s+',\n child: '\\\\s+>\\\\s+',\n subject: '\\\\$',\n group: 'node|edge|\\\\*',\n directedEdge: '\\\\s+->\\\\s+',\n undirectedEdge: '\\\\s+<->\\\\s+'\n};\ntokens.variable = '(?:[\\\\w-.]|(?:\\\\\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods\ntokens.className = '(?:[\\\\w-]|(?:\\\\\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name\ntokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number\ntokens.id = tokens.variable; // an element id (follows variable conventions)\n\n(function () {\n var ops, op, i;\n\n // add @ variants to comparatorOp\n ops = tokens.comparatorOp.split('|');\n for (i = 0; i < ops.length; i++) {\n op = ops[i];\n tokens.comparatorOp += '|@' + op;\n }\n\n // add ! variants to comparatorOp\n ops = tokens.comparatorOp.split('|');\n for (i = 0; i < ops.length; i++) {\n op = ops[i];\n if (op.indexOf('!') >= 0) {\n continue;\n } // skip ops that explicitly contain !\n if (op === '=') {\n continue;\n } // skip = b/c != is explicitly defined\n\n tokens.comparatorOp += '|\\\\!' + op;\n }\n})();\n\n/**\n * Make a new query object\n *\n * @prop type {Type} The type enum (int) of the query\n * @prop checks List of checks to make against an ele to test for a match\n */\nvar newQuery = function newQuery() {\n return {\n checks: []\n };\n};\n\n/**\n * A check type enum-like object. Uses integer values for fast match() lookup.\n * The ordering does not matter as long as the ints are unique.\n */\nvar Type = {\n /** E.g. node */\n GROUP: 0,\n /** A collection of elements */\n COLLECTION: 1,\n /** A filter(ele) function */\n FILTER: 2,\n /** E.g. [foo > 1] */\n DATA_COMPARE: 3,\n /** E.g. [foo] */\n DATA_EXIST: 4,\n /** E.g. [?foo] */\n DATA_BOOL: 5,\n /** E.g. [[degree > 2]] */\n META_COMPARE: 6,\n /** E.g. :selected */\n STATE: 7,\n /** E.g. #foo */\n ID: 8,\n /** E.g. .foo */\n CLASS: 9,\n /** E.g. #foo <-> #bar */\n UNDIRECTED_EDGE: 10,\n /** E.g. #foo -> #bar */\n DIRECTED_EDGE: 11,\n /** E.g. $#foo -> #bar */\n NODE_SOURCE: 12,\n /** E.g. #foo -> $#bar */\n NODE_TARGET: 13,\n /** E.g. $#foo <-> #bar */\n NODE_NEIGHBOR: 14,\n /** E.g. #foo > #bar */\n CHILD: 15,\n /** E.g. #foo #bar */\n DESCENDANT: 16,\n /** E.g. $#foo > #bar */\n PARENT: 17,\n /** E.g. $#foo #bar */\n ANCESTOR: 18,\n /** E.g. #foo > $bar > #baz */\n COMPOUND_SPLIT: 19,\n /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */\n TRUE: 20\n};\n\nvar stateSelectors = [{\n selector: ':selected',\n matches: function matches(ele) {\n return ele.selected();\n }\n}, {\n selector: ':unselected',\n matches: function matches(ele) {\n return !ele.selected();\n }\n}, {\n selector: ':selectable',\n matches: function matches(ele) {\n return ele.selectable();\n }\n}, {\n selector: ':unselectable',\n matches: function matches(ele) {\n return !ele.selectable();\n }\n}, {\n selector: ':locked',\n matches: function matches(ele) {\n return ele.locked();\n }\n}, {\n selector: ':unlocked',\n matches: function matches(ele) {\n return !ele.locked();\n }\n}, {\n selector: ':visible',\n matches: function matches(ele) {\n return ele.visible();\n }\n}, {\n selector: ':hidden',\n matches: function matches(ele) {\n return !ele.visible();\n }\n}, {\n selector: ':transparent',\n matches: function matches(ele) {\n return ele.transparent();\n }\n}, {\n selector: ':grabbed',\n matches: function matches(ele) {\n return ele.grabbed();\n }\n}, {\n selector: ':free',\n matches: function matches(ele) {\n return !ele.grabbed();\n }\n}, {\n selector: ':removed',\n matches: function matches(ele) {\n return ele.removed();\n }\n}, {\n selector: ':inside',\n matches: function matches(ele) {\n return !ele.removed();\n }\n}, {\n selector: ':grabbable',\n matches: function matches(ele) {\n return ele.grabbable();\n }\n}, {\n selector: ':ungrabbable',\n matches: function matches(ele) {\n return !ele.grabbable();\n }\n}, {\n selector: ':animated',\n matches: function matches(ele) {\n return ele.animated();\n }\n}, {\n selector: ':unanimated',\n matches: function matches(ele) {\n return !ele.animated();\n }\n}, {\n selector: ':parent',\n matches: function matches(ele) {\n return ele.isParent();\n }\n}, {\n selector: ':childless',\n matches: function matches(ele) {\n return ele.isChildless();\n }\n}, {\n selector: ':child',\n matches: function matches(ele) {\n return ele.isChild();\n }\n}, {\n selector: ':orphan',\n matches: function matches(ele) {\n return ele.isOrphan();\n }\n}, {\n selector: ':nonorphan',\n matches: function matches(ele) {\n return ele.isChild();\n }\n}, {\n selector: ':compound',\n matches: function matches(ele) {\n if (ele.isNode()) {\n return ele.isParent();\n } else {\n return ele.source().isParent() || ele.target().isParent();\n }\n }\n}, {\n selector: ':loop',\n matches: function matches(ele) {\n return ele.isLoop();\n }\n}, {\n selector: ':simple',\n matches: function matches(ele) {\n return ele.isSimple();\n }\n}, {\n selector: ':active',\n matches: function matches(ele) {\n return ele.active();\n }\n}, {\n selector: ':inactive',\n matches: function matches(ele) {\n return !ele.active();\n }\n}, {\n selector: ':backgrounding',\n matches: function matches(ele) {\n return ele.backgrounding();\n }\n}, {\n selector: ':nonbackgrounding',\n matches: function matches(ele) {\n return !ele.backgrounding();\n }\n}].sort(function (a, b) {\n // n.b. selectors that are starting substrings of others must have the longer ones first\n return descending(a.selector, b.selector);\n});\nvar lookup = function () {\n var selToFn = {};\n var s;\n for (var i = 0; i < stateSelectors.length; i++) {\n s = stateSelectors[i];\n selToFn[s.selector] = s.matches;\n }\n return selToFn;\n}();\nvar stateSelectorMatches = function stateSelectorMatches(sel, ele) {\n return lookup[sel](ele);\n};\nvar stateSelectorRegex = '(' + stateSelectors.map(function (s) {\n return s.selector;\n}).join('|') + ')';\n\n// when a token like a variable has escaped meta characters, we need to clean the backslashes out\n// so that values get compared properly in Selector.filter()\nvar cleanMetaChars = function cleanMetaChars(str) {\n return str.replace(new RegExp('\\\\\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) {\n return $1;\n });\n};\nvar replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) {\n selector[selector.length - 1] = replacementQuery;\n};\n\n// NOTE: add new expression syntax here to have it recognised by the parser;\n// - a query contains all adjacent (i.e. no separator in between) expressions;\n// - the current query is stored in selector[i]\n// - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward\nvar exprs = [{\n name: 'group',\n // just used for identifying when debugging\n query: true,\n regex: '(' + tokens.group + ')',\n populate: function populate(selector, query, _ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n group = _ref2[0];\n query.checks.push({\n type: Type.GROUP,\n value: group === '*' ? group : group + 's'\n });\n }\n}, {\n name: 'state',\n query: true,\n regex: stateSelectorRegex,\n populate: function populate(selector, query, _ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n state = _ref4[0];\n query.checks.push({\n type: Type.STATE,\n value: state\n });\n }\n}, {\n name: 'id',\n query: true,\n regex: '\\\\#(' + tokens.id + ')',\n populate: function populate(selector, query, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 1),\n id = _ref6[0];\n query.checks.push({\n type: Type.ID,\n value: cleanMetaChars(id)\n });\n }\n}, {\n name: 'className',\n query: true,\n regex: '\\\\.(' + tokens.className + ')',\n populate: function populate(selector, query, _ref7) {\n var _ref8 = _slicedToArray(_ref7, 1),\n className = _ref8[0];\n query.checks.push({\n type: Type.CLASS,\n value: cleanMetaChars(className)\n });\n }\n}, {\n name: 'dataExists',\n query: true,\n regex: '\\\\[\\\\s*(' + tokens.variable + ')\\\\s*\\\\]',\n populate: function populate(selector, query, _ref9) {\n var _ref10 = _slicedToArray(_ref9, 1),\n variable = _ref10[0];\n query.checks.push({\n type: Type.DATA_EXIST,\n field: cleanMetaChars(variable)\n });\n }\n}, {\n name: 'dataCompare',\n query: true,\n regex: '\\\\[\\\\s*(' + tokens.variable + ')\\\\s*(' + tokens.comparatorOp + ')\\\\s*(' + tokens.value + ')\\\\s*\\\\]',\n populate: function populate(selector, query, _ref11) {\n var _ref12 = _slicedToArray(_ref11, 3),\n variable = _ref12[0],\n comparatorOp = _ref12[1],\n value = _ref12[2];\n var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null;\n if (valueIsString) {\n value = value.substring(1, value.length - 1);\n } else {\n value = parseFloat(value);\n }\n query.checks.push({\n type: Type.DATA_COMPARE,\n field: cleanMetaChars(variable),\n operator: comparatorOp,\n value: value\n });\n }\n}, {\n name: 'dataBool',\n query: true,\n regex: '\\\\[\\\\s*(' + tokens.boolOp + ')\\\\s*(' + tokens.variable + ')\\\\s*\\\\]',\n populate: function populate(selector, query, _ref13) {\n var _ref14 = _slicedToArray(_ref13, 2),\n boolOp = _ref14[0],\n variable = _ref14[1];\n query.checks.push({\n type: Type.DATA_BOOL,\n field: cleanMetaChars(variable),\n operator: boolOp\n });\n }\n}, {\n name: 'metaCompare',\n query: true,\n regex: '\\\\[\\\\[\\\\s*(' + tokens.meta + ')\\\\s*(' + tokens.comparatorOp + ')\\\\s*(' + tokens.number + ')\\\\s*\\\\]\\\\]',\n populate: function populate(selector, query, _ref15) {\n var _ref16 = _slicedToArray(_ref15, 3),\n meta = _ref16[0],\n comparatorOp = _ref16[1],\n number = _ref16[2];\n query.checks.push({\n type: Type.META_COMPARE,\n field: cleanMetaChars(meta),\n operator: comparatorOp,\n value: parseFloat(number)\n });\n }\n}, {\n name: 'nextQuery',\n separator: true,\n regex: tokens.separator,\n populate: function populate(selector, query) {\n var currentSubject = selector.currentSubject;\n var edgeCount = selector.edgeCount;\n var compoundCount = selector.compoundCount;\n var lastQ = selector[selector.length - 1];\n if (currentSubject != null) {\n lastQ.subject = currentSubject;\n selector.currentSubject = null;\n }\n lastQ.edgeCount = edgeCount;\n lastQ.compoundCount = compoundCount;\n selector.edgeCount = 0;\n selector.compoundCount = 0;\n\n // go on to next query\n var nextQuery = selector[selector.length++] = newQuery();\n return nextQuery; // this is the new query to be filled by the following exprs\n }\n}, {\n name: 'directedEdge',\n separator: true,\n regex: tokens.directedEdge,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // undirected edge\n var edgeQuery = newQuery();\n var source = query;\n var target = newQuery();\n edgeQuery.checks.push({\n type: Type.DIRECTED_EDGE,\n source: source,\n target: target\n });\n\n // the query in the selector should be the edge rather than the source\n replaceLastQuery(selector, query, edgeQuery);\n selector.edgeCount++;\n\n // we're now populating the target query with expressions that follow\n return target;\n } else {\n // source/target\n var srcTgtQ = newQuery();\n var _source = query;\n var _target = newQuery();\n srcTgtQ.checks.push({\n type: Type.NODE_SOURCE,\n source: _source,\n target: _target\n });\n\n // the query in the selector should be the neighbourhood rather than the node\n replaceLastQuery(selector, query, srcTgtQ);\n selector.edgeCount++;\n return _target; // now populating the target with the following expressions\n }\n }\n}, {\n name: 'undirectedEdge',\n separator: true,\n regex: tokens.undirectedEdge,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // undirected edge\n var edgeQuery = newQuery();\n var source = query;\n var target = newQuery();\n edgeQuery.checks.push({\n type: Type.UNDIRECTED_EDGE,\n nodes: [source, target]\n });\n\n // the query in the selector should be the edge rather than the source\n replaceLastQuery(selector, query, edgeQuery);\n selector.edgeCount++;\n\n // we're now populating the target query with expressions that follow\n return target;\n } else {\n // neighbourhood\n var nhoodQ = newQuery();\n var node = query;\n var neighbor = newQuery();\n nhoodQ.checks.push({\n type: Type.NODE_NEIGHBOR,\n node: node,\n neighbor: neighbor\n });\n\n // the query in the selector should be the neighbourhood rather than the node\n replaceLastQuery(selector, query, nhoodQ);\n return neighbor; // now populating the neighbor with following expressions\n }\n }\n}, {\n name: 'child',\n separator: true,\n regex: tokens.child,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // default: child query\n var parentChildQuery = newQuery();\n var child = newQuery();\n var parent = selector[selector.length - 1];\n parentChildQuery.checks.push({\n type: Type.CHILD,\n parent: parent,\n child: child\n });\n\n // the query in the selector should be the '>' itself\n replaceLastQuery(selector, query, parentChildQuery);\n selector.compoundCount++;\n\n // we're now populating the child query with expressions that follow\n return child;\n } else if (selector.currentSubject === query) {\n // compound split query\n var compound = newQuery();\n var left = selector[selector.length - 1];\n var right = newQuery();\n var subject = newQuery();\n var _child = newQuery();\n var _parent = newQuery();\n\n // set up the root compound q\n compound.checks.push({\n type: Type.COMPOUND_SPLIT,\n left: left,\n right: right,\n subject: subject\n });\n\n // populate the subject and replace the q at the old spot (within left) with TRUE\n subject.checks = query.checks; // take the checks from the left\n query.checks = [{\n type: Type.TRUE\n }]; // checks under left refs the subject implicitly\n\n // set up the right q\n _parent.checks.push({\n type: Type.TRUE\n }); // parent implicitly refs the subject\n right.checks.push({\n type: Type.PARENT,\n // type is swapped on right side queries\n parent: _parent,\n child: _child // empty for now\n });\n\n replaceLastQuery(selector, left, compound);\n\n // update the ref since we moved things around for `query`\n selector.currentSubject = subject;\n selector.compoundCount++;\n return _child; // now populating the right side's child\n } else {\n // parent query\n // info for parent query\n var _parent2 = newQuery();\n var _child2 = newQuery();\n var pcQChecks = [{\n type: Type.PARENT,\n parent: _parent2,\n child: _child2\n }];\n\n // the parent-child query takes the place of the query previously being populated\n _parent2.checks = query.checks; // the previous query contains the checks for the parent\n query.checks = pcQChecks; // pc query takes over\n\n selector.compoundCount++;\n return _child2; // we're now populating the child\n }\n }\n}, {\n name: 'descendant',\n separator: true,\n regex: tokens.descendant,\n populate: function populate(selector, query) {\n if (selector.currentSubject == null) {\n // default: descendant query\n var ancChQuery = newQuery();\n var descendant = newQuery();\n var ancestor = selector[selector.length - 1];\n ancChQuery.checks.push({\n type: Type.DESCENDANT,\n ancestor: ancestor,\n descendant: descendant\n });\n\n // the query in the selector should be the '>' itself\n replaceLastQuery(selector, query, ancChQuery);\n selector.compoundCount++;\n\n // we're now populating the descendant query with expressions that follow\n return descendant;\n } else if (selector.currentSubject === query) {\n // compound split query\n var compound = newQuery();\n var left = selector[selector.length - 1];\n var right = newQuery();\n var subject = newQuery();\n var _descendant = newQuery();\n var _ancestor = newQuery();\n\n // set up the root compound q\n compound.checks.push({\n type: Type.COMPOUND_SPLIT,\n left: left,\n right: right,\n subject: subject\n });\n\n // populate the subject and replace the q at the old spot (within left) with TRUE\n subject.checks = query.checks; // take the checks from the left\n query.checks = [{\n type: Type.TRUE\n }]; // checks under left refs the subject implicitly\n\n // set up the right q\n _ancestor.checks.push({\n type: Type.TRUE\n }); // ancestor implicitly refs the subject\n right.checks.push({\n type: Type.ANCESTOR,\n // type is swapped on right side queries\n ancestor: _ancestor,\n descendant: _descendant // empty for now\n });\n\n replaceLastQuery(selector, left, compound);\n\n // update the ref since we moved things around for `query`\n selector.currentSubject = subject;\n selector.compoundCount++;\n return _descendant; // now populating the right side's descendant\n } else {\n // ancestor query\n // info for parent query\n var _ancestor2 = newQuery();\n var _descendant2 = newQuery();\n var adQChecks = [{\n type: Type.ANCESTOR,\n ancestor: _ancestor2,\n descendant: _descendant2\n }];\n\n // the parent-child query takes the place of the query previously being populated\n _ancestor2.checks = query.checks; // the previous query contains the checks for the parent\n query.checks = adQChecks; // pc query takes over\n\n selector.compoundCount++;\n return _descendant2; // we're now populating the child\n }\n }\n}, {\n name: 'subject',\n modifier: true,\n regex: tokens.subject,\n populate: function populate(selector, query) {\n if (selector.currentSubject != null && selector.currentSubject !== query) {\n warn('Redefinition of subject in selector `' + selector.toString() + '`');\n return false;\n }\n selector.currentSubject = query;\n var topQ = selector[selector.length - 1];\n var topChk = topQ.checks[0];\n var topType = topChk == null ? null : topChk.type;\n if (topType === Type.DIRECTED_EDGE) {\n // directed edge with subject on the target\n\n // change to target node check\n topChk.type = Type.NODE_TARGET;\n } else if (topType === Type.UNDIRECTED_EDGE) {\n // undirected edge with subject on the second node\n\n // change to neighbor check\n topChk.type = Type.NODE_NEIGHBOR;\n topChk.node = topChk.nodes[1]; // second node is subject\n topChk.neighbor = topChk.nodes[0];\n\n // clean up unused fields for new type\n topChk.nodes = null;\n }\n }\n}];\nexprs.forEach(function (e) {\n return e.regexObj = new RegExp('^' + e.regex);\n});\n\n/**\n * Of all the expressions, find the first match in the remaining text.\n * @param {string} remaining The remaining text to parse\n * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }`\n */\nvar consumeExpr = function consumeExpr(remaining) {\n var expr;\n var match;\n var name;\n for (var j = 0; j < exprs.length; j++) {\n var e = exprs[j];\n var n = e.name;\n var m = remaining.match(e.regexObj);\n if (m != null) {\n match = m;\n expr = e;\n name = n;\n var consumed = m[0];\n remaining = remaining.substring(consumed.length);\n break; // we've consumed one expr, so we can return now\n }\n }\n\n return {\n expr: expr,\n match: match,\n name: name,\n remaining: remaining\n };\n};\n\n/**\n * Consume all the leading whitespace\n * @param {string} remaining The text to consume\n * @returns The text with the leading whitespace removed\n */\nvar consumeWhitespace = function consumeWhitespace(remaining) {\n var match = remaining.match(/^\\s+/);\n if (match) {\n var consumed = match[0];\n remaining = remaining.substring(consumed.length);\n }\n return remaining;\n};\n\n/**\n * Parse the string and store the parsed representation in the Selector.\n * @param {string} selector The selector string\n * @returns `true` if the selector was successfully parsed, `false` otherwise\n */\nvar parse = function parse(selector) {\n var self = this;\n var remaining = self.inputText = selector;\n var currentQuery = self[0] = newQuery();\n self.length = 1;\n remaining = consumeWhitespace(remaining); // get rid of leading whitespace\n\n for (;;) {\n var exprInfo = consumeExpr(remaining);\n if (exprInfo.expr == null) {\n warn('The selector `' + selector + '`is invalid');\n return false;\n } else {\n var args = exprInfo.match.slice(1);\n\n // let the token populate the selector object in currentQuery\n var ret = exprInfo.expr.populate(self, currentQuery, args);\n if (ret === false) {\n return false; // exit if population failed\n } else if (ret != null) {\n currentQuery = ret; // change the current query to be filled if the expr specifies\n }\n }\n\n remaining = exprInfo.remaining;\n\n // we're done when there's nothing left to parse\n if (remaining.match(/^\\s*$/)) {\n break;\n }\n }\n var lastQ = self[self.length - 1];\n if (self.currentSubject != null) {\n lastQ.subject = self.currentSubject;\n }\n lastQ.edgeCount = self.edgeCount;\n lastQ.compoundCount = self.compoundCount;\n for (var i = 0; i < self.length; i++) {\n var q = self[i];\n\n // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations\n if (q.compoundCount > 0 && q.edgeCount > 0) {\n warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector');\n return false;\n }\n if (q.edgeCount > 1) {\n warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors');\n return false;\n } else if (q.edgeCount === 1) {\n warn('The selector `' + selector + '` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.');\n }\n }\n return true; // success\n};\n\n/**\n * Get the selector represented as a string. This value uses default formatting,\n * so things like spacing may differ from the input text passed to the constructor.\n * @returns {string} The selector string\n */\nvar toString = function toString() {\n if (this.toStringCache != null) {\n return this.toStringCache;\n }\n var clean = function clean(obj) {\n if (obj == null) {\n return '';\n } else {\n return obj;\n }\n };\n var cleanVal = function cleanVal(val) {\n if (string(val)) {\n return '\"' + val + '\"';\n } else {\n return clean(val);\n }\n };\n var space = function space(val) {\n return ' ' + val + ' ';\n };\n var checkToString = function checkToString(check, subject) {\n var type = check.type,\n value = check.value;\n switch (type) {\n case Type.GROUP:\n {\n var group = clean(value);\n return group.substring(0, group.length - 1);\n }\n case Type.DATA_COMPARE:\n {\n var field = check.field,\n operator = check.operator;\n return '[' + field + space(clean(operator)) + cleanVal(value) + ']';\n }\n case Type.DATA_BOOL:\n {\n var _operator = check.operator,\n _field = check.field;\n return '[' + clean(_operator) + _field + ']';\n }\n case Type.DATA_EXIST:\n {\n var _field2 = check.field;\n return '[' + _field2 + ']';\n }\n case Type.META_COMPARE:\n {\n var _operator2 = check.operator,\n _field3 = check.field;\n return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]';\n }\n case Type.STATE:\n {\n return value;\n }\n case Type.ID:\n {\n return '#' + value;\n }\n case Type.CLASS:\n {\n return '.' + value;\n }\n case Type.PARENT:\n case Type.CHILD:\n {\n return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject);\n }\n case Type.ANCESTOR:\n case Type.DESCENDANT:\n {\n return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject);\n }\n case Type.COMPOUND_SPLIT:\n {\n var lhs = queryToString(check.left, subject);\n var sub = queryToString(check.subject, subject);\n var rhs = queryToString(check.right, subject);\n return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs;\n }\n case Type.TRUE:\n {\n return '';\n }\n }\n };\n var queryToString = function queryToString(query, subject) {\n return query.checks.reduce(function (str, chk, i) {\n return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject);\n }, '');\n };\n var str = '';\n for (var i = 0; i < this.length; i++) {\n var query = this[i];\n str += queryToString(query, query.subject);\n if (this.length > 1 && i < this.length - 1) {\n str += ', ';\n }\n }\n this.toStringCache = str;\n return str;\n};\nvar parse$1 = {\n parse: parse,\n toString: toString\n};\n\nvar valCmp = function valCmp(fieldVal, operator, value) {\n var matches;\n var isFieldStr = string(fieldVal);\n var isFieldNum = number$1(fieldVal);\n var isValStr = string(value);\n var fieldStr, valStr;\n var caseInsensitive = false;\n var notExpr = false;\n var isIneqCmp = false;\n if (operator.indexOf('!') >= 0) {\n operator = operator.replace('!', '');\n notExpr = true;\n }\n if (operator.indexOf('@') >= 0) {\n operator = operator.replace('@', '');\n caseInsensitive = true;\n }\n if (isFieldStr || isValStr || caseInsensitive) {\n fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal;\n valStr = '' + value;\n }\n\n // if we're doing a case insensitive comparison, then we're using a STRING comparison\n // even if we're comparing numbers\n if (caseInsensitive) {\n fieldVal = fieldStr = fieldStr.toLowerCase();\n value = valStr = valStr.toLowerCase();\n }\n switch (operator) {\n case '*=':\n matches = fieldStr.indexOf(valStr) >= 0;\n break;\n case '$=':\n matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0;\n break;\n case '^=':\n matches = fieldStr.indexOf(valStr) === 0;\n break;\n case '=':\n matches = fieldVal === value;\n break;\n case '>':\n isIneqCmp = true;\n matches = fieldVal > value;\n break;\n case '>=':\n isIneqCmp = true;\n matches = fieldVal >= value;\n break;\n case '<':\n isIneqCmp = true;\n matches = fieldVal < value;\n break;\n case '<=':\n isIneqCmp = true;\n matches = fieldVal <= value;\n break;\n default:\n matches = false;\n break;\n }\n\n // apply the not op, but null vals for inequalities should always stay non-matching\n if (notExpr && (fieldVal != null || !isIneqCmp)) {\n matches = !matches;\n }\n return matches;\n};\nvar boolCmp = function boolCmp(fieldVal, operator) {\n switch (operator) {\n case '?':\n return fieldVal ? true : false;\n case '!':\n return fieldVal ? false : true;\n case '^':\n return fieldVal === undefined;\n }\n};\nvar existCmp = function existCmp(fieldVal) {\n return fieldVal !== undefined;\n};\nvar data$1 = function data(ele, field) {\n return ele.data(field);\n};\nvar meta = function meta(ele, field) {\n return ele[field]();\n};\n\n/** A lookup of `match(check, ele)` functions by `Type` int */\nvar match = [];\n\n/**\n * Returns whether the query matches for the element\n * @param query The `{ type, value, ... }` query object\n * @param ele The element to compare against\n*/\nvar matches$1 = function matches(query, ele) {\n return query.checks.every(function (chk) {\n return match[chk.type](chk, ele);\n });\n};\nmatch[Type.GROUP] = function (check, ele) {\n var group = check.value;\n return group === '*' || group === ele.group();\n};\nmatch[Type.STATE] = function (check, ele) {\n var stateSelector = check.value;\n return stateSelectorMatches(stateSelector, ele);\n};\nmatch[Type.ID] = function (check, ele) {\n var id = check.value;\n return ele.id() === id;\n};\nmatch[Type.CLASS] = function (check, ele) {\n var cls = check.value;\n return ele.hasClass(cls);\n};\nmatch[Type.META_COMPARE] = function (check, ele) {\n var field = check.field,\n operator = check.operator,\n value = check.value;\n return valCmp(meta(ele, field), operator, value);\n};\nmatch[Type.DATA_COMPARE] = function (check, ele) {\n var field = check.field,\n operator = check.operator,\n value = check.value;\n return valCmp(data$1(ele, field), operator, value);\n};\nmatch[Type.DATA_BOOL] = function (check, ele) {\n var field = check.field,\n operator = check.operator;\n return boolCmp(data$1(ele, field), operator);\n};\nmatch[Type.DATA_EXIST] = function (check, ele) {\n var field = check.field;\n check.operator;\n return existCmp(data$1(ele, field));\n};\nmatch[Type.UNDIRECTED_EDGE] = function (check, ele) {\n var qA = check.nodes[0];\n var qB = check.nodes[1];\n var src = ele.source();\n var tgt = ele.target();\n return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt);\n};\nmatch[Type.NODE_NEIGHBOR] = function (check, ele) {\n return matches$1(check.node, ele) && ele.neighborhood().some(function (n) {\n return n.isNode() && matches$1(check.neighbor, n);\n });\n};\nmatch[Type.DIRECTED_EDGE] = function (check, ele) {\n return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target());\n};\nmatch[Type.NODE_SOURCE] = function (check, ele) {\n return matches$1(check.source, ele) && ele.outgoers().some(function (n) {\n return n.isNode() && matches$1(check.target, n);\n });\n};\nmatch[Type.NODE_TARGET] = function (check, ele) {\n return matches$1(check.target, ele) && ele.incomers().some(function (n) {\n return n.isNode() && matches$1(check.source, n);\n });\n};\nmatch[Type.CHILD] = function (check, ele) {\n return matches$1(check.child, ele) && matches$1(check.parent, ele.parent());\n};\nmatch[Type.PARENT] = function (check, ele) {\n return matches$1(check.parent, ele) && ele.children().some(function (c) {\n return matches$1(check.child, c);\n });\n};\nmatch[Type.DESCENDANT] = function (check, ele) {\n return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) {\n return matches$1(check.ancestor, a);\n });\n};\nmatch[Type.ANCESTOR] = function (check, ele) {\n return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) {\n return matches$1(check.descendant, d);\n });\n};\nmatch[Type.COMPOUND_SPLIT] = function (check, ele) {\n return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele);\n};\nmatch[Type.TRUE] = function () {\n return true;\n};\nmatch[Type.COLLECTION] = function (check, ele) {\n var collection = check.value;\n return collection.has(ele);\n};\nmatch[Type.FILTER] = function (check, ele) {\n var filter = check.value;\n return filter(ele);\n};\n\n// filter an existing collection\nvar filter = function filter(collection) {\n var self = this;\n\n // for 1 id #foo queries, just get the element\n if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) {\n return collection.getElementById(self[0].checks[0].value).collection();\n }\n var selectorFunction = function selectorFunction(element) {\n for (var j = 0; j < self.length; j++) {\n var query = self[j];\n if (matches$1(query, element)) {\n return true;\n }\n }\n return false;\n };\n if (self.text() == null) {\n selectorFunction = function selectorFunction() {\n return true;\n };\n }\n return collection.filter(selectorFunction);\n}; // filter\n\n// does selector match a single element?\nvar matches = function matches(ele) {\n var self = this;\n for (var j = 0; j < self.length; j++) {\n var query = self[j];\n if (matches$1(query, ele)) {\n return true;\n }\n }\n return false;\n}; // matches\n\nvar matching = {\n matches: matches,\n filter: filter\n};\n\nvar Selector = function Selector(selector) {\n this.inputText = selector;\n this.currentSubject = null;\n this.compoundCount = 0;\n this.edgeCount = 0;\n this.length = 0;\n if (selector == null || string(selector) && selector.match(/^\\s*$/)) ; else if (elementOrCollection(selector)) {\n this.addQuery({\n checks: [{\n type: Type.COLLECTION,\n value: selector.collection()\n }]\n });\n } else if (fn$6(selector)) {\n this.addQuery({\n checks: [{\n type: Type.FILTER,\n value: selector\n }]\n });\n } else if (string(selector)) {\n if (!this.parse(selector)) {\n this.invalid = true;\n }\n } else {\n error('A selector must be created from a string; found ');\n }\n};\nvar selfn = Selector.prototype;\n[parse$1, matching].forEach(function (p) {\n return extend(selfn, p);\n});\nselfn.text = function () {\n return this.inputText;\n};\nselfn.size = function () {\n return this.length;\n};\nselfn.eq = function (i) {\n return this[i];\n};\nselfn.sameText = function (otherSel) {\n return !this.invalid && !otherSel.invalid && this.text() === otherSel.text();\n};\nselfn.addQuery = function (q) {\n this[this.length++] = q;\n};\nselfn.selector = selfn.toString;\n\nvar elesfn$g = {\n allAre: function allAre(selector) {\n var selObj = new Selector(selector);\n return this.every(function (ele) {\n return selObj.matches(ele);\n });\n },\n is: function is(selector) {\n var selObj = new Selector(selector);\n return this.some(function (ele) {\n return selObj.matches(ele);\n });\n },\n some: function some(fn, thisArg) {\n for (var i = 0; i < this.length; i++) {\n var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]);\n if (ret) {\n return true;\n }\n }\n return false;\n },\n every: function every(fn, thisArg) {\n for (var i = 0; i < this.length; i++) {\n var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]);\n if (!ret) {\n return false;\n }\n }\n return true;\n },\n same: function same(collection) {\n // cheap collection ref check\n if (this === collection) {\n return true;\n }\n collection = this.cy().collection(collection);\n var thisLength = this.length;\n var collectionLength = collection.length;\n\n // cheap length check\n if (thisLength !== collectionLength) {\n return false;\n }\n\n // cheap element ref check\n if (thisLength === 1) {\n return this[0] === collection[0];\n }\n return this.every(function (ele) {\n return collection.hasElementWithId(ele.id());\n });\n },\n anySame: function anySame(collection) {\n collection = this.cy().collection(collection);\n return this.some(function (ele) {\n return collection.hasElementWithId(ele.id());\n });\n },\n allAreNeighbors: function allAreNeighbors(collection) {\n collection = this.cy().collection(collection);\n var nhood = this.neighborhood();\n return collection.every(function (ele) {\n return nhood.hasElementWithId(ele.id());\n });\n },\n contains: function contains(collection) {\n collection = this.cy().collection(collection);\n var self = this;\n return collection.every(function (ele) {\n return self.hasElementWithId(ele.id());\n });\n }\n};\nelesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors;\nelesfn$g.has = elesfn$g.contains;\nelesfn$g.equal = elesfn$g.equals = elesfn$g.same;\n\nvar cache = function cache(fn, name) {\n return function traversalCache(arg1, arg2, arg3, arg4) {\n var selectorOrEles = arg1;\n var eles = this;\n var key;\n if (selectorOrEles == null) {\n key = '';\n } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) {\n key = selectorOrEles.id();\n }\n if (eles.length === 1 && key) {\n var _p = eles[0]._private;\n var tch = _p.traversalCache = _p.traversalCache || {};\n var ch = tch[name] = tch[name] || [];\n var hash = hashString(key);\n var cacheHit = ch[hash];\n if (cacheHit) {\n return cacheHit;\n } else {\n return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4);\n }\n } else {\n return fn.call(eles, arg1, arg2, arg3, arg4);\n }\n };\n};\n\nvar elesfn$f = {\n parent: function parent(selector) {\n var parents = [];\n\n // optimisation for single ele call\n if (this.length === 1) {\n var parent = this[0]._private.parent;\n if (parent) {\n return parent;\n }\n }\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _parent = ele._private.parent;\n if (_parent) {\n parents.push(_parent);\n }\n }\n return this.spawn(parents, true).filter(selector);\n },\n parents: function parents(selector) {\n var parents = [];\n var eles = this.parent();\n while (eles.nonempty()) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n parents.push(ele);\n }\n eles = eles.parent();\n }\n return this.spawn(parents, true).filter(selector);\n },\n commonAncestors: function commonAncestors(selector) {\n var ancestors;\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var parents = ele.parents();\n ancestors = ancestors || parents;\n ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set\n }\n\n return ancestors.filter(selector);\n },\n orphans: function orphans(selector) {\n return this.stdFilter(function (ele) {\n return ele.isOrphan();\n }).filter(selector);\n },\n nonorphans: function nonorphans(selector) {\n return this.stdFilter(function (ele) {\n return ele.isChild();\n }).filter(selector);\n },\n children: cache(function (selector) {\n var children = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var eleChildren = ele._private.children;\n for (var j = 0; j < eleChildren.length; j++) {\n children.push(eleChildren[j]);\n }\n }\n return this.spawn(children, true).filter(selector);\n }, 'children'),\n siblings: function siblings(selector) {\n return this.parent().children().not(this).filter(selector);\n },\n isParent: function isParent() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.children.length !== 0;\n }\n },\n isChildless: function isChildless() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.children.length === 0;\n }\n },\n isChild: function isChild() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.parent != null;\n }\n },\n isOrphan: function isOrphan() {\n var ele = this[0];\n if (ele) {\n return ele.isNode() && ele._private.parent == null;\n }\n },\n descendants: function descendants(selector) {\n var elements = [];\n function add(eles) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n elements.push(ele);\n if (ele.children().nonempty()) {\n add(ele.children());\n }\n }\n }\n add(this.children());\n return this.spawn(elements, true).filter(selector);\n }\n};\nfunction forEachCompound(eles, fn, includeSelf, recursiveStep) {\n var q = [];\n var did = new Set$1();\n var cy = eles.cy();\n var hasCompounds = cy.hasCompoundNodes();\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (includeSelf) {\n q.push(ele);\n } else if (hasCompounds) {\n recursiveStep(q, did, ele);\n }\n }\n while (q.length > 0) {\n var _ele = q.shift();\n fn(_ele);\n did.add(_ele.id());\n if (hasCompounds) {\n recursiveStep(q, did, _ele);\n }\n }\n return eles;\n}\nfunction addChildren(q, did, ele) {\n if (ele.isParent()) {\n var children = ele._private.children;\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (!did.has(child.id())) {\n q.push(child);\n }\n }\n }\n}\n\n// very efficient version of eles.add( eles.descendants() ).forEach()\n// for internal use\nelesfn$f.forEachDown = function (fn) {\n var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return forEachCompound(this, fn, includeSelf, addChildren);\n};\nfunction addParent(q, did, ele) {\n if (ele.isChild()) {\n var parent = ele._private.parent;\n if (!did.has(parent.id())) {\n q.push(parent);\n }\n }\n}\nelesfn$f.forEachUp = function (fn) {\n var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return forEachCompound(this, fn, includeSelf, addParent);\n};\nfunction addParentAndChildren(q, did, ele) {\n addParent(q, did, ele);\n addChildren(q, did, ele);\n}\nelesfn$f.forEachUpAndDown = function (fn) {\n var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return forEachCompound(this, fn, includeSelf, addParentAndChildren);\n};\n\n// aliases\nelesfn$f.ancestors = elesfn$f.parents;\n\nvar fn$5, elesfn$e;\nfn$5 = elesfn$e = {\n data: define.data({\n field: 'data',\n bindingEvent: 'data',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'data',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n immutableKeys: {\n 'id': true,\n 'source': true,\n 'target': true,\n 'parent': true\n },\n updateStyle: true\n }),\n removeData: define.removeData({\n field: 'data',\n event: 'data',\n triggerFnName: 'trigger',\n triggerEvent: true,\n immutableKeys: {\n 'id': true,\n 'source': true,\n 'target': true,\n 'parent': true\n },\n updateStyle: true\n }),\n scratch: define.data({\n field: 'scratch',\n bindingEvent: 'scratch',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'scratch',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n updateStyle: true\n }),\n removeScratch: define.removeData({\n field: 'scratch',\n event: 'scratch',\n triggerFnName: 'trigger',\n triggerEvent: true,\n updateStyle: true\n }),\n rscratch: define.data({\n field: 'rscratch',\n allowBinding: false,\n allowSetting: true,\n settingTriggersEvent: false,\n allowGetting: true\n }),\n removeRscratch: define.removeData({\n field: 'rscratch',\n triggerEvent: false\n }),\n id: function id() {\n var ele = this[0];\n if (ele) {\n return ele._private.data.id;\n }\n }\n};\n\n// aliases\nfn$5.attr = fn$5.data;\nfn$5.removeAttr = fn$5.removeData;\nvar data = elesfn$e;\n\nvar elesfn$d = {};\nfunction defineDegreeFunction(callback) {\n return function (includeLoops) {\n var self = this;\n if (includeLoops === undefined) {\n includeLoops = true;\n }\n if (self.length === 0) {\n return;\n }\n if (self.isNode() && !self.removed()) {\n var degree = 0;\n var node = self[0];\n var connectedEdges = node._private.edges;\n for (var i = 0; i < connectedEdges.length; i++) {\n var edge = connectedEdges[i];\n if (!includeLoops && edge.isLoop()) {\n continue;\n }\n degree += callback(node, edge);\n }\n return degree;\n } else {\n return;\n }\n };\n}\nextend(elesfn$d, {\n degree: defineDegreeFunction(function (node, edge) {\n if (edge.source().same(edge.target())) {\n return 2;\n } else {\n return 1;\n }\n }),\n indegree: defineDegreeFunction(function (node, edge) {\n if (edge.target().same(node)) {\n return 1;\n } else {\n return 0;\n }\n }),\n outdegree: defineDegreeFunction(function (node, edge) {\n if (edge.source().same(node)) {\n return 1;\n } else {\n return 0;\n }\n })\n});\nfunction defineDegreeBoundsFunction(degreeFn, callback) {\n return function (includeLoops) {\n var ret;\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n var ele = nodes[i];\n var degree = ele[degreeFn](includeLoops);\n if (degree !== undefined && (ret === undefined || callback(degree, ret))) {\n ret = degree;\n }\n }\n return ret;\n };\n}\nextend(elesfn$d, {\n minDegree: defineDegreeBoundsFunction('degree', function (degree, min) {\n return degree < min;\n }),\n maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) {\n return degree > max;\n }),\n minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) {\n return degree < min;\n }),\n maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) {\n return degree > max;\n }),\n minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) {\n return degree < min;\n }),\n maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) {\n return degree > max;\n })\n});\nextend(elesfn$d, {\n totalDegree: function totalDegree(includeLoops) {\n var total = 0;\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n total += nodes[i].degree(includeLoops);\n }\n return total;\n }\n});\n\nvar fn$4, elesfn$c;\nvar beforePositionSet = function beforePositionSet(eles, newPos, silent) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.locked()) {\n var oldPos = ele._private.position;\n var delta = {\n x: newPos.x != null ? newPos.x - oldPos.x : 0,\n y: newPos.y != null ? newPos.y - oldPos.y : 0\n };\n if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) {\n ele.children().shift(delta, silent);\n }\n ele.dirtyBoundingBoxCache();\n }\n }\n};\nvar positionDef = {\n field: 'position',\n bindingEvent: 'position',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'position',\n settingTriggersEvent: true,\n triggerFnName: 'emitAndNotify',\n allowGetting: true,\n validKeys: ['x', 'y'],\n beforeGet: function beforeGet(ele) {\n ele.updateCompoundBounds();\n },\n beforeSet: function beforeSet(eles, newPos) {\n beforePositionSet(eles, newPos, false);\n },\n onSet: function onSet(eles) {\n eles.dirtyCompoundBoundsCache();\n },\n canSet: function canSet(ele) {\n return !ele.locked();\n }\n};\nfn$4 = elesfn$c = {\n position: define.data(positionDef),\n // position but no notification to renderer\n silentPosition: define.data(extend({}, positionDef, {\n allowBinding: false,\n allowSetting: true,\n settingTriggersEvent: false,\n allowGetting: false,\n beforeSet: function beforeSet(eles, newPos) {\n beforePositionSet(eles, newPos, true);\n },\n onSet: function onSet(eles) {\n eles.dirtyCompoundBoundsCache();\n }\n })),\n positions: function positions(pos, silent) {\n if (plainObject(pos)) {\n if (silent) {\n this.silentPosition(pos);\n } else {\n this.position(pos);\n }\n } else if (fn$6(pos)) {\n var _fn = pos;\n var cy = this.cy();\n cy.startBatch();\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _pos = void 0;\n if (_pos = _fn(ele, i)) {\n if (silent) {\n ele.silentPosition(_pos);\n } else {\n ele.position(_pos);\n }\n }\n }\n cy.endBatch();\n }\n return this; // chaining\n },\n\n silentPositions: function silentPositions(pos) {\n return this.positions(pos, true);\n },\n shift: function shift(dim, val, silent) {\n var delta;\n if (plainObject(dim)) {\n delta = {\n x: number$1(dim.x) ? dim.x : 0,\n y: number$1(dim.y) ? dim.y : 0\n };\n silent = val;\n } else if (string(dim) && number$1(val)) {\n delta = {\n x: 0,\n y: 0\n };\n delta[dim] = val;\n }\n if (delta != null) {\n var cy = this.cy();\n cy.startBatch();\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n\n // exclude any node that is a descendant of the calling collection\n if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) {\n continue;\n }\n var pos = ele.position();\n var newPos = {\n x: pos.x + delta.x,\n y: pos.y + delta.y\n };\n if (silent) {\n ele.silentPosition(newPos);\n } else {\n ele.position(newPos);\n }\n }\n cy.endBatch();\n }\n return this;\n },\n silentShift: function silentShift(dim, val) {\n if (plainObject(dim)) {\n this.shift(dim, true);\n } else if (string(dim) && number$1(val)) {\n this.shift(dim, val, true);\n }\n return this;\n },\n // get/set the rendered (i.e. on screen) positon of the element\n renderedPosition: function renderedPosition(dim, val) {\n var ele = this[0];\n var cy = this.cy();\n var zoom = cy.zoom();\n var pan = cy.pan();\n var rpos = plainObject(dim) ? dim : undefined;\n var setting = rpos !== undefined || val !== undefined && string(dim);\n if (ele && ele.isNode()) {\n // must have an element and must be a node to return position\n if (setting) {\n for (var i = 0; i < this.length; i++) {\n var _ele = this[i];\n if (val !== undefined) {\n // set one dimension\n _ele.position(dim, (val - pan[dim]) / zoom);\n } else if (rpos !== undefined) {\n // set whole position\n _ele.position(renderedToModelPosition(rpos, zoom, pan));\n }\n }\n } else {\n // getting\n var pos = ele.position();\n rpos = modelToRenderedPosition(pos, zoom, pan);\n if (dim === undefined) {\n // then return the whole rendered position\n return rpos;\n } else {\n // then return the specified dimension\n return rpos[dim];\n }\n }\n } else if (!setting) {\n return undefined; // for empty collection case\n }\n\n return this; // chaining\n },\n\n // get/set the position relative to the parent\n relativePosition: function relativePosition(dim, val) {\n var ele = this[0];\n var cy = this.cy();\n var ppos = plainObject(dim) ? dim : undefined;\n var setting = ppos !== undefined || val !== undefined && string(dim);\n var hasCompoundNodes = cy.hasCompoundNodes();\n if (ele && ele.isNode()) {\n // must have an element and must be a node to return position\n if (setting) {\n for (var i = 0; i < this.length; i++) {\n var _ele2 = this[i];\n var parent = hasCompoundNodes ? _ele2.parent() : null;\n var hasParent = parent && parent.length > 0;\n var relativeToParent = hasParent;\n if (hasParent) {\n parent = parent[0];\n }\n var origin = relativeToParent ? parent.position() : {\n x: 0,\n y: 0\n };\n if (val !== undefined) {\n // set one dimension\n _ele2.position(dim, val + origin[dim]);\n } else if (ppos !== undefined) {\n // set whole position\n _ele2.position({\n x: ppos.x + origin.x,\n y: ppos.y + origin.y\n });\n }\n }\n } else {\n // getting\n var pos = ele.position();\n var _parent = hasCompoundNodes ? ele.parent() : null;\n var _hasParent = _parent && _parent.length > 0;\n var _relativeToParent = _hasParent;\n if (_hasParent) {\n _parent = _parent[0];\n }\n var _origin = _relativeToParent ? _parent.position() : {\n x: 0,\n y: 0\n };\n ppos = {\n x: pos.x - _origin.x,\n y: pos.y - _origin.y\n };\n if (dim === undefined) {\n // then return the whole rendered position\n return ppos;\n } else {\n // then return the specified dimension\n return ppos[dim];\n }\n }\n } else if (!setting) {\n return undefined; // for empty collection case\n }\n\n return this; // chaining\n }\n};\n\n// aliases\nfn$4.modelPosition = fn$4.point = fn$4.position;\nfn$4.modelPositions = fn$4.points = fn$4.positions;\nfn$4.renderedPoint = fn$4.renderedPosition;\nfn$4.relativePoint = fn$4.relativePosition;\nvar position = elesfn$c;\n\nvar fn$3, elesfn$b;\nfn$3 = elesfn$b = {};\nelesfn$b.renderedBoundingBox = function (options) {\n var bb = this.boundingBox(options);\n var cy = this.cy();\n var zoom = cy.zoom();\n var pan = cy.pan();\n var x1 = bb.x1 * zoom + pan.x;\n var x2 = bb.x2 * zoom + pan.x;\n var y1 = bb.y1 * zoom + pan.y;\n var y2 = bb.y2 * zoom + pan.y;\n return {\n x1: x1,\n x2: x2,\n y1: y1,\n y2: y2,\n w: x2 - x1,\n h: y2 - y1\n };\n};\nelesfn$b.dirtyCompoundBoundsCache = function () {\n var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cy = this.cy();\n if (!cy.styleEnabled() || !cy.hasCompoundNodes()) {\n return this;\n }\n this.forEachUp(function (ele) {\n if (ele.isParent()) {\n var _p = ele._private;\n _p.compoundBoundsClean = false;\n _p.bbCache = null;\n if (!silent) {\n ele.emitAndNotify('bounds');\n }\n }\n });\n return this;\n};\nelesfn$b.updateCompoundBounds = function () {\n var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cy = this.cy();\n\n // not possible to do on non-compound graphs or with the style disabled\n if (!cy.styleEnabled() || !cy.hasCompoundNodes()) {\n return this;\n }\n\n // save cycles when batching -- but bounds will be stale (or not exist yet)\n if (!force && cy.batching()) {\n return this;\n }\n function update(parent) {\n if (!parent.isParent()) {\n return;\n }\n var _p = parent._private;\n var children = parent.children();\n var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include';\n var min = {\n width: {\n val: parent.pstyle('min-width').pfValue,\n left: parent.pstyle('min-width-bias-left'),\n right: parent.pstyle('min-width-bias-right')\n },\n height: {\n val: parent.pstyle('min-height').pfValue,\n top: parent.pstyle('min-height-bias-top'),\n bottom: parent.pstyle('min-height-bias-bottom')\n }\n };\n var bb = children.boundingBox({\n includeLabels: includeLabels,\n includeOverlays: false,\n // updating the compound bounds happens outside of the regular\n // cache cycle (i.e. before fired events)\n useCache: false\n });\n var pos = _p.position;\n\n // if children take up zero area then keep position and fall back on stylesheet w/h\n if (bb.w === 0 || bb.h === 0) {\n bb = {\n w: parent.pstyle('width').pfValue,\n h: parent.pstyle('height').pfValue\n };\n bb.x1 = pos.x - bb.w / 2;\n bb.x2 = pos.x + bb.w / 2;\n bb.y1 = pos.y - bb.h / 2;\n bb.y2 = pos.y + bb.h / 2;\n }\n function computeBiasValues(propDiff, propBias, propBiasComplement) {\n var biasDiff = 0;\n var biasComplementDiff = 0;\n var biasTotal = propBias + propBiasComplement;\n if (propDiff > 0 && biasTotal > 0) {\n biasDiff = propBias / biasTotal * propDiff;\n biasComplementDiff = propBiasComplement / biasTotal * propDiff;\n }\n return {\n biasDiff: biasDiff,\n biasComplementDiff: biasComplementDiff\n };\n }\n function computePaddingValues(width, height, paddingObject, relativeTo) {\n // Assuming percentage is number from 0 to 1\n if (paddingObject.units === '%') {\n switch (relativeTo) {\n case 'width':\n return width > 0 ? paddingObject.pfValue * width : 0;\n case 'height':\n return height > 0 ? paddingObject.pfValue * height : 0;\n case 'average':\n return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0;\n case 'min':\n return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0;\n case 'max':\n return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0;\n default:\n return 0;\n }\n } else if (paddingObject.units === 'px') {\n return paddingObject.pfValue;\n } else {\n return 0;\n }\n }\n var leftVal = min.width.left.value;\n if (min.width.left.units === 'px' && min.width.val > 0) {\n leftVal = leftVal * 100 / min.width.val;\n }\n var rightVal = min.width.right.value;\n if (min.width.right.units === 'px' && min.width.val > 0) {\n rightVal = rightVal * 100 / min.width.val;\n }\n var topVal = min.height.top.value;\n if (min.height.top.units === 'px' && min.height.val > 0) {\n topVal = topVal * 100 / min.height.val;\n }\n var bottomVal = min.height.bottom.value;\n if (min.height.bottom.units === 'px' && min.height.val > 0) {\n bottomVal = bottomVal * 100 / min.height.val;\n }\n var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal);\n var diffLeft = widthBiasDiffs.biasDiff;\n var diffRight = widthBiasDiffs.biasComplementDiff;\n var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal);\n var diffTop = heightBiasDiffs.biasDiff;\n var diffBottom = heightBiasDiffs.biasComplementDiff;\n _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value);\n _p.autoWidth = Math.max(bb.w, min.width.val);\n pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2;\n _p.autoHeight = Math.max(bb.h, min.height.val);\n pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2;\n }\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _p = ele._private;\n if (!_p.compoundBoundsClean || force) {\n update(ele);\n if (!cy.batching()) {\n _p.compoundBoundsClean = true;\n }\n }\n }\n return this;\n};\nvar noninf = function noninf(x) {\n if (x === Infinity || x === -Infinity) {\n return 0;\n }\n return x;\n};\nvar updateBounds = function updateBounds(b, x1, y1, x2, y2) {\n // don't update with zero area boxes\n if (x2 - x1 === 0 || y2 - y1 === 0) {\n return;\n }\n\n // don't update with null dim\n if (x1 == null || y1 == null || x2 == null || y2 == null) {\n return;\n }\n b.x1 = x1 < b.x1 ? x1 : b.x1;\n b.x2 = x2 > b.x2 ? x2 : b.x2;\n b.y1 = y1 < b.y1 ? y1 : b.y1;\n b.y2 = y2 > b.y2 ? y2 : b.y2;\n b.w = b.x2 - b.x1;\n b.h = b.y2 - b.y1;\n};\nvar updateBoundsFromBox = function updateBoundsFromBox(b, b2) {\n if (b2 == null) {\n return b;\n }\n return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2);\n};\nvar prefixedProperty = function prefixedProperty(obj, field, prefix) {\n return getPrefixedProperty(obj, field, prefix);\n};\nvar updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) {\n if (ele.cy().headless()) {\n return;\n }\n var _p = ele._private;\n var rstyle = _p.rstyle;\n var halfArW = rstyle.arrowWidth / 2;\n var arrowType = ele.pstyle(prefix + '-arrow-shape').value;\n var x;\n var y;\n if (arrowType !== 'none') {\n if (prefix === 'source') {\n x = rstyle.srcX;\n y = rstyle.srcY;\n } else if (prefix === 'target') {\n x = rstyle.tgtX;\n y = rstyle.tgtY;\n } else {\n x = rstyle.midX;\n y = rstyle.midY;\n }\n\n // always store the individual arrow bounds\n var bbs = _p.arrowBounds = _p.arrowBounds || {};\n var bb = bbs[prefix] = bbs[prefix] || {};\n bb.x1 = x - halfArW;\n bb.y1 = y - halfArW;\n bb.x2 = x + halfArW;\n bb.y2 = y + halfArW;\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n expandBoundingBox(bb, 1);\n updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2);\n }\n};\nvar updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) {\n if (ele.cy().headless()) {\n return;\n }\n var prefixDash;\n if (prefix) {\n prefixDash = prefix + '-';\n } else {\n prefixDash = '';\n }\n var _p = ele._private;\n var rstyle = _p.rstyle;\n var label = ele.pstyle(prefixDash + 'label').strValue;\n if (label) {\n var halign = ele.pstyle('text-halign');\n var valign = ele.pstyle('text-valign');\n var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix);\n var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix);\n var labelX = prefixedProperty(rstyle, 'labelX', prefix);\n var labelY = prefixedProperty(rstyle, 'labelY', prefix);\n var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue;\n var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue;\n var isEdge = ele.isEdge();\n var rotation = ele.pstyle(prefixDash + 'text-rotation');\n var outlineWidth = ele.pstyle('text-outline-width').pfValue;\n var borderWidth = ele.pstyle('text-border-width').pfValue;\n var halfBorderWidth = borderWidth / 2;\n var padding = ele.pstyle('text-background-padding').pfValue;\n var marginOfError = 2; // expand to work around browser dimension inaccuracies\n\n var lh = labelHeight;\n var lw = labelWidth;\n var lw_2 = lw / 2;\n var lh_2 = lh / 2;\n var lx1, lx2, ly1, ly2;\n if (isEdge) {\n lx1 = labelX - lw_2;\n lx2 = labelX + lw_2;\n ly1 = labelY - lh_2;\n ly2 = labelY + lh_2;\n } else {\n switch (halign.value) {\n case 'left':\n lx1 = labelX - lw;\n lx2 = labelX;\n break;\n case 'center':\n lx1 = labelX - lw_2;\n lx2 = labelX + lw_2;\n break;\n case 'right':\n lx1 = labelX;\n lx2 = labelX + lw;\n break;\n }\n switch (valign.value) {\n case 'top':\n ly1 = labelY - lh;\n ly2 = labelY;\n break;\n case 'center':\n ly1 = labelY - lh_2;\n ly2 = labelY + lh_2;\n break;\n case 'bottom':\n ly1 = labelY;\n ly2 = labelY + lh;\n break;\n }\n }\n\n // shift by margin and expand by outline and border\n lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;\n lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;\n ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError;\n ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError;\n\n // always store the unrotated label bounds separately\n var bbPrefix = prefix || 'main';\n var bbs = _p.labelBounds;\n var bb = bbs[bbPrefix] = bbs[bbPrefix] || {};\n bb.x1 = lx1;\n bb.y1 = ly1;\n bb.x2 = lx2;\n bb.y2 = ly2;\n bb.w = lx2 - lx1;\n bb.h = ly2 - ly1;\n var isAutorotate = isEdge && rotation.strValue === 'autorotate';\n var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0;\n if (isAutorotate || isPfValue) {\n var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue;\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n\n // rotation point (default value for center-center)\n var xo = (lx1 + lx2) / 2;\n var yo = (ly1 + ly2) / 2;\n if (!isEdge) {\n switch (halign.value) {\n case 'left':\n xo = lx2;\n break;\n case 'right':\n xo = lx1;\n break;\n }\n switch (valign.value) {\n case 'top':\n yo = ly2;\n break;\n case 'bottom':\n yo = ly1;\n break;\n }\n }\n var rotate = function rotate(x, y) {\n x = x - xo;\n y = y - yo;\n return {\n x: x * cos - y * sin + xo,\n y: x * sin + y * cos + yo\n };\n };\n var px1y1 = rotate(lx1, ly1);\n var px1y2 = rotate(lx1, ly2);\n var px2y1 = rotate(lx2, ly1);\n var px2y2 = rotate(lx2, ly2);\n lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x);\n lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x);\n ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y);\n ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y);\n }\n var bbPrefixRot = bbPrefix + 'Rot';\n var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {};\n bbRot.x1 = lx1;\n bbRot.y1 = ly1;\n bbRot.x2 = lx2;\n bbRot.y2 = ly2;\n bbRot.w = lx2 - lx1;\n bbRot.h = ly2 - ly1;\n updateBounds(bounds, lx1, ly1, lx2, ly2);\n updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2);\n }\n return bounds;\n};\nvar updateBoundsFromOutline = function updateBoundsFromOutline(bounds, ele) {\n if (ele.cy().headless()) {\n return;\n }\n var outlineOpacity = ele.pstyle('outline-opacity').value;\n var outlineWidth = ele.pstyle('outline-width').value;\n if (outlineOpacity > 0 && outlineWidth > 0) {\n var outlineOffset = ele.pstyle('outline-offset').value;\n var nodeShape = ele.pstyle('shape').value;\n var outlineSize = outlineWidth + outlineOffset;\n var scaleX = (bounds.w + outlineSize * 2) / bounds.w;\n var scaleY = (bounds.h + outlineSize * 2) / bounds.h;\n var xOffset = 0;\n var yOffset = 0;\n if ([\"diamond\", \"pentagon\", \"round-triangle\"].includes(nodeShape)) {\n scaleX = (bounds.w + outlineSize * 2.4) / bounds.w;\n yOffset = -outlineSize / 3.6;\n } else if ([\"concave-hexagon\", \"rhomboid\", \"right-rhomboid\"].includes(nodeShape)) {\n scaleX = (bounds.w + outlineSize * 2.4) / bounds.w;\n } else if (nodeShape === \"star\") {\n scaleX = (bounds.w + outlineSize * 2.8) / bounds.w;\n scaleY = (bounds.h + outlineSize * 2.6) / bounds.h;\n yOffset = -outlineSize / 3.8;\n } else if (nodeShape === \"triangle\") {\n scaleX = (bounds.w + outlineSize * 2.8) / bounds.w;\n scaleY = (bounds.h + outlineSize * 2.4) / bounds.h;\n yOffset = -outlineSize / 1.4;\n } else if (nodeShape === \"vee\") {\n scaleX = (bounds.w + outlineSize * 4.4) / bounds.w;\n scaleY = (bounds.h + outlineSize * 3.8) / bounds.h;\n yOffset = -outlineSize * .5;\n }\n var hDelta = bounds.h * scaleY - bounds.h;\n var wDelta = bounds.w * scaleX - bounds.w;\n expandBoundingBoxSides(bounds, [Math.ceil(hDelta / 2), Math.ceil(wDelta / 2)]);\n if (xOffset != 0 || yOffset !== 0) {\n var oBounds = shiftBoundingBox(bounds, xOffset, yOffset);\n updateBoundingBox(bounds, oBounds);\n }\n }\n};\n\n// get the bounding box of the elements (in raw model position)\nvar boundingBoxImpl = function boundingBoxImpl(ele, options) {\n var cy = ele._private.cy;\n var styleEnabled = cy.styleEnabled();\n var headless = cy.headless();\n var bounds = makeBoundingBox();\n var _p = ele._private;\n var isNode = ele.isNode();\n var isEdge = ele.isEdge();\n var ex1, ex2, ey1, ey2; // extrema of body / lines\n var x, y; // node pos\n var rstyle = _p.rstyle;\n var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0];\n\n // must use `display` prop only, as reading `compound.width()` causes recursion\n // (other factors like width values will be considered later in this function anyway)\n var isDisplayed = function isDisplayed(ele) {\n return ele.pstyle('display').value !== 'none';\n };\n var displayed = !styleEnabled || isDisplayed(ele)\n\n // must take into account connected nodes b/c of implicit edge hiding on display:none node\n && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target()));\n if (displayed) {\n // displayed suffices, since we will find zero area eles anyway\n var overlayOpacity = 0;\n var overlayPadding = 0;\n if (styleEnabled && options.includeOverlays) {\n overlayOpacity = ele.pstyle('overlay-opacity').value;\n if (overlayOpacity !== 0) {\n overlayPadding = ele.pstyle('overlay-padding').value;\n }\n }\n var underlayOpacity = 0;\n var underlayPadding = 0;\n if (styleEnabled && options.includeUnderlays) {\n underlayOpacity = ele.pstyle('underlay-opacity').value;\n if (underlayOpacity !== 0) {\n underlayPadding = ele.pstyle('underlay-padding').value;\n }\n }\n var padding = Math.max(overlayPadding, underlayPadding);\n var w = 0;\n var wHalf = 0;\n if (styleEnabled) {\n w = ele.pstyle('width').pfValue;\n wHalf = w / 2;\n }\n if (isNode && options.includeNodes) {\n var pos = ele.position();\n x = pos.x;\n y = pos.y;\n var _w = ele.outerWidth();\n var halfW = _w / 2;\n var h = ele.outerHeight();\n var halfH = h / 2;\n\n // handle node dimensions\n /////////////////////////\n\n ex1 = x - halfW;\n ex2 = x + halfW;\n ey1 = y - halfH;\n ey2 = y + halfH;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n if (styleEnabled && options.includeOutlines) {\n updateBoundsFromOutline(bounds, ele);\n }\n } else if (isEdge && options.includeEdges) {\n if (styleEnabled && !headless) {\n var curveStyle = ele.pstyle('curve-style').strValue;\n\n // handle edge dimensions (rough box estimate)\n //////////////////////////////////////////////\n\n ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX);\n ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX);\n ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY);\n ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY);\n\n // take into account edge width\n ex1 -= wHalf;\n ex2 += wHalf;\n ey1 -= wHalf;\n ey2 += wHalf;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n\n // precise edges\n ////////////////\n\n if (curveStyle === 'haystack') {\n var hpts = rstyle.haystackPts;\n if (hpts && hpts.length === 2) {\n ex1 = hpts[0].x;\n ey1 = hpts[0].y;\n ex2 = hpts[1].x;\n ey2 = hpts[1].y;\n if (ex1 > ex2) {\n var temp = ex1;\n ex1 = ex2;\n ex2 = temp;\n }\n if (ey1 > ey2) {\n var _temp = ey1;\n ey1 = ey2;\n ey2 = _temp;\n }\n updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf);\n }\n } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle.endsWith('segments') || curveStyle.endsWith('taxi')) {\n var pts;\n switch (curveStyle) {\n case 'bezier':\n case 'unbundled-bezier':\n pts = rstyle.bezierPts;\n break;\n case 'segments':\n case 'taxi':\n case 'round-segments':\n case 'round-taxi':\n pts = rstyle.linePts;\n break;\n }\n if (pts != null) {\n for (var j = 0; j < pts.length; j++) {\n var pt = pts[j];\n ex1 = pt.x - wHalf;\n ex2 = pt.x + wHalf;\n ey1 = pt.y - wHalf;\n ey2 = pt.y + wHalf;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n }\n }\n } // bezier-like or segment-like edge\n } else {\n // headless or style disabled\n\n // fallback on source and target positions\n //////////////////////////////////////////\n\n var n1 = ele.source();\n var n1pos = n1.position();\n var n2 = ele.target();\n var n2pos = n2.position();\n ex1 = n1pos.x;\n ex2 = n2pos.x;\n ey1 = n1pos.y;\n ey2 = n2pos.y;\n if (ex1 > ex2) {\n var _temp2 = ex1;\n ex1 = ex2;\n ex2 = _temp2;\n }\n if (ey1 > ey2) {\n var _temp3 = ey1;\n ey1 = ey2;\n ey2 = _temp3;\n }\n\n // take into account edge width\n ex1 -= wHalf;\n ex2 += wHalf;\n ey1 -= wHalf;\n ey2 += wHalf;\n updateBounds(bounds, ex1, ey1, ex2, ey2);\n } // headless or style disabled\n } // edges\n\n // handle edge arrow size\n /////////////////////////\n\n if (styleEnabled && options.includeEdges && isEdge) {\n updateBoundsFromArrow(bounds, ele, 'mid-source');\n updateBoundsFromArrow(bounds, ele, 'mid-target');\n updateBoundsFromArrow(bounds, ele, 'source');\n updateBoundsFromArrow(bounds, ele, 'target');\n }\n\n // ghost\n ////////\n\n if (styleEnabled) {\n var ghost = ele.pstyle('ghost').value === 'yes';\n if (ghost) {\n var gx = ele.pstyle('ghost-offset-x').pfValue;\n var gy = ele.pstyle('ghost-offset-y').pfValue;\n updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy);\n }\n }\n\n // always store the body bounds separately from the labels\n var bbBody = _p.bodyBounds = _p.bodyBounds || {};\n assignBoundingBox(bbBody, bounds);\n expandBoundingBoxSides(bbBody, manualExpansion);\n expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies\n\n // overlay\n //////////\n\n if (styleEnabled) {\n ex1 = bounds.x1;\n ex2 = bounds.x2;\n ey1 = bounds.y1;\n ey2 = bounds.y2;\n updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding);\n }\n\n // always store the body bounds separately from the labels\n var bbOverlay = _p.overlayBounds = _p.overlayBounds || {};\n assignBoundingBox(bbOverlay, bounds);\n expandBoundingBoxSides(bbOverlay, manualExpansion);\n expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies\n\n // handle label dimensions\n //////////////////////////\n\n var bbLabels = _p.labelBounds = _p.labelBounds || {};\n if (bbLabels.all != null) {\n clearBoundingBox(bbLabels.all);\n } else {\n bbLabels.all = makeBoundingBox();\n }\n if (styleEnabled && options.includeLabels) {\n if (options.includeMainLabels) {\n updateBoundsFromLabel(bounds, ele, null);\n }\n if (isEdge) {\n if (options.includeSourceLabels) {\n updateBoundsFromLabel(bounds, ele, 'source');\n }\n if (options.includeTargetLabels) {\n updateBoundsFromLabel(bounds, ele, 'target');\n }\n }\n } // style enabled for labels\n } // if displayed\n\n bounds.x1 = noninf(bounds.x1);\n bounds.y1 = noninf(bounds.y1);\n bounds.x2 = noninf(bounds.x2);\n bounds.y2 = noninf(bounds.y2);\n bounds.w = noninf(bounds.x2 - bounds.x1);\n bounds.h = noninf(bounds.y2 - bounds.y1);\n if (bounds.w > 0 && bounds.h > 0 && displayed) {\n expandBoundingBoxSides(bounds, manualExpansion);\n\n // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides\n expandBoundingBox(bounds, 1);\n }\n return bounds;\n};\nvar getKey = function getKey(opts) {\n var i = 0;\n var tf = function tf(val) {\n return (val ? 1 : 0) << i++;\n };\n var key = 0;\n key += tf(opts.incudeNodes);\n key += tf(opts.includeEdges);\n key += tf(opts.includeLabels);\n key += tf(opts.includeMainLabels);\n key += tf(opts.includeSourceLabels);\n key += tf(opts.includeTargetLabels);\n key += tf(opts.includeOverlays);\n key += tf(opts.includeOutlines);\n return key;\n};\nvar getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) {\n if (ele.isEdge()) {\n var p1 = ele.source().position();\n var p2 = ele.target().position();\n var r = function r(x) {\n return Math.round(x);\n };\n return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]);\n } else {\n return 0;\n }\n};\nvar cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) {\n var _p = ele._private;\n var bb;\n var isEdge = ele.isEdge();\n var key = opts == null ? defBbOptsKey : getKey(opts);\n var usingDefOpts = key === defBbOptsKey;\n var currPosKey = getBoundingBoxPosKey(ele);\n var isPosKeySame = _p.bbCachePosKey === currPosKey;\n var useCache = opts.useCache && isPosKeySame;\n var isDirty = function isDirty(ele) {\n return ele._private.bbCache == null || ele._private.styleDirty;\n };\n var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target());\n if (needRecalc) {\n if (!isPosKeySame) {\n ele.recalculateRenderedStyle(useCache);\n }\n bb = boundingBoxImpl(ele, defBbOpts);\n _p.bbCache = bb;\n _p.bbCachePosKey = currPosKey;\n } else {\n bb = _p.bbCache;\n }\n\n // not using def opts => need to build up bb from combination of sub bbs\n if (!usingDefOpts) {\n var isNode = ele.isNode();\n bb = makeBoundingBox();\n if (opts.includeNodes && isNode || opts.includeEdges && !isNode) {\n if (opts.includeOverlays) {\n updateBoundsFromBox(bb, _p.overlayBounds);\n } else {\n updateBoundsFromBox(bb, _p.bodyBounds);\n }\n }\n if (opts.includeLabels) {\n if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) {\n updateBoundsFromBox(bb, _p.labelBounds.all);\n } else {\n if (opts.includeMainLabels) {\n updateBoundsFromBox(bb, _p.labelBounds.mainRot);\n }\n if (opts.includeSourceLabels) {\n updateBoundsFromBox(bb, _p.labelBounds.sourceRot);\n }\n if (opts.includeTargetLabels) {\n updateBoundsFromBox(bb, _p.labelBounds.targetRot);\n }\n }\n }\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n }\n return bb;\n};\nvar defBbOpts = {\n includeNodes: true,\n includeEdges: true,\n includeLabels: true,\n includeMainLabels: true,\n includeSourceLabels: true,\n includeTargetLabels: true,\n includeOverlays: true,\n includeUnderlays: true,\n includeOutlines: true,\n useCache: true\n};\nvar defBbOptsKey = getKey(defBbOpts);\nvar filledBbOpts = defaults$g(defBbOpts);\nelesfn$b.boundingBox = function (options) {\n var bounds;\n\n // the main usecase is ele.boundingBox() for a single element with no/def options\n // specified s.t. the cache is used, so check for this case to make it faster by\n // avoiding the overhead of the rest of the function\n if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) {\n if (options === undefined) {\n options = defBbOpts;\n } else {\n options = filledBbOpts(options);\n }\n bounds = cachedBoundingBoxImpl(this[0], options);\n } else {\n bounds = makeBoundingBox();\n options = options || defBbOpts;\n var opts = filledBbOpts(options);\n var eles = this;\n var cy = eles.cy();\n var styleEnabled = cy.styleEnabled();\n if (styleEnabled) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _p = ele._private;\n var currPosKey = getBoundingBoxPosKey(ele);\n var isPosKeySame = _p.bbCachePosKey === currPosKey;\n var useCache = opts.useCache && isPosKeySame && !_p.styleDirty;\n ele.recalculateRenderedStyle(useCache);\n }\n }\n this.updateCompoundBounds(!options.useCache);\n for (var _i = 0; _i < eles.length; _i++) {\n var _ele = eles[_i];\n updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts));\n }\n }\n bounds.x1 = noninf(bounds.x1);\n bounds.y1 = noninf(bounds.y1);\n bounds.x2 = noninf(bounds.x2);\n bounds.y2 = noninf(bounds.y2);\n bounds.w = noninf(bounds.x2 - bounds.x1);\n bounds.h = noninf(bounds.y2 - bounds.y1);\n return bounds;\n};\nelesfn$b.dirtyBoundingBoxCache = function () {\n for (var i = 0; i < this.length; i++) {\n var _p = this[i]._private;\n _p.bbCache = null;\n _p.bbCachePosKey = null;\n _p.bodyBounds = null;\n _p.overlayBounds = null;\n _p.labelBounds.all = null;\n _p.labelBounds.source = null;\n _p.labelBounds.target = null;\n _p.labelBounds.main = null;\n _p.labelBounds.sourceRot = null;\n _p.labelBounds.targetRot = null;\n _p.labelBounds.mainRot = null;\n _p.arrowBounds.source = null;\n _p.arrowBounds.target = null;\n _p.arrowBounds['mid-source'] = null;\n _p.arrowBounds['mid-target'] = null;\n }\n this.emitAndNotify('bounds');\n return this;\n};\n\n// private helper to get bounding box for custom node positions\n// - good for perf in certain cases but currently requires dirtying the rendered style\n// - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer...\n// - try to use for only things like discrete layouts where the node position would change anyway\nelesfn$b.boundingBoxAt = function (fn) {\n var nodes = this.nodes();\n var cy = this.cy();\n var hasCompoundNodes = cy.hasCompoundNodes();\n var parents = cy.collection();\n if (hasCompoundNodes) {\n parents = nodes.filter(function (node) {\n return node.isParent();\n });\n nodes = nodes.not(parents);\n }\n if (plainObject(fn)) {\n var obj = fn;\n fn = function fn() {\n return obj;\n };\n }\n var storeOldPos = function storeOldPos(node, i) {\n return node._private.bbAtOldPos = fn(node, i);\n };\n var getOldPos = function getOldPos(node) {\n return node._private.bbAtOldPos;\n };\n cy.startBatch();\n nodes.forEach(storeOldPos).silentPositions(fn);\n if (hasCompoundNodes) {\n parents.dirtyCompoundBoundsCache();\n parents.dirtyBoundingBoxCache();\n parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle\n }\n\n var bb = copyBoundingBox(this.boundingBox({\n useCache: false\n }));\n nodes.silentPositions(getOldPos);\n if (hasCompoundNodes) {\n parents.dirtyCompoundBoundsCache();\n parents.dirtyBoundingBoxCache();\n parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle\n }\n\n cy.endBatch();\n return bb;\n};\nfn$3.boundingbox = fn$3.bb = fn$3.boundingBox;\nfn$3.renderedBoundingbox = fn$3.renderedBoundingBox;\nvar bounds = elesfn$b;\n\nvar fn$2, elesfn$a;\nfn$2 = elesfn$a = {};\nvar defineDimFns = function defineDimFns(opts) {\n opts.uppercaseName = capitalize(opts.name);\n opts.autoName = 'auto' + opts.uppercaseName;\n opts.labelName = 'label' + opts.uppercaseName;\n opts.outerName = 'outer' + opts.uppercaseName;\n opts.uppercaseOuterName = capitalize(opts.outerName);\n fn$2[opts.name] = function dimImpl() {\n var ele = this[0];\n var _p = ele._private;\n var cy = _p.cy;\n var styleEnabled = cy._private.styleEnabled;\n if (ele) {\n if (styleEnabled) {\n if (ele.isParent()) {\n ele.updateCompoundBounds();\n return _p[opts.autoName] || 0;\n }\n var d = ele.pstyle(opts.name);\n switch (d.strValue) {\n case 'label':\n ele.recalculateRenderedStyle();\n return _p.rstyle[opts.labelName] || 0;\n default:\n return d.pfValue;\n }\n } else {\n return 1;\n }\n }\n };\n fn$2['outer' + opts.uppercaseName] = function outerDimImpl() {\n var ele = this[0];\n var _p = ele._private;\n var cy = _p.cy;\n var styleEnabled = cy._private.styleEnabled;\n if (ele) {\n if (styleEnabled) {\n var dim = ele[opts.name]();\n var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side\n var padding = 2 * ele.padding();\n return dim + border + padding;\n } else {\n return 1;\n }\n }\n };\n fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() {\n var ele = this[0];\n if (ele) {\n var d = ele[opts.name]();\n return d * this.cy().zoom();\n }\n };\n fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() {\n var ele = this[0];\n if (ele) {\n var od = ele[opts.outerName]();\n return od * this.cy().zoom();\n }\n };\n};\ndefineDimFns({\n name: 'width'\n});\ndefineDimFns({\n name: 'height'\n});\nelesfn$a.padding = function () {\n var ele = this[0];\n var _p = ele._private;\n if (ele.isParent()) {\n ele.updateCompoundBounds();\n if (_p.autoPadding !== undefined) {\n return _p.autoPadding;\n } else {\n return ele.pstyle('padding').pfValue;\n }\n } else {\n return ele.pstyle('padding').pfValue;\n }\n};\nelesfn$a.paddedHeight = function () {\n var ele = this[0];\n return ele.height() + 2 * ele.padding();\n};\nelesfn$a.paddedWidth = function () {\n var ele = this[0];\n return ele.width() + 2 * ele.padding();\n};\nvar widthHeight = elesfn$a;\n\nvar ifEdge = function ifEdge(ele, getValue) {\n if (ele.isEdge()) {\n return getValue(ele);\n }\n};\nvar ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) {\n if (ele.isEdge()) {\n var cy = ele.cy();\n return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan());\n }\n};\nvar ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) {\n if (ele.isEdge()) {\n var cy = ele.cy();\n var pan = cy.pan();\n var zoom = cy.zoom();\n return getPoints(ele).map(function (p) {\n return modelToRenderedPosition(p, zoom, pan);\n });\n }\n};\nvar controlPoints = function controlPoints(ele) {\n return ele.renderer().getControlPoints(ele);\n};\nvar segmentPoints = function segmentPoints(ele) {\n return ele.renderer().getSegmentPoints(ele);\n};\nvar sourceEndpoint = function sourceEndpoint(ele) {\n return ele.renderer().getSourceEndpoint(ele);\n};\nvar targetEndpoint = function targetEndpoint(ele) {\n return ele.renderer().getTargetEndpoint(ele);\n};\nvar midpoint = function midpoint(ele) {\n return ele.renderer().getEdgeMidpoint(ele);\n};\nvar pts = {\n controlPoints: {\n get: controlPoints,\n mult: true\n },\n segmentPoints: {\n get: segmentPoints,\n mult: true\n },\n sourceEndpoint: {\n get: sourceEndpoint\n },\n targetEndpoint: {\n get: targetEndpoint\n },\n midpoint: {\n get: midpoint\n }\n};\nvar renderedName = function renderedName(name) {\n return 'rendered' + name[0].toUpperCase() + name.substr(1);\n};\nvar edgePoints = Object.keys(pts).reduce(function (obj, name) {\n var spec = pts[name];\n var rName = renderedName(name);\n obj[name] = function () {\n return ifEdge(this, spec.get);\n };\n if (spec.mult) {\n obj[rName] = function () {\n return ifEdgeRenderedPositions(this, spec.get);\n };\n } else {\n obj[rName] = function () {\n return ifEdgeRenderedPosition(this, spec.get);\n };\n }\n return obj;\n}, {});\n\nvar dimensions = extend({}, position, bounds, widthHeight, edgePoints);\n\n/*!\nEvent object based on jQuery events, MIT license\n\nhttps://jquery.org/license/\nhttps://tldrlegal.com/license/mit-license\nhttps://github.com/jquery/jquery/blob/master/src/event.js\n*/\n\nvar Event = function Event(src, props) {\n this.recycle(src, props);\n};\nfunction returnFalse() {\n return false;\n}\nfunction returnTrue() {\n return true;\n}\n\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\nEvent.prototype = {\n instanceString: function instanceString() {\n return 'event';\n },\n recycle: function recycle(src, props) {\n this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse;\n if (src != null && src.preventDefault) {\n // Browser Event object\n this.type = src.type;\n\n // Events bubbling up the document may have been marked as prevented\n // by a handler lower down the tree; reflect the correct value.\n this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse;\n } else if (src != null && src.type) {\n // Plain object containing all event details\n props = src;\n } else {\n // Event string\n this.type = src;\n }\n\n // Put explicitly provided properties onto the event object\n if (props != null) {\n // more efficient to manually copy fields we use\n this.originalEvent = props.originalEvent;\n this.type = props.type != null ? props.type : this.type;\n this.cy = props.cy;\n this.target = props.target;\n this.position = props.position;\n this.renderedPosition = props.renderedPosition;\n this.namespace = props.namespace;\n this.layout = props.layout;\n }\n if (this.cy != null && this.position != null && this.renderedPosition == null) {\n // create a rendered position based on the passed position\n var pos = this.position;\n var zoom = this.cy.zoom();\n var pan = this.cy.pan();\n this.renderedPosition = {\n x: pos.x * zoom + pan.x,\n y: pos.y * zoom + pan.y\n };\n }\n\n // Create a timestamp if incoming event doesn't have one\n this.timeStamp = src && src.timeStamp || Date.now();\n },\n preventDefault: function preventDefault() {\n this.isDefaultPrevented = returnTrue;\n var e = this.originalEvent;\n if (!e) {\n return;\n }\n\n // if preventDefault exists run it on the original event\n if (e.preventDefault) {\n e.preventDefault();\n }\n },\n stopPropagation: function stopPropagation() {\n this.isPropagationStopped = returnTrue;\n var e = this.originalEvent;\n if (!e) {\n return;\n }\n\n // if stopPropagation exists run it on the original event\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n },\n stopImmediatePropagation: function stopImmediatePropagation() {\n this.isImmediatePropagationStopped = returnTrue;\n this.stopPropagation();\n },\n isDefaultPrevented: returnFalse,\n isPropagationStopped: returnFalse,\n isImmediatePropagationStopped: returnFalse\n};\n\nvar eventRegex = /^([^.]+)(\\.(?:[^.]+))?$/; // regex for matching event strings (e.g. \"click.namespace\")\nvar universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally\n\nvar defaults$8 = {\n qualifierCompare: function qualifierCompare(q1, q2) {\n return q1 === q2;\n },\n eventMatches: function eventMatches( /*context, listener, eventObj*/\n ) {\n return true;\n },\n addEventFields: function addEventFields( /*context, evt*/\n ) {},\n callbackContext: function callbackContext(context /*, listener, eventObj*/) {\n return context;\n },\n beforeEmit: function beforeEmit( /* context, listener, eventObj */\n ) {},\n afterEmit: function afterEmit( /* context, listener, eventObj */\n ) {},\n bubble: function bubble( /*context*/\n ) {\n return false;\n },\n parent: function parent( /*context*/\n ) {\n return null;\n },\n context: null\n};\nvar defaultsKeys = Object.keys(defaults$8);\nvar emptyOpts = {};\nfunction Emitter() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts;\n var context = arguments.length > 1 ? arguments[1] : undefined;\n // micro-optimisation vs Object.assign() -- reduces Element instantiation time\n for (var i = 0; i < defaultsKeys.length; i++) {\n var key = defaultsKeys[i];\n this[key] = opts[key] || defaults$8[key];\n }\n this.context = context || this.context;\n this.listeners = [];\n this.emitting = 0;\n}\nvar p = Emitter.prototype;\nvar forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) {\n if (fn$6(qualifier)) {\n callback = qualifier;\n qualifier = null;\n }\n if (confOverrides) {\n if (conf == null) {\n conf = confOverrides;\n } else {\n conf = extend({}, conf, confOverrides);\n }\n }\n var eventList = array(events) ? events : events.split(/\\s+/);\n for (var i = 0; i < eventList.length; i++) {\n var evt = eventList[i];\n if (emptyString(evt)) {\n continue;\n }\n var match = evt.match(eventRegex); // type[.namespace]\n\n if (match) {\n var type = match[1];\n var namespace = match[2] ? match[2] : null;\n var ret = handler(self, evt, type, namespace, qualifier, callback, conf);\n if (ret === false) {\n break;\n } // allow exiting early\n }\n }\n};\n\nvar makeEventObj = function makeEventObj(self, obj) {\n self.addEventFields(self.context, obj);\n return new Event(obj.type, obj);\n};\nvar forEachEventObj = function forEachEventObj(self, handler, events) {\n if (event(events)) {\n handler(self, events);\n return;\n } else if (plainObject(events)) {\n handler(self, makeEventObj(self, events));\n return;\n }\n var eventList = array(events) ? events : events.split(/\\s+/);\n for (var i = 0; i < eventList.length; i++) {\n var evt = eventList[i];\n if (emptyString(evt)) {\n continue;\n }\n var match = evt.match(eventRegex); // type[.namespace]\n\n if (match) {\n var type = match[1];\n var namespace = match[2] ? match[2] : null;\n var eventObj = makeEventObj(self, {\n type: type,\n namespace: namespace,\n target: self.context\n });\n handler(self, eventObj);\n }\n }\n};\np.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) {\n forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) {\n if (fn$6(callback)) {\n self.listeners.push({\n event: event,\n // full event string\n callback: callback,\n // callback to run\n type: type,\n // the event type (e.g. 'click')\n namespace: namespace,\n // the event namespace (e.g. \".foo\")\n qualifier: qualifier,\n // a restriction on whether to match this emitter\n conf: conf // additional configuration\n });\n }\n }, events, qualifier, callback, conf, confOverrides);\n return this;\n};\np.one = function (events, qualifier, callback, conf) {\n return this.on(events, qualifier, callback, conf, {\n one: true\n });\n};\np.removeListener = p.off = function (events, qualifier, callback, conf) {\n var _this = this;\n if (this.emitting !== 0) {\n this.listeners = copyArray$1(this.listeners);\n }\n var listeners = this.listeners;\n var _loop = function _loop(i) {\n var listener = listeners[i];\n forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/) {\n if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) {\n listeners.splice(i, 1);\n return false;\n }\n }, events, qualifier, callback, conf);\n };\n for (var i = listeners.length - 1; i >= 0; i--) {\n _loop(i);\n }\n return this;\n};\np.removeAllListeners = function () {\n return this.removeListener('*');\n};\np.emit = p.trigger = function (events, extraParams, manualCallback) {\n var listeners = this.listeners;\n var numListenersBeforeEmit = listeners.length;\n this.emitting++;\n if (!array(extraParams)) {\n extraParams = [extraParams];\n }\n forEachEventObj(this, function (self, eventObj) {\n if (manualCallback != null) {\n listeners = [{\n event: eventObj.event,\n type: eventObj.type,\n namespace: eventObj.namespace,\n callback: manualCallback\n }];\n numListenersBeforeEmit = listeners.length;\n }\n var _loop2 = function _loop2(i) {\n var listener = listeners[i];\n if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) {\n var args = [eventObj];\n if (extraParams != null) {\n push(args, extraParams);\n }\n self.beforeEmit(self.context, listener, eventObj);\n if (listener.conf && listener.conf.one) {\n self.listeners = self.listeners.filter(function (l) {\n return l !== listener;\n });\n }\n var context = self.callbackContext(self.context, listener, eventObj);\n var ret = listener.callback.apply(context, args);\n self.afterEmit(self.context, listener, eventObj);\n if (ret === false) {\n eventObj.stopPropagation();\n eventObj.preventDefault();\n }\n } // if listener matches\n };\n for (var i = 0; i < numListenersBeforeEmit; i++) {\n _loop2(i);\n } // for listener\n\n if (self.bubble(self.context) && !eventObj.isPropagationStopped()) {\n self.parent(self.context).emit(eventObj, extraParams);\n }\n }, events);\n this.emitting--;\n return this;\n};\n\nvar emitterOptions$1 = {\n qualifierCompare: function qualifierCompare(selector1, selector2) {\n if (selector1 == null || selector2 == null) {\n return selector1 == null && selector2 == null;\n } else {\n return selector1.sameText(selector2);\n }\n },\n eventMatches: function eventMatches(ele, listener, eventObj) {\n var selector = listener.qualifier;\n if (selector != null) {\n return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target);\n }\n return true;\n },\n addEventFields: function addEventFields(ele, evt) {\n evt.cy = ele.cy();\n evt.target = ele;\n },\n callbackContext: function callbackContext(ele, listener, eventObj) {\n return listener.qualifier != null ? eventObj.target : ele;\n },\n beforeEmit: function beforeEmit(context, listener /*, eventObj*/) {\n if (listener.conf && listener.conf.once) {\n listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback);\n }\n },\n bubble: function bubble() {\n return true;\n },\n parent: function parent(ele) {\n return ele.isChild() ? ele.parent() : ele.cy();\n }\n};\nvar argSelector$1 = function argSelector(arg) {\n if (string(arg)) {\n return new Selector(arg);\n } else {\n return arg;\n }\n};\nvar elesfn$9 = {\n createEmitter: function createEmitter() {\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var _p = ele._private;\n if (!_p.emitter) {\n _p.emitter = new Emitter(emitterOptions$1, ele);\n }\n }\n return this;\n },\n emitter: function emitter() {\n return this._private.emitter;\n },\n on: function on(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().on(events, argSel, callback);\n }\n return this;\n },\n removeListener: function removeListener(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().removeListener(events, argSel, callback);\n }\n return this;\n },\n removeAllListeners: function removeAllListeners() {\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().removeAllListeners();\n }\n return this;\n },\n one: function one(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().one(events, argSel, callback);\n }\n return this;\n },\n once: function once(events, selector, callback) {\n var argSel = argSelector$1(selector);\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().on(events, argSel, callback, {\n once: true,\n onceCollection: this\n });\n }\n },\n emit: function emit(events, extraParams) {\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n ele.emitter().emit(events, extraParams);\n }\n return this;\n },\n emitAndNotify: function emitAndNotify(event, extraParams) {\n // for internal use only\n if (this.length === 0) {\n return;\n } // empty collections don't need to notify anything\n\n // notify renderer\n this.cy().notify(event, this);\n this.emit(event, extraParams);\n return this;\n }\n};\ndefine.eventAliasesOn(elesfn$9);\n\nvar elesfn$8 = {\n nodes: function nodes(selector) {\n return this.filter(function (ele) {\n return ele.isNode();\n }).filter(selector);\n },\n edges: function edges(selector) {\n return this.filter(function (ele) {\n return ele.isEdge();\n }).filter(selector);\n },\n // internal helper to get nodes and edges as separate collections with single iteration over elements\n byGroup: function byGroup() {\n var nodes = this.spawn();\n var edges = this.spawn();\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n if (ele.isNode()) {\n nodes.push(ele);\n } else {\n edges.push(ele);\n }\n }\n return {\n nodes: nodes,\n edges: edges\n };\n },\n filter: function filter(_filter, thisArg) {\n if (_filter === undefined) {\n // check this first b/c it's the most common/performant case\n return this;\n } else if (string(_filter) || elementOrCollection(_filter)) {\n return new Selector(_filter).filter(this);\n } else if (fn$6(_filter)) {\n var filterEles = this.spawn();\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles);\n if (include) {\n filterEles.push(ele);\n }\n }\n return filterEles;\n }\n return this.spawn(); // if not handled by above, give 'em an empty collection\n },\n\n not: function not(toRemove) {\n if (!toRemove) {\n return this;\n } else {\n if (string(toRemove)) {\n toRemove = this.filter(toRemove);\n }\n var elements = this.spawn();\n for (var i = 0; i < this.length; i++) {\n var element = this[i];\n var remove = toRemove.has(element);\n if (!remove) {\n elements.push(element);\n }\n }\n return elements;\n }\n },\n absoluteComplement: function absoluteComplement() {\n var cy = this.cy();\n return cy.mutableElements().not(this);\n },\n intersect: function intersect(other) {\n // if a selector is specified, then filter by it instead\n if (string(other)) {\n var selector = other;\n return this.filter(selector);\n }\n var elements = this.spawn();\n var col1 = this;\n var col2 = other;\n var col1Smaller = this.length < other.length;\n var colS = col1Smaller ? col1 : col2;\n var colL = col1Smaller ? col2 : col1;\n for (var i = 0; i < colS.length; i++) {\n var ele = colS[i];\n if (colL.has(ele)) {\n elements.push(ele);\n }\n }\n return elements;\n },\n xor: function xor(other) {\n var cy = this._private.cy;\n if (string(other)) {\n other = cy.$(other);\n }\n var elements = this.spawn();\n var col1 = this;\n var col2 = other;\n var add = function add(col, other) {\n for (var i = 0; i < col.length; i++) {\n var ele = col[i];\n var id = ele._private.data.id;\n var inOther = other.hasElementWithId(id);\n if (!inOther) {\n elements.push(ele);\n }\n }\n };\n add(col1, col2);\n add(col2, col1);\n return elements;\n },\n diff: function diff(other) {\n var cy = this._private.cy;\n if (string(other)) {\n other = cy.$(other);\n }\n var left = this.spawn();\n var right = this.spawn();\n var both = this.spawn();\n var col1 = this;\n var col2 = other;\n var add = function add(col, other, retEles) {\n for (var i = 0; i < col.length; i++) {\n var ele = col[i];\n var id = ele._private.data.id;\n var inOther = other.hasElementWithId(id);\n if (inOther) {\n both.merge(ele);\n } else {\n retEles.push(ele);\n }\n }\n };\n add(col1, col2, left);\n add(col2, col1, right);\n return {\n left: left,\n right: right,\n both: both\n };\n },\n add: function add(toAdd) {\n var cy = this._private.cy;\n if (!toAdd) {\n return this;\n }\n if (string(toAdd)) {\n var selector = toAdd;\n toAdd = cy.mutableElements().filter(selector);\n }\n var elements = this.spawnSelf();\n for (var i = 0; i < toAdd.length; i++) {\n var ele = toAdd[i];\n var add = !this.has(ele);\n if (add) {\n elements.push(ele);\n }\n }\n return elements;\n },\n // in place merge on calling collection\n merge: function merge(toAdd) {\n var _p = this._private;\n var cy = _p.cy;\n if (!toAdd) {\n return this;\n }\n if (toAdd && string(toAdd)) {\n var selector = toAdd;\n toAdd = cy.mutableElements().filter(selector);\n }\n var map = _p.map;\n for (var i = 0; i < toAdd.length; i++) {\n var toAddEle = toAdd[i];\n var id = toAddEle._private.data.id;\n var add = !map.has(id);\n if (add) {\n var index = this.length++;\n this[index] = toAddEle;\n map.set(id, {\n ele: toAddEle,\n index: index\n });\n }\n }\n return this; // chaining\n },\n\n unmergeAt: function unmergeAt(i) {\n var ele = this[i];\n var id = ele.id();\n var _p = this._private;\n var map = _p.map;\n\n // remove ele\n this[i] = undefined;\n map[\"delete\"](id);\n var unmergedLastEle = i === this.length - 1;\n\n // replace empty spot with last ele in collection\n if (this.length > 1 && !unmergedLastEle) {\n var lastEleI = this.length - 1;\n var lastEle = this[lastEleI];\n var lastEleId = lastEle._private.data.id;\n this[lastEleI] = undefined;\n this[i] = lastEle;\n map.set(lastEleId, {\n ele: lastEle,\n index: i\n });\n }\n\n // the collection is now 1 ele smaller\n this.length--;\n return this;\n },\n // remove single ele in place in calling collection\n unmergeOne: function unmergeOne(ele) {\n ele = ele[0];\n var _p = this._private;\n var id = ele._private.data.id;\n var map = _p.map;\n var entry = map.get(id);\n if (!entry) {\n return this; // no need to remove\n }\n\n var i = entry.index;\n this.unmergeAt(i);\n return this;\n },\n // remove eles in place on calling collection\n unmerge: function unmerge(toRemove) {\n var cy = this._private.cy;\n if (!toRemove) {\n return this;\n }\n if (toRemove && string(toRemove)) {\n var selector = toRemove;\n toRemove = cy.mutableElements().filter(selector);\n }\n for (var i = 0; i < toRemove.length; i++) {\n this.unmergeOne(toRemove[i]);\n }\n return this; // chaining\n },\n\n unmergeBy: function unmergeBy(toRmFn) {\n for (var i = this.length - 1; i >= 0; i--) {\n var ele = this[i];\n if (toRmFn(ele)) {\n this.unmergeAt(i);\n }\n }\n return this;\n },\n map: function map(mapFn, thisArg) {\n var arr = [];\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles);\n arr.push(ret);\n }\n return arr;\n },\n reduce: function reduce(fn, initialValue) {\n var val = initialValue;\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n val = fn(val, eles[i], i, eles);\n }\n return val;\n },\n max: function max(valFn, thisArg) {\n var max = -Infinity;\n var maxEle;\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles);\n if (val > max) {\n max = val;\n maxEle = ele;\n }\n }\n return {\n value: max,\n ele: maxEle\n };\n },\n min: function min(valFn, thisArg) {\n var min = Infinity;\n var minEle;\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles);\n if (val < min) {\n min = val;\n minEle = ele;\n }\n }\n return {\n value: min,\n ele: minEle\n };\n }\n};\n\n// aliases\nvar fn$1 = elesfn$8;\nfn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add;\nfn$1['\\\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not;\nfn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect;\nfn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor;\nfn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter;\nfn$1.complement = fn$1.abscomp = fn$1.absoluteComplement;\n\nvar elesfn$7 = {\n isNode: function isNode() {\n return this.group() === 'nodes';\n },\n isEdge: function isEdge() {\n return this.group() === 'edges';\n },\n isLoop: function isLoop() {\n return this.isEdge() && this.source()[0] === this.target()[0];\n },\n isSimple: function isSimple() {\n return this.isEdge() && this.source()[0] !== this.target()[0];\n },\n group: function group() {\n var ele = this[0];\n if (ele) {\n return ele._private.group;\n }\n }\n};\n\n/**\n * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges),\n * and z-index (low to high). These styles affect how this applies:\n *\n * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the\n * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from\n * root to leaves of the compound graph. The last drawn is `top`.\n * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes.\n * `manual` ignores this convention and draws based on the `z-index` value setting.\n * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher\n * `z-index` will be drawn on top of an element with a lower `z-index`.\n */\nvar zIndexSort = function zIndexSort(a, b) {\n var cy = a.cy();\n var hasCompoundNodes = cy.hasCompoundNodes();\n function getDepth(ele) {\n var style = ele.pstyle('z-compound-depth');\n if (style.value === 'auto') {\n return hasCompoundNodes ? ele.zDepth() : 0;\n } else if (style.value === 'bottom') {\n return -1;\n } else if (style.value === 'top') {\n return MAX_INT$1;\n }\n // 'orphan'\n return 0;\n }\n var depthDiff = getDepth(a) - getDepth(b);\n if (depthDiff !== 0) {\n return depthDiff;\n }\n function getEleDepth(ele) {\n var style = ele.pstyle('z-index-compare');\n if (style.value === 'auto') {\n return ele.isNode() ? 1 : 0;\n }\n // 'manual'\n return 0;\n }\n var eleDiff = getEleDepth(a) - getEleDepth(b);\n if (eleDiff !== 0) {\n return eleDiff;\n }\n var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value;\n if (zDiff !== 0) {\n return zDiff;\n }\n // compare indices in the core (order added to graph w/ last on top)\n return a.poolIndex() - b.poolIndex();\n};\n\nvar elesfn$6 = {\n forEach: function forEach(fn, thisArg) {\n if (fn$6(fn)) {\n var N = this.length;\n for (var i = 0; i < N; i++) {\n var ele = this[i];\n var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this);\n if (ret === false) {\n break;\n } // exit each early on return false\n }\n }\n\n return this;\n },\n toArray: function toArray() {\n var array = [];\n for (var i = 0; i < this.length; i++) {\n array.push(this[i]);\n }\n return array;\n },\n slice: function slice(start, end) {\n var array = [];\n var thisSize = this.length;\n if (end == null) {\n end = thisSize;\n }\n if (start == null) {\n start = 0;\n }\n if (start < 0) {\n start = thisSize + start;\n }\n if (end < 0) {\n end = thisSize + end;\n }\n for (var i = start; i >= 0 && i < end && i < thisSize; i++) {\n array.push(this[i]);\n }\n return this.spawn(array);\n },\n size: function size() {\n return this.length;\n },\n eq: function eq(i) {\n return this[i] || this.spawn();\n },\n first: function first() {\n return this[0] || this.spawn();\n },\n last: function last() {\n return this[this.length - 1] || this.spawn();\n },\n empty: function empty() {\n return this.length === 0;\n },\n nonempty: function nonempty() {\n return !this.empty();\n },\n sort: function sort(sortFn) {\n if (!fn$6(sortFn)) {\n return this;\n }\n var sorted = this.toArray().sort(sortFn);\n return this.spawn(sorted);\n },\n sortByZIndex: function sortByZIndex() {\n return this.sort(zIndexSort);\n },\n zDepth: function zDepth() {\n var ele = this[0];\n if (!ele) {\n return undefined;\n }\n\n // let cy = ele.cy();\n var _p = ele._private;\n var group = _p.group;\n if (group === 'nodes') {\n var depth = _p.data.parent ? ele.parents().size() : 0;\n if (!ele.isParent()) {\n return MAX_INT$1 - 1; // childless nodes always on top\n }\n\n return depth;\n } else {\n var src = _p.source;\n var tgt = _p.target;\n var srcDepth = src.zDepth();\n var tgtDepth = tgt.zDepth();\n return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent\n }\n }\n};\n\nelesfn$6.each = elesfn$6.forEach;\nvar defineSymbolIterator = function defineSymbolIterator() {\n var typeofUndef = \"undefined\" ;\n var isIteratorSupported = (typeof Symbol === \"undefined\" ? \"undefined\" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef\n\n if (isIteratorSupported) {\n elesfn$6[Symbol.iterator] = function () {\n var _this = this;\n // eslint-disable-line no-undef\n var entry = {\n value: undefined,\n done: false\n };\n var i = 0;\n var length = this.length;\n return _defineProperty$1({\n next: function next() {\n if (i < length) {\n entry.value = _this[i++];\n } else {\n entry.value = undefined;\n entry.done = true;\n }\n return entry;\n }\n }, Symbol.iterator, function () {\n // eslint-disable-line no-undef\n return this;\n });\n };\n }\n};\ndefineSymbolIterator();\n\nvar getLayoutDimensionOptions = defaults$g({\n nodeDimensionsIncludeLabels: false\n});\nvar elesfn$5 = {\n // Calculates and returns node dimensions { x, y } based on options given\n layoutDimensions: function layoutDimensions(options) {\n options = getLayoutDimensionOptions(options);\n var dims;\n if (!this.takesUpSpace()) {\n dims = {\n w: 0,\n h: 0\n };\n } else if (options.nodeDimensionsIncludeLabels) {\n var bbDim = this.boundingBox();\n dims = {\n w: bbDim.w,\n h: bbDim.h\n };\n } else {\n dims = {\n w: this.outerWidth(),\n h: this.outerHeight()\n };\n }\n\n // sanitise the dimensions for external layouts (avoid division by zero)\n if (dims.w === 0 || dims.h === 0) {\n dims.w = dims.h = 1;\n }\n return dims;\n },\n // using standard layout options, apply position function (w/ or w/o animation)\n layoutPositions: function layoutPositions(layout, options, fn) {\n var nodes = this.nodes().filter(function (n) {\n return !n.isParent();\n });\n var cy = this.cy();\n var layoutEles = options.eles; // nodes & edges\n var getMemoizeKey = function getMemoizeKey(node) {\n return node.id();\n };\n var fnMem = memoize$1(fn, getMemoizeKey); // memoized version of position function\n\n layout.emit({\n type: 'layoutstart',\n layout: layout\n });\n layout.animations = [];\n var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) {\n var center = {\n x: nodesBb.x1 + nodesBb.w / 2,\n y: nodesBb.y1 + nodesBb.h / 2\n };\n var spacingVector = {\n // scale from center of bounding box (not necessarily 0,0)\n x: (pos.x - center.x) * spacing,\n y: (pos.y - center.y) * spacing\n };\n return {\n x: center.x + spacingVector.x,\n y: center.y + spacingVector.y\n };\n };\n var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1;\n var spacingBb = function spacingBb() {\n if (!useSpacingFactor) {\n return null;\n }\n var bb = makeBoundingBox();\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var pos = fnMem(node, i);\n expandBoundingBoxByPoint(bb, pos.x, pos.y);\n }\n return bb;\n };\n var bb = spacingBb();\n var getFinalPos = memoize$1(function (node, i) {\n var newPos = fnMem(node, i);\n if (useSpacingFactor) {\n var spacing = Math.abs(options.spacingFactor);\n newPos = calculateSpacing(spacing, bb, newPos);\n }\n if (options.transform != null) {\n newPos = options.transform(node, newPos);\n }\n return newPos;\n }, getMemoizeKey);\n if (options.animate) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var newPos = getFinalPos(node, i);\n var animateNode = options.animateFilter == null || options.animateFilter(node, i);\n if (animateNode) {\n var ani = node.animation({\n position: newPos,\n duration: options.animationDuration,\n easing: options.animationEasing\n });\n layout.animations.push(ani);\n } else {\n node.position(newPos);\n }\n }\n if (options.fit) {\n var fitAni = cy.animation({\n fit: {\n boundingBox: layoutEles.boundingBoxAt(getFinalPos),\n padding: options.padding\n },\n duration: options.animationDuration,\n easing: options.animationEasing\n });\n layout.animations.push(fitAni);\n } else if (options.zoom !== undefined && options.pan !== undefined) {\n var zoomPanAni = cy.animation({\n zoom: options.zoom,\n pan: options.pan,\n duration: options.animationDuration,\n easing: options.animationEasing\n });\n layout.animations.push(zoomPanAni);\n }\n layout.animations.forEach(function (ani) {\n return ani.play();\n });\n layout.one('layoutready', options.ready);\n layout.emit({\n type: 'layoutready',\n layout: layout\n });\n Promise$1.all(layout.animations.map(function (ani) {\n return ani.promise();\n })).then(function () {\n layout.one('layoutstop', options.stop);\n layout.emit({\n type: 'layoutstop',\n layout: layout\n });\n });\n } else {\n nodes.positions(getFinalPos);\n if (options.fit) {\n cy.fit(options.eles, options.padding);\n }\n if (options.zoom != null) {\n cy.zoom(options.zoom);\n }\n if (options.pan) {\n cy.pan(options.pan);\n }\n layout.one('layoutready', options.ready);\n layout.emit({\n type: 'layoutready',\n layout: layout\n });\n layout.one('layoutstop', options.stop);\n layout.emit({\n type: 'layoutstop',\n layout: layout\n });\n }\n return this; // chaining\n },\n\n layout: function layout(options) {\n var cy = this.cy();\n return cy.makeLayout(extend({}, options, {\n eles: this\n }));\n }\n};\n\n// aliases:\nelesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout;\n\nfunction styleCache(key, fn, ele) {\n var _p = ele._private;\n var cache = _p.styleCache = _p.styleCache || [];\n var val;\n if ((val = cache[key]) != null) {\n return val;\n } else {\n val = cache[key] = fn(ele);\n return val;\n }\n}\nfunction cacheStyleFunction(key, fn) {\n key = hashString(key);\n return function cachedStyleFunction(ele) {\n return styleCache(key, fn, ele);\n };\n}\nfunction cachePrototypeStyleFunction(key, fn) {\n key = hashString(key);\n var selfFn = function selfFn(ele) {\n return fn.call(ele);\n };\n return function cachedPrototypeStyleFunction() {\n var ele = this[0];\n if (ele) {\n return styleCache(key, selfFn, ele);\n }\n };\n}\nvar elesfn$4 = {\n recalculateRenderedStyle: function recalculateRenderedStyle(useCache) {\n var cy = this.cy();\n var renderer = cy.renderer();\n var styleEnabled = cy.styleEnabled();\n if (renderer && styleEnabled) {\n renderer.recalculateRenderedStyle(this, useCache);\n }\n return this;\n },\n dirtyStyleCache: function dirtyStyleCache() {\n var cy = this.cy();\n var dirty = function dirty(ele) {\n return ele._private.styleCache = null;\n };\n if (cy.hasCompoundNodes()) {\n var eles;\n eles = this.spawnSelf().merge(this.descendants()).merge(this.parents());\n eles.merge(eles.connectedEdges());\n eles.forEach(dirty);\n } else {\n this.forEach(function (ele) {\n dirty(ele);\n ele.connectedEdges().forEach(dirty);\n });\n }\n return this;\n },\n // fully updates (recalculates) the style for the elements\n updateStyle: function updateStyle(notifyRenderer) {\n var cy = this._private.cy;\n if (!cy.styleEnabled()) {\n return this;\n }\n if (cy.batching()) {\n var bEles = cy._private.batchStyleEles;\n bEles.merge(this);\n return this; // chaining and exit early when batching\n }\n\n var hasCompounds = cy.hasCompoundNodes();\n var updatedEles = this;\n notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false;\n if (hasCompounds) {\n // then add everything up and down for compound selector checks\n updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents());\n }\n\n // let changedEles = style.apply( updatedEles );\n var changedEles = updatedEles;\n if (notifyRenderer) {\n changedEles.emitAndNotify('style'); // let renderer know we changed style\n } else {\n changedEles.emit('style'); // just fire the event\n }\n\n updatedEles.forEach(function (ele) {\n return ele._private.styleDirty = true;\n });\n return this; // chaining\n },\n\n // private: clears dirty flag and recalculates style\n cleanStyle: function cleanStyle() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return;\n }\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n if (ele._private.styleDirty) {\n // n.b. this flag should be set before apply() to avoid potential infinite recursion\n ele._private.styleDirty = false;\n cy.style().apply(ele);\n }\n }\n },\n // get the internal parsed style object for the specified property\n parsedStyle: function parsedStyle(property) {\n var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var ele = this[0];\n var cy = ele.cy();\n if (!cy.styleEnabled()) {\n return;\n }\n if (ele) {\n this.cleanStyle();\n var overriddenStyle = ele._private.style[property];\n if (overriddenStyle != null) {\n return overriddenStyle;\n } else if (includeNonDefault) {\n return cy.style().getDefaultProperty(property);\n } else {\n return null;\n }\n }\n },\n numericStyle: function numericStyle(property) {\n var ele = this[0];\n if (!ele.cy().styleEnabled()) {\n return;\n }\n if (ele) {\n var pstyle = ele.pstyle(property);\n return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value;\n }\n },\n numericStyleUnits: function numericStyleUnits(property) {\n var ele = this[0];\n if (!ele.cy().styleEnabled()) {\n return;\n }\n if (ele) {\n return ele.pstyle(property).units;\n }\n },\n // get the specified css property as a rendered value (i.e. on-screen value)\n // or get the whole rendered style if no property specified (NB doesn't allow setting)\n renderedStyle: function renderedStyle(property) {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return this;\n }\n var ele = this[0];\n if (ele) {\n return cy.style().getRenderedStyle(ele, property);\n }\n },\n // read the calculated css style of the element or override the style (via a bypass)\n style: function style(name, value) {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return this;\n }\n var updateTransitions = false;\n var style = cy.style();\n if (plainObject(name)) {\n // then extend the bypass\n var props = name;\n style.applyBypass(this, props, updateTransitions);\n this.emitAndNotify('style'); // let the renderer know we've updated style\n } else if (string(name)) {\n if (value === undefined) {\n // then get the property from the style\n var ele = this[0];\n if (ele) {\n return style.getStylePropertyValue(ele, name);\n } else {\n // empty collection => can't get any value\n return;\n }\n } else {\n // then set the bypass with the property value\n style.applyBypass(this, name, value, updateTransitions);\n this.emitAndNotify('style'); // let the renderer know we've updated style\n }\n } else if (name === undefined) {\n var _ele = this[0];\n if (_ele) {\n return style.getRawStyle(_ele);\n } else {\n // empty collection => can't get any value\n return;\n }\n }\n return this; // chaining\n },\n\n removeStyle: function removeStyle(names) {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return this;\n }\n var updateTransitions = false;\n var style = cy.style();\n var eles = this;\n if (names === undefined) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n style.removeAllBypasses(ele, updateTransitions);\n }\n } else {\n names = names.split(/\\s+/);\n for (var _i = 0; _i < eles.length; _i++) {\n var _ele2 = eles[_i];\n style.removeBypasses(_ele2, names, updateTransitions);\n }\n }\n this.emitAndNotify('style'); // let the renderer know we've updated style\n\n return this; // chaining\n },\n\n show: function show() {\n this.css('display', 'element');\n return this; // chaining\n },\n\n hide: function hide() {\n this.css('display', 'none');\n return this; // chaining\n },\n\n effectiveOpacity: function effectiveOpacity() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return 1;\n }\n var hasCompoundNodes = cy.hasCompoundNodes();\n var ele = this[0];\n if (ele) {\n var _p = ele._private;\n var parentOpacity = ele.pstyle('opacity').value;\n if (!hasCompoundNodes) {\n return parentOpacity;\n }\n var parents = !_p.data.parent ? null : ele.parents();\n if (parents) {\n for (var i = 0; i < parents.length; i++) {\n var parent = parents[i];\n var opacity = parent.pstyle('opacity').value;\n parentOpacity = opacity * parentOpacity;\n }\n }\n return parentOpacity;\n }\n },\n transparent: function transparent() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return false;\n }\n var ele = this[0];\n var hasCompoundNodes = ele.cy().hasCompoundNodes();\n if (ele) {\n if (!hasCompoundNodes) {\n return ele.pstyle('opacity').value === 0;\n } else {\n return ele.effectiveOpacity() === 0;\n }\n }\n },\n backgrounding: function backgrounding() {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return false;\n }\n var ele = this[0];\n return ele._private.backgrounding ? true : false;\n }\n};\nfunction checkCompound(ele, parentOk) {\n var _p = ele._private;\n var parents = _p.data.parent ? ele.parents() : null;\n if (parents) {\n for (var i = 0; i < parents.length; i++) {\n var parent = parents[i];\n if (!parentOk(parent)) {\n return false;\n }\n }\n }\n return true;\n}\nfunction defineDerivedStateFunction(specs) {\n var ok = specs.ok;\n var edgeOkViaNode = specs.edgeOkViaNode || specs.ok;\n var parentOk = specs.parentOk || specs.ok;\n return function () {\n var cy = this.cy();\n if (!cy.styleEnabled()) {\n return true;\n }\n var ele = this[0];\n var hasCompoundNodes = cy.hasCompoundNodes();\n if (ele) {\n var _p = ele._private;\n if (!ok(ele)) {\n return false;\n }\n if (ele.isNode()) {\n return !hasCompoundNodes || checkCompound(ele, parentOk);\n } else {\n var src = _p.source;\n var tgt = _p.target;\n return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode)));\n }\n }\n };\n}\nvar eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) {\n return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true);\n});\nelesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({\n ok: eleTakesUpSpace\n}));\nvar eleInteractive = cacheStyleFunction('eleInteractive', function (ele) {\n return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele);\n});\nvar parentInteractive = cacheStyleFunction('parentInteractive', function (parent) {\n return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent);\n});\nelesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({\n ok: eleInteractive,\n parentOk: parentInteractive,\n edgeOkViaNode: eleTakesUpSpace\n}));\nelesfn$4.noninteractive = function () {\n var ele = this[0];\n if (ele) {\n return !ele.interactive();\n }\n};\nvar eleVisible = cacheStyleFunction('eleVisible', function (ele) {\n return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele);\n});\nvar edgeVisibleViaNode = eleTakesUpSpace;\nelesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({\n ok: eleVisible,\n edgeOkViaNode: edgeVisibleViaNode\n}));\nelesfn$4.hidden = function () {\n var ele = this[0];\n if (ele) {\n return !ele.visible();\n }\n};\nelesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () {\n if (!this.cy().styleEnabled()) {\n return false;\n }\n return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace();\n});\nelesfn$4.bypass = elesfn$4.css = elesfn$4.style;\nelesfn$4.renderedCss = elesfn$4.renderedStyle;\nelesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle;\nelesfn$4.pstyle = elesfn$4.parsedStyle;\n\nvar elesfn$3 = {};\nfunction defineSwitchFunction(params) {\n return function () {\n var args = arguments;\n var changedEles = [];\n\n // e.g. cy.nodes().select( data, handler )\n if (args.length === 2) {\n var data = args[0];\n var handler = args[1];\n this.on(params.event, data, handler);\n }\n\n // e.g. cy.nodes().select( handler )\n else if (args.length === 1 && fn$6(args[0])) {\n var _handler = args[0];\n this.on(params.event, _handler);\n }\n\n // e.g. cy.nodes().select()\n // e.g. (private) cy.nodes().select(['tapselect'])\n else if (args.length === 0 || args.length === 1 && array(args[0])) {\n var addlEvents = args.length === 1 ? args[0] : null;\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var able = !params.ableField || ele._private[params.ableField];\n var changed = ele._private[params.field] != params.value;\n if (params.overrideAble) {\n var overrideAble = params.overrideAble(ele);\n if (overrideAble !== undefined) {\n able = overrideAble;\n if (!overrideAble) {\n return this;\n } // to save cycles assume not able for all on override\n }\n }\n\n if (able) {\n ele._private[params.field] = params.value;\n if (changed) {\n changedEles.push(ele);\n }\n }\n }\n var changedColl = this.spawn(changedEles);\n changedColl.updateStyle(); // change of state => possible change of style\n changedColl.emit(params.event);\n if (addlEvents) {\n changedColl.emit(addlEvents);\n }\n }\n return this;\n };\n}\nfunction defineSwitchSet(params) {\n elesfn$3[params.field] = function () {\n var ele = this[0];\n if (ele) {\n if (params.overrideField) {\n var val = params.overrideField(ele);\n if (val !== undefined) {\n return val;\n }\n }\n return ele._private[params.field];\n }\n };\n elesfn$3[params.on] = defineSwitchFunction({\n event: params.on,\n field: params.field,\n ableField: params.ableField,\n overrideAble: params.overrideAble,\n value: true\n });\n elesfn$3[params.off] = defineSwitchFunction({\n event: params.off,\n field: params.field,\n ableField: params.ableField,\n overrideAble: params.overrideAble,\n value: false\n });\n}\ndefineSwitchSet({\n field: 'locked',\n overrideField: function overrideField(ele) {\n return ele.cy().autolock() ? true : undefined;\n },\n on: 'lock',\n off: 'unlock'\n});\ndefineSwitchSet({\n field: 'grabbable',\n overrideField: function overrideField(ele) {\n return ele.cy().autoungrabify() || ele.pannable() ? false : undefined;\n },\n on: 'grabify',\n off: 'ungrabify'\n});\ndefineSwitchSet({\n field: 'selected',\n ableField: 'selectable',\n overrideAble: function overrideAble(ele) {\n return ele.cy().autounselectify() ? false : undefined;\n },\n on: 'select',\n off: 'unselect'\n});\ndefineSwitchSet({\n field: 'selectable',\n overrideField: function overrideField(ele) {\n return ele.cy().autounselectify() ? false : undefined;\n },\n on: 'selectify',\n off: 'unselectify'\n});\nelesfn$3.deselect = elesfn$3.unselect;\nelesfn$3.grabbed = function () {\n var ele = this[0];\n if (ele) {\n return ele._private.grabbed;\n }\n};\ndefineSwitchSet({\n field: 'active',\n on: 'activate',\n off: 'unactivate'\n});\ndefineSwitchSet({\n field: 'pannable',\n on: 'panify',\n off: 'unpanify'\n});\nelesfn$3.inactive = function () {\n var ele = this[0];\n if (ele) {\n return !ele._private.active;\n }\n};\n\nvar elesfn$2 = {};\n\n// DAG functions\n////////////////\n\nvar defineDagExtremity = function defineDagExtremity(params) {\n return function dagExtremityImpl(selector) {\n var eles = this;\n var ret = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.isNode()) {\n continue;\n }\n var disqualified = false;\n var edges = ele.connectedEdges();\n for (var j = 0; j < edges.length; j++) {\n var edge = edges[j];\n var src = edge.source();\n var tgt = edge.target();\n if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) {\n disqualified = true;\n break;\n }\n }\n if (!disqualified) {\n ret.push(ele);\n }\n }\n return this.spawn(ret, true).filter(selector);\n };\n};\nvar defineDagOneHop = function defineDagOneHop(params) {\n return function (selector) {\n var eles = this;\n var oEles = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.isNode()) {\n continue;\n }\n var edges = ele.connectedEdges();\n for (var j = 0; j < edges.length; j++) {\n var edge = edges[j];\n var src = edge.source();\n var tgt = edge.target();\n if (params.outgoing && src === ele) {\n oEles.push(edge);\n oEles.push(tgt);\n } else if (params.incoming && tgt === ele) {\n oEles.push(edge);\n oEles.push(src);\n }\n }\n }\n return this.spawn(oEles, true).filter(selector);\n };\n};\nvar defineDagAllHops = function defineDagAllHops(params) {\n return function (selector) {\n var eles = this;\n var sEles = [];\n var sElesIds = {};\n for (;;) {\n var next = params.outgoing ? eles.outgoers() : eles.incomers();\n if (next.length === 0) {\n break;\n } // done if none left\n\n var newNext = false;\n for (var i = 0; i < next.length; i++) {\n var n = next[i];\n var nid = n.id();\n if (!sElesIds[nid]) {\n sElesIds[nid] = true;\n sEles.push(n);\n newNext = true;\n }\n }\n if (!newNext) {\n break;\n } // done if touched all outgoers already\n\n eles = next;\n }\n return this.spawn(sEles, true).filter(selector);\n };\n};\nelesfn$2.clearTraversalCache = function () {\n for (var i = 0; i < this.length; i++) {\n this[i]._private.traversalCache = null;\n }\n};\nextend(elesfn$2, {\n // get the root nodes in the DAG\n roots: defineDagExtremity({\n noIncomingEdges: true\n }),\n // get the leaf nodes in the DAG\n leaves: defineDagExtremity({\n noOutgoingEdges: true\n }),\n // normally called children in graph theory\n // these nodes =edges=> outgoing nodes\n outgoers: cache(defineDagOneHop({\n outgoing: true\n }), 'outgoers'),\n // aka DAG descendants\n successors: defineDagAllHops({\n outgoing: true\n }),\n // normally called parents in graph theory\n // these nodes <=edges= incoming nodes\n incomers: cache(defineDagOneHop({\n incoming: true\n }), 'incomers'),\n // aka DAG ancestors\n predecessors: defineDagAllHops({\n incoming: true\n })\n});\n\n// Neighbourhood functions\n//////////////////////////\n\nextend(elesfn$2, {\n neighborhood: cache(function (selector) {\n var elements = [];\n var nodes = this.nodes();\n for (var i = 0; i < nodes.length; i++) {\n // for all nodes\n var node = nodes[i];\n var connectedEdges = node.connectedEdges();\n\n // for each connected edge, add the edge and the other node\n for (var j = 0; j < connectedEdges.length; j++) {\n var edge = connectedEdges[j];\n var src = edge.source();\n var tgt = edge.target();\n var otherNode = node === src ? tgt : src;\n\n // need check in case of loop\n if (otherNode.length > 0) {\n elements.push(otherNode[0]); // add node 1 hop away\n }\n\n // add connected edge\n elements.push(edge[0]);\n }\n }\n return this.spawn(elements, true).filter(selector);\n }, 'neighborhood'),\n closedNeighborhood: function closedNeighborhood(selector) {\n return this.neighborhood().add(this).filter(selector);\n },\n openNeighborhood: function openNeighborhood(selector) {\n return this.neighborhood(selector);\n }\n});\n\n// aliases\nelesfn$2.neighbourhood = elesfn$2.neighborhood;\nelesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood;\nelesfn$2.openNeighbourhood = elesfn$2.openNeighborhood;\n\n// Edge functions\n/////////////////\n\nextend(elesfn$2, {\n source: cache(function sourceImpl(selector) {\n var ele = this[0];\n var src;\n if (ele) {\n src = ele._private.source || ele.cy().collection();\n }\n return src && selector ? src.filter(selector) : src;\n }, 'source'),\n target: cache(function targetImpl(selector) {\n var ele = this[0];\n var tgt;\n if (ele) {\n tgt = ele._private.target || ele.cy().collection();\n }\n return tgt && selector ? tgt.filter(selector) : tgt;\n }, 'target'),\n sources: defineSourceFunction({\n attr: 'source'\n }),\n targets: defineSourceFunction({\n attr: 'target'\n })\n});\nfunction defineSourceFunction(params) {\n return function sourceImpl(selector) {\n var sources = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var src = ele._private[params.attr];\n if (src) {\n sources.push(src);\n }\n }\n return this.spawn(sources, true).filter(selector);\n };\n}\nextend(elesfn$2, {\n edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'),\n edgesTo: cache(defineEdgesWithFunction({\n thisIsSrc: true\n }), 'edgesTo')\n});\nfunction defineEdgesWithFunction(params) {\n return function edgesWithImpl(otherNodes) {\n var elements = [];\n var cy = this._private.cy;\n var p = params || {};\n\n // get elements if a selector is specified\n if (string(otherNodes)) {\n otherNodes = cy.$(otherNodes);\n }\n for (var h = 0; h < otherNodes.length; h++) {\n var edges = otherNodes[h]._private.edges;\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var edgeData = edge._private.data;\n var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target);\n var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target);\n var edgeConnectsThisAndOther = thisToOther || otherToThis;\n if (!edgeConnectsThisAndOther) {\n continue;\n }\n if (p.thisIsSrc || p.thisIsTgt) {\n if (p.thisIsSrc && !thisToOther) {\n continue;\n }\n if (p.thisIsTgt && !otherToThis) {\n continue;\n }\n }\n elements.push(edge);\n }\n }\n return this.spawn(elements, true);\n };\n}\nextend(elesfn$2, {\n connectedEdges: cache(function (selector) {\n var retEles = [];\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var node = eles[i];\n if (!node.isNode()) {\n continue;\n }\n var edges = node._private.edges;\n for (var j = 0; j < edges.length; j++) {\n var edge = edges[j];\n retEles.push(edge);\n }\n }\n return this.spawn(retEles, true).filter(selector);\n }, 'connectedEdges'),\n connectedNodes: cache(function (selector) {\n var retEles = [];\n var eles = this;\n for (var i = 0; i < eles.length; i++) {\n var edge = eles[i];\n if (!edge.isEdge()) {\n continue;\n }\n retEles.push(edge.source()[0]);\n retEles.push(edge.target()[0]);\n }\n return this.spawn(retEles, true).filter(selector);\n }, 'connectedNodes'),\n parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'),\n codirectedEdges: cache(defineParallelEdgesFunction({\n codirected: true\n }), 'codirectedEdges')\n});\nfunction defineParallelEdgesFunction(params) {\n var defaults = {\n codirected: false\n };\n params = extend({}, defaults, params);\n return function parallelEdgesImpl(selector) {\n // micro-optimised for renderer\n var elements = [];\n var edges = this.edges();\n var p = params;\n\n // look at all the edges in the collection\n for (var i = 0; i < edges.length; i++) {\n var edge1 = edges[i];\n var edge1_p = edge1._private;\n var src1 = edge1_p.source;\n var srcid1 = src1._private.data.id;\n var tgtid1 = edge1_p.data.target;\n var srcEdges1 = src1._private.edges;\n\n // look at edges connected to the src node of this edge\n for (var j = 0; j < srcEdges1.length; j++) {\n var edge2 = srcEdges1[j];\n var edge2data = edge2._private.data;\n var tgtid2 = edge2data.target;\n var srcid2 = edge2data.source;\n var codirected = tgtid2 === tgtid1 && srcid2 === srcid1;\n var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2;\n if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) {\n elements.push(edge2);\n }\n }\n }\n return this.spawn(elements, true).filter(selector);\n };\n}\n\n// Misc functions\n/////////////////\n\nextend(elesfn$2, {\n components: function components(root) {\n var self = this;\n var cy = self.cy();\n var visited = cy.collection();\n var unvisited = root == null ? self.nodes() : root.nodes();\n var components = [];\n if (root != null && unvisited.empty()) {\n // root may contain only edges\n unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides\n }\n\n var visitInComponent = function visitInComponent(node, component) {\n visited.merge(node);\n unvisited.unmerge(node);\n component.merge(node);\n };\n if (unvisited.empty()) {\n return self.spawn();\n }\n var _loop = function _loop() {\n // each iteration yields a component\n var cmpt = cy.collection();\n components.push(cmpt);\n var root = unvisited[0];\n visitInComponent(root, cmpt);\n self.bfs({\n directed: false,\n roots: root,\n visit: function visit(v) {\n return visitInComponent(v, cmpt);\n }\n });\n cmpt.forEach(function (node) {\n node.connectedEdges().forEach(function (e) {\n // connectedEdges() usually cached\n if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) {\n // has() is cheap\n cmpt.merge(e); // forEach() only considers nodes -- sets N at call time\n }\n });\n });\n };\n do {\n _loop();\n } while (unvisited.length > 0);\n return components;\n },\n component: function component() {\n var ele = this[0];\n return ele.cy().mutableElements().components(ele)[0];\n }\n});\nelesfn$2.componentsOf = elesfn$2.components;\n\n// represents a set of nodes, edges, or both together\nvar Collection = function Collection(cy, elements) {\n var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (cy === undefined) {\n error('A collection must have a reference to the core');\n return;\n }\n var map = new Map$2();\n var createdElements = false;\n if (!elements) {\n elements = [];\n } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) {\n createdElements = true;\n\n // make elements from json and restore all at once later\n var eles = [];\n var elesIds = new Set$1();\n for (var i = 0, l = elements.length; i < l; i++) {\n var json = elements[i];\n if (json.data == null) {\n json.data = {};\n }\n var _data = json.data;\n\n // make sure newly created elements have valid ids\n if (_data.id == null) {\n _data.id = uuid();\n } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) {\n continue; // can't create element if prior id already exists\n }\n\n var ele = new Element(cy, json, false);\n eles.push(ele);\n elesIds.add(_data.id);\n }\n elements = eles;\n }\n this.length = 0;\n for (var _i = 0, _l = elements.length; _i < _l; _i++) {\n var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements\n if (element$1 == null) {\n continue;\n }\n var id = element$1._private.data.id;\n if (!unique || !map.has(id)) {\n if (unique) {\n map.set(id, {\n index: this.length,\n ele: element$1\n });\n }\n this[this.length] = element$1;\n this.length++;\n }\n }\n this._private = {\n eles: this,\n cy: cy,\n get map() {\n if (this.lazyMap == null) {\n this.rebuildMap();\n }\n return this.lazyMap;\n },\n set map(m) {\n this.lazyMap = m;\n },\n rebuildMap: function rebuildMap() {\n var m = this.lazyMap = new Map$2();\n var eles = this.eles;\n for (var _i2 = 0; _i2 < eles.length; _i2++) {\n var _ele = eles[_i2];\n m.set(_ele.id(), {\n index: _i2,\n ele: _ele\n });\n }\n }\n };\n if (unique) {\n this._private.map = map;\n }\n\n // restore the elements if we created them from json\n if (createdElements && !removed) {\n this.restore();\n }\n};\n\n// Functions\n////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// keep the prototypes in sync (an element has the same functions as a collection)\n// and use elefn and elesfn as shorthands to the prototypes\nvar elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype);\nelesfn$1.instanceString = function () {\n return 'collection';\n};\nelesfn$1.spawn = function (eles, unique) {\n return new Collection(this.cy(), eles, unique);\n};\nelesfn$1.spawnSelf = function () {\n return this.spawn(this);\n};\nelesfn$1.cy = function () {\n return this._private.cy;\n};\nelesfn$1.renderer = function () {\n return this._private.cy.renderer();\n};\nelesfn$1.element = function () {\n return this[0];\n};\nelesfn$1.collection = function () {\n if (collection(this)) {\n return this;\n } else {\n // an element\n return new Collection(this._private.cy, [this]);\n }\n};\nelesfn$1.unique = function () {\n return new Collection(this._private.cy, this, true);\n};\nelesfn$1.hasElementWithId = function (id) {\n id = '' + id; // id must be string\n\n return this._private.map.has(id);\n};\nelesfn$1.getElementById = function (id) {\n id = '' + id; // id must be string\n\n var cy = this._private.cy;\n var entry = this._private.map.get(id);\n return entry ? entry.ele : new Collection(cy); // get ele or empty collection\n};\n\nelesfn$1.$id = elesfn$1.getElementById;\nelesfn$1.poolIndex = function () {\n var cy = this._private.cy;\n var eles = cy._private.elements;\n var id = this[0]._private.data.id;\n return eles._private.map.get(id).index;\n};\nelesfn$1.indexOf = function (ele) {\n var id = ele[0]._private.data.id;\n return this._private.map.get(id).index;\n};\nelesfn$1.indexOfId = function (id) {\n id = '' + id; // id must be string\n\n return this._private.map.get(id).index;\n};\nelesfn$1.json = function (obj) {\n var ele = this.element();\n var cy = this.cy();\n if (ele == null && obj) {\n return this;\n } // can't set to no eles\n\n if (ele == null) {\n return undefined;\n } // can't get from no eles\n\n var p = ele._private;\n if (plainObject(obj)) {\n // set\n\n cy.startBatch();\n if (obj.data) {\n ele.data(obj.data);\n var _data2 = p.data;\n if (ele.isEdge()) {\n // source and target are immutable via data()\n var move = false;\n var spec = {};\n var src = obj.data.source;\n var tgt = obj.data.target;\n if (src != null && src != _data2.source) {\n spec.source = '' + src; // id must be string\n move = true;\n }\n if (tgt != null && tgt != _data2.target) {\n spec.target = '' + tgt; // id must be string\n move = true;\n }\n if (move) {\n ele = ele.move(spec);\n }\n } else {\n // parent is immutable via data()\n var newParentValSpecd = ('parent' in obj.data);\n var parent = obj.data.parent;\n if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) {\n if (parent === undefined) {\n // can't set undefined imperatively, so use null\n parent = null;\n }\n if (parent != null) {\n parent = '' + parent; // id must be string\n }\n\n ele = ele.move({\n parent: parent\n });\n }\n }\n }\n if (obj.position) {\n ele.position(obj.position);\n }\n\n // ignore group -- immutable\n\n var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) {\n var obj_k = obj[k];\n if (obj_k != null && obj_k !== p[k]) {\n if (obj_k) {\n ele[trueFnName]();\n } else {\n ele[falseFnName]();\n }\n }\n };\n checkSwitch('removed', 'remove', 'restore');\n checkSwitch('selected', 'select', 'unselect');\n checkSwitch('selectable', 'selectify', 'unselectify');\n checkSwitch('locked', 'lock', 'unlock');\n checkSwitch('grabbable', 'grabify', 'ungrabify');\n checkSwitch('pannable', 'panify', 'unpanify');\n if (obj.classes != null) {\n ele.classes(obj.classes);\n }\n cy.endBatch();\n return this;\n } else if (obj === undefined) {\n // get\n\n var json = {\n data: copy(p.data),\n position: copy(p.position),\n group: p.group,\n removed: p.removed,\n selected: p.selected,\n selectable: p.selectable,\n locked: p.locked,\n grabbable: p.grabbable,\n pannable: p.pannable,\n classes: null\n };\n json.classes = '';\n var i = 0;\n p.classes.forEach(function (cls) {\n return json.classes += i++ === 0 ? cls : ' ' + cls;\n });\n return json;\n }\n};\nelesfn$1.jsons = function () {\n var jsons = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var json = ele.json();\n jsons.push(json);\n }\n return jsons;\n};\nelesfn$1.clone = function () {\n var cy = this.cy();\n var elesArr = [];\n for (var i = 0; i < this.length; i++) {\n var ele = this[i];\n var json = ele.json();\n var clone = new Element(cy, json, false); // NB no restore\n\n elesArr.push(clone);\n }\n return new Collection(cy, elesArr);\n};\nelesfn$1.copy = elesfn$1.clone;\nelesfn$1.restore = function () {\n var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var self = this;\n var cy = self.cy();\n var cy_p = cy._private;\n\n // create arrays of nodes and edges, since we need to\n // restore the nodes first\n var nodes = [];\n var edges = [];\n var elements;\n for (var _i3 = 0, l = self.length; _i3 < l; _i3++) {\n var ele = self[_i3];\n if (addToPool && !ele.removed()) {\n // don't need to handle this ele\n continue;\n }\n\n // keep nodes first in the array and edges after\n if (ele.isNode()) {\n // put to front of array if node\n nodes.push(ele);\n } else {\n // put to end of array if edge\n edges.push(ele);\n }\n }\n elements = nodes.concat(edges);\n var i;\n var removeFromElements = function removeFromElements() {\n elements.splice(i, 1);\n i--;\n };\n\n // now, restore each element\n for (i = 0; i < elements.length; i++) {\n var _ele2 = elements[i];\n var _private = _ele2._private;\n var _data3 = _private.data;\n\n // the traversal cache should start fresh when ele is added\n _ele2.clearTraversalCache();\n\n // set id and validate\n if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) {\n _data3.id = uuid();\n } else if (number$1(_data3.id)) {\n _data3.id = '' + _data3.id; // now it's a string\n } else if (emptyString(_data3.id) || !string(_data3.id)) {\n error('Can not create element with invalid string ID `' + _data3.id + '`');\n\n // can't create element if it has empty string as id or non-string id\n removeFromElements();\n continue;\n } else if (cy.hasElementWithId(_data3.id)) {\n error('Can not create second element with ID `' + _data3.id + '`');\n\n // can't create element if one already has that id\n removeFromElements();\n continue;\n }\n var id = _data3.id; // id is finalised, now let's keep a ref\n\n if (_ele2.isNode()) {\n // extra checks for nodes\n var pos = _private.position;\n\n // make sure the nodes have a defined position\n\n if (pos.x == null) {\n pos.x = 0;\n }\n if (pos.y == null) {\n pos.y = 0;\n }\n }\n if (_ele2.isEdge()) {\n // extra checks for edges\n\n var edge = _ele2;\n var fields = ['source', 'target'];\n var fieldsLength = fields.length;\n var badSourceOrTarget = false;\n for (var j = 0; j < fieldsLength; j++) {\n var field = fields[j];\n var val = _data3[field];\n if (number$1(val)) {\n val = _data3[field] = '' + _data3[field]; // now string\n }\n\n if (val == null || val === '') {\n // can't create if source or target is not defined properly\n error('Can not create edge `' + id + '` with unspecified ' + field);\n badSourceOrTarget = true;\n } else if (!cy.hasElementWithId(val)) {\n // can't create edge if one of its nodes doesn't exist\n error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`');\n badSourceOrTarget = true;\n }\n }\n if (badSourceOrTarget) {\n removeFromElements();\n continue;\n } // can't create this\n\n var src = cy.getElementById(_data3.source);\n var tgt = cy.getElementById(_data3.target);\n\n // only one edge in node if loop\n if (src.same(tgt)) {\n src._private.edges.push(edge);\n } else {\n src._private.edges.push(edge);\n tgt._private.edges.push(edge);\n }\n edge._private.source = src;\n edge._private.target = tgt;\n } // if is edge\n\n // create mock ids / indexes maps for element so it can be used like collections\n _private.map = new Map$2();\n _private.map.set(id, {\n ele: _ele2,\n index: 0\n });\n _private.removed = false;\n if (addToPool) {\n cy.addToPool(_ele2);\n }\n } // for each element\n\n // do compound node sanity checks\n for (var _i4 = 0; _i4 < nodes.length; _i4++) {\n // each node\n var node = nodes[_i4];\n var _data4 = node._private.data;\n if (number$1(_data4.parent)) {\n // then automake string\n _data4.parent = '' + _data4.parent;\n }\n var parentId = _data4.parent;\n var specifiedParent = parentId != null;\n if (specifiedParent || node._private.parent) {\n var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId);\n if (parent.empty()) {\n // non-existant parent; just remove it\n _data4.parent = undefined;\n } else if (parent[0].removed()) {\n warn('Node added with missing parent, reference to parent removed');\n _data4.parent = undefined;\n node._private.parent = null;\n } else {\n var selfAsParent = false;\n var ancestor = parent;\n while (!ancestor.empty()) {\n if (node.same(ancestor)) {\n // mark self as parent and remove from data\n selfAsParent = true;\n _data4.parent = undefined; // remove parent reference\n\n // exit or we loop forever\n break;\n }\n ancestor = ancestor.parent();\n }\n if (!selfAsParent) {\n // connect with children\n parent[0]._private.children.push(node);\n node._private.parent = parent[0];\n\n // let the core know we have a compound graph\n cy_p.hasCompoundNodes = true;\n }\n } // else\n } // if specified parent\n } // for each node\n\n if (elements.length > 0) {\n var restored = elements.length === self.length ? self : new Collection(cy, elements);\n for (var _i5 = 0; _i5 < restored.length; _i5++) {\n var _ele3 = restored[_i5];\n if (_ele3.isNode()) {\n continue;\n }\n\n // adding an edge invalidates the traversal caches for the parallel edges\n _ele3.parallelEdges().clearTraversalCache();\n\n // adding an edge invalidates the traversal cache for the connected nodes\n _ele3.source().clearTraversalCache();\n _ele3.target().clearTraversalCache();\n }\n var toUpdateStyle;\n if (cy_p.hasCompoundNodes) {\n toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent());\n } else {\n toUpdateStyle = restored;\n }\n toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer);\n if (notifyRenderer) {\n restored.emitAndNotify('add');\n } else if (addToPool) {\n restored.emit('add');\n }\n }\n return self; // chainability\n};\n\nelesfn$1.removed = function () {\n var ele = this[0];\n return ele && ele._private.removed;\n};\nelesfn$1.inside = function () {\n var ele = this[0];\n return ele && !ele._private.removed;\n};\nelesfn$1.remove = function () {\n var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var self = this;\n var elesToRemove = [];\n var elesToRemoveIds = {};\n var cy = self._private.cy;\n\n // add connected edges\n function addConnectedEdges(node) {\n var edges = node._private.edges;\n for (var i = 0; i < edges.length; i++) {\n add(edges[i]);\n }\n }\n\n // add descendant nodes\n function addChildren(node) {\n var children = node._private.children;\n for (var i = 0; i < children.length; i++) {\n add(children[i]);\n }\n }\n function add(ele) {\n var alreadyAdded = elesToRemoveIds[ele.id()];\n if (removeFromPool && ele.removed() || alreadyAdded) {\n return;\n } else {\n elesToRemoveIds[ele.id()] = true;\n }\n if (ele.isNode()) {\n elesToRemove.push(ele); // nodes are removed last\n\n addConnectedEdges(ele);\n addChildren(ele);\n } else {\n elesToRemove.unshift(ele); // edges are removed first\n }\n }\n\n // make the list of elements to remove\n // (may be removing more than specified due to connected edges etc)\n\n for (var i = 0, l = self.length; i < l; i++) {\n var ele = self[i];\n add(ele);\n }\n function removeEdgeRef(node, edge) {\n var connectedEdges = node._private.edges;\n removeFromArray(connectedEdges, edge);\n\n // removing an edges invalidates the traversal cache for its nodes\n node.clearTraversalCache();\n }\n function removeParallelRef(pllEdge) {\n // removing an edge invalidates the traversal caches for the parallel edges\n pllEdge.clearTraversalCache();\n }\n var alteredParents = [];\n alteredParents.ids = {};\n function removeChildRef(parent, ele) {\n ele = ele[0];\n parent = parent[0];\n var children = parent._private.children;\n var pid = parent.id();\n removeFromArray(children, ele); // remove parent => child ref\n\n ele._private.parent = null; // remove child => parent ref\n\n if (!alteredParents.ids[pid]) {\n alteredParents.ids[pid] = true;\n alteredParents.push(parent);\n }\n }\n self.dirtyCompoundBoundsCache();\n if (removeFromPool) {\n cy.removeFromPool(elesToRemove); // remove from core pool\n }\n\n for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) {\n var _ele4 = elesToRemove[_i6];\n if (_ele4.isEdge()) {\n // remove references to this edge in its connected nodes\n var src = _ele4.source()[0];\n var tgt = _ele4.target()[0];\n removeEdgeRef(src, _ele4);\n removeEdgeRef(tgt, _ele4);\n var pllEdges = _ele4.parallelEdges();\n for (var j = 0; j < pllEdges.length; j++) {\n var pllEdge = pllEdges[j];\n removeParallelRef(pllEdge);\n if (pllEdge.isBundledBezier()) {\n pllEdge.dirtyBoundingBoxCache();\n }\n }\n } else {\n // remove reference to parent\n var parent = _ele4.parent();\n if (parent.length !== 0) {\n removeChildRef(parent, _ele4);\n }\n }\n if (removeFromPool) {\n // mark as removed\n _ele4._private.removed = true;\n }\n }\n\n // check to see if we have a compound graph or not\n var elesStillInside = cy._private.elements;\n cy._private.hasCompoundNodes = false;\n for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) {\n var _ele5 = elesStillInside[_i7];\n if (_ele5.isParent()) {\n cy._private.hasCompoundNodes = true;\n break;\n }\n }\n var removedElements = new Collection(this.cy(), elesToRemove);\n if (removedElements.size() > 0) {\n // must manually notify since trigger won't do this automatically once removed\n\n if (notifyRenderer) {\n removedElements.emitAndNotify('remove');\n } else if (removeFromPool) {\n removedElements.emit('remove');\n }\n }\n\n // the parents who were modified by the removal need their style updated\n for (var _i8 = 0; _i8 < alteredParents.length; _i8++) {\n var _ele6 = alteredParents[_i8];\n if (!removeFromPool || !_ele6.removed()) {\n _ele6.updateStyle();\n }\n }\n return removedElements;\n};\nelesfn$1.move = function (struct) {\n var cy = this._private.cy;\n var eles = this;\n\n // just clean up refs, caches, etc. in the same way as when removing and then restoring\n // (our calls to remove/restore do not remove from the graph or make events)\n var notifyRenderer = false;\n var modifyPool = false;\n var toString = function toString(id) {\n return id == null ? id : '' + id;\n }; // id must be string\n\n if (struct.source !== undefined || struct.target !== undefined) {\n var srcId = toString(struct.source);\n var tgtId = toString(struct.target);\n var srcExists = srcId != null && cy.hasElementWithId(srcId);\n var tgtExists = tgtId != null && cy.hasElementWithId(tgtId);\n if (srcExists || tgtExists) {\n cy.batch(function () {\n // avoid duplicate style updates\n eles.remove(notifyRenderer, modifyPool); // clean up refs etc.\n eles.emitAndNotify('moveout');\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _data5 = ele._private.data;\n if (ele.isEdge()) {\n if (srcExists) {\n _data5.source = srcId;\n }\n if (tgtExists) {\n _data5.target = tgtId;\n }\n }\n }\n eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc.\n });\n\n eles.emitAndNotify('move');\n }\n } else if (struct.parent !== undefined) {\n // move node to new parent\n var parentId = toString(struct.parent);\n var parentExists = parentId === null || cy.hasElementWithId(parentId);\n if (parentExists) {\n var pidToAssign = parentId === null ? undefined : parentId;\n cy.batch(function () {\n // avoid duplicate style updates\n var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc.\n updated.emitAndNotify('moveout');\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _data6 = ele._private.data;\n if (ele.isNode()) {\n _data6.parent = pidToAssign;\n }\n }\n updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc.\n });\n\n eles.emitAndNotify('move');\n }\n }\n return this;\n};\n[elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) {\n extend(elesfn$1, props);\n});\n\nvar corefn$9 = {\n add: function add(opts) {\n var elements;\n var cy = this;\n\n // add the elements\n if (elementOrCollection(opts)) {\n var eles = opts;\n if (eles._private.cy === cy) {\n // same instance => just restore\n elements = eles.restore();\n } else {\n // otherwise, copy from json\n var jsons = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n jsons.push(ele.json());\n }\n elements = new Collection(cy, jsons);\n }\n }\n\n // specify an array of options\n else if (array(opts)) {\n var _jsons = opts;\n elements = new Collection(cy, _jsons);\n }\n\n // specify via opts.nodes and opts.edges\n else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) {\n var elesByGroup = opts;\n var _jsons2 = [];\n var grs = ['nodes', 'edges'];\n for (var _i = 0, il = grs.length; _i < il; _i++) {\n var group = grs[_i];\n var elesArray = elesByGroup[group];\n if (array(elesArray)) {\n for (var j = 0, jl = elesArray.length; j < jl; j++) {\n var json = extend({\n group: group\n }, elesArray[j]);\n _jsons2.push(json);\n }\n }\n }\n elements = new Collection(cy, _jsons2);\n }\n\n // specify options for one element\n else {\n var _json = opts;\n elements = new Element(cy, _json).collection();\n }\n return elements;\n },\n remove: function remove(collection) {\n if (elementOrCollection(collection)) ; else if (string(collection)) {\n var selector = collection;\n collection = this.$(selector);\n }\n return collection.remove();\n }\n};\n\n/* global Float32Array */\n\n/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */\nfunction generateCubicBezier(mX1, mY1, mX2, mY2) {\n var NEWTON_ITERATIONS = 4,\n NEWTON_MIN_SLOPE = 0.001,\n SUBDIVISION_PRECISION = 0.0000001,\n SUBDIVISION_MAX_ITERATIONS = 10,\n kSplineTableSize = 11,\n kSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\n float32ArraySupported = typeof Float32Array !== 'undefined';\n\n /* Must contain four arguments. */\n if (arguments.length !== 4) {\n return false;\n }\n\n /* Arguments must be numbers. */\n for (var i = 0; i < 4; ++i) {\n if (typeof arguments[i] !== \"number\" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\n return false;\n }\n }\n\n /* X values must be in the [0, 1] range. */\n mX1 = Math.min(mX1, 1);\n mX2 = Math.min(mX2, 1);\n mX1 = Math.max(mX1, 0);\n mX2 = Math.max(mX2, 0);\n var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n function A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n }\n function B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n }\n function C(aA1) {\n return 3.0 * aA1;\n }\n function calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n }\n function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }\n function newtonRaphsonIterate(aX, aGuessT) {\n for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n }\n function calcSampleValues() {\n for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) {\n mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2);\n }\n }\n function binarySubdivide(aX, aA, aB) {\n var currentX,\n currentT,\n i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n }\n function getTForX(aX) {\n var intervalStart = 0.0,\n currentSample = 1,\n lastSample = kSplineTableSize - 1;\n for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\n guessForT = intervalStart + dist * kSampleStepSize,\n initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\n }\n }\n var _precomputed = false;\n function precompute() {\n _precomputed = true;\n if (mX1 !== mY1 || mX2 !== mY2) {\n calcSampleValues();\n }\n }\n var f = function f(aX) {\n if (!_precomputed) {\n precompute();\n }\n if (mX1 === mY1 && mX2 === mY2) {\n return aX;\n }\n if (aX === 0) {\n return 0;\n }\n if (aX === 1) {\n return 1;\n }\n return calcBezier(getTForX(aX), mY1, mY2);\n };\n f.getControlPoints = function () {\n return [{\n x: mX1,\n y: mY1\n }, {\n x: mX2,\n y: mY2\n }];\n };\n var str = \"generateBezier(\" + [mX1, mY1, mX2, mY2] + \")\";\n f.toString = function () {\n return str;\n };\n return f;\n}\n\n/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\n/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass\n then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\nvar generateSpringRK4 = function () {\n function springAccelerationForState(state) {\n return -state.tension * state.x - state.friction * state.v;\n }\n function springEvaluateStateWithDerivative(initialState, dt, derivative) {\n var state = {\n x: initialState.x + derivative.dx * dt,\n v: initialState.v + derivative.dv * dt,\n tension: initialState.tension,\n friction: initialState.friction\n };\n return {\n dx: state.v,\n dv: springAccelerationForState(state)\n };\n }\n function springIntegrateState(state, dt) {\n var a = {\n dx: state.v,\n dv: springAccelerationForState(state)\n },\n b = springEvaluateStateWithDerivative(state, dt * 0.5, a),\n c = springEvaluateStateWithDerivative(state, dt * 0.5, b),\n d = springEvaluateStateWithDerivative(state, dt, c),\n dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\n dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\n state.x = state.x + dxdt * dt;\n state.v = state.v + dvdt * dt;\n return state;\n }\n return function springRK4Factory(tension, friction, duration) {\n var initState = {\n x: -1,\n v: 0,\n tension: null,\n friction: null\n },\n path = [0],\n time_lapsed = 0,\n tolerance = 1 / 10000,\n DT = 16 / 1000,\n have_duration,\n dt,\n last_state;\n tension = parseFloat(tension) || 500;\n friction = parseFloat(friction) || 20;\n duration = duration || null;\n initState.tension = tension;\n initState.friction = friction;\n have_duration = duration !== null;\n\n /* Calculate the actual time it takes for this animation to complete with the provided conditions. */\n if (have_duration) {\n /* Run the simulation without a duration. */\n time_lapsed = springRK4Factory(tension, friction);\n /* Compute the adjusted time delta. */\n dt = time_lapsed / duration * DT;\n } else {\n dt = DT;\n }\n for (;;) {\n /* Next/step function .*/\n last_state = springIntegrateState(last_state || initState, dt);\n /* Store the position. */\n path.push(1 + last_state.x);\n time_lapsed += 16;\n /* If the change threshold is reached, break. */\n if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\n break;\n }\n }\n\n /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\n computed path and returns a snapshot of the position according to a given percentComplete. */\n return !have_duration ? time_lapsed : function (percentComplete) {\n return path[percentComplete * (path.length - 1) | 0];\n };\n };\n}();\n\nvar cubicBezier = function cubicBezier(t1, p1, t2, p2) {\n var bezier = generateCubicBezier(t1, p1, t2, p2);\n return function (start, end, percent) {\n return start + (end - start) * bezier(percent);\n };\n};\nvar easings = {\n 'linear': function linear(start, end, percent) {\n return start + (end - start) * percent;\n },\n // default easings\n 'ease': cubicBezier(0.25, 0.1, 0.25, 1),\n 'ease-in': cubicBezier(0.42, 0, 1, 1),\n 'ease-out': cubicBezier(0, 0, 0.58, 1),\n 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1),\n // sine\n 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715),\n 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1),\n 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95),\n // quad\n 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53),\n 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94),\n 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955),\n // cubic\n 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19),\n 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1),\n 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1),\n // quart\n 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22),\n 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1),\n 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1),\n // quint\n 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06),\n 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1),\n 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1),\n // expo\n 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035),\n 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1),\n 'ease-in-out-expo': cubicBezier(1, 0, 0, 1),\n // circ\n 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335),\n 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1),\n 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86),\n // user param easings...\n\n 'spring': function spring(tension, friction, duration) {\n if (duration === 0) {\n // can't get a spring w/ duration 0\n return easings.linear; // duration 0 => jump to end so impl doesn't matter\n }\n\n var spring = generateSpringRK4(tension, friction, duration);\n return function (start, end, percent) {\n return start + (end - start) * spring(percent);\n };\n },\n 'cubic-bezier': cubicBezier\n};\n\nfunction getEasedValue(type, start, end, percent, easingFn) {\n if (percent === 1) {\n return end;\n }\n if (start === end) {\n return end;\n }\n var val = easingFn(start, end, percent);\n if (type == null) {\n return val;\n }\n if (type.roundValue || type.color) {\n val = Math.round(val);\n }\n if (type.min !== undefined) {\n val = Math.max(val, type.min);\n }\n if (type.max !== undefined) {\n val = Math.min(val, type.max);\n }\n return val;\n}\nfunction getValue(prop, spec) {\n if (prop.pfValue != null || prop.value != null) {\n if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) {\n return prop.pfValue;\n } else {\n return prop.value;\n }\n } else {\n return prop;\n }\n}\nfunction ease(startProp, endProp, percent, easingFn, propSpec) {\n var type = propSpec != null ? propSpec.type : null;\n if (percent < 0) {\n percent = 0;\n } else if (percent > 1) {\n percent = 1;\n }\n var start = getValue(startProp, propSpec);\n var end = getValue(endProp, propSpec);\n if (number$1(start) && number$1(end)) {\n return getEasedValue(type, start, end, percent, easingFn);\n } else if (array(start) && array(end)) {\n var easedArr = [];\n for (var i = 0; i < end.length; i++) {\n var si = start[i];\n var ei = end[i];\n if (si != null && ei != null) {\n var val = getEasedValue(type, si, ei, percent, easingFn);\n easedArr.push(val);\n } else {\n easedArr.push(ei);\n }\n }\n return easedArr;\n }\n return undefined;\n}\n\nfunction step$1(self, ani, now, isCore) {\n var isEles = !isCore;\n var _p = self._private;\n var ani_p = ani._private;\n var pEasing = ani_p.easing;\n var startTime = ani_p.startTime;\n var cy = isCore ? self : self.cy();\n var style = cy.style();\n if (!ani_p.easingImpl) {\n if (pEasing == null) {\n // use default\n ani_p.easingImpl = easings['linear'];\n } else {\n // then define w/ name\n var easingVals;\n if (string(pEasing)) {\n var easingProp = style.parse('transition-timing-function', pEasing);\n easingVals = easingProp.value;\n } else {\n // then assume preparsed array\n easingVals = pEasing;\n }\n var name, args;\n if (string(easingVals)) {\n name = easingVals;\n args = [];\n } else {\n name = easingVals[1];\n args = easingVals.slice(2).map(function (n) {\n return +n;\n });\n }\n if (args.length > 0) {\n // create with args\n if (name === 'spring') {\n args.push(ani_p.duration); // need duration to generate spring\n }\n\n ani_p.easingImpl = easings[name].apply(null, args);\n } else {\n // static impl by name\n ani_p.easingImpl = easings[name];\n }\n }\n }\n var easing = ani_p.easingImpl;\n var percent;\n if (ani_p.duration === 0) {\n percent = 1;\n } else {\n percent = (now - startTime) / ani_p.duration;\n }\n if (ani_p.applying) {\n percent = ani_p.progress;\n }\n if (percent < 0) {\n percent = 0;\n } else if (percent > 1) {\n percent = 1;\n }\n if (ani_p.delay == null) {\n // then update\n\n var startPos = ani_p.startPosition;\n var endPos = ani_p.position;\n if (endPos && isEles && !self.locked()) {\n var newPos = {};\n if (valid(startPos.x, endPos.x)) {\n newPos.x = ease(startPos.x, endPos.x, percent, easing);\n }\n if (valid(startPos.y, endPos.y)) {\n newPos.y = ease(startPos.y, endPos.y, percent, easing);\n }\n self.position(newPos);\n }\n var startPan = ani_p.startPan;\n var endPan = ani_p.pan;\n var pan = _p.pan;\n var animatingPan = endPan != null && isCore;\n if (animatingPan) {\n if (valid(startPan.x, endPan.x)) {\n pan.x = ease(startPan.x, endPan.x, percent, easing);\n }\n if (valid(startPan.y, endPan.y)) {\n pan.y = ease(startPan.y, endPan.y, percent, easing);\n }\n self.emit('pan');\n }\n var startZoom = ani_p.startZoom;\n var endZoom = ani_p.zoom;\n var animatingZoom = endZoom != null && isCore;\n if (animatingZoom) {\n if (valid(startZoom, endZoom)) {\n _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom);\n }\n self.emit('zoom');\n }\n if (animatingPan || animatingZoom) {\n self.emit('viewport');\n }\n var props = ani_p.style;\n if (props && props.length > 0 && isEles) {\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n var _name = prop.name;\n var end = prop;\n var start = ani_p.startStyle[_name];\n var propSpec = style.properties[start.name];\n var easedVal = ease(start, end, percent, easing, propSpec);\n style.overrideBypass(self, _name, easedVal);\n } // for props\n\n self.emit('style');\n } // if\n }\n\n ani_p.progress = percent;\n return percent;\n}\nfunction valid(start, end) {\n if (start == null || end == null) {\n return false;\n }\n if (number$1(start) && number$1(end)) {\n return true;\n } else if (start && end) {\n return true;\n }\n return false;\n}\n\nfunction startAnimation(self, ani, now, isCore) {\n var ani_p = ani._private;\n ani_p.started = true;\n ani_p.startTime = now - ani_p.progress * ani_p.duration;\n}\n\nfunction stepAll(now, cy) {\n var eles = cy._private.aniEles;\n var doneEles = [];\n function stepOne(ele, isCore) {\n var _p = ele._private;\n var current = _p.animation.current;\n var queue = _p.animation.queue;\n var ranAnis = false;\n\n // if nothing currently animating, get something from the queue\n if (current.length === 0) {\n var next = queue.shift();\n if (next) {\n current.push(next);\n }\n }\n var callbacks = function callbacks(_callbacks) {\n for (var j = _callbacks.length - 1; j >= 0; j--) {\n var cb = _callbacks[j];\n cb();\n }\n _callbacks.splice(0, _callbacks.length);\n };\n\n // step and remove if done\n for (var i = current.length - 1; i >= 0; i--) {\n var ani = current[i];\n var ani_p = ani._private;\n if (ani_p.stopped) {\n current.splice(i, 1);\n ani_p.hooked = false;\n ani_p.playing = false;\n ani_p.started = false;\n callbacks(ani_p.frames);\n continue;\n }\n if (!ani_p.playing && !ani_p.applying) {\n continue;\n }\n\n // an apply() while playing shouldn't do anything\n if (ani_p.playing && ani_p.applying) {\n ani_p.applying = false;\n }\n if (!ani_p.started) {\n startAnimation(ele, ani, now);\n }\n step$1(ele, ani, now, isCore);\n if (ani_p.applying) {\n ani_p.applying = false;\n }\n callbacks(ani_p.frames);\n if (ani_p.step != null) {\n ani_p.step(now);\n }\n if (ani.completed()) {\n current.splice(i, 1);\n ani_p.hooked = false;\n ani_p.playing = false;\n ani_p.started = false;\n callbacks(ani_p.completes);\n }\n ranAnis = true;\n }\n if (!isCore && current.length === 0 && queue.length === 0) {\n doneEles.push(ele);\n }\n return ranAnis;\n } // stepElement\n\n // handle all eles\n var ranEleAni = false;\n for (var e = 0; e < eles.length; e++) {\n var ele = eles[e];\n var handledThisEle = stepOne(ele);\n ranEleAni = ranEleAni || handledThisEle;\n } // each element\n\n var ranCoreAni = stepOne(cy, true);\n\n // notify renderer\n if (ranEleAni || ranCoreAni) {\n if (eles.length > 0) {\n cy.notify('draw', eles);\n } else {\n cy.notify('draw');\n }\n }\n\n // remove elements from list of currently animating if its queues are empty\n eles.unmerge(doneEles);\n cy.emit('step');\n} // stepAll\n\nvar corefn$8 = {\n // pull in animation functions\n animate: define.animate(),\n animation: define.animation(),\n animated: define.animated(),\n clearQueue: define.clearQueue(),\n delay: define.delay(),\n delayAnimation: define.delayAnimation(),\n stop: define.stop(),\n addToAnimationPool: function addToAnimationPool(eles) {\n var cy = this;\n if (!cy.styleEnabled()) {\n return;\n } // save cycles when no style used\n\n cy._private.aniEles.merge(eles);\n },\n stopAnimationLoop: function stopAnimationLoop() {\n this._private.animationsRunning = false;\n },\n startAnimationLoop: function startAnimationLoop() {\n var cy = this;\n cy._private.animationsRunning = true;\n if (!cy.styleEnabled()) {\n return;\n } // save cycles when no style used\n\n // NB the animation loop will exec in headless environments if style enabled\n // and explicit cy.destroy() is necessary to stop the loop\n\n function headlessStep() {\n if (!cy._private.animationsRunning) {\n return;\n }\n requestAnimationFrame(function animationStep(now) {\n stepAll(now, cy);\n headlessStep();\n });\n }\n var renderer = cy.renderer();\n if (renderer && renderer.beforeRender) {\n // let the renderer schedule animations\n renderer.beforeRender(function rendererAnimationStep(willDraw, now) {\n stepAll(now, cy);\n }, renderer.beforeRenderPriorities.animations);\n } else {\n // manage the animation loop ourselves\n headlessStep(); // first call\n }\n }\n};\n\nvar emitterOptions = {\n qualifierCompare: function qualifierCompare(selector1, selector2) {\n if (selector1 == null || selector2 == null) {\n return selector1 == null && selector2 == null;\n } else {\n return selector1.sameText(selector2);\n }\n },\n eventMatches: function eventMatches(cy, listener, eventObj) {\n var selector = listener.qualifier;\n if (selector != null) {\n return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target);\n }\n return true;\n },\n addEventFields: function addEventFields(cy, evt) {\n evt.cy = cy;\n evt.target = cy;\n },\n callbackContext: function callbackContext(cy, listener, eventObj) {\n return listener.qualifier != null ? eventObj.target : cy;\n }\n};\nvar argSelector = function argSelector(arg) {\n if (string(arg)) {\n return new Selector(arg);\n } else {\n return arg;\n }\n};\nvar elesfn = {\n createEmitter: function createEmitter() {\n var _p = this._private;\n if (!_p.emitter) {\n _p.emitter = new Emitter(emitterOptions, this);\n }\n return this;\n },\n emitter: function emitter() {\n return this._private.emitter;\n },\n on: function on(events, selector, callback) {\n this.emitter().on(events, argSelector(selector), callback);\n return this;\n },\n removeListener: function removeListener(events, selector, callback) {\n this.emitter().removeListener(events, argSelector(selector), callback);\n return this;\n },\n removeAllListeners: function removeAllListeners() {\n this.emitter().removeAllListeners();\n return this;\n },\n one: function one(events, selector, callback) {\n this.emitter().one(events, argSelector(selector), callback);\n return this;\n },\n once: function once(events, selector, callback) {\n this.emitter().one(events, argSelector(selector), callback);\n return this;\n },\n emit: function emit(events, extraParams) {\n this.emitter().emit(events, extraParams);\n return this;\n },\n emitAndNotify: function emitAndNotify(event, eles) {\n this.emit(event);\n this.notify(event, eles);\n return this;\n }\n};\ndefine.eventAliasesOn(elesfn);\n\nvar corefn$7 = {\n png: function png(options) {\n var renderer = this._private.renderer;\n options = options || {};\n return renderer.png(options);\n },\n jpg: function jpg(options) {\n var renderer = this._private.renderer;\n options = options || {};\n options.bg = options.bg || '#fff';\n return renderer.jpg(options);\n }\n};\ncorefn$7.jpeg = corefn$7.jpg;\n\nvar corefn$6 = {\n layout: function layout(options) {\n var cy = this;\n if (options == null) {\n error('Layout options must be specified to make a layout');\n return;\n }\n if (options.name == null) {\n error('A `name` must be specified to make a layout');\n return;\n }\n var name = options.name;\n var Layout = cy.extension('layout', name);\n if (Layout == null) {\n error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?');\n return;\n }\n var eles;\n if (string(options.eles)) {\n eles = cy.$(options.eles);\n } else {\n eles = options.eles != null ? options.eles : cy.$();\n }\n var layout = new Layout(extend({}, options, {\n cy: cy,\n eles: eles\n }));\n return layout;\n }\n};\ncorefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout;\n\nvar corefn$5 = {\n notify: function notify(eventName, eventEles) {\n var _p = this._private;\n if (this.batching()) {\n _p.batchNotifications = _p.batchNotifications || {};\n var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection();\n if (eventEles != null) {\n eles.merge(eventEles);\n }\n return; // notifications are disabled during batching\n }\n\n if (!_p.notificationsEnabled) {\n return;\n } // exit on disabled\n\n var renderer = this.renderer();\n\n // exit if destroy() called on core or renderer in between frames #1499 #1528\n if (this.destroyed() || !renderer) {\n return;\n }\n renderer.notify(eventName, eventEles);\n },\n notifications: function notifications(bool) {\n var p = this._private;\n if (bool === undefined) {\n return p.notificationsEnabled;\n } else {\n p.notificationsEnabled = bool ? true : false;\n }\n return this;\n },\n noNotifications: function noNotifications(callback) {\n this.notifications(false);\n callback();\n this.notifications(true);\n },\n batching: function batching() {\n return this._private.batchCount > 0;\n },\n startBatch: function startBatch() {\n var _p = this._private;\n if (_p.batchCount == null) {\n _p.batchCount = 0;\n }\n if (_p.batchCount === 0) {\n _p.batchStyleEles = this.collection();\n _p.batchNotifications = {};\n }\n _p.batchCount++;\n return this;\n },\n endBatch: function endBatch() {\n var _p = this._private;\n if (_p.batchCount === 0) {\n return this;\n }\n _p.batchCount--;\n if (_p.batchCount === 0) {\n // update style for dirty eles\n _p.batchStyleEles.updateStyle();\n var renderer = this.renderer();\n\n // notify the renderer of queued eles and event types\n Object.keys(_p.batchNotifications).forEach(function (eventName) {\n var eles = _p.batchNotifications[eventName];\n if (eles.empty()) {\n renderer.notify(eventName);\n } else {\n renderer.notify(eventName, eles);\n }\n });\n }\n return this;\n },\n batch: function batch(callback) {\n this.startBatch();\n callback();\n this.endBatch();\n return this;\n },\n // for backwards compatibility\n batchData: function batchData(map) {\n var cy = this;\n return this.batch(function () {\n var ids = Object.keys(map);\n for (var i = 0; i < ids.length; i++) {\n var id = ids[i];\n var data = map[id];\n var ele = cy.getElementById(id);\n ele.data(data);\n }\n });\n }\n};\n\nvar rendererDefaults = defaults$g({\n hideEdgesOnViewport: false,\n textureOnViewport: false,\n motionBlur: false,\n motionBlurOpacity: 0.05,\n pixelRatio: undefined,\n desktopTapThreshold: 4,\n touchTapThreshold: 8,\n wheelSensitivity: 1,\n debug: false,\n showFps: false\n});\nvar corefn$4 = {\n renderTo: function renderTo(context, zoom, pan, pxRatio) {\n var r = this._private.renderer;\n r.renderTo(context, zoom, pan, pxRatio);\n return this;\n },\n renderer: function renderer() {\n return this._private.renderer;\n },\n forceRender: function forceRender() {\n this.notify('draw');\n return this;\n },\n resize: function resize() {\n this.invalidateSize();\n this.emitAndNotify('resize');\n return this;\n },\n initRenderer: function initRenderer(options) {\n var cy = this;\n var RendererProto = cy.extension('renderer', options.name);\n if (RendererProto == null) {\n error(\"Can not initialise: No such renderer `\".concat(options.name, \"` found. Did you forget to import it and `cytoscape.use()` it?\"));\n return;\n }\n if (options.wheelSensitivity !== undefined) {\n warn(\"You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.\");\n }\n var rOpts = rendererDefaults(options);\n rOpts.cy = cy;\n cy._private.renderer = new RendererProto(rOpts);\n this.notify('init');\n },\n destroyRenderer: function destroyRenderer() {\n var cy = this;\n cy.notify('destroy'); // destroy the renderer\n\n var domEle = cy.container();\n if (domEle) {\n domEle._cyreg = null;\n while (domEle.childNodes.length > 0) {\n domEle.removeChild(domEle.childNodes[0]);\n }\n }\n cy._private.renderer = null; // to be extra safe, remove the ref\n cy.mutableElements().forEach(function (ele) {\n var _p = ele._private;\n _p.rscratch = {};\n _p.rstyle = {};\n _p.animation.current = [];\n _p.animation.queue = [];\n });\n },\n onRender: function onRender(fn) {\n return this.on('render', fn);\n },\n offRender: function offRender(fn) {\n return this.off('render', fn);\n }\n};\ncorefn$4.invalidateDimensions = corefn$4.resize;\n\nvar corefn$3 = {\n // get a collection\n // - empty collection on no args\n // - collection of elements in the graph on selector arg\n // - guarantee a returned collection when elements or collection specified\n collection: function collection(eles, opts) {\n if (string(eles)) {\n return this.$(eles);\n } else if (elementOrCollection(eles)) {\n return eles.collection();\n } else if (array(eles)) {\n if (!opts) {\n opts = {};\n }\n return new Collection(this, eles, opts.unique, opts.removed);\n }\n return new Collection(this);\n },\n nodes: function nodes(selector) {\n var nodes = this.$(function (ele) {\n return ele.isNode();\n });\n if (selector) {\n return nodes.filter(selector);\n }\n return nodes;\n },\n edges: function edges(selector) {\n var edges = this.$(function (ele) {\n return ele.isEdge();\n });\n if (selector) {\n return edges.filter(selector);\n }\n return edges;\n },\n // search the graph like jQuery\n $: function $(selector) {\n var eles = this._private.elements;\n if (selector) {\n return eles.filter(selector);\n } else {\n return eles.spawnSelf();\n }\n },\n mutableElements: function mutableElements() {\n return this._private.elements;\n }\n};\n\n// aliases\ncorefn$3.elements = corefn$3.filter = corefn$3.$;\n\nvar styfn$8 = {};\n\n// keys for style blocks, e.g. ttfftt\nvar TRUE = 't';\nvar FALSE = 'f';\n\n// (potentially expensive calculation)\n// apply the style to the element based on\n// - its bypass\n// - what selectors match it\nstyfn$8.apply = function (eles) {\n var self = this;\n var _p = self._private;\n var cy = _p.cy;\n var updatedEles = cy.collection();\n for (var ie = 0; ie < eles.length; ie++) {\n var ele = eles[ie];\n var cxtMeta = self.getContextMeta(ele);\n if (cxtMeta.empty) {\n continue;\n }\n var cxtStyle = self.getContextStyle(cxtMeta);\n var app = self.applyContextStyle(cxtMeta, cxtStyle, ele);\n if (ele._private.appliedInitStyle) {\n self.updateTransitions(ele, app.diffProps);\n } else {\n ele._private.appliedInitStyle = true;\n }\n var hintsDiff = self.updateStyleHints(ele);\n if (hintsDiff) {\n updatedEles.push(ele);\n }\n } // for elements\n\n return updatedEles;\n};\nstyfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) {\n var self = this;\n var cache = self._private.propDiffs = self._private.propDiffs || {};\n var dualCxtKey = oldCxtKey + '-' + newCxtKey;\n var cachedVal = cache[dualCxtKey];\n if (cachedVal) {\n return cachedVal;\n }\n var diffProps = [];\n var addedProp = {};\n for (var i = 0; i < self.length; i++) {\n var cxt = self[i];\n var oldHasCxt = oldCxtKey[i] === TRUE;\n var newHasCxt = newCxtKey[i] === TRUE;\n var cxtHasDiffed = oldHasCxt !== newHasCxt;\n var cxtHasMappedProps = cxt.mappedProperties.length > 0;\n if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) {\n var props = void 0;\n if (cxtHasDiffed && cxtHasMappedProps) {\n props = cxt.properties; // suffices b/c mappedProperties is a subset of properties\n } else if (cxtHasDiffed) {\n props = cxt.properties; // need to check them all\n } else if (cxtHasMappedProps) {\n props = cxt.mappedProperties; // only need to check mapped\n }\n\n for (var j = 0; j < props.length; j++) {\n var prop = props[j];\n var name = prop.name;\n\n // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter\n // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result\n // is cached)\n var laterCxtOverrides = false;\n for (var k = i + 1; k < self.length; k++) {\n var laterCxt = self[k];\n var hasLaterCxt = newCxtKey[k] === TRUE;\n if (!hasLaterCxt) {\n continue;\n } // can't override unless the context is active\n\n laterCxtOverrides = laterCxt.properties[prop.name] != null;\n if (laterCxtOverrides) {\n break;\n } // exit early as long as one later context overrides\n }\n\n if (!addedProp[name] && !laterCxtOverrides) {\n addedProp[name] = true;\n diffProps.push(name);\n }\n } // for props\n } // if\n } // for contexts\n\n cache[dualCxtKey] = diffProps;\n return diffProps;\n};\nstyfn$8.getContextMeta = function (ele) {\n var self = this;\n var cxtKey = '';\n var diffProps;\n var prevKey = ele._private.styleCxtKey || '';\n\n // get the cxt key\n for (var i = 0; i < self.length; i++) {\n var context = self[i];\n var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core'\n\n if (contextSelectorMatches) {\n cxtKey += TRUE;\n } else {\n cxtKey += FALSE;\n }\n } // for context\n\n diffProps = self.getPropertiesDiff(prevKey, cxtKey);\n ele._private.styleCxtKey = cxtKey;\n return {\n key: cxtKey,\n diffPropNames: diffProps,\n empty: diffProps.length === 0\n };\n};\n\n// gets a computed ele style object based on matched contexts\nstyfn$8.getContextStyle = function (cxtMeta) {\n var cxtKey = cxtMeta.key;\n var self = this;\n var cxtStyles = this._private.contextStyles = this._private.contextStyles || {};\n\n // if already computed style, returned cached copy\n if (cxtStyles[cxtKey]) {\n return cxtStyles[cxtKey];\n }\n var style = {\n _private: {\n key: cxtKey\n }\n };\n for (var i = 0; i < self.length; i++) {\n var cxt = self[i];\n var hasCxt = cxtKey[i] === TRUE;\n if (!hasCxt) {\n continue;\n }\n for (var j = 0; j < cxt.properties.length; j++) {\n var prop = cxt.properties[j];\n style[prop.name] = prop;\n }\n }\n cxtStyles[cxtKey] = style;\n return style;\n};\nstyfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) {\n var self = this;\n var diffProps = cxtMeta.diffPropNames;\n var retDiffProps = {};\n var types = self.types;\n for (var i = 0; i < diffProps.length; i++) {\n var diffPropName = diffProps[i];\n var cxtProp = cxtStyle[diffPropName];\n var eleProp = ele.pstyle(diffPropName);\n if (!cxtProp) {\n // no context prop means delete\n if (!eleProp) {\n continue; // no existing prop means nothing needs to be removed\n // nb affects initial application on mapped values like control-point-distances\n } else if (eleProp.bypass) {\n cxtProp = {\n name: diffPropName,\n deleteBypassed: true\n };\n } else {\n cxtProp = {\n name: diffPropName,\n \"delete\": true\n };\n }\n }\n\n // save cycles when the context prop doesn't need to be applied\n if (eleProp === cxtProp) {\n continue;\n }\n\n // save cycles when a mapped context prop doesn't need to be applied\n if (cxtProp.mapped === types.fn // context prop is function mapper\n && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one)\n && eleProp.mapping != null // ele prop is a concrete value from from a mapper\n && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper\n ) {\n // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet)\n var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy\n var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss\n\n if (fnValue === mapping.prevFnValue) {\n continue;\n }\n }\n var retDiffProp = retDiffProps[diffPropName] = {\n prev: eleProp\n };\n self.applyParsedProperty(ele, cxtProp);\n retDiffProp.next = ele.pstyle(diffPropName);\n if (retDiffProp.next && retDiffProp.next.bypass) {\n retDiffProp.next = retDiffProp.next.bypassed;\n }\n }\n return {\n diffProps: retDiffProps\n };\n};\nstyfn$8.updateStyleHints = function (ele) {\n var _p = ele._private;\n var self = this;\n var propNames = self.propertyGroupNames;\n var propGrKeys = self.propertyGroupKeys;\n var propHash = function propHash(ele, propNames, seedKey) {\n return self.getPropertiesHash(ele, propNames, seedKey);\n };\n var oldStyleKey = _p.styleKey;\n if (ele.removed()) {\n return false;\n }\n var isNode = _p.group === 'nodes';\n\n // get the style key hashes per prop group\n // but lazily -- only use non-default prop values to reduce the number of hashes\n //\n\n var overriddenStyles = ele._private.style;\n propNames = Object.keys(overriddenStyles);\n for (var i = 0; i < propGrKeys.length; i++) {\n var grKey = propGrKeys[i];\n _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT];\n }\n var updateGrKey1 = function updateGrKey1(val, grKey) {\n return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]);\n };\n var updateGrKey2 = function updateGrKey2(val, grKey) {\n return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]);\n };\n var updateGrKey = function updateGrKey(val, grKey) {\n updateGrKey1(val, grKey);\n updateGrKey2(val, grKey);\n };\n var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) {\n for (var j = 0; j < strVal.length; j++) {\n var ch = strVal.charCodeAt(j);\n updateGrKey1(ch, grKey);\n updateGrKey2(ch, grKey);\n }\n };\n\n // - hashing works on 32 bit ints b/c we use bitwise ops\n // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function)\n // - raise up small numbers so more significant digits are seen by hashing\n // - make small numbers larger than a normal value to avoid collisions\n // - works in practice and it's relatively cheap\n var N = 2000000000;\n var cleanNum = function cleanNum(val) {\n return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val;\n };\n for (var _i = 0; _i < propNames.length; _i++) {\n var name = propNames[_i];\n var parsedProp = overriddenStyles[name];\n if (parsedProp == null) {\n continue;\n }\n var propInfo = this.properties[name];\n var type = propInfo.type;\n var _grKey = propInfo.groupKey;\n var normalizedNumberVal = void 0;\n if (propInfo.hashOverride != null) {\n normalizedNumberVal = propInfo.hashOverride(ele, parsedProp);\n } else if (parsedProp.pfValue != null) {\n normalizedNumberVal = parsedProp.pfValue;\n }\n\n // might not be a number if it allows enums\n var numberVal = propInfo.enums == null ? parsedProp.value : null;\n var haveNormNum = normalizedNumberVal != null;\n var haveUnitedNum = numberVal != null;\n var haveNum = haveNormNum || haveUnitedNum;\n var units = parsedProp.units;\n\n // numbers are cheaper to hash than strings\n // 1 hash op vs n hash ops (for length n string)\n if (type.number && haveNum && !type.multiple) {\n var v = haveNormNum ? normalizedNumberVal : numberVal;\n updateGrKey(cleanNum(v), _grKey);\n if (!haveNormNum && units != null) {\n updateGrKeyWStr(units, _grKey);\n }\n } else {\n updateGrKeyWStr(parsedProp.strValue, _grKey);\n }\n }\n\n // overall style key\n //\n\n var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT];\n for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) {\n var _grKey2 = propGrKeys[_i2];\n var grHash = _p.styleKeys[_grKey2];\n hash[0] = hashInt(grHash[0], hash[0]);\n hash[1] = hashIntAlt(grHash[1], hash[1]);\n }\n _p.styleKey = combineHashes(hash[0], hash[1]);\n\n // label dims\n //\n\n var sk = _p.styleKeys;\n _p.labelDimsKey = combineHashesArray(sk.labelDimensions);\n var labelKeys = propHash(ele, ['label'], sk.labelDimensions);\n _p.labelKey = combineHashesArray(labelKeys);\n _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys));\n if (!isNode) {\n var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions);\n _p.sourceLabelKey = combineHashesArray(sourceLabelKeys);\n _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys));\n var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions);\n _p.targetLabelKey = combineHashesArray(targetLabelKeys);\n _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys));\n }\n\n // node\n //\n\n if (isNode) {\n var _p$styleKeys = _p.styleKeys,\n nodeBody = _p$styleKeys.nodeBody,\n nodeBorder = _p$styleKeys.nodeBorder,\n nodeOutline = _p$styleKeys.nodeOutline,\n backgroundImage = _p$styleKeys.backgroundImage,\n compound = _p$styleKeys.compound,\n pie = _p$styleKeys.pie;\n var nodeKeys = [nodeBody, nodeBorder, nodeOutline, backgroundImage, compound, pie].filter(function (k) {\n return k != null;\n }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]);\n _p.nodeKey = combineHashesArray(nodeKeys);\n _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT;\n }\n return oldStyleKey !== _p.styleKey;\n};\nstyfn$8.clearStyleHints = function (ele) {\n var _p = ele._private;\n _p.styleCxtKey = '';\n _p.styleKeys = {};\n _p.styleKey = null;\n _p.labelKey = null;\n _p.labelStyleKey = null;\n _p.sourceLabelKey = null;\n _p.sourceLabelStyleKey = null;\n _p.targetLabelKey = null;\n _p.targetLabelStyleKey = null;\n _p.nodeKey = null;\n _p.hasPie = null;\n};\n\n// apply a property to the style (for internal use)\n// returns whether application was successful\n//\n// now, this function flattens the property, and here's how:\n//\n// for parsedProp:{ bypass: true, deleteBypass: true }\n// no property is generated, instead the bypass property in the\n// element's style is replaced by what's pointed to by the `bypassed`\n// field in the bypass property (i.e. restoring the property the\n// bypass was overriding)\n//\n// for parsedProp:{ mapped: truthy }\n// the generated flattenedProp:{ mapping: prop }\n//\n// for parsedProp:{ bypass: true }\n// the generated flattenedProp:{ bypassed: parsedProp }\nstyfn$8.applyParsedProperty = function (ele, parsedProp) {\n var self = this;\n var prop = parsedProp;\n var style = ele._private.style;\n var flatProp;\n var types = self.types;\n var type = self.properties[prop.name].type;\n var propIsBypass = prop.bypass;\n var origProp = style[prop.name];\n var origPropIsBypass = origProp && origProp.bypass;\n var _p = ele._private;\n var flatPropMapping = 'mapping';\n var getVal = function getVal(p) {\n if (p == null) {\n return null;\n } else if (p.pfValue != null) {\n return p.pfValue;\n } else {\n return p.value;\n }\n };\n var checkTriggers = function checkTriggers() {\n var fromVal = getVal(origProp);\n var toVal = getVal(prop);\n self.checkTriggers(ele, prop.name, fromVal, toVal);\n };\n\n // edge sanity checks to prevent the client from making serious mistakes\n if (parsedProp.name === 'curve-style' && ele.isEdge() && (\n // loops must be bundled beziers\n parsedProp.value !== 'bezier' && ele.isLoop() ||\n // edges connected to compound nodes can not be haystacks\n parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) {\n prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass);\n }\n if (prop[\"delete\"]) {\n // delete the property and use the default value on falsey value\n style[prop.name] = undefined;\n checkTriggers();\n return true;\n }\n if (prop.deleteBypassed) {\n // delete the property that the\n if (!origProp) {\n checkTriggers();\n return true; // can't delete if no prop\n } else if (origProp.bypass) {\n // delete bypassed\n origProp.bypassed = undefined;\n checkTriggers();\n return true;\n } else {\n return false; // we're unsuccessful deleting the bypassed\n }\n }\n\n // check if we need to delete the current bypass\n if (prop.deleteBypass) {\n // then this property is just here to indicate we need to delete\n if (!origProp) {\n checkTriggers();\n return true; // property is already not defined\n } else if (origProp.bypass) {\n // then replace the bypass property with the original\n // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary)\n style[prop.name] = origProp.bypassed;\n checkTriggers();\n return true;\n } else {\n return false; // we're unsuccessful deleting the bypass\n }\n }\n\n var printMappingErr = function printMappingErr() {\n warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined');\n };\n\n // put the property in the style objects\n switch (prop.mapped) {\n // flatten the property if mapped\n case types.mapData:\n {\n // flatten the field (e.g. data.foo.bar)\n var fields = prop.field.split('.');\n var fieldVal = _p.data;\n for (var i = 0; i < fields.length && fieldVal; i++) {\n var field = fields[i];\n fieldVal = fieldVal[field];\n }\n if (fieldVal == null) {\n printMappingErr();\n return false;\n }\n var percent;\n if (!number$1(fieldVal)) {\n // then don't apply and fall back on the existing style\n warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)');\n return false;\n } else {\n var fieldWidth = prop.fieldMax - prop.fieldMin;\n if (fieldWidth === 0) {\n // safety check -- not strictly necessary as no props of zero range should be passed here\n percent = 0;\n } else {\n percent = (fieldVal - prop.fieldMin) / fieldWidth;\n }\n }\n\n // make sure to bound percent value\n if (percent < 0) {\n percent = 0;\n } else if (percent > 1) {\n percent = 1;\n }\n if (type.color) {\n var r1 = prop.valueMin[0];\n var r2 = prop.valueMax[0];\n var g1 = prop.valueMin[1];\n var g2 = prop.valueMax[1];\n var b1 = prop.valueMin[2];\n var b2 = prop.valueMax[2];\n var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3];\n var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3];\n var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)];\n flatProp = {\n // colours are simple, so just create the flat property instead of expensive string parsing\n bypass: prop.bypass,\n // we're a bypass if the mapping property is a bypass\n name: prop.name,\n value: clr,\n strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')'\n };\n } else if (type.number) {\n var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent;\n flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping);\n } else {\n return false; // can only map to colours and numbers\n }\n\n if (!flatProp) {\n // if we can't flatten the property, then don't apply the property and fall back on the existing style\n printMappingErr();\n return false;\n }\n flatProp.mapping = prop; // keep a reference to the mapping\n prop = flatProp; // the flattened (mapped) property is the one we want\n\n break;\n }\n\n // direct mapping\n case types.data:\n {\n // flatten the field (e.g. data.foo.bar)\n var _fields = prop.field.split('.');\n var _fieldVal = _p.data;\n for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) {\n var _field = _fields[_i3];\n _fieldVal = _fieldVal[_field];\n }\n if (_fieldVal != null) {\n flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping);\n }\n if (!flatProp) {\n // if we can't flatten the property, then don't apply and fall back on the existing style\n printMappingErr();\n return false;\n }\n flatProp.mapping = prop; // keep a reference to the mapping\n prop = flatProp; // the flattened (mapped) property is the one we want\n\n break;\n }\n case types.fn:\n {\n var fn = prop.value;\n var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function\n\n prop.prevFnValue = fnRetVal;\n if (fnRetVal == null) {\n warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)');\n return false;\n }\n flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping);\n if (!flatProp) {\n warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)');\n return false;\n }\n flatProp.mapping = copy(prop); // keep a reference to the mapping\n prop = flatProp; // the flattened (mapped) property is the one we want\n\n break;\n }\n case undefined:\n break;\n // just set the property\n\n default:\n return false;\n // not a valid mapping\n }\n\n // if the property is a bypass property, then link the resultant property to the original one\n if (propIsBypass) {\n if (origPropIsBypass) {\n // then this bypass overrides the existing one\n prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass\n } else {\n // then link the orig prop to the new bypass\n prop.bypassed = origProp;\n }\n style[prop.name] = prop; // and set\n } else {\n // prop is not bypass\n if (origPropIsBypass) {\n // then keep the orig prop (since it's a bypass) and link to the new prop\n origProp.bypassed = prop;\n } else {\n // then just replace the old prop with the new one\n style[prop.name] = prop;\n }\n }\n checkTriggers();\n return true;\n};\nstyfn$8.cleanElements = function (eles, keepBypasses) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n this.clearStyleHints(ele);\n ele.dirtyCompoundBoundsCache();\n ele.dirtyBoundingBoxCache();\n if (!keepBypasses) {\n ele._private.style = {};\n } else {\n var style = ele._private.style;\n var propNames = Object.keys(style);\n for (var j = 0; j < propNames.length; j++) {\n var propName = propNames[j];\n var eleProp = style[propName];\n if (eleProp != null) {\n if (eleProp.bypass) {\n eleProp.bypassed = null;\n } else {\n style[propName] = null;\n }\n }\n }\n }\n }\n};\n\n// updates the visual style for all elements (useful for manual style modification after init)\nstyfn$8.update = function () {\n var cy = this._private.cy;\n var eles = cy.mutableElements();\n eles.updateStyle();\n};\n\n// diffProps : { name => { prev, next } }\nstyfn$8.updateTransitions = function (ele, diffProps) {\n var self = this;\n var _p = ele._private;\n var props = ele.pstyle('transition-property').value;\n var duration = ele.pstyle('transition-duration').pfValue;\n var delay = ele.pstyle('transition-delay').pfValue;\n if (props.length > 0 && duration > 0) {\n var style = {};\n\n // build up the style to animate towards\n var anyPrev = false;\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n var styProp = ele.pstyle(prop);\n var diffProp = diffProps[prop];\n if (!diffProp) {\n continue;\n }\n var prevProp = diffProp.prev;\n var fromProp = prevProp;\n var toProp = diffProp.next != null ? diffProp.next : styProp;\n var diff = false;\n var initVal = void 0;\n var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity)\n\n if (!fromProp) {\n continue;\n }\n\n // consider px values\n if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) {\n diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy\n initVal = fromProp.pfValue + initDt * diff;\n\n // consider numerical values\n } else if (number$1(fromProp.value) && number$1(toProp.value)) {\n diff = toProp.value - fromProp.value; // nonzero is truthy\n initVal = fromProp.value + initDt * diff;\n\n // consider colour values\n } else if (array(fromProp.value) && array(toProp.value)) {\n diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2];\n initVal = fromProp.strValue;\n }\n\n // the previous value is good for an animation only if it's different\n if (diff) {\n style[prop] = toProp.strValue; // to val\n this.applyBypass(ele, prop, initVal); // from val\n anyPrev = true;\n }\n } // end if props allow ani\n\n // can't transition if there's nothing previous to transition from\n if (!anyPrev) {\n return;\n }\n _p.transitioning = true;\n new Promise$1(function (resolve) {\n if (delay > 0) {\n ele.delayAnimation(delay).play().promise().then(resolve);\n } else {\n resolve();\n }\n }).then(function () {\n return ele.animation({\n style: style,\n duration: duration,\n easing: ele.pstyle('transition-timing-function').value,\n queue: false\n }).play().promise();\n }).then(function () {\n // if( !isBypass ){\n self.removeBypasses(ele, props);\n ele.emitAndNotify('style');\n // }\n\n _p.transitioning = false;\n });\n } else if (_p.transitioning) {\n this.removeBypasses(ele, props);\n ele.emitAndNotify('style');\n _p.transitioning = false;\n }\n};\nstyfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) {\n var prop = this.properties[name];\n var triggerCheck = getTrigger(prop);\n if (triggerCheck != null && triggerCheck(fromValue, toValue)) {\n onTrigger(prop);\n }\n};\nstyfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) {\n var _this = this;\n this.checkTrigger(ele, name, fromValue, toValue, function (prop) {\n return prop.triggersZOrder;\n }, function () {\n _this._private.cy.notify('zorder', ele);\n });\n};\nstyfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) {\n this.checkTrigger(ele, name, fromValue, toValue, function (prop) {\n return prop.triggersBounds;\n }, function (prop) {\n ele.dirtyCompoundBoundsCache();\n ele.dirtyBoundingBoxCache();\n\n // if the prop change makes the bb of pll bezier edges invalid,\n // then dirty the pll edge bb cache as well\n if (\n // only for beziers -- so performance of other edges isn't affected\n prop.triggersBoundsOfParallelBeziers && name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier')) {\n ele.parallelEdges().forEach(function (pllEdge) {\n if (pllEdge.isBundledBezier()) {\n pllEdge.dirtyBoundingBoxCache();\n }\n });\n }\n if (prop.triggersBoundsOfConnectedEdges && name === 'display' && (fromValue === 'none' || toValue === 'none')) {\n ele.connectedEdges().forEach(function (edge) {\n edge.dirtyBoundingBoxCache();\n });\n }\n });\n};\nstyfn$8.checkTriggers = function (ele, name, fromValue, toValue) {\n ele.dirtyStyleCache();\n this.checkZOrderTrigger(ele, name, fromValue, toValue);\n this.checkBoundsTrigger(ele, name, fromValue, toValue);\n};\n\nvar styfn$7 = {};\n\n// bypasses are applied to an existing style on an element, and just tacked on temporarily\n// returns true iff application was successful for at least 1 specified property\nstyfn$7.applyBypass = function (eles, name, value, updateTransitions) {\n var self = this;\n var props = [];\n var isBypass = true;\n\n // put all the properties (can specify one or many) in an array after parsing them\n if (name === '*' || name === '**') {\n // apply to all property names\n\n if (value !== undefined) {\n for (var i = 0; i < self.properties.length; i++) {\n var prop = self.properties[i];\n var _name = prop.name;\n var parsedProp = this.parse(_name, value, true);\n if (parsedProp) {\n props.push(parsedProp);\n }\n }\n }\n } else if (string(name)) {\n // then parse the single property\n var _parsedProp = this.parse(name, value, true);\n if (_parsedProp) {\n props.push(_parsedProp);\n }\n } else if (plainObject(name)) {\n // then parse each property\n var specifiedProps = name;\n updateTransitions = value;\n var names = Object.keys(specifiedProps);\n for (var _i = 0; _i < names.length; _i++) {\n var _name2 = names[_i];\n var _value = specifiedProps[_name2];\n if (_value === undefined) {\n // try camel case name too\n _value = specifiedProps[dash2camel(_name2)];\n }\n if (_value !== undefined) {\n var _parsedProp2 = this.parse(_name2, _value, true);\n if (_parsedProp2) {\n props.push(_parsedProp2);\n }\n }\n }\n } else {\n // can't do anything without well defined properties\n return false;\n }\n\n // we've failed if there are no valid properties\n if (props.length === 0) {\n return false;\n }\n\n // now, apply the bypass properties on the elements\n var ret = false; // return true if at least one succesful bypass applied\n for (var _i2 = 0; _i2 < eles.length; _i2++) {\n // for each ele\n var ele = eles[_i2];\n var diffProps = {};\n var diffProp = void 0;\n for (var j = 0; j < props.length; j++) {\n // for each prop\n var _prop = props[j];\n if (updateTransitions) {\n var prevProp = ele.pstyle(_prop.name);\n diffProp = diffProps[_prop.name] = {\n prev: prevProp\n };\n }\n ret = this.applyParsedProperty(ele, copy(_prop)) || ret;\n if (updateTransitions) {\n diffProp.next = ele.pstyle(_prop.name);\n }\n } // for props\n\n if (ret) {\n this.updateStyleHints(ele);\n }\n if (updateTransitions) {\n this.updateTransitions(ele, diffProps, isBypass);\n }\n } // for eles\n\n return ret;\n};\n\n// only useful in specific cases like animation\nstyfn$7.overrideBypass = function (eles, name, value) {\n name = camel2dash(name);\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var prop = ele._private.style[name];\n var type = this.properties[name].type;\n var isColor = type.color;\n var isMulti = type.mutiple;\n var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value;\n if (!prop || !prop.bypass) {\n // need a bypass if one doesn't exist\n this.applyBypass(ele, name, value);\n } else {\n prop.value = value;\n if (prop.pfValue != null) {\n prop.pfValue = value;\n }\n if (isColor) {\n prop.strValue = 'rgb(' + value.join(',') + ')';\n } else if (isMulti) {\n prop.strValue = value.join(' ');\n } else {\n prop.strValue = '' + value;\n }\n this.updateStyleHints(ele);\n }\n this.checkTriggers(ele, name, oldValue, value);\n }\n};\nstyfn$7.removeAllBypasses = function (eles, updateTransitions) {\n return this.removeBypasses(eles, this.propertyNames, updateTransitions);\n};\nstyfn$7.removeBypasses = function (eles, props, updateTransitions) {\n var isBypass = true;\n for (var j = 0; j < eles.length; j++) {\n var ele = eles[j];\n var diffProps = {};\n for (var i = 0; i < props.length; i++) {\n var name = props[i];\n var prop = this.properties[name];\n var prevProp = ele.pstyle(prop.name);\n if (!prevProp || !prevProp.bypass) {\n // if a bypass doesn't exist for the prop, nothing needs to be removed\n continue;\n }\n var value = ''; // empty => remove bypass\n var parsedProp = this.parse(name, value, true);\n var diffProp = diffProps[prop.name] = {\n prev: prevProp\n };\n this.applyParsedProperty(ele, parsedProp);\n diffProp.next = ele.pstyle(prop.name);\n } // for props\n\n this.updateStyleHints(ele);\n if (updateTransitions) {\n this.updateTransitions(ele, diffProps, isBypass);\n }\n } // for eles\n};\n\nvar styfn$6 = {};\n\n// gets what an em size corresponds to in pixels relative to a dom element\nstyfn$6.getEmSizeInPixels = function () {\n var px = this.containerCss('font-size');\n if (px != null) {\n return parseFloat(px);\n } else {\n return 1; // for headless\n }\n};\n\n// gets css property from the core container\nstyfn$6.containerCss = function (propName) {\n var cy = this._private.cy;\n var domElement = cy.container();\n var containerWindow = cy.window();\n if (containerWindow && domElement && containerWindow.getComputedStyle) {\n return containerWindow.getComputedStyle(domElement).getPropertyValue(propName);\n }\n};\n\nvar styfn$5 = {};\n\n// gets the rendered style for an element\nstyfn$5.getRenderedStyle = function (ele, prop) {\n if (prop) {\n return this.getStylePropertyValue(ele, prop, true);\n } else {\n return this.getRawStyle(ele, true);\n }\n};\n\n// gets the raw style for an element\nstyfn$5.getRawStyle = function (ele, isRenderedVal) {\n var self = this;\n ele = ele[0]; // insure it's an element\n\n if (ele) {\n var rstyle = {};\n for (var i = 0; i < self.properties.length; i++) {\n var prop = self.properties[i];\n var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal);\n if (val != null) {\n rstyle[prop.name] = val;\n rstyle[dash2camel(prop.name)] = val;\n }\n }\n return rstyle;\n }\n};\nstyfn$5.getIndexedStyle = function (ele, property, subproperty, index) {\n var pstyle = ele.pstyle(property)[subproperty][index];\n return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0];\n};\nstyfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) {\n var self = this;\n ele = ele[0]; // insure it's an element\n\n if (ele) {\n var prop = self.properties[propName];\n if (prop.alias) {\n prop = prop.pointsTo;\n }\n var type = prop.type;\n var styleProp = ele.pstyle(prop.name);\n if (styleProp) {\n var value = styleProp.value,\n units = styleProp.units,\n strValue = styleProp.strValue;\n if (isRenderedVal && type.number && value != null && number$1(value)) {\n var zoom = ele.cy().zoom();\n var getRenderedValue = function getRenderedValue(val) {\n return val * zoom;\n };\n var getValueStringWithUnits = function getValueStringWithUnits(val, units) {\n return getRenderedValue(val) + units;\n };\n var isArrayValue = array(value);\n var haveUnits = isArrayValue ? units.every(function (u) {\n return u != null;\n }) : units != null;\n if (haveUnits) {\n if (isArrayValue) {\n return value.map(function (v, i) {\n return getValueStringWithUnits(v, units[i]);\n }).join(' ');\n } else {\n return getValueStringWithUnits(value, units);\n }\n } else {\n if (isArrayValue) {\n return value.map(function (v) {\n return string(v) ? v : '' + getRenderedValue(v);\n }).join(' ');\n } else {\n return '' + getRenderedValue(value);\n }\n }\n } else if (strValue != null) {\n return strValue;\n }\n }\n return null;\n }\n};\nstyfn$5.getAnimationStartStyle = function (ele, aniProps) {\n var rstyle = {};\n for (var i = 0; i < aniProps.length; i++) {\n var aniProp = aniProps[i];\n var name = aniProp.name;\n var styleProp = ele.pstyle(name);\n if (styleProp !== undefined) {\n // then make a prop of it\n if (plainObject(styleProp)) {\n styleProp = this.parse(name, styleProp.strValue);\n } else {\n styleProp = this.parse(name, styleProp);\n }\n }\n if (styleProp) {\n rstyle[name] = styleProp;\n }\n }\n return rstyle;\n};\nstyfn$5.getPropsList = function (propsObj) {\n var self = this;\n var rstyle = [];\n var style = propsObj;\n var props = self.properties;\n if (style) {\n var names = Object.keys(style);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n var val = style[name];\n var prop = props[name] || props[camel2dash(name)];\n var styleProp = this.parse(prop.name, val);\n if (styleProp) {\n rstyle.push(styleProp);\n }\n }\n }\n return rstyle;\n};\nstyfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) {\n var hash = seed.slice();\n var name, val, strVal, chVal;\n var i, j;\n for (i = 0; i < propNames.length; i++) {\n name = propNames[i];\n val = ele.pstyle(name, false);\n if (val == null) {\n continue;\n } else if (val.pfValue != null) {\n hash[0] = hashInt(chVal, hash[0]);\n hash[1] = hashIntAlt(chVal, hash[1]);\n } else {\n strVal = val.strValue;\n for (j = 0; j < strVal.length; j++) {\n chVal = strVal.charCodeAt(j);\n hash[0] = hashInt(chVal, hash[0]);\n hash[1] = hashIntAlt(chVal, hash[1]);\n }\n }\n }\n return hash;\n};\nstyfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash;\n\nvar styfn$4 = {};\nstyfn$4.appendFromJson = function (json) {\n var style = this;\n for (var i = 0; i < json.length; i++) {\n var context = json[i];\n var selector = context.selector;\n var props = context.style || context.css;\n var names = Object.keys(props);\n style.selector(selector); // apply selector\n\n for (var j = 0; j < names.length; j++) {\n var name = names[j];\n var value = props[name];\n style.css(name, value); // apply property\n }\n }\n\n return style;\n};\n\n// accessible cy.style() function\nstyfn$4.fromJson = function (json) {\n var style = this;\n style.resetToDefault();\n style.appendFromJson(json);\n return style;\n};\n\n// get json from cy.style() api\nstyfn$4.json = function () {\n var json = [];\n for (var i = this.defaultLength; i < this.length; i++) {\n var cxt = this[i];\n var selector = cxt.selector;\n var props = cxt.properties;\n var css = {};\n for (var j = 0; j < props.length; j++) {\n var prop = props[j];\n css[prop.name] = prop.strValue;\n }\n json.push({\n selector: !selector ? 'core' : selector.toString(),\n style: css\n });\n }\n return json;\n};\n\nvar styfn$3 = {};\nstyfn$3.appendFromString = function (string) {\n var self = this;\n var style = this;\n var remaining = '' + string;\n var selAndBlockStr;\n var blockRem;\n var propAndValStr;\n\n // remove comments from the style string\n remaining = remaining.replace(/[/][*](\\s|.)+?[*][/]/g, '');\n function removeSelAndBlockFromRemaining() {\n // remove the parsed selector and block from the remaining text to parse\n if (remaining.length > selAndBlockStr.length) {\n remaining = remaining.substr(selAndBlockStr.length);\n } else {\n remaining = '';\n }\n }\n function removePropAndValFromRem() {\n // remove the parsed property and value from the remaining block text to parse\n if (blockRem.length > propAndValStr.length) {\n blockRem = blockRem.substr(propAndValStr.length);\n } else {\n blockRem = '';\n }\n }\n for (;;) {\n var nothingLeftToParse = remaining.match(/^\\s*$/);\n if (nothingLeftToParse) {\n break;\n }\n var selAndBlock = remaining.match(/^\\s*((?:.|\\s)+?)\\s*\\{((?:.|\\s)+?)\\}/);\n if (!selAndBlock) {\n warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining);\n break;\n }\n selAndBlockStr = selAndBlock[0];\n\n // parse the selector\n var selectorStr = selAndBlock[1];\n if (selectorStr !== 'core') {\n var selector = new Selector(selectorStr);\n if (selector.invalid) {\n warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr);\n\n // skip this selector and block\n removeSelAndBlockFromRemaining();\n continue;\n }\n }\n\n // parse the block of properties and values\n var blockStr = selAndBlock[2];\n var invalidBlock = false;\n blockRem = blockStr;\n var props = [];\n for (;;) {\n var _nothingLeftToParse = blockRem.match(/^\\s*$/);\n if (_nothingLeftToParse) {\n break;\n }\n var propAndVal = blockRem.match(/^\\s*(.+?)\\s*:\\s*(.+?)(?:\\s*;|\\s*$)/);\n if (!propAndVal) {\n warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr);\n invalidBlock = true;\n break;\n }\n propAndValStr = propAndVal[0];\n var propStr = propAndVal[1];\n var valStr = propAndVal[2];\n var prop = self.properties[propStr];\n if (!prop) {\n warn('Skipping property: Invalid property name in: ' + propAndValStr);\n\n // skip this property in the block\n removePropAndValFromRem();\n continue;\n }\n var parsedProp = style.parse(propStr, valStr);\n if (!parsedProp) {\n warn('Skipping property: Invalid property definition in: ' + propAndValStr);\n\n // skip this property in the block\n removePropAndValFromRem();\n continue;\n }\n props.push({\n name: propStr,\n val: valStr\n });\n removePropAndValFromRem();\n }\n if (invalidBlock) {\n removeSelAndBlockFromRemaining();\n break;\n }\n\n // put the parsed block in the style\n style.selector(selectorStr);\n for (var i = 0; i < props.length; i++) {\n var _prop = props[i];\n style.css(_prop.name, _prop.val);\n }\n removeSelAndBlockFromRemaining();\n }\n return style;\n};\nstyfn$3.fromString = function (string) {\n var style = this;\n style.resetToDefault();\n style.appendFromString(string);\n return style;\n};\n\nvar styfn$2 = {};\n(function () {\n var number$1 = number;\n var rgba = rgbaNoBackRefs;\n var hsla = hslaNoBackRefs;\n var hex3$1 = hex3;\n var hex6$1 = hex6;\n var data = function data(prefix) {\n return '^' + prefix + '\\\\s*\\\\(\\\\s*([\\\\w\\\\.]+)\\\\s*\\\\)$';\n };\n var mapData = function mapData(prefix) {\n var mapArg = number$1 + '|\\\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1;\n return '^' + prefix + '\\\\s*\\\\(([\\\\w\\\\.]+)\\\\s*\\\\,\\\\s*(' + number$1 + ')\\\\s*\\\\,\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + mapArg + ')\\\\s*\\\\,\\\\s*(' + mapArg + ')\\\\)$';\n };\n var urlRegexes = ['^url\\\\s*\\\\(\\\\s*[\\'\"]?(.+?)[\\'\"]?\\\\s*\\\\)$', '^(none)$', '^(.+)$'];\n\n // each visual style property has a type and needs to be validated according to it\n styfn$2.types = {\n time: {\n number: true,\n min: 0,\n units: 's|ms',\n implicitUnits: 'ms'\n },\n percent: {\n number: true,\n min: 0,\n max: 100,\n units: '%',\n implicitUnits: '%'\n },\n percentages: {\n number: true,\n min: 0,\n max: 100,\n units: '%',\n implicitUnits: '%',\n multiple: true\n },\n zeroOneNumber: {\n number: true,\n min: 0,\n max: 1,\n unitless: true\n },\n zeroOneNumbers: {\n number: true,\n min: 0,\n max: 1,\n unitless: true,\n multiple: true\n },\n nOneOneNumber: {\n number: true,\n min: -1,\n max: 1,\n unitless: true\n },\n nonNegativeInt: {\n number: true,\n min: 0,\n integer: true,\n unitless: true\n },\n nonNegativeNumber: {\n number: true,\n min: 0,\n unitless: true\n },\n position: {\n enums: ['parent', 'origin']\n },\n nodeSize: {\n number: true,\n min: 0,\n enums: ['label']\n },\n number: {\n number: true,\n unitless: true\n },\n numbers: {\n number: true,\n unitless: true,\n multiple: true\n },\n positiveNumber: {\n number: true,\n unitless: true,\n min: 0,\n strictMin: true\n },\n size: {\n number: true,\n min: 0\n },\n bidirectionalSize: {\n number: true\n },\n // allows negative\n bidirectionalSizeMaybePercent: {\n number: true,\n allowPercent: true\n },\n // allows negative\n bidirectionalSizes: {\n number: true,\n multiple: true\n },\n // allows negative\n sizeMaybePercent: {\n number: true,\n min: 0,\n allowPercent: true\n },\n axisDirection: {\n enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto']\n },\n paddingRelativeTo: {\n enums: ['width', 'height', 'average', 'min', 'max']\n },\n bgWH: {\n number: true,\n min: 0,\n allowPercent: true,\n enums: ['auto'],\n multiple: true\n },\n bgPos: {\n number: true,\n allowPercent: true,\n multiple: true\n },\n bgRelativeTo: {\n enums: ['inner', 'include-padding'],\n multiple: true\n },\n bgRepeat: {\n enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'],\n multiple: true\n },\n bgFit: {\n enums: ['none', 'contain', 'cover'],\n multiple: true\n },\n bgCrossOrigin: {\n enums: ['anonymous', 'use-credentials', 'null'],\n multiple: true\n },\n bgClip: {\n enums: ['none', 'node'],\n multiple: true\n },\n bgContainment: {\n enums: ['inside', 'over'],\n multiple: true\n },\n color: {\n color: true\n },\n colors: {\n color: true,\n multiple: true\n },\n fill: {\n enums: ['solid', 'linear-gradient', 'radial-gradient']\n },\n bool: {\n enums: ['yes', 'no']\n },\n bools: {\n enums: ['yes', 'no'],\n multiple: true\n },\n lineStyle: {\n enums: ['solid', 'dotted', 'dashed']\n },\n lineCap: {\n enums: ['butt', 'round', 'square']\n },\n linePosition: {\n enums: ['center', 'inside', 'outside']\n },\n lineJoin: {\n enums: ['round', 'bevel', 'miter']\n },\n borderStyle: {\n enums: ['solid', 'dotted', 'dashed', 'double']\n },\n curveStyle: {\n enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi', 'round-segments', 'round-taxi']\n },\n radiusType: {\n enums: ['arc-radius', 'influence-radius'],\n multiple: true\n },\n fontFamily: {\n regex: '^([\\\\w- \\\\\"]+(?:\\\\s*,\\\\s*[\\\\w- \\\\\"]+)*)$'\n },\n fontStyle: {\n enums: ['italic', 'normal', 'oblique']\n },\n fontWeight: {\n enums: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n },\n textDecoration: {\n enums: ['none', 'underline', 'overline', 'line-through']\n },\n textTransform: {\n enums: ['none', 'uppercase', 'lowercase']\n },\n textWrap: {\n enums: ['none', 'wrap', 'ellipsis']\n },\n textOverflowWrap: {\n enums: ['whitespace', 'anywhere']\n },\n textBackgroundShape: {\n enums: ['rectangle', 'roundrectangle', 'round-rectangle']\n },\n nodeShape: {\n enums: ['rectangle', 'roundrectangle', 'round-rectangle', 'cutrectangle', 'cut-rectangle', 'bottomroundrectangle', 'bottom-round-rectangle', 'barrel', 'ellipse', 'triangle', 'round-triangle', 'square', 'pentagon', 'round-pentagon', 'hexagon', 'round-hexagon', 'concavehexagon', 'concave-hexagon', 'heptagon', 'round-heptagon', 'octagon', 'round-octagon', 'tag', 'round-tag', 'star', 'diamond', 'round-diamond', 'vee', 'rhomboid', 'right-rhomboid', 'polygon']\n },\n overlayShape: {\n enums: ['roundrectangle', 'round-rectangle', 'ellipse']\n },\n cornerRadius: {\n number: true,\n min: 0,\n units: 'px|em',\n implicitUnits: 'px',\n enums: ['auto']\n },\n compoundIncludeLabels: {\n enums: ['include', 'exclude']\n },\n arrowShape: {\n enums: ['tee', 'triangle', 'triangle-tee', 'circle-triangle', 'triangle-cross', 'triangle-backcurve', 'vee', 'square', 'circle', 'diamond', 'chevron', 'none']\n },\n arrowFill: {\n enums: ['filled', 'hollow']\n },\n arrowWidth: {\n number: true,\n units: '%|px|em',\n implicitUnits: 'px',\n enums: ['match-line']\n },\n display: {\n enums: ['element', 'none']\n },\n visibility: {\n enums: ['hidden', 'visible']\n },\n zCompoundDepth: {\n enums: ['bottom', 'orphan', 'auto', 'top']\n },\n zIndexCompare: {\n enums: ['auto', 'manual']\n },\n valign: {\n enums: ['top', 'center', 'bottom']\n },\n halign: {\n enums: ['left', 'center', 'right']\n },\n justification: {\n enums: ['left', 'center', 'right', 'auto']\n },\n text: {\n string: true\n },\n data: {\n mapping: true,\n regex: data('data')\n },\n layoutData: {\n mapping: true,\n regex: data('layoutData')\n },\n scratch: {\n mapping: true,\n regex: data('scratch')\n },\n mapData: {\n mapping: true,\n regex: mapData('mapData')\n },\n mapLayoutData: {\n mapping: true,\n regex: mapData('mapLayoutData')\n },\n mapScratch: {\n mapping: true,\n regex: mapData('mapScratch')\n },\n fn: {\n mapping: true,\n fn: true\n },\n url: {\n regexes: urlRegexes,\n singleRegexMatchValue: true\n },\n urls: {\n regexes: urlRegexes,\n singleRegexMatchValue: true,\n multiple: true\n },\n propList: {\n propList: true\n },\n angle: {\n number: true,\n units: 'deg|rad',\n implicitUnits: 'rad'\n },\n textRotation: {\n number: true,\n units: 'deg|rad',\n implicitUnits: 'rad',\n enums: ['none', 'autorotate']\n },\n polygonPointList: {\n number: true,\n multiple: true,\n evenMultiple: true,\n min: -1,\n max: 1,\n unitless: true\n },\n edgeDistances: {\n enums: ['intersection', 'node-position', 'endpoints']\n },\n edgeEndpoint: {\n number: true,\n multiple: true,\n units: '%|px|em|deg|rad',\n implicitUnits: 'px',\n enums: ['inside-to-node', 'outside-to-node', 'outside-to-node-or-label', 'outside-to-line', 'outside-to-line-or-label'],\n singleEnum: true,\n validate: function validate(valArr, unitsArr) {\n switch (valArr.length) {\n case 2:\n // can be % or px only\n return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad';\n case 1:\n // can be enum, deg, or rad only\n return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad';\n default:\n return false;\n }\n }\n },\n easing: {\n regexes: ['^(spring)\\\\s*\\\\(\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*\\\\)$', '^(cubic-bezier)\\\\s*\\\\(\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*,\\\\s*(' + number$1 + ')\\\\s*\\\\)$'],\n enums: ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'ease-in-sine', 'ease-out-sine', 'ease-in-out-sine', 'ease-in-quad', 'ease-out-quad', 'ease-in-out-quad', 'ease-in-cubic', 'ease-out-cubic', 'ease-in-out-cubic', 'ease-in-quart', 'ease-out-quart', 'ease-in-out-quart', 'ease-in-quint', 'ease-out-quint', 'ease-in-out-quint', 'ease-in-expo', 'ease-out-expo', 'ease-in-out-expo', 'ease-in-circ', 'ease-out-circ', 'ease-in-out-circ']\n },\n gradientDirection: {\n enums: ['to-bottom', 'to-top', 'to-left', 'to-right', 'to-bottom-right', 'to-bottom-left', 'to-top-right', 'to-top-left', 'to-right-bottom', 'to-left-bottom', 'to-right-top', 'to-left-top' // different order\n ]\n },\n\n boundsExpansion: {\n number: true,\n multiple: true,\n min: 0,\n validate: function validate(valArr) {\n var length = valArr.length;\n return length === 1 || length === 2 || length === 4;\n }\n }\n };\n var diff = {\n zeroNonZero: function zeroNonZero(val1, val2) {\n if ((val1 == null || val2 == null) && val1 !== val2) {\n return true; // null cases could represent any value\n }\n if (val1 == 0 && val2 != 0) {\n return true;\n } else if (val1 != 0 && val2 == 0) {\n return true;\n } else {\n return false;\n }\n },\n any: function any(val1, val2) {\n return val1 != val2;\n },\n emptyNonEmpty: function emptyNonEmpty(str1, str2) {\n var empty1 = emptyString(str1);\n var empty2 = emptyString(str2);\n return empty1 && !empty2 || !empty1 && empty2;\n }\n };\n\n // define visual style properties\n //\n // - n.b. adding a new group of props may require updates to updateStyleHints()\n // - adding new props to an existing group gets handled automatically\n\n var t = styfn$2.types;\n var mainLabel = [{\n name: 'label',\n type: t.text,\n triggersBounds: diff.any,\n triggersZOrder: diff.emptyNonEmpty\n }, {\n name: 'text-rotation',\n type: t.textRotation,\n triggersBounds: diff.any\n }, {\n name: 'text-margin-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'text-margin-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }];\n var sourceLabel = [{\n name: 'source-label',\n type: t.text,\n triggersBounds: diff.any\n }, {\n name: 'source-text-rotation',\n type: t.textRotation,\n triggersBounds: diff.any\n }, {\n name: 'source-text-margin-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'source-text-margin-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'source-text-offset',\n type: t.size,\n triggersBounds: diff.any\n }];\n var targetLabel = [{\n name: 'target-label',\n type: t.text,\n triggersBounds: diff.any\n }, {\n name: 'target-text-rotation',\n type: t.textRotation,\n triggersBounds: diff.any\n }, {\n name: 'target-text-margin-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'target-text-margin-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'target-text-offset',\n type: t.size,\n triggersBounds: diff.any\n }];\n var labelDimensions = [{\n name: 'font-family',\n type: t.fontFamily,\n triggersBounds: diff.any\n }, {\n name: 'font-style',\n type: t.fontStyle,\n triggersBounds: diff.any\n }, {\n name: 'font-weight',\n type: t.fontWeight,\n triggersBounds: diff.any\n }, {\n name: 'font-size',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-transform',\n type: t.textTransform,\n triggersBounds: diff.any\n }, {\n name: 'text-wrap',\n type: t.textWrap,\n triggersBounds: diff.any\n }, {\n name: 'text-overflow-wrap',\n type: t.textOverflowWrap,\n triggersBounds: diff.any\n }, {\n name: 'text-max-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-outline-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'line-height',\n type: t.positiveNumber,\n triggersBounds: diff.any\n }];\n var commonLabel = [{\n name: 'text-valign',\n type: t.valign,\n triggersBounds: diff.any\n }, {\n name: 'text-halign',\n type: t.halign,\n triggersBounds: diff.any\n }, {\n name: 'color',\n type: t.color\n }, {\n name: 'text-outline-color',\n type: t.color\n }, {\n name: 'text-outline-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'text-background-color',\n type: t.color\n }, {\n name: 'text-background-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'text-background-padding',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-border-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'text-border-color',\n type: t.color\n }, {\n name: 'text-border-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'text-border-style',\n type: t.borderStyle,\n triggersBounds: diff.any\n }, {\n name: 'text-background-shape',\n type: t.textBackgroundShape,\n triggersBounds: diff.any\n }, {\n name: 'text-justification',\n type: t.justification\n }];\n var behavior = [{\n name: 'events',\n type: t.bool,\n triggersZOrder: diff.any\n }, {\n name: 'text-events',\n type: t.bool,\n triggersZOrder: diff.any\n }];\n var visibility = [{\n name: 'display',\n type: t.display,\n triggersZOrder: diff.any,\n triggersBounds: diff.any,\n triggersBoundsOfConnectedEdges: true\n }, {\n name: 'visibility',\n type: t.visibility,\n triggersZOrder: diff.any\n }, {\n name: 'opacity',\n type: t.zeroOneNumber,\n triggersZOrder: diff.zeroNonZero\n }, {\n name: 'text-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'min-zoomed-font-size',\n type: t.size\n }, {\n name: 'z-compound-depth',\n type: t.zCompoundDepth,\n triggersZOrder: diff.any\n }, {\n name: 'z-index-compare',\n type: t.zIndexCompare,\n triggersZOrder: diff.any\n }, {\n name: 'z-index',\n type: t.number,\n triggersZOrder: diff.any\n }];\n var overlay = [{\n name: 'overlay-padding',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'overlay-color',\n type: t.color\n }, {\n name: 'overlay-opacity',\n type: t.zeroOneNumber,\n triggersBounds: diff.zeroNonZero\n }, {\n name: 'overlay-shape',\n type: t.overlayShape,\n triggersBounds: diff.any\n }, {\n name: 'overlay-corner-radius',\n type: t.cornerRadius\n }];\n var underlay = [{\n name: 'underlay-padding',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'underlay-color',\n type: t.color\n }, {\n name: 'underlay-opacity',\n type: t.zeroOneNumber,\n triggersBounds: diff.zeroNonZero\n }, {\n name: 'underlay-shape',\n type: t.overlayShape,\n triggersBounds: diff.any\n }, {\n name: 'underlay-corner-radius',\n type: t.cornerRadius\n }];\n var transition = [{\n name: 'transition-property',\n type: t.propList\n }, {\n name: 'transition-duration',\n type: t.time\n }, {\n name: 'transition-delay',\n type: t.time\n }, {\n name: 'transition-timing-function',\n type: t.easing\n }];\n var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) {\n if (parsedProp.value === 'label') {\n return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway)\n } else {\n return parsedProp.pfValue;\n }\n };\n var nodeBody = [{\n name: 'height',\n type: t.nodeSize,\n triggersBounds: diff.any,\n hashOverride: nodeSizeHashOverride\n }, {\n name: 'width',\n type: t.nodeSize,\n triggersBounds: diff.any,\n hashOverride: nodeSizeHashOverride\n }, {\n name: 'shape',\n type: t.nodeShape,\n triggersBounds: diff.any\n }, {\n name: 'shape-polygon-points',\n type: t.polygonPointList,\n triggersBounds: diff.any\n }, {\n name: 'corner-radius',\n type: t.cornerRadius\n }, {\n name: 'background-color',\n type: t.color\n }, {\n name: 'background-fill',\n type: t.fill\n }, {\n name: 'background-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'background-blacken',\n type: t.nOneOneNumber\n }, {\n name: 'background-gradient-stop-colors',\n type: t.colors\n }, {\n name: 'background-gradient-stop-positions',\n type: t.percentages\n }, {\n name: 'background-gradient-direction',\n type: t.gradientDirection\n }, {\n name: 'padding',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'padding-relative-to',\n type: t.paddingRelativeTo,\n triggersBounds: diff.any\n }, {\n name: 'bounds-expansion',\n type: t.boundsExpansion,\n triggersBounds: diff.any\n }];\n var nodeBorder = [{\n name: 'border-color',\n type: t.color\n }, {\n name: 'border-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'border-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'border-style',\n type: t.borderStyle\n }, {\n name: 'border-cap',\n type: t.lineCap\n }, {\n name: 'border-join',\n type: t.lineJoin\n }, {\n name: 'border-dash-pattern',\n type: t.numbers\n }, {\n name: 'border-dash-offset',\n type: t.number\n }, {\n name: 'border-position',\n type: t.linePosition\n }];\n var nodeOutline = [{\n name: 'outline-color',\n type: t.color\n }, {\n name: 'outline-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'outline-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'outline-style',\n type: t.borderStyle\n }, {\n name: 'outline-offset',\n type: t.size,\n triggersBounds: diff.any\n }];\n var backgroundImage = [{\n name: 'background-image',\n type: t.urls\n }, {\n name: 'background-image-crossorigin',\n type: t.bgCrossOrigin\n }, {\n name: 'background-image-opacity',\n type: t.zeroOneNumbers\n }, {\n name: 'background-image-containment',\n type: t.bgContainment\n }, {\n name: 'background-image-smoothing',\n type: t.bools\n }, {\n name: 'background-position-x',\n type: t.bgPos\n }, {\n name: 'background-position-y',\n type: t.bgPos\n }, {\n name: 'background-width-relative-to',\n type: t.bgRelativeTo\n }, {\n name: 'background-height-relative-to',\n type: t.bgRelativeTo\n }, {\n name: 'background-repeat',\n type: t.bgRepeat\n }, {\n name: 'background-fit',\n type: t.bgFit\n }, {\n name: 'background-clip',\n type: t.bgClip\n }, {\n name: 'background-width',\n type: t.bgWH\n }, {\n name: 'background-height',\n type: t.bgWH\n }, {\n name: 'background-offset-x',\n type: t.bgPos\n }, {\n name: 'background-offset-y',\n type: t.bgPos\n }];\n var compound = [{\n name: 'position',\n type: t.position,\n triggersBounds: diff.any\n }, {\n name: 'compound-sizing-wrt-labels',\n type: t.compoundIncludeLabels,\n triggersBounds: diff.any\n }, {\n name: 'min-width',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'min-width-bias-left',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'min-width-bias-right',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'min-height',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'min-height-bias-top',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'min-height-bias-bottom',\n type: t.sizeMaybePercent,\n triggersBounds: diff.any\n }];\n var edgeLine = [{\n name: 'line-style',\n type: t.lineStyle\n }, {\n name: 'line-color',\n type: t.color\n }, {\n name: 'line-fill',\n type: t.fill\n }, {\n name: 'line-cap',\n type: t.lineCap\n }, {\n name: 'line-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'line-dash-pattern',\n type: t.numbers\n }, {\n name: 'line-dash-offset',\n type: t.number\n }, {\n name: 'line-outline-width',\n type: t.size\n }, {\n name: 'line-outline-color',\n type: t.color\n }, {\n name: 'line-gradient-stop-colors',\n type: t.colors\n }, {\n name: 'line-gradient-stop-positions',\n type: t.percentages\n }, {\n name: 'curve-style',\n type: t.curveStyle,\n triggersBounds: diff.any,\n triggersBoundsOfParallelBeziers: true\n }, {\n name: 'haystack-radius',\n type: t.zeroOneNumber,\n triggersBounds: diff.any\n }, {\n name: 'source-endpoint',\n type: t.edgeEndpoint,\n triggersBounds: diff.any\n }, {\n name: 'target-endpoint',\n type: t.edgeEndpoint,\n triggersBounds: diff.any\n }, {\n name: 'control-point-step-size',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'control-point-distances',\n type: t.bidirectionalSizes,\n triggersBounds: diff.any\n }, {\n name: 'control-point-weights',\n type: t.numbers,\n triggersBounds: diff.any\n }, {\n name: 'segment-distances',\n type: t.bidirectionalSizes,\n triggersBounds: diff.any\n }, {\n name: 'segment-weights',\n type: t.numbers,\n triggersBounds: diff.any\n }, {\n name: 'segment-radii',\n type: t.numbers,\n triggersBounds: diff.any\n }, {\n name: 'radius-type',\n type: t.radiusType,\n triggersBounds: diff.any\n }, {\n name: 'taxi-turn',\n type: t.bidirectionalSizeMaybePercent,\n triggersBounds: diff.any\n }, {\n name: 'taxi-turn-min-distance',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'taxi-direction',\n type: t.axisDirection,\n triggersBounds: diff.any\n }, {\n name: 'taxi-radius',\n type: t.number,\n triggersBounds: diff.any\n }, {\n name: 'edge-distances',\n type: t.edgeDistances,\n triggersBounds: diff.any\n }, {\n name: 'arrow-scale',\n type: t.positiveNumber,\n triggersBounds: diff.any\n }, {\n name: 'loop-direction',\n type: t.angle,\n triggersBounds: diff.any\n }, {\n name: 'loop-sweep',\n type: t.angle,\n triggersBounds: diff.any\n }, {\n name: 'source-distance-from-node',\n type: t.size,\n triggersBounds: diff.any\n }, {\n name: 'target-distance-from-node',\n type: t.size,\n triggersBounds: diff.any\n }];\n var ghost = [{\n name: 'ghost',\n type: t.bool,\n triggersBounds: diff.any\n }, {\n name: 'ghost-offset-x',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'ghost-offset-y',\n type: t.bidirectionalSize,\n triggersBounds: diff.any\n }, {\n name: 'ghost-opacity',\n type: t.zeroOneNumber\n }];\n var core = [{\n name: 'selection-box-color',\n type: t.color\n }, {\n name: 'selection-box-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'selection-box-border-color',\n type: t.color\n }, {\n name: 'selection-box-border-width',\n type: t.size\n }, {\n name: 'active-bg-color',\n type: t.color\n }, {\n name: 'active-bg-opacity',\n type: t.zeroOneNumber\n }, {\n name: 'active-bg-size',\n type: t.size\n }, {\n name: 'outside-texture-bg-color',\n type: t.color\n }, {\n name: 'outside-texture-bg-opacity',\n type: t.zeroOneNumber\n }];\n\n // pie backgrounds for nodes\n var pie = [];\n styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use)\n pie.push({\n name: 'pie-size',\n type: t.sizeMaybePercent\n });\n for (var i = 1; i <= styfn$2.pieBackgroundN; i++) {\n pie.push({\n name: 'pie-' + i + '-background-color',\n type: t.color\n });\n pie.push({\n name: 'pie-' + i + '-background-size',\n type: t.percent\n });\n pie.push({\n name: 'pie-' + i + '-background-opacity',\n type: t.zeroOneNumber\n });\n }\n\n // edge arrows\n var edgeArrow = [];\n var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target'];\n [{\n name: 'arrow-shape',\n type: t.arrowShape,\n triggersBounds: diff.any\n }, {\n name: 'arrow-color',\n type: t.color\n }, {\n name: 'arrow-fill',\n type: t.arrowFill\n }, {\n name: 'arrow-width',\n type: t.arrowWidth\n }].forEach(function (prop) {\n arrowPrefixes.forEach(function (prefix) {\n var name = prefix + '-' + prop.name;\n var type = prop.type,\n triggersBounds = prop.triggersBounds;\n edgeArrow.push({\n name: name,\n type: type,\n triggersBounds: triggersBounds\n });\n });\n }, {});\n var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, nodeOutline, backgroundImage, pie, compound, edgeLine, edgeArrow, core);\n var propGroups = styfn$2.propertyGroups = {\n // common to all eles\n behavior: behavior,\n transition: transition,\n visibility: visibility,\n overlay: overlay,\n underlay: underlay,\n ghost: ghost,\n // labels\n commonLabel: commonLabel,\n labelDimensions: labelDimensions,\n mainLabel: mainLabel,\n sourceLabel: sourceLabel,\n targetLabel: targetLabel,\n // node props\n nodeBody: nodeBody,\n nodeBorder: nodeBorder,\n nodeOutline: nodeOutline,\n backgroundImage: backgroundImage,\n pie: pie,\n compound: compound,\n // edge props\n edgeLine: edgeLine,\n edgeArrow: edgeArrow,\n core: core\n };\n var propGroupNames = styfn$2.propertyGroupNames = {};\n var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups);\n propGroupKeys.forEach(function (key) {\n propGroupNames[key] = propGroups[key].map(function (prop) {\n return prop.name;\n });\n propGroups[key].forEach(function (prop) {\n return prop.groupKey = key;\n });\n });\n\n // define aliases\n var aliases = styfn$2.aliases = [{\n name: 'content',\n pointsTo: 'label'\n }, {\n name: 'control-point-distance',\n pointsTo: 'control-point-distances'\n }, {\n name: 'control-point-weight',\n pointsTo: 'control-point-weights'\n }, {\n name: 'segment-distance',\n pointsTo: 'segment-distances'\n }, {\n name: 'segment-weight',\n pointsTo: 'segment-weights'\n }, {\n name: 'segment-radius',\n pointsTo: 'segment-radii'\n }, {\n name: 'edge-text-rotation',\n pointsTo: 'text-rotation'\n }, {\n name: 'padding-left',\n pointsTo: 'padding'\n }, {\n name: 'padding-right',\n pointsTo: 'padding'\n }, {\n name: 'padding-top',\n pointsTo: 'padding'\n }, {\n name: 'padding-bottom',\n pointsTo: 'padding'\n }];\n\n // list of property names\n styfn$2.propertyNames = props.map(function (p) {\n return p.name;\n });\n\n // allow access of properties by name ( e.g. style.properties.height )\n for (var _i = 0; _i < props.length; _i++) {\n var prop = props[_i];\n props[prop.name] = prop; // allow lookup by name\n }\n\n // map aliases\n for (var _i2 = 0; _i2 < aliases.length; _i2++) {\n var alias = aliases[_i2];\n var pointsToProp = props[alias.pointsTo];\n var aliasProp = {\n name: alias.name,\n alias: true,\n pointsTo: pointsToProp\n };\n\n // add alias prop for parsing\n props.push(aliasProp);\n props[alias.name] = aliasProp; // allow lookup by name\n }\n})();\n\nstyfn$2.getDefaultProperty = function (name) {\n return this.getDefaultProperties()[name];\n};\nstyfn$2.getDefaultProperties = function () {\n var _p = this._private;\n if (_p.defaultProperties != null) {\n return _p.defaultProperties;\n }\n var rawProps = extend({\n // core props\n 'selection-box-color': '#ddd',\n 'selection-box-opacity': 0.65,\n 'selection-box-border-color': '#aaa',\n 'selection-box-border-width': 1,\n 'active-bg-color': 'black',\n 'active-bg-opacity': 0.15,\n 'active-bg-size': 30,\n 'outside-texture-bg-color': '#000',\n 'outside-texture-bg-opacity': 0.125,\n // common node/edge props\n 'events': 'yes',\n 'text-events': 'no',\n 'text-valign': 'top',\n 'text-halign': 'center',\n 'text-justification': 'auto',\n 'line-height': 1,\n 'color': '#000',\n 'text-outline-color': '#000',\n 'text-outline-width': 0,\n 'text-outline-opacity': 1,\n 'text-opacity': 1,\n 'text-decoration': 'none',\n 'text-transform': 'none',\n 'text-wrap': 'none',\n 'text-overflow-wrap': 'whitespace',\n 'text-max-width': 9999,\n 'text-background-color': '#000',\n 'text-background-opacity': 0,\n 'text-background-shape': 'rectangle',\n 'text-background-padding': 0,\n 'text-border-opacity': 0,\n 'text-border-width': 0,\n 'text-border-style': 'solid',\n 'text-border-color': '#000',\n 'font-family': 'Helvetica Neue, Helvetica, sans-serif',\n 'font-style': 'normal',\n 'font-weight': 'normal',\n 'font-size': 16,\n 'min-zoomed-font-size': 0,\n 'text-rotation': 'none',\n 'source-text-rotation': 'none',\n 'target-text-rotation': 'none',\n 'visibility': 'visible',\n 'display': 'element',\n 'opacity': 1,\n 'z-compound-depth': 'auto',\n 'z-index-compare': 'auto',\n 'z-index': 0,\n 'label': '',\n 'text-margin-x': 0,\n 'text-margin-y': 0,\n 'source-label': '',\n 'source-text-offset': 0,\n 'source-text-margin-x': 0,\n 'source-text-margin-y': 0,\n 'target-label': '',\n 'target-text-offset': 0,\n 'target-text-margin-x': 0,\n 'target-text-margin-y': 0,\n 'overlay-opacity': 0,\n 'overlay-color': '#000',\n 'overlay-padding': 10,\n 'overlay-shape': 'round-rectangle',\n 'overlay-corner-radius': 'auto',\n 'underlay-opacity': 0,\n 'underlay-color': '#000',\n 'underlay-padding': 10,\n 'underlay-shape': 'round-rectangle',\n 'underlay-corner-radius': 'auto',\n 'transition-property': 'none',\n 'transition-duration': 0,\n 'transition-delay': 0,\n 'transition-timing-function': 'linear',\n // node props\n 'background-blacken': 0,\n 'background-color': '#999',\n 'background-fill': 'solid',\n 'background-opacity': 1,\n 'background-image': 'none',\n 'background-image-crossorigin': 'anonymous',\n 'background-image-opacity': 1,\n 'background-image-containment': 'inside',\n 'background-image-smoothing': 'yes',\n 'background-position-x': '50%',\n 'background-position-y': '50%',\n 'background-offset-x': 0,\n 'background-offset-y': 0,\n 'background-width-relative-to': 'include-padding',\n 'background-height-relative-to': 'include-padding',\n 'background-repeat': 'no-repeat',\n 'background-fit': 'none',\n 'background-clip': 'node',\n 'background-width': 'auto',\n 'background-height': 'auto',\n 'border-color': '#000',\n 'border-opacity': 1,\n 'border-width': 0,\n 'border-style': 'solid',\n 'border-dash-pattern': [4, 2],\n 'border-dash-offset': 0,\n 'border-cap': 'butt',\n 'border-join': 'miter',\n 'border-position': 'center',\n 'outline-color': '#999',\n 'outline-opacity': 1,\n 'outline-width': 0,\n 'outline-offset': 0,\n 'outline-style': 'solid',\n 'height': 30,\n 'width': 30,\n 'shape': 'ellipse',\n 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1',\n 'corner-radius': 'auto',\n 'bounds-expansion': 0,\n // node gradient\n 'background-gradient-direction': 'to-bottom',\n 'background-gradient-stop-colors': '#999',\n 'background-gradient-stop-positions': '0%',\n // ghost props\n 'ghost': 'no',\n 'ghost-offset-y': 0,\n 'ghost-offset-x': 0,\n 'ghost-opacity': 0,\n // compound props\n 'padding': 0,\n 'padding-relative-to': 'width',\n 'position': 'origin',\n 'compound-sizing-wrt-labels': 'include',\n 'min-width': 0,\n 'min-width-bias-left': 0,\n 'min-width-bias-right': 0,\n 'min-height': 0,\n 'min-height-bias-top': 0,\n 'min-height-bias-bottom': 0\n }, {\n // node pie bg\n 'pie-size': '100%'\n }, [{\n name: 'pie-{{i}}-background-color',\n value: 'black'\n }, {\n name: 'pie-{{i}}-background-size',\n value: '0%'\n }, {\n name: 'pie-{{i}}-background-opacity',\n value: 1\n }].reduce(function (css, prop) {\n for (var i = 1; i <= styfn$2.pieBackgroundN; i++) {\n var name = prop.name.replace('{{i}}', i);\n var val = prop.value;\n css[name] = val;\n }\n return css;\n }, {}), {\n // edge props\n 'line-style': 'solid',\n 'line-color': '#999',\n 'line-fill': 'solid',\n 'line-cap': 'butt',\n 'line-opacity': 1,\n 'line-outline-width': 0,\n 'line-outline-color': '#000',\n 'line-gradient-stop-colors': '#999',\n 'line-gradient-stop-positions': '0%',\n 'control-point-step-size': 40,\n 'control-point-weights': 0.5,\n 'segment-weights': 0.5,\n 'segment-distances': 20,\n 'segment-radii': 15,\n 'radius-type': 'arc-radius',\n 'taxi-turn': '50%',\n 'taxi-radius': 15,\n 'taxi-turn-min-distance': 10,\n 'taxi-direction': 'auto',\n 'edge-distances': 'intersection',\n 'curve-style': 'haystack',\n 'haystack-radius': 0,\n 'arrow-scale': 1,\n 'loop-direction': '-45deg',\n 'loop-sweep': '-90deg',\n 'source-distance-from-node': 0,\n 'target-distance-from-node': 0,\n 'source-endpoint': 'outside-to-node',\n 'target-endpoint': 'outside-to-node',\n 'line-dash-pattern': [6, 3],\n 'line-dash-offset': 0\n }, [{\n name: 'arrow-shape',\n value: 'none'\n }, {\n name: 'arrow-color',\n value: '#999'\n }, {\n name: 'arrow-fill',\n value: 'filled'\n }, {\n name: 'arrow-width',\n value: 1\n }].reduce(function (css, prop) {\n styfn$2.arrowPrefixes.forEach(function (prefix) {\n var name = prefix + '-' + prop.name;\n var val = prop.value;\n css[name] = val;\n });\n return css;\n }, {}));\n var parsedProps = {};\n for (var i = 0; i < this.properties.length; i++) {\n var prop = this.properties[i];\n if (prop.pointsTo) {\n continue;\n }\n var name = prop.name;\n var val = rawProps[name];\n var parsedProp = this.parse(name, val);\n parsedProps[name] = parsedProp;\n }\n _p.defaultProperties = parsedProps;\n return _p.defaultProperties;\n};\nstyfn$2.addDefaultStylesheet = function () {\n this.selector(':parent').css({\n 'shape': 'rectangle',\n 'padding': 10,\n 'background-color': '#eee',\n 'border-color': '#ccc',\n 'border-width': 1\n }).selector('edge').css({\n 'width': 3\n }).selector(':loop').css({\n 'curve-style': 'bezier'\n }).selector('edge:compound').css({\n 'curve-style': 'bezier',\n 'source-endpoint': 'outside-to-line',\n 'target-endpoint': 'outside-to-line'\n }).selector(':selected').css({\n 'background-color': '#0169D9',\n 'line-color': '#0169D9',\n 'source-arrow-color': '#0169D9',\n 'target-arrow-color': '#0169D9',\n 'mid-source-arrow-color': '#0169D9',\n 'mid-target-arrow-color': '#0169D9'\n }).selector(':parent:selected').css({\n 'background-color': '#CCE1F9',\n 'border-color': '#aec8e5'\n }).selector(':active').css({\n 'overlay-color': 'black',\n 'overlay-padding': 10,\n 'overlay-opacity': 0.25\n });\n this.defaultLength = this.length;\n};\n\nvar styfn$1 = {};\n\n// a caching layer for property parsing\nstyfn$1.parse = function (name, value, propIsBypass, propIsFlat) {\n var self = this;\n\n // function values can't be cached in all cases, and there isn't much benefit of caching them anyway\n if (fn$6(value)) {\n return self.parseImplWarn(name, value, propIsBypass, propIsFlat);\n }\n var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat;\n var bypassKey = propIsBypass ? 't' : 'f';\n var valueKey = '' + value;\n var argHash = hashStrings(name, valueKey, bypassKey, flatKey);\n var propCache = self.propCache = self.propCache || [];\n var ret;\n if (!(ret = propCache[argHash])) {\n ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat);\n }\n\n // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden\n // - mappings can't be shared b/c mappings are per-element\n if (propIsBypass || propIsFlat === 'mapping') {\n // need a copy since props are mutated later in their lifecycles\n ret = copy(ret);\n if (ret) {\n ret.value = copy(ret.value); // because it could be an array, e.g. colour\n }\n }\n\n return ret;\n};\nstyfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) {\n var prop = this.parseImpl(name, value, propIsBypass, propIsFlat);\n if (!prop && value != null) {\n warn(\"The style property `\".concat(name, \": \").concat(value, \"` is invalid\"));\n }\n if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') {\n warn('The style value of `label` is deprecated for `' + prop.name + '`');\n }\n return prop;\n};\n\n// parse a property; return null on invalid; return parsed property otherwise\n// fields :\n// - name : the name of the property\n// - value : the parsed, native-typed value of the property\n// - strValue : a string value that represents the property value in valid css\n// - bypass : true iff the property is a bypass property\nstyfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) {\n var self = this;\n name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName')\n\n var property = self.properties[name];\n var passedValue = value;\n var types = self.types;\n if (!property) {\n return null;\n } // return null on property of unknown name\n if (value === undefined) {\n return null;\n } // can't assign undefined\n\n // the property may be an alias\n if (property.alias) {\n property = property.pointsTo;\n name = property.name;\n }\n var valueIsString = string(value);\n if (valueIsString) {\n // trim the value to make parsing easier\n value = value.trim();\n }\n var type = property.type;\n if (!type) {\n return null;\n } // no type, no luck\n\n // check if bypass is null or empty string (i.e. indication to delete bypass property)\n if (propIsBypass && (value === '' || value === null)) {\n return {\n name: name,\n value: value,\n bypass: true,\n deleteBypass: true\n };\n }\n\n // check if value is a function used as a mapper\n if (fn$6(value)) {\n return {\n name: name,\n value: value,\n strValue: 'fn',\n mapped: types.fn,\n bypass: propIsBypass\n };\n }\n\n // check if value is mapped\n var data, mapData;\n if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) {\n if (propIsBypass) {\n return false;\n } // mappers not allowed in bypass\n\n var mapped = types.data;\n return {\n name: name,\n value: data,\n strValue: '' + value,\n mapped: mapped,\n field: data[1],\n bypass: propIsBypass\n };\n } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) {\n if (propIsBypass) {\n return false;\n } // mappers not allowed in bypass\n if (type.multiple) {\n return false;\n } // impossible to map to num\n\n var _mapped = types.mapData;\n\n // we can map only if the type is a colour or a number\n if (!(type.color || type.number)) {\n return false;\n }\n var valueMin = this.parse(name, mapData[4]); // parse to validate\n if (!valueMin || valueMin.mapped) {\n return false;\n } // can't be invalid or mapped\n\n var valueMax = this.parse(name, mapData[5]); // parse to validate\n if (!valueMax || valueMax.mapped) {\n return false;\n } // can't be invalid or mapped\n\n // check if valueMin and valueMax are the same\n if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) {\n warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`');\n return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range\n } else if (type.color) {\n var c1 = valueMin.value;\n var c2 = valueMax.value;\n var same = c1[0] === c2[0] // red\n && c1[1] === c2[1] // green\n && c1[2] === c2[2] // blue\n && (\n // optional alpha\n c1[3] === c2[3] // same alpha outright\n || (c1[3] == null || c1[3] === 1 // full opacity for colour 1?\n ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2?\n );\n\n if (same) {\n return false;\n } // can't make a mapper without a range\n }\n\n return {\n name: name,\n value: mapData,\n strValue: '' + value,\n mapped: _mapped,\n field: mapData[1],\n fieldMin: parseFloat(mapData[2]),\n // min & max are numeric\n fieldMax: parseFloat(mapData[3]),\n valueMin: valueMin.value,\n valueMax: valueMax.value,\n bypass: propIsBypass\n };\n }\n if (type.multiple && propIsFlat !== 'multiple') {\n var vals;\n if (valueIsString) {\n vals = value.split(/\\s+/);\n } else if (array(value)) {\n vals = value;\n } else {\n vals = [value];\n }\n if (type.evenMultiple && vals.length % 2 !== 0) {\n return null;\n }\n var valArr = [];\n var unitsArr = [];\n var pfValArr = [];\n var strVal = '';\n var hasEnum = false;\n for (var i = 0; i < vals.length; i++) {\n var p = self.parse(name, vals[i], propIsBypass, 'multiple');\n hasEnum = hasEnum || string(p.value);\n valArr.push(p.value);\n pfValArr.push(p.pfValue != null ? p.pfValue : p.value);\n unitsArr.push(p.units);\n strVal += (i > 0 ? ' ' : '') + p.strValue;\n }\n if (type.validate && !type.validate(valArr, unitsArr)) {\n return null;\n }\n if (type.singleEnum && hasEnum) {\n if (valArr.length === 1 && string(valArr[0])) {\n return {\n name: name,\n value: valArr[0],\n strValue: valArr[0],\n bypass: propIsBypass\n };\n } else {\n return null;\n }\n }\n return {\n name: name,\n value: valArr,\n pfValue: pfValArr,\n strValue: strVal,\n bypass: propIsBypass,\n units: unitsArr\n };\n }\n\n // several types also allow enums\n var checkEnums = function checkEnums() {\n for (var _i = 0; _i < type.enums.length; _i++) {\n var en = type.enums[_i];\n if (en === value) {\n return {\n name: name,\n value: value,\n strValue: '' + value,\n bypass: propIsBypass\n };\n }\n }\n return null;\n };\n\n // check the type and return the appropriate object\n if (type.number) {\n var units;\n var implicitUnits = 'px'; // not set => px\n\n if (type.units) {\n // use specified units if set\n units = type.units;\n }\n if (type.implicitUnits) {\n implicitUnits = type.implicitUnits;\n }\n if (!type.unitless) {\n if (valueIsString) {\n var unitsRegex = 'px|em' + (type.allowPercent ? '|\\\\%' : '');\n if (units) {\n unitsRegex = units;\n } // only allow explicit units if so set\n var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$');\n if (match) {\n value = match[1];\n units = match[2] || implicitUnits;\n }\n } else if (!units || type.implicitUnits) {\n units = implicitUnits; // implicitly px if unspecified\n }\n }\n\n value = parseFloat(value);\n\n // if not a number and enums not allowed, then the value is invalid\n if (isNaN(value) && type.enums === undefined) {\n return null;\n }\n\n // check if this number type also accepts special keywords in place of numbers\n // (i.e. `left`, `auto`, etc)\n if (isNaN(value) && type.enums !== undefined) {\n value = passedValue;\n return checkEnums();\n }\n\n // check if value must be an integer\n if (type.integer && !integer(value)) {\n return null;\n }\n\n // check value is within range\n if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) {\n return null;\n }\n var ret = {\n name: name,\n value: value,\n strValue: '' + value + (units ? units : ''),\n units: units,\n bypass: propIsBypass\n };\n\n // normalise value in pixels\n if (type.unitless || units !== 'px' && units !== 'em') {\n ret.pfValue = value;\n } else {\n ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value;\n }\n\n // normalise value in ms\n if (units === 'ms' || units === 's') {\n ret.pfValue = units === 'ms' ? value : 1000 * value;\n }\n\n // normalise value in rad\n if (units === 'deg' || units === 'rad') {\n ret.pfValue = units === 'rad' ? value : deg2rad(value);\n }\n\n // normalize value in %\n if (units === '%') {\n ret.pfValue = value / 100;\n }\n return ret;\n } else if (type.propList) {\n var props = [];\n var propsStr = '' + value;\n if (propsStr === 'none') ; else {\n // go over each prop\n\n var propsSplit = propsStr.split(/\\s*,\\s*|\\s+/);\n for (var _i2 = 0; _i2 < propsSplit.length; _i2++) {\n var propName = propsSplit[_i2].trim();\n if (self.properties[propName]) {\n props.push(propName);\n } else {\n warn('`' + propName + '` is not a valid property name');\n }\n }\n if (props.length === 0) {\n return null;\n }\n }\n return {\n name: name,\n value: props,\n strValue: props.length === 0 ? 'none' : props.join(' '),\n bypass: propIsBypass\n };\n } else if (type.color) {\n var tuple = color2tuple(value);\n if (!tuple) {\n return null;\n }\n return {\n name: name,\n value: tuple,\n pfValue: tuple,\n strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')',\n // n.b. no spaces b/c of multiple support\n bypass: propIsBypass\n };\n } else if (type.regex || type.regexes) {\n // first check enums\n if (type.enums) {\n var enumProp = checkEnums();\n if (enumProp) {\n return enumProp;\n }\n }\n var regexes = type.regexes ? type.regexes : [type.regex];\n for (var _i3 = 0; _i3 < regexes.length; _i3++) {\n var regex = new RegExp(regexes[_i3]); // make a regex from the type string\n var m = regex.exec(value);\n if (m) {\n // regex matches\n return {\n name: name,\n value: type.singleRegexMatchValue ? m[1] : m,\n strValue: '' + value,\n bypass: propIsBypass\n };\n }\n }\n return null; // didn't match any\n } else if (type.string) {\n // just return\n return {\n name: name,\n value: '' + value,\n strValue: '' + value,\n bypass: propIsBypass\n };\n } else if (type.enums) {\n // check enums last because it's a combo type in others\n return checkEnums();\n } else {\n return null; // not a type we can handle\n }\n};\n\nvar Style = function Style(cy) {\n if (!(this instanceof Style)) {\n return new Style(cy);\n }\n if (!core(cy)) {\n error('A style must have a core reference');\n return;\n }\n this._private = {\n cy: cy,\n coreStyle: {}\n };\n this.length = 0;\n this.resetToDefault();\n};\nvar styfn = Style.prototype;\nstyfn.instanceString = function () {\n return 'style';\n};\n\n// remove all contexts\nstyfn.clear = function () {\n var _p = this._private;\n var cy = _p.cy;\n var eles = cy.elements();\n for (var i = 0; i < this.length; i++) {\n this[i] = undefined;\n }\n this.length = 0;\n _p.contextStyles = {};\n _p.propDiffs = {};\n this.cleanElements(eles, true);\n eles.forEach(function (ele) {\n var ele_p = ele[0]._private;\n ele_p.styleDirty = true;\n ele_p.appliedInitStyle = false;\n });\n return this; // chaining\n};\n\nstyfn.resetToDefault = function () {\n this.clear();\n this.addDefaultStylesheet();\n return this;\n};\n\n// builds a style object for the 'core' selector\nstyfn.core = function (propName) {\n return this._private.coreStyle[propName] || this.getDefaultProperty(propName);\n};\n\n// create a new context from the specified selector string and switch to that context\nstyfn.selector = function (selectorStr) {\n // 'core' is a special case and does not need a selector\n var selector = selectorStr === 'core' ? null : new Selector(selectorStr);\n var i = this.length++; // new context means new index\n this[i] = {\n selector: selector,\n properties: [],\n mappedProperties: [],\n index: i\n };\n return this; // chaining\n};\n\n// add one or many css rules to the current context\nstyfn.css = function () {\n var self = this;\n var args = arguments;\n if (args.length === 1) {\n var map = args[0];\n for (var i = 0; i < self.properties.length; i++) {\n var prop = self.properties[i];\n var mapVal = map[prop.name];\n if (mapVal === undefined) {\n mapVal = map[dash2camel(prop.name)];\n }\n if (mapVal !== undefined) {\n this.cssRule(prop.name, mapVal);\n }\n }\n } else if (args.length === 2) {\n this.cssRule(args[0], args[1]);\n }\n\n // do nothing if args are invalid\n\n return this; // chaining\n};\n\nstyfn.style = styfn.css;\n\n// add a single css rule to the current context\nstyfn.cssRule = function (name, value) {\n // name-value pair\n var property = this.parse(name, value);\n\n // add property to current context if valid\n if (property) {\n var i = this.length - 1;\n this[i].properties.push(property);\n this[i].properties[property.name] = property; // allow access by name as well\n\n if (property.name.match(/pie-(\\d+)-background-size/) && property.value) {\n this._private.hasPie = true;\n }\n if (property.mapped) {\n this[i].mappedProperties.push(property);\n }\n\n // add to core style if necessary\n var currentSelectorIsCore = !this[i].selector;\n if (currentSelectorIsCore) {\n this._private.coreStyle[property.name] = property;\n }\n }\n return this; // chaining\n};\n\nstyfn.append = function (style) {\n if (stylesheet(style)) {\n style.appendToStyle(this);\n } else if (array(style)) {\n this.appendFromJson(style);\n } else if (string(style)) {\n this.appendFromString(style);\n } // you probably wouldn't want to append a Style, since you'd duplicate the default parts\n\n return this;\n};\n\n// static function\nStyle.fromJson = function (cy, json) {\n var style = new Style(cy);\n style.fromJson(json);\n return style;\n};\nStyle.fromString = function (cy, string) {\n return new Style(cy).fromString(string);\n};\n[styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) {\n extend(styfn, props);\n});\nStyle.types = styfn.types;\nStyle.properties = styfn.properties;\nStyle.propertyGroups = styfn.propertyGroups;\nStyle.propertyGroupNames = styfn.propertyGroupNames;\nStyle.propertyGroupKeys = styfn.propertyGroupKeys;\n\nvar corefn$2 = {\n style: function style(newStyle) {\n if (newStyle) {\n var s = this.setStyle(newStyle);\n s.update();\n }\n return this._private.style;\n },\n setStyle: function setStyle(style) {\n var _p = this._private;\n if (stylesheet(style)) {\n _p.style = style.generateStyle(this);\n } else if (array(style)) {\n _p.style = Style.fromJson(this, style);\n } else if (string(style)) {\n _p.style = Style.fromString(this, style);\n } else {\n _p.style = Style(this);\n }\n return _p.style;\n },\n // e.g. cy.data() changed => recalc ele mappers\n updateStyle: function updateStyle() {\n this.mutableElements().updateStyle(); // just send to all eles\n }\n};\n\nvar defaultSelectionType = 'single';\nvar corefn$1 = {\n autolock: function autolock(bool) {\n if (bool !== undefined) {\n this._private.autolock = bool ? true : false;\n } else {\n return this._private.autolock;\n }\n return this; // chaining\n },\n\n autoungrabify: function autoungrabify(bool) {\n if (bool !== undefined) {\n this._private.autoungrabify = bool ? true : false;\n } else {\n return this._private.autoungrabify;\n }\n return this; // chaining\n },\n\n autounselectify: function autounselectify(bool) {\n if (bool !== undefined) {\n this._private.autounselectify = bool ? true : false;\n } else {\n return this._private.autounselectify;\n }\n return this; // chaining\n },\n\n selectionType: function selectionType(selType) {\n var _p = this._private;\n if (_p.selectionType == null) {\n _p.selectionType = defaultSelectionType;\n }\n if (selType !== undefined) {\n if (selType === 'additive' || selType === 'single') {\n _p.selectionType = selType;\n }\n } else {\n return _p.selectionType;\n }\n return this;\n },\n panningEnabled: function panningEnabled(bool) {\n if (bool !== undefined) {\n this._private.panningEnabled = bool ? true : false;\n } else {\n return this._private.panningEnabled;\n }\n return this; // chaining\n },\n\n userPanningEnabled: function userPanningEnabled(bool) {\n if (bool !== undefined) {\n this._private.userPanningEnabled = bool ? true : false;\n } else {\n return this._private.userPanningEnabled;\n }\n return this; // chaining\n },\n\n zoomingEnabled: function zoomingEnabled(bool) {\n if (bool !== undefined) {\n this._private.zoomingEnabled = bool ? true : false;\n } else {\n return this._private.zoomingEnabled;\n }\n return this; // chaining\n },\n\n userZoomingEnabled: function userZoomingEnabled(bool) {\n if (bool !== undefined) {\n this._private.userZoomingEnabled = bool ? true : false;\n } else {\n return this._private.userZoomingEnabled;\n }\n return this; // chaining\n },\n\n boxSelectionEnabled: function boxSelectionEnabled(bool) {\n if (bool !== undefined) {\n this._private.boxSelectionEnabled = bool ? true : false;\n } else {\n return this._private.boxSelectionEnabled;\n }\n return this; // chaining\n },\n\n pan: function pan() {\n var args = arguments;\n var pan = this._private.pan;\n var dim, val, dims, x, y;\n switch (args.length) {\n case 0:\n // .pan()\n return pan;\n case 1:\n if (string(args[0])) {\n // .pan('x')\n dim = args[0];\n return pan[dim];\n } else if (plainObject(args[0])) {\n // .pan({ x: 0, y: 100 })\n if (!this._private.panningEnabled) {\n return this;\n }\n dims = args[0];\n x = dims.x;\n y = dims.y;\n if (number$1(x)) {\n pan.x = x;\n }\n if (number$1(y)) {\n pan.y = y;\n }\n this.emit('pan viewport');\n }\n break;\n case 2:\n // .pan('x', 100)\n if (!this._private.panningEnabled) {\n return this;\n }\n dim = args[0];\n val = args[1];\n if ((dim === 'x' || dim === 'y') && number$1(val)) {\n pan[dim] = val;\n }\n this.emit('pan viewport');\n break;\n // invalid\n }\n\n this.notify('viewport');\n return this; // chaining\n },\n\n panBy: function panBy(arg0, arg1) {\n var args = arguments;\n var pan = this._private.pan;\n var dim, val, dims, x, y;\n if (!this._private.panningEnabled) {\n return this;\n }\n switch (args.length) {\n case 1:\n if (plainObject(arg0)) {\n // .panBy({ x: 0, y: 100 })\n dims = args[0];\n x = dims.x;\n y = dims.y;\n if (number$1(x)) {\n pan.x += x;\n }\n if (number$1(y)) {\n pan.y += y;\n }\n this.emit('pan viewport');\n }\n break;\n case 2:\n // .panBy('x', 100)\n dim = arg0;\n val = arg1;\n if ((dim === 'x' || dim === 'y') && number$1(val)) {\n pan[dim] += val;\n }\n this.emit('pan viewport');\n break;\n // invalid\n }\n\n this.notify('viewport');\n return this; // chaining\n },\n\n fit: function fit(elements, padding) {\n var viewportState = this.getFitViewport(elements, padding);\n if (viewportState) {\n var _p = this._private;\n _p.zoom = viewportState.zoom;\n _p.pan = viewportState.pan;\n this.emit('pan zoom viewport');\n this.notify('viewport');\n }\n return this; // chaining\n },\n\n getFitViewport: function getFitViewport(elements, padding) {\n if (number$1(elements) && padding === undefined) {\n // elements is optional\n padding = elements;\n elements = undefined;\n }\n if (!this._private.panningEnabled || !this._private.zoomingEnabled) {\n return;\n }\n var bb;\n if (string(elements)) {\n var sel = elements;\n elements = this.$(sel);\n } else if (boundingBox(elements)) {\n // assume bb\n var bbe = elements;\n bb = {\n x1: bbe.x1,\n y1: bbe.y1,\n x2: bbe.x2,\n y2: bbe.y2\n };\n bb.w = bb.x2 - bb.x1;\n bb.h = bb.y2 - bb.y1;\n } else if (!elementOrCollection(elements)) {\n elements = this.mutableElements();\n }\n if (elementOrCollection(elements) && elements.empty()) {\n return;\n } // can't fit to nothing\n\n bb = bb || elements.boundingBox();\n var w = this.width();\n var h = this.height();\n var zoom;\n padding = number$1(padding) ? padding : 0;\n if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) {\n zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h);\n\n // crop zoom\n zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom;\n zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom;\n var pan = {\n // now pan to middle\n x: (w - zoom * (bb.x1 + bb.x2)) / 2,\n y: (h - zoom * (bb.y1 + bb.y2)) / 2\n };\n return {\n zoom: zoom,\n pan: pan\n };\n }\n return;\n },\n zoomRange: function zoomRange(min, max) {\n var _p = this._private;\n if (max == null) {\n var opts = min;\n min = opts.min;\n max = opts.max;\n }\n if (number$1(min) && number$1(max) && min <= max) {\n _p.minZoom = min;\n _p.maxZoom = max;\n } else if (number$1(min) && max === undefined && min <= _p.maxZoom) {\n _p.minZoom = min;\n } else if (number$1(max) && min === undefined && max >= _p.minZoom) {\n _p.maxZoom = max;\n }\n return this;\n },\n minZoom: function minZoom(zoom) {\n if (zoom === undefined) {\n return this._private.minZoom;\n } else {\n return this.zoomRange({\n min: zoom\n });\n }\n },\n maxZoom: function maxZoom(zoom) {\n if (zoom === undefined) {\n return this._private.maxZoom;\n } else {\n return this.zoomRange({\n max: zoom\n });\n }\n },\n getZoomedViewport: function getZoomedViewport(params) {\n var _p = this._private;\n var currentPan = _p.pan;\n var currentZoom = _p.zoom;\n var pos; // in rendered px\n var zoom;\n var bail = false;\n if (!_p.zoomingEnabled) {\n // zooming disabled\n bail = true;\n }\n if (number$1(params)) {\n // then set the zoom\n zoom = params;\n } else if (plainObject(params)) {\n // then zoom about a point\n zoom = params.level;\n if (params.position != null) {\n pos = modelToRenderedPosition(params.position, currentZoom, currentPan);\n } else if (params.renderedPosition != null) {\n pos = params.renderedPosition;\n }\n if (pos != null && !_p.panningEnabled) {\n // panning disabled\n bail = true;\n }\n }\n\n // crop zoom\n zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom;\n zoom = zoom < _p.minZoom ? _p.minZoom : zoom;\n\n // can't zoom with invalid params\n if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) {\n return null;\n }\n if (pos != null) {\n // set zoom about position\n var pan1 = currentPan;\n var zoom1 = currentZoom;\n var zoom2 = zoom;\n var pan2 = {\n x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x,\n y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y\n };\n return {\n zoomed: true,\n panned: true,\n zoom: zoom2,\n pan: pan2\n };\n } else {\n // just set the zoom\n return {\n zoomed: true,\n panned: false,\n zoom: zoom,\n pan: currentPan\n };\n }\n },\n zoom: function zoom(params) {\n if (params === undefined) {\n // get\n return this._private.zoom;\n } else {\n // set\n var vp = this.getZoomedViewport(params);\n var _p = this._private;\n if (vp == null || !vp.zoomed) {\n return this;\n }\n _p.zoom = vp.zoom;\n if (vp.panned) {\n _p.pan.x = vp.pan.x;\n _p.pan.y = vp.pan.y;\n }\n this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport');\n this.notify('viewport');\n return this; // chaining\n }\n },\n\n viewport: function viewport(opts) {\n var _p = this._private;\n var zoomDefd = true;\n var panDefd = true;\n var events = []; // to trigger\n var zoomFailed = false;\n var panFailed = false;\n if (!opts) {\n return this;\n }\n if (!number$1(opts.zoom)) {\n zoomDefd = false;\n }\n if (!plainObject(opts.pan)) {\n panDefd = false;\n }\n if (!zoomDefd && !panDefd) {\n return this;\n }\n if (zoomDefd) {\n var z = opts.zoom;\n if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) {\n zoomFailed = true;\n } else {\n _p.zoom = z;\n events.push('zoom');\n }\n }\n if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) {\n var p = opts.pan;\n if (number$1(p.x)) {\n _p.pan.x = p.x;\n panFailed = false;\n }\n if (number$1(p.y)) {\n _p.pan.y = p.y;\n panFailed = false;\n }\n if (!panFailed) {\n events.push('pan');\n }\n }\n if (events.length > 0) {\n events.push('viewport');\n this.emit(events.join(' '));\n this.notify('viewport');\n }\n return this; // chaining\n },\n\n center: function center(elements) {\n var pan = this.getCenterPan(elements);\n if (pan) {\n this._private.pan = pan;\n this.emit('pan viewport');\n this.notify('viewport');\n }\n return this; // chaining\n },\n\n getCenterPan: function getCenterPan(elements, zoom) {\n if (!this._private.panningEnabled) {\n return;\n }\n if (string(elements)) {\n var selector = elements;\n elements = this.mutableElements().filter(selector);\n } else if (!elementOrCollection(elements)) {\n elements = this.mutableElements();\n }\n if (elements.length === 0) {\n return;\n } // can't centre pan to nothing\n\n var bb = elements.boundingBox();\n var w = this.width();\n var h = this.height();\n zoom = zoom === undefined ? this._private.zoom : zoom;\n var pan = {\n // middle\n x: (w - zoom * (bb.x1 + bb.x2)) / 2,\n y: (h - zoom * (bb.y1 + bb.y2)) / 2\n };\n return pan;\n },\n reset: function reset() {\n if (!this._private.panningEnabled || !this._private.zoomingEnabled) {\n return this;\n }\n this.viewport({\n pan: {\n x: 0,\n y: 0\n },\n zoom: 1\n });\n return this; // chaining\n },\n\n invalidateSize: function invalidateSize() {\n this._private.sizeCache = null;\n },\n size: function size() {\n var _p = this._private;\n var container = _p.container;\n var cy = this;\n return _p.sizeCache = _p.sizeCache || (container ? function () {\n var style = cy.window().getComputedStyle(container);\n var val = function val(name) {\n return parseFloat(style.getPropertyValue(name));\n };\n return {\n width: container.clientWidth - val('padding-left') - val('padding-right'),\n height: container.clientHeight - val('padding-top') - val('padding-bottom')\n };\n }() : {\n // fallback if no container (not 0 b/c can be used for dividing etc)\n width: 1,\n height: 1\n });\n },\n width: function width() {\n return this.size().width;\n },\n height: function height() {\n return this.size().height;\n },\n extent: function extent() {\n var pan = this._private.pan;\n var zoom = this._private.zoom;\n var rb = this.renderedExtent();\n var b = {\n x1: (rb.x1 - pan.x) / zoom,\n x2: (rb.x2 - pan.x) / zoom,\n y1: (rb.y1 - pan.y) / zoom,\n y2: (rb.y2 - pan.y) / zoom\n };\n b.w = b.x2 - b.x1;\n b.h = b.y2 - b.y1;\n return b;\n },\n renderedExtent: function renderedExtent() {\n var width = this.width();\n var height = this.height();\n return {\n x1: 0,\n y1: 0,\n x2: width,\n y2: height,\n w: width,\n h: height\n };\n },\n multiClickDebounceTime: function multiClickDebounceTime(_int) {\n if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime;\n return this; // chaining\n }\n};\n\n// aliases\ncorefn$1.centre = corefn$1.center;\n\n// backwards compatibility\ncorefn$1.autolockNodes = corefn$1.autolock;\ncorefn$1.autoungrabifyNodes = corefn$1.autoungrabify;\n\nvar fn = {\n data: define.data({\n field: 'data',\n bindingEvent: 'data',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'data',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n updateStyle: true\n }),\n removeData: define.removeData({\n field: 'data',\n event: 'data',\n triggerFnName: 'trigger',\n triggerEvent: true,\n updateStyle: true\n }),\n scratch: define.data({\n field: 'scratch',\n bindingEvent: 'scratch',\n allowBinding: true,\n allowSetting: true,\n settingEvent: 'scratch',\n settingTriggersEvent: true,\n triggerFnName: 'trigger',\n allowGetting: true,\n updateStyle: true\n }),\n removeScratch: define.removeData({\n field: 'scratch',\n event: 'scratch',\n triggerFnName: 'trigger',\n triggerEvent: true,\n updateStyle: true\n })\n};\n\n// aliases\nfn.attr = fn.data;\nfn.removeAttr = fn.removeData;\n\nvar Core = function Core(opts) {\n var cy = this;\n opts = extend({}, opts);\n var container = opts.container;\n\n // allow for passing a wrapped jquery object\n // e.g. cytoscape({ container: $('#cy') })\n if (container && !htmlElement(container) && htmlElement(container[0])) {\n container = container[0];\n }\n var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery\n reg = reg || {};\n if (reg && reg.cy) {\n reg.cy.destroy();\n reg = {}; // old instance => replace reg completely\n }\n\n var readies = reg.readies = reg.readies || [];\n if (container) {\n container._cyreg = reg;\n } // make sure container assoc'd reg points to this cy\n reg.cy = cy;\n var head = _window !== undefined && container !== undefined && !opts.headless;\n var options = opts;\n options.layout = extend({\n name: head ? 'grid' : 'null'\n }, options.layout);\n options.renderer = extend({\n name: head ? 'canvas' : 'null'\n }, options.renderer);\n var defVal = function defVal(def, val, altVal) {\n if (val !== undefined) {\n return val;\n } else if (altVal !== undefined) {\n return altVal;\n } else {\n return def;\n }\n };\n var _p = this._private = {\n container: container,\n // html dom ele container\n ready: false,\n // whether ready has been triggered\n options: options,\n // cached options\n elements: new Collection(this),\n // elements in the graph\n listeners: [],\n // list of listeners\n aniEles: new Collection(this),\n // elements being animated\n data: options.data || {},\n // data for the core\n scratch: {},\n // scratch object for core\n layout: null,\n renderer: null,\n destroyed: false,\n // whether destroy was called\n notificationsEnabled: true,\n // whether notifications are sent to the renderer\n minZoom: 1e-50,\n maxZoom: 1e50,\n zoomingEnabled: defVal(true, options.zoomingEnabled),\n userZoomingEnabled: defVal(true, options.userZoomingEnabled),\n panningEnabled: defVal(true, options.panningEnabled),\n userPanningEnabled: defVal(true, options.userPanningEnabled),\n boxSelectionEnabled: defVal(true, options.boxSelectionEnabled),\n autolock: defVal(false, options.autolock, options.autolockNodes),\n autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes),\n autounselectify: defVal(false, options.autounselectify),\n styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled,\n zoom: number$1(options.zoom) ? options.zoom : 1,\n pan: {\n x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0,\n y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0\n },\n animation: {\n // object for currently-running animations\n current: [],\n queue: []\n },\n hasCompoundNodes: false,\n multiClickDebounceTime: defVal(250, options.multiClickDebounceTime)\n };\n this.createEmitter();\n\n // set selection type\n this.selectionType(options.selectionType);\n\n // init zoom bounds\n this.zoomRange({\n min: options.minZoom,\n max: options.maxZoom\n });\n var loadExtData = function loadExtData(extData, next) {\n var anyIsPromise = extData.some(promise);\n if (anyIsPromise) {\n return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init\n } else {\n next(extData); // exec synchronously for convenience\n }\n };\n\n // start with the default stylesheet so we have something before loading an external stylesheet\n if (_p.styleEnabled) {\n cy.setStyle([]);\n }\n\n // create the renderer\n var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options\n cy.initRenderer(rendererOptions);\n var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) {\n cy.notifications(false);\n\n // remove old elements\n var oldEles = cy.mutableElements();\n if (oldEles.length > 0) {\n oldEles.remove();\n }\n if (elements != null) {\n if (plainObject(elements) || array(elements)) {\n cy.add(elements);\n }\n }\n cy.one('layoutready', function (e) {\n cy.notifications(true);\n cy.emit(e); // we missed this event by turning notifications off, so pass it on\n\n cy.one('load', onload);\n cy.emitAndNotify('load');\n }).one('layoutstop', function () {\n cy.one('done', ondone);\n cy.emit('done');\n });\n var layoutOpts = extend({}, cy._private.options.layout);\n layoutOpts.eles = cy.elements();\n cy.layout(layoutOpts).run();\n };\n loadExtData([options.style, options.elements], function (thens) {\n var initStyle = thens[0];\n var initEles = thens[1];\n\n // init style\n if (_p.styleEnabled) {\n cy.style().append(initStyle);\n }\n\n // initial load\n setElesAndLayout(initEles, function () {\n // onready\n cy.startAnimationLoop();\n _p.ready = true;\n\n // if a ready callback is specified as an option, the bind it\n if (fn$6(options.ready)) {\n cy.on('ready', options.ready);\n }\n\n // bind all the ready handlers registered before creating this instance\n for (var i = 0; i < readies.length; i++) {\n var fn = readies[i];\n cy.on('ready', fn);\n }\n if (reg) {\n reg.readies = [];\n } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc\n\n cy.emit('ready');\n }, options.done);\n });\n};\nvar corefn = Core.prototype; // short alias\n\nextend(corefn, {\n instanceString: function instanceString() {\n return 'core';\n },\n isReady: function isReady() {\n return this._private.ready;\n },\n destroyed: function destroyed() {\n return this._private.destroyed;\n },\n ready: function ready(fn) {\n if (this.isReady()) {\n this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event\n } else {\n this.on('ready', fn);\n }\n return this;\n },\n destroy: function destroy() {\n var cy = this;\n if (cy.destroyed()) return;\n cy.stopAnimationLoop();\n cy.destroyRenderer();\n this.emit('destroy');\n cy._private.destroyed = true;\n return cy;\n },\n hasElementWithId: function hasElementWithId(id) {\n return this._private.elements.hasElementWithId(id);\n },\n getElementById: function getElementById(id) {\n return this._private.elements.getElementById(id);\n },\n hasCompoundNodes: function hasCompoundNodes() {\n return this._private.hasCompoundNodes;\n },\n headless: function headless() {\n return this._private.renderer.isHeadless();\n },\n styleEnabled: function styleEnabled() {\n return this._private.styleEnabled;\n },\n addToPool: function addToPool(eles) {\n this._private.elements.merge(eles);\n return this; // chaining\n },\n\n removeFromPool: function removeFromPool(eles) {\n this._private.elements.unmerge(eles);\n return this;\n },\n container: function container() {\n return this._private.container || null;\n },\n window: function window() {\n var container = this._private.container;\n if (container == null) return _window;\n var ownerDocument = this._private.container.ownerDocument;\n if (ownerDocument === undefined || ownerDocument == null) {\n return _window;\n }\n return ownerDocument.defaultView || _window;\n },\n mount: function mount(container) {\n if (container == null) {\n return;\n }\n var cy = this;\n var _p = cy._private;\n var options = _p.options;\n if (!htmlElement(container) && htmlElement(container[0])) {\n container = container[0];\n }\n cy.stopAnimationLoop();\n cy.destroyRenderer();\n _p.container = container;\n _p.styleEnabled = true;\n cy.invalidateSize();\n cy.initRenderer(extend({}, options, options.renderer, {\n // allow custom renderer name to be re-used, otherwise use canvas\n name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name\n }));\n cy.startAnimationLoop();\n cy.style(options.style);\n cy.emit('mount');\n return cy;\n },\n unmount: function unmount() {\n var cy = this;\n cy.stopAnimationLoop();\n cy.destroyRenderer();\n cy.initRenderer({\n name: 'null'\n });\n cy.emit('unmount');\n return cy;\n },\n options: function options() {\n return copy(this._private.options);\n },\n json: function json(obj) {\n var cy = this;\n var _p = cy._private;\n var eles = cy.mutableElements();\n var getFreshRef = function getFreshRef(ele) {\n return cy.getElementById(ele.id());\n };\n if (plainObject(obj)) {\n // set\n\n cy.startBatch();\n if (obj.elements) {\n var idInJson = {};\n var updateEles = function updateEles(jsons, gr) {\n var toAdd = [];\n var toMod = [];\n for (var i = 0; i < jsons.length; i++) {\n var json = jsons[i];\n if (!json.data.id) {\n warn('cy.json() cannot handle elements without an ID attribute');\n continue;\n }\n var id = '' + json.data.id; // id must be string\n var ele = cy.getElementById(id);\n idInJson[id] = true;\n if (ele.length !== 0) {\n // existing element should be updated\n toMod.push({\n ele: ele,\n json: json\n });\n } else {\n // otherwise should be added\n if (gr) {\n json.group = gr;\n toAdd.push(json);\n } else {\n toAdd.push(json);\n }\n }\n }\n cy.add(toAdd);\n for (var _i = 0; _i < toMod.length; _i++) {\n var _toMod$_i = toMod[_i],\n _ele = _toMod$_i.ele,\n _json = _toMod$_i.json;\n _ele.json(_json);\n }\n };\n if (array(obj.elements)) {\n // elements: []\n updateEles(obj.elements);\n } else {\n // elements: { nodes: [], edges: [] }\n var grs = ['nodes', 'edges'];\n for (var i = 0; i < grs.length; i++) {\n var gr = grs[i];\n var elements = obj.elements[gr];\n if (array(elements)) {\n updateEles(elements, gr);\n }\n }\n }\n var parentsToRemove = cy.collection();\n eles.filter(function (ele) {\n return !idInJson[ele.id()];\n }).forEach(function (ele) {\n if (ele.isParent()) {\n parentsToRemove.merge(ele);\n } else {\n ele.remove();\n }\n });\n\n // so that children are not removed w/parent\n parentsToRemove.forEach(function (ele) {\n return ele.children().move({\n parent: null\n });\n });\n\n // intermediate parents may be moved by prior line, so make sure we remove by fresh refs\n parentsToRemove.forEach(function (ele) {\n return getFreshRef(ele).remove();\n });\n }\n if (obj.style) {\n cy.style(obj.style);\n }\n if (obj.zoom != null && obj.zoom !== _p.zoom) {\n cy.zoom(obj.zoom);\n }\n if (obj.pan) {\n if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) {\n cy.pan(obj.pan);\n }\n }\n if (obj.data) {\n cy.data(obj.data);\n }\n var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime'];\n for (var _i2 = 0; _i2 < fields.length; _i2++) {\n var f = fields[_i2];\n if (obj[f] != null) {\n cy[f](obj[f]);\n }\n }\n cy.endBatch();\n return this; // chaining\n } else {\n // get\n var flat = !!obj;\n var json = {};\n if (flat) {\n json.elements = this.elements().map(function (ele) {\n return ele.json();\n });\n } else {\n json.elements = {};\n eles.forEach(function (ele) {\n var group = ele.group();\n if (!json.elements[group]) {\n json.elements[group] = [];\n }\n json.elements[group].push(ele.json());\n });\n }\n if (this._private.styleEnabled) {\n json.style = cy.style().json();\n }\n json.data = copy(cy.data());\n var options = _p.options;\n json.zoomingEnabled = _p.zoomingEnabled;\n json.userZoomingEnabled = _p.userZoomingEnabled;\n json.zoom = _p.zoom;\n json.minZoom = _p.minZoom;\n json.maxZoom = _p.maxZoom;\n json.panningEnabled = _p.panningEnabled;\n json.userPanningEnabled = _p.userPanningEnabled;\n json.pan = copy(_p.pan);\n json.boxSelectionEnabled = _p.boxSelectionEnabled;\n json.renderer = copy(options.renderer);\n json.hideEdgesOnViewport = options.hideEdgesOnViewport;\n json.textureOnViewport = options.textureOnViewport;\n json.wheelSensitivity = options.wheelSensitivity;\n json.motionBlur = options.motionBlur;\n json.multiClickDebounceTime = options.multiClickDebounceTime;\n return json;\n }\n }\n});\ncorefn.$id = corefn.getElementById;\n[corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) {\n extend(corefn, props);\n});\n\n/* eslint-disable no-unused-vars */\nvar defaults$7 = {\n fit: true,\n // whether to fit the viewport to the graph\n directed: false,\n // whether the tree is directed downwards (or edges can point in any direction if false)\n padding: 30,\n // padding on fit\n circle: false,\n // put depths in concentric circles if true, put depths top down if false\n grid: false,\n // whether to create an even grid into which the DAG is placed (circle:false only)\n spacingFactor: 1.75,\n // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap)\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox if not enough space\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n roots: undefined,\n // the roots of the trees\n depthSort: undefined,\n // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled,\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts\n};\n\nvar deprecatedOptionDefaults = {\n maximal: false,\n // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also\n acyclic: false // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops\n};\n\n/* eslint-enable */\n\nvar getInfo = function getInfo(ele) {\n return ele.scratch('breadthfirst');\n};\nvar setInfo = function setInfo(ele, obj) {\n return ele.scratch('breadthfirst', obj);\n};\nfunction BreadthFirstLayout(options) {\n this.options = extend({}, defaults$7, deprecatedOptionDefaults, options);\n}\nBreadthFirstLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var cy = params.cy;\n var eles = options.eles;\n var nodes = eles.nodes().filter(function (n) {\n return !n.isParent();\n });\n var graph = eles;\n var directed = options.directed;\n var maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true\n\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var roots;\n if (elementOrCollection(options.roots)) {\n roots = options.roots;\n } else if (array(options.roots)) {\n var rootsArray = [];\n for (var i = 0; i < options.roots.length; i++) {\n var id = options.roots[i];\n var ele = cy.getElementById(id);\n rootsArray.push(ele);\n }\n roots = cy.collection(rootsArray);\n } else if (string(options.roots)) {\n roots = cy.$(options.roots);\n } else {\n if (directed) {\n roots = nodes.roots();\n } else {\n var components = eles.components();\n roots = cy.collection();\n var _loop = function _loop(_i) {\n var comp = components[_i];\n var maxDegree = comp.maxDegree(false);\n var compRoots = comp.filter(function (ele) {\n return ele.degree(false) === maxDegree;\n });\n roots = roots.add(compRoots);\n };\n for (var _i = 0; _i < components.length; _i++) {\n _loop(_i);\n }\n }\n }\n var depths = [];\n var foundByBfs = {};\n var addToDepth = function addToDepth(ele, d) {\n if (depths[d] == null) {\n depths[d] = [];\n }\n var i = depths[d].length;\n depths[d].push(ele);\n setInfo(ele, {\n index: i,\n depth: d\n });\n };\n var changeDepth = function changeDepth(ele, newDepth) {\n var _getInfo = getInfo(ele),\n depth = _getInfo.depth,\n index = _getInfo.index;\n depths[depth][index] = null;\n addToDepth(ele, newDepth);\n };\n\n // find the depths of the nodes\n graph.bfs({\n roots: roots,\n directed: options.directed,\n visit: function visit(node, edge, pNode, i, depth) {\n var ele = node[0];\n var id = ele.id();\n addToDepth(ele, depth);\n foundByBfs[id] = true;\n }\n });\n\n // check for nodes not found by bfs\n var orphanNodes = [];\n for (var _i2 = 0; _i2 < nodes.length; _i2++) {\n var _ele = nodes[_i2];\n if (foundByBfs[_ele.id()]) {\n continue;\n } else {\n orphanNodes.push(_ele);\n }\n }\n\n // assign the nodes a depth and index\n\n var assignDepthsAt = function assignDepthsAt(i) {\n var eles = depths[i];\n for (var j = 0; j < eles.length; j++) {\n var _ele2 = eles[j];\n if (_ele2 == null) {\n eles.splice(j, 1);\n j--;\n continue;\n }\n setInfo(_ele2, {\n depth: i,\n index: j\n });\n }\n };\n var assignDepths = function assignDepths() {\n for (var _i3 = 0; _i3 < depths.length; _i3++) {\n assignDepthsAt(_i3);\n }\n };\n var adjustMaximally = function adjustMaximally(ele, shifted) {\n var eInfo = getInfo(ele);\n var incomers = ele.incomers().filter(function (el) {\n return el.isNode() && eles.has(el);\n });\n var maxDepth = -1;\n var id = ele.id();\n for (var k = 0; k < incomers.length; k++) {\n var incmr = incomers[k];\n var iInfo = getInfo(incmr);\n maxDepth = Math.max(maxDepth, iInfo.depth);\n }\n if (eInfo.depth <= maxDepth) {\n if (!options.acyclic && shifted[id]) {\n return null;\n }\n var newDepth = maxDepth + 1;\n changeDepth(ele, newDepth);\n shifted[id] = newDepth;\n return true;\n }\n return false;\n };\n\n // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1)\n if (directed && maximal) {\n var Q = [];\n var shifted = {};\n var enqueue = function enqueue(n) {\n return Q.push(n);\n };\n var dequeue = function dequeue() {\n return Q.shift();\n };\n nodes.forEach(function (n) {\n return Q.push(n);\n });\n while (Q.length > 0) {\n var _ele3 = dequeue();\n var didShift = adjustMaximally(_ele3, shifted);\n if (didShift) {\n _ele3.outgoers().filter(function (el) {\n return el.isNode() && eles.has(el);\n }).forEach(enqueue);\n } else if (didShift === null) {\n warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.');\n break; // exit on failure\n }\n }\n }\n\n assignDepths(); // clear holes\n\n // find min distance we need to leave between nodes\n var minDistance = 0;\n if (options.avoidOverlap) {\n for (var _i4 = 0; _i4 < nodes.length; _i4++) {\n var n = nodes[_i4];\n var nbb = n.layoutDimensions(options);\n var w = nbb.w;\n var h = nbb.h;\n minDistance = Math.max(minDistance, w, h);\n }\n }\n\n // get the weighted percent for an element based on its connectivity to other levels\n var cachedWeightedPercent = {};\n var getWeightedPercent = function getWeightedPercent(ele) {\n if (cachedWeightedPercent[ele.id()]) {\n return cachedWeightedPercent[ele.id()];\n }\n var eleDepth = getInfo(ele).depth;\n var neighbors = ele.neighborhood();\n var percent = 0;\n var samples = 0;\n for (var _i5 = 0; _i5 < neighbors.length; _i5++) {\n var neighbor = neighbors[_i5];\n if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) {\n continue;\n }\n var bf = getInfo(neighbor);\n if (bf == null) {\n continue;\n }\n var index = bf.index;\n var depth = bf.depth;\n\n // unassigned neighbours shouldn't affect the ordering\n if (index == null || depth == null) {\n continue;\n }\n var nDepth = depths[depth].length;\n if (depth < eleDepth) {\n // only get influenced by elements above\n percent += index / nDepth;\n samples++;\n }\n }\n samples = Math.max(1, samples);\n percent = percent / samples;\n if (samples === 0) {\n // put lone nodes at the start\n percent = 0;\n }\n cachedWeightedPercent[ele.id()] = percent;\n return percent;\n };\n\n // rearrange the indices in each depth level based on connectivity\n\n var sortFn = function sortFn(a, b) {\n var apct = getWeightedPercent(a);\n var bpct = getWeightedPercent(b);\n var diff = apct - bpct;\n if (diff === 0) {\n return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons\n } else {\n return diff;\n }\n };\n if (options.depthSort !== undefined) {\n sortFn = options.depthSort;\n }\n\n // sort each level to make connected nodes closer\n for (var _i6 = 0; _i6 < depths.length; _i6++) {\n depths[_i6].sort(sortFn);\n assignDepthsAt(_i6);\n }\n\n // assign orphan nodes to a new top-level depth\n var orphanDepth = [];\n for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) {\n orphanDepth.push(orphanNodes[_i7]);\n }\n depths.unshift(orphanDepth);\n assignDepths();\n var biggestDepthSize = 0;\n for (var _i8 = 0; _i8 < depths.length; _i8++) {\n biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize);\n }\n var center = {\n x: bb.x1 + bb.w / 2,\n y: bb.x1 + bb.h / 2\n };\n var maxDepthSize = depths.reduce(function (max, eles) {\n return Math.max(max, eles.length);\n }, 0);\n var getPosition = function getPosition(ele) {\n var _getInfo2 = getInfo(ele),\n depth = _getInfo2.depth,\n index = _getInfo2.index;\n var depthSize = depths[depth].length;\n var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance);\n var distanceY = Math.max(bb.h / (depths.length + 1), minDistance);\n var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length);\n radiusStepSize = Math.max(radiusStepSize, minDistance);\n if (!options.circle) {\n var epos = {\n x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX,\n y: (depth + 1) * distanceY\n };\n return epos;\n } else {\n var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0);\n var theta = 2 * Math.PI / depths[depth].length * index;\n if (depth === 0 && depths[0].length === 1) {\n radius = 1;\n }\n return {\n x: center.x + radius * Math.cos(theta),\n y: center.y + radius * Math.sin(theta)\n };\n }\n };\n eles.nodes().layoutPositions(this, options, getPosition);\n return this; // chaining\n};\n\nvar defaults$6 = {\n fit: true,\n // whether to fit the viewport to the graph\n padding: 30,\n // the padding on fit\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox and radius if not enough space\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n radius: undefined,\n // the radius of the circle\n startAngle: 3 / 2 * Math.PI,\n // where nodes start in radians\n sweep: undefined,\n // how many radians should be between the first and last node (defaults to full circle)\n clockwise: true,\n // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false)\n sort: undefined,\n // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts \n};\n\nfunction CircleLayout(options) {\n this.options = extend({}, defaults$6, options);\n}\nCircleLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var cy = params.cy;\n var eles = options.eles;\n var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise;\n var nodes = eles.nodes().not(':parent');\n if (options.sort) {\n nodes = nodes.sort(options.sort);\n }\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var center = {\n x: bb.x1 + bb.w / 2,\n y: bb.y1 + bb.h / 2\n };\n var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep;\n var dTheta = sweep / Math.max(1, nodes.length - 1);\n var r;\n var minDistance = 0;\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n var nbb = n.layoutDimensions(options);\n var w = nbb.w;\n var h = nbb.h;\n minDistance = Math.max(minDistance, w, h);\n }\n if (number$1(options.radius)) {\n r = options.radius;\n } else if (nodes.length <= 1) {\n r = 0;\n } else {\n r = Math.min(bb.h, bb.w) / 2 - minDistance;\n }\n\n // calculate the radius\n if (nodes.length > 1 && options.avoidOverlap) {\n // but only if more than one node (can't overlap)\n minDistance *= 1.75; // just to have some nice spacing\n\n var dcos = Math.cos(dTheta) - Math.cos(0);\n var dsin = Math.sin(dTheta) - Math.sin(0);\n var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping\n r = Math.max(rMin, r);\n }\n var getPos = function getPos(ele, i) {\n var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1);\n var rx = r * Math.cos(theta);\n var ry = r * Math.sin(theta);\n var pos = {\n x: center.x + rx,\n y: center.y + ry\n };\n return pos;\n };\n eles.nodes().layoutPositions(this, options, getPos);\n return this; // chaining\n};\n\nvar defaults$5 = {\n fit: true,\n // whether to fit the viewport to the graph\n padding: 30,\n // the padding on fit\n startAngle: 3 / 2 * Math.PI,\n // where nodes start in radians\n sweep: undefined,\n // how many radians should be between the first and last node (defaults to full circle)\n clockwise: true,\n // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false)\n equidistant: false,\n // whether levels have an equal radial distance betwen them, may cause bounding box overflow\n minNodeSpacing: 10,\n // min spacing between outside of nodes (used for radius adjustment)\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox if not enough space\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n height: undefined,\n // height of layout area (overrides container height)\n width: undefined,\n // width of layout area (overrides container width)\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n concentric: function concentric(node) {\n // returns numeric value for each node, placing higher nodes in levels towards the centre\n return node.degree();\n },\n levelWidth: function levelWidth(nodes) {\n // the variation of concentric values in each level\n return nodes.maxDegree() / 4;\n },\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts\n};\n\nfunction ConcentricLayout(options) {\n this.options = extend({}, defaults$5, options);\n}\nConcentricLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise;\n var cy = params.cy;\n var eles = options.eles;\n var nodes = eles.nodes().not(':parent');\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var center = {\n x: bb.x1 + bb.w / 2,\n y: bb.y1 + bb.h / 2\n };\n var nodeValues = []; // { node, value }\n var maxNodeSize = 0;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var value = void 0;\n\n // calculate the node value\n value = options.concentric(node);\n nodeValues.push({\n value: value,\n node: node\n });\n\n // for style mapping\n node._private.scratch.concentric = value;\n }\n\n // in case we used the `concentric` in style\n nodes.updateStyle();\n\n // calculate max size now based on potentially updated mappers\n for (var _i = 0; _i < nodes.length; _i++) {\n var _node = nodes[_i];\n var nbb = _node.layoutDimensions(options);\n maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h);\n }\n\n // sort node values in descreasing order\n nodeValues.sort(function (a, b) {\n return b.value - a.value;\n });\n var levelWidth = options.levelWidth(nodes);\n\n // put the values into levels\n var levels = [[]];\n var currentLevel = levels[0];\n for (var _i2 = 0; _i2 < nodeValues.length; _i2++) {\n var val = nodeValues[_i2];\n if (currentLevel.length > 0) {\n var diff = Math.abs(currentLevel[0].value - val.value);\n if (diff >= levelWidth) {\n currentLevel = [];\n levels.push(currentLevel);\n }\n }\n currentLevel.push(val);\n }\n\n // create positions from levels\n\n var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes\n\n if (!options.avoidOverlap) {\n // then strictly constrain to bb\n var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1;\n var maxR = Math.min(bb.w, bb.h) / 2 - minDist;\n var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0);\n minDist = Math.min(minDist, rStep);\n }\n\n // find the metrics for each level\n var r = 0;\n for (var _i3 = 0; _i3 < levels.length; _i3++) {\n var level = levels[_i3];\n var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep;\n var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1);\n\n // calculate the radius\n if (level.length > 1 && options.avoidOverlap) {\n // but only if more than one node (can't overlap)\n var dcos = Math.cos(dTheta) - Math.cos(0);\n var dsin = Math.sin(dTheta) - Math.sin(0);\n var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping\n\n r = Math.max(rMin, r);\n }\n level.r = r;\n r += minDist;\n }\n if (options.equidistant) {\n var rDeltaMax = 0;\n var _r = 0;\n for (var _i4 = 0; _i4 < levels.length; _i4++) {\n var _level = levels[_i4];\n var rDelta = _level.r - _r;\n rDeltaMax = Math.max(rDeltaMax, rDelta);\n }\n _r = 0;\n for (var _i5 = 0; _i5 < levels.length; _i5++) {\n var _level2 = levels[_i5];\n if (_i5 === 0) {\n _r = _level2.r;\n }\n _level2.r = _r;\n _r += rDeltaMax;\n }\n }\n\n // calculate the node positions\n var pos = {}; // id => position\n for (var _i6 = 0; _i6 < levels.length; _i6++) {\n var _level3 = levels[_i6];\n var _dTheta = _level3.dTheta;\n var _r2 = _level3.r;\n for (var j = 0; j < _level3.length; j++) {\n var _val = _level3[j];\n var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j;\n var p = {\n x: center.x + _r2 * Math.cos(theta),\n y: center.y + _r2 * Math.sin(theta)\n };\n pos[_val.node.id()] = p;\n }\n }\n\n // position the nodes\n eles.nodes().layoutPositions(this, options, function (ele) {\n var id = ele.id();\n return pos[id];\n });\n return this; // chaining\n};\n\n/*\nThe CoSE layout was written by Gerardo Huck.\nhttps://www.linkedin.com/in/gerardohuck/\n\nBased on the following article:\nhttp://dl.acm.org/citation.cfm?id=1498047\n\nModifications tracked on Github.\n*/\nvar DEBUG;\n\n/**\n * @brief : default layout options\n */\nvar defaults$4 = {\n // Called on `layoutready`\n ready: function ready() {},\n // Called on `layoutstop`\n stop: function stop() {},\n // Whether to animate while running the layout\n // true : Animate continuously as the layout is running\n // false : Just show the end result\n // 'end' : Animate with the end result, from the initial positions to the end positions\n animate: true,\n // Easing of the animation for animate:'end'\n animationEasing: undefined,\n // The duration of the animation for animate:'end'\n animationDuration: undefined,\n // A function that determines whether the node should be animated\n // All nodes animated by default on animate enabled\n // Non-animated nodes are positioned immediately when the layout starts\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // The layout animates only after this many milliseconds for animate:true\n // (prevents flashing on fast runs)\n animationThreshold: 250,\n // Number of iterations between consecutive screen positions update\n refresh: 20,\n // Whether to fit the network view after when done\n fit: true,\n // Padding on fit\n padding: 30,\n // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n boundingBox: undefined,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n nodeDimensionsIncludeLabels: false,\n // Randomize the initial positions of the nodes (true) or use existing positions (false)\n randomize: false,\n // Extra spacing between components in non-compound graphs\n componentSpacing: 40,\n // Node repulsion (non overlapping) multiplier\n nodeRepulsion: function nodeRepulsion(node) {\n return 2048;\n },\n // Node repulsion (overlapping) multiplier\n nodeOverlap: 4,\n // Ideal edge (non nested) length\n idealEdgeLength: function idealEdgeLength(edge) {\n return 32;\n },\n // Divisor to compute edge forces\n edgeElasticity: function edgeElasticity(edge) {\n return 32;\n },\n // Nesting factor (multiplier) to compute ideal edge length for nested edges\n nestingFactor: 1.2,\n // Gravity force (constant)\n gravity: 1,\n // Maximum number of iterations to perform\n numIter: 1000,\n // Initial temperature (maximum node displacement)\n initialTemp: 1000,\n // Cooling factor (how the temperature is reduced between consecutive iterations\n coolingFactor: 0.99,\n // Lower temperature threshold (below this point the layout will end)\n minTemp: 1.0\n};\n\n/**\n * @brief : constructor\n * @arg options : object containing layout options\n */\nfunction CoseLayout(options) {\n this.options = extend({}, defaults$4, options);\n this.options.layout = this;\n\n // Exclude any edge that has a source or target node that is not in the set of passed-in nodes\n var nodes = this.options.eles.nodes();\n var edges = this.options.eles.edges();\n var notEdges = edges.filter(function (e) {\n var sourceId = e.source().data('id');\n var targetId = e.target().data('id');\n var hasSource = nodes.some(function (n) {\n return n.data('id') === sourceId;\n });\n var hasTarget = nodes.some(function (n) {\n return n.data('id') === targetId;\n });\n return !hasSource || !hasTarget;\n });\n this.options.eles = this.options.eles.not(notEdges);\n}\n\n/**\n * @brief : runs the layout\n */\nCoseLayout.prototype.run = function () {\n var options = this.options;\n var cy = options.cy;\n var layout = this;\n layout.stopped = false;\n if (options.animate === true || options.animate === false) {\n layout.emit({\n type: 'layoutstart',\n layout: layout\n });\n }\n\n // Set DEBUG - Global variable\n if (true === options.debug) {\n DEBUG = true;\n } else {\n DEBUG = false;\n }\n\n // Initialize layout info\n var layoutInfo = createLayoutInfo(cy, layout, options);\n\n // Show LayoutInfo contents if debugging\n if (DEBUG) {\n printLayoutInfo(layoutInfo);\n }\n\n // If required, randomize node positions\n if (options.randomize) {\n randomizePositions(layoutInfo);\n }\n var startTime = performanceNow();\n var refresh = function refresh() {\n refreshPositions(layoutInfo, cy, options);\n\n // Fit the graph if necessary\n if (true === options.fit) {\n cy.fit(options.padding);\n }\n };\n var mainLoop = function mainLoop(i) {\n if (layout.stopped || i >= options.numIter) {\n // logDebug(\"Layout manually stopped. Stopping computation in step \" + i);\n return false;\n }\n\n // Do one step in the phisical simulation\n step(layoutInfo, options);\n\n // Update temperature\n layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor;\n // logDebug(\"New temperature: \" + layoutInfo.temperature);\n\n if (layoutInfo.temperature < options.minTemp) {\n // logDebug(\"Temperature drop below minimum threshold. Stopping computation in step \" + i);\n return false;\n }\n return true;\n };\n var done = function done() {\n if (options.animate === true || options.animate === false) {\n refresh();\n\n // Layout has finished\n layout.one('layoutstop', options.stop);\n layout.emit({\n type: 'layoutstop',\n layout: layout\n });\n } else {\n var nodes = options.eles.nodes();\n var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes);\n nodes.layoutPositions(layout, options, getScaledPos);\n }\n };\n var i = 0;\n var loopRet = true;\n if (options.animate === true) {\n var frame = function frame() {\n var f = 0;\n while (loopRet && f < options.refresh) {\n loopRet = mainLoop(i);\n i++;\n f++;\n }\n if (!loopRet) {\n // it's done\n separateComponents(layoutInfo, options);\n done();\n } else {\n var now = performanceNow();\n if (now - startTime >= options.animationThreshold) {\n refresh();\n }\n requestAnimationFrame(frame);\n }\n };\n frame();\n } else {\n while (loopRet) {\n loopRet = mainLoop(i);\n i++;\n }\n separateComponents(layoutInfo, options);\n done();\n }\n return this; // chaining\n};\n\n/**\n * @brief : called on continuous layouts to stop them before they finish\n */\nCoseLayout.prototype.stop = function () {\n this.stopped = true;\n if (this.thread) {\n this.thread.stop();\n }\n this.emit('layoutstop');\n return this; // chaining\n};\n\nCoseLayout.prototype.destroy = function () {\n if (this.thread) {\n this.thread.stop();\n }\n return this; // chaining\n};\n\n/**\n * @brief : Creates an object which is contains all the data\n * used in the layout process\n * @arg cy : cytoscape.js object\n * @return : layoutInfo object initialized\n */\nvar createLayoutInfo = function createLayoutInfo(cy, layout, options) {\n // Shortcut\n var edges = options.eles.edges();\n var nodes = options.eles.nodes();\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var layoutInfo = {\n isCompound: cy.hasCompoundNodes(),\n layoutNodes: [],\n idToIndex: {},\n nodeSize: nodes.size(),\n graphSet: [],\n indexToGraph: [],\n layoutEdges: [],\n edgeSize: edges.size(),\n temperature: options.initialTemp,\n clientWidth: bb.w,\n clientHeight: bb.h,\n boundingBox: bb\n };\n var components = options.eles.components();\n var id2cmptId = {};\n for (var i = 0; i < components.length; i++) {\n var component = components[i];\n for (var j = 0; j < component.length; j++) {\n var node = component[j];\n id2cmptId[node.id()] = i;\n }\n }\n\n // Iterate over all nodes, creating layout nodes\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = nodes[i];\n var nbb = n.layoutDimensions(options);\n var tempNode = {};\n tempNode.isLocked = n.locked();\n tempNode.id = n.data('id');\n tempNode.parentId = n.data('parent');\n tempNode.cmptId = id2cmptId[n.id()];\n tempNode.children = [];\n tempNode.positionX = n.position('x');\n tempNode.positionY = n.position('y');\n tempNode.offsetX = 0;\n tempNode.offsetY = 0;\n tempNode.height = nbb.w;\n tempNode.width = nbb.h;\n tempNode.maxX = tempNode.positionX + tempNode.width / 2;\n tempNode.minX = tempNode.positionX - tempNode.width / 2;\n tempNode.maxY = tempNode.positionY + tempNode.height / 2;\n tempNode.minY = tempNode.positionY - tempNode.height / 2;\n tempNode.padLeft = parseFloat(n.style('padding'));\n tempNode.padRight = parseFloat(n.style('padding'));\n tempNode.padTop = parseFloat(n.style('padding'));\n tempNode.padBottom = parseFloat(n.style('padding'));\n\n // forces\n tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion;\n\n // Add new node\n layoutInfo.layoutNodes.push(tempNode);\n // Add entry to id-index map\n layoutInfo.idToIndex[tempNode.id] = i;\n }\n\n // Inline implementation of a queue, used for traversing the graph in BFS order\n var queue = [];\n var start = 0; // Points to the start the queue\n var end = -1; // Points to the end of the queue\n\n var tempGraph = [];\n\n // Second pass to add child information and\n // initialize queue for hierarchical traversal\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n var p_id = n.parentId;\n // Check if node n has a parent node\n if (null != p_id) {\n // Add node Id to parent's list of children\n layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id);\n } else {\n // If a node doesn't have a parent, then it's in the root graph\n queue[++end] = n.id;\n tempGraph.push(n.id);\n }\n }\n\n // Add root graph to graphSet\n layoutInfo.graphSet.push(tempGraph);\n\n // Traverse the graph, level by level,\n while (start <= end) {\n // Get the node to visit and remove it from queue\n var node_id = queue[start++];\n var node_ix = layoutInfo.idToIndex[node_id];\n var node = layoutInfo.layoutNodes[node_ix];\n var children = node.children;\n if (children.length > 0) {\n // Add children nodes as a new graph to graph set\n layoutInfo.graphSet.push(children);\n // Add children to que queue to be visited\n for (var i = 0; i < children.length; i++) {\n queue[++end] = children[i];\n }\n }\n }\n\n // Create indexToGraph map\n for (var i = 0; i < layoutInfo.graphSet.length; i++) {\n var graph = layoutInfo.graphSet[i];\n for (var j = 0; j < graph.length; j++) {\n var index = layoutInfo.idToIndex[graph[j]];\n layoutInfo.indexToGraph[index] = i;\n }\n }\n\n // Iterate over all edges, creating Layout Edges\n for (var i = 0; i < layoutInfo.edgeSize; i++) {\n var e = edges[i];\n var tempEdge = {};\n tempEdge.id = e.data('id');\n tempEdge.sourceId = e.data('source');\n tempEdge.targetId = e.data('target');\n\n // Compute ideal length\n var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength;\n var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity;\n\n // Check if it's an inter graph edge\n var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId];\n var targetIx = layoutInfo.idToIndex[tempEdge.targetId];\n var sourceGraph = layoutInfo.indexToGraph[sourceIx];\n var targetGraph = layoutInfo.indexToGraph[targetIx];\n if (sourceGraph != targetGraph) {\n // Find lowest common graph ancestor\n var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo);\n\n // Compute sum of node depths, relative to lca graph\n var lcaGraph = layoutInfo.graphSet[lca];\n var depth = 0;\n\n // Source depth\n var tempNode = layoutInfo.layoutNodes[sourceIx];\n while (-1 === lcaGraph.indexOf(tempNode.id)) {\n tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]];\n depth++;\n }\n\n // Target depth\n tempNode = layoutInfo.layoutNodes[targetIx];\n while (-1 === lcaGraph.indexOf(tempNode.id)) {\n tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]];\n depth++;\n }\n\n // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId +\n // \". Index: \" + lca + \" Contents: \" + lcaGraph.toString() +\n // \". Depth: \" + depth);\n\n // Update idealLength\n idealLength *= depth * options.nestingFactor;\n }\n tempEdge.idealLength = idealLength;\n tempEdge.elasticity = elasticity;\n layoutInfo.layoutEdges.push(tempEdge);\n }\n\n // Finally, return layoutInfo object\n return layoutInfo;\n};\n\n/**\n * @brief : This function finds the index of the lowest common\n * graph ancestor between 2 nodes in the subtree\n * (from the graph hierarchy induced tree) whose\n * root is graphIx\n *\n * @arg node1: node1's ID\n * @arg node2: node2's ID\n * @arg layoutInfo: layoutInfo object\n *\n */\nvar findLCA = function findLCA(node1, node2, layoutInfo) {\n // Find their common ancester, starting from the root graph\n var res = findLCA_aux(node1, node2, 0, layoutInfo);\n if (2 > res.count) {\n // If aux function couldn't find the common ancester,\n // then it is the root graph\n return 0;\n } else {\n return res.graph;\n }\n};\n\n/**\n * @brief : Auxiliary function used for LCA computation\n *\n * @arg node1 : node1's ID\n * @arg node2 : node2's ID\n * @arg graphIx : subgraph index\n * @arg layoutInfo : layoutInfo object\n *\n * @return : object of the form {count: X, graph: Y}, where:\n * X is the number of ancestors (max: 2) found in\n * graphIx (and it's subgraphs),\n * Y is the graph index of the lowest graph containing\n * all X nodes\n */\nvar findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) {\n var graph = layoutInfo.graphSet[graphIx];\n // If both nodes belongs to graphIx\n if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) {\n return {\n count: 2,\n graph: graphIx\n };\n }\n\n // Make recursive calls for all subgraphs\n var c = 0;\n for (var i = 0; i < graph.length; i++) {\n var nodeId = graph[i];\n var nodeIx = layoutInfo.idToIndex[nodeId];\n var children = layoutInfo.layoutNodes[nodeIx].children;\n\n // If the node has no child, skip it\n if (0 === children.length) {\n continue;\n }\n var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]];\n var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo);\n if (0 === result.count) {\n // Neither node1 nor node2 are present in this subgraph\n continue;\n } else if (1 === result.count) {\n // One of (node1, node2) is present in this subgraph\n c++;\n if (2 === c) {\n // We've already found both nodes, no need to keep searching\n break;\n }\n } else {\n // Both nodes are present in this subgraph\n return result;\n }\n }\n return {\n count: c,\n graph: graphIx\n };\n};\n\n/**\n * @brief: printsLayoutInfo into js console\n * Only used for debbuging\n */\nvar printLayoutInfo; \n\n/**\n * @brief : Randomizes the position of all nodes\n */\nvar randomizePositions = function randomizePositions(layoutInfo, cy) {\n var width = layoutInfo.clientWidth;\n var height = layoutInfo.clientHeight;\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n\n // No need to randomize compound nodes or locked nodes\n if (0 === n.children.length && !n.isLocked) {\n n.positionX = Math.random() * width;\n n.positionY = Math.random() * height;\n }\n }\n};\nvar getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) {\n var bb = layoutInfo.boundingBox;\n var coseBB = {\n x1: Infinity,\n x2: -Infinity,\n y1: Infinity,\n y2: -Infinity\n };\n if (options.boundingBox) {\n nodes.forEach(function (node) {\n var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]];\n coseBB.x1 = Math.min(coseBB.x1, lnode.positionX);\n coseBB.x2 = Math.max(coseBB.x2, lnode.positionX);\n coseBB.y1 = Math.min(coseBB.y1, lnode.positionY);\n coseBB.y2 = Math.max(coseBB.y2, lnode.positionY);\n });\n coseBB.w = coseBB.x2 - coseBB.x1;\n coseBB.h = coseBB.y2 - coseBB.y1;\n }\n return function (ele, i) {\n var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]];\n if (options.boundingBox) {\n // then add extra bounding box constraint\n var pctX = (lnode.positionX - coseBB.x1) / coseBB.w;\n var pctY = (lnode.positionY - coseBB.y1) / coseBB.h;\n return {\n x: bb.x1 + pctX * bb.w,\n y: bb.y1 + pctY * bb.h\n };\n } else {\n return {\n x: lnode.positionX,\n y: lnode.positionY\n };\n }\n };\n};\n\n/**\n * @brief : Updates the positions of nodes in the network\n * @arg layoutInfo : LayoutInfo object\n * @arg cy : Cytoscape object\n * @arg options : Layout options\n */\nvar refreshPositions = function refreshPositions(layoutInfo, cy, options) {\n // var s = 'Refreshing positions';\n // logDebug(s);\n\n var layout = options.layout;\n var nodes = options.eles.nodes();\n var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes);\n nodes.positions(getScaledPos);\n\n // Trigger layoutReady only on first call\n if (true !== layoutInfo.ready) {\n // s = 'Triggering layoutready';\n // logDebug(s);\n layoutInfo.ready = true;\n layout.one('layoutready', options.ready);\n layout.emit({\n type: 'layoutready',\n layout: this\n });\n }\n};\n\n/**\n * @brief : Logs a debug message in JS console, if DEBUG is ON\n */\n// var logDebug = function(text) {\n// if (DEBUG) {\n// console.debug(text);\n// }\n// };\n\n/**\n * @brief : Performs one iteration of the physical simulation\n * @arg layoutInfo : LayoutInfo object already initialized\n * @arg cy : Cytoscape object\n * @arg options : Layout options\n */\nvar step = function step(layoutInfo, options, _step) {\n // var s = \"\\n\\n###############################\";\n // s += \"\\nSTEP: \" + step;\n // s += \"\\n###############################\\n\";\n // logDebug(s);\n\n // Calculate node repulsions\n calculateNodeForces(layoutInfo, options);\n // Calculate edge forces\n calculateEdgeForces(layoutInfo);\n // Calculate gravity forces\n calculateGravityForces(layoutInfo, options);\n // Propagate forces from parent to child\n propagateForces(layoutInfo);\n // Update positions based on calculated forces\n updatePositions(layoutInfo);\n};\n\n/**\n * @brief : Computes the node repulsion forces\n */\nvar calculateNodeForces = function calculateNodeForces(layoutInfo, options) {\n // Go through each of the graphs in graphSet\n // Nodes only repel each other if they belong to the same graph\n // var s = 'calculateNodeForces';\n // logDebug(s);\n for (var i = 0; i < layoutInfo.graphSet.length; i++) {\n var graph = layoutInfo.graphSet[i];\n var numNodes = graph.length;\n\n // s = \"Set: \" + graph.toString();\n // logDebug(s);\n\n // Now get all the pairs of nodes\n // Only get each pair once, (A, B) = (B, A)\n for (var j = 0; j < numNodes; j++) {\n var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]];\n for (var k = j + 1; k < numNodes; k++) {\n var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]];\n nodeRepulsion(node1, node2, layoutInfo, options);\n }\n }\n }\n};\nvar randomDistance = function randomDistance(max) {\n return -max + 2 * max * Math.random();\n};\n\n/**\n * @brief : Compute the node repulsion forces between a pair of nodes\n */\nvar nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) {\n // var s = \"Node repulsion. Node1: \" + node1.id + \" Node2: \" + node2.id;\n\n var cmptId1 = node1.cmptId;\n var cmptId2 = node2.cmptId;\n if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) {\n return;\n }\n\n // Get direction of line connecting both node centers\n var directionX = node2.positionX - node1.positionX;\n var directionY = node2.positionY - node1.positionY;\n var maxRandDist = 1;\n // s += \"\\ndirectionX: \" + directionX + \", directionY: \" + directionY;\n\n // If both centers are the same, apply a random force\n if (0 === directionX && 0 === directionY) {\n directionX = randomDistance(maxRandDist);\n directionY = randomDistance(maxRandDist);\n }\n var overlap = nodesOverlap(node1, node2, directionX, directionY);\n if (overlap > 0) {\n // s += \"\\nNodes DO overlap.\";\n // s += \"\\nOverlap: \" + overlap;\n // If nodes overlap, repulsion force is proportional\n // to the overlap\n var force = options.nodeOverlap * overlap;\n\n // Compute the module and components of the force vector\n var distance = Math.sqrt(directionX * directionX + directionY * directionY);\n // s += \"\\nDistance: \" + distance;\n var forceX = force * directionX / distance;\n var forceY = force * directionY / distance;\n } else {\n // s += \"\\nNodes do NOT overlap.\";\n // If there's no overlap, force is inversely proportional\n // to squared distance\n\n // Get clipping points for both nodes\n var point1 = findClippingPoint(node1, directionX, directionY);\n var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY);\n\n // Use clipping points to compute distance\n var distanceX = point2.x - point1.x;\n var distanceY = point2.y - point1.y;\n var distanceSqr = distanceX * distanceX + distanceY * distanceY;\n var distance = Math.sqrt(distanceSqr);\n // s += \"\\nDistance: \" + distance;\n\n // Compute the module and components of the force vector\n var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr;\n var forceX = force * distanceX / distance;\n var forceY = force * distanceY / distance;\n }\n\n // Apply force\n if (!node1.isLocked) {\n node1.offsetX -= forceX;\n node1.offsetY -= forceY;\n }\n if (!node2.isLocked) {\n node2.offsetX += forceX;\n node2.offsetY += forceY;\n }\n\n // s += \"\\nForceX: \" + forceX + \" ForceY: \" + forceY;\n // logDebug(s);\n\n return;\n};\n\n/**\n * @brief : Determines whether two nodes overlap or not\n * @return : Amount of overlapping (0 => no overlap)\n */\nvar nodesOverlap = function nodesOverlap(node1, node2, dX, dY) {\n if (dX > 0) {\n var overlapX = node1.maxX - node2.minX;\n } else {\n var overlapX = node2.maxX - node1.minX;\n }\n if (dY > 0) {\n var overlapY = node1.maxY - node2.minY;\n } else {\n var overlapY = node2.maxY - node1.minY;\n }\n if (overlapX >= 0 && overlapY >= 0) {\n return Math.sqrt(overlapX * overlapX + overlapY * overlapY);\n } else {\n return 0;\n }\n};\n\n/**\n * @brief : Finds the point in which an edge (direction dX, dY) intersects\n * the rectangular bounding box of it's source/target node\n */\nvar findClippingPoint = function findClippingPoint(node, dX, dY) {\n // Shorcuts\n var X = node.positionX;\n var Y = node.positionY;\n var H = node.height || 1;\n var W = node.width || 1;\n var dirSlope = dY / dX;\n var nodeSlope = H / W;\n\n // var s = 'Computing clipping point of node ' + node.id +\n // \" . Height: \" + H + \", Width: \" + W +\n // \"\\nDirection \" + dX + \", \" + dY;\n //\n // Compute intersection\n var res = {};\n\n // Case: Vertical direction (up)\n if (0 === dX && 0 < dY) {\n res.x = X;\n // s += \"\\nUp direction\";\n res.y = Y + H / 2;\n return res;\n }\n\n // Case: Vertical direction (down)\n if (0 === dX && 0 > dY) {\n res.x = X;\n res.y = Y + H / 2;\n // s += \"\\nDown direction\";\n\n return res;\n }\n\n // Case: Intersects the right border\n if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) {\n res.x = X + W / 2;\n res.y = Y + W * dY / 2 / dX;\n // s += \"\\nRightborder\";\n\n return res;\n }\n\n // Case: Intersects the left border\n if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) {\n res.x = X - W / 2;\n res.y = Y - W * dY / 2 / dX;\n // s += \"\\nLeftborder\";\n\n return res;\n }\n\n // Case: Intersects the top border\n if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) {\n res.x = X + H * dX / 2 / dY;\n res.y = Y + H / 2;\n // s += \"\\nTop border\";\n\n return res;\n }\n\n // Case: Intersects the bottom border\n if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) {\n res.x = X - H * dX / 2 / dY;\n res.y = Y - H / 2;\n // s += \"\\nBottom border\";\n\n return res;\n }\n\n // s += \"\\nClipping point found at \" + res.x + \", \" + res.y;\n // logDebug(s);\n return res;\n};\n\n/**\n * @brief : Calculates all edge forces\n */\nvar calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) {\n // Iterate over all edges\n for (var i = 0; i < layoutInfo.edgeSize; i++) {\n // Get edge, source & target nodes\n var edge = layoutInfo.layoutEdges[i];\n var sourceIx = layoutInfo.idToIndex[edge.sourceId];\n var source = layoutInfo.layoutNodes[sourceIx];\n var targetIx = layoutInfo.idToIndex[edge.targetId];\n var target = layoutInfo.layoutNodes[targetIx];\n\n // Get direction of line connecting both node centers\n var directionX = target.positionX - source.positionX;\n var directionY = target.positionY - source.positionY;\n\n // If both centers are the same, do nothing.\n // A random force has already been applied as node repulsion\n if (0 === directionX && 0 === directionY) {\n continue;\n }\n\n // Get clipping points for both nodes\n var point1 = findClippingPoint(source, directionX, directionY);\n var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY);\n var lx = point2.x - point1.x;\n var ly = point2.y - point1.y;\n var l = Math.sqrt(lx * lx + ly * ly);\n var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity;\n if (0 !== l) {\n var forceX = force * lx / l;\n var forceY = force * ly / l;\n } else {\n var forceX = 0;\n var forceY = 0;\n }\n\n // Add this force to target and source nodes\n if (!source.isLocked) {\n source.offsetX += forceX;\n source.offsetY += forceY;\n }\n if (!target.isLocked) {\n target.offsetX -= forceX;\n target.offsetY -= forceY;\n }\n\n // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id;\n // s += \"\\nDistance: \" + l + \" Force: (\" + forceX + \", \" + forceY + \")\";\n // logDebug(s);\n }\n};\n\n/**\n * @brief : Computes gravity forces for all nodes\n */\nvar calculateGravityForces = function calculateGravityForces(layoutInfo, options) {\n if (options.gravity === 0) {\n return;\n }\n var distThreshold = 1;\n\n // var s = 'calculateGravityForces';\n // logDebug(s);\n for (var i = 0; i < layoutInfo.graphSet.length; i++) {\n var graph = layoutInfo.graphSet[i];\n var numNodes = graph.length;\n\n // s = \"Set: \" + graph.toString();\n // logDebug(s);\n\n // Compute graph center\n if (0 === i) {\n var centerX = layoutInfo.clientHeight / 2;\n var centerY = layoutInfo.clientWidth / 2;\n } else {\n // Get Parent node for this graph, and use its position as center\n var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]];\n var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]];\n var centerX = parent.positionX;\n var centerY = parent.positionY;\n }\n // s = \"Center found at: \" + centerX + \", \" + centerY;\n // logDebug(s);\n\n // Apply force to all nodes in graph\n for (var j = 0; j < numNodes; j++) {\n var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]];\n // s = \"Node: \" + node.id;\n\n if (node.isLocked) {\n continue;\n }\n var dx = centerX - node.positionX;\n var dy = centerY - node.positionY;\n var d = Math.sqrt(dx * dx + dy * dy);\n if (d > distThreshold) {\n var fx = options.gravity * dx / d;\n var fy = options.gravity * dy / d;\n node.offsetX += fx;\n node.offsetY += fy;\n // s += \": Applied force: \" + fx + \", \" + fy;\n }\n // logDebug(s);\n }\n }\n};\n\n/**\n * @brief : This function propagates the existing offsets from\n * parent nodes to its descendents.\n * @arg layoutInfo : layoutInfo Object\n * @arg cy : cytoscape Object\n * @arg options : Layout options\n */\nvar propagateForces = function propagateForces(layoutInfo, options) {\n // Inline implementation of a queue, used for traversing the graph in BFS order\n var queue = [];\n var start = 0; // Points to the start the queue\n var end = -1; // Points to the end of the queue\n\n // logDebug('propagateForces');\n\n // Start by visiting the nodes in the root graph\n queue.push.apply(queue, layoutInfo.graphSet[0]);\n end += layoutInfo.graphSet[0].length;\n\n // Traverse the graph, level by level,\n while (start <= end) {\n // Get the node to visit and remove it from queue\n var nodeId = queue[start++];\n var nodeIndex = layoutInfo.idToIndex[nodeId];\n var node = layoutInfo.layoutNodes[nodeIndex];\n var children = node.children;\n\n // We only need to process the node if it's compound\n if (0 < children.length && !node.isLocked) {\n var offX = node.offsetX;\n var offY = node.offsetY;\n\n // var s = \"Propagating offset from parent node : \" + node.id +\n // \". OffsetX: \" + offX + \". OffsetY: \" + offY;\n // s += \"\\n Children: \" + children.toString();\n // logDebug(s);\n\n for (var i = 0; i < children.length; i++) {\n var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]];\n // Propagate offset\n childNode.offsetX += offX;\n childNode.offsetY += offY;\n // Add children to queue to be visited\n queue[++end] = children[i];\n }\n\n // Reset parent offsets\n node.offsetX = 0;\n node.offsetY = 0;\n }\n }\n};\n\n/**\n * @brief : Updates the layout model positions, based on\n * the accumulated forces\n */\nvar updatePositions = function updatePositions(layoutInfo, options) {\n // var s = 'Updating positions';\n // logDebug(s);\n\n // Reset boundaries for compound nodes\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n if (0 < n.children.length) {\n // logDebug(\"Resetting boundaries of compound node: \" + n.id);\n n.maxX = undefined;\n n.minX = undefined;\n n.maxY = undefined;\n n.minY = undefined;\n }\n }\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n if (0 < n.children.length || n.isLocked) {\n // No need to set compound or locked node position\n // logDebug(\"Skipping position update of node: \" + n.id);\n continue;\n }\n // s = \"Node: \" + n.id + \" Previous position: (\" +\n // n.positionX + \", \" + n.positionY + \").\";\n\n // Limit displacement in order to improve stability\n var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature);\n n.positionX += tempForce.x;\n n.positionY += tempForce.y;\n n.offsetX = 0;\n n.offsetY = 0;\n n.minX = n.positionX - n.width;\n n.maxX = n.positionX + n.width;\n n.minY = n.positionY - n.height;\n n.maxY = n.positionY + n.height;\n // s += \" New Position: (\" + n.positionX + \", \" + n.positionY + \").\";\n // logDebug(s);\n\n // Update ancestry boudaries\n updateAncestryBoundaries(n, layoutInfo);\n }\n\n // Update size, position of compund nodes\n for (var i = 0; i < layoutInfo.nodeSize; i++) {\n var n = layoutInfo.layoutNodes[i];\n if (0 < n.children.length && !n.isLocked) {\n n.positionX = (n.maxX + n.minX) / 2;\n n.positionY = (n.maxY + n.minY) / 2;\n n.width = n.maxX - n.minX;\n n.height = n.maxY - n.minY;\n // s = \"Updating position, size of compound node \" + n.id;\n // s += \"\\nPositionX: \" + n.positionX + \", PositionY: \" + n.positionY;\n // s += \"\\nWidth: \" + n.width + \", Height: \" + n.height;\n // logDebug(s);\n }\n }\n};\n\n/**\n * @brief : Limits a force (forceX, forceY) to be not\n * greater (in modulo) than max.\n 8 Preserves force direction.\n */\nvar limitForce = function limitForce(forceX, forceY, max) {\n // var s = \"Limiting force: (\" + forceX + \", \" + forceY + \"). Max: \" + max;\n var force = Math.sqrt(forceX * forceX + forceY * forceY);\n if (force > max) {\n var res = {\n x: max * forceX / force,\n y: max * forceY / force\n };\n } else {\n var res = {\n x: forceX,\n y: forceY\n };\n }\n\n // s += \".\\nResult: (\" + res.x + \", \" + res.y + \")\";\n // logDebug(s);\n\n return res;\n};\n\n/**\n * @brief : Function used for keeping track of compound node\n * sizes, since they should bound all their subnodes.\n */\nvar updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) {\n // var s = \"Propagating new position/size of node \" + node.id;\n var parentId = node.parentId;\n if (null == parentId) {\n // If there's no parent, we are done\n // s += \". No parent node.\";\n // logDebug(s);\n return;\n }\n\n // Get Parent Node\n var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]];\n var flag = false;\n\n // MaxX\n if (null == p.maxX || node.maxX + p.padRight > p.maxX) {\n p.maxX = node.maxX + p.padRight;\n flag = true;\n // s += \"\\nNew maxX for parent node \" + p.id + \": \" + p.maxX;\n }\n\n // MinX\n if (null == p.minX || node.minX - p.padLeft < p.minX) {\n p.minX = node.minX - p.padLeft;\n flag = true;\n // s += \"\\nNew minX for parent node \" + p.id + \": \" + p.minX;\n }\n\n // MaxY\n if (null == p.maxY || node.maxY + p.padBottom > p.maxY) {\n p.maxY = node.maxY + p.padBottom;\n flag = true;\n // s += \"\\nNew maxY for parent node \" + p.id + \": \" + p.maxY;\n }\n\n // MinY\n if (null == p.minY || node.minY - p.padTop < p.minY) {\n p.minY = node.minY - p.padTop;\n flag = true;\n // s += \"\\nNew minY for parent node \" + p.id + \": \" + p.minY;\n }\n\n // If updated boundaries, propagate changes upward\n if (flag) {\n // logDebug(s);\n return updateAncestryBoundaries(p, layoutInfo);\n }\n\n // s += \". No changes in boundaries/position of parent node \" + p.id;\n // logDebug(s);\n return;\n};\nvar separateComponents = function separateComponents(layoutInfo, options) {\n var nodes = layoutInfo.layoutNodes;\n var components = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var cid = node.cmptId;\n var component = components[cid] = components[cid] || [];\n component.push(node);\n }\n var totalA = 0;\n for (var i = 0; i < components.length; i++) {\n var c = components[i];\n if (!c) {\n continue;\n }\n c.x1 = Infinity;\n c.x2 = -Infinity;\n c.y1 = Infinity;\n c.y2 = -Infinity;\n for (var j = 0; j < c.length; j++) {\n var n = c[j];\n c.x1 = Math.min(c.x1, n.positionX - n.width / 2);\n c.x2 = Math.max(c.x2, n.positionX + n.width / 2);\n c.y1 = Math.min(c.y1, n.positionY - n.height / 2);\n c.y2 = Math.max(c.y2, n.positionY + n.height / 2);\n }\n c.w = c.x2 - c.x1;\n c.h = c.y2 - c.y1;\n totalA += c.w * c.h;\n }\n components.sort(function (c1, c2) {\n return c2.w * c2.h - c1.w * c1.h;\n });\n var x = 0;\n var y = 0;\n var usedW = 0;\n var rowH = 0;\n var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight;\n for (var i = 0; i < components.length; i++) {\n var c = components[i];\n if (!c) {\n continue;\n }\n for (var j = 0; j < c.length; j++) {\n var n = c[j];\n if (!n.isLocked) {\n n.positionX += x - c.x1;\n n.positionY += y - c.y1;\n }\n }\n x += c.w + options.componentSpacing;\n usedW += c.w + options.componentSpacing;\n rowH = Math.max(rowH, c.h);\n if (usedW > maxRowW) {\n y += rowH + options.componentSpacing;\n x = 0;\n usedW = 0;\n rowH = 0;\n }\n }\n};\n\nvar defaults$3 = {\n fit: true,\n // whether to fit the viewport to the graph\n padding: 30,\n // padding used on fit\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n avoidOverlap: true,\n // prevents node overlap, may overflow boundingBox if not enough space\n avoidOverlapPadding: 10,\n // extra spacing around nodes when avoidOverlap: true\n nodeDimensionsIncludeLabels: false,\n // Excludes the label when calculating node bounding boxes for the layout algorithm\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n condense: false,\n // uses all available space on false, uses minimal space on true\n rows: undefined,\n // force num of rows in the grid\n cols: undefined,\n // force num of columns in the grid\n position: function position(node) {},\n // returns { row, col } for element\n sort: undefined,\n // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts \n};\n\nfunction GridLayout(options) {\n this.options = extend({}, defaults$3, options);\n}\nGridLayout.prototype.run = function () {\n var params = this.options;\n var options = params;\n var cy = params.cy;\n var eles = options.eles;\n var nodes = eles.nodes().not(':parent');\n if (options.sort) {\n nodes = nodes.sort(options.sort);\n }\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n if (bb.h === 0 || bb.w === 0) {\n eles.nodes().layoutPositions(this, options, function (ele) {\n return {\n x: bb.x1,\n y: bb.y1\n };\n });\n } else {\n // width/height * splits^2 = cells where splits is number of times to split width\n var cells = nodes.size();\n var splits = Math.sqrt(cells * bb.h / bb.w);\n var rows = Math.round(splits);\n var cols = Math.round(bb.w / bb.h * splits);\n var small = function small(val) {\n if (val == null) {\n return Math.min(rows, cols);\n } else {\n var min = Math.min(rows, cols);\n if (min == rows) {\n rows = val;\n } else {\n cols = val;\n }\n }\n };\n var large = function large(val) {\n if (val == null) {\n return Math.max(rows, cols);\n } else {\n var max = Math.max(rows, cols);\n if (max == rows) {\n rows = val;\n } else {\n cols = val;\n }\n }\n };\n var oRows = options.rows;\n var oCols = options.cols != null ? options.cols : options.columns;\n\n // if rows or columns were set in options, use those values\n if (oRows != null && oCols != null) {\n rows = oRows;\n cols = oCols;\n } else if (oRows != null && oCols == null) {\n rows = oRows;\n cols = Math.ceil(cells / rows);\n } else if (oRows == null && oCols != null) {\n cols = oCols;\n rows = Math.ceil(cells / cols);\n }\n\n // otherwise use the automatic values and adjust accordingly\n\n // if rounding was up, see if we can reduce rows or columns\n else if (cols * rows > cells) {\n var sm = small();\n var lg = large();\n\n // reducing the small side takes away the most cells, so try it first\n if ((sm - 1) * lg >= cells) {\n small(sm - 1);\n } else if ((lg - 1) * sm >= cells) {\n large(lg - 1);\n }\n } else {\n // if rounding was too low, add rows or columns\n while (cols * rows < cells) {\n var _sm = small();\n var _lg = large();\n\n // try to add to larger side first (adds less in multiplication)\n if ((_lg + 1) * _sm >= cells) {\n large(_lg + 1);\n } else {\n small(_sm + 1);\n }\n }\n }\n var cellWidth = bb.w / cols;\n var cellHeight = bb.h / rows;\n if (options.condense) {\n cellWidth = 0;\n cellHeight = 0;\n }\n if (options.avoidOverlap) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var pos = node._private.position;\n if (pos.x == null || pos.y == null) {\n // for bb\n pos.x = 0;\n pos.y = 0;\n }\n var nbb = node.layoutDimensions(options);\n var p = options.avoidOverlapPadding;\n var w = nbb.w + p;\n var h = nbb.h + p;\n cellWidth = Math.max(cellWidth, w);\n cellHeight = Math.max(cellHeight, h);\n }\n }\n var cellUsed = {}; // e.g. 'c-0-2' => true\n\n var used = function used(row, col) {\n return cellUsed['c-' + row + '-' + col] ? true : false;\n };\n var use = function use(row, col) {\n cellUsed['c-' + row + '-' + col] = true;\n };\n\n // to keep track of current cell position\n var row = 0;\n var col = 0;\n var moveToNextCell = function moveToNextCell() {\n col++;\n if (col >= cols) {\n col = 0;\n row++;\n }\n };\n\n // get a cache of all the manual positions\n var id2manPos = {};\n for (var _i = 0; _i < nodes.length; _i++) {\n var _node = nodes[_i];\n var rcPos = options.position(_node);\n if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) {\n // must have at least row or col def'd\n var _pos = {\n row: rcPos.row,\n col: rcPos.col\n };\n if (_pos.col === undefined) {\n // find unused col\n _pos.col = 0;\n while (used(_pos.row, _pos.col)) {\n _pos.col++;\n }\n } else if (_pos.row === undefined) {\n // find unused row\n _pos.row = 0;\n while (used(_pos.row, _pos.col)) {\n _pos.row++;\n }\n }\n id2manPos[_node.id()] = _pos;\n use(_pos.row, _pos.col);\n }\n }\n var getPos = function getPos(element, i) {\n var x, y;\n if (element.locked() || element.isParent()) {\n return false;\n }\n\n // see if we have a manual position set\n var rcPos = id2manPos[element.id()];\n if (rcPos) {\n x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1;\n y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1;\n } else {\n // otherwise set automatically\n\n while (used(row, col)) {\n moveToNextCell();\n }\n x = col * cellWidth + cellWidth / 2 + bb.x1;\n y = row * cellHeight + cellHeight / 2 + bb.y1;\n use(row, col);\n moveToNextCell();\n }\n return {\n x: x,\n y: y\n };\n };\n nodes.layoutPositions(this, options, getPos);\n }\n return this; // chaining\n};\n\n// default layout options\nvar defaults$2 = {\n ready: function ready() {},\n // on layoutready\n stop: function stop() {} // on layoutstop\n};\n\n// constructor\n// options : object containing layout options\nfunction NullLayout(options) {\n this.options = extend({}, defaults$2, options);\n}\n\n// runs the layout\nNullLayout.prototype.run = function () {\n var options = this.options;\n var eles = options.eles; // elements to consider in the layout\n var layout = this;\n\n // cy is automatically populated for us in the constructor\n // (disable eslint for next line as this serves as example layout code to external developers)\n // eslint-disable-next-line no-unused-vars\n options.cy;\n layout.emit('layoutstart');\n\n // puts all nodes at (0, 0)\n // n.b. most layouts would use layoutPositions(), instead of positions() and manual events\n eles.nodes().positions(function () {\n return {\n x: 0,\n y: 0\n };\n });\n\n // trigger layoutready when each node has had its position set at least once\n layout.one('layoutready', options.ready);\n layout.emit('layoutready');\n\n // trigger layoutstop when the layout stops (e.g. finishes)\n layout.one('layoutstop', options.stop);\n layout.emit('layoutstop');\n return this; // chaining\n};\n\n// called on continuous layouts to stop them before they finish\nNullLayout.prototype.stop = function () {\n return this; // chaining\n};\n\nvar defaults$1 = {\n positions: undefined,\n // map of (node id) => (position obj); or function(node){ return somPos; }\n zoom: undefined,\n // the zoom level to set (prob want fit = false if set)\n pan: undefined,\n // the pan level to set (prob want fit = false if set)\n fit: true,\n // whether to fit to viewport\n padding: 30,\n // padding on fit\n spacingFactor: undefined,\n // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts\n};\n\nfunction PresetLayout(options) {\n this.options = extend({}, defaults$1, options);\n}\nPresetLayout.prototype.run = function () {\n var options = this.options;\n var eles = options.eles;\n var nodes = eles.nodes();\n var posIsFn = fn$6(options.positions);\n function getPosition(node) {\n if (options.positions == null) {\n return copyPosition(node.position());\n }\n if (posIsFn) {\n return options.positions(node);\n }\n var pos = options.positions[node._private.data.id];\n if (pos == null) {\n return null;\n }\n return pos;\n }\n nodes.layoutPositions(this, options, function (node, i) {\n var position = getPosition(node);\n if (node.locked() || position == null) {\n return false;\n }\n return position;\n });\n return this; // chaining\n};\n\nvar defaults = {\n fit: true,\n // whether to fit to viewport\n padding: 30,\n // fit padding\n boundingBox: undefined,\n // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }\n animate: false,\n // whether to transition the node positions\n animationDuration: 500,\n // duration of animation in ms if enabled\n animationEasing: undefined,\n // easing of animation if enabled\n animateFilter: function animateFilter(node, i) {\n return true;\n },\n // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts\n ready: undefined,\n // callback on layoutready\n stop: undefined,\n // callback on layoutstop\n transform: function transform(node, position) {\n return position;\n } // transform a given node position. Useful for changing flow direction in discrete layouts \n};\n\nfunction RandomLayout(options) {\n this.options = extend({}, defaults, options);\n}\nRandomLayout.prototype.run = function () {\n var options = this.options;\n var cy = options.cy;\n var eles = options.eles;\n var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : {\n x1: 0,\n y1: 0,\n w: cy.width(),\n h: cy.height()\n });\n var getPos = function getPos(node, i) {\n return {\n x: bb.x1 + Math.round(Math.random() * bb.w),\n y: bb.y1 + Math.round(Math.random() * bb.h)\n };\n };\n eles.nodes().layoutPositions(this, options, getPos);\n return this; // chaining\n};\n\nvar layout = [{\n name: 'breadthfirst',\n impl: BreadthFirstLayout\n}, {\n name: 'circle',\n impl: CircleLayout\n}, {\n name: 'concentric',\n impl: ConcentricLayout\n}, {\n name: 'cose',\n impl: CoseLayout\n}, {\n name: 'grid',\n impl: GridLayout\n}, {\n name: 'null',\n impl: NullLayout\n}, {\n name: 'preset',\n impl: PresetLayout\n}, {\n name: 'random',\n impl: RandomLayout\n}];\n\nfunction NullRenderer(options) {\n this.options = options;\n this.notifications = 0; // for testing\n}\n\nvar noop = function noop() {};\nvar throwImgErr = function throwImgErr() {\n throw new Error('A headless instance can not render images');\n};\nNullRenderer.prototype = {\n recalculateRenderedStyle: noop,\n notify: function notify() {\n this.notifications++;\n },\n init: noop,\n isHeadless: function isHeadless() {\n return true;\n },\n png: throwImgErr,\n jpg: throwImgErr\n};\n\nvar BRp$f = {};\nBRp$f.arrowShapeWidth = 0.3;\nBRp$f.registerArrowShapes = function () {\n var arrowShapes = this.arrowShapes = {};\n var renderer = this;\n\n // Contract for arrow shapes:\n // 0, 0 is arrow tip\n // (0, 1) is direction towards node\n // (1, 0) is right\n //\n // functional api:\n // collide: check x, y in shape\n // roughCollide: called before collide, no false negatives\n // draw: draw\n // spacing: dist(arrowTip, nodeBoundary)\n // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip\n\n var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) {\n var x1 = translation.x - size / 2 - padding;\n var x2 = translation.x + size / 2 + padding;\n var y1 = translation.y - size / 2 - padding;\n var y2 = translation.y + size / 2 + padding;\n var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2;\n return inside;\n };\n var transform = function transform(x, y, size, angle, translation) {\n var xRotated = x * Math.cos(angle) - y * Math.sin(angle);\n var yRotated = x * Math.sin(angle) + y * Math.cos(angle);\n var xScaled = xRotated * size;\n var yScaled = yRotated * size;\n var xTranslated = xScaled + translation.x;\n var yTranslated = yScaled + translation.y;\n return {\n x: xTranslated,\n y: yTranslated\n };\n };\n var transformPoints = function transformPoints(pts, size, angle, translation) {\n var retPts = [];\n for (var i = 0; i < pts.length; i += 2) {\n var x = pts[i];\n var y = pts[i + 1];\n retPts.push(transform(x, y, size, angle, translation));\n }\n return retPts;\n };\n var pointsToArr = function pointsToArr(pts) {\n var ret = [];\n for (var i = 0; i < pts.length; i++) {\n var p = pts[i];\n ret.push(p.x, p.y);\n }\n return ret;\n };\n var standardGap = function standardGap(edge) {\n return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2;\n };\n var defineArrowShape = function defineArrowShape(name, defn) {\n if (string(defn)) {\n defn = arrowShapes[defn];\n }\n arrowShapes[name] = extend({\n name: name,\n points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3],\n collide: function collide(x, y, size, angle, translation, padding) {\n var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n var inside = pointInsidePolygonPoints(x, y, points);\n return inside;\n },\n roughCollide: bbCollide,\n draw: function draw(context, size, angle, translation) {\n var points = transformPoints(this.points, size, angle, translation);\n renderer.arrowShapeImpl('polygon')(context, points);\n },\n spacing: function spacing(edge) {\n return 0;\n },\n gap: standardGap\n }, defn);\n };\n defineArrowShape('none', {\n collide: falsify,\n roughCollide: falsify,\n draw: noop$1,\n spacing: zeroify,\n gap: zeroify\n });\n defineArrowShape('triangle', {\n points: [-0.15, -0.3, 0, 0, 0.15, -0.3]\n });\n defineArrowShape('arrow', 'triangle');\n defineArrowShape('triangle-backcurve', {\n points: arrowShapes['triangle'].points,\n controlPoint: [0, -0.15],\n roughCollide: bbCollide,\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var ptsTrans = transformPoints(this.points, size, angle, translation);\n var ctrlPt = this.controlPoint;\n var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans);\n },\n gap: function gap(edge) {\n return standardGap(edge) * 0.8;\n }\n });\n defineArrowShape('triangle-tee', {\n points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0],\n pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4],\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation));\n var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts);\n return inside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var triPts = transformPoints(this.points, size, angle, translation);\n var teePts = transformPoints(this.pointsTee, size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, triPts, teePts);\n }\n });\n defineArrowShape('circle-triangle', {\n radius: 0.15,\n pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15],\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var t = translation;\n var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2);\n var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n return pointInsidePolygonPoints(x, y, triPts) || circleInside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var triPts = transformPoints(this.pointsTr, size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size);\n },\n spacing: function spacing(edge) {\n return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius;\n }\n });\n defineArrowShape('triangle-cross', {\n points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0],\n baseCrossLinePts: [-0.15, -0.4,\n // first half of the rectangle\n -0.15, -0.4, 0.15, -0.4,\n // second half of the rectangle\n 0.15, -0.4],\n crossLinePts: function crossLinePts(size, edgeWidth) {\n // shift points so that the distance between the cross points matches edge width\n var p = this.baseCrossLinePts.slice();\n var shiftFactor = edgeWidth / size;\n var y0 = 3;\n var y1 = 5;\n p[y0] = p[y0] - shiftFactor;\n p[y1] = p[y1] - shiftFactor;\n return p;\n },\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation));\n var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation));\n var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts);\n return inside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n var triPts = transformPoints(this.points, size, angle, translation);\n var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation);\n renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts);\n }\n });\n defineArrowShape('vee', {\n points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15],\n gap: function gap(edge) {\n return standardGap(edge) * 0.525;\n }\n });\n defineArrowShape('circle', {\n radius: 0.15,\n collide: function collide(x, y, size, angle, translation, edgeWidth, padding) {\n var t = translation;\n var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2);\n return inside;\n },\n draw: function draw(context, size, angle, translation, edgeWidth) {\n renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size);\n },\n spacing: function spacing(edge) {\n return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius;\n }\n });\n defineArrowShape('tee', {\n points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0],\n spacing: function spacing(edge) {\n return 1;\n },\n gap: function gap(edge) {\n return 1;\n }\n });\n defineArrowShape('square', {\n points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3]\n });\n defineArrowShape('diamond', {\n points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0],\n gap: function gap(edge) {\n return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value;\n }\n });\n defineArrowShape('chevron', {\n points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15],\n gap: function gap(edge) {\n return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value;\n }\n });\n};\n\nvar BRp$e = {};\n\n// Project mouse\nBRp$e.projectIntoViewport = function (clientX, clientY) {\n var cy = this.cy;\n var offsets = this.findContainerClientCoords();\n var offsetLeft = offsets[0];\n var offsetTop = offsets[1];\n var scale = offsets[4];\n var pan = cy.pan();\n var zoom = cy.zoom();\n var x = ((clientX - offsetLeft) / scale - pan.x) / zoom;\n var y = ((clientY - offsetTop) / scale - pan.y) / zoom;\n return [x, y];\n};\nBRp$e.findContainerClientCoords = function () {\n if (this.containerBB) {\n return this.containerBB;\n }\n var container = this.container;\n var rect = container.getBoundingClientRect();\n var style = this.cy.window().getComputedStyle(container);\n var styleValue = function styleValue(name) {\n return parseFloat(style.getPropertyValue(name));\n };\n var padding = {\n left: styleValue('padding-left'),\n right: styleValue('padding-right'),\n top: styleValue('padding-top'),\n bottom: styleValue('padding-bottom')\n };\n var border = {\n left: styleValue('border-left-width'),\n right: styleValue('border-right-width'),\n top: styleValue('border-top-width'),\n bottom: styleValue('border-bottom-width')\n };\n var clientWidth = container.clientWidth;\n var clientHeight = container.clientHeight;\n var paddingHor = padding.left + padding.right;\n var paddingVer = padding.top + padding.bottom;\n var borderHor = border.left + border.right;\n var scale = rect.width / (clientWidth + borderHor);\n var unscaledW = clientWidth - paddingHor;\n var unscaledH = clientHeight - paddingVer;\n var left = rect.left + padding.left + border.left;\n var top = rect.top + padding.top + border.top;\n return this.containerBB = [left, top, unscaledW, unscaledH, scale];\n};\nBRp$e.invalidateContainerClientCoordsCache = function () {\n this.containerBB = null;\n};\nBRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) {\n return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0];\n};\nBRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) {\n var self = this;\n var r = this;\n var eles = r.getCachedZSortedEles();\n var near = []; // 1 node max, 1 edge max\n var zoom = r.cy.zoom();\n var hasCompounds = r.cy.hasCompoundNodes();\n var edgeThreshold = (isTouch ? 24 : 8) / zoom;\n var nodeThreshold = (isTouch ? 8 : 2) / zoom;\n var labelThreshold = (isTouch ? 8 : 2) / zoom;\n var minSqDist = Infinity;\n var nearEdge;\n var nearNode;\n if (interactiveElementsOnly) {\n eles = eles.interactive;\n }\n function addEle(ele, sqDist) {\n if (ele.isNode()) {\n if (nearNode) {\n return; // can't replace node\n } else {\n nearNode = ele;\n near.push(ele);\n }\n }\n if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) {\n if (nearEdge) {\n // then replace existing edge\n // can replace only if same z-index\n if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) {\n for (var i = 0; i < near.length; i++) {\n if (near[i].isEdge()) {\n near[i] = ele;\n nearEdge = ele;\n minSqDist = sqDist != null ? sqDist : minSqDist;\n break;\n }\n }\n }\n } else {\n near.push(ele);\n nearEdge = ele;\n minSqDist = sqDist != null ? sqDist : minSqDist;\n }\n }\n }\n function checkNode(node) {\n var width = node.outerWidth() + 2 * nodeThreshold;\n var height = node.outerHeight() + 2 * nodeThreshold;\n var hw = width / 2;\n var hh = height / 2;\n var pos = node.position();\n var cornerRadius = node.pstyle('corner-radius').value === 'auto' ? 'auto' : node.pstyle('corner-radius').pfValue;\n var rs = node._private.rscratch;\n if (pos.x - hw <= x && x <= pos.x + hw // bb check x\n && pos.y - hh <= y && y <= pos.y + hh // bb check y\n ) {\n var shape = r.nodeShapes[self.getNodeShape(node)];\n if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y, cornerRadius, rs)) {\n addEle(node, 0);\n return true;\n }\n }\n }\n function checkEdge(edge) {\n var _p = edge._private;\n var rs = _p.rscratch;\n var styleWidth = edge.pstyle('width').pfValue;\n var scale = edge.pstyle('arrow-scale').value;\n var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre\n var widthSq = width * width;\n var width2 = width * 2;\n var src = _p.source;\n var tgt = _p.target;\n var sqDist;\n if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') {\n var pts = rs.allpts;\n for (var i = 0; i + 3 < pts.length; i += 2) {\n if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) {\n addEle(edge, sqDist);\n return true;\n }\n }\n } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') {\n var pts = rs.allpts;\n for (var i = 0; i + 5 < rs.allpts.length; i += 4) {\n if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) {\n addEle(edge, sqDist);\n return true;\n }\n }\n }\n\n // if we're close to the edge but didn't hit it, maybe we hit its arrows\n\n var src = src || _p.source;\n var tgt = tgt || _p.target;\n var arSize = self.getArrowWidth(styleWidth, scale);\n var arrows = [{\n name: 'source',\n x: rs.arrowStartX,\n y: rs.arrowStartY,\n angle: rs.srcArrowAngle\n }, {\n name: 'target',\n x: rs.arrowEndX,\n y: rs.arrowEndY,\n angle: rs.tgtArrowAngle\n }, {\n name: 'mid-source',\n x: rs.midX,\n y: rs.midY,\n angle: rs.midsrcArrowAngle\n }, {\n name: 'mid-target',\n x: rs.midX,\n y: rs.midY,\n angle: rs.midtgtArrowAngle\n }];\n for (var i = 0; i < arrows.length; i++) {\n var ar = arrows[i];\n var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value];\n var edgeWidth = edge.pstyle('width').pfValue;\n if (shape.roughCollide(x, y, arSize, ar.angle, {\n x: ar.x,\n y: ar.y\n }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, {\n x: ar.x,\n y: ar.y\n }, edgeWidth, edgeThreshold)) {\n addEle(edge);\n return true;\n }\n }\n\n // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence)\n if (hasCompounds && near.length > 0) {\n checkNode(src);\n checkNode(tgt);\n }\n }\n function preprop(obj, name, pre) {\n return getPrefixedProperty(obj, name, pre);\n }\n function checkLabel(ele, prefix) {\n var _p = ele._private;\n var th = labelThreshold;\n var prefixDash;\n if (prefix) {\n prefixDash = prefix + '-';\n } else {\n prefixDash = '';\n }\n ele.boundingBox();\n var bb = _p.labelBounds[prefix || 'main'];\n var text = ele.pstyle(prefixDash + 'label').value;\n var eventsEnabled = ele.pstyle('text-events').strValue === 'yes';\n if (!eventsEnabled || !text) {\n return;\n }\n var lx = preprop(_p.rscratch, 'labelX', prefix);\n var ly = preprop(_p.rscratch, 'labelY', prefix);\n var theta = preprop(_p.rscratch, 'labelAngle', prefix);\n var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue;\n var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue;\n var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin\n var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly)\n var ly1 = bb.y1 - th - oy;\n var ly2 = bb.y2 + th - oy;\n if (theta) {\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n var rotate = function rotate(x, y) {\n x = x - lx;\n y = y - ly;\n return {\n x: x * cos - y * sin + lx,\n y: x * sin + y * cos + ly\n };\n };\n var px1y1 = rotate(lx1, ly1);\n var px1y2 = rotate(lx1, ly2);\n var px2y1 = rotate(lx2, ly1);\n var px2y2 = rotate(lx2, ly2);\n var points = [\n // with the margin added after the rotation is applied\n px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy];\n if (pointInsidePolygonPoints(x, y, points)) {\n addEle(ele);\n return true;\n }\n } else {\n // do a cheaper bb check\n if (inBoundingBox(bb, x, y)) {\n addEle(ele);\n return true;\n }\n }\n }\n for (var i = eles.length - 1; i >= 0; i--) {\n // reverse order for precedence\n var ele = eles[i];\n if (ele.isNode()) {\n checkNode(ele) || checkLabel(ele);\n } else {\n // then edge\n checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target');\n }\n }\n return near;\n};\n\n// 'Give me everything from this box'\nBRp$e.getAllInBox = function (x1, y1, x2, y2) {\n var eles = this.getCachedZSortedEles().interactive;\n var box = [];\n var x1c = Math.min(x1, x2);\n var x2c = Math.max(x1, x2);\n var y1c = Math.min(y1, y2);\n var y2c = Math.max(y1, y2);\n x1 = x1c;\n x2 = x2c;\n y1 = y1c;\n y2 = y2c;\n var boxBb = makeBoundingBox({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n });\n for (var e = 0; e < eles.length; e++) {\n var ele = eles[e];\n if (ele.isNode()) {\n var node = ele;\n var nodeBb = node.boundingBox({\n includeNodes: true,\n includeEdges: false,\n includeLabels: false\n });\n if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) {\n box.push(node);\n }\n } else {\n var edge = ele;\n var _p = edge._private;\n var rs = _p.rscratch;\n if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) {\n continue;\n }\n if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) {\n continue;\n }\n if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') {\n var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts;\n var allInside = true;\n for (var i = 0; i < pts.length; i++) {\n if (!pointInBoundingBox(boxBb, pts[i])) {\n allInside = false;\n break;\n }\n }\n if (allInside) {\n box.push(edge);\n }\n } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') {\n box.push(edge);\n }\n }\n }\n return box;\n};\n\nvar BRp$d = {};\nBRp$d.calculateArrowAngles = function (edge) {\n var rs = edge._private.rscratch;\n var isHaystack = rs.edgeType === 'haystack';\n var isBezier = rs.edgeType === 'bezier';\n var isMultibezier = rs.edgeType === 'multibezier';\n var isSegments = rs.edgeType === 'segments';\n var isCompound = rs.edgeType === 'compound';\n var isSelf = rs.edgeType === 'self';\n\n // Displacement gives direction for arrowhead orientation\n var dispX, dispY;\n var startX, startY, endX, endY, midX, midY;\n if (isHaystack) {\n startX = rs.haystackPts[0];\n startY = rs.haystackPts[1];\n endX = rs.haystackPts[2];\n endY = rs.haystackPts[3];\n } else {\n startX = rs.arrowStartX;\n startY = rs.arrowStartY;\n endX = rs.arrowEndX;\n endY = rs.arrowEndY;\n }\n midX = rs.midX;\n midY = rs.midY;\n\n // source\n //\n\n if (isSegments) {\n dispX = startX - rs.segpts[0];\n dispY = startY - rs.segpts[1];\n } else if (isMultibezier || isCompound || isSelf || isBezier) {\n var pts = rs.allpts;\n var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1);\n var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1);\n dispX = startX - bX;\n dispY = startY - bY;\n } else {\n dispX = startX - midX;\n dispY = startY - midY;\n }\n rs.srcArrowAngle = getAngleFromDisp(dispX, dispY);\n\n // mid target\n //\n\n var midX = rs.midX;\n var midY = rs.midY;\n if (isHaystack) {\n midX = (startX + endX) / 2;\n midY = (startY + endY) / 2;\n }\n dispX = endX - startX;\n dispY = endY - startY;\n if (isSegments) {\n var pts = rs.allpts;\n if (pts.length / 2 % 2 === 0) {\n var i2 = pts.length / 2;\n var i1 = i2 - 2;\n dispX = pts[i2] - pts[i1];\n dispY = pts[i2 + 1] - pts[i1 + 1];\n } else if (rs.isRound) {\n dispX = rs.midVector[1];\n dispY = -rs.midVector[0];\n } else {\n var i2 = pts.length / 2 - 1;\n var i1 = i2 - 2;\n dispX = pts[i2] - pts[i1];\n dispY = pts[i2 + 1] - pts[i1 + 1];\n }\n } else if (isMultibezier || isCompound || isSelf) {\n var pts = rs.allpts;\n var cpts = rs.ctrlpts;\n var bp0x, bp0y;\n var bp1x, bp1y;\n if (cpts.length / 2 % 2 === 0) {\n var p0 = pts.length / 2 - 1; // startpt\n var ic = p0 + 2;\n var p1 = ic + 2;\n bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0);\n bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0);\n bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001);\n bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001);\n } else {\n var ic = pts.length / 2 - 1; // ctrpt\n var p0 = ic - 2; // startpt\n var p1 = ic + 2; // endpt\n\n bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999);\n bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999);\n bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5);\n bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5);\n }\n dispX = bp1x - bp0x;\n dispY = bp1y - bp0y;\n }\n rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY);\n rs.midDispX = dispX;\n rs.midDispY = dispY;\n\n // mid source\n //\n\n dispX *= -1;\n dispY *= -1;\n if (isSegments) {\n var pts = rs.allpts;\n if (pts.length / 2 % 2 === 0) ; else if (!rs.isRound) {\n var i2 = pts.length / 2 - 1;\n var i3 = i2 + 2;\n dispX = -(pts[i3] - pts[i2]);\n dispY = -(pts[i3 + 1] - pts[i2 + 1]);\n }\n }\n rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY);\n\n // target\n //\n\n if (isSegments) {\n dispX = endX - rs.segpts[rs.segpts.length - 2];\n dispY = endY - rs.segpts[rs.segpts.length - 1];\n } else if (isMultibezier || isCompound || isSelf || isBezier) {\n var pts = rs.allpts;\n var l = pts.length;\n var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9);\n var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9);\n dispX = endX - bX;\n dispY = endY - bY;\n } else {\n dispX = endX - midX;\n dispY = endY - midY;\n }\n rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY);\n};\nBRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) {\n var cache = this.arrowWidthCache = this.arrowWidthCache || {};\n var cachedVal = cache[edgeWidth + ', ' + scale];\n if (cachedVal) {\n return cachedVal;\n }\n cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale;\n cache[edgeWidth + ', ' + scale] = cachedVal;\n return cachedVal;\n};\n\n/**\n * Explained by Blindman67 at https://stackoverflow.com/a/44856925/11028828\n */\n\n// Declare reused variable to avoid reallocating variables every time the function is called\nvar x,\n y,\n v1 = {},\n v2 = {},\n sinA,\n sinA90,\n radDirection,\n drawDirection,\n angle,\n halfAngle,\n cRadius,\n lenOut,\n radius,\n limit;\nvar startX, startY, stopX, stopY;\nvar lastPoint;\n\n// convert 2 points into vector form, polar form, and normalised\nvar asVec = function asVec(p, pp, v) {\n v.x = pp.x - p.x;\n v.y = pp.y - p.y;\n v.len = Math.sqrt(v.x * v.x + v.y * v.y);\n v.nx = v.x / v.len;\n v.ny = v.y / v.len;\n v.ang = Math.atan2(v.ny, v.nx);\n};\nvar invertVec = function invertVec(originalV, invertedV) {\n invertedV.x = originalV.x * -1;\n invertedV.y = originalV.y * -1;\n invertedV.nx = originalV.nx * -1;\n invertedV.ny = originalV.ny * -1;\n invertedV.ang = originalV.ang > 0 ? -(Math.PI - originalV.ang) : Math.PI + originalV.ang;\n};\nvar calcCornerArc = function calcCornerArc(previousPoint, currentPoint, nextPoint, radiusMax, isArcRadius) {\n //-----------------------------------------\n // Part 1\n previousPoint !== lastPoint ? asVec(currentPoint, previousPoint, v1) : invertVec(v2, v1); // Avoid recalculating vec if it is the invert of the last one calculated\n asVec(currentPoint, nextPoint, v2);\n sinA = v1.nx * v2.ny - v1.ny * v2.nx;\n sinA90 = v1.nx * v2.nx - v1.ny * -v2.ny;\n angle = Math.asin(Math.max(-1, Math.min(1, sinA)));\n if (Math.abs(angle) < 1e-6) {\n x = currentPoint.x;\n y = currentPoint.y;\n cRadius = radius = 0;\n return;\n }\n //-----------------------------------------\n radDirection = 1;\n drawDirection = false;\n if (sinA90 < 0) {\n if (angle < 0) {\n angle = Math.PI + angle;\n } else {\n angle = Math.PI - angle;\n radDirection = -1;\n drawDirection = true;\n }\n } else {\n if (angle > 0) {\n radDirection = -1;\n drawDirection = true;\n }\n }\n if (currentPoint.radius !== undefined) {\n radius = currentPoint.radius;\n } else {\n radius = radiusMax;\n }\n //-----------------------------------------\n // Part 2\n halfAngle = angle / 2;\n //-----------------------------------------\n\n limit = Math.min(v1.len / 2, v2.len / 2);\n if (isArcRadius) {\n //-----------------------------------------\n // Part 3\n lenOut = Math.abs(Math.cos(halfAngle) * radius / Math.sin(halfAngle));\n\n //-----------------------------------------\n // Special part A\n if (lenOut > limit) {\n lenOut = limit;\n cRadius = Math.abs(lenOut * Math.sin(halfAngle) / Math.cos(halfAngle));\n } else {\n cRadius = radius;\n }\n } else {\n lenOut = Math.min(limit, radius);\n cRadius = Math.abs(lenOut * Math.sin(halfAngle) / Math.cos(halfAngle));\n }\n //-----------------------------------------\n\n //-----------------------------------------\n // Part 4\n stopX = currentPoint.x + v2.nx * lenOut;\n stopY = currentPoint.y + v2.ny * lenOut;\n //-----------------------------------------\n // Part 5\n x = stopX - v2.ny * cRadius * radDirection;\n y = stopY + v2.nx * cRadius * radDirection;\n //-----------------------------------------\n // Additional Part : calculate start point E\n startX = currentPoint.x + v1.nx * lenOut;\n startY = currentPoint.y + v1.ny * lenOut;\n\n // Save last point to avoid recalculating vector when not needed\n lastPoint = currentPoint;\n};\n\n/**\n * Draw corner provided by {@link getRoundCorner}\n *\n * @param ctx :CanvasRenderingContext2D\n * @param roundCorner {{cx:number, cy:number, radius:number, endAngle: number, startAngle: number, counterClockwise: boolean}}\n */\nfunction drawPreparedRoundCorner(ctx, roundCorner) {\n if (roundCorner.radius === 0) ctx.lineTo(roundCorner.cx, roundCorner.cy);else ctx.arc(roundCorner.cx, roundCorner.cy, roundCorner.radius, roundCorner.startAngle, roundCorner.endAngle, roundCorner.counterClockwise);\n}\n\n/**\n * Get round corner from a point and its previous and next neighbours in a path\n *\n * @param previousPoint {{x: number, y:number, radius: number?}}\n * @param currentPoint {{x: number, y:number, radius: number?}}\n * @param nextPoint {{x: number, y:number, radius: number?}}\n * @param radiusMax :number\n * @param isArcRadius :boolean\n * @return {{\n * cx:number, cy:number, radius:number,\n * startX:number, startY:number,\n * stopX:number, stopY: number,\n * endAngle: number, startAngle: number, counterClockwise: boolean\n * }}\n */\nfunction getRoundCorner(previousPoint, currentPoint, nextPoint, radiusMax) {\n var isArcRadius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n if (radiusMax === 0 || currentPoint.radius === 0) return {\n cx: currentPoint.x,\n cy: currentPoint.y,\n radius: 0,\n startX: currentPoint.x,\n startY: currentPoint.y,\n stopX: currentPoint.x,\n stopY: currentPoint.y,\n startAngle: undefined,\n endAngle: undefined,\n counterClockwise: undefined\n };\n calcCornerArc(previousPoint, currentPoint, nextPoint, radiusMax, isArcRadius);\n return {\n cx: x,\n cy: y,\n radius: cRadius,\n startX: startX,\n startY: startY,\n stopX: stopX,\n stopY: stopY,\n startAngle: v1.ang + Math.PI / 2 * radDirection,\n endAngle: v2.ang - Math.PI / 2 * radDirection,\n counterClockwise: drawDirection\n };\n}\n\nvar BRp$c = {};\nBRp$c.findMidptPtsEtc = function (edge, pairInfo) {\n var posPts = pairInfo.posPts,\n intersectionPts = pairInfo.intersectionPts,\n vectorNormInverse = pairInfo.vectorNormInverse;\n var midptPts;\n\n // n.b. assumes all edges in bezier bundle have same endpoints specified\n var srcManEndpt = edge.pstyle('source-endpoint');\n var tgtManEndpt = edge.pstyle('target-endpoint');\n var haveManualEndPts = srcManEndpt.units != null && tgtManEndpt.units != null;\n var recalcVectorNormInverse = function recalcVectorNormInverse(x1, y1, x2, y2) {\n var dy = y2 - y1;\n var dx = x2 - x1;\n var l = Math.sqrt(dx * dx + dy * dy);\n return {\n x: -dy / l,\n y: dx / l\n };\n };\n var edgeDistances = edge.pstyle('edge-distances').value;\n switch (edgeDistances) {\n case 'node-position':\n midptPts = posPts;\n break;\n case 'intersection':\n midptPts = intersectionPts;\n break;\n case 'endpoints':\n {\n if (haveManualEndPts) {\n var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt),\n _this$manualEndptToPx2 = _slicedToArray(_this$manualEndptToPx, 2),\n x1 = _this$manualEndptToPx2[0],\n y1 = _this$manualEndptToPx2[1];\n var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt),\n _this$manualEndptToPx4 = _slicedToArray(_this$manualEndptToPx3, 2),\n x2 = _this$manualEndptToPx4[0],\n y2 = _this$manualEndptToPx4[1];\n var endPts = {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2\n };\n vectorNormInverse = recalcVectorNormInverse(x1, y1, x2, y2);\n midptPts = endPts;\n } else {\n warn(\"Edge \".concat(edge.id(), \" has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).\"));\n midptPts = intersectionPts; // back to default\n }\n\n break;\n }\n }\n return {\n midptPts: midptPts,\n vectorNormInverse: vectorNormInverse\n };\n};\nBRp$c.findHaystackPoints = function (edges) {\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var _p = edge._private;\n var rs = _p.rscratch;\n if (!rs.haystack) {\n var angle = Math.random() * 2 * Math.PI;\n rs.source = {\n x: Math.cos(angle),\n y: Math.sin(angle)\n };\n angle = Math.random() * 2 * Math.PI;\n rs.target = {\n x: Math.cos(angle),\n y: Math.sin(angle)\n };\n }\n var src = _p.source;\n var tgt = _p.target;\n var srcPos = src.position();\n var tgtPos = tgt.position();\n var srcW = src.width();\n var tgtW = tgt.width();\n var srcH = src.height();\n var tgtH = tgt.height();\n var radius = edge.pstyle('haystack-radius').value;\n var halfRadius = radius / 2; // b/c have to half width/height\n\n rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y];\n rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2;\n rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2;\n\n // always override as haystack in case set to different type previously\n rs.edgeType = 'haystack';\n rs.haystack = true;\n this.storeEdgeProjections(edge);\n this.calculateArrowAngles(edge);\n this.recalculateEdgeLabelProjections(edge);\n this.calculateLabelAngles(edge);\n }\n};\nBRp$c.findSegmentsPoints = function (edge, pairInfo) {\n // Segments (multiple straight lines)\n\n var rs = edge._private.rscratch;\n var segmentWs = edge.pstyle('segment-weights');\n var segmentDs = edge.pstyle('segment-distances');\n var segmentRs = edge.pstyle('segment-radii');\n var segmentTs = edge.pstyle('radius-type');\n var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length);\n var lastRadius = segmentRs.pfValue[segmentRs.pfValue.length - 1];\n var lastRadiusType = segmentTs.pfValue[segmentTs.pfValue.length - 1];\n rs.edgeType = 'segments';\n rs.segpts = [];\n rs.radii = [];\n rs.isArcRadius = [];\n for (var s = 0; s < segmentsN; s++) {\n var w = segmentWs.pfValue[s];\n var d = segmentDs.pfValue[s];\n var w1 = 1 - w;\n var w2 = w;\n var _this$findMidptPtsEtc = this.findMidptPtsEtc(edge, pairInfo),\n midptPts = _this$findMidptPtsEtc.midptPts,\n vectorNormInverse = _this$findMidptPtsEtc.vectorNormInverse;\n var adjustedMidpt = {\n x: midptPts.x1 * w1 + midptPts.x2 * w2,\n y: midptPts.y1 * w1 + midptPts.y2 * w2\n };\n rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d);\n rs.radii.push(segmentRs.pfValue[s] !== undefined ? segmentRs.pfValue[s] : lastRadius);\n rs.isArcRadius.push((segmentTs.pfValue[s] !== undefined ? segmentTs.pfValue[s] : lastRadiusType) === 'arc-radius');\n }\n};\nBRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) {\n // Self-edge\n\n var rs = edge._private.rscratch;\n var dirCounts = pairInfo.dirCounts,\n srcPos = pairInfo.srcPos;\n var ctrlptDists = edge.pstyle('control-point-distances');\n var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined;\n var loopDir = edge.pstyle('loop-direction').pfValue;\n var loopSwp = edge.pstyle('loop-sweep').pfValue;\n var stepSize = edge.pstyle('control-point-step-size').pfValue;\n rs.edgeType = 'self';\n var j = i;\n var loopDist = stepSize;\n if (edgeIsUnbundled) {\n j = 0;\n loopDist = ctrlptDist;\n }\n var loopAngle = loopDir - Math.PI / 2;\n var outAngle = loopAngle - loopSwp / 2;\n var inAngle = loopAngle + loopSwp / 2;\n\n // increase by step size for overlapping loops, keyed on direction and sweep values\n var dc = String(loopDir + '_' + loopSwp);\n j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc];\n rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)];\n};\nBRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) {\n // Compound edge\n\n var rs = edge._private.rscratch;\n rs.edgeType = 'compound';\n var srcPos = pairInfo.srcPos,\n tgtPos = pairInfo.tgtPos,\n srcW = pairInfo.srcW,\n srcH = pairInfo.srcH,\n tgtW = pairInfo.tgtW,\n tgtH = pairInfo.tgtH;\n var stepSize = edge.pstyle('control-point-step-size').pfValue;\n var ctrlptDists = edge.pstyle('control-point-distances');\n var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined;\n var j = i;\n var loopDist = stepSize;\n if (edgeIsUnbundled) {\n j = 0;\n loopDist = ctrlptDist;\n }\n var loopW = 50;\n var loopaPos = {\n x: srcPos.x - srcW / 2,\n y: srcPos.y - srcH / 2\n };\n var loopbPos = {\n x: tgtPos.x - tgtW / 2,\n y: tgtPos.y - tgtH / 2\n };\n var loopPos = {\n x: Math.min(loopaPos.x, loopbPos.x),\n y: Math.min(loopaPos.y, loopbPos.y)\n };\n\n // avoids cases with impossible beziers\n var minCompoundStretch = 0.5;\n var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01));\n var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01));\n rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y];\n};\nBRp$c.findStraightEdgePoints = function (edge) {\n // Straight edge within bundle\n\n edge._private.rscratch.edgeType = 'straight';\n};\nBRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) {\n var rs = edge._private.rscratch;\n var stepSize = edge.pstyle('control-point-step-size').pfValue;\n var ctrlptDists = edge.pstyle('control-point-distances');\n var ctrlptWs = edge.pstyle('control-point-weights');\n var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1;\n var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined;\n var ctrlptWeight = ctrlptWs.value[0];\n\n // (Multi)bezier\n\n var multi = edgeIsUnbundled;\n rs.edgeType = multi ? 'multibezier' : 'bezier';\n rs.ctrlpts = [];\n for (var b = 0; b < bezierN; b++) {\n var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1);\n var manctrlptDist = void 0;\n var sign = signum(normctrlptDist);\n if (multi) {\n ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size\n ctrlptWeight = ctrlptWs.value[b];\n }\n if (edgeIsUnbundled) {\n // multi or single unbundled\n manctrlptDist = ctrlptDist;\n } else {\n manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined;\n }\n var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist;\n var w1 = 1 - ctrlptWeight;\n var w2 = ctrlptWeight;\n var _this$findMidptPtsEtc2 = this.findMidptPtsEtc(edge, pairInfo),\n midptPts = _this$findMidptPtsEtc2.midptPts,\n vectorNormInverse = _this$findMidptPtsEtc2.vectorNormInverse;\n var adjustedMidpt = {\n x: midptPts.x1 * w1 + midptPts.x2 * w2,\n y: midptPts.y1 * w1 + midptPts.y2 * w2\n };\n rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint);\n }\n};\nBRp$c.findTaxiPoints = function (edge, pairInfo) {\n // Taxicab geometry with two turns maximum\n\n var rs = edge._private.rscratch;\n rs.edgeType = 'segments';\n var VERTICAL = 'vertical';\n var HORIZONTAL = 'horizontal';\n var LEFTWARD = 'leftward';\n var RIGHTWARD = 'rightward';\n var DOWNWARD = 'downward';\n var UPWARD = 'upward';\n var AUTO = 'auto';\n var posPts = pairInfo.posPts,\n srcW = pairInfo.srcW,\n srcH = pairInfo.srcH,\n tgtW = pairInfo.tgtW,\n tgtH = pairInfo.tgtH;\n var edgeDistances = edge.pstyle('edge-distances').value;\n var dIncludesNodeBody = edgeDistances !== 'node-position';\n var taxiDir = edge.pstyle('taxi-direction').value;\n var rawTaxiDir = taxiDir; // unprocessed value\n var taxiTurn = edge.pstyle('taxi-turn');\n var turnIsPercent = taxiTurn.units === '%';\n var taxiTurnPfVal = taxiTurn.pfValue;\n var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side\n var minD = edge.pstyle('taxi-turn-min-distance').pfValue;\n var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0;\n var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0;\n var pdx = posPts.x2 - posPts.x1;\n var pdy = posPts.y2 - posPts.y1;\n\n // take away the effective w/h from the magnitude of the delta value\n var subDWH = function subDWH(dxy, dwh) {\n if (dxy > 0) {\n return Math.max(dxy - dwh, 0);\n } else {\n return Math.min(dxy + dwh, 0);\n }\n };\n var dx = subDWH(pdx, dw);\n var dy = subDWH(pdy, dh);\n var isExplicitDir = false;\n if (rawTaxiDir === AUTO) {\n taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL;\n } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) {\n taxiDir = VERTICAL;\n isExplicitDir = true;\n } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) {\n taxiDir = HORIZONTAL;\n isExplicitDir = true;\n }\n var isVert = taxiDir === VERTICAL;\n var l = isVert ? dy : dx;\n var pl = isVert ? pdy : pdx;\n var sgnL = signum(pl);\n var forcedDir = false;\n if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction\n && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) {\n sgnL *= -1;\n l = sgnL * Math.abs(l);\n forcedDir = true;\n }\n var d;\n if (turnIsPercent) {\n var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal;\n d = p * l;\n } else {\n var k = taxiTurnPfVal < 0 ? l : 0;\n d = k + taxiTurnPfVal * sgnL;\n }\n var getIsTooClose = function getIsTooClose(d) {\n return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l);\n };\n var isTooCloseSrc = getIsTooClose(d);\n var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d));\n var isTooClose = isTooCloseSrc || isTooCloseTgt;\n if (isTooClose && !forcedDir) {\n // non-ideal routing\n if (isVert) {\n // vertical fallbacks\n var lShapeInsideSrc = Math.abs(pl) <= srcH / 2;\n var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2;\n if (lShapeInsideSrc) {\n // horizontal Z-shape (direction not respected)\n var x = (posPts.x1 + posPts.x2) / 2;\n var y1 = posPts.y1,\n y2 = posPts.y2;\n rs.segpts = [x, y1, x, y2];\n } else if (lShapeInsideTgt) {\n // vertical Z-shape (distance not respected)\n var y = (posPts.y1 + posPts.y2) / 2;\n var x1 = posPts.x1,\n x2 = posPts.x2;\n rs.segpts = [x1, y, x2, y];\n } else {\n // L-shape fallback (turn distance not respected, but works well with tree siblings)\n rs.segpts = [posPts.x1, posPts.y2];\n }\n } else {\n // horizontal fallbacks\n var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2;\n var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2;\n if (_lShapeInsideSrc) {\n // vertical Z-shape (direction not respected)\n var _y = (posPts.y1 + posPts.y2) / 2;\n var _x = posPts.x1,\n _x2 = posPts.x2;\n rs.segpts = [_x, _y, _x2, _y];\n } else if (_lShapeInsideTgt) {\n // horizontal Z-shape (turn distance not respected)\n var _x3 = (posPts.x1 + posPts.x2) / 2;\n var _y2 = posPts.y1,\n _y3 = posPts.y2;\n rs.segpts = [_x3, _y2, _x3, _y3];\n } else {\n // L-shape (turn distance not respected, but works well for tree siblings)\n rs.segpts = [posPts.x2, posPts.y1];\n }\n }\n } else {\n // ideal routing\n if (isVert) {\n var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0);\n var _x4 = posPts.x1,\n _x5 = posPts.x2;\n rs.segpts = [_x4, _y4, _x5, _y4];\n } else {\n // horizontal\n var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0);\n var _y5 = posPts.y1,\n _y6 = posPts.y2;\n rs.segpts = [_x6, _y5, _x6, _y6];\n }\n }\n if (rs.isRound) {\n var radius = edge.pstyle('taxi-radius').value;\n var isArcRadius = edge.pstyle('radius-type').value[0] === 'arc-radius';\n rs.radii = new Array(rs.segpts.length / 2).fill(radius);\n rs.isArcRadius = new Array(rs.segpts.length / 2).fill(isArcRadius);\n }\n};\nBRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) {\n var rs = edge._private.rscratch;\n\n // can only correct beziers for now...\n if (rs.edgeType === 'bezier') {\n var srcPos = pairInfo.srcPos,\n tgtPos = pairInfo.tgtPos,\n srcW = pairInfo.srcW,\n srcH = pairInfo.srcH,\n tgtW = pairInfo.tgtW,\n tgtH = pairInfo.tgtH,\n srcShape = pairInfo.srcShape,\n tgtShape = pairInfo.tgtShape,\n srcCornerRadius = pairInfo.srcCornerRadius,\n tgtCornerRadius = pairInfo.tgtCornerRadius,\n srcRs = pairInfo.srcRs,\n tgtRs = pairInfo.tgtRs;\n var badStart = !number$1(rs.startX) || !number$1(rs.startY);\n var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY);\n var badEnd = !number$1(rs.endX) || !number$1(rs.endY);\n var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY);\n var minCpADistFactor = 3;\n var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth;\n var minCpADist = minCpADistFactor * arrowW;\n var startACpDist = dist({\n x: rs.ctrlpts[0],\n y: rs.ctrlpts[1]\n }, {\n x: rs.startX,\n y: rs.startY\n });\n var closeStartACp = startACpDist < minCpADist;\n var endACpDist = dist({\n x: rs.ctrlpts[0],\n y: rs.ctrlpts[1]\n }, {\n x: rs.endX,\n y: rs.endY\n });\n var closeEndACp = endACpDist < minCpADist;\n var overlapping = false;\n if (badStart || badAStart || closeStartACp) {\n overlapping = true;\n\n // project control point along line from src centre to outside the src shape\n // (otherwise intersection will yield nothing)\n var cpD = {\n // delta\n x: rs.ctrlpts[0] - srcPos.x,\n y: rs.ctrlpts[1] - srcPos.y\n };\n var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line\n var cpM = {\n // normalised delta\n x: cpD.x / cpL,\n y: cpD.y / cpL\n };\n var radius = Math.max(srcW, srcH);\n var cpProj = {\n // *2 radius guarantees outside shape\n x: rs.ctrlpts[0] + cpM.x * 2 * radius,\n y: rs.ctrlpts[1] + cpM.y * 2 * radius\n };\n var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0, srcCornerRadius, srcRs);\n if (closeStartACp) {\n rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist);\n rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist);\n } else {\n rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist;\n rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist;\n }\n }\n if (badEnd || badAEnd || closeEndACp) {\n overlapping = true;\n\n // project control point along line from tgt centre to outside the tgt shape\n // (otherwise intersection will yield nothing)\n var _cpD = {\n // delta\n x: rs.ctrlpts[0] - tgtPos.x,\n y: rs.ctrlpts[1] - tgtPos.y\n };\n var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line\n var _cpM = {\n // normalised delta\n x: _cpD.x / _cpL,\n y: _cpD.y / _cpL\n };\n var _radius = Math.max(srcW, srcH);\n var _cpProj = {\n // *2 radius guarantees outside shape\n x: rs.ctrlpts[0] + _cpM.x * 2 * _radius,\n y: rs.ctrlpts[1] + _cpM.y * 2 * _radius\n };\n var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0, tgtCornerRadius, tgtRs);\n if (closeEndACp) {\n rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist);\n rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist);\n } else {\n rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist;\n rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist;\n }\n }\n if (overlapping) {\n // recalc endpts\n this.findEndpoints(edge);\n }\n }\n};\nBRp$c.storeAllpts = function (edge) {\n var rs = edge._private.rscratch;\n if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') {\n rs.allpts = [];\n rs.allpts.push(rs.startX, rs.startY);\n for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) {\n // ctrl pt itself\n rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]);\n\n // the midpt between ctrlpts as intermediate destination pts\n if (b + 3 < rs.ctrlpts.length) {\n rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2);\n }\n }\n rs.allpts.push(rs.endX, rs.endY);\n var m, mt;\n if (rs.ctrlpts.length / 2 % 2 === 0) {\n m = rs.allpts.length / 2 - 1;\n rs.midX = rs.allpts[m];\n rs.midY = rs.allpts[m + 1];\n } else {\n m = rs.allpts.length / 2 - 3;\n mt = 0.5;\n rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt);\n rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt);\n }\n } else if (rs.edgeType === 'straight') {\n // need to calc these after endpts\n rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY];\n\n // default midpt for labels etc\n rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4;\n rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4;\n } else if (rs.edgeType === 'segments') {\n rs.allpts = [];\n rs.allpts.push(rs.startX, rs.startY);\n rs.allpts.push.apply(rs.allpts, rs.segpts);\n rs.allpts.push(rs.endX, rs.endY);\n if (rs.isRound) {\n rs.roundCorners = [];\n for (var i = 2; i + 3 < rs.allpts.length; i += 2) {\n var radius = rs.radii[i / 2 - 1];\n var isArcRadius = rs.isArcRadius[i / 2 - 1];\n rs.roundCorners.push(getRoundCorner({\n x: rs.allpts[i - 2],\n y: rs.allpts[i - 1]\n }, {\n x: rs.allpts[i],\n y: rs.allpts[i + 1],\n radius: radius\n }, {\n x: rs.allpts[i + 2],\n y: rs.allpts[i + 3]\n }, radius, isArcRadius));\n }\n }\n if (rs.segpts.length % 4 === 0) {\n var i2 = rs.segpts.length / 2;\n var i1 = i2 - 2;\n rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2;\n rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2;\n } else {\n var _i = rs.segpts.length / 2 - 1;\n if (!rs.isRound) {\n rs.midX = rs.segpts[_i];\n rs.midY = rs.segpts[_i + 1];\n } else {\n var point = {\n x: rs.segpts[_i],\n y: rs.segpts[_i + 1]\n };\n var corner = rs.roundCorners[_i / 2];\n var v = [point.x - corner.cx, point.y - corner.cy];\n var factor = corner.radius / Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n v = v.map(function (c) {\n return c * factor;\n });\n rs.midX = corner.cx + v[0];\n rs.midY = corner.cy + v[1];\n rs.midVector = v;\n }\n }\n }\n};\nBRp$c.checkForInvalidEdgeWarning = function (edge) {\n var rs = edge[0]._private.rscratch;\n if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) {\n rs.loggedErr = false;\n } else {\n if (!rs.loggedErr) {\n rs.loggedErr = true;\n warn('Edge `' + edge.id() + '` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.');\n }\n }\n};\nBRp$c.findEdgeControlPoints = function (edges) {\n var _this = this;\n if (!edges || edges.length === 0) {\n return;\n }\n var r = this;\n var cy = r.cy;\n var hasCompounds = cy.hasCompoundNodes();\n var hashTable = {\n map: new Map$2(),\n get: function get(pairId) {\n var map2 = this.map.get(pairId[0]);\n if (map2 != null) {\n return map2.get(pairId[1]);\n } else {\n return null;\n }\n },\n set: function set(pairId, val) {\n var map2 = this.map.get(pairId[0]);\n if (map2 == null) {\n map2 = new Map$2();\n this.map.set(pairId[0], map2);\n }\n map2.set(pairId[1], val);\n }\n };\n var pairIds = [];\n var haystackEdges = [];\n\n // create a table of edge (src, tgt) => list of edges between them\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var _p = edge._private;\n var curveStyle = edge.pstyle('curve-style').value;\n\n // ignore edges who are not to be displayed\n // they shouldn't take up space\n if (edge.removed() || !edge.takesUpSpace()) {\n continue;\n }\n if (curveStyle === 'haystack') {\n haystackEdges.push(edge);\n continue;\n }\n var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle.endsWith('segments') || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle.endsWith('taxi');\n var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier';\n var src = _p.source;\n var tgt = _p.target;\n var srcIndex = src.poolIndex();\n var tgtIndex = tgt.poolIndex();\n var pairId = [srcIndex, tgtIndex].sort();\n var tableEntry = hashTable.get(pairId);\n if (tableEntry == null) {\n tableEntry = {\n eles: []\n };\n hashTable.set(pairId, tableEntry);\n pairIds.push(pairId);\n }\n tableEntry.eles.push(edge);\n if (edgeIsUnbundled) {\n tableEntry.hasUnbundled = true;\n }\n if (edgeIsBezier) {\n tableEntry.hasBezier = true;\n }\n }\n\n // for each pair (src, tgt), create the ctrl pts\n // Nested for loop is OK; total number of iterations for both loops = edgeCount\n var _loop = function _loop(p) {\n var pairId = pairIds[p];\n var pairInfo = hashTable.get(pairId);\n var swappedpairInfo = void 0;\n if (!pairInfo.hasUnbundled) {\n var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) {\n return e.isBundledBezier();\n });\n clearArray(pairInfo.eles);\n pllEdges.forEach(function (edge) {\n return pairInfo.eles.push(edge);\n });\n\n // for each pair id, the edges should be sorted by index\n pairInfo.eles.sort(function (edge1, edge2) {\n return edge1.poolIndex() - edge2.poolIndex();\n });\n }\n var firstEdge = pairInfo.eles[0];\n var src = firstEdge.source();\n var tgt = firstEdge.target();\n\n // make sure src/tgt distinction is consistent w.r.t. pairId\n if (src.poolIndex() > tgt.poolIndex()) {\n var temp = src;\n src = tgt;\n tgt = temp;\n }\n var srcPos = pairInfo.srcPos = src.position();\n var tgtPos = pairInfo.tgtPos = tgt.position();\n var srcW = pairInfo.srcW = src.outerWidth();\n var srcH = pairInfo.srcH = src.outerHeight();\n var tgtW = pairInfo.tgtW = tgt.outerWidth();\n var tgtH = pairInfo.tgtH = tgt.outerHeight();\n var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)];\n var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)];\n var srcCornerRadius = pairInfo.srcCornerRadius = src.pstyle('corner-radius').value === 'auto' ? 'auto' : src.pstyle('corner-radius').pfValue;\n var tgtCornerRadius = pairInfo.tgtCornerRadius = tgt.pstyle('corner-radius').value === 'auto' ? 'auto' : tgt.pstyle('corner-radius').pfValue;\n var tgtRs = pairInfo.tgtRs = tgt._private.rscratch;\n var srcRs = pairInfo.srcRs = src._private.rscratch;\n pairInfo.dirCounts = {\n 'north': 0,\n 'west': 0,\n 'south': 0,\n 'east': 0,\n 'northwest': 0,\n 'southwest': 0,\n 'northeast': 0,\n 'southeast': 0\n };\n for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) {\n var _edge = pairInfo.eles[_i2];\n var rs = _edge[0]._private.rscratch;\n var _curveStyle = _edge.pstyle('curve-style').value;\n var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle.endsWith('segments') || _curveStyle.endsWith('taxi');\n\n // whether the normalised pair order is the reverse of the edge's src-tgt order\n var edgeIsSwapped = !src.same(_edge.source());\n if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) {\n pairInfo.calculatedIntersection = true;\n\n // pt outside src shape to calc distance/displacement from src to tgt\n var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0, srcCornerRadius, srcRs);\n var srcIntn = pairInfo.srcIntn = srcOutside;\n\n // pt outside tgt shape to calc distance/displacement from src to tgt\n var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0, tgtCornerRadius, tgtRs);\n var tgtIntn = pairInfo.tgtIntn = tgtOutside;\n var intersectionPts = pairInfo.intersectionPts = {\n x1: srcOutside[0],\n x2: tgtOutside[0],\n y1: srcOutside[1],\n y2: tgtOutside[1]\n };\n var posPts = pairInfo.posPts = {\n x1: srcPos.x,\n x2: tgtPos.x,\n y1: srcPos.y,\n y2: tgtPos.y\n };\n var dy = tgtOutside[1] - srcOutside[1];\n var dx = tgtOutside[0] - srcOutside[0];\n var l = Math.sqrt(dx * dx + dy * dy);\n var vector = pairInfo.vector = {\n x: dx,\n y: dy\n };\n var vectorNorm = pairInfo.vectorNorm = {\n x: vector.x / l,\n y: vector.y / l\n };\n var vectorNormInverse = {\n x: -vectorNorm.y,\n y: vectorNorm.x\n };\n\n // if node shapes overlap, then no ctrl pts to draw\n pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y, tgtCornerRadius, tgtRs) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y, srcCornerRadius, srcRs);\n pairInfo.vectorNormInverse = vectorNormInverse;\n swappedpairInfo = {\n nodesOverlap: pairInfo.nodesOverlap,\n dirCounts: pairInfo.dirCounts,\n calculatedIntersection: true,\n hasBezier: pairInfo.hasBezier,\n hasUnbundled: pairInfo.hasUnbundled,\n eles: pairInfo.eles,\n srcPos: tgtPos,\n tgtPos: srcPos,\n srcW: tgtW,\n srcH: tgtH,\n tgtW: srcW,\n tgtH: srcH,\n srcIntn: tgtIntn,\n tgtIntn: srcIntn,\n srcShape: tgtShape,\n tgtShape: srcShape,\n posPts: {\n x1: posPts.x2,\n y1: posPts.y2,\n x2: posPts.x1,\n y2: posPts.y1\n },\n intersectionPts: {\n x1: intersectionPts.x2,\n y1: intersectionPts.y2,\n x2: intersectionPts.x1,\n y2: intersectionPts.y1\n },\n vector: {\n x: -vector.x,\n y: -vector.y\n },\n vectorNorm: {\n x: -vectorNorm.x,\n y: -vectorNorm.y\n },\n vectorNormInverse: {\n x: -vectorNormInverse.x,\n y: -vectorNormInverse.y\n }\n };\n }\n var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo;\n rs.nodesOverlap = passedPairInfo.nodesOverlap;\n rs.srcIntn = passedPairInfo.srcIntn;\n rs.tgtIntn = passedPairInfo.tgtIntn;\n rs.isRound = _curveStyle.startsWith('round');\n if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) {\n _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled);\n } else if (src === tgt) {\n _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled);\n } else if (_curveStyle.endsWith('segments')) {\n _this.findSegmentsPoints(_edge, passedPairInfo);\n } else if (_curveStyle.endsWith('taxi')) {\n _this.findTaxiPoints(_edge, passedPairInfo);\n } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) {\n _this.findStraightEdgePoints(_edge);\n } else {\n _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped);\n }\n _this.findEndpoints(_edge);\n _this.tryToCorrectInvalidPoints(_edge, passedPairInfo);\n _this.checkForInvalidEdgeWarning(_edge);\n _this.storeAllpts(_edge);\n _this.storeEdgeProjections(_edge);\n _this.calculateArrowAngles(_edge);\n _this.recalculateEdgeLabelProjections(_edge);\n _this.calculateLabelAngles(_edge);\n } // for pair edges\n };\n for (var p = 0; p < pairIds.length; p++) {\n _loop(p);\n } // for pair ids\n\n // haystacks avoid the expense of pairInfo stuff (intersections etc.)\n this.findHaystackPoints(haystackEdges);\n};\nfunction getPts(pts) {\n var retPts = [];\n if (pts == null) {\n return;\n }\n for (var i = 0; i < pts.length; i += 2) {\n var x = pts[i];\n var y = pts[i + 1];\n retPts.push({\n x: x,\n y: y\n });\n }\n return retPts;\n}\nBRp$c.getSegmentPoints = function (edge) {\n var rs = edge[0]._private.rscratch;\n var type = rs.edgeType;\n if (type === 'segments') {\n this.recalculateRenderedStyle(edge);\n return getPts(rs.segpts);\n }\n};\nBRp$c.getControlPoints = function (edge) {\n var rs = edge[0]._private.rscratch;\n var type = rs.edgeType;\n if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') {\n this.recalculateRenderedStyle(edge);\n return getPts(rs.ctrlpts);\n }\n};\nBRp$c.getEdgeMidpoint = function (edge) {\n var rs = edge[0]._private.rscratch;\n this.recalculateRenderedStyle(edge);\n return {\n x: rs.midX,\n y: rs.midY\n };\n};\n\nvar BRp$b = {};\nBRp$b.manualEndptToPx = function (node, prop) {\n var r = this;\n var npos = node.position();\n var w = node.outerWidth();\n var h = node.outerHeight();\n var rs = node._private.rscratch;\n if (prop.value.length === 2) {\n var p = [prop.pfValue[0], prop.pfValue[1]];\n if (prop.units[0] === '%') {\n p[0] = p[0] * w;\n }\n if (prop.units[1] === '%') {\n p[1] = p[1] * h;\n }\n p[0] += npos.x;\n p[1] += npos.y;\n return p;\n } else {\n var angle = prop.pfValue[0];\n angle = -Math.PI / 2 + angle; // start at 12 o'clock\n\n var l = 2 * Math.max(w, h);\n var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l];\n return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0, node.pstyle('corner-radius').value === 'auto' ? 'auto' : node.pstyle('corner-radius').pfValue, rs);\n }\n};\nBRp$b.findEndpoints = function (edge) {\n var r = this;\n var intersect;\n var source = edge.source()[0];\n var target = edge.target()[0];\n var srcPos = source.position();\n var tgtPos = target.position();\n var tgtArShape = edge.pstyle('target-arrow-shape').value;\n var srcArShape = edge.pstyle('source-arrow-shape').value;\n var tgtDist = edge.pstyle('target-distance-from-node').pfValue;\n var srcDist = edge.pstyle('source-distance-from-node').pfValue;\n var srcRs = source._private.rscratch;\n var tgtRs = target._private.rscratch;\n var curveStyle = edge.pstyle('curve-style').value;\n var rs = edge._private.rscratch;\n var et = rs.edgeType;\n var taxi = curveStyle === 'taxi';\n var self = et === 'self' || et === 'compound';\n var bezier = et === 'bezier' || et === 'multibezier' || self;\n var multi = et !== 'bezier';\n var lines = et === 'straight' || et === 'segments';\n var segments = et === 'segments';\n var hasEndpts = bezier || multi || lines;\n var overrideEndpts = self || taxi;\n var srcManEndpt = edge.pstyle('source-endpoint');\n var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value;\n var srcCornerRadius = source.pstyle('corner-radius').value === 'auto' ? 'auto' : source.pstyle('corner-radius').pfValue;\n var tgtManEndpt = edge.pstyle('target-endpoint');\n var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value;\n var tgtCornerRadius = target.pstyle('corner-radius').value === 'auto' ? 'auto' : target.pstyle('corner-radius').pfValue;\n rs.srcManEndpt = srcManEndpt;\n rs.tgtManEndpt = tgtManEndpt;\n var p1; // last known point of edge on target side\n var p2; // last known point of edge on source side\n\n var p1_i; // point to intersect with target shape\n var p2_i; // point to intersect with source shape\n\n if (bezier) {\n var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]];\n var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart;\n p1 = cpEnd;\n p2 = cpStart;\n } else if (lines) {\n var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2);\n var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2);\n p1 = tgtArrowFromPt;\n p2 = srcArrowFromPt;\n }\n if (tgtManEndptVal === 'inside-to-node') {\n intersect = [tgtPos.x, tgtPos.y];\n } else if (tgtManEndpt.units) {\n intersect = this.manualEndptToPx(target, tgtManEndpt);\n } else if (tgtManEndptVal === 'outside-to-line') {\n intersect = rs.tgtIntn; // use cached value from ctrlpt calc\n } else {\n if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') {\n p1_i = p1;\n } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') {\n p1_i = [srcPos.x, srcPos.y];\n }\n intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0, tgtCornerRadius, tgtRs);\n if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') {\n var trs = target._private.rscratch;\n var lw = trs.labelWidth;\n var lh = trs.labelHeight;\n var lx = trs.labelX;\n var ly = trs.labelY;\n var lw2 = lw / 2;\n var lh2 = lh / 2;\n var va = target.pstyle('text-valign').value;\n if (va === 'top') {\n ly -= lh2;\n } else if (va === 'bottom') {\n ly += lh2;\n }\n var ha = target.pstyle('text-halign').value;\n if (ha === 'left') {\n lx -= lw2;\n } else if (ha === 'right') {\n lx += lw2;\n }\n var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y);\n if (labelIntersect.length > 0) {\n var refPt = srcPos;\n var intSqdist = sqdist(refPt, array2point(intersect));\n var labIntSqdist = sqdist(refPt, array2point(labelIntersect));\n var minSqDist = intSqdist;\n if (labIntSqdist < intSqdist) {\n intersect = labelIntersect;\n minSqDist = labIntSqdist;\n }\n if (labelIntersect.length > 2) {\n var labInt2SqDist = sqdist(refPt, {\n x: labelIntersect[2],\n y: labelIntersect[3]\n });\n if (labInt2SqDist < minSqDist) {\n intersect = [labelIntersect[2], labelIntersect[3]];\n }\n }\n }\n }\n }\n var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist);\n var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist);\n rs.endX = edgeEnd[0];\n rs.endY = edgeEnd[1];\n rs.arrowEndX = arrowEnd[0];\n rs.arrowEndY = arrowEnd[1];\n if (srcManEndptVal === 'inside-to-node') {\n intersect = [srcPos.x, srcPos.y];\n } else if (srcManEndpt.units) {\n intersect = this.manualEndptToPx(source, srcManEndpt);\n } else if (srcManEndptVal === 'outside-to-line') {\n intersect = rs.srcIntn; // use cached value from ctrlpt calc\n } else {\n if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') {\n p2_i = p2;\n } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') {\n p2_i = [tgtPos.x, tgtPos.y];\n }\n intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0, srcCornerRadius, srcRs);\n if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') {\n var srs = source._private.rscratch;\n var _lw = srs.labelWidth;\n var _lh = srs.labelHeight;\n var _lx = srs.labelX;\n var _ly = srs.labelY;\n var _lw2 = _lw / 2;\n var _lh2 = _lh / 2;\n var _va = source.pstyle('text-valign').value;\n if (_va === 'top') {\n _ly -= _lh2;\n } else if (_va === 'bottom') {\n _ly += _lh2;\n }\n var _ha = source.pstyle('text-halign').value;\n if (_ha === 'left') {\n _lx -= _lw2;\n } else if (_ha === 'right') {\n _lx += _lw2;\n }\n var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y);\n if (_labelIntersect.length > 0) {\n var _refPt = tgtPos;\n var _intSqdist = sqdist(_refPt, array2point(intersect));\n var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect));\n var _minSqDist = _intSqdist;\n if (_labIntSqdist < _intSqdist) {\n intersect = [_labelIntersect[0], _labelIntersect[1]];\n _minSqDist = _labIntSqdist;\n }\n if (_labelIntersect.length > 2) {\n var _labInt2SqDist = sqdist(_refPt, {\n x: _labelIntersect[2],\n y: _labelIntersect[3]\n });\n if (_labInt2SqDist < _minSqDist) {\n intersect = [_labelIntersect[2], _labelIntersect[3]];\n }\n }\n }\n }\n }\n var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist);\n var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist);\n rs.startX = edgeStart[0];\n rs.startY = edgeStart[1];\n rs.arrowStartX = arrowStart[0];\n rs.arrowStartY = arrowStart[1];\n if (hasEndpts) {\n if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) {\n rs.badLine = true;\n } else {\n rs.badLine = false;\n }\n }\n};\nBRp$b.getSourceEndpoint = function (edge) {\n var rs = edge[0]._private.rscratch;\n this.recalculateRenderedStyle(edge);\n switch (rs.edgeType) {\n case 'haystack':\n return {\n x: rs.haystackPts[0],\n y: rs.haystackPts[1]\n };\n default:\n return {\n x: rs.arrowStartX,\n y: rs.arrowStartY\n };\n }\n};\nBRp$b.getTargetEndpoint = function (edge) {\n var rs = edge[0]._private.rscratch;\n this.recalculateRenderedStyle(edge);\n switch (rs.edgeType) {\n case 'haystack':\n return {\n x: rs.haystackPts[2],\n y: rs.haystackPts[3]\n };\n default:\n return {\n x: rs.arrowEndX,\n y: rs.arrowEndY\n };\n }\n};\n\nvar BRp$a = {};\nfunction pushBezierPts(r, edge, pts) {\n var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) {\n return qbezierAt(p1, p2, p3, t);\n };\n var _p = edge._private;\n var bpts = _p.rstyle.bezierPts;\n for (var i = 0; i < r.bezierProjPcts.length; i++) {\n var p = r.bezierProjPcts[i];\n bpts.push({\n x: qbezierAt$1(pts[0], pts[2], pts[4], p),\n y: qbezierAt$1(pts[1], pts[3], pts[5], p)\n });\n }\n}\nBRp$a.storeEdgeProjections = function (edge) {\n var _p = edge._private;\n var rs = _p.rscratch;\n var et = rs.edgeType;\n\n // clear the cached points state\n _p.rstyle.bezierPts = null;\n _p.rstyle.linePts = null;\n _p.rstyle.haystackPts = null;\n if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') {\n _p.rstyle.bezierPts = [];\n for (var i = 0; i + 5 < rs.allpts.length; i += 4) {\n pushBezierPts(this, edge, rs.allpts.slice(i, i + 6));\n }\n } else if (et === 'segments') {\n var lpts = _p.rstyle.linePts = [];\n for (var i = 0; i + 1 < rs.allpts.length; i += 2) {\n lpts.push({\n x: rs.allpts[i],\n y: rs.allpts[i + 1]\n });\n }\n } else if (et === 'haystack') {\n var hpts = rs.haystackPts;\n _p.rstyle.haystackPts = [{\n x: hpts[0],\n y: hpts[1]\n }, {\n x: hpts[2],\n y: hpts[3]\n }];\n }\n _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth;\n};\nBRp$a.recalculateEdgeProjections = function (edges) {\n this.findEdgeControlPoints(edges);\n};\n\nvar BRp$9 = {};\nBRp$9.recalculateNodeLabelProjection = function (node) {\n var content = node.pstyle('label').strValue;\n if (emptyString(content)) {\n return;\n }\n var textX, textY;\n var _p = node._private;\n var nodeWidth = node.width();\n var nodeHeight = node.height();\n var padding = node.padding();\n var nodePos = node.position();\n var textHalign = node.pstyle('text-halign').strValue;\n var textValign = node.pstyle('text-valign').strValue;\n var rs = _p.rscratch;\n var rstyle = _p.rstyle;\n switch (textHalign) {\n case 'left':\n textX = nodePos.x - nodeWidth / 2 - padding;\n break;\n case 'right':\n textX = nodePos.x + nodeWidth / 2 + padding;\n break;\n default:\n // e.g. center\n textX = nodePos.x;\n }\n switch (textValign) {\n case 'top':\n textY = nodePos.y - nodeHeight / 2 - padding;\n break;\n case 'bottom':\n textY = nodePos.y + nodeHeight / 2 + padding;\n break;\n default:\n // e.g. middle\n textY = nodePos.y;\n }\n rs.labelX = textX;\n rs.labelY = textY;\n rstyle.labelX = textX;\n rstyle.labelY = textY;\n this.calculateLabelAngles(node);\n this.applyLabelDimensions(node);\n};\nvar lineAngleFromDelta = function lineAngleFromDelta(dx, dy) {\n var angle = Math.atan(dy / dx);\n if (dx === 0 && angle < 0) {\n angle = angle * -1;\n }\n return angle;\n};\nvar lineAngle = function lineAngle(p0, p1) {\n var dx = p1.x - p0.x;\n var dy = p1.y - p0.y;\n return lineAngleFromDelta(dx, dy);\n};\nvar bezierAngle = function bezierAngle(p0, p1, p2, t) {\n var t0 = bound(0, t - 0.001, 1);\n var t1 = bound(0, t + 0.001, 1);\n var lp0 = qbezierPtAt(p0, p1, p2, t0);\n var lp1 = qbezierPtAt(p0, p1, p2, t1);\n return lineAngle(lp0, lp1);\n};\nBRp$9.recalculateEdgeLabelProjections = function (edge) {\n var p;\n var _p = edge._private;\n var rs = _p.rscratch;\n var r = this;\n var content = {\n mid: edge.pstyle('label').strValue,\n source: edge.pstyle('source-label').strValue,\n target: edge.pstyle('target-label').strValue\n };\n if (content.mid || content.source || content.target) ; else {\n return; // no labels => no calcs\n }\n\n // add center point to style so bounding box calculations can use it\n //\n p = {\n x: rs.midX,\n y: rs.midY\n };\n var setRs = function setRs(propName, prefix, value) {\n setPrefixedProperty(_p.rscratch, propName, prefix, value);\n setPrefixedProperty(_p.rstyle, propName, prefix, value);\n };\n setRs('labelX', null, p.x);\n setRs('labelY', null, p.y);\n var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY);\n setRs('labelAutoAngle', null, midAngle);\n var createControlPointInfo = function createControlPointInfo() {\n if (createControlPointInfo.cache) {\n return createControlPointInfo.cache;\n } // use cache so only 1x per edge\n\n var ctrlpts = [];\n\n // store each ctrlpt info init\n for (var i = 0; i + 5 < rs.allpts.length; i += 4) {\n var p0 = {\n x: rs.allpts[i],\n y: rs.allpts[i + 1]\n };\n var p1 = {\n x: rs.allpts[i + 2],\n y: rs.allpts[i + 3]\n }; // ctrlpt\n var p2 = {\n x: rs.allpts[i + 4],\n y: rs.allpts[i + 5]\n };\n ctrlpts.push({\n p0: p0,\n p1: p1,\n p2: p2,\n startDist: 0,\n length: 0,\n segments: []\n });\n }\n var bpts = _p.rstyle.bezierPts;\n var nProjs = r.bezierProjPcts.length;\n function addSegment(cp, p0, p1, t0, t1) {\n var length = dist(p0, p1);\n var prevSegment = cp.segments[cp.segments.length - 1];\n var segment = {\n p0: p0,\n p1: p1,\n t0: t0,\n t1: t1,\n startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0,\n length: length\n };\n cp.segments.push(segment);\n cp.length += length;\n }\n\n // update each ctrlpt with segment info\n for (var _i = 0; _i < ctrlpts.length; _i++) {\n var cp = ctrlpts[_i];\n var prevCp = ctrlpts[_i - 1];\n if (prevCp) {\n cp.startDist = prevCp.startDist + prevCp.length;\n }\n addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first\n\n for (var j = 0; j < nProjs - 1; j++) {\n addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]);\n }\n addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last\n }\n\n return createControlPointInfo.cache = ctrlpts;\n };\n var calculateEndProjection = function calculateEndProjection(prefix) {\n var angle;\n var isSrc = prefix === 'source';\n if (!content[prefix]) {\n return;\n }\n var offset = edge.pstyle(prefix + '-text-offset').pfValue;\n switch (rs.edgeType) {\n case 'self':\n case 'compound':\n case 'bezier':\n case 'multibezier':\n {\n var cps = createControlPointInfo();\n var selected;\n var startDist = 0;\n var totalDist = 0;\n\n // find the segment we're on\n for (var i = 0; i < cps.length; i++) {\n var _cp = cps[isSrc ? i : cps.length - 1 - i];\n for (var j = 0; j < _cp.segments.length; j++) {\n var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j];\n var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1;\n startDist = totalDist;\n totalDist += _seg.length;\n if (totalDist >= offset || lastSeg) {\n selected = {\n cp: _cp,\n segment: _seg\n };\n break;\n }\n }\n if (selected) {\n break;\n }\n }\n var cp = selected.cp;\n var seg = selected.segment;\n var tSegment = (offset - startDist) / seg.length;\n var segDt = seg.t1 - seg.t0;\n var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment;\n t = bound(0, t, 1);\n p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t);\n angle = bezierAngle(cp.p0, cp.p1, cp.p2, t);\n break;\n }\n case 'straight':\n case 'segments':\n case 'haystack':\n {\n var d = 0,\n di,\n d0;\n var p0, p1;\n var l = rs.allpts.length;\n for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) {\n if (isSrc) {\n p0 = {\n x: rs.allpts[_i2],\n y: rs.allpts[_i2 + 1]\n };\n p1 = {\n x: rs.allpts[_i2 + 2],\n y: rs.allpts[_i2 + 3]\n };\n } else {\n p0 = {\n x: rs.allpts[l - 2 - _i2],\n y: rs.allpts[l - 1 - _i2]\n };\n p1 = {\n x: rs.allpts[l - 4 - _i2],\n y: rs.allpts[l - 3 - _i2]\n };\n }\n di = dist(p0, p1);\n d0 = d;\n d += di;\n if (d >= offset) {\n break;\n }\n }\n var pD = offset - d0;\n var _t = pD / di;\n _t = bound(0, _t, 1);\n p = lineAt(p0, p1, _t);\n angle = lineAngle(p0, p1);\n break;\n }\n }\n setRs('labelX', prefix, p.x);\n setRs('labelY', prefix, p.y);\n setRs('labelAutoAngle', prefix, angle);\n };\n calculateEndProjection('source');\n calculateEndProjection('target');\n this.applyLabelDimensions(edge);\n};\nBRp$9.applyLabelDimensions = function (ele) {\n this.applyPrefixedLabelDimensions(ele);\n if (ele.isEdge()) {\n this.applyPrefixedLabelDimensions(ele, 'source');\n this.applyPrefixedLabelDimensions(ele, 'target');\n }\n};\nBRp$9.applyPrefixedLabelDimensions = function (ele, prefix) {\n var _p = ele._private;\n var text = this.getLabelText(ele, prefix);\n var labelDims = this.calculateLabelDimensions(ele, text);\n var lineHeight = ele.pstyle('line-height').pfValue;\n var textWrap = ele.pstyle('text-wrap').strValue;\n var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || [];\n var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1);\n var normPerLineHeight = labelDims.height / numLines;\n var labelLineHeight = normPerLineHeight * lineHeight;\n var width = labelDims.width;\n var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight;\n setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width);\n setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width);\n setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height);\n setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height);\n setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight);\n};\nBRp$9.getLabelText = function (ele, prefix) {\n var _p = ele._private;\n var pfd = prefix ? prefix + '-' : '';\n var text = ele.pstyle(pfd + 'label').strValue;\n var textTransform = ele.pstyle('text-transform').value;\n var rscratch = function rscratch(propName, value) {\n if (value) {\n setPrefixedProperty(_p.rscratch, propName, prefix, value);\n return value;\n } else {\n return getPrefixedProperty(_p.rscratch, propName, prefix);\n }\n };\n\n // for empty text, skip all processing\n if (!text) {\n return '';\n }\n if (textTransform == 'none') ; else if (textTransform == 'uppercase') {\n text = text.toUpperCase();\n } else if (textTransform == 'lowercase') {\n text = text.toLowerCase();\n }\n var wrapStyle = ele.pstyle('text-wrap').value;\n if (wrapStyle === 'wrap') {\n var labelKey = rscratch('labelKey');\n\n // save recalc if the label is the same as before\n if (labelKey != null && rscratch('labelWrapKey') === labelKey) {\n return rscratch('labelWrapCachedText');\n }\n var zwsp = \"\\u200B\";\n var lines = text.split('\\n');\n var maxW = ele.pstyle('text-max-width').pfValue;\n var overflow = ele.pstyle('text-overflow-wrap').value;\n var overflowAny = overflow === 'anywhere';\n var wrappedLines = [];\n var separatorRegex = /[\\s\\u200b]+|$/g; // Include end of string to add last word\n\n for (var l = 0; l < lines.length; l++) {\n var line = lines[l];\n var lineDims = this.calculateLabelDimensions(ele, line);\n var lineW = lineDims.width;\n if (overflowAny) {\n var processedLine = line.split('').join(zwsp);\n line = processedLine;\n }\n if (lineW > maxW) {\n // line is too long\n var separatorMatches = line.matchAll(separatorRegex);\n var subline = '';\n var previousIndex = 0;\n // Add fake match\n var _iterator = _createForOfIteratorHelper(separatorMatches),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var separatorMatch = _step.value;\n var wordSeparator = separatorMatch[0];\n var word = line.substring(previousIndex, separatorMatch.index);\n previousIndex = separatorMatch.index + wordSeparator.length;\n var testLine = subline.length === 0 ? word : subline + word + wordSeparator;\n var testDims = this.calculateLabelDimensions(ele, testLine);\n var testW = testDims.width;\n if (testW <= maxW) {\n // word fits on current line\n subline += word + wordSeparator;\n } else {\n // word starts new line\n if (subline) {\n wrappedLines.push(subline);\n }\n subline = word + wordSeparator;\n }\n }\n\n // if there's remaining text, put it in a wrapped line\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n if (!subline.match(/^[\\s\\u200b]+$/)) {\n wrappedLines.push(subline);\n }\n } else {\n // line is already short enough\n wrappedLines.push(line);\n }\n } // for\n\n rscratch('labelWrapCachedLines', wrappedLines);\n text = rscratch('labelWrapCachedText', wrappedLines.join('\\n'));\n rscratch('labelWrapKey', labelKey);\n } else if (wrapStyle === 'ellipsis') {\n var _maxW = ele.pstyle('text-max-width').pfValue;\n var ellipsized = '';\n var ellipsis = \"\\u2026\";\n var incLastCh = false;\n if (this.calculateLabelDimensions(ele, text).width < _maxW) {\n // the label already fits\n return text;\n }\n for (var i = 0; i < text.length; i++) {\n var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width;\n if (widthWithNextCh > _maxW) {\n break;\n }\n ellipsized += text[i];\n if (i === text.length - 1) {\n incLastCh = true;\n }\n }\n if (!incLastCh) {\n ellipsized += ellipsis;\n }\n return ellipsized;\n } // if ellipsize\n\n return text;\n};\nBRp$9.getLabelJustification = function (ele) {\n var justification = ele.pstyle('text-justification').strValue;\n var textHalign = ele.pstyle('text-halign').strValue;\n if (justification === 'auto') {\n if (ele.isNode()) {\n switch (textHalign) {\n case 'left':\n return 'right';\n case 'right':\n return 'left';\n default:\n return 'center';\n }\n } else {\n return 'center';\n }\n } else {\n return justification;\n }\n};\nBRp$9.calculateLabelDimensions = function (ele, text) {\n var r = this;\n var containerWindow = r.cy.window();\n var document = containerWindow.document;\n var cacheKey = hashString(text, ele._private.labelDimsKey);\n var cache = r.labelDimCache || (r.labelDimCache = []);\n var existingVal = cache[cacheKey];\n if (existingVal != null) {\n return existingVal;\n }\n var padding = 0; // add padding around text dims, as the measurement isn't that accurate\n var fStyle = ele.pstyle('font-style').strValue;\n var size = ele.pstyle('font-size').pfValue;\n var family = ele.pstyle('font-family').strValue;\n var weight = ele.pstyle('font-weight').strValue;\n var canvas = this.labelCalcCanvas;\n var c2d = this.labelCalcCanvasContext;\n if (!canvas) {\n canvas = this.labelCalcCanvas = document.createElement('canvas');\n c2d = this.labelCalcCanvasContext = canvas.getContext('2d');\n var ds = canvas.style;\n ds.position = 'absolute';\n ds.left = '-9999px';\n ds.top = '-9999px';\n ds.zIndex = '-1';\n ds.visibility = 'hidden';\n ds.pointerEvents = 'none';\n }\n c2d.font = \"\".concat(fStyle, \" \").concat(weight, \" \").concat(size, \"px \").concat(family);\n var width = 0;\n var height = 0;\n var lines = text.split('\\n');\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n var metrics = c2d.measureText(line);\n var w = Math.ceil(metrics.width);\n var h = size;\n width = Math.max(w, width);\n height += h;\n }\n width += padding;\n height += padding;\n return cache[cacheKey] = {\n width: width,\n height: height\n };\n};\nBRp$9.calculateLabelAngle = function (ele, prefix) {\n var _p = ele._private;\n var rs = _p.rscratch;\n var isEdge = ele.isEdge();\n var prefixDash = prefix ? prefix + '-' : '';\n var rot = ele.pstyle(prefixDash + 'text-rotation');\n var rotStr = rot.strValue;\n if (rotStr === 'none') {\n return 0;\n } else if (isEdge && rotStr === 'autorotate') {\n return rs.labelAutoAngle;\n } else if (rotStr === 'autorotate') {\n return 0;\n } else {\n return rot.pfValue;\n }\n};\nBRp$9.calculateLabelAngles = function (ele) {\n var r = this;\n var isEdge = ele.isEdge();\n var _p = ele._private;\n var rs = _p.rscratch;\n rs.labelAngle = r.calculateLabelAngle(ele);\n if (isEdge) {\n rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source');\n rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target');\n }\n};\n\nvar BRp$8 = {};\nvar TOO_SMALL_CUT_RECT = 28;\nvar warnedCutRect = false;\nBRp$8.getNodeShape = function (node) {\n var r = this;\n var shape = node.pstyle('shape').value;\n if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) {\n if (!warnedCutRect) {\n warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead');\n warnedCutRect = true;\n }\n return 'rectangle';\n }\n if (node.isParent()) {\n if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') {\n return shape;\n } else {\n return 'rectangle';\n }\n }\n if (shape === 'polygon') {\n var points = node.pstyle('shape-polygon-points').value;\n return r.nodeShapes.makePolygon(points).name;\n }\n return shape;\n};\n\nvar BRp$7 = {};\nBRp$7.registerCalculationListeners = function () {\n var cy = this.cy;\n var elesToUpdate = cy.collection();\n var r = this;\n var enqueue = function enqueue(eles) {\n var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n elesToUpdate.merge(eles);\n if (dirtyStyleCaches) {\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _p = ele._private;\n var rstyle = _p.rstyle;\n rstyle.clean = false;\n rstyle.cleanConnected = false;\n }\n }\n };\n r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) {\n var ele = e.target;\n enqueue(ele);\n }).on('style.* background.*', function onDirtyStyle(e) {\n var ele = e.target;\n enqueue(ele, false);\n });\n var updateEleCalcs = function updateEleCalcs(willDraw) {\n if (willDraw) {\n var fns = r.onUpdateEleCalcsFns;\n\n // because we need to have up-to-date style (e.g. stylesheet mappers)\n // before calculating rendered style (and pstyle might not be called yet)\n elesToUpdate.cleanStyle();\n for (var i = 0; i < elesToUpdate.length; i++) {\n var ele = elesToUpdate[i];\n var rstyle = ele._private.rstyle;\n if (ele.isNode() && !rstyle.cleanConnected) {\n enqueue(ele.connectedEdges());\n rstyle.cleanConnected = true;\n }\n }\n if (fns) {\n for (var _i = 0; _i < fns.length; _i++) {\n var fn = fns[_i];\n fn(willDraw, elesToUpdate);\n }\n }\n r.recalculateRenderedStyle(elesToUpdate);\n elesToUpdate = cy.collection();\n }\n };\n r.flushRenderedStyleQueue = function () {\n updateEleCalcs(true);\n };\n r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs);\n};\nBRp$7.onUpdateEleCalcs = function (fn) {\n var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || [];\n fns.push(fn);\n};\nBRp$7.recalculateRenderedStyle = function (eles, useCache) {\n var isCleanConnected = function isCleanConnected(ele) {\n return ele._private.rstyle.cleanConnected;\n };\n var edges = [];\n var nodes = [];\n\n // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox()\n if (this.destroyed) {\n return;\n }\n\n // use cache by default for perf\n if (useCache === undefined) {\n useCache = true;\n }\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var _p = ele._private;\n var rstyle = _p.rstyle;\n\n // an edge may be implicitly dirty b/c of one of its connected nodes\n // (and a request for recalc may come in between frames)\n if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) {\n rstyle.clean = false;\n }\n\n // only update if dirty and in graph\n if (useCache && rstyle.clean || ele.removed()) {\n continue;\n }\n\n // only update if not display: none\n if (ele.pstyle('display').value === 'none') {\n continue;\n }\n if (_p.group === 'nodes') {\n nodes.push(ele);\n } else {\n // edges\n edges.push(ele);\n }\n rstyle.clean = true;\n }\n\n // update node data from projections\n for (var _i2 = 0; _i2 < nodes.length; _i2++) {\n var _ele = nodes[_i2];\n var _p2 = _ele._private;\n var _rstyle = _p2.rstyle;\n var pos = _ele.position();\n this.recalculateNodeLabelProjection(_ele);\n _rstyle.nodeX = pos.x;\n _rstyle.nodeY = pos.y;\n _rstyle.nodeW = _ele.pstyle('width').pfValue;\n _rstyle.nodeH = _ele.pstyle('height').pfValue;\n }\n this.recalculateEdgeProjections(edges);\n\n // update edge data from projections\n for (var _i3 = 0; _i3 < edges.length; _i3++) {\n var _ele2 = edges[_i3];\n var _p3 = _ele2._private;\n var _rstyle2 = _p3.rstyle;\n var rs = _p3.rscratch;\n\n // update rstyle positions\n _rstyle2.srcX = rs.arrowStartX;\n _rstyle2.srcY = rs.arrowStartY;\n _rstyle2.tgtX = rs.arrowEndX;\n _rstyle2.tgtY = rs.arrowEndY;\n _rstyle2.midX = rs.midX;\n _rstyle2.midY = rs.midY;\n _rstyle2.labelAngle = rs.labelAngle;\n _rstyle2.sourceLabelAngle = rs.sourceLabelAngle;\n _rstyle2.targetLabelAngle = rs.targetLabelAngle;\n }\n};\n\nvar BRp$6 = {};\nBRp$6.updateCachedGrabbedEles = function () {\n var eles = this.cachedZSortedEles;\n if (!eles) {\n // just let this be recalculated on the next z sort tick\n return;\n }\n eles.drag = [];\n eles.nondrag = [];\n var grabTargets = [];\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var rs = ele._private.rscratch;\n if (ele.grabbed() && !ele.isParent()) {\n grabTargets.push(ele);\n } else if (rs.inDragLayer) {\n eles.drag.push(ele);\n } else {\n eles.nondrag.push(ele);\n }\n }\n\n // put the grab target nodes last so it's on top of its neighbourhood\n for (var i = 0; i < grabTargets.length; i++) {\n var ele = grabTargets[i];\n eles.drag.push(ele);\n }\n};\nBRp$6.invalidateCachedZSortedEles = function () {\n this.cachedZSortedEles = null;\n};\nBRp$6.getCachedZSortedEles = function (forceRecalc) {\n if (forceRecalc || !this.cachedZSortedEles) {\n var eles = this.cy.mutableElements().toArray();\n eles.sort(zIndexSort);\n eles.interactive = eles.filter(function (ele) {\n return ele.interactive();\n });\n this.cachedZSortedEles = eles;\n this.updateCachedGrabbedEles();\n } else {\n eles = this.cachedZSortedEles;\n }\n return eles;\n};\n\nvar BRp$5 = {};\n[BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) {\n extend(BRp$5, props);\n});\n\nvar BRp$4 = {};\nBRp$4.getCachedImage = function (url, crossOrigin, onLoad) {\n var r = this;\n var imageCache = r.imageCache = r.imageCache || {};\n var cache = imageCache[url];\n if (cache) {\n if (!cache.image.complete) {\n cache.image.addEventListener('load', onLoad);\n }\n return cache.image;\n } else {\n cache = imageCache[url] = imageCache[url] || {};\n var image = cache.image = new Image(); // eslint-disable-line no-undef\n\n image.addEventListener('load', onLoad);\n image.addEventListener('error', function () {\n image.error = true;\n });\n\n // #1582 safari doesn't load data uris with crossOrigin properly\n // https://bugs.webkit.org/show_bug.cgi?id=123978\n var dataUriPrefix = 'data:';\n var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix;\n if (!isDataUri) {\n // if crossorigin is 'null'(stringified), then manually set it to null \n crossOrigin = crossOrigin === 'null' ? null : crossOrigin;\n image.crossOrigin = crossOrigin; // prevent tainted canvas\n }\n\n image.src = url;\n return image;\n }\n};\n\nvar BRp$3 = {};\n\n/* global document, ResizeObserver, MutationObserver */\n\nBRp$3.registerBinding = function (target, event, handler, useCapture) {\n // eslint-disable-line no-unused-vars\n var args = Array.prototype.slice.apply(arguments, [1]); // copy\n var b = this.binder(target);\n return b.on.apply(b, args);\n};\nBRp$3.binder = function (tgt) {\n var r = this;\n var containerWindow = r.cy.window();\n var tgtIsDom = tgt === containerWindow || tgt === containerWindow.document || tgt === containerWindow.document.body || domElement(tgt);\n if (r.supportsPassiveEvents == null) {\n // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n supportsPassive = true;\n return true;\n }\n });\n containerWindow.addEventListener('test', null, opts);\n } catch (err) {\n // not supported\n }\n r.supportsPassiveEvents = supportsPassive;\n }\n var on = function on(event, handler, useCapture) {\n var args = Array.prototype.slice.call(arguments);\n if (tgtIsDom && r.supportsPassiveEvents) {\n // replace useCapture w/ opts obj\n args[2] = {\n capture: useCapture != null ? useCapture : false,\n passive: false,\n once: false\n };\n }\n r.bindings.push({\n target: tgt,\n args: args\n });\n (tgt.addEventListener || tgt.on).apply(tgt, args);\n return this;\n };\n return {\n on: on,\n addEventListener: on,\n addListener: on,\n bind: on\n };\n};\nBRp$3.nodeIsDraggable = function (node) {\n return node && node.isNode() && !node.locked() && node.grabbable();\n};\nBRp$3.nodeIsGrabbable = function (node) {\n return this.nodeIsDraggable(node) && node.interactive();\n};\nBRp$3.load = function () {\n var r = this;\n var containerWindow = r.cy.window();\n var isSelected = function isSelected(ele) {\n return ele.selected();\n };\n var triggerEvents = function triggerEvents(target, names, e, position) {\n if (target == null) {\n target = r.cy;\n }\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n target.emit({\n originalEvent: e,\n type: name,\n position: position\n });\n }\n };\n var isMultSelKeyDown = function isMultSelKeyDown(e) {\n return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey\n };\n\n var allowPanningPassthrough = function allowPanningPassthrough(down, downs) {\n var allowPassthrough = true;\n if (r.cy.hasCompoundNodes() && down && down.pannable()) {\n // a grabbable compound node below the ele => no passthrough panning\n for (var i = 0; downs && i < downs.length; i++) {\n var down = downs[i];\n\n //if any parent node in event hierarchy isn't pannable, reject passthrough\n if (down.isNode() && down.isParent() && !down.pannable()) {\n allowPassthrough = false;\n break;\n }\n }\n } else {\n allowPassthrough = true;\n }\n return allowPassthrough;\n };\n var setGrabbed = function setGrabbed(ele) {\n ele[0]._private.grabbed = true;\n };\n var setFreed = function setFreed(ele) {\n ele[0]._private.grabbed = false;\n };\n var setInDragLayer = function setInDragLayer(ele) {\n ele[0]._private.rscratch.inDragLayer = true;\n };\n var setOutDragLayer = function setOutDragLayer(ele) {\n ele[0]._private.rscratch.inDragLayer = false;\n };\n var setGrabTarget = function setGrabTarget(ele) {\n ele[0]._private.rscratch.isGrabTarget = true;\n };\n var removeGrabTarget = function removeGrabTarget(ele) {\n ele[0]._private.rscratch.isGrabTarget = false;\n };\n var addToDragList = function addToDragList(ele, opts) {\n var list = opts.addToList;\n var listHasEle = list.has(ele);\n if (!listHasEle && ele.grabbable() && !ele.locked()) {\n list.merge(ele);\n setGrabbed(ele);\n }\n };\n\n // helper function to determine which child nodes and inner edges\n // of a compound node to be dragged as well as the grabbed and selected nodes\n var addDescendantsToDrag = function addDescendantsToDrag(node, opts) {\n if (!node.cy().hasCompoundNodes()) {\n return;\n }\n if (opts.inDragLayer == null && opts.addToList == null) {\n return;\n } // nothing to do\n\n var innerNodes = node.descendants();\n if (opts.inDragLayer) {\n innerNodes.forEach(setInDragLayer);\n innerNodes.connectedEdges().forEach(setInDragLayer);\n }\n if (opts.addToList) {\n addToDragList(innerNodes, opts);\n }\n };\n\n // adds the given nodes and its neighbourhood to the drag layer\n var addNodesToDrag = function addNodesToDrag(nodes, opts) {\n opts = opts || {};\n var hasCompoundNodes = nodes.cy().hasCompoundNodes();\n if (opts.inDragLayer) {\n nodes.forEach(setInDragLayer);\n nodes.neighborhood().stdFilter(function (ele) {\n return !hasCompoundNodes || ele.isEdge();\n }).forEach(setInDragLayer);\n }\n if (opts.addToList) {\n nodes.forEach(function (ele) {\n addToDragList(ele, opts);\n });\n }\n addDescendantsToDrag(nodes, opts); // always add to drag\n\n // also add nodes and edges related to the topmost ancestor\n updateAncestorsInDragLayer(nodes, {\n inDragLayer: opts.inDragLayer\n });\n r.updateCachedGrabbedEles();\n };\n var addNodeToDrag = addNodesToDrag;\n var freeDraggedElements = function freeDraggedElements(grabbedEles) {\n if (!grabbedEles) {\n return;\n }\n\n // just go over all elements rather than doing a bunch of (possibly expensive) traversals\n r.getCachedZSortedEles().forEach(function (ele) {\n setFreed(ele);\n setOutDragLayer(ele);\n removeGrabTarget(ele);\n });\n r.updateCachedGrabbedEles();\n };\n\n // helper function to determine which ancestor nodes and edges should go\n // to the drag layer (or should be removed from drag layer).\n var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) {\n if (opts.inDragLayer == null && opts.addToList == null) {\n return;\n } // nothing to do\n\n if (!node.cy().hasCompoundNodes()) {\n return;\n }\n\n // find top-level parent\n var parent = node.ancestors().orphans();\n\n // no parent node: no nodes to add to the drag layer\n if (parent.same(node)) {\n return;\n }\n var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants());\n var edges = nodes.connectedEdges();\n if (opts.inDragLayer) {\n edges.forEach(setInDragLayer);\n nodes.forEach(setInDragLayer);\n }\n if (opts.addToList) {\n nodes.forEach(function (ele) {\n addToDragList(ele, opts);\n });\n }\n };\n var blurActiveDomElement = function blurActiveDomElement() {\n if (document.activeElement != null && document.activeElement.blur != null) {\n document.activeElement.blur();\n }\n };\n var haveMutationsApi = typeof MutationObserver !== 'undefined';\n var haveResizeObserverApi = typeof ResizeObserver !== 'undefined';\n\n // watch for when the cy container is removed from the dom\n if (haveMutationsApi) {\n r.removeObserver = new MutationObserver(function (mutns) {\n // eslint-disable-line no-undef\n for (var i = 0; i < mutns.length; i++) {\n var mutn = mutns[i];\n var rNodes = mutn.removedNodes;\n if (rNodes) {\n for (var j = 0; j < rNodes.length; j++) {\n var rNode = rNodes[j];\n if (rNode === r.container) {\n r.destroy();\n break;\n }\n }\n }\n }\n });\n if (r.container.parentNode) {\n r.removeObserver.observe(r.container.parentNode, {\n childList: true\n });\n }\n } else {\n r.registerBinding(r.container, 'DOMNodeRemoved', function (e) {\n // eslint-disable-line no-unused-vars\n r.destroy();\n });\n }\n var onResize = debounce_1(function () {\n r.cy.resize();\n }, 100);\n if (haveMutationsApi) {\n r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef\n\n r.styleObserver.observe(r.container, {\n attributes: true\n });\n }\n\n // auto resize\n r.registerBinding(containerWindow, 'resize', onResize); // eslint-disable-line no-undef\n\n if (haveResizeObserverApi) {\n r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef\n\n r.resizeObserver.observe(r.container);\n }\n var forEachUp = function forEachUp(domEle, fn) {\n while (domEle != null) {\n fn(domEle);\n domEle = domEle.parentNode;\n }\n };\n var invalidateCoords = function invalidateCoords() {\n r.invalidateContainerClientCoordsCache();\n };\n forEachUp(r.container, function (domEle) {\n r.registerBinding(domEle, 'transitionend', invalidateCoords);\n r.registerBinding(domEle, 'animationend', invalidateCoords);\n r.registerBinding(domEle, 'scroll', invalidateCoords);\n });\n\n // stop right click menu from appearing on cy\n r.registerBinding(r.container, 'contextmenu', function (e) {\n e.preventDefault();\n });\n var inBoxSelection = function inBoxSelection() {\n return r.selection[4] !== 0;\n };\n var eventInContainer = function eventInContainer(e) {\n // save cycles if mouse events aren't to be captured\n var containerPageCoords = r.findContainerClientCoords();\n var x = containerPageCoords[0];\n var y = containerPageCoords[1];\n var width = containerPageCoords[2];\n var height = containerPageCoords[3];\n var positions = e.touches ? e.touches : [e];\n var atLeastOnePosInside = false;\n for (var i = 0; i < positions.length; i++) {\n var p = positions[i];\n if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) {\n atLeastOnePosInside = true;\n break;\n }\n }\n if (!atLeastOnePosInside) {\n return false;\n }\n var container = r.container;\n var target = e.target;\n var tParent = target.parentNode;\n var containerIsTarget = false;\n while (tParent) {\n if (tParent === container) {\n containerIsTarget = true;\n break;\n }\n tParent = tParent.parentNode;\n }\n if (!containerIsTarget) {\n return false;\n } // if target is outisde cy container, then this event is not for us\n\n return true;\n };\n\n // Primary key\n r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) {\n if (!eventInContainer(e)) {\n return;\n }\n\n // during left mouse button gestures, ignore other buttons\n if (r.hoverData.which === 1 && e.which !== 1) {\n return;\n }\n e.preventDefault();\n blurActiveDomElement();\n r.hoverData.capture = true;\n r.hoverData.which = e.which;\n var cy = r.cy;\n var gpos = [e.clientX, e.clientY];\n var pos = r.projectIntoViewport(gpos[0], gpos[1]);\n var select = r.selection;\n var nears = r.findNearestElements(pos[0], pos[1], true, false);\n var near = nears[0];\n var draggedElements = r.dragData.possibleDragElements;\n r.hoverData.mdownPos = pos;\n r.hoverData.mdownGPos = gpos;\n var checkForTaphold = function checkForTaphold() {\n r.hoverData.tapholdCancelled = false;\n clearTimeout(r.hoverData.tapholdTimeout);\n r.hoverData.tapholdTimeout = setTimeout(function () {\n if (r.hoverData.tapholdCancelled) {\n return;\n } else {\n var ele = r.hoverData.down;\n if (ele) {\n ele.emit({\n originalEvent: e,\n type: 'taphold',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n } else {\n cy.emit({\n originalEvent: e,\n type: 'taphold',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n }\n }, r.tapholdDuration);\n };\n\n // Right click button\n if (e.which == 3) {\n r.hoverData.cxtStarted = true;\n var cxtEvt = {\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (near) {\n near.activate();\n near.emit(cxtEvt);\n r.hoverData.down = near;\n } else {\n cy.emit(cxtEvt);\n }\n r.hoverData.downTime = new Date().getTime();\n r.hoverData.cxtDragged = false;\n\n // Primary button\n } else if (e.which == 1) {\n if (near) {\n near.activate();\n }\n\n // Element dragging\n {\n // If something is under the cursor and it is draggable, prepare to grab it\n if (near != null) {\n if (r.nodeIsGrabbable(near)) {\n var makeEvent = function makeEvent(type) {\n return {\n originalEvent: e,\n type: type,\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n };\n var triggerGrab = function triggerGrab(ele) {\n ele.emit(makeEvent('grab'));\n };\n setGrabTarget(near);\n if (!near.selected()) {\n draggedElements = r.dragData.possibleDragElements = cy.collection();\n addNodeToDrag(near, {\n addToList: draggedElements\n });\n near.emit(makeEvent('grabon')).emit(makeEvent('grab'));\n } else {\n draggedElements = r.dragData.possibleDragElements = cy.collection();\n var selectedNodes = cy.$(function (ele) {\n return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele);\n });\n addNodesToDrag(selectedNodes, {\n addToList: draggedElements\n });\n near.emit(makeEvent('grabon'));\n selectedNodes.forEach(triggerGrab);\n }\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n }\n }\n r.hoverData.down = near;\n r.hoverData.downs = nears;\n r.hoverData.downTime = new Date().getTime();\n }\n triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, {\n x: pos[0],\n y: pos[1]\n });\n if (near == null) {\n select[4] = 1;\n r.data.bgActivePosistion = {\n x: pos[0],\n y: pos[1]\n };\n r.redrawHint('select', true);\n r.redraw();\n } else if (near.pannable()) {\n select[4] = 1; // for future pan\n }\n\n checkForTaphold();\n }\n\n // Initialize selection box coordinates\n select[0] = select[2] = pos[0];\n select[1] = select[3] = pos[1];\n }, false);\n r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) {\n // eslint-disable-line no-undef\n var capture = r.hoverData.capture;\n if (!capture && !eventInContainer(e)) {\n return;\n }\n var preventDefault = false;\n var cy = r.cy;\n var zoom = cy.zoom();\n var gpos = [e.clientX, e.clientY];\n var pos = r.projectIntoViewport(gpos[0], gpos[1]);\n var mdownPos = r.hoverData.mdownPos;\n var mdownGPos = r.hoverData.mdownGPos;\n var select = r.selection;\n var near = null;\n if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) {\n near = r.findNearestElement(pos[0], pos[1], true, false);\n }\n var last = r.hoverData.last;\n var down = r.hoverData.down;\n var disp = [pos[0] - select[2], pos[1] - select[3]];\n var draggedElements = r.dragData.possibleDragElements;\n var isOverThresholdDrag;\n if (mdownGPos) {\n var dx = gpos[0] - mdownGPos[0];\n var dx2 = dx * dx;\n var dy = gpos[1] - mdownGPos[1];\n var dy2 = dy * dy;\n var dist2 = dx2 + dy2;\n r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2;\n }\n var multSelKeyDown = isMultSelKeyDown(e);\n if (isOverThresholdDrag) {\n r.hoverData.tapholdCancelled = true;\n }\n var updateDragDelta = function updateDragDelta() {\n var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || [];\n if (dragDelta.length === 0) {\n dragDelta.push(disp[0]);\n dragDelta.push(disp[1]);\n } else {\n dragDelta[0] += disp[0];\n dragDelta[1] += disp[1];\n }\n };\n preventDefault = true;\n triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, {\n x: pos[0],\n y: pos[1]\n });\n var goIntoBoxMode = function goIntoBoxMode() {\n r.data.bgActivePosistion = undefined;\n if (!r.hoverData.selecting) {\n cy.emit({\n originalEvent: e,\n type: 'boxstart',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n select[4] = 1;\n r.hoverData.selecting = true;\n r.redrawHint('select', true);\n r.redraw();\n };\n\n // trigger context drag if rmouse down\n if (r.hoverData.which === 3) {\n // but only if over threshold\n if (isOverThresholdDrag) {\n var cxtEvt = {\n originalEvent: e,\n type: 'cxtdrag',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (down) {\n down.emit(cxtEvt);\n } else {\n cy.emit(cxtEvt);\n }\n r.hoverData.cxtDragged = true;\n if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) {\n if (r.hoverData.cxtOver) {\n r.hoverData.cxtOver.emit({\n originalEvent: e,\n type: 'cxtdragout',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n r.hoverData.cxtOver = near;\n if (near) {\n near.emit({\n originalEvent: e,\n type: 'cxtdragover',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }\n }\n }\n\n // Check if we are drag panning the entire graph\n } else if (r.hoverData.dragging) {\n preventDefault = true;\n if (cy.panningEnabled() && cy.userPanningEnabled()) {\n var deltaP;\n if (r.hoverData.justStartedPan) {\n var mdPos = r.hoverData.mdownPos;\n deltaP = {\n x: (pos[0] - mdPos[0]) * zoom,\n y: (pos[1] - mdPos[1]) * zoom\n };\n r.hoverData.justStartedPan = false;\n } else {\n deltaP = {\n x: disp[0] * zoom,\n y: disp[1] * zoom\n };\n }\n cy.panBy(deltaP);\n cy.emit('dragpan');\n r.hoverData.dragged = true;\n }\n\n // Needs reproject due to pan changing viewport\n pos = r.projectIntoViewport(e.clientX, e.clientY);\n\n // Checks primary button down & out of time & mouse not moved much\n } else if (select[4] == 1 && (down == null || down.pannable())) {\n if (isOverThresholdDrag) {\n if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) {\n goIntoBoxMode();\n } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) {\n var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs);\n if (allowPassthrough) {\n r.hoverData.dragging = true;\n r.hoverData.justStartedPan = true;\n select[4] = 0;\n r.data.bgActivePosistion = array2point(mdownPos);\n r.redrawHint('select', true);\n r.redraw();\n }\n }\n if (down && down.pannable() && down.active()) {\n down.unactivate();\n }\n }\n } else {\n if (down && down.pannable() && down.active()) {\n down.unactivate();\n }\n if ((!down || !down.grabbed()) && near != last) {\n if (last) {\n triggerEvents(last, ['mouseout', 'tapdragout'], e, {\n x: pos[0],\n y: pos[1]\n });\n }\n if (near) {\n triggerEvents(near, ['mouseover', 'tapdragover'], e, {\n x: pos[0],\n y: pos[1]\n });\n }\n r.hoverData.last = near;\n }\n if (down) {\n if (isOverThresholdDrag) {\n // then we can take action\n\n if (cy.boxSelectionEnabled() && multSelKeyDown) {\n // then selection overrides\n if (down && down.grabbed()) {\n freeDraggedElements(draggedElements);\n down.emit('freeon');\n draggedElements.emit('free');\n if (r.dragData.didDrag) {\n down.emit('dragfreeon');\n draggedElements.emit('dragfree');\n }\n }\n goIntoBoxMode();\n } else if (down && down.grabbed() && r.nodeIsDraggable(down)) {\n // drag node\n var justStartedDrag = !r.dragData.didDrag;\n if (justStartedDrag) {\n r.redrawHint('eles', true);\n }\n r.dragData.didDrag = true; // indicate that we actually did drag the node\n\n // now, add the elements to the drag layer if not done already\n if (!r.hoverData.draggingEles) {\n addNodesToDrag(draggedElements, {\n inDragLayer: true\n });\n }\n var totalShift = {\n x: 0,\n y: 0\n };\n if (number$1(disp[0]) && number$1(disp[1])) {\n totalShift.x += disp[0];\n totalShift.y += disp[1];\n if (justStartedDrag) {\n var dragDelta = r.hoverData.dragDelta;\n if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) {\n totalShift.x += dragDelta[0];\n totalShift.y += dragDelta[1];\n }\n }\n }\n r.hoverData.draggingEles = true;\n draggedElements.silentShift(totalShift).emit('position drag');\n r.redrawHint('drag', true);\n r.redraw();\n }\n } else {\n // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant\n updateDragDelta();\n }\n }\n\n // prevent the dragging from triggering text selection on the page\n preventDefault = true;\n }\n select[2] = pos[0];\n select[3] = pos[1];\n if (preventDefault) {\n if (e.stopPropagation) e.stopPropagation();\n if (e.preventDefault) e.preventDefault();\n return false;\n }\n }, false);\n var clickTimeout, didDoubleClick, prevClickTimeStamp;\n r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) {\n // eslint-disable-line no-undef\n // during left mouse button gestures, ignore other buttons\n if (r.hoverData.which === 1 && e.which !== 1 && r.hoverData.capture) {\n return;\n }\n var capture = r.hoverData.capture;\n if (!capture) {\n return;\n }\n r.hoverData.capture = false;\n var cy = r.cy;\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n var select = r.selection;\n var near = r.findNearestElement(pos[0], pos[1], true, false);\n var draggedElements = r.dragData.possibleDragElements;\n var down = r.hoverData.down;\n var multSelKeyDown = isMultSelKeyDown(e);\n if (r.data.bgActivePosistion) {\n r.redrawHint('select', true);\n r.redraw();\n }\n r.hoverData.tapholdCancelled = true;\n r.data.bgActivePosistion = undefined; // not active bg now\n\n if (down) {\n down.unactivate();\n }\n if (r.hoverData.which === 3) {\n var cxtEvt = {\n originalEvent: e,\n type: 'cxttapend',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (down) {\n down.emit(cxtEvt);\n } else {\n cy.emit(cxtEvt);\n }\n if (!r.hoverData.cxtDragged) {\n var cxtTap = {\n originalEvent: e,\n type: 'cxttap',\n position: {\n x: pos[0],\n y: pos[1]\n }\n };\n if (down) {\n down.emit(cxtTap);\n } else {\n cy.emit(cxtTap);\n }\n }\n r.hoverData.cxtDragged = false;\n r.hoverData.which = null;\n } else if (r.hoverData.which === 1) {\n triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, {\n x: pos[0],\n y: pos[1]\n });\n if (!r.dragData.didDrag &&\n // didn't move a node around\n !r.hoverData.dragged &&\n // didn't pan\n !r.hoverData.selecting &&\n // not box selection\n !r.hoverData.isOverThresholdDrag // didn't move too much\n ) {\n triggerEvents(down, [\"click\", \"tap\", \"vclick\"], e, {\n x: pos[0],\n y: pos[1]\n });\n didDoubleClick = false;\n if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) {\n clickTimeout && clearTimeout(clickTimeout);\n didDoubleClick = true;\n prevClickTimeStamp = null;\n triggerEvents(down, [\"dblclick\", \"dbltap\", \"vdblclick\"], e, {\n x: pos[0],\n y: pos[1]\n });\n } else {\n clickTimeout = setTimeout(function () {\n if (didDoubleClick) return;\n triggerEvents(down, [\"oneclick\", \"onetap\", \"voneclick\"], e, {\n x: pos[0],\n y: pos[1]\n });\n }, cy.multiClickDebounceTime());\n prevClickTimeStamp = e.timeStamp;\n }\n }\n\n // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something\n if (down == null // not mousedown on node\n && !r.dragData.didDrag // didn't move the node around\n && !r.hoverData.selecting // not box selection\n && !r.hoverData.dragged // didn't pan\n && !isMultSelKeyDown(e)) {\n cy.$(isSelected).unselect(['tapunselect']);\n if (draggedElements.length > 0) {\n r.redrawHint('eles', true);\n }\n r.dragData.possibleDragElements = draggedElements = cy.collection();\n }\n\n // Single selection\n if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) {\n if (near != null && near._private.selectable) {\n if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) {\n if (near.selected()) {\n near.unselect(['tapunselect']);\n } else {\n near.select(['tapselect']);\n }\n } else {\n if (!multSelKeyDown) {\n cy.$(isSelected).unmerge(near).unselect(['tapunselect']);\n near.select(['tapselect']);\n }\n }\n r.redrawHint('eles', true);\n }\n }\n if (r.hoverData.selecting) {\n var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3]));\n r.redrawHint('select', true);\n if (box.length > 0) {\n r.redrawHint('eles', true);\n }\n cy.emit({\n type: 'boxend',\n originalEvent: e,\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n var eleWouldBeSelected = function eleWouldBeSelected(ele) {\n return ele.selectable() && !ele.selected();\n };\n if (cy.selectionType() === 'additive') {\n box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect');\n } else {\n if (!multSelKeyDown) {\n cy.$(isSelected).unmerge(box).unselect();\n }\n box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect');\n }\n\n // always need redraw in case eles unselectable\n r.redraw();\n }\n\n // Cancel drag pan\n if (r.hoverData.dragging) {\n r.hoverData.dragging = false;\n r.redrawHint('select', true);\n r.redrawHint('eles', true);\n r.redraw();\n }\n if (!select[4]) {\n r.redrawHint('drag', true);\n r.redrawHint('eles', true);\n var downWasGrabbed = down && down.grabbed();\n freeDraggedElements(draggedElements);\n if (downWasGrabbed) {\n down.emit('freeon');\n draggedElements.emit('free');\n if (r.dragData.didDrag) {\n down.emit('dragfreeon');\n draggedElements.emit('dragfree');\n }\n }\n }\n } // else not right mouse\n\n select[4] = 0;\n r.hoverData.down = null;\n r.hoverData.cxtStarted = false;\n r.hoverData.draggingEles = false;\n r.hoverData.selecting = false;\n r.hoverData.isOverThresholdDrag = false;\n r.dragData.didDrag = false;\n r.hoverData.dragged = false;\n r.hoverData.dragDelta = [];\n r.hoverData.mdownPos = null;\n r.hoverData.mdownGPos = null;\n }, false);\n var wheelHandler = function wheelHandler(e) {\n if (r.scrollingPage) {\n return;\n } // while scrolling, ignore wheel-to-zoom\n\n var cy = r.cy;\n var zoom = cy.zoom();\n var pan = cy.pan();\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y];\n if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) {\n // if pan dragging or cxt dragging, wheel movements make no zoom\n e.preventDefault();\n return;\n }\n if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) {\n e.preventDefault();\n r.data.wheelZooming = true;\n clearTimeout(r.data.wheelTimeout);\n r.data.wheelTimeout = setTimeout(function () {\n r.data.wheelZooming = false;\n r.redrawHint('eles', true);\n r.redraw();\n }, 150);\n var diff;\n if (e.deltaY != null) {\n diff = e.deltaY / -250;\n } else if (e.wheelDeltaY != null) {\n diff = e.wheelDeltaY / 1000;\n } else {\n diff = e.wheelDelta / 1000;\n }\n diff = diff * r.wheelSensitivity;\n var needsWheelFix = e.deltaMode === 1;\n if (needsWheelFix) {\n // fixes slow wheel events on ff/linux and ff/windows\n diff *= 33;\n }\n var newZoom = cy.zoom() * Math.pow(10, diff);\n if (e.type === 'gesturechange') {\n newZoom = r.gestureStartZoom * e.scale;\n }\n cy.zoom({\n level: newZoom,\n renderedPosition: {\n x: rpos[0],\n y: rpos[1]\n }\n });\n cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom');\n }\n };\n\n // Functions to help with whether mouse wheel should trigger zooming\n // --\n r.registerBinding(r.container, 'wheel', wheelHandler, true);\n\n // disable nonstandard wheel events\n // r.registerBinding(r.container, 'mousewheel', wheelHandler, true);\n // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true);\n // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox\n\n r.registerBinding(containerWindow, 'scroll', function scrollHandler(e) {\n // eslint-disable-line no-unused-vars\n r.scrollingPage = true;\n clearTimeout(r.scrollingPageTimeout);\n r.scrollingPageTimeout = setTimeout(function () {\n r.scrollingPage = false;\n }, 250);\n }, true);\n\n // desktop safari pinch to zoom start\n r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) {\n r.gestureStartZoom = r.cy.zoom();\n if (!r.hasTouchStarted) {\n // don't affect touch devices like iphone\n e.preventDefault();\n }\n }, true);\n r.registerBinding(r.container, 'gesturechange', function (e) {\n if (!r.hasTouchStarted) {\n // don't affect touch devices like iphone\n wheelHandler(e);\n }\n }, true);\n\n // Functions to help with handling mouseout/mouseover on the Cytoscape container\n // Handle mouseout on Cytoscape container\n r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) {\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n r.cy.emit({\n originalEvent: e,\n type: 'mouseout',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }, false);\n r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) {\n var pos = r.projectIntoViewport(e.clientX, e.clientY);\n r.cy.emit({\n originalEvent: e,\n type: 'mouseover',\n position: {\n x: pos[0],\n y: pos[1]\n }\n });\n }, false);\n var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom\n var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom\n var center1, modelCenter1; // center point on start pinch to zoom\n var offsetLeft, offsetTop;\n var containerWidth, containerHeight;\n var twoFingersStartInside;\n var distance = function distance(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n };\n var distanceSq = function distanceSq(x1, y1, x2, y2) {\n return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);\n };\n var touchstartHandler;\n r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) {\n r.hasTouchStarted = true;\n if (!eventInContainer(e)) {\n return;\n }\n blurActiveDomElement();\n r.touchData.capture = true;\n r.data.bgActivePosistion = undefined;\n var cy = r.cy;\n var now = r.touchData.now;\n var earlier = r.touchData.earlier;\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n\n // record starting points for pinch-to-zoom\n if (e.touches[1]) {\n r.touchData.singleTouchMoved = true;\n freeDraggedElements(r.dragData.touchDragEles);\n var offsets = r.findContainerClientCoords();\n offsetLeft = offsets[0];\n offsetTop = offsets[1];\n containerWidth = offsets[2];\n containerHeight = offsets[3];\n f1x1 = e.touches[0].clientX - offsetLeft;\n f1y1 = e.touches[0].clientY - offsetTop;\n f2x1 = e.touches[1].clientX - offsetLeft;\n f2y1 = e.touches[1].clientY - offsetTop;\n twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight;\n var pan = cy.pan();\n var zoom = cy.zoom();\n distance1 = distance(f1x1, f1y1, f2x1, f2y1);\n distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1);\n center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2];\n modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom];\n\n // consider context tap\n var cxtDistThreshold = 200;\n var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold;\n if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) {\n var near1 = r.findNearestElement(now[0], now[1], true, true);\n var near2 = r.findNearestElement(now[2], now[3], true, true);\n if (near1 && near1.isNode()) {\n near1.activate().emit({\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n r.touchData.start = near1;\n } else if (near2 && near2.isNode()) {\n near2.activate().emit({\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n r.touchData.start = near2;\n } else {\n cy.emit({\n originalEvent: e,\n type: 'cxttapstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n if (r.touchData.start) {\n r.touchData.start._private.grabbed = false;\n }\n r.touchData.cxt = true;\n r.touchData.cxtDragged = false;\n r.data.bgActivePosistion = undefined;\n r.redraw();\n return;\n }\n }\n if (e.touches[2]) {\n // ignore\n\n // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...)\n if (cy.boxSelectionEnabled()) {\n e.preventDefault();\n }\n } else if (e.touches[1]) ; else if (e.touches[0]) {\n var nears = r.findNearestElements(now[0], now[1], true, true);\n var near = nears[0];\n if (near != null) {\n near.activate();\n r.touchData.start = near;\n r.touchData.starts = nears;\n if (r.nodeIsGrabbable(near)) {\n var draggedEles = r.dragData.touchDragEles = cy.collection();\n var selectedNodes = null;\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n if (near.selected()) {\n // reset drag elements, since near will be added again\n\n selectedNodes = cy.$(function (ele) {\n return ele.selected() && r.nodeIsGrabbable(ele);\n });\n addNodesToDrag(selectedNodes, {\n addToList: draggedEles\n });\n } else {\n addNodeToDrag(near, {\n addToList: draggedEles\n });\n }\n setGrabTarget(near);\n var makeEvent = function makeEvent(type) {\n return {\n originalEvent: e,\n type: type,\n position: {\n x: now[0],\n y: now[1]\n }\n };\n };\n near.emit(makeEvent('grabon'));\n if (selectedNodes) {\n selectedNodes.forEach(function (n) {\n n.emit(makeEvent('grab'));\n });\n } else {\n near.emit(makeEvent('grab'));\n }\n }\n }\n triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, {\n x: now[0],\n y: now[1]\n });\n if (near == null) {\n r.data.bgActivePosistion = {\n x: pos[0],\n y: pos[1]\n };\n r.redrawHint('select', true);\n r.redraw();\n }\n\n // Tap, taphold\n // -----\n\n r.touchData.singleTouchMoved = false;\n r.touchData.singleTouchStartTime = +new Date();\n clearTimeout(r.touchData.tapholdTimeout);\n r.touchData.tapholdTimeout = setTimeout(function () {\n if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect\n && !r.touchData.selecting // box selection shouldn't allow taphold through\n ) {\n triggerEvents(r.touchData.start, ['taphold'], e, {\n x: now[0],\n y: now[1]\n });\n }\n }, r.tapholdDuration);\n }\n if (e.touches.length >= 1) {\n var sPos = r.touchData.startPosition = [null, null, null, null, null, null];\n for (var i = 0; i < now.length; i++) {\n sPos[i] = earlier[i] = now[i];\n }\n var touch0 = e.touches[0];\n r.touchData.startGPosition = [touch0.clientX, touch0.clientY];\n }\n }, false);\n var touchmoveHandler;\n r.registerBinding(containerWindow, 'touchmove', touchmoveHandler = function touchmoveHandler(e) {\n // eslint-disable-line no-undef\n var capture = r.touchData.capture;\n if (!capture && !eventInContainer(e)) {\n return;\n }\n var select = r.selection;\n var cy = r.cy;\n var now = r.touchData.now;\n var earlier = r.touchData.earlier;\n var zoom = cy.zoom();\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n var startGPos = r.touchData.startGPosition;\n var isOverThresholdDrag;\n if (capture && e.touches[0] && startGPos) {\n var disp = [];\n for (var j = 0; j < now.length; j++) {\n disp[j] = now[j] - earlier[j];\n }\n var dx = e.touches[0].clientX - startGPos[0];\n var dx2 = dx * dx;\n var dy = e.touches[0].clientY - startGPos[1];\n var dy2 = dy * dy;\n var dist2 = dx2 + dy2;\n isOverThresholdDrag = dist2 >= r.touchTapThreshold2;\n }\n\n // context swipe cancelling\n if (capture && r.touchData.cxt) {\n e.preventDefault();\n var f1x2 = e.touches[0].clientX - offsetLeft,\n f1y2 = e.touches[0].clientY - offsetTop;\n var f2x2 = e.touches[1].clientX - offsetLeft,\n f2y2 = e.touches[1].clientY - offsetTop;\n // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 );\n var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2);\n var factorSq = distance2Sq / distance1Sq;\n var distThreshold = 150;\n var distThresholdSq = distThreshold * distThreshold;\n var factorThreshold = 1.5;\n var factorThresholdSq = factorThreshold * factorThreshold;\n\n // cancel ctx gestures if the distance b/t the fingers increases\n if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) {\n r.touchData.cxt = false;\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n var cxtEvt = {\n originalEvent: e,\n type: 'cxttapend',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n if (r.touchData.start) {\n r.touchData.start.unactivate().emit(cxtEvt);\n r.touchData.start = null;\n } else {\n cy.emit(cxtEvt);\n }\n }\n }\n\n // context swipe\n if (capture && r.touchData.cxt) {\n var cxtEvt = {\n originalEvent: e,\n type: 'cxtdrag',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n if (r.touchData.start) {\n r.touchData.start.emit(cxtEvt);\n } else {\n cy.emit(cxtEvt);\n }\n if (r.touchData.start) {\n r.touchData.start._private.grabbed = false;\n }\n r.touchData.cxtDragged = true;\n var near = r.findNearestElement(now[0], now[1], true, true);\n if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) {\n if (r.touchData.cxtOver) {\n r.touchData.cxtOver.emit({\n originalEvent: e,\n type: 'cxtdragout',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n r.touchData.cxtOver = near;\n if (near) {\n near.emit({\n originalEvent: e,\n type: 'cxtdragover',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n }\n\n // box selection\n } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) {\n e.preventDefault();\n r.data.bgActivePosistion = undefined;\n this.lastThreeTouch = +new Date();\n if (!r.touchData.selecting) {\n cy.emit({\n originalEvent: e,\n type: 'boxstart',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n r.touchData.selecting = true;\n r.touchData.didSelect = true;\n select[4] = 1;\n if (!select || select.length === 0 || select[0] === undefined) {\n select[0] = (now[0] + now[2] + now[4]) / 3;\n select[1] = (now[1] + now[3] + now[5]) / 3;\n select[2] = (now[0] + now[2] + now[4]) / 3 + 1;\n select[3] = (now[1] + now[3] + now[5]) / 3 + 1;\n } else {\n select[2] = (now[0] + now[2] + now[4]) / 3;\n select[3] = (now[1] + now[3] + now[5]) / 3;\n }\n r.redrawHint('select', true);\n r.redraw();\n\n // pinch to zoom\n } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom\n && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) {\n // two fingers => pinch to zoom\n e.preventDefault();\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n var draggedEles = r.dragData.touchDragEles;\n if (draggedEles) {\n r.redrawHint('drag', true);\n for (var i = 0; i < draggedEles.length; i++) {\n var de_p = draggedEles[i]._private;\n de_p.grabbed = false;\n de_p.rscratch.inDragLayer = false;\n }\n }\n var _start = r.touchData.start;\n\n // (x2, y2) for fingers 1 and 2\n var f1x2 = e.touches[0].clientX - offsetLeft,\n f1y2 = e.touches[0].clientY - offsetTop;\n var f2x2 = e.touches[1].clientX - offsetLeft,\n f2y2 = e.touches[1].clientY - offsetTop;\n var distance2 = distance(f1x2, f1y2, f2x2, f2y2);\n // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 );\n // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq );\n var factor = distance2 / distance1;\n if (twoFingersStartInside) {\n // delta finger1\n var df1x = f1x2 - f1x1;\n var df1y = f1y2 - f1y1;\n\n // delta finger 2\n var df2x = f2x2 - f2x1;\n var df2y = f2y2 - f2y1;\n\n // translation is the normalised vector of the two fingers movement\n // i.e. so pinching cancels out and moving together pans\n var tx = (df1x + df2x) / 2;\n var ty = (df1y + df2y) / 2;\n\n // now calculate the zoom\n var zoom1 = cy.zoom();\n var zoom2 = zoom1 * factor;\n var pan1 = cy.pan();\n\n // the model center point converted to the current rendered pos\n var ctrx = modelCenter1[0] * zoom1 + pan1.x;\n var ctry = modelCenter1[1] * zoom1 + pan1.y;\n var pan2 = {\n x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx,\n y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry\n };\n\n // remove dragged eles\n if (_start && _start.active()) {\n var draggedEles = r.dragData.touchDragEles;\n freeDraggedElements(draggedEles);\n r.redrawHint('drag', true);\n r.redrawHint('eles', true);\n _start.unactivate().emit('freeon');\n draggedEles.emit('free');\n if (r.dragData.didDrag) {\n _start.emit('dragfreeon');\n draggedEles.emit('dragfree');\n }\n }\n cy.viewport({\n zoom: zoom2,\n pan: pan2,\n cancelOnFailedZoom: true\n });\n cy.emit('pinchzoom');\n distance1 = distance2;\n f1x1 = f1x2;\n f1y1 = f1y2;\n f2x1 = f2x2;\n f2y1 = f2y2;\n r.pinching = true;\n }\n\n // Re-project\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning\n ) {\n var start = r.touchData.start;\n var last = r.touchData.last;\n var near;\n if (!r.hoverData.draggingEles && !r.swipePanning) {\n near = r.findNearestElement(now[0], now[1], true, true);\n }\n if (capture && start != null) {\n e.preventDefault();\n }\n\n // dragging nodes\n if (capture && start != null && r.nodeIsDraggable(start)) {\n if (isOverThresholdDrag) {\n // then dragging can happen\n var draggedEles = r.dragData.touchDragEles;\n var justStartedDrag = !r.dragData.didDrag;\n if (justStartedDrag) {\n addNodesToDrag(draggedEles, {\n inDragLayer: true\n });\n }\n r.dragData.didDrag = true;\n var totalShift = {\n x: 0,\n y: 0\n };\n if (number$1(disp[0]) && number$1(disp[1])) {\n totalShift.x += disp[0];\n totalShift.y += disp[1];\n if (justStartedDrag) {\n r.redrawHint('eles', true);\n var dragDelta = r.touchData.dragDelta;\n if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) {\n totalShift.x += dragDelta[0];\n totalShift.y += dragDelta[1];\n }\n }\n }\n r.hoverData.draggingEles = true;\n draggedEles.silentShift(totalShift).emit('position drag');\n r.redrawHint('drag', true);\n if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) {\n r.redrawHint('eles', true);\n }\n r.redraw();\n } else {\n // otherwise keep track of drag delta for later\n var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || [];\n if (dragDelta.length === 0) {\n dragDelta.push(disp[0]);\n dragDelta.push(disp[1]);\n } else {\n dragDelta[0] += disp[0];\n dragDelta[1] += disp[1];\n }\n }\n }\n\n // touchmove\n {\n triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, {\n x: now[0],\n y: now[1]\n });\n if ((!start || !start.grabbed()) && near != last) {\n if (last) {\n last.emit({\n originalEvent: e,\n type: 'tapdragout',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n if (near) {\n near.emit({\n originalEvent: e,\n type: 'tapdragover',\n position: {\n x: now[0],\n y: now[1]\n }\n });\n }\n }\n r.touchData.last = near;\n }\n\n // check to cancel taphold\n if (capture) {\n for (var i = 0; i < now.length; i++) {\n if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) {\n r.touchData.singleTouchMoved = true;\n }\n }\n }\n\n // panning\n if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) {\n var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts);\n if (allowPassthrough) {\n e.preventDefault();\n if (!r.data.bgActivePosistion) {\n r.data.bgActivePosistion = array2point(r.touchData.startPosition);\n }\n if (r.swipePanning) {\n cy.panBy({\n x: disp[0] * zoom,\n y: disp[1] * zoom\n });\n cy.emit('dragpan');\n } else if (isOverThresholdDrag) {\n r.swipePanning = true;\n cy.panBy({\n x: dx * zoom,\n y: dy * zoom\n });\n cy.emit('dragpan');\n if (start) {\n start.unactivate();\n r.redrawHint('select', true);\n r.touchData.start = null;\n }\n }\n }\n\n // Re-project\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n }\n for (var j = 0; j < now.length; j++) {\n earlier[j] = now[j];\n }\n\n // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning\n if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) {\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n r.redraw();\n }\n }, false);\n var touchcancelHandler;\n r.registerBinding(containerWindow, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) {\n // eslint-disable-line no-unused-vars\n var start = r.touchData.start;\n r.touchData.capture = false;\n if (start) {\n start.unactivate();\n }\n });\n var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp;\n r.registerBinding(containerWindow, 'touchend', touchendHandler = function touchendHandler(e) {\n // eslint-disable-line no-unused-vars\n var start = r.touchData.start;\n var capture = r.touchData.capture;\n if (capture) {\n if (e.touches.length === 0) {\n r.touchData.capture = false;\n }\n e.preventDefault();\n } else {\n return;\n }\n var select = r.selection;\n r.swipePanning = false;\n r.hoverData.draggingEles = false;\n var cy = r.cy;\n var zoom = cy.zoom();\n var now = r.touchData.now;\n var earlier = r.touchData.earlier;\n if (e.touches[0]) {\n var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY);\n now[0] = pos[0];\n now[1] = pos[1];\n }\n if (e.touches[1]) {\n var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY);\n now[2] = pos[0];\n now[3] = pos[1];\n }\n if (e.touches[2]) {\n var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY);\n now[4] = pos[0];\n now[5] = pos[1];\n }\n if (start) {\n start.unactivate();\n }\n var ctxTapend;\n if (r.touchData.cxt) {\n ctxTapend = {\n originalEvent: e,\n type: 'cxttapend',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n if (start) {\n start.emit(ctxTapend);\n } else {\n cy.emit(ctxTapend);\n }\n if (!r.touchData.cxtDragged) {\n var ctxTap = {\n originalEvent: e,\n type: 'cxttap',\n position: {\n x: now[0],\n y: now[1]\n }\n };\n if (start) {\n start.emit(ctxTap);\n } else {\n cy.emit(ctxTap);\n }\n }\n if (r.touchData.start) {\n r.touchData.start._private.grabbed = false;\n }\n r.touchData.cxt = false;\n r.touchData.start = null;\n r.redraw();\n return;\n }\n\n // no more box selection if we don't have three fingers\n if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) {\n r.touchData.selecting = false;\n var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3]));\n select[0] = undefined;\n select[1] = undefined;\n select[2] = undefined;\n select[3] = undefined;\n select[4] = 0;\n r.redrawHint('select', true);\n cy.emit({\n type: 'boxend',\n originalEvent: e,\n position: {\n x: now[0],\n y: now[1]\n }\n });\n var eleWouldBeSelected = function eleWouldBeSelected(ele) {\n return ele.selectable() && !ele.selected();\n };\n box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect');\n if (box.nonempty()) {\n r.redrawHint('eles', true);\n }\n r.redraw();\n }\n if (start != null) {\n start.unactivate();\n }\n if (e.touches[2]) {\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) {\n r.data.bgActivePosistion = undefined;\n r.redrawHint('select', true);\n var draggedEles = r.dragData.touchDragEles;\n if (start != null) {\n var startWasGrabbed = start._private.grabbed;\n freeDraggedElements(draggedEles);\n r.redrawHint('drag', true);\n r.redrawHint('eles', true);\n if (startWasGrabbed) {\n start.emit('freeon');\n draggedEles.emit('free');\n if (r.dragData.didDrag) {\n start.emit('dragfreeon');\n draggedEles.emit('dragfree');\n }\n }\n triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, {\n x: now[0],\n y: now[1]\n });\n start.unactivate();\n r.touchData.start = null;\n } else {\n var near = r.findNearestElement(now[0], now[1], true, true);\n triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, {\n x: now[0],\n y: now[1]\n });\n }\n var dx = r.touchData.startPosition[0] - now[0];\n var dx2 = dx * dx;\n var dy = r.touchData.startPosition[1] - now[1];\n var dy2 = dy * dy;\n var dist2 = dx2 + dy2;\n var rdist2 = dist2 * zoom * zoom;\n\n // Tap event, roughly same as mouse click event for touch\n if (!r.touchData.singleTouchMoved) {\n if (!start) {\n cy.$(':selected').unselect(['tapunselect']);\n }\n triggerEvents(start, ['tap', 'vclick'], e, {\n x: now[0],\n y: now[1]\n });\n didDoubleTouch = false;\n if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) {\n touchTimeout && clearTimeout(touchTimeout);\n didDoubleTouch = true;\n prevTouchTimeStamp = null;\n triggerEvents(start, ['dbltap', 'vdblclick'], e, {\n x: now[0],\n y: now[1]\n });\n } else {\n touchTimeout = setTimeout(function () {\n if (didDoubleTouch) return;\n triggerEvents(start, ['onetap', 'voneclick'], e, {\n x: now[0],\n y: now[1]\n });\n }, cy.multiClickDebounceTime());\n prevTouchTimeStamp = e.timeStamp;\n }\n }\n\n // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance\n if (start != null && !r.dragData.didDrag // didn't drag nodes around\n && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection\n ) {\n if (cy.selectionType() === 'single') {\n cy.$(isSelected).unmerge(start).unselect(['tapunselect']);\n start.select(['tapselect']);\n } else {\n if (start.selected()) {\n start.unselect(['tapunselect']);\n } else {\n start.select(['tapselect']);\n }\n }\n r.redrawHint('eles', true);\n }\n r.touchData.singleTouchMoved = true;\n }\n for (var j = 0; j < now.length; j++) {\n earlier[j] = now[j];\n }\n r.dragData.didDrag = false; // reset for next touchstart\n\n if (e.touches.length === 0) {\n r.touchData.dragDelta = [];\n r.touchData.startPosition = [null, null, null, null, null, null];\n r.touchData.startGPosition = null;\n r.touchData.didSelect = false;\n }\n if (e.touches.length < 2) {\n if (e.touches.length === 1) {\n // the old start global pos'n may not be the same finger that remains\n r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY];\n }\n r.pinching = false;\n r.redrawHint('eles', true);\n r.redraw();\n }\n\n //r.redraw();\n }, false);\n\n // fallback compatibility layer for ms pointer events\n if (typeof TouchEvent === 'undefined') {\n var pointers = [];\n var makeTouch = function makeTouch(e) {\n return {\n clientX: e.clientX,\n clientY: e.clientY,\n force: 1,\n identifier: e.pointerId,\n pageX: e.pageX,\n pageY: e.pageY,\n radiusX: e.width / 2,\n radiusY: e.height / 2,\n screenX: e.screenX,\n screenY: e.screenY,\n target: e.target\n };\n };\n var makePointer = function makePointer(e) {\n return {\n event: e,\n touch: makeTouch(e)\n };\n };\n var addPointer = function addPointer(e) {\n pointers.push(makePointer(e));\n };\n var removePointer = function removePointer(e) {\n for (var i = 0; i < pointers.length; i++) {\n var p = pointers[i];\n if (p.event.pointerId === e.pointerId) {\n pointers.splice(i, 1);\n return;\n }\n }\n };\n var updatePointer = function updatePointer(e) {\n var p = pointers.filter(function (p) {\n return p.event.pointerId === e.pointerId;\n })[0];\n p.event = e;\n p.touch = makeTouch(e);\n };\n var addTouchesToEvent = function addTouchesToEvent(e) {\n e.touches = pointers.map(function (p) {\n return p.touch;\n });\n };\n var pointerIsMouse = function pointerIsMouse(e) {\n return e.pointerType === 'mouse' || e.pointerType === 4;\n };\n r.registerBinding(r.container, 'pointerdown', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n e.preventDefault();\n addPointer(e);\n addTouchesToEvent(e);\n touchstartHandler(e);\n });\n r.registerBinding(r.container, 'pointerup', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n removePointer(e);\n addTouchesToEvent(e);\n touchendHandler(e);\n });\n r.registerBinding(r.container, 'pointercancel', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n removePointer(e);\n addTouchesToEvent(e);\n touchcancelHandler(e);\n });\n r.registerBinding(r.container, 'pointermove', function (e) {\n if (pointerIsMouse(e)) {\n return;\n } // mouse already handled\n\n e.preventDefault();\n updatePointer(e);\n addTouchesToEvent(e);\n touchmoveHandler(e);\n });\n }\n};\n\nvar BRp$2 = {};\nBRp$2.generatePolygon = function (name, points) {\n return this.nodeShapes[name] = {\n renderer: this,\n name: name,\n points: points,\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding);\n }\n };\n};\nBRp$2.generateEllipse = function () {\n return this.nodeShapes['ellipse'] = {\n renderer: this,\n name: 'ellipse',\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n return checkInEllipse(x, y, width, height, centerX, centerY, padding);\n }\n };\n};\nBRp$2.generateRoundPolygon = function (name, points) {\n return this.nodeShapes[name] = {\n renderer: this,\n name: name,\n points: points,\n getOrCreateCorners: function getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, field) {\n if (rs[field] !== undefined && rs[field + '-cx'] === centerX && rs[field + '-cy'] === centerY) {\n return rs[field];\n }\n rs[field] = new Array(points.length / 2);\n rs[field + '-cx'] = centerX;\n rs[field + '-cy'] = centerY;\n var halfW = width / 2;\n var halfH = height / 2;\n cornerRadius = cornerRadius === 'auto' ? getRoundPolygonRadius(width, height) : cornerRadius;\n var p = new Array(points.length / 2);\n for (var _i = 0; _i < points.length / 2; _i++) {\n p[_i] = {\n x: centerX + halfW * points[_i * 2],\n y: centerY + halfH * points[_i * 2 + 1]\n };\n }\n var i,\n p1,\n p2,\n p3,\n len = p.length;\n p1 = p[len - 1];\n // for each point\n for (i = 0; i < len; i++) {\n p2 = p[i % len];\n p3 = p[(i + 1) % len];\n rs[field][i] = getRoundCorner(p1, p2, p3, cornerRadius);\n p1 = p2;\n p2 = p3;\n }\n return rs[field];\n },\n draw: function draw(context, centerX, centerY, width, height, cornerRadius, rs) {\n this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points, this.getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, 'drawCorners'));\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius, rs) {\n return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height, padding, this.getOrCreateCorners(nodeX, nodeY, width, height, cornerRadius, rs, 'corners'));\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius, rs) {\n return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height, this.getOrCreateCorners(centerX, centerY, width, height, cornerRadius, rs, 'corners'));\n }\n };\n};\nBRp$2.generateRoundRectangle = function () {\n return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = {\n renderer: this,\n name: 'round-rectangle',\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, this.points, cornerRadius);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding, cornerRadius);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(width, height) : cornerRadius;\n cornerRadius = Math.min(halfWidth, halfHeight, cornerRadius);\n var diam = cornerRadius * 2;\n\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) {\n return true;\n }\n\n // Check top left quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX - halfWidth + cornerRadius, centerY - halfHeight + cornerRadius, padding)) {\n return true;\n }\n\n // Check top right quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX + halfWidth - cornerRadius, centerY - halfHeight + cornerRadius, padding)) {\n return true;\n }\n\n // Check bottom right quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX + halfWidth - cornerRadius, centerY + halfHeight - cornerRadius, padding)) {\n return true;\n }\n\n // Check bottom left quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX - halfWidth + cornerRadius, centerY + halfHeight - cornerRadius, padding)) {\n return true;\n }\n return false;\n }\n };\n};\nBRp$2.generateCutRectangle = function () {\n return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = {\n renderer: this,\n name: 'cut-rectangle',\n cornerLength: getCutRectangleCornerLength(),\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, null, cornerRadius);\n },\n generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY, cornerRadius) {\n var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius;\n var hh = height / 2;\n var hw = width / 2;\n var xBegin = centerX - hw;\n var xEnd = centerX + hw;\n var yBegin = centerY - hh;\n var yEnd = centerY + hh;\n\n // points are in clockwise order, inner (imaginary) triangle pt on [4, 5]\n return {\n topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl],\n topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl],\n bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl],\n bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl]\n };\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY, cornerRadius);\n var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]);\n return polygonIntersectLine(x, y, pts, nodeX, nodeY);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n var cl = cornerRadius === 'auto' ? this.cornerLength : cornerRadius;\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * cl, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * cl, height, [0, -1], padding)) {\n return true;\n }\n var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY);\n return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft);\n }\n };\n};\nBRp$2.generateBarrel = function () {\n return this.nodeShapes['barrel'] = {\n renderer: this,\n name: 'barrel',\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n // use two fixed t values for the bezier curve approximation\n\n var t0 = 0.15;\n var t1 = 0.5;\n var t2 = 0.85;\n var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY);\n var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) {\n // approximate curve pts based on the two t values\n var m0 = qbezierPtAt({\n x: pts[0],\n y: pts[1]\n }, {\n x: pts[2],\n y: pts[3]\n }, {\n x: pts[4],\n y: pts[5]\n }, t0);\n var m1 = qbezierPtAt({\n x: pts[0],\n y: pts[1]\n }, {\n x: pts[2],\n y: pts[3]\n }, {\n x: pts[4],\n y: pts[5]\n }, t1);\n var m2 = qbezierPtAt({\n x: pts[0],\n y: pts[1]\n }, {\n x: pts[2],\n y: pts[3]\n }, {\n x: pts[4],\n y: pts[5]\n }, t2);\n return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]];\n };\n var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft));\n return polygonIntersectLine(x, y, pts, nodeX, nodeY);\n },\n generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) {\n var hh = height / 2;\n var hw = width / 2;\n var xBegin = centerX - hw;\n var xEnd = centerX + hw;\n var yBegin = centerY - hh;\n var yEnd = centerY + hh;\n var curveConstants = getBarrelCurveConstants(width, height);\n var hOffset = curveConstants.heightOffset;\n var wOffset = curveConstants.widthOffset;\n var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width;\n\n // points are in clockwise order, inner (imaginary) control pt on [4, 5]\n var pts = {\n topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin],\n topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset],\n bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd],\n bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset]\n };\n pts.topLeft.isTop = true;\n pts.topRight.isTop = true;\n pts.bottomLeft.isBottom = true;\n pts.bottomRight.isBottom = true;\n return pts;\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n var curveConstants = getBarrelCurveConstants(width, height);\n var hOffset = curveConstants.heightOffset;\n var wOffset = curveConstants.widthOffset;\n\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) {\n return true;\n }\n var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY);\n var getCurveT = function getCurveT(x, y, curvePts) {\n var x0 = curvePts[4];\n var x1 = curvePts[2];\n var x2 = curvePts[0];\n var y0 = curvePts[5];\n // var y1 = curvePts[ 3 ];\n var y2 = curvePts[1];\n var xMin = Math.min(x0, x2);\n var xMax = Math.max(x0, x2);\n var yMin = Math.min(y0, y2);\n var yMax = Math.max(y0, y2);\n if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) {\n var coeff = bezierPtsToQuadCoeff(x0, x1, x2);\n var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x);\n var validRoots = roots.filter(function (r) {\n return 0 <= r && r <= 1;\n });\n if (validRoots.length > 0) {\n return validRoots[0];\n }\n }\n return null;\n };\n var curveRegions = Object.keys(barrelCurvePts);\n for (var i = 0; i < curveRegions.length; i++) {\n var corner = curveRegions[i];\n var cornerPts = barrelCurvePts[corner];\n var t = getCurveT(x, y, cornerPts);\n if (t == null) {\n continue;\n }\n var y0 = cornerPts[5];\n var y1 = cornerPts[3];\n var y2 = cornerPts[1];\n var bezY = qbezierAt(y0, y1, y2, t);\n if (cornerPts.isTop && bezY <= y) {\n return true;\n }\n if (cornerPts.isBottom && y <= bezY) {\n return true;\n }\n }\n return false;\n }\n };\n};\nBRp$2.generateBottomRoundrectangle = function () {\n return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = {\n renderer: this,\n name: 'bottom-round-rectangle',\n points: generateUnitNgonPointsFitToSquare(4, 0),\n draw: function draw(context, centerX, centerY, width, height, cornerRadius) {\n this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height, this.points, cornerRadius);\n },\n intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding, cornerRadius) {\n var topStartX = nodeX - (width / 2 + padding);\n var topStartY = nodeY - (height / 2 + padding);\n var topEndY = topStartY;\n var topEndX = nodeX + (width / 2 + padding);\n var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false);\n if (topIntersections.length > 0) {\n return topIntersections;\n }\n return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding, cornerRadius);\n },\n checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY, cornerRadius) {\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(width, height) : cornerRadius;\n var diam = 2 * cornerRadius;\n\n // Check hBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) {\n return true;\n }\n\n // Check vBox\n if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) {\n return true;\n }\n\n // check non-rounded top side\n var outerWidth = width / 2 + 2 * padding;\n var outerHeight = height / 2 + 2 * padding;\n var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight];\n if (pointInsidePolygonPoints(x, y, points)) {\n return true;\n }\n\n // Check bottom right quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) {\n return true;\n }\n\n // Check bottom left quarter circle\n if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) {\n return true;\n }\n return false;\n }\n };\n};\nBRp$2.registerNodeShapes = function () {\n var nodeShapes = this.nodeShapes = {};\n var renderer = this;\n this.generateEllipse();\n this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0));\n this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0));\n this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0));\n nodeShapes['square'] = nodeShapes['rectangle'];\n this.generateRoundRectangle();\n this.generateCutRectangle();\n this.generateBarrel();\n this.generateBottomRoundrectangle();\n {\n var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0];\n this.generatePolygon('diamond', diamondPoints);\n this.generateRoundPolygon('round-diamond', diamondPoints);\n }\n this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0));\n this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0));\n this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0));\n this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0));\n this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0));\n this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0));\n this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0));\n this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0));\n var star5Points = new Array(20);\n {\n var outerPoints = generateUnitNgonPoints(5, 0);\n var innerPoints = generateUnitNgonPoints(5, Math.PI / 5);\n\n // Outer radius is 1; inner radius of star is smaller\n var innerRadius = 0.5 * (3 - Math.sqrt(5));\n innerRadius *= 1.57;\n for (var i = 0; i < innerPoints.length / 2; i++) {\n innerPoints[i * 2] *= innerRadius;\n innerPoints[i * 2 + 1] *= innerRadius;\n }\n for (var i = 0; i < 20 / 4; i++) {\n star5Points[i * 4] = outerPoints[i * 2];\n star5Points[i * 4 + 1] = outerPoints[i * 2 + 1];\n star5Points[i * 4 + 2] = innerPoints[i * 2];\n star5Points[i * 4 + 3] = innerPoints[i * 2 + 1];\n }\n }\n star5Points = fitPolygonToSquare(star5Points);\n this.generatePolygon('star', star5Points);\n this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]);\n this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]);\n this.generatePolygon('right-rhomboid', [-0.333, -1, 1, -1, 0.333, 1, -1, 1]);\n this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]);\n {\n var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1];\n this.generatePolygon('tag', tagPoints);\n this.generateRoundPolygon('round-tag', tagPoints);\n }\n nodeShapes.makePolygon = function (points) {\n // use caching on user-specified polygons so they are as fast as native shapes\n\n var key = points.join('$');\n var name = 'polygon-' + key;\n var shape;\n if (shape = this[name]) {\n // got cached shape\n return shape;\n }\n\n // create and cache new shape\n return renderer.generatePolygon(name, points);\n };\n};\n\nvar BRp$1 = {};\nBRp$1.timeToRender = function () {\n return this.redrawTotalTime / this.redrawCount;\n};\nBRp$1.redraw = function (options) {\n options = options || staticEmptyObject();\n var r = this;\n if (r.averageRedrawTime === undefined) {\n r.averageRedrawTime = 0;\n }\n if (r.lastRedrawTime === undefined) {\n r.lastRedrawTime = 0;\n }\n if (r.lastDrawTime === undefined) {\n r.lastDrawTime = 0;\n }\n r.requestedFrame = true;\n r.renderOptions = options;\n};\nBRp$1.beforeRender = function (fn, priority) {\n // the renderer can't add tick callbacks when destroyed\n if (this.destroyed) {\n return;\n }\n if (priority == null) {\n error('Priority is not optional for beforeRender');\n }\n var cbs = this.beforeRenderCallbacks;\n cbs.push({\n fn: fn,\n priority: priority\n });\n\n // higher priority callbacks executed first\n cbs.sort(function (a, b) {\n return b.priority - a.priority;\n });\n};\nvar beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) {\n var cbs = r.beforeRenderCallbacks;\n for (var i = 0; i < cbs.length; i++) {\n cbs[i].fn(willDraw, startTime);\n }\n};\nBRp$1.startRenderLoop = function () {\n var r = this;\n var cy = r.cy;\n if (r.renderLoopStarted) {\n return;\n } else {\n r.renderLoopStarted = true;\n }\n var renderFn = function renderFn(requestTime) {\n if (r.destroyed) {\n return;\n }\n if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) {\n beforeRenderCallbacks(r, true, requestTime);\n var startTime = performanceNow();\n r.render(r.renderOptions);\n var endTime = r.lastDrawTime = performanceNow();\n if (r.averageRedrawTime === undefined) {\n r.averageRedrawTime = endTime - startTime;\n }\n if (r.redrawCount === undefined) {\n r.redrawCount = 0;\n }\n r.redrawCount++;\n if (r.redrawTotalTime === undefined) {\n r.redrawTotalTime = 0;\n }\n var duration = endTime - startTime;\n r.redrawTotalTime += duration;\n r.lastRedrawTime = duration;\n\n // use a weighted average with a bias from the previous average so we don't spike so easily\n r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2;\n r.requestedFrame = false;\n } else {\n beforeRenderCallbacks(r, false, requestTime);\n }\n r.skipFrame = false;\n requestAnimationFrame(renderFn);\n };\n requestAnimationFrame(renderFn);\n};\n\nvar BaseRenderer = function BaseRenderer(options) {\n this.init(options);\n};\nvar BR = BaseRenderer;\nvar BRp = BR.prototype;\nBRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl'];\nBRp.init = function (options) {\n var r = this;\n r.options = options;\n r.cy = options.cy;\n var ctr = r.container = options.cy.container();\n var containerWindow = r.cy.window();\n\n // prepend a stylesheet in the head such that\n if (containerWindow) {\n var document = containerWindow.document;\n var head = document.head;\n var stylesheetId = '__________cytoscape_stylesheet';\n var className = '__________cytoscape_container';\n var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null;\n if (ctr.className.indexOf(className) < 0) {\n ctr.className = (ctr.className || '') + ' ' + className;\n }\n if (!stylesheetAlreadyExists) {\n var stylesheet = document.createElement('style');\n stylesheet.id = stylesheetId;\n stylesheet.textContent = '.' + className + ' { position: relative; }';\n head.insertBefore(stylesheet, head.children[0]); // first so lowest priority\n }\n\n var computedStyle = containerWindow.getComputedStyle(ctr);\n var position = computedStyle.getPropertyValue('position');\n if (position === 'static') {\n warn('A Cytoscape container has style position:static and so can not use UI extensions properly');\n }\n }\n r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag\n\n r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95];\n\n //--Pointer-related data\n r.hoverData = {\n down: null,\n last: null,\n downTime: null,\n triggerMode: null,\n dragging: false,\n initialPan: [null, null],\n capture: false\n };\n r.dragData = {\n possibleDragElements: []\n };\n r.touchData = {\n start: null,\n capture: false,\n // These 3 fields related to tap, taphold events\n startPosition: [null, null, null, null, null, null],\n singleTouchStartTime: null,\n singleTouchMoved: true,\n now: [null, null, null, null, null, null],\n earlier: [null, null, null, null, null, null]\n };\n r.redraws = 0;\n r.showFps = options.showFps;\n r.debug = options.debug;\n r.hideEdgesOnViewport = options.hideEdgesOnViewport;\n r.textureOnViewport = options.textureOnViewport;\n r.wheelSensitivity = options.wheelSensitivity;\n r.motionBlurEnabled = options.motionBlur; // on by default\n r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null;\n r.motionBlur = options.motionBlur; // for initial kick off\n r.motionBlurOpacity = options.motionBlurOpacity;\n r.motionBlurTransparency = 1 - r.motionBlurOpacity;\n r.motionBlurPxRatio = 1;\n r.mbPxRBlurry = 1; //0.8;\n r.minMbLowQualFrames = 4;\n r.fullQualityMb = false;\n r.clearedForMotionBlur = [];\n r.desktopTapThreshold = options.desktopTapThreshold;\n r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold;\n r.touchTapThreshold = options.touchTapThreshold;\n r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold;\n r.tapholdDuration = 500;\n r.bindings = [];\n r.beforeRenderCallbacks = [];\n r.beforeRenderPriorities = {\n // higher priority execs before lower one\n animations: 400,\n eleCalcs: 300,\n eleTxrDeq: 200,\n lyrTxrDeq: 150,\n lyrTxrSkip: 100\n };\n r.registerNodeShapes();\n r.registerArrowShapes();\n r.registerCalculationListeners();\n};\nBRp.notify = function (eventName, eles) {\n var r = this;\n var cy = r.cy;\n\n // the renderer can't be notified after it's destroyed\n if (this.destroyed) {\n return;\n }\n if (eventName === 'init') {\n r.load();\n return;\n }\n if (eventName === 'destroy') {\n r.destroy();\n return;\n }\n if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') {\n r.invalidateCachedZSortedEles();\n }\n if (eventName === 'viewport') {\n r.redrawHint('select', true);\n }\n if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') {\n r.invalidateContainerClientCoordsCache();\n r.matchCanvasSize(r.container);\n }\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n this.startRenderLoop();\n this.redraw();\n};\nBRp.destroy = function () {\n var r = this;\n r.destroyed = true;\n r.cy.stopAnimationLoop();\n for (var i = 0; i < r.bindings.length; i++) {\n var binding = r.bindings[i];\n var b = binding;\n var tgt = b.target;\n (tgt.off || tgt.removeEventListener).apply(tgt, b.args);\n }\n r.bindings = [];\n r.beforeRenderCallbacks = [];\n r.onUpdateEleCalcsFns = [];\n if (r.removeObserver) {\n r.removeObserver.disconnect();\n }\n if (r.styleObserver) {\n r.styleObserver.disconnect();\n }\n if (r.resizeObserver) {\n r.resizeObserver.disconnect();\n }\n if (r.labelCalcDiv) {\n try {\n document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef\n } catch (e) {\n // ie10 issue #1014\n }\n }\n};\nBRp.isHeadless = function () {\n return false;\n};\n[BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) {\n extend(BRp, props);\n});\n\nvar fullFpsTime = 1000 / 60; // assume 60 frames per second\n\nvar defs = {\n setupDequeueing: function setupDequeueing(opts) {\n return function setupDequeueingImpl() {\n var self = this;\n var r = this.renderer;\n if (self.dequeueingSetup) {\n return;\n } else {\n self.dequeueingSetup = true;\n }\n var queueRedraw = debounce_1(function () {\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n r.redraw();\n }, opts.deqRedrawThreshold);\n var dequeue = function dequeue(willDraw, frameStartTime) {\n var startTime = performanceNow();\n var avgRenderTime = r.averageRedrawTime;\n var renderTime = r.lastRedrawTime;\n var deqd = [];\n var extent = r.cy.extent();\n var pixelRatio = r.getPixelRatio();\n\n // if we aren't in a tick that causes a draw, then the rendered style\n // queue won't automatically be flushed before dequeueing starts\n if (!willDraw) {\n r.flushRenderedStyleQueue();\n }\n while (true) {\n // eslint-disable-line no-constant-condition\n var now = performanceNow();\n var duration = now - startTime;\n var frameDuration = now - frameStartTime;\n if (renderTime < fullFpsTime) {\n // if we're rendering faster than the ideal fps, then do dequeueing\n // during all of the remaining frame time\n\n var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0);\n if (frameDuration >= opts.deqFastCost * timeAvailable) {\n break;\n }\n } else {\n if (willDraw) {\n if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) {\n break;\n }\n } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) {\n break;\n }\n }\n var thisDeqd = opts.deq(self, pixelRatio, extent);\n if (thisDeqd.length > 0) {\n for (var i = 0; i < thisDeqd.length; i++) {\n deqd.push(thisDeqd[i]);\n }\n } else {\n break;\n }\n }\n\n // callbacks on dequeue\n if (deqd.length > 0) {\n opts.onDeqd(self, deqd);\n if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) {\n queueRedraw();\n }\n }\n };\n var priority = opts.priority || noop$1;\n r.beforeRender(dequeue, priority(self));\n };\n }\n};\n\n// Allows lookups for (ele, lvl) => cache.\n// Uses keys so elements may share the same cache.\nvar ElementTextureCacheLookup = /*#__PURE__*/function () {\n function ElementTextureCacheLookup(getKey) {\n var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify;\n _classCallCheck(this, ElementTextureCacheLookup);\n this.idsByKey = new Map$2();\n this.keyForId = new Map$2();\n this.cachesByLvl = new Map$2();\n this.lvls = [];\n this.getKey = getKey;\n this.doesEleInvalidateKey = doesEleInvalidateKey;\n }\n _createClass(ElementTextureCacheLookup, [{\n key: \"getIdsFor\",\n value: function getIdsFor(key) {\n if (key == null) {\n error(\"Can not get id list for null key\");\n }\n var idsByKey = this.idsByKey;\n var ids = this.idsByKey.get(key);\n if (!ids) {\n ids = new Set$1();\n idsByKey.set(key, ids);\n }\n return ids;\n }\n }, {\n key: \"addIdForKey\",\n value: function addIdForKey(key, id) {\n if (key != null) {\n this.getIdsFor(key).add(id);\n }\n }\n }, {\n key: \"deleteIdForKey\",\n value: function deleteIdForKey(key, id) {\n if (key != null) {\n this.getIdsFor(key)[\"delete\"](id);\n }\n }\n }, {\n key: \"getNumberOfIdsForKey\",\n value: function getNumberOfIdsForKey(key) {\n if (key == null) {\n return 0;\n } else {\n return this.getIdsFor(key).size;\n }\n }\n }, {\n key: \"updateKeyMappingFor\",\n value: function updateKeyMappingFor(ele) {\n var id = ele.id();\n var prevKey = this.keyForId.get(id);\n var currKey = this.getKey(ele);\n this.deleteIdForKey(prevKey, id);\n this.addIdForKey(currKey, id);\n this.keyForId.set(id, currKey);\n }\n }, {\n key: \"deleteKeyMappingFor\",\n value: function deleteKeyMappingFor(ele) {\n var id = ele.id();\n var prevKey = this.keyForId.get(id);\n this.deleteIdForKey(prevKey, id);\n this.keyForId[\"delete\"](id);\n }\n }, {\n key: \"keyHasChangedFor\",\n value: function keyHasChangedFor(ele) {\n var id = ele.id();\n var prevKey = this.keyForId.get(id);\n var newKey = this.getKey(ele);\n return prevKey !== newKey;\n }\n }, {\n key: \"isInvalid\",\n value: function isInvalid(ele) {\n return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele);\n }\n }, {\n key: \"getCachesAt\",\n value: function getCachesAt(lvl) {\n var cachesByLvl = this.cachesByLvl,\n lvls = this.lvls;\n var caches = cachesByLvl.get(lvl);\n if (!caches) {\n caches = new Map$2();\n cachesByLvl.set(lvl, caches);\n lvls.push(lvl);\n }\n return caches;\n }\n }, {\n key: \"getCache\",\n value: function getCache(key, lvl) {\n return this.getCachesAt(lvl).get(key);\n }\n }, {\n key: \"get\",\n value: function get(ele, lvl) {\n var key = this.getKey(ele);\n var cache = this.getCache(key, lvl);\n\n // getting for an element may need to add to the id list b/c eles can share keys\n if (cache != null) {\n this.updateKeyMappingFor(ele);\n }\n return cache;\n }\n }, {\n key: \"getForCachedKey\",\n value: function getForCachedKey(ele, lvl) {\n var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key\n var cache = this.getCache(key, lvl);\n return cache;\n }\n }, {\n key: \"hasCache\",\n value: function hasCache(key, lvl) {\n return this.getCachesAt(lvl).has(key);\n }\n }, {\n key: \"has\",\n value: function has(ele, lvl) {\n var key = this.getKey(ele);\n return this.hasCache(key, lvl);\n }\n }, {\n key: \"setCache\",\n value: function setCache(key, lvl, cache) {\n cache.key = key;\n this.getCachesAt(lvl).set(key, cache);\n }\n }, {\n key: \"set\",\n value: function set(ele, lvl, cache) {\n var key = this.getKey(ele);\n this.setCache(key, lvl, cache);\n this.updateKeyMappingFor(ele);\n }\n }, {\n key: \"deleteCache\",\n value: function deleteCache(key, lvl) {\n this.getCachesAt(lvl)[\"delete\"](key);\n }\n }, {\n key: \"delete\",\n value: function _delete(ele, lvl) {\n var key = this.getKey(ele);\n this.deleteCache(key, lvl);\n }\n }, {\n key: \"invalidateKey\",\n value: function invalidateKey(key) {\n var _this = this;\n this.lvls.forEach(function (lvl) {\n return _this.deleteCache(key, lvl);\n });\n }\n\n // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key)\n }, {\n key: \"invalidate\",\n value: function invalidate(ele) {\n var id = ele.id();\n var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key)\n\n this.deleteKeyMappingFor(ele);\n var entireKeyInvalidated = this.doesEleInvalidateKey(ele);\n if (entireKeyInvalidated) {\n // clear mapping for current key\n this.invalidateKey(key);\n }\n return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0;\n }\n }]);\n return ElementTextureCacheLookup;\n}();\n\nvar minTxrH = 25; // the size of the texture cache for small height eles (special case)\nvar txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up\nvar minLvl$1 = -4; // when scaling smaller than that we don't need to re-render\nvar maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful)\nvar maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used\nvar eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps\nvar defTxrWidth = 1024; // default/minimum texture width\nvar maxTxrW = 1024; // the maximum width of a texture\nvar maxTxrH = 1024; // the maximum height of a texture\nvar minUtility = 0.2; // if usage of texture is less than this, it is retired\nvar maxFullness = 0.8; // fullness of texture after which queue removal is checked\nvar maxFullnessChecks = 10; // dequeued after this many checks\nvar deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame\nvar deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time\nvar deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing\nvar deqFastCost$1 = 0.9; // % of frame time to be used when >60fps\nvar deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile\nvar maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch\n\nvar getTxrReasons = {\n dequeue: 'dequeue',\n downscale: 'downscale',\n highQuality: 'highQuality'\n};\nvar initDefaults = defaults$g({\n getKey: null,\n doesEleInvalidateKey: falsify,\n drawElement: null,\n getBoundingBox: null,\n getRotationPoint: null,\n getRotationOffset: null,\n isVisible: trueify,\n allowEdgeTxrCaching: true,\n allowParentTxrCaching: true\n});\nvar ElementTextureCache = function ElementTextureCache(renderer, initOptions) {\n var self = this;\n self.renderer = renderer;\n self.onDequeues = [];\n var opts = initDefaults(initOptions);\n extend(self, opts);\n self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey);\n self.setupDequeueing();\n};\nvar ETCp = ElementTextureCache.prototype;\nETCp.reasons = getTxrReasons;\n\n// the list of textures in which new subtextures for elements can be placed\nETCp.getTextureQueue = function (txrH) {\n var self = this;\n self.eleImgCaches = self.eleImgCaches || {};\n return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || [];\n};\n\n// the list of usused textures which can be recycled (in use in texture queue)\nETCp.getRetiredTextureQueue = function (txrH) {\n var self = this;\n var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {};\n var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || [];\n return rtxtrQ;\n};\n\n// queue of element draw requests at different scale levels\nETCp.getElementQueue = function () {\n var self = this;\n var q = self.eleCacheQueue = self.eleCacheQueue || new heap(function (a, b) {\n return b.reqs - a.reqs;\n });\n return q;\n};\n\n// queue of element draw requests at different scale levels (element id lookup)\nETCp.getElementKeyToQueue = function () {\n var self = this;\n var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {};\n return k2q;\n};\nETCp.getElement = function (ele, bb, pxRatio, lvl, reason) {\n var self = this;\n var r = this.renderer;\n var zoom = r.cy.zoom();\n var lookup = this.lookup;\n if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) {\n return null;\n }\n if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) {\n return null;\n }\n if (lvl == null) {\n lvl = Math.ceil(log2(zoom * pxRatio));\n }\n if (lvl < minLvl$1) {\n lvl = minLvl$1;\n } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) {\n return null;\n }\n var scale = Math.pow(2, lvl);\n var eleScaledH = bb.h * scale;\n var eleScaledW = bb.w * scale;\n var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale);\n if (!this.isVisible(ele, scaledLabelShown)) {\n return null;\n }\n var eleCache = lookup.get(ele, lvl);\n\n // if this get was on an unused/invalidated cache, then restore the texture usage metric\n if (eleCache && eleCache.invalidated) {\n eleCache.invalidated = false;\n eleCache.texture.invalidatedWidth -= eleCache.width;\n }\n if (eleCache) {\n return eleCache;\n }\n var txrH; // which texture height this ele belongs to\n\n if (eleScaledH <= minTxrH) {\n txrH = minTxrH;\n } else if (eleScaledH <= txrStepH) {\n txrH = txrStepH;\n } else {\n txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH;\n }\n if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) {\n return null; // caching large elements is not efficient\n }\n\n var txrQ = self.getTextureQueue(txrH);\n\n // first try the second last one in case it has space at the end\n var txr = txrQ[txrQ.length - 2];\n var addNewTxr = function addNewTxr() {\n return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW);\n };\n\n // try the last one if there is no second last one\n if (!txr) {\n txr = txrQ[txrQ.length - 1];\n }\n\n // if the last one doesn't exist, we need a first one\n if (!txr) {\n txr = addNewTxr();\n }\n\n // if there's no room in the current texture, we need a new one\n if (txr.width - txr.usedWidth < eleScaledW) {\n txr = addNewTxr();\n }\n var scalableFrom = function scalableFrom(otherCache) {\n return otherCache && otherCache.scaledLabelShown === scaledLabelShown;\n };\n var deqing = reason && reason === getTxrReasons.dequeue;\n var highQualityReq = reason && reason === getTxrReasons.highQuality;\n var downscaleReq = reason && reason === getTxrReasons.downscale;\n var higherCache; // the nearest cache with a higher level\n for (var l = lvl + 1; l <= maxLvl$1; l++) {\n var c = lookup.get(ele, l);\n if (c) {\n higherCache = c;\n break;\n }\n }\n var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null;\n var downscale = function downscale() {\n txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH);\n };\n\n // reset ele area in texture\n txr.context.setTransform(1, 0, 0, 1, 0, 0);\n txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH);\n if (scalableFrom(oneUpCache)) {\n // then we can relatively cheaply rescale the existing image w/o rerendering\n downscale();\n } else if (scalableFrom(higherCache)) {\n // then use the higher cache for now and queue the next level down\n // to cheaply scale towards the smaller level\n\n if (highQualityReq) {\n for (var _l = higherCache.level; _l > lvl; _l--) {\n oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale);\n }\n downscale();\n } else {\n self.queueElement(ele, higherCache.level - 1);\n return higherCache;\n }\n } else {\n var lowerCache; // the nearest cache with a lower level\n if (!deqing && !highQualityReq && !downscaleReq) {\n for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) {\n var _c = lookup.get(ele, _l2);\n if (_c) {\n lowerCache = _c;\n break;\n }\n }\n }\n if (scalableFrom(lowerCache)) {\n // then use the lower quality cache for now and queue the better one for later\n\n self.queueElement(ele, lvl);\n return lowerCache;\n }\n txr.context.translate(txr.usedWidth, 0);\n txr.context.scale(scale, scale);\n this.drawElement(txr.context, ele, bb, scaledLabelShown, false);\n txr.context.scale(1 / scale, 1 / scale);\n txr.context.translate(-txr.usedWidth, 0);\n }\n eleCache = {\n x: txr.usedWidth,\n texture: txr,\n level: lvl,\n scale: scale,\n width: eleScaledW,\n height: eleScaledH,\n scaledLabelShown: scaledLabelShown\n };\n txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing);\n txr.eleCaches.push(eleCache);\n lookup.set(ele, lvl, eleCache);\n self.checkTextureFullness(txr);\n return eleCache;\n};\nETCp.invalidateElements = function (eles) {\n for (var i = 0; i < eles.length; i++) {\n this.invalidateElement(eles[i]);\n }\n};\nETCp.invalidateElement = function (ele) {\n var self = this;\n var lookup = self.lookup;\n var caches = [];\n var invalid = lookup.isInvalid(ele);\n if (!invalid) {\n return; // override the invalidation request if the element key has not changed\n }\n\n for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) {\n var cache = lookup.getForCachedKey(ele, lvl);\n if (cache) {\n caches.push(cache);\n }\n }\n var noOtherElesUseCache = lookup.invalidate(ele);\n if (noOtherElesUseCache) {\n for (var i = 0; i < caches.length; i++) {\n var _cache = caches[i];\n var txr = _cache.texture;\n\n // remove space from the texture it belongs to\n txr.invalidatedWidth += _cache.width;\n\n // mark the cache as invalidated\n _cache.invalidated = true;\n\n // retire the texture if its utility is low\n self.checkTextureUtility(txr);\n }\n }\n\n // remove from queue since the old req was for the old state\n self.removeFromQueue(ele);\n};\nETCp.checkTextureUtility = function (txr) {\n // invalidate all entries in the cache if the cache size is small\n if (txr.invalidatedWidth >= minUtility * txr.width) {\n this.retireTexture(txr);\n }\n};\nETCp.checkTextureFullness = function (txr) {\n // if texture has been mostly filled and passed over several times, remove\n // it from the queue so we don't need to waste time looking at it to put new things\n\n var self = this;\n var txrQ = self.getTextureQueue(txr.height);\n if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) {\n removeFromArray(txrQ, txr);\n } else {\n txr.fullnessChecks++;\n }\n};\nETCp.retireTexture = function (txr) {\n var self = this;\n var txrH = txr.height;\n var txrQ = self.getTextureQueue(txrH);\n var lookup = this.lookup;\n\n // retire the texture from the active / searchable queue:\n\n removeFromArray(txrQ, txr);\n txr.retired = true;\n\n // remove the refs from the eles to the caches:\n\n var eleCaches = txr.eleCaches;\n for (var i = 0; i < eleCaches.length; i++) {\n var eleCache = eleCaches[i];\n lookup.deleteCache(eleCache.key, eleCache.level);\n }\n clearArray(eleCaches);\n\n // add the texture to a retired queue so it can be recycled in future:\n\n var rtxtrQ = self.getRetiredTextureQueue(txrH);\n rtxtrQ.push(txr);\n};\nETCp.addTexture = function (txrH, minW) {\n var self = this;\n var txrQ = self.getTextureQueue(txrH);\n var txr = {};\n txrQ.push(txr);\n txr.eleCaches = [];\n txr.height = txrH;\n txr.width = Math.max(defTxrWidth, minW);\n txr.usedWidth = 0;\n txr.invalidatedWidth = 0;\n txr.fullnessChecks = 0;\n txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height);\n txr.context = txr.canvas.getContext('2d');\n return txr;\n};\nETCp.recycleTexture = function (txrH, minW) {\n var self = this;\n var txrQ = self.getTextureQueue(txrH);\n var rtxtrQ = self.getRetiredTextureQueue(txrH);\n for (var i = 0; i < rtxtrQ.length; i++) {\n var txr = rtxtrQ[i];\n if (txr.width >= minW) {\n txr.retired = false;\n txr.usedWidth = 0;\n txr.invalidatedWidth = 0;\n txr.fullnessChecks = 0;\n clearArray(txr.eleCaches);\n txr.context.setTransform(1, 0, 0, 1, 0, 0);\n txr.context.clearRect(0, 0, txr.width, txr.height);\n removeFromArray(rtxtrQ, txr);\n txrQ.push(txr);\n return txr;\n }\n }\n};\nETCp.queueElement = function (ele, lvl) {\n var self = this;\n var q = self.getElementQueue();\n var k2q = self.getElementKeyToQueue();\n var key = this.getKey(ele);\n var existingReq = k2q[key];\n if (existingReq) {\n // use the max lvl b/c in between lvls are cheap to make\n existingReq.level = Math.max(existingReq.level, lvl);\n existingReq.eles.merge(ele);\n existingReq.reqs++;\n q.updateItem(existingReq);\n } else {\n var req = {\n eles: ele.spawn().merge(ele),\n level: lvl,\n reqs: 1,\n key: key\n };\n q.push(req);\n k2q[key] = req;\n }\n};\nETCp.dequeue = function (pxRatio /*, extent*/) {\n var self = this;\n var q = self.getElementQueue();\n var k2q = self.getElementKeyToQueue();\n var dequeued = [];\n var lookup = self.lookup;\n for (var i = 0; i < maxDeqSize$1; i++) {\n if (q.size() > 0) {\n var req = q.pop();\n var key = req.key;\n var ele = req.eles[0]; // all eles have the same key\n var cacheExists = lookup.hasCache(ele, req.level);\n\n // clear out the key to req lookup\n k2q[key] = null;\n\n // dequeueing isn't necessary with an existing cache\n if (cacheExists) {\n continue;\n }\n dequeued.push(req);\n var bb = self.getBoundingBox(ele);\n self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue);\n } else {\n break;\n }\n }\n return dequeued;\n};\nETCp.removeFromQueue = function (ele) {\n var self = this;\n var q = self.getElementQueue();\n var k2q = self.getElementKeyToQueue();\n var key = this.getKey(ele);\n var req = k2q[key];\n if (req != null) {\n if (req.eles.length === 1) {\n // remove if last ele in the req\n // bring to front of queue\n req.reqs = MAX_INT$1;\n q.updateItem(req);\n q.pop(); // remove from queue\n\n k2q[key] = null; // remove from lookup map\n } else {\n // otherwise just remove ele from req\n req.eles.unmerge(ele);\n }\n }\n};\nETCp.onDequeue = function (fn) {\n this.onDequeues.push(fn);\n};\nETCp.offDequeue = function (fn) {\n removeFromArray(this.onDequeues, fn);\n};\nETCp.setupDequeueing = defs.setupDequeueing({\n deqRedrawThreshold: deqRedrawThreshold$1,\n deqCost: deqCost$1,\n deqAvgCost: deqAvgCost$1,\n deqNoDrawCost: deqNoDrawCost$1,\n deqFastCost: deqFastCost$1,\n deq: function deq(self, pxRatio, extent) {\n return self.dequeue(pxRatio, extent);\n },\n onDeqd: function onDeqd(self, deqd) {\n for (var i = 0; i < self.onDequeues.length; i++) {\n var fn = self.onDequeues[i];\n fn(deqd);\n }\n },\n shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) {\n for (var i = 0; i < deqd.length; i++) {\n var eles = deqd[i].eles;\n for (var j = 0; j < eles.length; j++) {\n var bb = eles[j].boundingBox();\n if (boundingBoxesIntersect(bb, extent)) {\n return true;\n }\n }\n }\n return false;\n },\n priority: function priority(self) {\n return self.renderer.beforeRenderPriorities.eleTxrDeq;\n }\n});\n\nvar defNumLayers = 1; // default number of layers to use\nvar minLvl = -4; // when scaling smaller than that we don't need to re-render\nvar maxLvl = 2; // when larger than this scale just render directly (caching is not helpful)\nvar maxZoom = 3.99; // beyond this zoom level, layered textures are not used\nvar deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile\nvar refineEleDebounceTime = 50; // time to debounce sharper ele texture updates\nvar deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame\nvar deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time\nvar deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing\nvar deqFastCost = 0.9; // % of frame time to be used when >60fps\nvar maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch\nvar invalidThreshold = 250; // time threshold for disabling b/c of invalidations\nvar maxLayerArea = 4000 * 4000; // layers can't be bigger than this\nvar useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm)\n\n// var log = function(){ console.log.apply( console, arguments ); };\n\nvar LayeredTextureCache = function LayeredTextureCache(renderer) {\n var self = this;\n var r = self.renderer = renderer;\n var cy = r.cy;\n self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ]\n\n self.firstGet = true;\n self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold;\n self.skipping = false;\n self.eleTxrDeqs = cy.collection();\n self.scheduleElementRefinement = debounce_1(function () {\n self.refineElementTextures(self.eleTxrDeqs);\n self.eleTxrDeqs.unmerge(self.eleTxrDeqs);\n }, refineEleDebounceTime);\n r.beforeRender(function (willDraw, now) {\n if (now - self.lastInvalidationTime <= invalidThreshold) {\n self.skipping = true;\n } else {\n self.skipping = false;\n }\n }, r.beforeRenderPriorities.lyrTxrSkip);\n var qSort = function qSort(a, b) {\n return b.reqs - a.reqs;\n };\n self.layersQueue = new heap(qSort);\n self.setupDequeueing();\n};\nvar LTCp = LayeredTextureCache.prototype;\nvar layerIdPool = 0;\nvar MAX_INT = Math.pow(2, 53) - 1;\nLTCp.makeLayer = function (bb, lvl) {\n var scale = Math.pow(2, lvl);\n var w = Math.ceil(bb.w * scale);\n var h = Math.ceil(bb.h * scale);\n var canvas = this.renderer.makeOffscreenCanvas(w, h);\n var layer = {\n id: layerIdPool = ++layerIdPool % MAX_INT,\n bb: bb,\n level: lvl,\n width: w,\n height: h,\n canvas: canvas,\n context: canvas.getContext('2d'),\n eles: [],\n elesQueue: [],\n reqs: 0\n };\n\n // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level);\n\n var cxt = layer.context;\n var dx = -layer.bb.x1;\n var dy = -layer.bb.y1;\n\n // do the transform on creation to save cycles (it's the same for all eles)\n cxt.scale(scale, scale);\n cxt.translate(dx, dy);\n return layer;\n};\nLTCp.getLayers = function (eles, pxRatio, lvl) {\n var self = this;\n var r = self.renderer;\n var cy = r.cy;\n var zoom = cy.zoom();\n var firstGet = self.firstGet;\n self.firstGet = false;\n\n // log('--\\nget layers with %s eles', eles.length);\n //log eles.map(function(ele){ return ele.id() }) );\n\n if (lvl == null) {\n lvl = Math.ceil(log2(zoom * pxRatio));\n if (lvl < minLvl) {\n lvl = minLvl;\n } else if (zoom >= maxZoom || lvl > maxLvl) {\n return null;\n }\n }\n self.validateLayersElesOrdering(lvl, eles);\n var layersByLvl = self.layersByLevel;\n var scale = Math.pow(2, lvl);\n var layers = layersByLvl[lvl] = layersByLvl[lvl] || [];\n var bb;\n var lvlComplete = self.levelIsComplete(lvl, eles);\n var tmpLayers;\n var checkTempLevels = function checkTempLevels() {\n var canUseAsTmpLvl = function canUseAsTmpLvl(l) {\n self.validateLayersElesOrdering(l, eles);\n if (self.levelIsComplete(l, eles)) {\n tmpLayers = layersByLvl[l];\n return true;\n }\n };\n var checkLvls = function checkLvls(dir) {\n if (tmpLayers) {\n return;\n }\n for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) {\n if (canUseAsTmpLvl(l)) {\n break;\n }\n }\n };\n checkLvls(+1);\n checkLvls(-1);\n\n // remove the invalid layers; they will be replaced as needed later in this function\n for (var i = layers.length - 1; i >= 0; i--) {\n var layer = layers[i];\n if (layer.invalid) {\n removeFromArray(layers, layer);\n }\n }\n };\n if (!lvlComplete) {\n // if the current level is incomplete, then use the closest, best quality layerset temporarily\n // and later queue the current layerset so we can get the proper quality level soon\n\n checkTempLevels();\n } else {\n // log('level complete, using existing layers\\n--');\n return layers;\n }\n var getBb = function getBb() {\n if (!bb) {\n bb = makeBoundingBox();\n for (var i = 0; i < eles.length; i++) {\n updateBoundingBox(bb, eles[i].boundingBox());\n }\n }\n return bb;\n };\n var makeLayer = function makeLayer(opts) {\n opts = opts || {};\n var after = opts.after;\n getBb();\n var area = bb.w * scale * (bb.h * scale);\n if (area > maxLayerArea) {\n return null;\n }\n var layer = self.makeLayer(bb, lvl);\n if (after != null) {\n var index = layers.indexOf(after) + 1;\n layers.splice(index, 0, layer);\n } else if (opts.insert === undefined || opts.insert) {\n // no after specified => first layer made so put at start\n layers.unshift(layer);\n }\n\n // if( tmpLayers ){\n //self.queueLayer( layer );\n // }\n\n return layer;\n };\n if (self.skipping && !firstGet) {\n // log('skip layers');\n return null;\n }\n\n // log('do layers');\n\n var layer = null;\n var maxElesPerLayer = eles.length / defNumLayers;\n var allowLazyQueueing = !firstGet;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n var rs = ele._private.rscratch;\n var caches = rs.imgLayerCaches = rs.imgLayerCaches || {};\n\n // log('look at ele', ele.id());\n\n var existingLayer = caches[lvl];\n if (existingLayer) {\n // reuse layer for later eles\n // log('reuse layer for', ele.id());\n layer = existingLayer;\n continue;\n }\n if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) {\n // log('make new layer for ele %s', ele.id());\n\n layer = makeLayer({\n insert: true,\n after: layer\n });\n\n // if now layer can be built then we can't use layers at this level\n if (!layer) {\n return null;\n }\n\n // log('new layer with id %s', layer.id);\n }\n\n if (tmpLayers || allowLazyQueueing) {\n // log('queue ele %s in layer %s', ele.id(), layer.id);\n self.queueLayer(layer, ele);\n } else {\n // log('draw ele %s in layer %s', ele.id(), layer.id);\n self.drawEleInLayer(layer, ele, lvl, pxRatio);\n }\n layer.eles.push(ele);\n caches[lvl] = layer;\n }\n\n // log('--');\n\n if (tmpLayers) {\n // then we only queued the current layerset and can't draw it yet\n return tmpLayers;\n }\n if (allowLazyQueueing) {\n // log('lazy queue level', lvl);\n return null;\n }\n return layers;\n};\n\n// a layer may want to use an ele cache of a higher level to avoid blurriness\n// so the layer level might not equal the ele level\nLTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) {\n return lvl;\n};\nLTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) {\n var self = this;\n var r = this.renderer;\n var context = layer.context;\n var bb = ele.boundingBox();\n if (bb.w === 0 || bb.h === 0 || !ele.visible()) {\n return;\n }\n lvl = self.getEleLevelForLayerLevel(lvl, pxRatio);\n {\n r.setImgSmoothing(context, false);\n }\n {\n r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs);\n }\n {\n r.setImgSmoothing(context, true);\n }\n};\nLTCp.levelIsComplete = function (lvl, eles) {\n var self = this;\n var layers = self.layersByLevel[lvl];\n if (!layers || layers.length === 0) {\n return false;\n }\n var numElesInLayers = 0;\n for (var i = 0; i < layers.length; i++) {\n var layer = layers[i];\n\n // if there are any eles needed to be drawn yet, the level is not complete\n if (layer.reqs > 0) {\n return false;\n }\n\n // if the layer is invalid, the level is not complete\n if (layer.invalid) {\n return false;\n }\n numElesInLayers += layer.eles.length;\n }\n\n // we should have exactly the number of eles passed in to be complete\n if (numElesInLayers !== eles.length) {\n return false;\n }\n return true;\n};\nLTCp.validateLayersElesOrdering = function (lvl, eles) {\n var layers = this.layersByLevel[lvl];\n if (!layers) {\n return;\n }\n\n // if in a layer the eles are not in the same order, then the layer is invalid\n // (i.e. there is an ele in between the eles in the layer)\n\n for (var i = 0; i < layers.length; i++) {\n var layer = layers[i];\n var offset = -1;\n\n // find the offset\n for (var j = 0; j < eles.length; j++) {\n if (layer.eles[0] === eles[j]) {\n offset = j;\n break;\n }\n }\n if (offset < 0) {\n // then the layer has nonexistent elements and is invalid\n this.invalidateLayer(layer);\n continue;\n }\n\n // the eles in the layer must be in the same continuous order, else the layer is invalid\n\n var o = offset;\n for (var j = 0; j < layer.eles.length; j++) {\n if (layer.eles[j] !== eles[o + j]) {\n // log('invalidate based on ordering', layer.id);\n\n this.invalidateLayer(layer);\n break;\n }\n }\n }\n};\nLTCp.updateElementsInLayers = function (eles, update) {\n var self = this;\n var isEles = element(eles[0]);\n\n // collect udpated elements (cascaded from the layers) and update each\n // layer itself along the way\n for (var i = 0; i < eles.length; i++) {\n var req = isEles ? null : eles[i];\n var ele = isEles ? eles[i] : eles[i].ele;\n var rs = ele._private.rscratch;\n var caches = rs.imgLayerCaches = rs.imgLayerCaches || {};\n for (var l = minLvl; l <= maxLvl; l++) {\n var layer = caches[l];\n if (!layer) {\n continue;\n }\n\n // if update is a request from the ele cache, then it affects only\n // the matching level\n if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) {\n continue;\n }\n update(layer, ele, req);\n }\n }\n};\nLTCp.haveLayers = function () {\n var self = this;\n var haveLayers = false;\n for (var l = minLvl; l <= maxLvl; l++) {\n var layers = self.layersByLevel[l];\n if (layers && layers.length > 0) {\n haveLayers = true;\n break;\n }\n }\n return haveLayers;\n};\nLTCp.invalidateElements = function (eles) {\n var self = this;\n if (eles.length === 0) {\n return;\n }\n self.lastInvalidationTime = performanceNow();\n\n // log('update invalidate layer time from eles');\n\n if (eles.length === 0 || !self.haveLayers()) {\n return;\n }\n self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) {\n self.invalidateLayer(layer);\n });\n};\nLTCp.invalidateLayer = function (layer) {\n // log('update invalidate layer time');\n\n this.lastInvalidationTime = performanceNow();\n if (layer.invalid) {\n return;\n } // save cycles\n\n var lvl = layer.level;\n var eles = layer.eles;\n var layers = this.layersByLevel[lvl];\n\n // log('invalidate layer', layer.id );\n\n removeFromArray(layers, layer);\n // layer.eles = [];\n\n layer.elesQueue = [];\n layer.invalid = true;\n if (layer.replacement) {\n layer.replacement.invalid = true;\n }\n for (var i = 0; i < eles.length; i++) {\n var caches = eles[i]._private.rscratch.imgLayerCaches;\n if (caches) {\n caches[lvl] = null;\n }\n }\n};\nLTCp.refineElementTextures = function (eles) {\n var self = this;\n\n // log('refine', eles.length);\n\n self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) {\n var rLyr = layer.replacement;\n if (!rLyr) {\n rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level);\n rLyr.replaces = layer;\n rLyr.eles = layer.eles;\n\n // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level);\n }\n\n if (!rLyr.reqs) {\n for (var i = 0; i < rLyr.eles.length; i++) {\n self.queueLayer(rLyr, rLyr.eles[i]);\n }\n\n // log('queue replacement layer refinement', rLyr.id);\n }\n });\n};\n\nLTCp.enqueueElementRefinement = function (ele) {\n this.eleTxrDeqs.merge(ele);\n this.scheduleElementRefinement();\n};\nLTCp.queueLayer = function (layer, ele) {\n var self = this;\n var q = self.layersQueue;\n var elesQ = layer.elesQueue;\n var hasId = elesQ.hasId = elesQ.hasId || {};\n\n // if a layer is going to be replaced, queuing is a waste of time\n if (layer.replacement) {\n return;\n }\n if (ele) {\n if (hasId[ele.id()]) {\n return;\n }\n elesQ.push(ele);\n hasId[ele.id()] = true;\n }\n if (layer.reqs) {\n layer.reqs++;\n q.updateItem(layer);\n } else {\n layer.reqs = 1;\n q.push(layer);\n }\n};\nLTCp.dequeue = function (pxRatio) {\n var self = this;\n var q = self.layersQueue;\n var deqd = [];\n var eleDeqs = 0;\n while (eleDeqs < maxDeqSize) {\n if (q.size() === 0) {\n break;\n }\n var layer = q.peek();\n\n // if a layer has been or will be replaced, then don't waste time with it\n if (layer.replacement) {\n // log('layer %s in queue skipped b/c it already has a replacement', layer.id);\n q.pop();\n continue;\n }\n\n // if this is a replacement layer that has been superceded, then forget it\n if (layer.replaces && layer !== layer.replaces.replacement) {\n // log('layer is no longer the most uptodate replacement; dequeued', layer.id)\n q.pop();\n continue;\n }\n if (layer.invalid) {\n // log('replacement layer %s is invalid; dequeued', layer.id);\n q.pop();\n continue;\n }\n var ele = layer.elesQueue.shift();\n if (ele) {\n // log('dequeue layer %s', layer.id);\n\n self.drawEleInLayer(layer, ele, layer.level, pxRatio);\n eleDeqs++;\n }\n if (deqd.length === 0) {\n // we need only one entry in deqd to queue redrawing etc\n deqd.push(true);\n }\n\n // if the layer has all its eles done, then remove from the queue\n if (layer.elesQueue.length === 0) {\n q.pop();\n layer.reqs = 0;\n\n // log('dequeue of layer %s complete', layer.id);\n\n // when a replacement layer is dequeued, it replaces the old layer in the level\n if (layer.replaces) {\n self.applyLayerReplacement(layer);\n }\n self.requestRedraw();\n }\n }\n return deqd;\n};\nLTCp.applyLayerReplacement = function (layer) {\n var self = this;\n var layersInLevel = self.layersByLevel[layer.level];\n var replaced = layer.replaces;\n var index = layersInLevel.indexOf(replaced);\n\n // if the replaced layer is not in the active list for the level, then replacing\n // refs would be a mistake (i.e. overwriting the true active layer)\n if (index < 0 || replaced.invalid) {\n // log('replacement layer would have no effect', layer.id);\n return;\n }\n layersInLevel[index] = layer; // replace level ref\n\n // replace refs in eles\n for (var i = 0; i < layer.eles.length; i++) {\n var _p = layer.eles[i]._private;\n var cache = _p.imgLayerCaches = _p.imgLayerCaches || {};\n if (cache) {\n cache[layer.level] = layer;\n }\n }\n\n // log('apply replacement layer %s over %s', layer.id, replaced.id);\n\n self.requestRedraw();\n};\nLTCp.requestRedraw = debounce_1(function () {\n var r = this.renderer;\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n r.redraw();\n}, 100);\nLTCp.setupDequeueing = defs.setupDequeueing({\n deqRedrawThreshold: deqRedrawThreshold,\n deqCost: deqCost,\n deqAvgCost: deqAvgCost,\n deqNoDrawCost: deqNoDrawCost,\n deqFastCost: deqFastCost,\n deq: function deq(self, pxRatio) {\n return self.dequeue(pxRatio);\n },\n onDeqd: noop$1,\n shouldRedraw: trueify,\n priority: function priority(self) {\n return self.renderer.beforeRenderPriorities.lyrTxrDeq;\n }\n});\n\nvar CRp$a = {};\nvar impl;\nfunction polygon(context, points) {\n for (var i = 0; i < points.length; i++) {\n var pt = points[i];\n context.lineTo(pt.x, pt.y);\n }\n}\nfunction triangleBackcurve(context, points, controlPoint) {\n var firstPt;\n for (var i = 0; i < points.length; i++) {\n var pt = points[i];\n if (i === 0) {\n firstPt = pt;\n }\n context.lineTo(pt.x, pt.y);\n }\n context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y);\n}\nfunction triangleTee(context, trianglePoints, teePoints) {\n if (context.beginPath) {\n context.beginPath();\n }\n var triPts = trianglePoints;\n for (var i = 0; i < triPts.length; i++) {\n var pt = triPts[i];\n context.lineTo(pt.x, pt.y);\n }\n var teePts = teePoints;\n var firstTeePt = teePoints[0];\n context.moveTo(firstTeePt.x, firstTeePt.y);\n for (var i = 1; i < teePts.length; i++) {\n var pt = teePts[i];\n context.lineTo(pt.x, pt.y);\n }\n if (context.closePath) {\n context.closePath();\n }\n}\nfunction circleTriangle(context, trianglePoints, rx, ry, r) {\n if (context.beginPath) {\n context.beginPath();\n }\n context.arc(rx, ry, r, 0, Math.PI * 2, false);\n var triPts = trianglePoints;\n var firstTrPt = triPts[0];\n context.moveTo(firstTrPt.x, firstTrPt.y);\n for (var i = 0; i < triPts.length; i++) {\n var pt = triPts[i];\n context.lineTo(pt.x, pt.y);\n }\n if (context.closePath) {\n context.closePath();\n }\n}\nfunction circle(context, rx, ry, r) {\n context.arc(rx, ry, r, 0, Math.PI * 2, false);\n}\nCRp$a.arrowShapeImpl = function (name) {\n return (impl || (impl = {\n 'polygon': polygon,\n 'triangle-backcurve': triangleBackcurve,\n 'triangle-tee': triangleTee,\n 'circle-triangle': circleTriangle,\n 'triangle-cross': triangleTee,\n 'circle': circle\n }))[name];\n};\n\nvar CRp$9 = {};\nCRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) {\n var r = this;\n if (ele.isNode()) {\n r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity);\n } else {\n r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity);\n }\n};\nCRp$9.drawElementOverlay = function (context, ele) {\n var r = this;\n if (ele.isNode()) {\n r.drawNodeOverlay(context, ele);\n } else {\n r.drawEdgeOverlay(context, ele);\n }\n};\nCRp$9.drawElementUnderlay = function (context, ele) {\n var r = this;\n if (ele.isNode()) {\n r.drawNodeUnderlay(context, ele);\n } else {\n r.drawEdgeUnderlay(context, ele);\n }\n};\nCRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) {\n var r = this;\n var bb = eleTxrCache.getBoundingBox(ele);\n if (bb.w === 0 || bb.h === 0) {\n return;\n } // ignore zero size case\n\n var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason);\n if (eleCache != null) {\n var opacity = getOpacity(r, ele);\n if (opacity === 0) {\n return;\n }\n var theta = getRotation(r, ele);\n var x1 = bb.x1,\n y1 = bb.y1,\n w = bb.w,\n h = bb.h;\n var x, y, sx, sy, smooth;\n if (theta !== 0) {\n var rotPt = eleTxrCache.getRotationPoint(ele);\n sx = rotPt.x;\n sy = rotPt.y;\n context.translate(sx, sy);\n context.rotate(theta);\n smooth = r.getImgSmoothing(context);\n if (!smooth) {\n r.setImgSmoothing(context, true);\n }\n var off = eleTxrCache.getRotationOffset(ele);\n x = off.x;\n y = off.y;\n } else {\n x = x1;\n y = y1;\n }\n var oldGlobalAlpha;\n if (opacity !== 1) {\n oldGlobalAlpha = context.globalAlpha;\n context.globalAlpha = oldGlobalAlpha * opacity;\n }\n context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h);\n if (opacity !== 1) {\n context.globalAlpha = oldGlobalAlpha;\n }\n if (theta !== 0) {\n context.rotate(-theta);\n context.translate(-sx, -sy);\n if (!smooth) {\n r.setImgSmoothing(context, false);\n }\n }\n } else {\n eleTxrCache.drawElement(context, ele); // direct draw fallback\n }\n};\n\nvar getZeroRotation = function getZeroRotation() {\n return 0;\n};\nvar getLabelRotation = function getLabelRotation(r, ele) {\n return r.getTextAngle(ele, null);\n};\nvar getSourceLabelRotation = function getSourceLabelRotation(r, ele) {\n return r.getTextAngle(ele, 'source');\n};\nvar getTargetLabelRotation = function getTargetLabelRotation(r, ele) {\n return r.getTextAngle(ele, 'target');\n};\nvar getOpacity = function getOpacity(r, ele) {\n return ele.effectiveOpacity();\n};\nvar getTextOpacity = function getTextOpacity(e, ele) {\n return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity();\n};\nCRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) {\n var r = this;\n var _r$data = r.data,\n eleTxrCache = _r$data.eleTxrCache,\n lblTxrCache = _r$data.lblTxrCache,\n slbTxrCache = _r$data.slbTxrCache,\n tlbTxrCache = _r$data.tlbTxrCache;\n var bb = ele.boundingBox();\n var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null;\n if (bb.w === 0 || bb.h === 0 || !ele.visible()) {\n return;\n }\n if (!extent || boundingBoxesIntersect(bb, extent)) {\n var isEdge = ele.isEdge();\n var badLine = ele.element()._private.rscratch.badLine;\n r.drawElementUnderlay(context, ele);\n r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity);\n if (!isEdge || !badLine) {\n r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity);\n }\n if (isEdge && !badLine) {\n r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity);\n r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity);\n }\n r.drawElementOverlay(context, ele);\n }\n};\nCRp$9.drawElements = function (context, eles) {\n var r = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n r.drawElement(context, ele);\n }\n};\nCRp$9.drawCachedElements = function (context, eles, pxRatio, extent) {\n var r = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n r.drawCachedElement(context, ele, pxRatio, extent);\n }\n};\nCRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) {\n var r = this;\n for (var i = 0; i < eles.length; i++) {\n var ele = eles[i];\n if (!ele.isNode()) {\n continue;\n }\n r.drawCachedElement(context, ele, pxRatio, extent);\n }\n};\nCRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) {\n var r = this;\n var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio);\n if (layers) {\n for (var i = 0; i < layers.length; i++) {\n var layer = layers[i];\n var bb = layer.bb;\n if (bb.w === 0 || bb.h === 0) {\n continue;\n }\n context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h);\n }\n } else {\n // fall back on plain caching if no layers\n r.drawCachedElements(context, eles, pxRatio, extent);\n }\n};\n\nvar CRp$8 = {};\nCRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) {\n var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var r = this;\n var rs = edge._private.rscratch;\n if (shouldDrawOpacity && !edge.visible()) {\n return;\n }\n\n // if bezier ctrl pts can not be calculated, then die\n if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) {\n // isNaN in case edge is impossible and browser bugs (e.g. safari)\n return;\n }\n var bb;\n if (shiftToOriginWithBb) {\n bb = shiftToOriginWithBb;\n context.translate(-bb.x1, -bb.y1);\n }\n var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1;\n var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1;\n var curveStyle = edge.pstyle('curve-style').value;\n var lineStyle = edge.pstyle('line-style').value;\n var edgeWidth = edge.pstyle('width').pfValue;\n var lineCap = edge.pstyle('line-cap').value;\n var lineOutlineWidth = edge.pstyle('line-outline-width').value;\n var lineOutlineColor = edge.pstyle('line-outline-color').value;\n var effectiveLineOpacity = opacity * lineOpacity;\n // separate arrow opacity would require arrow-opacity property\n var effectiveArrowOpacity = opacity * lineOpacity;\n var drawLine = function drawLine() {\n var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity;\n if (curveStyle === 'straight-triangle') {\n r.eleStrokeStyle(context, edge, strokeOpacity);\n r.drawEdgeTrianglePath(edge, context, rs.allpts);\n } else {\n context.lineWidth = edgeWidth;\n context.lineCap = lineCap;\n r.eleStrokeStyle(context, edge, strokeOpacity);\n r.drawEdgePath(edge, context, rs.allpts, lineStyle);\n context.lineCap = 'butt'; // reset for other drawing functions\n }\n };\n\n var drawLineOutline = function drawLineOutline() {\n var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity;\n context.lineWidth = edgeWidth + lineOutlineWidth;\n context.lineCap = lineCap;\n if (lineOutlineWidth > 0) {\n r.colorStrokeStyle(context, lineOutlineColor[0], lineOutlineColor[1], lineOutlineColor[2], strokeOpacity);\n } else {\n // do not draw any lineOutline\n context.lineCap = 'butt'; // reset for other drawing functions\n return;\n }\n if (curveStyle === 'straight-triangle') {\n r.drawEdgeTrianglePath(edge, context, rs.allpts);\n } else {\n r.drawEdgePath(edge, context, rs.allpts, lineStyle);\n context.lineCap = 'butt'; // reset for other drawing functions\n }\n };\n\n var drawOverlay = function drawOverlay() {\n if (!shouldDrawOverlay) {\n return;\n }\n r.drawEdgeOverlay(context, edge);\n };\n var drawUnderlay = function drawUnderlay() {\n if (!shouldDrawOverlay) {\n return;\n }\n r.drawEdgeUnderlay(context, edge);\n };\n var drawArrows = function drawArrows() {\n var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity;\n r.drawArrowheads(context, edge, arrowOpacity);\n };\n var drawText = function drawText() {\n r.drawElementText(context, edge, null, drawLabel);\n };\n context.lineJoin = 'round';\n var ghost = edge.pstyle('ghost').value === 'yes';\n if (ghost) {\n var gx = edge.pstyle('ghost-offset-x').pfValue;\n var gy = edge.pstyle('ghost-offset-y').pfValue;\n var ghostOpacity = edge.pstyle('ghost-opacity').value;\n var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity;\n context.translate(gx, gy);\n drawLine(effectiveGhostOpacity);\n drawArrows(effectiveGhostOpacity);\n context.translate(-gx, -gy);\n } else {\n drawLineOutline();\n }\n drawUnderlay();\n drawLine();\n drawArrows();\n drawOverlay();\n drawText();\n if (shiftToOriginWithBb) {\n context.translate(bb.x1, bb.y1);\n }\n};\nvar drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) {\n if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) {\n throw new Error('Invalid state');\n }\n return function (context, edge) {\n if (!edge.visible()) {\n return;\n }\n var opacity = edge.pstyle(\"\".concat(overlayOrUnderlay, \"-opacity\")).value;\n if (opacity === 0) {\n return;\n }\n var r = this;\n var usePaths = r.usePaths();\n var rs = edge._private.rscratch;\n var padding = edge.pstyle(\"\".concat(overlayOrUnderlay, \"-padding\")).pfValue;\n var width = 2 * padding;\n var color = edge.pstyle(\"\".concat(overlayOrUnderlay, \"-color\")).value;\n context.lineWidth = width;\n if (rs.edgeType === 'self' && !usePaths) {\n context.lineCap = 'butt';\n } else {\n context.lineCap = 'round';\n }\n r.colorStrokeStyle(context, color[0], color[1], color[2], opacity);\n r.drawEdgePath(edge, context, rs.allpts, 'solid');\n };\n};\nCRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay');\nCRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay');\nCRp$8.drawEdgePath = function (edge, context, pts, type) {\n var rs = edge._private.rscratch;\n var canvasCxt = context;\n var path;\n var pathCacheHit = false;\n var usePaths = this.usePaths();\n var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue;\n var lineDashOffset = edge.pstyle('line-dash-offset').pfValue;\n if (usePaths) {\n var pathCacheKey = pts.join('$');\n var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey;\n if (keyMatches) {\n path = context = rs.pathCache;\n pathCacheHit = true;\n } else {\n path = context = new Path2D();\n rs.pathCacheKey = pathCacheKey;\n rs.pathCache = path;\n }\n }\n if (canvasCxt.setLineDash) {\n // for very outofdate browsers\n switch (type) {\n case 'dotted':\n canvasCxt.setLineDash([1, 1]);\n break;\n case 'dashed':\n canvasCxt.setLineDash(lineDashPattern);\n canvasCxt.lineDashOffset = lineDashOffset;\n break;\n case 'solid':\n canvasCxt.setLineDash([]);\n break;\n }\n }\n if (!pathCacheHit && !rs.badLine) {\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(pts[0], pts[1]);\n switch (rs.edgeType) {\n case 'bezier':\n case 'self':\n case 'compound':\n case 'multibezier':\n for (var i = 2; i + 3 < pts.length; i += 4) {\n context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]);\n }\n break;\n case 'straight':\n case 'haystack':\n for (var _i = 2; _i + 1 < pts.length; _i += 2) {\n context.lineTo(pts[_i], pts[_i + 1]);\n }\n break;\n case 'segments':\n if (rs.isRound) {\n var _iterator = _createForOfIteratorHelper(rs.roundCorners),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var corner = _step.value;\n drawPreparedRoundCorner(context, corner);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n context.lineTo(pts[pts.length - 2], pts[pts.length - 1]);\n } else {\n for (var _i2 = 2; _i2 + 1 < pts.length; _i2 += 2) {\n context.lineTo(pts[_i2], pts[_i2 + 1]);\n }\n }\n break;\n }\n }\n context = canvasCxt;\n if (usePaths) {\n context.stroke(path);\n } else {\n context.stroke();\n }\n\n // reset any line dashes\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n};\nCRp$8.drawEdgeTrianglePath = function (edge, context, pts) {\n // use line stroke style for triangle fill style\n context.fillStyle = context.strokeStyle;\n var edgeWidth = edge.pstyle('width').pfValue;\n for (var i = 0; i + 1 < pts.length; i += 2) {\n var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]];\n var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]);\n var normal = [vector[1] / length, -vector[0] / length];\n var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2];\n context.beginPath();\n context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]);\n context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]);\n context.lineTo(pts[i + 2], pts[i + 3]);\n context.closePath();\n context.fill();\n }\n};\nCRp$8.drawArrowheads = function (context, edge, opacity) {\n var rs = edge._private.rscratch;\n var isHaystack = rs.edgeType === 'haystack';\n if (!isHaystack) {\n this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity);\n }\n this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity);\n this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity);\n if (!isHaystack) {\n this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity);\n }\n};\nCRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) {\n if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) {\n return;\n }\n var self = this;\n var arrowShape = edge.pstyle(prefix + '-arrow-shape').value;\n if (arrowShape === 'none') {\n return;\n }\n var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled';\n var arrowFill = edge.pstyle(prefix + '-arrow-fill').value;\n var edgeWidth = edge.pstyle('width').pfValue;\n var pArrowWidth = edge.pstyle(prefix + '-arrow-width');\n var arrowWidth = pArrowWidth.value === 'match-line' ? edgeWidth : pArrowWidth.pfValue;\n if (pArrowWidth.units === '%') arrowWidth *= edgeWidth;\n var edgeOpacity = edge.pstyle('opacity').value;\n if (opacity === undefined) {\n opacity = edgeOpacity;\n }\n var gco = context.globalCompositeOperation;\n if (opacity !== 1 || arrowFill === 'hollow') {\n // then extra clear is needed\n context.globalCompositeOperation = 'destination-out';\n self.colorFillStyle(context, 255, 255, 255, 1);\n self.colorStrokeStyle(context, 255, 255, 255, 1);\n self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, arrowWidth, x, y, angle);\n context.globalCompositeOperation = gco;\n } // otherwise, the opaque arrow clears it for free :)\n\n var color = edge.pstyle(prefix + '-arrow-color').value;\n self.colorFillStyle(context, color[0], color[1], color[2], opacity);\n self.colorStrokeStyle(context, color[0], color[1], color[2], opacity);\n self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, arrowWidth, x, y, angle);\n};\nCRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, shapeWidth, x, y, angle) {\n var r = this;\n var usePaths = this.usePaths() && shape !== 'triangle-cross';\n var pathCacheHit = false;\n var path;\n var canvasContext = context;\n var translation = {\n x: x,\n y: y\n };\n var scale = edge.pstyle('arrow-scale').value;\n var size = this.getArrowWidth(edgeWidth, scale);\n var shapeImpl = r.arrowShapes[shape];\n if (usePaths) {\n var cache = r.arrowPathCache = r.arrowPathCache || [];\n var key = hashString(shape);\n var cachedPath = cache[key];\n if (cachedPath != null) {\n path = context = cachedPath;\n pathCacheHit = true;\n } else {\n path = context = new Path2D();\n cache[key] = path;\n }\n }\n if (!pathCacheHit) {\n if (context.beginPath) {\n context.beginPath();\n }\n if (usePaths) {\n // store in the path cache with values easily manipulated later\n shapeImpl.draw(context, 1, 0, {\n x: 0,\n y: 0\n }, 1);\n } else {\n shapeImpl.draw(context, size, angle, translation, edgeWidth);\n }\n if (context.closePath) {\n context.closePath();\n }\n }\n context = canvasContext;\n if (usePaths) {\n // set transform to arrow position/orientation\n context.translate(x, y);\n context.rotate(angle);\n context.scale(size, size);\n }\n if (fill === 'filled' || fill === 'both') {\n if (usePaths) {\n context.fill(path);\n } else {\n context.fill();\n }\n }\n if (fill === 'hollow' || fill === 'both') {\n context.lineWidth = shapeWidth / (usePaths ? size : 1);\n context.lineJoin = 'miter';\n if (usePaths) {\n context.stroke(path);\n } else {\n context.stroke();\n }\n }\n if (usePaths) {\n // reset transform by applying inverse\n context.scale(1 / size, 1 / size);\n context.rotate(-angle);\n context.translate(-x, -y);\n }\n};\n\nvar CRp$7 = {};\nCRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) {\n // detect problematic cases for old browsers with bad images (cheaper than try-catch)\n if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) {\n return;\n }\n try {\n context.drawImage(img, ix, iy, iw, ih, x, y, w, h);\n } catch (e) {\n warn(e);\n }\n};\nCRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) {\n var r = this;\n var pos = node.position();\n var nodeX = pos.x;\n var nodeY = pos.y;\n var styleObj = node.cy().style();\n var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj);\n var fit = getIndexedStyle(node, 'background-fit', 'value', index);\n var repeat = getIndexedStyle(node, 'background-repeat', 'value', index);\n var nodeW = node.width();\n var nodeH = node.height();\n var paddingX2 = node.padding() * 2;\n var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2);\n var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2);\n var rs = node._private.rscratch;\n var clip = getIndexedStyle(node, 'background-clip', 'value', index);\n var shouldClip = clip === 'node';\n var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity;\n var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index);\n var cornerRadius = node.pstyle('corner-radius').value;\n if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue;\n var imgW = img.width || img.cachedW;\n var imgH = img.height || img.cachedH;\n\n // workaround for broken browsers like ie\n if (null == imgW || null == imgH) {\n document.body.appendChild(img); // eslint-disable-line no-undef\n\n imgW = img.cachedW = img.width || img.offsetWidth;\n imgH = img.cachedH = img.height || img.offsetHeight;\n document.body.removeChild(img); // eslint-disable-line no-undef\n }\n\n var w = imgW;\n var h = imgH;\n if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') {\n if (getIndexedStyle(node, 'background-width', 'units', index) === '%') {\n w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW;\n } else {\n w = getIndexedStyle(node, 'background-width', 'pfValue', index);\n }\n }\n if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') {\n if (getIndexedStyle(node, 'background-height', 'units', index) === '%') {\n h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH;\n } else {\n h = getIndexedStyle(node, 'background-height', 'pfValue', index);\n }\n }\n if (w === 0 || h === 0) {\n return; // no point in drawing empty image (and chrome is broken in this case)\n }\n\n if (fit === 'contain') {\n var scale = Math.min(nodeTW / w, nodeTH / h);\n w *= scale;\n h *= scale;\n } else if (fit === 'cover') {\n var scale = Math.max(nodeTW / w, nodeTH / h);\n w *= scale;\n h *= scale;\n }\n var x = nodeX - nodeTW / 2; // left\n var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index);\n var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index);\n if (posXUnits === '%') {\n x += (nodeTW - w) * posXPfVal;\n } else {\n x += posXPfVal;\n }\n var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index);\n var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index);\n if (offXUnits === '%') {\n x += (nodeTW - w) * offXPfVal;\n } else {\n x += offXPfVal;\n }\n var y = nodeY - nodeTH / 2; // top\n var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index);\n var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index);\n if (posYUnits === '%') {\n y += (nodeTH - h) * posYPfVal;\n } else {\n y += posYPfVal;\n }\n var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index);\n var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index);\n if (offYUnits === '%') {\n y += (nodeTH - h) * offYPfVal;\n } else {\n y += offYPfVal;\n }\n if (rs.pathCache) {\n x -= nodeX;\n y -= nodeY;\n nodeX = 0;\n nodeY = 0;\n }\n var gAlpha = context.globalAlpha;\n context.globalAlpha = imgOpacity;\n var smoothingEnabled = r.getImgSmoothing(context);\n var isSmoothingSwitched = false;\n if (smooth === 'no' && smoothingEnabled) {\n r.setImgSmoothing(context, false);\n isSmoothingSwitched = true;\n } else if (smooth === 'yes' && !smoothingEnabled) {\n r.setImgSmoothing(context, true);\n isSmoothingSwitched = true;\n }\n if (repeat === 'no-repeat') {\n if (shouldClip) {\n context.save();\n if (rs.pathCache) {\n context.clip(rs.pathCache);\n } else {\n r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH, cornerRadius, rs);\n context.clip();\n }\n }\n r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h);\n if (shouldClip) {\n context.restore();\n }\n } else {\n var pattern = context.createPattern(img, repeat);\n context.fillStyle = pattern;\n r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH, cornerRadius, rs);\n context.translate(x, y);\n context.fill();\n context.translate(-x, -y);\n }\n context.globalAlpha = gAlpha;\n if (isSmoothingSwitched) {\n r.setImgSmoothing(context, smoothingEnabled);\n }\n};\n\nvar CRp$6 = {};\nCRp$6.eleTextBiggerThanMin = function (ele, scale) {\n if (!scale) {\n var zoom = ele.cy().zoom();\n var pxRatio = this.getPixelRatio();\n var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level\n\n scale = Math.pow(2, lvl);\n }\n var computedSize = ele.pstyle('font-size').pfValue * scale;\n var minSize = ele.pstyle('min-zoomed-font-size').pfValue;\n if (computedSize < minSize) {\n return false;\n }\n return true;\n};\nCRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) {\n var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var r = this;\n if (force == null) {\n if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) {\n return;\n }\n } else if (force === false) {\n return;\n }\n if (ele.isNode()) {\n var label = ele.pstyle('label');\n if (!label || !label.value) {\n return;\n }\n var justification = r.getLabelJustification(ele);\n context.textAlign = justification;\n context.textBaseline = 'bottom';\n } else {\n var badLine = ele.element()._private.rscratch.badLine;\n var _label = ele.pstyle('label');\n var srcLabel = ele.pstyle('source-label');\n var tgtLabel = ele.pstyle('target-label');\n if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) {\n return;\n }\n context.textAlign = 'center';\n context.textBaseline = 'bottom';\n }\n var applyRotation = !shiftToOriginWithBb;\n var bb;\n if (shiftToOriginWithBb) {\n bb = shiftToOriginWithBb;\n context.translate(-bb.x1, -bb.y1);\n }\n if (prefix == null) {\n r.drawText(context, ele, null, applyRotation, useEleOpacity);\n if (ele.isEdge()) {\n r.drawText(context, ele, 'source', applyRotation, useEleOpacity);\n r.drawText(context, ele, 'target', applyRotation, useEleOpacity);\n }\n } else {\n r.drawText(context, ele, prefix, applyRotation, useEleOpacity);\n }\n if (shiftToOriginWithBb) {\n context.translate(bb.x1, bb.y1);\n }\n};\nCRp$6.getFontCache = function (context) {\n var cache;\n this.fontCaches = this.fontCaches || [];\n for (var i = 0; i < this.fontCaches.length; i++) {\n cache = this.fontCaches[i];\n if (cache.context === context) {\n return cache;\n }\n }\n cache = {\n context: context\n };\n this.fontCaches.push(cache);\n return cache;\n};\n\n// set up canvas context with font\n// returns transformed text string\nCRp$6.setupTextStyle = function (context, ele) {\n var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n // Font style\n var labelStyle = ele.pstyle('font-style').strValue;\n var labelSize = ele.pstyle('font-size').pfValue + 'px';\n var labelFamily = ele.pstyle('font-family').strValue;\n var labelWeight = ele.pstyle('font-weight').strValue;\n var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1;\n var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity;\n var color = ele.pstyle('color').value;\n var outlineColor = ele.pstyle('text-outline-color').value;\n context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily;\n context.lineJoin = 'round'; // so text outlines aren't jagged\n\n this.colorFillStyle(context, color[0], color[1], color[2], opacity);\n this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity);\n};\n\n// TODO ensure re-used\nfunction roundRect(ctx, x, y, width, height) {\n var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5;\n var stroke = arguments.length > 6 ? arguments[6] : undefined;\n ctx.beginPath();\n ctx.moveTo(x + radius, y);\n ctx.lineTo(x + width - radius, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + radius);\n ctx.lineTo(x + width, y + height - radius);\n ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);\n ctx.lineTo(x + radius, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - radius);\n ctx.lineTo(x, y + radius);\n ctx.quadraticCurveTo(x, y, x + radius, y);\n ctx.closePath();\n if (stroke) ctx.stroke();else ctx.fill();\n}\nCRp$6.getTextAngle = function (ele, prefix) {\n var theta;\n var _p = ele._private;\n var rscratch = _p.rscratch;\n var pdash = prefix ? prefix + '-' : '';\n var rotation = ele.pstyle(pdash + 'text-rotation');\n var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix);\n if (rotation.strValue === 'autorotate') {\n theta = ele.isEdge() ? textAngle : 0;\n } else if (rotation.strValue === 'none') {\n theta = 0;\n } else {\n theta = rotation.pfValue;\n }\n return theta;\n};\nCRp$6.drawText = function (context, ele, prefix) {\n var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var _p = ele._private;\n var rscratch = _p.rscratch;\n var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1;\n if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) {\n return;\n }\n\n // use 'main' as an alias for the main label (i.e. null prefix)\n if (prefix === 'main') {\n prefix = null;\n }\n var textX = getPrefixedProperty(rscratch, 'labelX', prefix);\n var textY = getPrefixedProperty(rscratch, 'labelY', prefix);\n var orgTextX, orgTextY; // used for rotation\n var text = this.getLabelText(ele, prefix);\n if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) {\n this.setupTextStyle(context, ele, useEleOpacity);\n var pdash = prefix ? prefix + '-' : '';\n var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix);\n var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix);\n var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue;\n var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue;\n var isEdge = ele.isEdge();\n var halign = ele.pstyle('text-halign').value;\n var valign = ele.pstyle('text-valign').value;\n if (isEdge) {\n halign = 'center';\n valign = 'center';\n }\n textX += marginX;\n textY += marginY;\n var theta;\n if (!applyRotation) {\n theta = 0;\n } else {\n theta = this.getTextAngle(ele, prefix);\n }\n if (theta !== 0) {\n orgTextX = textX;\n orgTextY = textY;\n context.translate(orgTextX, orgTextY);\n context.rotate(theta);\n textX = 0;\n textY = 0;\n }\n switch (valign) {\n case 'top':\n break;\n case 'center':\n textY += textH / 2;\n break;\n case 'bottom':\n textY += textH;\n break;\n }\n var backgroundOpacity = ele.pstyle('text-background-opacity').value;\n var borderOpacity = ele.pstyle('text-border-opacity').value;\n var textBorderWidth = ele.pstyle('text-border-width').pfValue;\n var backgroundPadding = ele.pstyle('text-background-padding').pfValue;\n var styleShape = ele.pstyle('text-background-shape').strValue;\n var rounded = styleShape.indexOf('round') === 0;\n var roundRadius = 2;\n if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) {\n var bgX = textX - backgroundPadding;\n switch (halign) {\n case 'left':\n bgX -= textW;\n break;\n case 'center':\n bgX -= textW / 2;\n break;\n }\n var bgY = textY - textH - backgroundPadding;\n var bgW = textW + 2 * backgroundPadding;\n var bgH = textH + 2 * backgroundPadding;\n if (backgroundOpacity > 0) {\n var textFill = context.fillStyle;\n var textBackgroundColor = ele.pstyle('text-background-color').value;\n context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')';\n if (rounded) {\n roundRect(context, bgX, bgY, bgW, bgH, roundRadius);\n } else {\n context.fillRect(bgX, bgY, bgW, bgH);\n }\n context.fillStyle = textFill;\n }\n if (textBorderWidth > 0 && borderOpacity > 0) {\n var textStroke = context.strokeStyle;\n var textLineWidth = context.lineWidth;\n var textBorderColor = ele.pstyle('text-border-color').value;\n var textBorderStyle = ele.pstyle('text-border-style').value;\n context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')';\n context.lineWidth = textBorderWidth;\n if (context.setLineDash) {\n // for very outofdate browsers\n switch (textBorderStyle) {\n case 'dotted':\n context.setLineDash([1, 1]);\n break;\n case 'dashed':\n context.setLineDash([4, 2]);\n break;\n case 'double':\n context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders\n context.setLineDash([]);\n break;\n case 'solid':\n context.setLineDash([]);\n break;\n }\n }\n if (rounded) {\n roundRect(context, bgX, bgY, bgW, bgH, roundRadius, 'stroke');\n } else {\n context.strokeRect(bgX, bgY, bgW, bgH);\n }\n if (textBorderStyle === 'double') {\n var whiteWidth = textBorderWidth / 2;\n if (rounded) {\n roundRect(context, bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2, roundRadius, 'stroke');\n } else {\n context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2);\n }\n }\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n context.lineWidth = textLineWidth;\n context.strokeStyle = textStroke;\n }\n }\n var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle\n\n if (lineWidth > 0) {\n context.lineWidth = lineWidth;\n }\n if (ele.pstyle('text-wrap').value === 'wrap') {\n var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix);\n var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix);\n var halfTextW = textW / 2;\n var justification = this.getLabelJustification(ele);\n if (justification === 'auto') ; else if (halign === 'left') {\n // auto justification : right\n if (justification === 'left') {\n textX += -textW;\n } else if (justification === 'center') {\n textX += -halfTextW;\n } // else same as auto\n } else if (halign === 'center') {\n // auto justfication : center\n if (justification === 'left') {\n textX += -halfTextW;\n } else if (justification === 'right') {\n textX += halfTextW;\n } // else same as auto\n } else if (halign === 'right') {\n // auto justification : left\n if (justification === 'center') {\n textX += halfTextW;\n } else if (justification === 'right') {\n textX += textW;\n } // else same as auto\n }\n\n switch (valign) {\n case 'top':\n textY -= (lines.length - 1) * lineHeight;\n break;\n case 'center':\n case 'bottom':\n textY -= (lines.length - 1) * lineHeight;\n break;\n }\n for (var l = 0; l < lines.length; l++) {\n if (lineWidth > 0) {\n context.strokeText(lines[l], textX, textY);\n }\n context.fillText(lines[l], textX, textY);\n textY += lineHeight;\n }\n } else {\n if (lineWidth > 0) {\n context.strokeText(text, textX, textY);\n }\n context.fillText(text, textX, textY);\n }\n if (theta !== 0) {\n context.rotate(-theta);\n context.translate(-orgTextX, -orgTextY);\n }\n }\n};\n\n/* global Path2D */\nvar CRp$5 = {};\nCRp$5.drawNode = function (context, node, shiftToOriginWithBb) {\n var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var r = this;\n var nodeWidth, nodeHeight;\n var _p = node._private;\n var rs = _p.rscratch;\n var pos = node.position();\n if (!number$1(pos.x) || !number$1(pos.y)) {\n return; // can't draw node with undefined position\n }\n\n if (shouldDrawOpacity && !node.visible()) {\n return;\n }\n var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1;\n var usePaths = r.usePaths();\n var path;\n var pathCacheHit = false;\n var padding = node.padding();\n nodeWidth = node.width() + 2 * padding;\n nodeHeight = node.height() + 2 * padding;\n\n //\n // setup shift\n\n var bb;\n if (shiftToOriginWithBb) {\n bb = shiftToOriginWithBb;\n context.translate(-bb.x1, -bb.y1);\n }\n\n //\n // load bg image\n\n var bgImgProp = node.pstyle('background-image');\n var urls = bgImgProp.value;\n var urlDefined = new Array(urls.length);\n var image = new Array(urls.length);\n var numImages = 0;\n for (var i = 0; i < urls.length; i++) {\n var url = urls[i];\n var defd = urlDefined[i] = url != null && url !== 'none';\n if (defd) {\n var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i);\n numImages++;\n\n // get image, and if not loaded then ask to redraw when later loaded\n image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () {\n _p.backgroundTimestamp = Date.now();\n node.emitAndNotify('background');\n });\n }\n }\n\n //\n // setup styles\n\n var darkness = node.pstyle('background-blacken').value;\n var borderWidth = node.pstyle('border-width').pfValue;\n var bgOpacity = node.pstyle('background-opacity').value * eleOpacity;\n var borderColor = node.pstyle('border-color').value;\n var borderStyle = node.pstyle('border-style').value;\n var borderJoin = node.pstyle('border-join').value;\n var borderCap = node.pstyle('border-cap').value;\n var borderPosition = node.pstyle('border-position').value;\n var borderPattern = node.pstyle('border-dash-pattern').pfValue;\n var borderOffset = node.pstyle('border-dash-offset').pfValue;\n var borderOpacity = node.pstyle('border-opacity').value * eleOpacity;\n var outlineWidth = node.pstyle('outline-width').pfValue;\n var outlineColor = node.pstyle('outline-color').value;\n var outlineStyle = node.pstyle('outline-style').value;\n var outlineOpacity = node.pstyle('outline-opacity').value * eleOpacity;\n var outlineOffset = node.pstyle('outline-offset').value;\n var cornerRadius = node.pstyle('corner-radius').value;\n if (cornerRadius !== 'auto') cornerRadius = node.pstyle('corner-radius').pfValue;\n var setupShapeColor = function setupShapeColor() {\n var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity;\n r.eleFillStyle(context, node, bgOpy);\n };\n var setupBorderColor = function setupBorderColor() {\n var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity;\n r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy);\n };\n var setupOutlineColor = function setupOutlineColor() {\n var otlnOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : outlineOpacity;\n r.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], otlnOpy);\n };\n\n //\n // setup shape\n\n var getPath = function getPath(width, height, shape, points) {\n var pathCache = r.nodePathCache = r.nodePathCache || [];\n var key = hashStrings(shape === 'polygon' ? shape + ',' + points.join(',') : shape, '' + height, '' + width, '' + cornerRadius);\n var cachedPath = pathCache[key];\n var path;\n var cacheHit = false;\n if (cachedPath != null) {\n path = cachedPath;\n cacheHit = true;\n rs.pathCache = path;\n } else {\n path = new Path2D();\n pathCache[key] = rs.pathCache = path;\n }\n return {\n path: path,\n cacheHit: cacheHit\n };\n };\n var styleShape = node.pstyle('shape').strValue;\n var shapePts = node.pstyle('shape-polygon-points').pfValue;\n if (usePaths) {\n context.translate(pos.x, pos.y);\n var shapePath = getPath(nodeWidth, nodeHeight, styleShape, shapePts);\n path = shapePath.path;\n pathCacheHit = shapePath.cacheHit;\n }\n var drawShape = function drawShape() {\n if (!pathCacheHit) {\n var npos = pos;\n if (usePaths) {\n npos = {\n x: 0,\n y: 0\n };\n }\n r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight, cornerRadius, rs);\n }\n if (usePaths) {\n context.fill(path);\n } else {\n context.fill();\n }\n };\n var drawImages = function drawImages() {\n var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity;\n var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var prevBging = _p.backgrounding;\n var totalCompleted = 0;\n for (var _i = 0; _i < image.length; _i++) {\n var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i);\n if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') {\n totalCompleted++;\n continue;\n }\n if (urlDefined[_i] && image[_i].complete && !image[_i].error) {\n totalCompleted++;\n r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity);\n }\n }\n _p.backgrounding = !(totalCompleted === numImages);\n if (prevBging !== _p.backgrounding) {\n // update style b/c :backgrounding state changed\n node.updateStyle(false);\n }\n };\n var drawPie = function drawPie() {\n var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity;\n if (r.hasPie(node)) {\n r.drawPie(context, node, pieOpacity);\n\n // redraw/restore path if steps after pie need it\n if (redrawShape) {\n if (!usePaths) {\n r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight, cornerRadius, rs);\n }\n }\n }\n };\n var darken = function darken() {\n var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity;\n var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity;\n var c = darkness > 0 ? 0 : 255;\n if (darkness !== 0) {\n r.colorFillStyle(context, c, c, c, opacity);\n if (usePaths) {\n context.fill(path);\n } else {\n context.fill();\n }\n }\n };\n var drawBorder = function drawBorder() {\n if (borderWidth > 0) {\n context.lineWidth = borderWidth;\n context.lineCap = borderCap;\n context.lineJoin = borderJoin;\n if (context.setLineDash) {\n // for very outofdate browsers\n switch (borderStyle) {\n case 'dotted':\n context.setLineDash([1, 1]);\n break;\n case 'dashed':\n context.setLineDash(borderPattern);\n context.lineDashOffset = borderOffset;\n break;\n case 'solid':\n case 'double':\n context.setLineDash([]);\n break;\n }\n }\n if (borderPosition !== 'center') {\n context.save();\n context.lineWidth *= 2;\n if (borderPosition === 'inside') {\n usePaths ? context.clip(path) : context.clip();\n } else {\n var region = new Path2D();\n region.rect(-nodeWidth / 2 - borderWidth, -nodeHeight / 2 - borderWidth, nodeWidth + 2 * borderWidth, nodeHeight + 2 * borderWidth);\n region.addPath(path);\n context.clip(region, 'evenodd');\n }\n usePaths ? context.stroke(path) : context.stroke();\n context.restore();\n } else {\n usePaths ? context.stroke(path) : context.stroke();\n }\n if (borderStyle === 'double') {\n context.lineWidth = borderWidth / 3;\n var gco = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n if (usePaths) {\n context.stroke(path);\n } else {\n context.stroke();\n }\n context.globalCompositeOperation = gco;\n }\n\n // reset in case we changed the border style\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n }\n };\n var drawOutline = function drawOutline() {\n if (outlineWidth > 0) {\n context.lineWidth = outlineWidth;\n context.lineCap = 'butt';\n if (context.setLineDash) {\n // for very outofdate browsers\n switch (outlineStyle) {\n case 'dotted':\n context.setLineDash([1, 1]);\n break;\n case 'dashed':\n context.setLineDash([4, 2]);\n break;\n case 'solid':\n case 'double':\n context.setLineDash([]);\n break;\n }\n }\n var npos = pos;\n if (usePaths) {\n npos = {\n x: 0,\n y: 0\n };\n }\n var shape = r.getNodeShape(node);\n var bWidth = borderWidth;\n if (borderPosition === 'inside') bWidth = 0;\n if (borderPosition === 'outside') bWidth *= 2;\n var scaleX = (nodeWidth + bWidth + (outlineWidth + outlineOffset)) / nodeWidth;\n var scaleY = (nodeHeight + bWidth + (outlineWidth + outlineOffset)) / nodeHeight;\n var sWidth = nodeWidth * scaleX;\n var sHeight = nodeHeight * scaleY;\n var points = r.nodeShapes[shape].points;\n var _path;\n if (usePaths) {\n var outlinePath = getPath(sWidth, sHeight, shape, points);\n _path = outlinePath.path;\n }\n\n // draw the outline path, either by using expanded points or by scaling \n // the dimensions, depending on shape\n if (shape === \"ellipse\") {\n r.drawEllipsePath(_path || context, npos.x, npos.y, sWidth, sHeight);\n } else if (['round-diamond', 'round-heptagon', 'round-hexagon', 'round-octagon', 'round-pentagon', 'round-polygon', 'round-triangle', 'round-tag'].includes(shape)) {\n var sMult = 0;\n var offsetX = 0;\n var offsetY = 0;\n if (shape === 'round-diamond') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.4;\n } else if (shape === 'round-heptagon') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.075;\n offsetY = -(bWidth / 2 + outlineOffset + outlineWidth) / 35;\n } else if (shape === 'round-hexagon') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.12;\n } else if (shape === 'round-pentagon') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.13;\n offsetY = -(bWidth / 2 + outlineOffset + outlineWidth) / 15;\n } else if (shape === 'round-tag') {\n sMult = (bWidth + outlineOffset + outlineWidth) * 1.12;\n offsetX = (bWidth / 2 + outlineWidth + outlineOffset) * .07;\n } else if (shape === 'round-triangle') {\n sMult = (bWidth + outlineOffset + outlineWidth) * (Math.PI / 2);\n offsetY = -(bWidth + outlineOffset / 2 + outlineWidth) / Math.PI;\n }\n if (sMult !== 0) {\n scaleX = (nodeWidth + sMult) / nodeWidth;\n sWidth = nodeWidth * scaleX;\n if (!['round-hexagon', 'round-tag'].includes(shape)) {\n scaleY = (nodeHeight + sMult) / nodeHeight;\n sHeight = nodeHeight * scaleY;\n }\n }\n cornerRadius = cornerRadius === 'auto' ? getRoundPolygonRadius(sWidth, sHeight) : cornerRadius;\n var halfW = sWidth / 2;\n var halfH = sHeight / 2;\n var radius = cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2;\n var p = new Array(points.length / 2);\n var corners = new Array(points.length / 2);\n for (var _i3 = 0; _i3 < points.length / 2; _i3++) {\n p[_i3] = {\n x: npos.x + offsetX + halfW * points[_i3 * 2],\n y: npos.y + offsetY + halfH * points[_i3 * 2 + 1]\n };\n }\n var _i2,\n p1,\n p2,\n p3,\n len = p.length;\n p1 = p[len - 1];\n // for each point\n for (_i2 = 0; _i2 < len; _i2++) {\n p2 = p[_i2 % len];\n p3 = p[(_i2 + 1) % len];\n corners[_i2] = getRoundCorner(p1, p2, p3, radius);\n p1 = p2;\n p2 = p3;\n }\n r.drawRoundPolygonPath(_path || context, npos.x + offsetX, npos.y + offsetY, nodeWidth * scaleX, nodeHeight * scaleY, points, corners);\n } else if (['roundrectangle', 'round-rectangle'].includes(shape)) {\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(sWidth, sHeight) : cornerRadius;\n r.drawRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2);\n } else if (['cutrectangle', 'cut-rectangle'].includes(shape)) {\n cornerRadius = cornerRadius === 'auto' ? getCutRectangleCornerLength() : cornerRadius;\n r.drawCutRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, null, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 4);\n } else if (['bottomroundrectangle', 'bottom-round-rectangle'].includes(shape)) {\n cornerRadius = cornerRadius === 'auto' ? getRoundRectangleRadius(sWidth, sHeight) : cornerRadius;\n r.drawBottomRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight, cornerRadius + (bWidth + outlineWidth + outlineOffset) / 2);\n } else if (shape === \"barrel\") {\n r.drawBarrelPath(_path || context, npos.x, npos.y, sWidth, sHeight);\n } else if (shape.startsWith(\"polygon\") || ['rhomboid', 'right-rhomboid', 'round-tag', 'tag', 'vee'].includes(shape)) {\n var pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth;\n points = joinLines(expandPolygon(points, pad));\n r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points);\n } else {\n var _pad = (bWidth + outlineWidth + outlineOffset) / nodeWidth;\n points = joinLines(expandPolygon(points, -_pad));\n r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points);\n }\n if (usePaths) {\n context.stroke(_path);\n } else {\n context.stroke();\n }\n if (outlineStyle === 'double') {\n context.lineWidth = bWidth / 3;\n var gco = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n if (usePaths) {\n context.stroke(_path);\n } else {\n context.stroke();\n }\n context.globalCompositeOperation = gco;\n }\n\n // reset in case we changed the border style\n if (context.setLineDash) {\n // for very outofdate browsers\n context.setLineDash([]);\n }\n }\n };\n var drawOverlay = function drawOverlay() {\n if (shouldDrawOverlay) {\n r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight);\n }\n };\n var drawUnderlay = function drawUnderlay() {\n if (shouldDrawOverlay) {\n r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight);\n }\n };\n var drawText = function drawText() {\n r.drawElementText(context, node, null, drawLabel);\n };\n var ghost = node.pstyle('ghost').value === 'yes';\n if (ghost) {\n var gx = node.pstyle('ghost-offset-x').pfValue;\n var gy = node.pstyle('ghost-offset-y').pfValue;\n var ghostOpacity = node.pstyle('ghost-opacity').value;\n var effGhostOpacity = ghostOpacity * eleOpacity;\n context.translate(gx, gy);\n setupOutlineColor();\n drawOutline();\n setupShapeColor(ghostOpacity * bgOpacity);\n drawShape();\n drawImages(effGhostOpacity, true);\n setupBorderColor(ghostOpacity * borderOpacity);\n drawBorder();\n drawPie(darkness !== 0 || borderWidth !== 0);\n drawImages(effGhostOpacity, false);\n darken(effGhostOpacity);\n context.translate(-gx, -gy);\n }\n if (usePaths) {\n context.translate(-pos.x, -pos.y);\n }\n drawUnderlay();\n if (usePaths) {\n context.translate(pos.x, pos.y);\n }\n setupOutlineColor();\n drawOutline();\n setupShapeColor();\n drawShape();\n drawImages(eleOpacity, true);\n setupBorderColor();\n drawBorder();\n drawPie(darkness !== 0 || borderWidth !== 0);\n drawImages(eleOpacity, false);\n darken();\n if (usePaths) {\n context.translate(-pos.x, -pos.y);\n }\n drawText();\n drawOverlay();\n\n //\n // clean up shift\n\n if (shiftToOriginWithBb) {\n context.translate(bb.x1, bb.y1);\n }\n};\nvar drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) {\n if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) {\n throw new Error('Invalid state');\n }\n return function (context, node, pos, nodeWidth, nodeHeight) {\n var r = this;\n if (!node.visible()) {\n return;\n }\n var padding = node.pstyle(\"\".concat(overlayOrUnderlay, \"-padding\")).pfValue;\n var opacity = node.pstyle(\"\".concat(overlayOrUnderlay, \"-opacity\")).value;\n var color = node.pstyle(\"\".concat(overlayOrUnderlay, \"-color\")).value;\n var shape = node.pstyle(\"\".concat(overlayOrUnderlay, \"-shape\")).value;\n var radius = node.pstyle(\"\".concat(overlayOrUnderlay, \"-corner-radius\")).value;\n if (opacity > 0) {\n pos = pos || node.position();\n if (nodeWidth == null || nodeHeight == null) {\n var _padding = node.padding();\n nodeWidth = node.width() + 2 * _padding;\n nodeHeight = node.height() + 2 * _padding;\n }\n r.colorFillStyle(context, color[0], color[1], color[2], opacity);\n r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2, radius);\n context.fill();\n }\n };\n};\nCRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay');\nCRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay');\n\n// does the node have at least one pie piece?\nCRp$5.hasPie = function (node) {\n node = node[0]; // ensure ele ref\n\n return node._private.hasPie;\n};\nCRp$5.drawPie = function (context, node, nodeOpacity, pos) {\n node = node[0]; // ensure ele ref\n pos = pos || node.position();\n var cyStyle = node.cy().style();\n var pieSize = node.pstyle('pie-size');\n var x = pos.x;\n var y = pos.y;\n var nodeW = node.width();\n var nodeH = node.height();\n var radius = Math.min(nodeW, nodeH) / 2; // must fit in node\n var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1]\n var usePaths = this.usePaths();\n if (usePaths) {\n x = 0;\n y = 0;\n }\n if (pieSize.units === '%') {\n radius = radius * pieSize.pfValue;\n } else if (pieSize.pfValue !== undefined) {\n radius = pieSize.pfValue / 2;\n }\n for (var i = 1; i <= cyStyle.pieBackgroundN; i++) {\n // 1..N\n var size = node.pstyle('pie-' + i + '-background-size').value;\n var color = node.pstyle('pie-' + i + '-background-color').value;\n var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity;\n var percent = size / 100; // map integer range [0, 100] to [0, 1]\n\n // percent can't push beyond 1\n if (percent + lastPercent > 1) {\n percent = 1 - lastPercent;\n }\n var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise\n var angleDelta = 2 * Math.PI * percent;\n var angleEnd = angleStart + angleDelta;\n\n // ignore if\n // - zero size\n // - we're already beyond the full circle\n // - adding the current slice would go beyond the full circle\n if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) {\n continue;\n }\n context.beginPath();\n context.moveTo(x, y);\n context.arc(x, y, radius, angleStart, angleEnd);\n context.closePath();\n this.colorFillStyle(context, color[0], color[1], color[2], opacity);\n context.fill();\n lastPercent += percent;\n }\n};\n\nvar CRp$4 = {};\nvar motionBlurDelay = 100;\n\n// var isFirefox = typeof InstallTrigger !== 'undefined';\n\nCRp$4.getPixelRatio = function () {\n var context = this.data.contexts[0];\n if (this.forcedPixelRatio != null) {\n return this.forcedPixelRatio;\n }\n var containerWindow = this.cy.window();\n var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1;\n return (containerWindow.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef\n};\n\nCRp$4.paintCache = function (context) {\n var caches = this.paintCaches = this.paintCaches || [];\n var needToCreateCache = true;\n var cache;\n for (var i = 0; i < caches.length; i++) {\n cache = caches[i];\n if (cache.context === context) {\n needToCreateCache = false;\n break;\n }\n }\n if (needToCreateCache) {\n cache = {\n context: context\n };\n caches.push(cache);\n }\n return cache;\n};\nCRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) {\n var gradientStyle;\n var usePaths = this.usePaths();\n var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value,\n positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue;\n if (fill === 'radial-gradient') {\n if (ele.isEdge()) {\n var start = ele.sourceEndpoint(),\n end = ele.targetEndpoint(),\n mid = ele.midpoint();\n var d1 = dist(start, mid);\n var d2 = dist(end, mid);\n gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2));\n } else {\n var pos = usePaths ? {\n x: 0,\n y: 0\n } : ele.position(),\n width = ele.paddedWidth(),\n height = ele.paddedHeight();\n gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height));\n }\n } else {\n if (ele.isEdge()) {\n var _start = ele.sourceEndpoint(),\n _end = ele.targetEndpoint();\n gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y);\n } else {\n var _pos = usePaths ? {\n x: 0,\n y: 0\n } : ele.position(),\n _width = ele.paddedWidth(),\n _height = ele.paddedHeight(),\n halfWidth = _width / 2,\n halfHeight = _height / 2;\n var direction = ele.pstyle('background-gradient-direction').value;\n switch (direction) {\n case 'to-bottom':\n gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight);\n break;\n case 'to-top':\n gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight);\n break;\n case 'to-left':\n gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y);\n break;\n case 'to-right':\n gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y);\n break;\n case 'to-bottom-right':\n case 'to-right-bottom':\n gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight);\n break;\n case 'to-top-right':\n case 'to-right-top':\n gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight);\n break;\n case 'to-bottom-left':\n case 'to-left-bottom':\n gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight);\n break;\n case 'to-top-left':\n case 'to-left-top':\n gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight);\n break;\n }\n }\n }\n if (!gradientStyle) return null; // invalid gradient style\n\n var hasPositions = positions.length === colors.length;\n var length = colors.length;\n for (var i = 0; i < length; i++) {\n gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')');\n }\n return gradientStyle;\n};\nCRp$4.gradientFillStyle = function (context, ele, fill, opacity) {\n var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity);\n if (!gradientStyle) return null; // error\n context.fillStyle = gradientStyle;\n};\nCRp$4.colorFillStyle = function (context, r, g, b, a) {\n context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n // turn off for now, seems context does its own caching\n\n // var cache = this.paintCache(context);\n\n // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n\n // if( cache.fillStyle !== fillStyle ){\n // context.fillStyle = cache.fillStyle = fillStyle;\n // }\n};\n\nCRp$4.eleFillStyle = function (context, ele, opacity) {\n var backgroundFill = ele.pstyle('background-fill').value;\n if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') {\n this.gradientFillStyle(context, ele, backgroundFill, opacity);\n } else {\n var backgroundColor = ele.pstyle('background-color').value;\n this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity);\n }\n};\nCRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) {\n var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity);\n if (!gradientStyle) return null; // error\n context.strokeStyle = gradientStyle;\n};\nCRp$4.colorStrokeStyle = function (context, r, g, b, a) {\n context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n // turn off for now, seems context does its own caching\n\n // var cache = this.paintCache(context);\n\n // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n\n // if( cache.strokeStyle !== strokeStyle ){\n // context.strokeStyle = cache.strokeStyle = strokeStyle;\n // }\n};\n\nCRp$4.eleStrokeStyle = function (context, ele, opacity) {\n var lineFill = ele.pstyle('line-fill').value;\n if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') {\n this.gradientStrokeStyle(context, ele, lineFill, opacity);\n } else {\n var lineColor = ele.pstyle('line-color').value;\n this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity);\n }\n};\n\n// Resize canvas\nCRp$4.matchCanvasSize = function (container) {\n var r = this;\n var data = r.data;\n var bb = r.findContainerClientCoords();\n var width = bb[2];\n var height = bb[3];\n var pixelRatio = r.getPixelRatio();\n var mbPxRatio = r.motionBlurPxRatio;\n if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) {\n pixelRatio = mbPxRatio;\n }\n var canvasWidth = width * pixelRatio;\n var canvasHeight = height * pixelRatio;\n var canvas;\n if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) {\n return; // save cycles if same\n }\n\n r.fontCaches = null; // resizing resets the style\n\n var canvasContainer = data.canvasContainer;\n canvasContainer.style.width = width + 'px';\n canvasContainer.style.height = height + 'px';\n for (var i = 0; i < r.CANVAS_LAYERS; i++) {\n canvas = data.canvases[i];\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n }\n for (var i = 0; i < r.BUFFER_COUNT; i++) {\n canvas = data.bufferCanvases[i];\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n }\n r.textureMult = 1;\n if (pixelRatio <= 1) {\n canvas = data.bufferCanvases[r.TEXTURE_BUFFER];\n r.textureMult = 2;\n canvas.width = canvasWidth * r.textureMult;\n canvas.height = canvasHeight * r.textureMult;\n }\n r.canvasWidth = canvasWidth;\n r.canvasHeight = canvasHeight;\n};\nCRp$4.renderTo = function (cxt, zoom, pan, pxRatio) {\n this.render({\n forcedContext: cxt,\n forcedZoom: zoom,\n forcedPan: pan,\n drawAllLayers: true,\n forcedPxRatio: pxRatio\n });\n};\nCRp$4.render = function (options) {\n options = options || staticEmptyObject();\n var forcedContext = options.forcedContext;\n var drawAllLayers = options.drawAllLayers;\n var drawOnlyNodeLayer = options.drawOnlyNodeLayer;\n var forcedZoom = options.forcedZoom;\n var forcedPan = options.forcedPan;\n var r = this;\n var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio;\n var cy = r.cy;\n var data = r.data;\n var needDraw = data.canvasNeedsRedraw;\n var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming);\n var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur;\n var mbPxRatio = r.motionBlurPxRatio;\n var hasCompoundNodes = cy.hasCompoundNodes();\n var inNodeDragGesture = r.hoverData.draggingEles;\n var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false;\n motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection;\n var motionBlurFadeEffect = motionBlur;\n if (!forcedContext) {\n if (r.prevPxRatio !== pixelRatio) {\n r.invalidateContainerClientCoordsCache();\n r.matchCanvasSize(r.container);\n r.redrawHint('eles', true);\n r.redrawHint('drag', true);\n }\n r.prevPxRatio = pixelRatio;\n }\n if (!forcedContext && r.motionBlurTimeout) {\n clearTimeout(r.motionBlurTimeout);\n }\n if (motionBlur) {\n if (r.mbFrames == null) {\n r.mbFrames = 0;\n }\n r.mbFrames++;\n if (r.mbFrames < 3) {\n // need several frames before even high quality motionblur\n motionBlurFadeEffect = false;\n }\n\n // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing)\n if (r.mbFrames > r.minMbLowQualFrames) {\n //r.fullQualityMb = false;\n r.motionBlurPxRatio = r.mbPxRBlurry;\n }\n }\n if (r.clearingMotionBlur) {\n r.motionBlurPxRatio = 1;\n }\n\n // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame\n // because a rogue async texture frame would clear needDraw\n if (r.textureDrawLastFrame && !textureDraw) {\n needDraw[r.NODE] = true;\n needDraw[r.SELECT_BOX] = true;\n }\n var style = cy.style();\n var zoom = cy.zoom();\n var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom;\n var pan = cy.pan();\n var effectivePan = {\n x: pan.x,\n y: pan.y\n };\n var vp = {\n zoom: zoom,\n pan: {\n x: pan.x,\n y: pan.y\n }\n };\n var prevVp = r.prevViewport;\n var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y;\n\n // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed)\n if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) {\n r.motionBlurPxRatio = 1;\n }\n if (forcedPan) {\n effectivePan = forcedPan;\n }\n\n // apply pixel ratio\n\n effectiveZoom *= pixelRatio;\n effectivePan.x *= pixelRatio;\n effectivePan.y *= pixelRatio;\n var eles = r.getCachedZSortedEles();\n function mbclear(context, x, y, w, h) {\n var gco = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency);\n context.fillRect(x, y, w, h);\n context.globalCompositeOperation = gco;\n }\n function setContextTransform(context, clear) {\n var ePan, eZoom, w, h;\n if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) {\n ePan = {\n x: pan.x * mbPxRatio,\n y: pan.y * mbPxRatio\n };\n eZoom = zoom * mbPxRatio;\n w = r.canvasWidth * mbPxRatio;\n h = r.canvasHeight * mbPxRatio;\n } else {\n ePan = effectivePan;\n eZoom = effectiveZoom;\n w = r.canvasWidth;\n h = r.canvasHeight;\n }\n context.setTransform(1, 0, 0, 1, 0, 0);\n if (clear === 'motionBlur') {\n mbclear(context, 0, 0, w, h);\n } else if (!forcedContext && (clear === undefined || clear)) {\n context.clearRect(0, 0, w, h);\n }\n if (!drawAllLayers) {\n context.translate(ePan.x, ePan.y);\n context.scale(eZoom, eZoom);\n }\n if (forcedPan) {\n context.translate(forcedPan.x, forcedPan.y);\n }\n if (forcedZoom) {\n context.scale(forcedZoom, forcedZoom);\n }\n }\n if (!textureDraw) {\n r.textureDrawLastFrame = false;\n }\n if (textureDraw) {\n r.textureDrawLastFrame = true;\n if (!r.textureCache) {\n r.textureCache = {};\n r.textureCache.bb = cy.mutableElements().boundingBox();\n r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER];\n var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER];\n cxt.setTransform(1, 0, 0, 1, 0, 0);\n cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult);\n r.render({\n forcedContext: cxt,\n drawOnlyNodeLayer: true,\n forcedPxRatio: pixelRatio * r.textureMult\n });\n var vp = r.textureCache.viewport = {\n zoom: cy.zoom(),\n pan: cy.pan(),\n width: r.canvasWidth,\n height: r.canvasHeight\n };\n vp.mpan = {\n x: (0 - vp.pan.x) / vp.zoom,\n y: (0 - vp.pan.y) / vp.zoom\n };\n }\n needDraw[r.DRAG] = false;\n needDraw[r.NODE] = false;\n var context = data.contexts[r.NODE];\n var texture = r.textureCache.texture;\n var vp = r.textureCache.viewport;\n context.setTransform(1, 0, 0, 1, 0, 0);\n if (motionBlur) {\n mbclear(context, 0, 0, vp.width, vp.height);\n } else {\n context.clearRect(0, 0, vp.width, vp.height);\n }\n var outsideBgColor = style.core('outside-texture-bg-color').value;\n var outsideBgOpacity = style.core('outside-texture-bg-opacity').value;\n r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity);\n context.fillRect(0, 0, vp.width, vp.height);\n var zoom = cy.zoom();\n setContextTransform(context, false);\n context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio);\n context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio);\n } else if (r.textureOnViewport && !forcedContext) {\n // clear the cache since we don't need it\n r.textureCache = null;\n }\n var extent = cy.extent();\n var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated();\n var hideEdges = r.hideEdgesOnViewport && vpManip;\n var needMbClear = [];\n needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur;\n if (needMbClear[r.NODE]) {\n r.clearedForMotionBlur[r.NODE] = true;\n }\n needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur;\n if (needMbClear[r.DRAG]) {\n r.clearedForMotionBlur[r.DRAG] = true;\n }\n if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) {\n var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1;\n var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]);\n var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined;\n setContextTransform(context, clear);\n if (hideEdges) {\n r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent);\n } else {\n r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent);\n }\n if (r.debug) {\n r.drawDebugPoints(context, eles.nondrag);\n }\n if (!drawAllLayers && !motionBlur) {\n needDraw[r.NODE] = false;\n }\n }\n if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) {\n var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1;\n var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]);\n setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined);\n if (hideEdges) {\n r.drawCachedNodes(context, eles.drag, pixelRatio, extent);\n } else {\n r.drawCachedElements(context, eles.drag, pixelRatio, extent);\n }\n if (r.debug) {\n r.drawDebugPoints(context, eles.drag);\n }\n if (!drawAllLayers && !motionBlur) {\n needDraw[r.DRAG] = false;\n }\n }\n if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) {\n var context = forcedContext || data.contexts[r.SELECT_BOX];\n setContextTransform(context);\n if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) {\n var zoom = r.cy.zoom();\n var borderWidth = style.core('selection-box-border-width').value / zoom;\n context.lineWidth = borderWidth;\n context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')';\n context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]);\n if (borderWidth > 0) {\n context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')';\n context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]);\n }\n }\n if (data.bgActivePosistion && !r.hoverData.selecting) {\n var zoom = r.cy.zoom();\n var pos = data.bgActivePosistion;\n context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')';\n context.beginPath();\n context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI);\n context.fill();\n }\n var timeToRender = r.lastRedrawTime;\n if (r.showFps && timeToRender) {\n timeToRender = Math.round(timeToRender);\n var fps = Math.round(1000 / timeToRender);\n context.setTransform(1, 0, 0, 1, 0, 0);\n context.fillStyle = 'rgba(255, 0, 0, 0.75)';\n context.strokeStyle = 'rgba(255, 0, 0, 0.75)';\n context.lineWidth = 1;\n context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20);\n var maxFps = 60;\n context.strokeRect(0, 30, 250, 20);\n context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20);\n }\n if (!drawAllLayers) {\n needDraw[r.SELECT_BOX] = false;\n }\n }\n\n // motionblur: blit rendered blurry frames\n if (motionBlur && mbPxRatio !== 1) {\n var cxtNode = data.contexts[r.NODE];\n var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE];\n var cxtDrag = data.contexts[r.DRAG];\n var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG];\n var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) {\n cxt.setTransform(1, 0, 0, 1, 0, 0);\n if (needClear || !motionBlurFadeEffect) {\n cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight);\n } else {\n mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight);\n }\n var pxr = mbPxRatio;\n cxt.drawImage(txt,\n // img\n 0, 0,\n // sx, sy\n r.canvasWidth * pxr, r.canvasHeight * pxr,\n // sw, sh\n 0, 0,\n // x, y\n r.canvasWidth, r.canvasHeight // w, h\n );\n };\n\n if (needDraw[r.NODE] || needMbClear[r.NODE]) {\n drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]);\n needDraw[r.NODE] = false;\n }\n if (needDraw[r.DRAG] || needMbClear[r.DRAG]) {\n drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]);\n needDraw[r.DRAG] = false;\n }\n }\n r.prevViewport = vp;\n if (r.clearingMotionBlur) {\n r.clearingMotionBlur = false;\n r.motionBlurCleared = true;\n r.motionBlur = true;\n }\n if (motionBlur) {\n r.motionBlurTimeout = setTimeout(function () {\n r.motionBlurTimeout = null;\n r.clearedForMotionBlur[r.NODE] = false;\n r.clearedForMotionBlur[r.DRAG] = false;\n r.motionBlur = false;\n r.clearingMotionBlur = !textureDraw;\n r.mbFrames = 0;\n needDraw[r.NODE] = true;\n needDraw[r.DRAG] = true;\n r.redraw();\n }, motionBlurDelay);\n }\n if (!forcedContext) {\n cy.emit('render');\n }\n};\n\nvar CRp$3 = {};\n\n// @O Polygon drawing\nCRp$3.drawPolygonPath = function (context, x, y, width, height, points) {\n var halfW = width / 2;\n var halfH = height / 2;\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(x + halfW * points[0], y + halfH * points[1]);\n for (var i = 1; i < points.length / 2; i++) {\n context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]);\n }\n context.closePath();\n};\nCRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points, corners) {\n corners.forEach(function (corner) {\n return drawPreparedRoundCorner(context, corner);\n });\n context.closePath();\n};\n\n// Round rectangle drawing\nCRp$3.drawRoundRectanglePath = function (context, x, y, width, height, radius) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : Math.min(radius, halfHeight, halfWidth);\n if (context.beginPath) {\n context.beginPath();\n }\n\n // Start at top middle\n context.moveTo(x, y - halfHeight);\n // Arc from middle top to right side\n context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius);\n // Arc from right side to bottom\n context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius);\n // Arc from bottom to left side\n context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius);\n // Arc from left side to topBorder\n context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius);\n // Join line\n context.lineTo(x, y - halfHeight);\n context.closePath();\n};\nCRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height, radius) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var cornerRadius = radius === 'auto' ? getRoundRectangleRadius(width, height) : radius;\n if (context.beginPath) {\n context.beginPath();\n }\n\n // Start at top middle\n context.moveTo(x, y - halfHeight);\n context.lineTo(x + halfWidth, y - halfHeight);\n context.lineTo(x + halfWidth, y);\n context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius);\n context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius);\n context.lineTo(x - halfWidth, y - halfHeight);\n context.lineTo(x, y - halfHeight);\n context.closePath();\n};\nCRp$3.drawCutRectanglePath = function (context, x, y, width, height, points, corners) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var cornerLength = corners === 'auto' ? getCutRectangleCornerLength() : corners;\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(x - halfWidth + cornerLength, y - halfHeight);\n context.lineTo(x + halfWidth - cornerLength, y - halfHeight);\n context.lineTo(x + halfWidth, y - halfHeight + cornerLength);\n context.lineTo(x + halfWidth, y + halfHeight - cornerLength);\n context.lineTo(x + halfWidth - cornerLength, y + halfHeight);\n context.lineTo(x - halfWidth + cornerLength, y + halfHeight);\n context.lineTo(x - halfWidth, y + halfHeight - cornerLength);\n context.lineTo(x - halfWidth, y - halfHeight + cornerLength);\n context.closePath();\n};\nCRp$3.drawBarrelPath = function (context, x, y, width, height) {\n var halfWidth = width / 2;\n var halfHeight = height / 2;\n var xBegin = x - halfWidth;\n var xEnd = x + halfWidth;\n var yBegin = y - halfHeight;\n var yEnd = y + halfHeight;\n var barrelCurveConstants = getBarrelCurveConstants(width, height);\n var wOffset = barrelCurveConstants.widthOffset;\n var hOffset = barrelCurveConstants.heightOffset;\n var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset;\n if (context.beginPath) {\n context.beginPath();\n }\n context.moveTo(xBegin, yBegin + hOffset);\n context.lineTo(xBegin, yEnd - hOffset);\n context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd);\n context.lineTo(xEnd - wOffset, yEnd);\n context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset);\n context.lineTo(xEnd, yBegin + hOffset);\n context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin);\n context.lineTo(xBegin + wOffset, yBegin);\n context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset);\n context.closePath();\n};\nvar sin0 = Math.sin(0);\nvar cos0 = Math.cos(0);\nvar sin = {};\nvar cos = {};\nvar ellipseStepSize = Math.PI / 40;\nfor (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) {\n sin[i] = Math.sin(i);\n cos[i] = Math.cos(i);\n}\nCRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) {\n if (context.beginPath) {\n context.beginPath();\n }\n if (context.ellipse) {\n context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI);\n } else {\n var xPos, yPos;\n var rw = width / 2;\n var rh = height / 2;\n for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) {\n xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0;\n yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0;\n if (i === 0) {\n context.moveTo(xPos, yPos);\n } else {\n context.lineTo(xPos, yPos);\n }\n }\n }\n context.closePath();\n};\n\n/* global atob, ArrayBuffer, Uint8Array, Blob */\nvar CRp$2 = {};\nCRp$2.createBuffer = function (w, h) {\n var buffer = document.createElement('canvas'); // eslint-disable-line no-undef\n buffer.width = w;\n buffer.height = h;\n return [buffer, buffer.getContext('2d')];\n};\nCRp$2.bufferCanvasImage = function (options) {\n var cy = this.cy;\n var eles = cy.mutableElements();\n var bb = eles.boundingBox();\n var ctrRect = this.findContainerClientCoords();\n var width = options.full ? Math.ceil(bb.w) : ctrRect[2];\n var height = options.full ? Math.ceil(bb.h) : ctrRect[3];\n var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight);\n var pxRatio = this.getPixelRatio();\n var scale = 1;\n if (options.scale !== undefined) {\n width *= options.scale;\n height *= options.scale;\n scale = options.scale;\n } else if (specdMaxDims) {\n var maxScaleW = Infinity;\n var maxScaleH = Infinity;\n if (number$1(options.maxWidth)) {\n maxScaleW = scale * options.maxWidth / width;\n }\n if (number$1(options.maxHeight)) {\n maxScaleH = scale * options.maxHeight / height;\n }\n scale = Math.min(maxScaleW, maxScaleH);\n width *= scale;\n height *= scale;\n }\n if (!specdMaxDims) {\n width *= pxRatio;\n height *= pxRatio;\n scale *= pxRatio;\n }\n var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef\n\n buffCanvas.width = width;\n buffCanvas.height = height;\n buffCanvas.style.width = width + 'px';\n buffCanvas.style.height = height + 'px';\n var buffCxt = buffCanvas.getContext('2d');\n\n // Rasterize the layers, but only if container has nonzero size\n if (width > 0 && height > 0) {\n buffCxt.clearRect(0, 0, width, height);\n buffCxt.globalCompositeOperation = 'source-over';\n var zsortedEles = this.getCachedZSortedEles();\n if (options.full) {\n // draw the full bounds of the graph\n buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale);\n buffCxt.scale(scale, scale);\n this.drawElements(buffCxt, zsortedEles);\n buffCxt.scale(1 / scale, 1 / scale);\n buffCxt.translate(bb.x1 * scale, bb.y1 * scale);\n } else {\n // draw the current view\n var pan = cy.pan();\n var translation = {\n x: pan.x * scale,\n y: pan.y * scale\n };\n scale *= cy.zoom();\n buffCxt.translate(translation.x, translation.y);\n buffCxt.scale(scale, scale);\n this.drawElements(buffCxt, zsortedEles);\n buffCxt.scale(1 / scale, 1 / scale);\n buffCxt.translate(-translation.x, -translation.y);\n }\n\n // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs\n if (options.bg) {\n buffCxt.globalCompositeOperation = 'destination-over';\n buffCxt.fillStyle = options.bg;\n buffCxt.rect(0, 0, width, height);\n buffCxt.fill();\n }\n }\n return buffCanvas;\n};\nfunction b64ToBlob(b64, mimeType) {\n var bytes = atob(b64);\n var buff = new ArrayBuffer(bytes.length);\n var buffUint8 = new Uint8Array(buff);\n for (var i = 0; i < bytes.length; i++) {\n buffUint8[i] = bytes.charCodeAt(i);\n }\n return new Blob([buff], {\n type: mimeType\n });\n}\nfunction b64UriToB64(b64uri) {\n var i = b64uri.indexOf(',');\n return b64uri.substr(i + 1);\n}\nfunction output(options, canvas, mimeType) {\n var getB64Uri = function getB64Uri() {\n return canvas.toDataURL(mimeType, options.quality);\n };\n switch (options.output) {\n case 'blob-promise':\n return new Promise$1(function (resolve, reject) {\n try {\n canvas.toBlob(function (blob) {\n if (blob != null) {\n resolve(blob);\n } else {\n reject(new Error('`canvas.toBlob()` sent a null value in its callback'));\n }\n }, mimeType, options.quality);\n } catch (err) {\n reject(err);\n }\n });\n case 'blob':\n return b64ToBlob(b64UriToB64(getB64Uri()), mimeType);\n case 'base64':\n return b64UriToB64(getB64Uri());\n case 'base64uri':\n default:\n return getB64Uri();\n }\n}\nCRp$2.png = function (options) {\n return output(options, this.bufferCanvasImage(options), 'image/png');\n};\nCRp$2.jpg = function (options) {\n return output(options, this.bufferCanvasImage(options), 'image/jpeg');\n};\n\nvar CRp$1 = {};\nCRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points, corners) {\n switch (name) {\n case 'ellipse':\n return this.drawEllipsePath(context, centerX, centerY, width, height);\n case 'polygon':\n return this.drawPolygonPath(context, centerX, centerY, width, height, points);\n case 'round-polygon':\n return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points, corners);\n case 'roundrectangle':\n case 'round-rectangle':\n return this.drawRoundRectanglePath(context, centerX, centerY, width, height, corners);\n case 'cutrectangle':\n case 'cut-rectangle':\n return this.drawCutRectanglePath(context, centerX, centerY, width, height, points, corners);\n case 'bottomroundrectangle':\n case 'bottom-round-rectangle':\n return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height, corners);\n case 'barrel':\n return this.drawBarrelPath(context, centerX, centerY, width, height);\n }\n};\n\nvar CR = CanvasRenderer;\nvar CRp = CanvasRenderer.prototype;\nCRp.CANVAS_LAYERS = 3;\n//\nCRp.SELECT_BOX = 0;\nCRp.DRAG = 1;\nCRp.NODE = 2;\nCRp.BUFFER_COUNT = 3;\n//\nCRp.TEXTURE_BUFFER = 0;\nCRp.MOTIONBLUR_BUFFER_NODE = 1;\nCRp.MOTIONBLUR_BUFFER_DRAG = 2;\nfunction CanvasRenderer(options) {\n var r = this;\n var containerWindow = r.cy.window();\n var document = containerWindow.document;\n r.data = {\n canvases: new Array(CRp.CANVAS_LAYERS),\n contexts: new Array(CRp.CANVAS_LAYERS),\n canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS),\n bufferCanvases: new Array(CRp.BUFFER_COUNT),\n bufferContexts: new Array(CRp.CANVAS_LAYERS)\n };\n var tapHlOffAttr = '-webkit-tap-highlight-color';\n var tapHlOffStyle = 'rgba(0,0,0,0)';\n r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef\n var containerStyle = r.data.canvasContainer.style;\n r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle;\n containerStyle.position = 'relative';\n containerStyle.zIndex = '0';\n containerStyle.overflow = 'hidden';\n var container = options.cy.container();\n container.appendChild(r.data.canvasContainer);\n container.style[tapHlOffAttr] = tapHlOffStyle;\n var styleMap = {\n '-webkit-user-select': 'none',\n '-moz-user-select': '-moz-none',\n 'user-select': 'none',\n '-webkit-tap-highlight-color': 'rgba(0,0,0,0)',\n 'outline-style': 'none'\n };\n if (ms()) {\n styleMap['-ms-touch-action'] = 'none';\n styleMap['touch-action'] = 'none';\n }\n for (var i = 0; i < CRp.CANVAS_LAYERS; i++) {\n var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef\n r.data.contexts[i] = canvas.getContext('2d');\n Object.keys(styleMap).forEach(function (k) {\n canvas.style[k] = styleMap[k];\n });\n canvas.style.position = 'absolute';\n canvas.setAttribute('data-id', 'layer' + i);\n canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i);\n r.data.canvasContainer.appendChild(canvas);\n r.data.canvasNeedsRedraw[i] = false;\n }\n r.data.topCanvas = r.data.canvases[0];\n r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node');\n r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox');\n r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag');\n for (var i = 0; i < CRp.BUFFER_COUNT; i++) {\n r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef\n r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d');\n r.data.bufferCanvases[i].style.position = 'absolute';\n r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i);\n r.data.bufferCanvases[i].style.zIndex = String(-i - 1);\n r.data.bufferCanvases[i].style.visibility = 'hidden';\n //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]);\n }\n\n r.pathsEnabled = true;\n var emptyBb = makeBoundingBox();\n var getBoxCenter = function getBoxCenter(bb) {\n return {\n x: (bb.x1 + bb.x2) / 2,\n y: (bb.y1 + bb.y2) / 2\n };\n };\n var getCenterOffset = function getCenterOffset(bb) {\n return {\n x: -bb.w / 2,\n y: -bb.h / 2\n };\n };\n var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) {\n var _p = ele[0]._private;\n var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp;\n return !same;\n };\n var getStyleKey = function getStyleKey(ele) {\n return ele[0]._private.nodeKey;\n };\n var getLabelKey = function getLabelKey(ele) {\n return ele[0]._private.labelStyleKey;\n };\n var getSourceLabelKey = function getSourceLabelKey(ele) {\n return ele[0]._private.sourceLabelStyleKey;\n };\n var getTargetLabelKey = function getTargetLabelKey(ele) {\n return ele[0]._private.targetLabelStyleKey;\n };\n var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElement(context, ele, bb, false, false, useEleOpacity);\n };\n var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity);\n };\n var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity);\n };\n var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) {\n return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity);\n };\n var getElementBox = function getElementBox(ele) {\n ele.boundingBox();\n return ele[0]._private.bodyBounds;\n };\n var getLabelBox = function getLabelBox(ele) {\n ele.boundingBox();\n return ele[0]._private.labelBounds.main || emptyBb;\n };\n var getSourceLabelBox = function getSourceLabelBox(ele) {\n ele.boundingBox();\n return ele[0]._private.labelBounds.source || emptyBb;\n };\n var getTargetLabelBox = function getTargetLabelBox(ele) {\n ele.boundingBox();\n return ele[0]._private.labelBounds.target || emptyBb;\n };\n var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) {\n return scaledLabelShown;\n };\n var getElementRotationPoint = function getElementRotationPoint(ele) {\n return getBoxCenter(getElementBox(ele));\n };\n var addTextMargin = function addTextMargin(prefix, pt, ele) {\n var pre = prefix ? prefix + '-' : '';\n return {\n x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue,\n y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue\n };\n };\n var getRsPt = function getRsPt(ele, x, y) {\n var rs = ele[0]._private.rscratch;\n return {\n x: rs[x],\n y: rs[y]\n };\n };\n var getLabelRotationPoint = function getLabelRotationPoint(ele) {\n return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele);\n };\n var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) {\n return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele);\n };\n var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) {\n return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele);\n };\n var getElementRotationOffset = function getElementRotationOffset(ele) {\n return getCenterOffset(getElementBox(ele));\n };\n var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) {\n return getCenterOffset(getSourceLabelBox(ele));\n };\n var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) {\n return getCenterOffset(getTargetLabelBox(ele));\n };\n var getLabelRotationOffset = function getLabelRotationOffset(ele) {\n var bb = getLabelBox(ele);\n var p = getCenterOffset(getLabelBox(ele));\n if (ele.isNode()) {\n switch (ele.pstyle('text-halign').value) {\n case 'left':\n p.x = -bb.w;\n break;\n case 'right':\n p.x = 0;\n break;\n }\n switch (ele.pstyle('text-valign').value) {\n case 'top':\n p.y = -bb.h;\n break;\n case 'bottom':\n p.y = 0;\n break;\n }\n }\n return p;\n };\n var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, {\n getKey: getStyleKey,\n doesEleInvalidateKey: backgroundTimestampHasChanged,\n drawElement: drawElement,\n getBoundingBox: getElementBox,\n getRotationPoint: getElementRotationPoint,\n getRotationOffset: getElementRotationOffset,\n allowEdgeTxrCaching: false,\n allowParentTxrCaching: false\n });\n var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, {\n getKey: getLabelKey,\n drawElement: drawLabel,\n getBoundingBox: getLabelBox,\n getRotationPoint: getLabelRotationPoint,\n getRotationOffset: getLabelRotationOffset,\n isVisible: isLabelVisibleAtScale\n });\n var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, {\n getKey: getSourceLabelKey,\n drawElement: drawSourceLabel,\n getBoundingBox: getSourceLabelBox,\n getRotationPoint: getSourceLabelRotationPoint,\n getRotationOffset: getSourceLabelRotationOffset,\n isVisible: isLabelVisibleAtScale\n });\n var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, {\n getKey: getTargetLabelKey,\n drawElement: drawTargetLabel,\n getBoundingBox: getTargetLabelBox,\n getRotationPoint: getTargetLabelRotationPoint,\n getRotationOffset: getTargetLabelRotationOffset,\n isVisible: isLabelVisibleAtScale\n });\n var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r);\n r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) {\n // each cache should check for sub-key diff to see that the update affects that cache particularly\n eleTxrCache.invalidateElements(eles);\n lblTxrCache.invalidateElements(eles);\n slbTxrCache.invalidateElements(eles);\n tlbTxrCache.invalidateElements(eles);\n\n // any change invalidates the layers\n lyrTxrCache.invalidateElements(eles);\n\n // update the old bg timestamp so diffs can be done in the ele txr caches\n for (var _i = 0; _i < eles.length; _i++) {\n var _p = eles[_i]._private;\n _p.oldBackgroundTimestamp = _p.backgroundTimestamp;\n }\n });\n var refineInLayers = function refineInLayers(reqs) {\n for (var i = 0; i < reqs.length; i++) {\n lyrTxrCache.enqueueElementRefinement(reqs[i].ele);\n }\n };\n eleTxrCache.onDequeue(refineInLayers);\n lblTxrCache.onDequeue(refineInLayers);\n slbTxrCache.onDequeue(refineInLayers);\n tlbTxrCache.onDequeue(refineInLayers);\n}\nCRp.redrawHint = function (group, bool) {\n var r = this;\n switch (group) {\n case 'eles':\n r.data.canvasNeedsRedraw[CRp.NODE] = bool;\n break;\n case 'drag':\n r.data.canvasNeedsRedraw[CRp.DRAG] = bool;\n break;\n case 'select':\n r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool;\n break;\n }\n};\n\n// whether to use Path2D caching for drawing\nvar pathsImpld = typeof Path2D !== 'undefined';\nCRp.path2dEnabled = function (on) {\n if (on === undefined) {\n return this.pathsEnabled;\n }\n this.pathsEnabled = on ? true : false;\n};\nCRp.usePaths = function () {\n return pathsImpld && this.pathsEnabled;\n};\nCRp.setImgSmoothing = function (context, bool) {\n if (context.imageSmoothingEnabled != null) {\n context.imageSmoothingEnabled = bool;\n } else {\n context.webkitImageSmoothingEnabled = bool;\n context.mozImageSmoothingEnabled = bool;\n context.msImageSmoothingEnabled = bool;\n }\n};\nCRp.getImgSmoothing = function (context) {\n if (context.imageSmoothingEnabled != null) {\n return context.imageSmoothingEnabled;\n } else {\n return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled;\n }\n};\nCRp.makeOffscreenCanvas = function (width, height) {\n var canvas;\n if ((typeof OffscreenCanvas === \"undefined\" ? \"undefined\" : _typeof(OffscreenCanvas)) !== (\"undefined\" )) {\n canvas = new OffscreenCanvas(width, height);\n } else {\n var containerWindow = this.cy.window();\n var document = containerWindow.document;\n canvas = document.createElement('canvas'); // eslint-disable-line no-undef\n canvas.width = width;\n canvas.height = height;\n }\n return canvas;\n};\n[CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) {\n extend(CRp, props);\n});\n\nvar renderer = [{\n name: 'null',\n impl: NullRenderer\n}, {\n name: 'base',\n impl: BR\n}, {\n name: 'canvas',\n impl: CR\n}];\n\nvar incExts = [{\n type: 'layout',\n extensions: layout\n}, {\n type: 'renderer',\n extensions: renderer\n}];\n\n// registered extensions to cytoscape, indexed by name\nvar extensions = {};\n\n// registered modules for extensions, indexed by name\nvar modules = {};\nfunction setExtension(type, name, registrant) {\n var ext = registrant;\n var overrideErr = function overrideErr(field) {\n warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden');\n };\n if (type === 'core') {\n if (Core.prototype[name]) {\n return overrideErr(name);\n } else {\n Core.prototype[name] = registrant;\n }\n } else if (type === 'collection') {\n if (Collection.prototype[name]) {\n return overrideErr(name);\n } else {\n Collection.prototype[name] = registrant;\n }\n } else if (type === 'layout') {\n // fill in missing layout functions in the prototype\n\n var Layout = function Layout(options) {\n this.options = options;\n registrant.call(this, options);\n\n // make sure layout has _private for use w/ std apis like .on()\n if (!plainObject(this._private)) {\n this._private = {};\n }\n this._private.cy = options.cy;\n this._private.listeners = [];\n this.createEmitter();\n };\n var layoutProto = Layout.prototype = Object.create(registrant.prototype);\n var optLayoutFns = [];\n for (var i = 0; i < optLayoutFns.length; i++) {\n var fnName = optLayoutFns[i];\n layoutProto[fnName] = layoutProto[fnName] || function () {\n return this;\n };\n }\n\n // either .start() or .run() is defined, so autogen the other\n if (layoutProto.start && !layoutProto.run) {\n layoutProto.run = function () {\n this.start();\n return this;\n };\n } else if (!layoutProto.start && layoutProto.run) {\n layoutProto.start = function () {\n this.run();\n return this;\n };\n }\n var regStop = registrant.prototype.stop;\n layoutProto.stop = function () {\n var opts = this.options;\n if (opts && opts.animate) {\n var anis = this.animations;\n if (anis) {\n for (var _i = 0; _i < anis.length; _i++) {\n anis[_i].stop();\n }\n }\n }\n if (regStop) {\n regStop.call(this);\n } else {\n this.emit('layoutstop');\n }\n return this;\n };\n if (!layoutProto.destroy) {\n layoutProto.destroy = function () {\n return this;\n };\n }\n layoutProto.cy = function () {\n return this._private.cy;\n };\n var getCy = function getCy(layout) {\n return layout._private.cy;\n };\n var emitterOpts = {\n addEventFields: function addEventFields(layout, evt) {\n evt.layout = layout;\n evt.cy = getCy(layout);\n evt.target = layout;\n },\n bubble: function bubble() {\n return true;\n },\n parent: function parent(layout) {\n return getCy(layout);\n }\n };\n extend(layoutProto, {\n createEmitter: function createEmitter() {\n this._private.emitter = new Emitter(emitterOpts, this);\n return this;\n },\n emitter: function emitter() {\n return this._private.emitter;\n },\n on: function on(evt, cb) {\n this.emitter().on(evt, cb);\n return this;\n },\n one: function one(evt, cb) {\n this.emitter().one(evt, cb);\n return this;\n },\n once: function once(evt, cb) {\n this.emitter().one(evt, cb);\n return this;\n },\n removeListener: function removeListener(evt, cb) {\n this.emitter().removeListener(evt, cb);\n return this;\n },\n removeAllListeners: function removeAllListeners() {\n this.emitter().removeAllListeners();\n return this;\n },\n emit: function emit(evt, params) {\n this.emitter().emit(evt, params);\n return this;\n }\n });\n define.eventAliasesOn(layoutProto);\n ext = Layout; // replace with our wrapped layout\n } else if (type === 'renderer' && name !== 'null' && name !== 'base') {\n // user registered renderers inherit from base\n\n var BaseRenderer = getExtension('renderer', 'base');\n var bProto = BaseRenderer.prototype;\n var RegistrantRenderer = registrant;\n var rProto = registrant.prototype;\n var Renderer = function Renderer() {\n BaseRenderer.apply(this, arguments);\n RegistrantRenderer.apply(this, arguments);\n };\n var proto = Renderer.prototype;\n for (var pName in bProto) {\n var pVal = bProto[pName];\n var existsInR = rProto[pName] != null;\n if (existsInR) {\n return overrideErr(pName);\n }\n proto[pName] = pVal; // take impl from base\n }\n\n for (var _pName in rProto) {\n proto[_pName] = rProto[_pName]; // take impl from registrant\n }\n\n bProto.clientFunctions.forEach(function (name) {\n proto[name] = proto[name] || function () {\n error('Renderer does not implement `renderer.' + name + '()` on its prototype');\n };\n });\n ext = Renderer;\n } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') {\n // to avoid potential prototype pollution\n return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions');\n }\n return setMap({\n map: extensions,\n keys: [type, name],\n value: ext\n });\n}\nfunction getExtension(type, name) {\n return getMap({\n map: extensions,\n keys: [type, name]\n });\n}\nfunction setModule(type, name, moduleType, moduleName, registrant) {\n return setMap({\n map: modules,\n keys: [type, name, moduleType, moduleName],\n value: registrant\n });\n}\nfunction getModule(type, name, moduleType, moduleName) {\n return getMap({\n map: modules,\n keys: [type, name, moduleType, moduleName]\n });\n}\nvar extension = function extension() {\n // e.g. extension('renderer', 'svg')\n if (arguments.length === 2) {\n return getExtension.apply(null, arguments);\n }\n\n // e.g. extension('renderer', 'svg', { ... })\n else if (arguments.length === 3) {\n return setExtension.apply(null, arguments);\n }\n\n // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse')\n else if (arguments.length === 4) {\n return getModule.apply(null, arguments);\n }\n\n // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... })\n else if (arguments.length === 5) {\n return setModule.apply(null, arguments);\n } else {\n error('Invalid extension access syntax');\n }\n};\n\n// allows a core instance to access extensions internally\nCore.prototype.extension = extension;\n\n// included extensions\nincExts.forEach(function (group) {\n group.extensions.forEach(function (ext) {\n setExtension(group.type, ext.name, ext.impl);\n });\n});\n\n// a dummy stylesheet object that doesn't need a reference to the core\n// (useful for init)\nvar Stylesheet = function Stylesheet() {\n if (!(this instanceof Stylesheet)) {\n return new Stylesheet();\n }\n this.length = 0;\n};\nvar sheetfn = Stylesheet.prototype;\nsheetfn.instanceString = function () {\n return 'stylesheet';\n};\n\n// just store the selector to be parsed later\nsheetfn.selector = function (selector) {\n var i = this.length++;\n this[i] = {\n selector: selector,\n properties: []\n };\n return this; // chaining\n};\n\n// just store the property to be parsed later\nsheetfn.css = function (name, value) {\n var i = this.length - 1;\n if (string(name)) {\n this[i].properties.push({\n name: name,\n value: value\n });\n } else if (plainObject(name)) {\n var map = name;\n var propNames = Object.keys(map);\n for (var j = 0; j < propNames.length; j++) {\n var key = propNames[j];\n var mapVal = map[key];\n if (mapVal == null) {\n continue;\n }\n var prop = Style.properties[key] || Style.properties[dash2camel(key)];\n if (prop == null) {\n continue;\n }\n var _name = prop.name;\n var _value = mapVal;\n this[i].properties.push({\n name: _name,\n value: _value\n });\n }\n }\n return this; // chaining\n};\n\nsheetfn.style = sheetfn.css;\n\n// generate a real style object from the dummy stylesheet\nsheetfn.generateStyle = function (cy) {\n var style = new Style(cy);\n return this.appendToStyle(style);\n};\n\n// append a dummy stylesheet object on a real style object\nsheetfn.appendToStyle = function (style) {\n for (var i = 0; i < this.length; i++) {\n var context = this[i];\n var selector = context.selector;\n var props = context.properties;\n style.selector(selector); // apply selector\n\n for (var j = 0; j < props.length; j++) {\n var prop = props[j];\n style.css(prop.name, prop.value); // apply property\n }\n }\n\n return style;\n};\n\nvar version = \"3.30.1\";\n\nvar cytoscape = function cytoscape(options) {\n // if no options specified, use default\n if (options === undefined) {\n options = {};\n }\n\n // create instance\n if (plainObject(options)) {\n return new Core(options);\n }\n\n // allow for registration of extensions\n else if (string(options)) {\n return extension.apply(extension, arguments);\n }\n};\n\n// e.g. cytoscape.use( require('cytoscape-foo'), bar )\ncytoscape.use = function (ext) {\n var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext\n\n args.unshift(cytoscape); // cytoscape is first arg to ext\n\n ext.apply(null, args);\n return this;\n};\ncytoscape.warnings = function (bool) {\n return warnings(bool);\n};\n\n// replaced by build system\ncytoscape.version = version;\n\n// expose public apis (mostly for extensions)\ncytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet;\n\nexport { cytoscape as default };\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"layoutBase\"] = factory();\n\telse\n\t\troot[\"layoutBase\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 26);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LayoutConstants() {}\n\n/**\r\n * Layout Quality: 0:draft, 1:default, 2:proof\r\n */\nLayoutConstants.QUALITY = 1;\n\n/**\r\n * Default parameters\r\n */\nLayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;\nLayoutConstants.DEFAULT_INCREMENTAL = false;\nLayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;\nLayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;\nLayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;\nLayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;\n\n// -----------------------------------------------------------------------------\n// Section: General other constants\n// -----------------------------------------------------------------------------\n/*\r\n * Margins of a graph to be applied on bouding rectangle of its contents. We\r\n * assume margins on all four sides to be uniform.\r\n */\nLayoutConstants.DEFAULT_GRAPH_MARGIN = 15;\n\n/*\r\n * Whether to consider labels in node dimensions or not\r\n */\nLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_SIZE = 40;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;\n\n/*\r\n * Empty compound node size. When a compound node is empty, its both\r\n * dimensions should be of this value.\r\n */\nLayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;\n\n/*\r\n * Minimum length that an edge should take during layout\r\n */\nLayoutConstants.MIN_EDGE_LENGTH = 1;\n\n/*\r\n * World boundaries that layout operates on\r\n */\nLayoutConstants.WORLD_BOUNDARY = 1000000;\n\n/*\r\n * World boundaries that random positioning can be performed with\r\n */\nLayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000;\n\n/*\r\n * Coordinates of the world center\r\n */\nLayoutConstants.WORLD_CENTER_X = 1200;\nLayoutConstants.WORLD_CENTER_Y = 900;\n\nmodule.exports = LayoutConstants;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction LEdge(source, target, vEdge) {\n LGraphObject.call(this, vEdge);\n\n this.isOverlapingSourceAndTarget = false;\n this.vGraphObject = vEdge;\n this.bendpoints = [];\n this.source = source;\n this.target = target;\n}\n\nLEdge.prototype = Object.create(LGraphObject.prototype);\n\nfor (var prop in LGraphObject) {\n LEdge[prop] = LGraphObject[prop];\n}\n\nLEdge.prototype.getSource = function () {\n return this.source;\n};\n\nLEdge.prototype.getTarget = function () {\n return this.target;\n};\n\nLEdge.prototype.isInterGraph = function () {\n return this.isInterGraph;\n};\n\nLEdge.prototype.getLength = function () {\n return this.length;\n};\n\nLEdge.prototype.isOverlapingSourceAndTarget = function () {\n return this.isOverlapingSourceAndTarget;\n};\n\nLEdge.prototype.getBendpoints = function () {\n return this.bendpoints;\n};\n\nLEdge.prototype.getLca = function () {\n return this.lca;\n};\n\nLEdge.prototype.getSourceInLca = function () {\n return this.sourceInLca;\n};\n\nLEdge.prototype.getTargetInLca = function () {\n return this.targetInLca;\n};\n\nLEdge.prototype.getOtherEnd = function (node) {\n if (this.source === node) {\n return this.target;\n } else if (this.target === node) {\n return this.source;\n } else {\n throw \"Node is not incident with this edge\";\n }\n};\n\nLEdge.prototype.getOtherEndInGraph = function (node, graph) {\n var otherEnd = this.getOtherEnd(node);\n var root = graph.getGraphManager().getRoot();\n\n while (true) {\n if (otherEnd.getOwner() == graph) {\n return otherEnd;\n }\n\n if (otherEnd.getOwner() == root) {\n break;\n }\n\n otherEnd = otherEnd.getOwner().getParent();\n }\n\n return null;\n};\n\nLEdge.prototype.updateLength = function () {\n var clipPointCoordinates = new Array(4);\n\n this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);\n\n if (!this.isOverlapingSourceAndTarget) {\n this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];\n this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n }\n};\n\nLEdge.prototype.updateLengthSimple = function () {\n this.lengthX = this.target.getCenterX() - this.source.getCenterX();\n this.lengthY = this.target.getCenterY() - this.source.getCenterY();\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n};\n\nmodule.exports = LEdge;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LGraphObject(vGraphObject) {\n this.vGraphObject = vGraphObject;\n}\n\nmodule.exports = LGraphObject;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar RectangleD = __webpack_require__(13);\nvar LayoutConstants = __webpack_require__(0);\nvar RandomSeed = __webpack_require__(16);\nvar PointD = __webpack_require__(4);\n\nfunction LNode(gm, loc, size, vNode) {\n //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode)\n if (size == null && vNode == null) {\n vNode = loc;\n }\n\n LGraphObject.call(this, vNode);\n\n //Alternative constructor 2 : LNode(Layout layout, Object vNode)\n if (gm.graphManager != null) gm = gm.graphManager;\n\n this.estimatedSize = Integer.MIN_VALUE;\n this.inclusionTreeDepth = Integer.MAX_VALUE;\n this.vGraphObject = vNode;\n this.edges = [];\n this.graphManager = gm;\n\n if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD();\n}\n\nLNode.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LNode[prop] = LGraphObject[prop];\n}\n\nLNode.prototype.getEdges = function () {\n return this.edges;\n};\n\nLNode.prototype.getChild = function () {\n return this.child;\n};\n\nLNode.prototype.getOwner = function () {\n // if (this.owner != null) {\n // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) {\n // throw \"assert failed\";\n // }\n // }\n\n return this.owner;\n};\n\nLNode.prototype.getWidth = function () {\n return this.rect.width;\n};\n\nLNode.prototype.setWidth = function (width) {\n this.rect.width = width;\n};\n\nLNode.prototype.getHeight = function () {\n return this.rect.height;\n};\n\nLNode.prototype.setHeight = function (height) {\n this.rect.height = height;\n};\n\nLNode.prototype.getCenterX = function () {\n return this.rect.x + this.rect.width / 2;\n};\n\nLNode.prototype.getCenterY = function () {\n return this.rect.y + this.rect.height / 2;\n};\n\nLNode.prototype.getCenter = function () {\n return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);\n};\n\nLNode.prototype.getLocation = function () {\n return new PointD(this.rect.x, this.rect.y);\n};\n\nLNode.prototype.getRect = function () {\n return this.rect;\n};\n\nLNode.prototype.getDiagonal = function () {\n return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);\n};\n\n/**\n * This method returns half the diagonal length of this node.\n */\nLNode.prototype.getHalfTheDiagonal = function () {\n return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;\n};\n\nLNode.prototype.setRect = function (upperLeft, dimension) {\n this.rect.x = upperLeft.x;\n this.rect.y = upperLeft.y;\n this.rect.width = dimension.width;\n this.rect.height = dimension.height;\n};\n\nLNode.prototype.setCenter = function (cx, cy) {\n this.rect.x = cx - this.rect.width / 2;\n this.rect.y = cy - this.rect.height / 2;\n};\n\nLNode.prototype.setLocation = function (x, y) {\n this.rect.x = x;\n this.rect.y = y;\n};\n\nLNode.prototype.moveBy = function (dx, dy) {\n this.rect.x += dx;\n this.rect.y += dy;\n};\n\nLNode.prototype.getEdgeListToNode = function (to) {\n var edgeList = [];\n var edge;\n var self = this;\n\n self.edges.forEach(function (edge) {\n\n if (edge.target == to) {\n if (edge.source != self) throw \"Incorrect edge source!\";\n\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getEdgesBetween = function (other) {\n var edgeList = [];\n var edge;\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (!(edge.source == self || edge.target == self)) throw \"Incorrect edge source and/or target\";\n\n if (edge.target == other || edge.source == other) {\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getNeighborsList = function () {\n var neighbors = new Set();\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (edge.source == self) {\n neighbors.add(edge.target);\n } else {\n if (edge.target != self) {\n throw \"Incorrect incidency!\";\n }\n\n neighbors.add(edge.source);\n }\n });\n\n return neighbors;\n};\n\nLNode.prototype.withChildren = function () {\n var withNeighborsList = new Set();\n var childNode;\n var children;\n\n withNeighborsList.add(this);\n\n if (this.child != null) {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n children = childNode.withChildren();\n children.forEach(function (node) {\n withNeighborsList.add(node);\n });\n }\n }\n\n return withNeighborsList;\n};\n\nLNode.prototype.getNoOfChildren = function () {\n var noOfChildren = 0;\n var childNode;\n\n if (this.child == null) {\n noOfChildren = 1;\n } else {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n\n noOfChildren += childNode.getNoOfChildren();\n }\n }\n\n if (noOfChildren == 0) {\n noOfChildren = 1;\n }\n return noOfChildren;\n};\n\nLNode.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLNode.prototype.calcEstimatedSize = function () {\n if (this.child == null) {\n return this.estimatedSize = (this.rect.width + this.rect.height) / 2;\n } else {\n this.estimatedSize = this.child.calcEstimatedSize();\n this.rect.width = this.estimatedSize;\n this.rect.height = this.estimatedSize;\n\n return this.estimatedSize;\n }\n};\n\nLNode.prototype.scatter = function () {\n var randomCenterX;\n var randomCenterY;\n\n var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;\n\n var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;\n\n this.rect.x = randomCenterX;\n this.rect.y = randomCenterY;\n};\n\nLNode.prototype.updateBounds = function () {\n if (this.getChild() == null) {\n throw \"assert failed\";\n }\n if (this.getChild().getNodes().length != 0) {\n // wrap the children nodes by re-arranging the boundaries\n var childGraph = this.getChild();\n childGraph.updateBounds(true);\n\n this.rect.x = childGraph.getLeft();\n this.rect.y = childGraph.getTop();\n\n this.setWidth(childGraph.getRight() - childGraph.getLeft());\n this.setHeight(childGraph.getBottom() - childGraph.getTop());\n\n // Update compound bounds considering its label properties \n if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = childGraph.getRight() - childGraph.getLeft();\n var height = childGraph.getBottom() - childGraph.getTop();\n\n if (this.labelWidth > width) {\n this.rect.x -= (this.labelWidth - width) / 2;\n this.setWidth(this.labelWidth);\n }\n\n if (this.labelHeight > height) {\n if (this.labelPos == \"center\") {\n this.rect.y -= (this.labelHeight - height) / 2;\n } else if (this.labelPos == \"top\") {\n this.rect.y -= this.labelHeight - height;\n }\n this.setHeight(this.labelHeight);\n }\n }\n }\n};\n\nLNode.prototype.getInclusionTreeDepth = function () {\n if (this.inclusionTreeDepth == Integer.MAX_VALUE) {\n throw \"assert failed\";\n }\n return this.inclusionTreeDepth;\n};\n\nLNode.prototype.transform = function (trans) {\n var left = this.rect.x;\n\n if (left > LayoutConstants.WORLD_BOUNDARY) {\n left = LayoutConstants.WORLD_BOUNDARY;\n } else if (left < -LayoutConstants.WORLD_BOUNDARY) {\n left = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var top = this.rect.y;\n\n if (top > LayoutConstants.WORLD_BOUNDARY) {\n top = LayoutConstants.WORLD_BOUNDARY;\n } else if (top < -LayoutConstants.WORLD_BOUNDARY) {\n top = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var leftTop = new PointD(left, top);\n var vLeftTop = trans.inverseTransformPoint(leftTop);\n\n this.setLocation(vLeftTop.x, vLeftTop.y);\n};\n\nLNode.prototype.getLeft = function () {\n return this.rect.x;\n};\n\nLNode.prototype.getRight = function () {\n return this.rect.x + this.rect.width;\n};\n\nLNode.prototype.getTop = function () {\n return this.rect.y;\n};\n\nLNode.prototype.getBottom = function () {\n return this.rect.y + this.rect.height;\n};\n\nLNode.prototype.getParent = function () {\n if (this.owner == null) {\n return null;\n }\n\n return this.owner.getParent();\n};\n\nmodule.exports = LNode;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction PointD(x, y) {\n if (x == null && y == null) {\n this.x = 0;\n this.y = 0;\n } else {\n this.x = x;\n this.y = y;\n }\n}\n\nPointD.prototype.getX = function () {\n return this.x;\n};\n\nPointD.prototype.getY = function () {\n return this.y;\n};\n\nPointD.prototype.setX = function (x) {\n this.x = x;\n};\n\nPointD.prototype.setY = function (y) {\n this.y = y;\n};\n\nPointD.prototype.getDifference = function (pt) {\n return new DimensionD(this.x - pt.x, this.y - pt.y);\n};\n\nPointD.prototype.getCopy = function () {\n return new PointD(this.x, this.y);\n};\n\nPointD.prototype.translate = function (dim) {\n this.x += dim.width;\n this.y += dim.height;\n return this;\n};\n\nmodule.exports = PointD;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(6);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar RectangleD = __webpack_require__(13);\nvar Point = __webpack_require__(12);\nvar LinkedList = __webpack_require__(11);\n\nfunction LGraph(parent, obj2, vGraph) {\n LGraphObject.call(this, vGraph);\n this.estimatedSize = Integer.MIN_VALUE;\n this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;\n this.edges = [];\n this.nodes = [];\n this.isConnected = false;\n this.parent = parent;\n\n if (obj2 != null && obj2 instanceof LGraphManager) {\n this.graphManager = obj2;\n } else if (obj2 != null && obj2 instanceof Layout) {\n this.graphManager = obj2.graphManager;\n }\n}\n\nLGraph.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LGraph[prop] = LGraphObject[prop];\n}\n\nLGraph.prototype.getNodes = function () {\n return this.nodes;\n};\n\nLGraph.prototype.getEdges = function () {\n return this.edges;\n};\n\nLGraph.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLGraph.prototype.getParent = function () {\n return this.parent;\n};\n\nLGraph.prototype.getLeft = function () {\n return this.left;\n};\n\nLGraph.prototype.getRight = function () {\n return this.right;\n};\n\nLGraph.prototype.getTop = function () {\n return this.top;\n};\n\nLGraph.prototype.getBottom = function () {\n return this.bottom;\n};\n\nLGraph.prototype.isConnected = function () {\n return this.isConnected;\n};\n\nLGraph.prototype.add = function (obj1, sourceNode, targetNode) {\n if (sourceNode == null && targetNode == null) {\n var newNode = obj1;\n if (this.graphManager == null) {\n throw \"Graph has no graph mgr!\";\n }\n if (this.getNodes().indexOf(newNode) > -1) {\n throw \"Node already in graph!\";\n }\n newNode.owner = this;\n this.getNodes().push(newNode);\n\n return newNode;\n } else {\n var newEdge = obj1;\n if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {\n throw \"Source or target not in graph!\";\n }\n\n if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {\n throw \"Both owners must be this graph!\";\n }\n\n if (sourceNode.owner != targetNode.owner) {\n return null;\n }\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // set as intra-graph edge\n newEdge.isInterGraph = false;\n\n // add to graph edge list\n this.getEdges().push(newEdge);\n\n // add to incidency lists\n sourceNode.edges.push(newEdge);\n\n if (targetNode != sourceNode) {\n targetNode.edges.push(newEdge);\n }\n\n return newEdge;\n }\n};\n\nLGraph.prototype.remove = function (obj) {\n var node = obj;\n if (obj instanceof LNode) {\n if (node == null) {\n throw \"Node is null!\";\n }\n if (!(node.owner != null && node.owner == this)) {\n throw \"Owner graph is invalid!\";\n }\n if (this.graphManager == null) {\n throw \"Owner graph manager is invalid!\";\n }\n // remove incident edges first (make a copy to do it safely)\n var edgesToBeRemoved = node.edges.slice();\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n\n if (edge.isInterGraph) {\n this.graphManager.remove(edge);\n } else {\n edge.source.owner.remove(edge);\n }\n }\n\n // now the node itself\n var index = this.nodes.indexOf(node);\n if (index == -1) {\n throw \"Node not in owner node list!\";\n }\n\n this.nodes.splice(index, 1);\n } else if (obj instanceof LEdge) {\n var edge = obj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {\n throw \"Source and/or target owner is invalid!\";\n }\n\n var sourceIndex = edge.source.edges.indexOf(edge);\n var targetIndex = edge.target.edges.indexOf(edge);\n if (!(sourceIndex > -1 && targetIndex > -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n edge.source.edges.splice(sourceIndex, 1);\n\n if (edge.target != edge.source) {\n edge.target.edges.splice(targetIndex, 1);\n }\n\n var index = edge.source.owner.getEdges().indexOf(edge);\n if (index == -1) {\n throw \"Not in owner's edge list!\";\n }\n\n edge.source.owner.getEdges().splice(index, 1);\n }\n};\n\nLGraph.prototype.updateLeftTop = function () {\n var top = Integer.MAX_VALUE;\n var left = Integer.MAX_VALUE;\n var nodeTop;\n var nodeLeft;\n var margin;\n\n var nodes = this.getNodes();\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeTop = lNode.getTop();\n nodeLeft = lNode.getLeft();\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n }\n\n // Do we have any nodes in this graph?\n if (top == Integer.MAX_VALUE) {\n return null;\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = left - margin;\n this.top = top - margin;\n\n // Apply the margins and return the result\n return new Point(this.left, this.top);\n};\n\nLGraph.prototype.updateBounds = function (recursive) {\n // calculate bounds\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n var margin;\n\n var nodes = this.nodes;\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n\n if (recursive && lNode.child != null) {\n lNode.updateBounds();\n }\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n if (left == Integer.MAX_VALUE) {\n this.left = this.parent.getLeft();\n this.right = this.parent.getRight();\n this.top = this.parent.getTop();\n this.bottom = this.parent.getBottom();\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = boundingRect.x - margin;\n this.right = boundingRect.x + boundingRect.width + margin;\n this.top = boundingRect.y - margin;\n this.bottom = boundingRect.y + boundingRect.height + margin;\n};\n\nLGraph.calculateBounds = function (nodes) {\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n\n return boundingRect;\n};\n\nLGraph.prototype.getInclusionTreeDepth = function () {\n if (this == this.graphManager.getRoot()) {\n return 1;\n } else {\n return this.parent.getInclusionTreeDepth();\n }\n};\n\nLGraph.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLGraph.prototype.calcEstimatedSize = function () {\n var size = 0;\n var nodes = this.nodes;\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n size += lNode.calcEstimatedSize();\n }\n\n if (size == 0) {\n this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;\n } else {\n this.estimatedSize = size / Math.sqrt(this.nodes.length);\n }\n\n return this.estimatedSize;\n};\n\nLGraph.prototype.updateConnected = function () {\n var self = this;\n if (this.nodes.length == 0) {\n this.isConnected = true;\n return;\n }\n\n var queue = new LinkedList();\n var visited = new Set();\n var currentNode = this.nodes[0];\n var neighborEdges;\n var currentNeighbor;\n var childrenOfNode = currentNode.withChildren();\n childrenOfNode.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n\n while (queue.length !== 0) {\n currentNode = queue.shift();\n\n // Traverse all neighbors of this node\n neighborEdges = currentNode.getEdges();\n var size = neighborEdges.length;\n for (var i = 0; i < size; i++) {\n var neighborEdge = neighborEdges[i];\n currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);\n\n // Add unvisited neighbors to the list to visit\n if (currentNeighbor != null && !visited.has(currentNeighbor)) {\n var childrenOfNeighbor = currentNeighbor.withChildren();\n\n childrenOfNeighbor.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n }\n }\n }\n\n this.isConnected = false;\n\n if (visited.size >= this.nodes.length) {\n var noOfVisitedInThisGraph = 0;\n\n visited.forEach(function (visitedNode) {\n if (visitedNode.owner == self) {\n noOfVisitedInThisGraph++;\n }\n });\n\n if (noOfVisitedInThisGraph == this.nodes.length) {\n this.isConnected = true;\n }\n }\n};\n\nmodule.exports = LGraph;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraph;\nvar LEdge = __webpack_require__(1);\n\nfunction LGraphManager(layout) {\n LGraph = __webpack_require__(5); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now.\n this.layout = layout;\n\n this.graphs = [];\n this.edges = [];\n}\n\nLGraphManager.prototype.addRoot = function () {\n var ngraph = this.layout.newGraph();\n var nnode = this.layout.newNode(null);\n var root = this.add(ngraph, nnode);\n this.setRootGraph(root);\n return this.rootGraph;\n};\n\nLGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) {\n //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge\n if (newEdge == null && sourceNode == null && targetNode == null) {\n if (newGraph == null) {\n throw \"Graph is null!\";\n }\n if (parentNode == null) {\n throw \"Parent node is null!\";\n }\n if (this.graphs.indexOf(newGraph) > -1) {\n throw \"Graph already in this graph mgr!\";\n }\n\n this.graphs.push(newGraph);\n\n if (newGraph.parent != null) {\n throw \"Already has a parent!\";\n }\n if (parentNode.child != null) {\n throw \"Already has a child!\";\n }\n\n newGraph.parent = parentNode;\n parentNode.child = newGraph;\n\n return newGraph;\n } else {\n //change the order of the parameters\n targetNode = newEdge;\n sourceNode = parentNode;\n newEdge = newGraph;\n var sourceGraph = sourceNode.getOwner();\n var targetGraph = targetNode.getOwner();\n\n if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {\n throw \"Source not in this graph mgr!\";\n }\n if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {\n throw \"Target not in this graph mgr!\";\n }\n\n if (sourceGraph == targetGraph) {\n newEdge.isInterGraph = false;\n return sourceGraph.add(newEdge, sourceNode, targetNode);\n } else {\n newEdge.isInterGraph = true;\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // add edge to inter-graph edge list\n if (this.edges.indexOf(newEdge) > -1) {\n throw \"Edge already in inter-graph edge list!\";\n }\n\n this.edges.push(newEdge);\n\n // add edge to source and target incidency lists\n if (!(newEdge.source != null && newEdge.target != null)) {\n throw \"Edge source and/or target is null!\";\n }\n\n if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {\n throw \"Edge already in source and/or target incidency list!\";\n }\n\n newEdge.source.edges.push(newEdge);\n newEdge.target.edges.push(newEdge);\n\n return newEdge;\n }\n }\n};\n\nLGraphManager.prototype.remove = function (lObj) {\n if (lObj instanceof LGraph) {\n var graph = lObj;\n if (graph.getGraphManager() != this) {\n throw \"Graph not in this graph mgr\";\n }\n if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {\n throw \"Invalid parent node!\";\n }\n\n // first the edges (make a copy to do it safely)\n var edgesToBeRemoved = [];\n\n edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());\n\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n graph.remove(edge);\n }\n\n // then the nodes (make a copy to do it safely)\n var nodesToBeRemoved = [];\n\n nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());\n\n var node;\n s = nodesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n node = nodesToBeRemoved[i];\n graph.remove(node);\n }\n\n // check if graph is the root\n if (graph == this.rootGraph) {\n this.setRootGraph(null);\n }\n\n // now remove the graph itself\n var index = this.graphs.indexOf(graph);\n this.graphs.splice(index, 1);\n\n // also reset the parent of the graph\n graph.parent = null;\n } else if (lObj instanceof LEdge) {\n edge = lObj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!edge.isInterGraph) {\n throw \"Not an inter-graph edge!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n\n // remove edge from source and target nodes' incidency lists\n\n if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n var index = edge.source.edges.indexOf(edge);\n edge.source.edges.splice(index, 1);\n index = edge.target.edges.indexOf(edge);\n edge.target.edges.splice(index, 1);\n\n // remove edge from owner graph manager's inter-graph edge list\n\n if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {\n throw \"Edge owner graph or owner graph manager is null!\";\n }\n if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {\n throw \"Not in owner graph manager's edge list!\";\n }\n\n var index = edge.source.owner.getGraphManager().edges.indexOf(edge);\n edge.source.owner.getGraphManager().edges.splice(index, 1);\n }\n};\n\nLGraphManager.prototype.updateBounds = function () {\n this.rootGraph.updateBounds(true);\n};\n\nLGraphManager.prototype.getGraphs = function () {\n return this.graphs;\n};\n\nLGraphManager.prototype.getAllNodes = function () {\n if (this.allNodes == null) {\n var nodeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < s; i++) {\n nodeList = nodeList.concat(graphs[i].getNodes());\n }\n this.allNodes = nodeList;\n }\n return this.allNodes;\n};\n\nLGraphManager.prototype.resetAllNodes = function () {\n this.allNodes = null;\n};\n\nLGraphManager.prototype.resetAllEdges = function () {\n this.allEdges = null;\n};\n\nLGraphManager.prototype.resetAllNodesToApplyGravitation = function () {\n this.allNodesToApplyGravitation = null;\n};\n\nLGraphManager.prototype.getAllEdges = function () {\n if (this.allEdges == null) {\n var edgeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < graphs.length; i++) {\n edgeList = edgeList.concat(graphs[i].getEdges());\n }\n\n edgeList = edgeList.concat(this.edges);\n\n this.allEdges = edgeList;\n }\n return this.allEdges;\n};\n\nLGraphManager.prototype.getAllNodesToApplyGravitation = function () {\n return this.allNodesToApplyGravitation;\n};\n\nLGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) {\n if (this.allNodesToApplyGravitation != null) {\n throw \"assert failed\";\n }\n\n this.allNodesToApplyGravitation = nodeList;\n};\n\nLGraphManager.prototype.getRoot = function () {\n return this.rootGraph;\n};\n\nLGraphManager.prototype.setRootGraph = function (graph) {\n if (graph.getGraphManager() != this) {\n throw \"Root not in this graph mgr!\";\n }\n\n this.rootGraph = graph;\n // root graph must have a root node associated with it for convenience\n if (graph.parent == null) {\n graph.parent = this.layout.newNode(\"Root node\");\n }\n};\n\nLGraphManager.prototype.getLayout = function () {\n return this.layout;\n};\n\nLGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) {\n if (!(firstNode != null && secondNode != null)) {\n throw \"assert failed\";\n }\n\n if (firstNode == secondNode) {\n return true;\n }\n // Is second node an ancestor of the first one?\n var ownerGraph = firstNode.getOwner();\n var parentNode;\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == secondNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n // Is first node an ancestor of the second one?\n ownerGraph = secondNode.getOwner();\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == firstNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n\n return false;\n};\n\nLGraphManager.prototype.calcLowestCommonAncestors = function () {\n var edge;\n var sourceNode;\n var targetNode;\n var sourceAncestorGraph;\n var targetAncestorGraph;\n\n var edges = this.getAllEdges();\n var s = edges.length;\n for (var i = 0; i < s; i++) {\n edge = edges[i];\n\n sourceNode = edge.source;\n targetNode = edge.target;\n edge.lca = null;\n edge.sourceInLca = sourceNode;\n edge.targetInLca = targetNode;\n\n if (sourceNode == targetNode) {\n edge.lca = sourceNode.getOwner();\n continue;\n }\n\n sourceAncestorGraph = sourceNode.getOwner();\n\n while (edge.lca == null) {\n edge.targetInLca = targetNode;\n targetAncestorGraph = targetNode.getOwner();\n\n while (edge.lca == null) {\n if (targetAncestorGraph == sourceAncestorGraph) {\n edge.lca = targetAncestorGraph;\n break;\n }\n\n if (targetAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca != null) {\n throw \"assert failed\";\n }\n edge.targetInLca = targetAncestorGraph.getParent();\n targetAncestorGraph = edge.targetInLca.getOwner();\n }\n\n if (sourceAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca == null) {\n edge.sourceInLca = sourceAncestorGraph.getParent();\n sourceAncestorGraph = edge.sourceInLca.getOwner();\n }\n }\n\n if (edge.lca == null) {\n throw \"assert failed\";\n }\n }\n};\n\nLGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) {\n if (firstNode == secondNode) {\n return firstNode.getOwner();\n }\n var firstOwnerGraph = firstNode.getOwner();\n\n do {\n if (firstOwnerGraph == null) {\n break;\n }\n var secondOwnerGraph = secondNode.getOwner();\n\n do {\n if (secondOwnerGraph == null) {\n break;\n }\n\n if (secondOwnerGraph == firstOwnerGraph) {\n return secondOwnerGraph;\n }\n secondOwnerGraph = secondOwnerGraph.getParent().getOwner();\n } while (true);\n\n firstOwnerGraph = firstOwnerGraph.getParent().getOwner();\n } while (true);\n\n return firstOwnerGraph;\n};\n\nLGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) {\n if (graph == null && depth == null) {\n graph = this.rootGraph;\n depth = 1;\n }\n var node;\n\n var nodes = graph.getNodes();\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n node = nodes[i];\n node.inclusionTreeDepth = depth;\n\n if (node.child != null) {\n this.calcInclusionTreeDepths(node.child, depth + 1);\n }\n }\n};\n\nLGraphManager.prototype.includesInvalidEdge = function () {\n var edge;\n\n var s = this.edges.length;\n for (var i = 0; i < s; i++) {\n edge = this.edges[i];\n\n if (this.isOneAncestorOfOther(edge.source, edge.target)) {\n return true;\n }\n }\n return false;\n};\n\nmodule.exports = LGraphManager;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LayoutConstants = __webpack_require__(0);\n\nfunction FDLayoutConstants() {}\n\n//FDLayoutConstants inherits static props in LayoutConstants\nfor (var prop in LayoutConstants) {\n FDLayoutConstants[prop] = LayoutConstants[prop];\n}\n\nFDLayoutConstants.MAX_ITERATIONS = 2500;\n\nFDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;\nFDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;\nFDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0;\nFDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0;\nFDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;\nFDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;\nFDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;\nFDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;\nFDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;\nFDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000;\nFDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;\nFDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;\nFDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;\nFDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;\nFDLayoutConstants.MIN_EDGE_LENGTH = 1;\nFDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;\n\nmodule.exports = FDLayoutConstants;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * This class maintains a list of static geometry related utility methods.\n *\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar Point = __webpack_require__(12);\n\nfunction IGeometry() {}\n\n/**\n * This method calculates *half* the amount in x and y directions of the two\n * input rectangles needed to separate them keeping their respective\n * positioning, and returns the result in the input array. An input\n * separation buffer added to the amount in both directions. We assume that\n * the two rectangles do intersect.\n */\nIGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) {\n if (!rectA.intersects(rectB)) {\n throw \"assert failed\";\n }\n\n var directions = new Array(2);\n\n this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);\n\n overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);\n overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);\n\n // update the overlapping amounts for the following cases:\n if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {\n /* Case x.1:\n *\n * rectA\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectB\n */\n overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());\n } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {\n /* Case x.2:\n *\n * rectB\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectA\n */\n overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());\n }\n if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {\n /* Case y.1:\n * ________ rectA\n * |\n * |\n * ______|____ rectB\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());\n } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {\n /* Case y.2:\n * ________ rectB\n * |\n * |\n * ______|____ rectA\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());\n }\n\n // find slope of the line passes two centers\n var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));\n // if centers are overlapped\n if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {\n // assume the slope is 1 (45 degree)\n slope = 1.0;\n }\n\n var moveByY = slope * overlapAmount[0];\n var moveByX = overlapAmount[1] / slope;\n if (overlapAmount[0] < moveByX) {\n moveByX = overlapAmount[0];\n } else {\n moveByY = overlapAmount[1];\n }\n // return half the amount so that if each rectangle is moved by these\n // amounts in opposite directions, overlap will be resolved\n overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);\n overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);\n};\n\n/**\n * This method decides the separation direction of overlapping nodes\n *\n * if directions[0] = -1, then rectA goes left\n * if directions[0] = 1, then rectA goes right\n * if directions[1] = -1, then rectA goes up\n * if directions[1] = 1, then rectA goes down\n */\nIGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) {\n if (rectA.getCenterX() < rectB.getCenterX()) {\n directions[0] = -1;\n } else {\n directions[0] = 1;\n }\n\n if (rectA.getCenterY() < rectB.getCenterY()) {\n directions[1] = -1;\n } else {\n directions[1] = 1;\n }\n};\n\n/**\n * This method calculates the intersection (clipping) points of the two\n * input rectangles with line segment defined by the centers of these two\n * rectangles. The clipping points are saved in the input double array and\n * whether or not the two rectangles overlap is returned.\n */\nIGeometry.getIntersection2 = function (rectA, rectB, result) {\n //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB\n var p1x = rectA.getCenterX();\n var p1y = rectA.getCenterY();\n var p2x = rectB.getCenterX();\n var p2y = rectB.getCenterY();\n\n //if two rectangles intersect, then clipping points are centers\n if (rectA.intersects(rectB)) {\n result[0] = p1x;\n result[1] = p1y;\n result[2] = p2x;\n result[3] = p2y;\n return true;\n }\n //variables for rectA\n var topLeftAx = rectA.getX();\n var topLeftAy = rectA.getY();\n var topRightAx = rectA.getRight();\n var bottomLeftAx = rectA.getX();\n var bottomLeftAy = rectA.getBottom();\n var bottomRightAx = rectA.getRight();\n var halfWidthA = rectA.getWidthHalf();\n var halfHeightA = rectA.getHeightHalf();\n //variables for rectB\n var topLeftBx = rectB.getX();\n var topLeftBy = rectB.getY();\n var topRightBx = rectB.getRight();\n var bottomLeftBx = rectB.getX();\n var bottomLeftBy = rectB.getBottom();\n var bottomRightBx = rectB.getRight();\n var halfWidthB = rectB.getWidthHalf();\n var halfHeightB = rectB.getHeightHalf();\n\n //flag whether clipping points are found\n var clipPointAFound = false;\n var clipPointBFound = false;\n\n // line is vertical\n if (p1x === p2x) {\n if (p1y > p2y) {\n result[0] = p1x;\n result[1] = topLeftAy;\n result[2] = p2x;\n result[3] = bottomLeftBy;\n return false;\n } else if (p1y < p2y) {\n result[0] = p1x;\n result[1] = bottomLeftAy;\n result[2] = p2x;\n result[3] = topLeftBy;\n return false;\n } else {\n //not line, return null;\n }\n }\n // line is horizontal\n else if (p1y === p2y) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = p1y;\n result[2] = topRightBx;\n result[3] = p2y;\n return false;\n } else if (p1x < p2x) {\n result[0] = topRightAx;\n result[1] = p1y;\n result[2] = topLeftBx;\n result[3] = p2y;\n return false;\n } else {\n //not valid line, return null;\n }\n } else {\n //slopes of rectA's and rectB's diagonals\n var slopeA = rectA.height / rectA.width;\n var slopeB = rectB.height / rectB.width;\n\n //slope of line between center of rectA and center of rectB\n var slopePrime = (p2y - p1y) / (p2x - p1x);\n var cardinalDirectionA = void 0;\n var cardinalDirectionB = void 0;\n var tempPointAx = void 0;\n var tempPointAy = void 0;\n var tempPointBx = void 0;\n var tempPointBy = void 0;\n\n //determine whether clipping point is the corner of nodeA\n if (-slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = bottomLeftAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = topRightAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n }\n } else if (slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = bottomRightAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n }\n }\n\n //determine whether clipping point is the corner of nodeB\n if (-slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = bottomLeftBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = topRightBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n }\n } else if (slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = topLeftBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = bottomRightBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n }\n }\n\n //if both clipping points are corners\n if (clipPointAFound && clipPointBFound) {\n return false;\n }\n\n //determine Cardinal Direction of rectangles\n if (p1x > p2x) {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);\n } else {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);\n }\n } else {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);\n } else {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);\n }\n }\n //calculate clipping Point if it is not found before\n if (!clipPointAFound) {\n switch (cardinalDirectionA) {\n case 1:\n tempPointAy = topLeftAy;\n tempPointAx = p1x + -halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 2:\n tempPointAx = bottomRightAx;\n tempPointAy = p1y + halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 3:\n tempPointAy = bottomLeftAy;\n tempPointAx = p1x + halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 4:\n tempPointAx = bottomLeftAx;\n tempPointAy = p1y + -halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n }\n }\n if (!clipPointBFound) {\n switch (cardinalDirectionB) {\n case 1:\n tempPointBy = topLeftBy;\n tempPointBx = p2x + -halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 2:\n tempPointBx = bottomRightBx;\n tempPointBy = p2y + halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 3:\n tempPointBy = bottomLeftBy;\n tempPointBx = p2x + halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 4:\n tempPointBx = bottomLeftBx;\n tempPointBy = p2y + -halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n }\n }\n }\n return false;\n};\n\n/**\n * This method returns in which cardinal direction does input point stays\n * 1: North\n * 2: East\n * 3: South\n * 4: West\n */\nIGeometry.getCardinalDirection = function (slope, slopePrime, line) {\n if (slope > slopePrime) {\n return line;\n } else {\n return 1 + line % 4;\n }\n};\n\n/**\n * This method calculates the intersection of the two lines defined by\n * point pairs (s1,s2) and (f1,f2).\n */\nIGeometry.getIntersection = function (s1, s2, f1, f2) {\n if (f2 == null) {\n return this.getIntersection2(s1, s2, f1);\n }\n\n var x1 = s1.x;\n var y1 = s1.y;\n var x2 = s2.x;\n var y2 = s2.y;\n var x3 = f1.x;\n var y3 = f1.y;\n var x4 = f2.x;\n var y4 = f2.y;\n var x = void 0,\n y = void 0; // intersection point\n var a1 = void 0,\n a2 = void 0,\n b1 = void 0,\n b2 = void 0,\n c1 = void 0,\n c2 = void 0; // coefficients of line eqns.\n var denom = void 0;\n\n a1 = y2 - y1;\n b1 = x1 - x2;\n c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 }\n\n a2 = y4 - y3;\n b2 = x3 - x4;\n c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 }\n\n denom = a1 * b2 - a2 * b1;\n\n if (denom === 0) {\n return null;\n }\n\n x = (b1 * c2 - b2 * c1) / denom;\n y = (a2 * c1 - a1 * c2) / denom;\n\n return new Point(x, y);\n};\n\n/**\n * This method finds and returns the angle of the vector from the + x-axis\n * in clockwise direction (compatible w/ Java coordinate system!).\n */\nIGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) {\n var C_angle = void 0;\n\n if (Cx !== Nx) {\n C_angle = Math.atan((Ny - Cy) / (Nx - Cx));\n\n if (Nx < Cx) {\n C_angle += Math.PI;\n } else if (Ny < Cy) {\n C_angle += this.TWO_PI;\n }\n } else if (Ny < Cy) {\n C_angle = this.ONE_AND_HALF_PI; // 270 degrees\n } else {\n C_angle = this.HALF_PI; // 90 degrees\n }\n\n return C_angle;\n};\n\n/**\n * This method checks whether the given two line segments (one with point\n * p1 and p2, the other with point p3 and p4) intersect at a point other\n * than these points.\n */\nIGeometry.doIntersect = function (p1, p2, p3, p4) {\n var a = p1.x;\n var b = p1.y;\n var c = p2.x;\n var d = p2.y;\n var p = p3.x;\n var q = p3.y;\n var r = p4.x;\n var s = p4.y;\n var det = (c - a) * (s - q) - (r - p) * (d - b);\n\n if (det === 0) {\n return false;\n } else {\n var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;\n var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;\n return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: Class Constants\n// -----------------------------------------------------------------------------\n/**\n * Some useful pre-calculated constants\n */\nIGeometry.HALF_PI = 0.5 * Math.PI;\nIGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;\nIGeometry.TWO_PI = 2.0 * Math.PI;\nIGeometry.THREE_PI = 3.0 * Math.PI;\n\nmodule.exports = IGeometry;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction IMath() {}\n\n/**\n * This method returns the sign of the input value.\n */\nIMath.sign = function (value) {\n if (value > 0) {\n return 1;\n } else if (value < 0) {\n return -1;\n } else {\n return 0;\n }\n};\n\nIMath.floor = function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n};\n\nIMath.ceil = function (value) {\n return value < 0 ? Math.floor(value) : Math.ceil(value);\n};\n\nmodule.exports = IMath;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Integer() {}\n\nInteger.MAX_VALUE = 2147483647;\nInteger.MIN_VALUE = -2147483648;\n\nmodule.exports = Integer;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar nodeFrom = function nodeFrom(value) {\n return { value: value, next: null, prev: null };\n};\n\nvar add = function add(prev, node, next, list) {\n if (prev !== null) {\n prev.next = node;\n } else {\n list.head = node;\n }\n\n if (next !== null) {\n next.prev = node;\n } else {\n list.tail = node;\n }\n\n node.prev = prev;\n node.next = next;\n\n list.length++;\n\n return node;\n};\n\nvar _remove = function _remove(node, list) {\n var prev = node.prev,\n next = node.next;\n\n\n if (prev !== null) {\n prev.next = next;\n } else {\n list.head = next;\n }\n\n if (next !== null) {\n next.prev = prev;\n } else {\n list.tail = prev;\n }\n\n node.prev = node.next = null;\n\n list.length--;\n\n return node;\n};\n\nvar LinkedList = function () {\n function LinkedList(vals) {\n var _this = this;\n\n _classCallCheck(this, LinkedList);\n\n this.length = 0;\n this.head = null;\n this.tail = null;\n\n if (vals != null) {\n vals.forEach(function (v) {\n return _this.push(v);\n });\n }\n }\n\n _createClass(LinkedList, [{\n key: \"size\",\n value: function size() {\n return this.length;\n }\n }, {\n key: \"insertBefore\",\n value: function insertBefore(val, otherNode) {\n return add(otherNode.prev, nodeFrom(val), otherNode, this);\n }\n }, {\n key: \"insertAfter\",\n value: function insertAfter(val, otherNode) {\n return add(otherNode, nodeFrom(val), otherNode.next, this);\n }\n }, {\n key: \"insertNodeBefore\",\n value: function insertNodeBefore(newNode, otherNode) {\n return add(otherNode.prev, newNode, otherNode, this);\n }\n }, {\n key: \"insertNodeAfter\",\n value: function insertNodeAfter(newNode, otherNode) {\n return add(otherNode, newNode, otherNode.next, this);\n }\n }, {\n key: \"push\",\n value: function push(val) {\n return add(this.tail, nodeFrom(val), null, this);\n }\n }, {\n key: \"unshift\",\n value: function unshift(val) {\n return add(null, nodeFrom(val), this.head, this);\n }\n }, {\n key: \"remove\",\n value: function remove(node) {\n return _remove(node, this);\n }\n }, {\n key: \"pop\",\n value: function pop() {\n return _remove(this.tail, this).value;\n }\n }, {\n key: \"popNode\",\n value: function popNode() {\n return _remove(this.tail, this);\n }\n }, {\n key: \"shift\",\n value: function shift() {\n return _remove(this.head, this).value;\n }\n }, {\n key: \"shiftNode\",\n value: function shiftNode() {\n return _remove(this.head, this);\n }\n }, {\n key: \"get_object_at\",\n value: function get_object_at(index) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n return current.value;\n }\n }\n }, {\n key: \"set_object_at\",\n value: function set_object_at(index, value) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n current.value = value;\n }\n }\n }]);\n\n return LinkedList;\n}();\n\nmodule.exports = LinkedList;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\r\n *This class is the javascript implementation of the Point.java class in jdk\r\n */\nfunction Point(x, y, p) {\n this.x = null;\n this.y = null;\n if (x == null && y == null && p == null) {\n this.x = 0;\n this.y = 0;\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n this.x = x;\n this.y = y;\n } else if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.x = p.x;\n this.y = p.y;\n }\n}\n\nPoint.prototype.getX = function () {\n return this.x;\n};\n\nPoint.prototype.getY = function () {\n return this.y;\n};\n\nPoint.prototype.getLocation = function () {\n return new Point(this.x, this.y);\n};\n\nPoint.prototype.setLocation = function (x, y, p) {\n if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.setLocation(p.x, p.y);\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n //if both parameters are integer just move (x,y) location\n if (parseInt(x) == x && parseInt(y) == y) {\n this.move(x, y);\n } else {\n this.x = Math.floor(x + 0.5);\n this.y = Math.floor(y + 0.5);\n }\n }\n};\n\nPoint.prototype.move = function (x, y) {\n this.x = x;\n this.y = y;\n};\n\nPoint.prototype.translate = function (dx, dy) {\n this.x += dx;\n this.y += dy;\n};\n\nPoint.prototype.equals = function (obj) {\n if (obj.constructor.name == \"Point\") {\n var pt = obj;\n return this.x == pt.x && this.y == pt.y;\n }\n return this == obj;\n};\n\nPoint.prototype.toString = function () {\n return new Point().constructor.name + \"[x=\" + this.x + \",y=\" + this.y + \"]\";\n};\n\nmodule.exports = Point;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RectangleD(x, y, width, height) {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n\n if (x != null && y != null && width != null && height != null) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n}\n\nRectangleD.prototype.getX = function () {\n return this.x;\n};\n\nRectangleD.prototype.setX = function (x) {\n this.x = x;\n};\n\nRectangleD.prototype.getY = function () {\n return this.y;\n};\n\nRectangleD.prototype.setY = function (y) {\n this.y = y;\n};\n\nRectangleD.prototype.getWidth = function () {\n return this.width;\n};\n\nRectangleD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nRectangleD.prototype.getHeight = function () {\n return this.height;\n};\n\nRectangleD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nRectangleD.prototype.getRight = function () {\n return this.x + this.width;\n};\n\nRectangleD.prototype.getBottom = function () {\n return this.y + this.height;\n};\n\nRectangleD.prototype.intersects = function (a) {\n if (this.getRight() < a.x) {\n return false;\n }\n\n if (this.getBottom() < a.y) {\n return false;\n }\n\n if (a.getRight() < this.x) {\n return false;\n }\n\n if (a.getBottom() < this.y) {\n return false;\n }\n\n return true;\n};\n\nRectangleD.prototype.getCenterX = function () {\n return this.x + this.width / 2;\n};\n\nRectangleD.prototype.getMinX = function () {\n return this.getX();\n};\n\nRectangleD.prototype.getMaxX = function () {\n return this.getX() + this.width;\n};\n\nRectangleD.prototype.getCenterY = function () {\n return this.y + this.height / 2;\n};\n\nRectangleD.prototype.getMinY = function () {\n return this.getY();\n};\n\nRectangleD.prototype.getMaxY = function () {\n return this.getY() + this.height;\n};\n\nRectangleD.prototype.getWidthHalf = function () {\n return this.width / 2;\n};\n\nRectangleD.prototype.getHeightHalf = function () {\n return this.height / 2;\n};\n\nmodule.exports = RectangleD;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction UniqueIDGeneretor() {}\n\nUniqueIDGeneretor.lastID = 0;\n\nUniqueIDGeneretor.createID = function (obj) {\n if (UniqueIDGeneretor.isPrimitive(obj)) {\n return obj;\n }\n if (obj.uniqueID != null) {\n return obj.uniqueID;\n }\n obj.uniqueID = UniqueIDGeneretor.getString();\n UniqueIDGeneretor.lastID++;\n return obj.uniqueID;\n};\n\nUniqueIDGeneretor.getString = function (id) {\n if (id == null) id = UniqueIDGeneretor.lastID;\n return \"Object#\" + id + \"\";\n};\n\nUniqueIDGeneretor.isPrimitive = function (arg) {\n var type = typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg);\n return arg == null || type != \"object\" && type != \"function\";\n};\n\nmodule.exports = UniqueIDGeneretor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(6);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar LGraph = __webpack_require__(5);\nvar PointD = __webpack_require__(4);\nvar Transform = __webpack_require__(17);\nvar Emitter = __webpack_require__(27);\n\nfunction Layout(isRemoteUse) {\n Emitter.call(this);\n\n //Layout Quality: 0:draft, 1:default, 2:proof\n this.layoutQuality = LayoutConstants.QUALITY;\n //Whether layout should create bendpoints as needed or not\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n //Whether layout should be incremental or not\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n //Whether we animate from before to after layout node positions\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n //Whether we animate the layout process or not\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n //Number iterations that should be done between two successive animations\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n /**\r\n * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When\r\n * they are, both spring and repulsion forces between two leaf nodes can be\r\n * calculated without the expensive clipping point calculations, resulting\r\n * in major speed-up.\r\n */\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n /**\r\n * This is used for creation of bendpoints by using dummy nodes and edges.\r\n * Maps an LEdge to its dummy bendpoint path.\r\n */\n this.edgeToDummyNodes = new Map();\n this.graphManager = new LGraphManager(this);\n this.isLayoutFinished = false;\n this.isSubLayout = false;\n this.isRemoteUse = false;\n\n if (isRemoteUse != null) {\n this.isRemoteUse = isRemoteUse;\n }\n}\n\nLayout.RANDOM_SEED = 1;\n\nLayout.prototype = Object.create(Emitter.prototype);\n\nLayout.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLayout.prototype.getAllNodes = function () {\n return this.graphManager.getAllNodes();\n};\n\nLayout.prototype.getAllEdges = function () {\n return this.graphManager.getAllEdges();\n};\n\nLayout.prototype.getAllNodesToApplyGravitation = function () {\n return this.graphManager.getAllNodesToApplyGravitation();\n};\n\nLayout.prototype.newGraphManager = function () {\n var gm = new LGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nLayout.prototype.newGraph = function (vGraph) {\n return new LGraph(null, this.graphManager, vGraph);\n};\n\nLayout.prototype.newNode = function (vNode) {\n return new LNode(this.graphManager, vNode);\n};\n\nLayout.prototype.newEdge = function (vEdge) {\n return new LEdge(null, null, vEdge);\n};\n\nLayout.prototype.checkLayoutSuccess = function () {\n return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();\n};\n\nLayout.prototype.runLayout = function () {\n this.isLayoutFinished = false;\n\n if (this.tilingPreLayout) {\n this.tilingPreLayout();\n }\n\n this.initParameters();\n var isLayoutSuccessfull;\n\n if (this.checkLayoutSuccess()) {\n isLayoutSuccessfull = false;\n } else {\n isLayoutSuccessfull = this.layout();\n }\n\n if (LayoutConstants.ANIMATE === 'during') {\n // If this is a 'during' layout animation. Layout is not finished yet. \n // We need to perform these in index.js when layout is really finished.\n return false;\n }\n\n if (isLayoutSuccessfull) {\n if (!this.isSubLayout) {\n this.doPostLayout();\n }\n }\n\n if (this.tilingPostLayout) {\n this.tilingPostLayout();\n }\n\n this.isLayoutFinished = true;\n\n return isLayoutSuccessfull;\n};\n\n/**\r\n * This method performs the operations required after layout.\r\n */\nLayout.prototype.doPostLayout = function () {\n //assert !isSubLayout : \"Should not be called on sub-layout!\";\n // Propagate geometric changes to v-level objects\n if (!this.incremental) {\n this.transform();\n }\n this.update();\n};\n\n/**\r\n * This method updates the geometry of the target graph according to\r\n * calculated layout.\r\n */\nLayout.prototype.update2 = function () {\n // update bend points\n if (this.createBendsAsNeeded) {\n this.createBendpointsFromDummyNodes();\n\n // reset all edges, since the topology has changed\n this.graphManager.resetAllEdges();\n }\n\n // perform edge, node and root updates if layout is not called\n // remotely\n if (!this.isRemoteUse) {\n // update all edges\n var edge;\n var allEdges = this.graphManager.getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n // this.update(edge);\n }\n\n // recursively update nodes\n var node;\n var nodes = this.graphManager.getRoot().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n // this.update(node);\n }\n\n // update root graph\n this.update(this.graphManager.getRoot());\n }\n};\n\nLayout.prototype.update = function (obj) {\n if (obj == null) {\n this.update2();\n } else if (obj instanceof LNode) {\n var node = obj;\n if (node.getChild() != null) {\n // since node is compound, recursively update child nodes\n var nodes = node.getChild().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n update(nodes[i]);\n }\n }\n\n // if the l-level node is associated with a v-level graph object,\n // then it is assumed that the v-level node implements the\n // interface Updatable.\n if (node.vGraphObject != null) {\n // cast to Updatable without any type check\n var vNode = node.vGraphObject;\n\n // call the update method of the interface\n vNode.update(node);\n }\n } else if (obj instanceof LEdge) {\n var edge = obj;\n // if the l-level edge is associated with a v-level graph object,\n // then it is assumed that the v-level edge implements the\n // interface Updatable.\n\n if (edge.vGraphObject != null) {\n // cast to Updatable without any type check\n var vEdge = edge.vGraphObject;\n\n // call the update method of the interface\n vEdge.update(edge);\n }\n } else if (obj instanceof LGraph) {\n var graph = obj;\n // if the l-level graph is associated with a v-level graph object,\n // then it is assumed that the v-level object implements the\n // interface Updatable.\n\n if (graph.vGraphObject != null) {\n // cast to Updatable without any type check\n var vGraph = graph.vGraphObject;\n\n // call the update method of the interface\n vGraph.update(graph);\n }\n }\n};\n\n/**\r\n * This method is used to set all layout parameters to default values\r\n * determined at compile time.\r\n */\nLayout.prototype.initParameters = function () {\n if (!this.isSubLayout) {\n this.layoutQuality = LayoutConstants.QUALITY;\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n }\n\n if (this.animationDuringLayout) {\n this.animationOnLayout = false;\n }\n};\n\nLayout.prototype.transform = function (newLeftTop) {\n if (newLeftTop == undefined) {\n this.transform(new PointD(0, 0));\n } else {\n // create a transformation object (from Eclipse to layout). When an\n // inverse transform is applied, we get upper-left coordinate of the\n // drawing or the root graph at given input coordinate (some margins\n // already included in calculation of left-top).\n\n var trans = new Transform();\n var leftTop = this.graphManager.getRoot().updateLeftTop();\n\n if (leftTop != null) {\n trans.setWorldOrgX(newLeftTop.x);\n trans.setWorldOrgY(newLeftTop.y);\n\n trans.setDeviceOrgX(leftTop.x);\n trans.setDeviceOrgY(leftTop.y);\n\n var nodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n node.transform(trans);\n }\n }\n }\n};\n\nLayout.prototype.positionNodesRandomly = function (graph) {\n\n if (graph == undefined) {\n //assert !this.incremental;\n this.positionNodesRandomly(this.getGraphManager().getRoot());\n this.getGraphManager().getRoot().updateBounds(true);\n } else {\n var lNode;\n var childGraph;\n\n var nodes = graph.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n lNode = nodes[i];\n childGraph = lNode.getChild();\n\n if (childGraph == null) {\n lNode.scatter();\n } else if (childGraph.getNodes().length == 0) {\n lNode.scatter();\n } else {\n this.positionNodesRandomly(childGraph);\n lNode.updateBounds();\n }\n }\n }\n};\n\n/**\r\n * This method returns a list of trees where each tree is represented as a\r\n * list of l-nodes. The method returns a list of size 0 when:\r\n * - The graph is not flat or\r\n * - One of the component(s) of the graph is not a tree.\r\n */\nLayout.prototype.getFlatForest = function () {\n var flatForest = [];\n var isForest = true;\n\n // Quick reference for all nodes in the graph manager associated with\n // this layout. The list should not be changed.\n var allNodes = this.graphManager.getRoot().getNodes();\n\n // First be sure that the graph is flat\n var isFlat = true;\n\n for (var i = 0; i < allNodes.length; i++) {\n if (allNodes[i].getChild() != null) {\n isFlat = false;\n }\n }\n\n // Return empty forest if the graph is not flat.\n if (!isFlat) {\n return flatForest;\n }\n\n // Run BFS for each component of the graph.\n\n var visited = new Set();\n var toBeVisited = [];\n var parents = new Map();\n var unProcessedNodes = [];\n\n unProcessedNodes = unProcessedNodes.concat(allNodes);\n\n // Each iteration of this loop finds a component of the graph and\n // decides whether it is a tree or not. If it is a tree, adds it to the\n // forest and continued with the next component.\n\n while (unProcessedNodes.length > 0 && isForest) {\n toBeVisited.push(unProcessedNodes[0]);\n\n // Start the BFS. Each iteration of this loop visits a node in a\n // BFS manner.\n while (toBeVisited.length > 0 && isForest) {\n //pool operation\n var currentNode = toBeVisited[0];\n toBeVisited.splice(0, 1);\n visited.add(currentNode);\n\n // Traverse all neighbors of this node\n var neighborEdges = currentNode.getEdges();\n\n for (var i = 0; i < neighborEdges.length; i++) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);\n\n // If BFS is not growing from this neighbor.\n if (parents.get(currentNode) != currentNeighbor) {\n // We haven't previously visited this neighbor.\n if (!visited.has(currentNeighbor)) {\n toBeVisited.push(currentNeighbor);\n parents.set(currentNeighbor, currentNode);\n }\n // Since we have previously visited this neighbor and\n // this neighbor is not parent of currentNode, given\n // graph contains a component that is not tree, hence\n // it is not a forest.\n else {\n isForest = false;\n break;\n }\n }\n }\n }\n\n // The graph contains a component that is not a tree. Empty\n // previously found trees. The method will end.\n if (!isForest) {\n flatForest = [];\n }\n // Save currently visited nodes as a tree in our forest. Reset\n // visited and parents lists. Continue with the next component of\n // the graph, if any.\n else {\n var temp = [].concat(_toConsumableArray(visited));\n flatForest.push(temp);\n //flatForest = flatForest.concat(temp);\n //unProcessedNodes.removeAll(visited);\n for (var i = 0; i < temp.length; i++) {\n var value = temp[i];\n var index = unProcessedNodes.indexOf(value);\n if (index > -1) {\n unProcessedNodes.splice(index, 1);\n }\n }\n visited = new Set();\n parents = new Map();\n }\n }\n\n return flatForest;\n};\n\n/**\r\n * This method creates dummy nodes (an l-level node with minimal dimensions)\r\n * for the given edge (one per bendpoint). The existing l-level structure\r\n * is updated accordingly.\r\n */\nLayout.prototype.createDummyNodesForBendpoints = function (edge) {\n var dummyNodes = [];\n var prev = edge.source;\n\n var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);\n\n for (var i = 0; i < edge.bendpoints.length; i++) {\n // create new dummy node\n var dummyNode = this.newNode(null);\n dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));\n\n graph.add(dummyNode);\n\n // create new dummy edge between prev and dummy node\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, dummyNode);\n\n dummyNodes.add(dummyNode);\n prev = dummyNode;\n }\n\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, edge.target);\n\n this.edgeToDummyNodes.set(edge, dummyNodes);\n\n // remove real edge from graph manager if it is inter-graph\n if (edge.isInterGraph()) {\n this.graphManager.remove(edge);\n }\n // else, remove the edge from the current graph\n else {\n graph.remove(edge);\n }\n\n return dummyNodes;\n};\n\n/**\r\n * This method creates bendpoints for edges from the dummy nodes\r\n * at l-level.\r\n */\nLayout.prototype.createBendpointsFromDummyNodes = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);\n\n for (var k = 0; k < edges.length; k++) {\n var lEdge = edges[k];\n\n if (lEdge.bendpoints.length > 0) {\n var path = this.edgeToDummyNodes.get(lEdge);\n\n for (var i = 0; i < path.length; i++) {\n var dummyNode = path[i];\n var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());\n\n // update bendpoint's location according to dummy node\n var ebp = lEdge.bendpoints.get(i);\n ebp.x = p.x;\n ebp.y = p.y;\n\n // remove the dummy node, dummy edges incident with this\n // dummy node is also removed (within the remove method)\n dummyNode.getOwner().remove(dummyNode);\n }\n\n // add the real edge to graph\n this.graphManager.add(lEdge, lEdge.source, lEdge.target);\n }\n }\n};\n\nLayout.transform = function (sliderValue, defaultValue, minDiv, maxMul) {\n if (minDiv != undefined && maxMul != undefined) {\n var value = defaultValue;\n\n if (sliderValue <= 50) {\n var minValue = defaultValue / minDiv;\n value -= (defaultValue - minValue) / 50 * (50 - sliderValue);\n } else {\n var maxValue = defaultValue * maxMul;\n value += (maxValue - defaultValue) / 50 * (sliderValue - 50);\n }\n\n return value;\n } else {\n var a, b;\n\n if (sliderValue <= 50) {\n a = 9.0 * defaultValue / 500.0;\n b = defaultValue / 10.0;\n } else {\n a = 9.0 * defaultValue / 50.0;\n b = -8 * defaultValue;\n }\n\n return a * sliderValue + b;\n }\n};\n\n/**\r\n * This method finds and returns the center of the given nodes, assuming\r\n * that the given nodes form a tree in themselves.\r\n */\nLayout.findCenterOfTree = function (nodes) {\n var list = [];\n list = list.concat(nodes);\n\n var removedNodes = [];\n var remainingDegrees = new Map();\n var foundCenter = false;\n var centerNode = null;\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n var degree = node.getNeighborsList().size;\n remainingDegrees.set(node, node.getNeighborsList().size);\n\n if (degree == 1) {\n removedNodes.push(node);\n }\n }\n\n var tempList = [];\n tempList = tempList.concat(removedNodes);\n\n while (!foundCenter) {\n var tempList2 = [];\n tempList2 = tempList2.concat(tempList);\n tempList = [];\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n\n var index = list.indexOf(node);\n if (index >= 0) {\n list.splice(index, 1);\n }\n\n var neighbours = node.getNeighborsList();\n\n neighbours.forEach(function (neighbour) {\n if (removedNodes.indexOf(neighbour) < 0) {\n var otherDegree = remainingDegrees.get(neighbour);\n var newDegree = otherDegree - 1;\n\n if (newDegree == 1) {\n tempList.push(neighbour);\n }\n\n remainingDegrees.set(neighbour, newDegree);\n }\n });\n }\n\n removedNodes = removedNodes.concat(tempList);\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n }\n\n return centerNode;\n};\n\n/**\r\n * During the coarsening process, this layout may be referenced by two graph managers\r\n * this setter function grants access to change the currently being used graph manager\r\n */\nLayout.prototype.setGraphManager = function (gm) {\n this.graphManager = gm;\n};\n\nmodule.exports = Layout;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RandomSeed() {}\n// adapted from: https://stackoverflow.com/a/19303725\nRandomSeed.seed = 1;\nRandomSeed.x = 0;\n\nRandomSeed.nextDouble = function () {\n RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000;\n return RandomSeed.x - Math.floor(RandomSeed.x);\n};\n\nmodule.exports = RandomSeed;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PointD = __webpack_require__(4);\n\nfunction Transform(x, y) {\n this.lworldOrgX = 0.0;\n this.lworldOrgY = 0.0;\n this.ldeviceOrgX = 0.0;\n this.ldeviceOrgY = 0.0;\n this.lworldExtX = 1.0;\n this.lworldExtY = 1.0;\n this.ldeviceExtX = 1.0;\n this.ldeviceExtY = 1.0;\n}\n\nTransform.prototype.getWorldOrgX = function () {\n return this.lworldOrgX;\n};\n\nTransform.prototype.setWorldOrgX = function (wox) {\n this.lworldOrgX = wox;\n};\n\nTransform.prototype.getWorldOrgY = function () {\n return this.lworldOrgY;\n};\n\nTransform.prototype.setWorldOrgY = function (woy) {\n this.lworldOrgY = woy;\n};\n\nTransform.prototype.getWorldExtX = function () {\n return this.lworldExtX;\n};\n\nTransform.prototype.setWorldExtX = function (wex) {\n this.lworldExtX = wex;\n};\n\nTransform.prototype.getWorldExtY = function () {\n return this.lworldExtY;\n};\n\nTransform.prototype.setWorldExtY = function (wey) {\n this.lworldExtY = wey;\n};\n\n/* Device related */\n\nTransform.prototype.getDeviceOrgX = function () {\n return this.ldeviceOrgX;\n};\n\nTransform.prototype.setDeviceOrgX = function (dox) {\n this.ldeviceOrgX = dox;\n};\n\nTransform.prototype.getDeviceOrgY = function () {\n return this.ldeviceOrgY;\n};\n\nTransform.prototype.setDeviceOrgY = function (doy) {\n this.ldeviceOrgY = doy;\n};\n\nTransform.prototype.getDeviceExtX = function () {\n return this.ldeviceExtX;\n};\n\nTransform.prototype.setDeviceExtX = function (dex) {\n this.ldeviceExtX = dex;\n};\n\nTransform.prototype.getDeviceExtY = function () {\n return this.ldeviceExtY;\n};\n\nTransform.prototype.setDeviceExtY = function (dey) {\n this.ldeviceExtY = dey;\n};\n\nTransform.prototype.transformX = function (x) {\n var xDevice = 0.0;\n var worldExtX = this.lworldExtX;\n if (worldExtX != 0.0) {\n xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;\n }\n\n return xDevice;\n};\n\nTransform.prototype.transformY = function (y) {\n var yDevice = 0.0;\n var worldExtY = this.lworldExtY;\n if (worldExtY != 0.0) {\n yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;\n }\n\n return yDevice;\n};\n\nTransform.prototype.inverseTransformX = function (x) {\n var xWorld = 0.0;\n var deviceExtX = this.ldeviceExtX;\n if (deviceExtX != 0.0) {\n xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;\n }\n\n return xWorld;\n};\n\nTransform.prototype.inverseTransformY = function (y) {\n var yWorld = 0.0;\n var deviceExtY = this.ldeviceExtY;\n if (deviceExtY != 0.0) {\n yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;\n }\n return yWorld;\n};\n\nTransform.prototype.inverseTransformPoint = function (inPoint) {\n var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));\n return outPoint;\n};\n\nmodule.exports = Transform;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar Layout = __webpack_require__(15);\nvar FDLayoutConstants = __webpack_require__(7);\nvar LayoutConstants = __webpack_require__(0);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction FDLayout() {\n Layout.call(this);\n\n this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;\n this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.totalDisplacement = 0.0;\n this.oldTotalDisplacement = 0.0;\n this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;\n}\n\nFDLayout.prototype = Object.create(Layout.prototype);\n\nfor (var prop in Layout) {\n FDLayout[prop] = Layout[prop];\n}\n\nFDLayout.prototype.initParameters = function () {\n Layout.prototype.initParameters.call(this, arguments);\n\n this.totalIterations = 0;\n this.notAnimatedIterations = 0;\n\n this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;\n\n this.grid = [];\n};\n\nFDLayout.prototype.calcIdealEdgeLengths = function () {\n var edge;\n var lcaDepth;\n var source;\n var target;\n var sizeOfSourceInLca;\n var sizeOfTargetInLca;\n\n var allEdges = this.getGraphManager().getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n\n edge.idealLength = this.idealEdgeLength;\n\n if (edge.isInterGraph) {\n source = edge.getSource();\n target = edge.getTarget();\n\n sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();\n sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();\n\n if (this.useSmartIdealEdgeLengthCalculation) {\n edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;\n }\n\n lcaDepth = edge.getLca().getInclusionTreeDepth();\n\n edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);\n }\n }\n};\n\nFDLayout.prototype.initSpringEmbedder = function () {\n\n var s = this.getAllNodes().length;\n if (this.incremental) {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n }\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;\n } else {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n } else {\n this.coolingFactor = 1.0;\n }\n this.initialCoolingFactor = this.coolingFactor;\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;\n }\n\n this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);\n\n this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;\n\n this.repulsionRange = this.calcRepulsionRange();\n};\n\nFDLayout.prototype.calcSpringForces = function () {\n var lEdges = this.getAllEdges();\n var edge;\n\n for (var i = 0; i < lEdges.length; i++) {\n edge = lEdges[i];\n\n this.calcSpringForce(edge, edge.idealLength);\n }\n};\n\nFDLayout.prototype.calcRepulsionForces = function () {\n var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var i, j;\n var nodeA, nodeB;\n var lNodes = this.getAllNodes();\n var processedNodeSet;\n\n if (this.useFRGridVariant) {\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {\n this.updateGrid();\n }\n\n processedNodeSet = new Set();\n\n // calculate repulsion forces between each nodes and its surrounding\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);\n processedNodeSet.add(nodeA);\n }\n } else {\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n\n for (j = i + 1; j < lNodes.length; j++) {\n nodeB = lNodes[j];\n\n // If both nodes are not members of the same graph, skip.\n if (nodeA.getOwner() != nodeB.getOwner()) {\n continue;\n }\n\n this.calcRepulsionForce(nodeA, nodeB);\n }\n }\n }\n};\n\nFDLayout.prototype.calcGravitationalForces = function () {\n var node;\n var lNodes = this.getAllNodesToApplyGravitation();\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n this.calcGravitationalForce(node);\n }\n};\n\nFDLayout.prototype.moveNodes = function () {\n var lNodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.move();\n }\n};\n\nFDLayout.prototype.calcSpringForce = function (edge, idealLength) {\n var sourceNode = edge.getSource();\n var targetNode = edge.getTarget();\n\n var length;\n var springForce;\n var springForceX;\n var springForceY;\n\n // Update edge length\n if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {\n edge.updateLengthSimple();\n } else {\n edge.updateLength();\n\n if (edge.isOverlapingSourceAndTarget) {\n return;\n }\n }\n\n length = edge.getLength();\n\n if (length == 0) return;\n\n // Calculate spring forces\n springForce = this.springConstant * (length - idealLength);\n\n // Project force onto x and y axes\n springForceX = springForce * (edge.lengthX / length);\n springForceY = springForce * (edge.lengthY / length);\n\n // Apply forces on the end nodes\n sourceNode.springForceX += springForceX;\n sourceNode.springForceY += springForceY;\n targetNode.springForceX -= springForceX;\n targetNode.springForceY -= springForceY;\n};\n\nFDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) {\n var rectA = nodeA.getRect();\n var rectB = nodeB.getRect();\n var overlapAmount = new Array(2);\n var clipPoints = new Array(4);\n var distanceX;\n var distanceY;\n var distanceSquared;\n var distance;\n var repulsionForce;\n var repulsionForceX;\n var repulsionForceY;\n\n if (rectA.intersects(rectB)) // two nodes overlap\n {\n // calculate separation amount in x and y directions\n IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0);\n\n repulsionForceX = 2 * overlapAmount[0];\n repulsionForceY = 2 * overlapAmount[1];\n\n var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);\n\n // Apply forces on the two nodes\n nodeA.repulsionForceX -= childrenConstant * repulsionForceX;\n nodeA.repulsionForceY -= childrenConstant * repulsionForceY;\n nodeB.repulsionForceX += childrenConstant * repulsionForceX;\n nodeB.repulsionForceY += childrenConstant * repulsionForceY;\n } else // no overlap\n {\n // calculate distance\n\n if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers\n {\n distanceX = rectB.getCenterX() - rectA.getCenterX();\n distanceY = rectB.getCenterY() - rectA.getCenterY();\n } else // use clipping points\n {\n IGeometry.getIntersection(rectA, rectB, clipPoints);\n\n distanceX = clipPoints[2] - clipPoints[0];\n distanceY = clipPoints[3] - clipPoints[1];\n }\n\n // No repulsion range. FR grid variant should take care of this.\n if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n distanceSquared = distanceX * distanceX + distanceY * distanceY;\n distance = Math.sqrt(distanceSquared);\n\n repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;\n\n // Project force onto x and y axes\n repulsionForceX = repulsionForce * distanceX / distance;\n repulsionForceY = repulsionForce * distanceY / distance;\n\n // Apply forces on the two nodes \n nodeA.repulsionForceX -= repulsionForceX;\n nodeA.repulsionForceY -= repulsionForceY;\n nodeB.repulsionForceX += repulsionForceX;\n nodeB.repulsionForceY += repulsionForceY;\n }\n};\n\nFDLayout.prototype.calcGravitationalForce = function (node) {\n var ownerGraph;\n var ownerCenterX;\n var ownerCenterY;\n var distanceX;\n var distanceY;\n var absDistanceX;\n var absDistanceY;\n var estimatedSize;\n ownerGraph = node.getOwner();\n\n ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;\n ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;\n distanceX = node.getCenterX() - ownerCenterX;\n distanceY = node.getCenterY() - ownerCenterY;\n absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;\n absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;\n\n if (node.getOwner() == this.graphManager.getRoot()) // in the root graph\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX;\n node.gravitationForceY = -this.gravityConstant * distanceY;\n }\n } else // inside a compound\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;\n node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;\n }\n }\n};\n\nFDLayout.prototype.isConverged = function () {\n var converged;\n var oscilating = false;\n\n if (this.totalIterations > this.maxIterations / 3) {\n oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;\n }\n\n converged = this.totalDisplacement < this.totalDisplacementThreshold;\n\n this.oldTotalDisplacement = this.totalDisplacement;\n\n return converged || oscilating;\n};\n\nFDLayout.prototype.animate = function () {\n if (this.animationDuringLayout && !this.isSubLayout) {\n if (this.notAnimatedIterations == this.animationPeriod) {\n this.update();\n this.notAnimatedIterations = 0;\n } else {\n this.notAnimatedIterations++;\n }\n }\n};\n\n//This method calculates the number of children (weight) for all nodes\nFDLayout.prototype.calcNoOfChildrenForAllNodes = function () {\n var node;\n var allNodes = this.graphManager.getAllNodes();\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n node.noOfChildren = node.getNoOfChildren();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: FR-Grid Variant Repulsion Force Calculation\n// -----------------------------------------------------------------------------\n\nFDLayout.prototype.calcGrid = function (graph) {\n\n var sizeX = 0;\n var sizeY = 0;\n\n sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));\n sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));\n\n var grid = new Array(sizeX);\n\n for (var i = 0; i < sizeX; i++) {\n grid[i] = new Array(sizeY);\n }\n\n for (var i = 0; i < sizeX; i++) {\n for (var j = 0; j < sizeY; j++) {\n grid[i][j] = new Array();\n }\n }\n\n return grid;\n};\n\nFDLayout.prototype.addNodeToGrid = function (v, left, top) {\n\n var startX = 0;\n var finishX = 0;\n var startY = 0;\n var finishY = 0;\n\n startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));\n finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));\n startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));\n finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));\n\n for (var i = startX; i <= finishX; i++) {\n for (var j = startY; j <= finishY; j++) {\n this.grid[i][j].push(v);\n v.setGridCoordinates(startX, finishX, startY, finishY);\n }\n }\n};\n\nFDLayout.prototype.updateGrid = function () {\n var i;\n var nodeA;\n var lNodes = this.getAllNodes();\n\n this.grid = this.calcGrid(this.graphManager.getRoot());\n\n // put all nodes to proper grid cells\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());\n }\n};\n\nFDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {\n\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {\n var surrounding = new Set();\n nodeA.surrounding = new Array();\n var nodeB;\n var grid = this.grid;\n\n for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {\n for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {\n if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {\n for (var k = 0; k < grid[i][j].length; k++) {\n nodeB = grid[i][j][k];\n\n // If both nodes are not members of the same graph, \n // or both nodes are the same, skip.\n if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {\n continue;\n }\n\n // check if the repulsion force between\n // nodeA and nodeB has already been calculated\n if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {\n var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);\n var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);\n\n // if the distance between nodeA and nodeB \n // is less then calculation range\n if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {\n //then add nodeB to surrounding of nodeA\n surrounding.add(nodeB);\n }\n }\n }\n }\n }\n }\n\n nodeA.surrounding = [].concat(_toConsumableArray(surrounding));\n }\n for (i = 0; i < nodeA.surrounding.length; i++) {\n this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);\n }\n};\n\nFDLayout.prototype.calcRepulsionRange = function () {\n return 0.0;\n};\n\nmodule.exports = FDLayout;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LEdge = __webpack_require__(1);\nvar FDLayoutConstants = __webpack_require__(7);\n\nfunction FDLayoutEdge(source, target, vEdge) {\n LEdge.call(this, source, target, vEdge);\n this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n}\n\nFDLayoutEdge.prototype = Object.create(LEdge.prototype);\n\nfor (var prop in LEdge) {\n FDLayoutEdge[prop] = LEdge[prop];\n}\n\nmodule.exports = FDLayoutEdge;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LNode = __webpack_require__(3);\n\nfunction FDLayoutNode(gm, loc, size, vNode) {\n // alternative constructor is handled inside LNode\n LNode.call(this, gm, loc, size, vNode);\n //Spring, repulsion and gravitational forces acting on this node\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n //Amount by which this node is to be moved in this iteration\n this.displacementX = 0;\n this.displacementY = 0;\n\n //Start and finish grid coordinates that this node is fallen into\n this.startX = 0;\n this.finishX = 0;\n this.startY = 0;\n this.finishY = 0;\n\n //Geometric neighbors of this node\n this.surrounding = [];\n}\n\nFDLayoutNode.prototype = Object.create(LNode.prototype);\n\nfor (var prop in LNode) {\n FDLayoutNode[prop] = LNode[prop];\n}\n\nFDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) {\n this.startX = _startX;\n this.finishX = _finishX;\n this.startY = _startY;\n this.finishY = _finishY;\n};\n\nmodule.exports = FDLayoutNode;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction DimensionD(width, height) {\n this.width = 0;\n this.height = 0;\n if (width !== null && height !== null) {\n this.height = height;\n this.width = width;\n }\n}\n\nDimensionD.prototype.getWidth = function () {\n return this.width;\n};\n\nDimensionD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nDimensionD.prototype.getHeight = function () {\n return this.height;\n};\n\nDimensionD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nmodule.exports = DimensionD;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashMap() {\n this.map = {};\n this.keys = [];\n}\n\nHashMap.prototype.put = function (key, value) {\n var theId = UniqueIDGeneretor.createID(key);\n if (!this.contains(theId)) {\n this.map[theId] = value;\n this.keys.push(key);\n }\n};\n\nHashMap.prototype.contains = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[key] != null;\n};\n\nHashMap.prototype.get = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[theId];\n};\n\nHashMap.prototype.keySet = function () {\n return this.keys;\n};\n\nmodule.exports = HashMap;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashSet() {\n this.set = {};\n}\n;\n\nHashSet.prototype.add = function (obj) {\n var theId = UniqueIDGeneretor.createID(obj);\n if (!this.contains(theId)) this.set[theId] = obj;\n};\n\nHashSet.prototype.remove = function (obj) {\n delete this.set[UniqueIDGeneretor.createID(obj)];\n};\n\nHashSet.prototype.clear = function () {\n this.set = {};\n};\n\nHashSet.prototype.contains = function (obj) {\n return this.set[UniqueIDGeneretor.createID(obj)] == obj;\n};\n\nHashSet.prototype.isEmpty = function () {\n return this.size() === 0;\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\n//concats this.set to the given list\nHashSet.prototype.addAllTo = function (list) {\n var keys = Object.keys(this.set);\n var length = keys.length;\n for (var i = 0; i < length; i++) {\n list.push(this.set[keys[i]]);\n }\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\nHashSet.prototype.addAll = function (list) {\n var s = list.length;\n for (var i = 0; i < s; i++) {\n var v = list[i];\n this.add(v);\n }\n};\n\nmodule.exports = HashSet;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * A classic Quicksort algorithm with Hoare's partition\n * - Works also on LinkedList objects\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar LinkedList = __webpack_require__(11);\n\nvar Quicksort = function () {\n function Quicksort(A, compareFunction) {\n _classCallCheck(this, Quicksort);\n\n if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction;\n\n var length = void 0;\n if (A instanceof LinkedList) length = A.size();else length = A.length;\n\n this._quicksort(A, 0, length - 1);\n }\n\n _createClass(Quicksort, [{\n key: '_quicksort',\n value: function _quicksort(A, p, r) {\n if (p < r) {\n var q = this._partition(A, p, r);\n this._quicksort(A, p, q);\n this._quicksort(A, q + 1, r);\n }\n }\n }, {\n key: '_partition',\n value: function _partition(A, p, r) {\n var x = this._get(A, p);\n var i = p;\n var j = r;\n while (true) {\n while (this.compareFunction(x, this._get(A, j))) {\n j--;\n }while (this.compareFunction(this._get(A, i), x)) {\n i++;\n }if (i < j) {\n this._swap(A, i, j);\n i++;\n j--;\n } else return j;\n }\n }\n }, {\n key: '_get',\n value: function _get(object, index) {\n if (object instanceof LinkedList) return object.get_object_at(index);else return object[index];\n }\n }, {\n key: '_set',\n value: function _set(object, index, value) {\n if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value;\n }\n }, {\n key: '_swap',\n value: function _swap(A, i, j) {\n var temp = this._get(A, i);\n this._set(A, i, this._get(A, j));\n this._set(A, j, temp);\n }\n }, {\n key: '_defaultCompareFunction',\n value: function _defaultCompareFunction(a, b) {\n return b > a;\n }\n }]);\n\n return Quicksort;\n}();\n\nmodule.exports = Quicksort;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string\n * sequences by S.B.Needleman and C.D.Wunsch (1970).\n *\n * Aside from the inputs, you can assign the scores for,\n * - Match: The two characters at the current index are same.\n * - Mismatch: The two characters at the current index are different.\n * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string.\n */\n\nvar NeedlemanWunsch = function () {\n function NeedlemanWunsch(sequence1, sequence2) {\n var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;\n var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\n\n _classCallCheck(this, NeedlemanWunsch);\n\n this.sequence1 = sequence1;\n this.sequence2 = sequence2;\n this.match_score = match_score;\n this.mismatch_penalty = mismatch_penalty;\n this.gap_penalty = gap_penalty;\n\n // Just the remove redundancy\n this.iMax = sequence1.length + 1;\n this.jMax = sequence2.length + 1;\n\n // Grid matrix of scores\n this.grid = new Array(this.iMax);\n for (var i = 0; i < this.iMax; i++) {\n this.grid[i] = new Array(this.jMax);\n\n for (var j = 0; j < this.jMax; j++) {\n this.grid[i][j] = 0;\n }\n }\n\n // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions)\n this.tracebackGrid = new Array(this.iMax);\n for (var _i = 0; _i < this.iMax; _i++) {\n this.tracebackGrid[_i] = new Array(this.jMax);\n\n for (var _j = 0; _j < this.jMax; _j++) {\n this.tracebackGrid[_i][_j] = [null, null, null];\n }\n }\n\n // The aligned sequences (return multiple possibilities)\n this.alignments = [];\n\n // Final alignment score\n this.score = -1;\n\n // Calculate scores and tracebacks\n this.computeGrids();\n }\n\n _createClass(NeedlemanWunsch, [{\n key: \"getScore\",\n value: function getScore() {\n return this.score;\n }\n }, {\n key: \"getAlignments\",\n value: function getAlignments() {\n return this.alignments;\n }\n\n // Main dynamic programming procedure\n\n }, {\n key: \"computeGrids\",\n value: function computeGrids() {\n // Fill in the first row\n for (var j = 1; j < this.jMax; j++) {\n this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;\n this.tracebackGrid[0][j] = [false, false, true];\n }\n\n // Fill in the first column\n for (var i = 1; i < this.iMax; i++) {\n this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;\n this.tracebackGrid[i][0] = [false, true, false];\n }\n\n // Fill the rest of the grid\n for (var _i2 = 1; _i2 < this.iMax; _i2++) {\n for (var _j2 = 1; _j2 < this.jMax; _j2++) {\n // Find the max score(s) among [`Diag`, `Up`, `Left`]\n var diag = void 0;\n if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;\n\n var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;\n var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;\n\n // If there exists multiple max values, capture them for multiple paths\n var maxOf = [diag, up, left];\n var indices = this.arrayAllMaxIndexes(maxOf);\n\n // Update Grids\n this.grid[_i2][_j2] = maxOf[indices[0]];\n this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];\n }\n }\n\n // Update alignment score\n this.score = this.grid[this.iMax - 1][this.jMax - 1];\n }\n\n // Gets all possible valid sequence combinations\n\n }, {\n key: \"alignmentTraceback\",\n value: function alignmentTraceback() {\n var inProcessAlignments = [];\n\n inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length],\n seq1: \"\",\n seq2: \"\"\n });\n\n while (inProcessAlignments[0]) {\n var current = inProcessAlignments[0];\n var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];\n\n if (directions[0]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n if (directions[1]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: '-' + current.seq2\n });\n }\n if (directions[2]) {\n inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1],\n seq1: '-' + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n\n if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1,\n sequence2: current.seq2\n });\n\n inProcessAlignments.shift();\n }\n\n return this.alignments;\n }\n\n // Helper Functions\n\n }, {\n key: \"getAllIndexes\",\n value: function getAllIndexes(arr, val) {\n var indexes = [],\n i = -1;\n while ((i = arr.indexOf(val, i + 1)) !== -1) {\n indexes.push(i);\n }\n return indexes;\n }\n }, {\n key: \"arrayAllMaxIndexes\",\n value: function arrayAllMaxIndexes(array) {\n return this.getAllIndexes(array, Math.max.apply(null, array));\n }\n }]);\n\n return NeedlemanWunsch;\n}();\n\nmodule.exports = NeedlemanWunsch;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar layoutBase = function layoutBase() {\n return;\n};\n\nlayoutBase.FDLayout = __webpack_require__(18);\nlayoutBase.FDLayoutConstants = __webpack_require__(7);\nlayoutBase.FDLayoutEdge = __webpack_require__(19);\nlayoutBase.FDLayoutNode = __webpack_require__(20);\nlayoutBase.DimensionD = __webpack_require__(21);\nlayoutBase.HashMap = __webpack_require__(22);\nlayoutBase.HashSet = __webpack_require__(23);\nlayoutBase.IGeometry = __webpack_require__(8);\nlayoutBase.IMath = __webpack_require__(9);\nlayoutBase.Integer = __webpack_require__(10);\nlayoutBase.Point = __webpack_require__(12);\nlayoutBase.PointD = __webpack_require__(4);\nlayoutBase.RandomSeed = __webpack_require__(16);\nlayoutBase.RectangleD = __webpack_require__(13);\nlayoutBase.Transform = __webpack_require__(17);\nlayoutBase.UniqueIDGeneretor = __webpack_require__(14);\nlayoutBase.Quicksort = __webpack_require__(24);\nlayoutBase.LinkedList = __webpack_require__(11);\nlayoutBase.LGraphObject = __webpack_require__(2);\nlayoutBase.LGraph = __webpack_require__(5);\nlayoutBase.LEdge = __webpack_require__(1);\nlayoutBase.LGraphManager = __webpack_require__(6);\nlayoutBase.LNode = __webpack_require__(3);\nlayoutBase.Layout = __webpack_require__(15);\nlayoutBase.LayoutConstants = __webpack_require__(0);\nlayoutBase.NeedlemanWunsch = __webpack_require__(25);\n\nmodule.exports = layoutBase;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Emitter() {\n this.listeners = [];\n}\n\nvar p = Emitter.prototype;\n\np.addListener = function (event, callback) {\n this.listeners.push({\n event: event,\n callback: callback\n });\n};\n\np.removeListener = function (event, callback) {\n for (var i = this.listeners.length; i >= 0; i--) {\n var l = this.listeners[i];\n\n if (l.event === event && l.callback === callback) {\n this.listeners.splice(i, 1);\n }\n }\n};\n\np.emit = function (event, data) {\n for (var i = 0; i < this.listeners.length; i++) {\n var l = this.listeners[i];\n\n if (event === l.event) {\n l.callback(data);\n }\n }\n};\n\nmodule.exports = Emitter;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"layout-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"layout-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"coseBase\"] = factory(require(\"layout-base\"));\n\telse\n\t\troot[\"coseBase\"] = factory(root[\"layoutBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 7);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayoutConstants = __webpack_require__(0).FDLayoutConstants;\n\nfunction CoSEConstants() {}\n\n//CoSEConstants inherits static props in FDLayoutConstants\nfor (var prop in FDLayoutConstants) {\n CoSEConstants[prop] = FDLayoutConstants[prop];\n}\n\nCoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;\nCoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\nCoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;\nCoSEConstants.TILE = true;\nCoSEConstants.TILING_PADDING_VERTICAL = 10;\nCoSEConstants.TILING_PADDING_HORIZONTAL = 10;\nCoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; // make this true when cose is used incrementally as a part of other non-incremental layout\n\nmodule.exports = CoSEConstants;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayoutEdge = __webpack_require__(0).FDLayoutEdge;\n\nfunction CoSEEdge(source, target, vEdge) {\n FDLayoutEdge.call(this, source, target, vEdge);\n}\n\nCoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);\nfor (var prop in FDLayoutEdge) {\n CoSEEdge[prop] = FDLayoutEdge[prop];\n}\n\nmodule.exports = CoSEEdge;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraph = __webpack_require__(0).LGraph;\n\nfunction CoSEGraph(parent, graphMgr, vGraph) {\n LGraph.call(this, parent, graphMgr, vGraph);\n}\n\nCoSEGraph.prototype = Object.create(LGraph.prototype);\nfor (var prop in LGraph) {\n CoSEGraph[prop] = LGraph[prop];\n}\n\nmodule.exports = CoSEGraph;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphManager = __webpack_require__(0).LGraphManager;\n\nfunction CoSEGraphManager(layout) {\n LGraphManager.call(this, layout);\n}\n\nCoSEGraphManager.prototype = Object.create(LGraphManager.prototype);\nfor (var prop in LGraphManager) {\n CoSEGraphManager[prop] = LGraphManager[prop];\n}\n\nmodule.exports = CoSEGraphManager;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayoutNode = __webpack_require__(0).FDLayoutNode;\nvar IMath = __webpack_require__(0).IMath;\n\nfunction CoSENode(gm, loc, size, vNode) {\n FDLayoutNode.call(this, gm, loc, size, vNode);\n}\n\nCoSENode.prototype = Object.create(FDLayoutNode.prototype);\nfor (var prop in FDLayoutNode) {\n CoSENode[prop] = FDLayoutNode[prop];\n}\n\nCoSENode.prototype.move = function () {\n var layout = this.graphManager.getLayout();\n this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;\n this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;\n\n if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX);\n }\n\n if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY);\n }\n\n // a simple node, just move it\n if (this.child == null) {\n this.moveBy(this.displacementX, this.displacementY);\n }\n // an empty compound node, again just move it\n else if (this.child.getNodes().length == 0) {\n this.moveBy(this.displacementX, this.displacementY);\n }\n // non-empty compound node, propogate movement to children as well\n else {\n this.propogateDisplacementToChildren(this.displacementX, this.displacementY);\n }\n\n layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);\n\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n this.displacementX = 0;\n this.displacementY = 0;\n};\n\nCoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) {\n var nodes = this.getChild().getNodes();\n var node;\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (node.getChild() == null) {\n node.moveBy(dX, dY);\n node.displacementX += dX;\n node.displacementY += dY;\n } else {\n node.propogateDisplacementToChildren(dX, dY);\n }\n }\n};\n\nCoSENode.prototype.setPred1 = function (pred1) {\n this.pred1 = pred1;\n};\n\nCoSENode.prototype.getPred1 = function () {\n return pred1;\n};\n\nCoSENode.prototype.getPred2 = function () {\n return pred2;\n};\n\nCoSENode.prototype.setNext = function (next) {\n this.next = next;\n};\n\nCoSENode.prototype.getNext = function () {\n return next;\n};\n\nCoSENode.prototype.setProcessed = function (processed) {\n this.processed = processed;\n};\n\nCoSENode.prototype.isProcessed = function () {\n return processed;\n};\n\nmodule.exports = CoSENode;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar FDLayout = __webpack_require__(0).FDLayout;\nvar CoSEGraphManager = __webpack_require__(4);\nvar CoSEGraph = __webpack_require__(3);\nvar CoSENode = __webpack_require__(5);\nvar CoSEEdge = __webpack_require__(2);\nvar CoSEConstants = __webpack_require__(1);\nvar FDLayoutConstants = __webpack_require__(0).FDLayoutConstants;\nvar LayoutConstants = __webpack_require__(0).LayoutConstants;\nvar Point = __webpack_require__(0).Point;\nvar PointD = __webpack_require__(0).PointD;\nvar Layout = __webpack_require__(0).Layout;\nvar Integer = __webpack_require__(0).Integer;\nvar IGeometry = __webpack_require__(0).IGeometry;\nvar LGraph = __webpack_require__(0).LGraph;\nvar Transform = __webpack_require__(0).Transform;\n\nfunction CoSELayout() {\n FDLayout.call(this);\n\n this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled\n}\n\nCoSELayout.prototype = Object.create(FDLayout.prototype);\n\nfor (var prop in FDLayout) {\n CoSELayout[prop] = FDLayout[prop];\n}\n\nCoSELayout.prototype.newGraphManager = function () {\n var gm = new CoSEGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nCoSELayout.prototype.newGraph = function (vGraph) {\n return new CoSEGraph(null, this.graphManager, vGraph);\n};\n\nCoSELayout.prototype.newNode = function (vNode) {\n return new CoSENode(this.graphManager, vNode);\n};\n\nCoSELayout.prototype.newEdge = function (vEdge) {\n return new CoSEEdge(null, null, vEdge);\n};\n\nCoSELayout.prototype.initParameters = function () {\n FDLayout.prototype.initParameters.call(this, arguments);\n if (!this.isSubLayout) {\n if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) {\n this.idealEdgeLength = 10;\n } else {\n this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;\n }\n\n this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;\n this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n\n // variables for tree reduction support\n this.prunedNodesAll = [];\n this.growTreeIterations = 0;\n this.afterGrowthIterations = 0;\n this.isTreeGrowing = false;\n this.isGrowthFinished = false;\n\n // variables for cooling\n this.coolingCycle = 0;\n this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;\n this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations;\n this.coolingAdjuster = 1;\n }\n};\n\nCoSELayout.prototype.layout = function () {\n var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n if (createBendsAsNeeded) {\n this.createBendpoints();\n this.graphManager.resetAllEdges();\n }\n\n this.level = 0;\n return this.classicLayout();\n};\n\nCoSELayout.prototype.classicLayout = function () {\n this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();\n this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);\n this.calcNoOfChildrenForAllNodes();\n this.graphManager.calcLowestCommonAncestors();\n this.graphManager.calcInclusionTreeDepths();\n this.graphManager.getRoot().calcEstimatedSize();\n this.calcIdealEdgeLengths();\n\n if (!this.incremental) {\n var forest = this.getFlatForest();\n\n // The graph associated with this layout is flat and a forest\n if (forest.length > 0) {\n this.positionNodesRadially(forest);\n }\n // The graph associated with this layout is not flat or a forest\n else {\n // Reduce the trees when incremental mode is not enabled and graph is not a forest \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.positionNodesRandomly();\n }\n } else {\n if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) {\n // Reduce the trees in incremental mode if only this constant is set to true \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n }\n }\n\n this.initSpringEmbedder();\n this.runSpringEmbedder();\n\n return true;\n};\n\nCoSELayout.prototype.tick = function () {\n this.totalIterations++;\n\n if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.isConverged()) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n this.coolingCycle++;\n\n if (this.layoutQuality == 0) {\n // quality - \"draft\"\n this.coolingAdjuster = this.coolingCycle;\n } else if (this.layoutQuality == 1) {\n // quality - \"default\"\n this.coolingAdjuster = this.coolingCycle / 3;\n }\n\n // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3\n this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature);\n this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));\n }\n // Operations while tree is growing again \n if (this.isTreeGrowing) {\n if (this.growTreeIterations % 10 == 0) {\n if (this.prunedNodesAll.length > 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n this.growTree(this.prunedNodesAll);\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.graphManager.updateBounds();\n this.updateGrid();\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n } else {\n this.isTreeGrowing = false;\n this.isGrowthFinished = true;\n }\n }\n this.growTreeIterations++;\n }\n // Operations after growth is finished\n if (this.isGrowthFinished) {\n if (this.isConverged()) {\n return true;\n }\n if (this.afterGrowthIterations % 10 == 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n }\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);\n this.afterGrowthIterations++;\n }\n\n var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;\n var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;\n\n this.totalDisplacement = 0;\n this.graphManager.updateBounds();\n this.calcSpringForces();\n this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);\n this.calcGravitationalForces();\n this.moveNodes();\n this.animate();\n\n return false; // Layout is not ended yet return false\n};\n\nCoSELayout.prototype.getPositionsData = function () {\n var allNodes = this.graphManager.getAllNodes();\n var pData = {};\n for (var i = 0; i < allNodes.length; i++) {\n var rect = allNodes[i].rect;\n var id = allNodes[i].id;\n pData[id] = {\n id: id,\n x: rect.getCenterX(),\n y: rect.getCenterY(),\n w: rect.width,\n h: rect.height\n };\n }\n\n return pData;\n};\n\nCoSELayout.prototype.runSpringEmbedder = function () {\n this.initialAnimationPeriod = 25;\n this.animationPeriod = this.initialAnimationPeriod;\n var layoutEnded = false;\n\n // If aminate option is 'during' signal that layout is supposed to start iterating\n if (FDLayoutConstants.ANIMATE === 'during') {\n this.emit('layoutstarted');\n } else {\n // If aminate option is 'during' tick() function will be called on index.js\n while (!layoutEnded) {\n layoutEnded = this.tick();\n }\n\n this.graphManager.updateBounds();\n }\n};\n\nCoSELayout.prototype.calculateNodesToApplyGravitationTo = function () {\n var nodeList = [];\n var graph;\n\n var graphs = this.graphManager.getGraphs();\n var size = graphs.length;\n var i;\n for (i = 0; i < size; i++) {\n graph = graphs[i];\n\n graph.updateConnected();\n\n if (!graph.isConnected) {\n nodeList = nodeList.concat(graph.getNodes());\n }\n }\n\n return nodeList;\n};\n\nCoSELayout.prototype.createBendpoints = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n var visited = new Set();\n var i;\n for (i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (!visited.has(edge)) {\n var source = edge.getSource();\n var target = edge.getTarget();\n\n if (source == target) {\n edge.getBendpoints().push(new PointD());\n edge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(edge);\n visited.add(edge);\n } else {\n var edgeList = [];\n\n edgeList = edgeList.concat(source.getEdgeListToNode(target));\n edgeList = edgeList.concat(target.getEdgeListToNode(source));\n\n if (!visited.has(edgeList[0])) {\n if (edgeList.length > 1) {\n var k;\n for (k = 0; k < edgeList.length; k++) {\n var multiEdge = edgeList[k];\n multiEdge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(multiEdge);\n }\n }\n edgeList.forEach(function (edge) {\n visited.add(edge);\n });\n }\n }\n }\n\n if (visited.size == edges.length) {\n break;\n }\n }\n};\n\nCoSELayout.prototype.positionNodesRadially = function (forest) {\n // We tile the trees to a grid row by row; first tree starts at (0,0)\n var currentStartingPoint = new Point(0, 0);\n var numberOfColumns = Math.ceil(Math.sqrt(forest.length));\n var height = 0;\n var currentY = 0;\n var currentX = 0;\n var point = new PointD(0, 0);\n\n for (var i = 0; i < forest.length; i++) {\n if (i % numberOfColumns == 0) {\n // Start of a new row, make the x coordinate 0, increment the\n // y coordinate with the max height of the previous row\n currentX = 0;\n currentY = height;\n\n if (i != 0) {\n currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;\n }\n\n height = 0;\n }\n\n var tree = forest[i];\n\n // Find the center of the tree\n var centerNode = Layout.findCenterOfTree(tree);\n\n // Set the staring point of the next tree\n currentStartingPoint.x = currentX;\n currentStartingPoint.y = currentY;\n\n // Do a radial layout starting with the center\n point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);\n\n if (point.y > height) {\n height = Math.floor(point.y);\n }\n\n currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);\n }\n\n this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2));\n};\n\nCoSELayout.radialLayout = function (tree, centerNode, startingPoint) {\n var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION);\n CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);\n var bounds = LGraph.calculateBounds(tree);\n\n var transform = new Transform();\n transform.setDeviceOrgX(bounds.getMinX());\n transform.setDeviceOrgY(bounds.getMinY());\n transform.setWorldOrgX(startingPoint.x);\n transform.setWorldOrgY(startingPoint.y);\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n node.transform(transform);\n }\n\n var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY());\n\n return transform.inverseTransformPoint(bottomRight);\n};\n\nCoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {\n // First, position this node by finding its angle.\n var halfInterval = (endAngle - startAngle + 1) / 2;\n\n if (halfInterval < 0) {\n halfInterval += 180;\n }\n\n var nodeAngle = (halfInterval + startAngle) % 360;\n var teta = nodeAngle * IGeometry.TWO_PI / 360;\n\n // Make polar to java cordinate conversion.\n var cos_teta = Math.cos(teta);\n var x_ = distance * Math.cos(teta);\n var y_ = distance * Math.sin(teta);\n\n node.setCenter(x_, y_);\n\n // Traverse all neighbors of this node and recursively call this\n // function.\n var neighborEdges = [];\n neighborEdges = neighborEdges.concat(node.getEdges());\n var childCount = neighborEdges.length;\n\n if (parentOfNode != null) {\n childCount--;\n }\n\n var branchCount = 0;\n\n var incEdgesCount = neighborEdges.length;\n var startIndex;\n\n var edges = node.getEdgesBetween(parentOfNode);\n\n // If there are multiple edges, prune them until there remains only one\n // edge.\n while (edges.length > 1) {\n //neighborEdges.remove(edges.remove(0));\n var temp = edges[0];\n edges.splice(0, 1);\n var index = neighborEdges.indexOf(temp);\n if (index >= 0) {\n neighborEdges.splice(index, 1);\n }\n incEdgesCount--;\n childCount--;\n }\n\n if (parentOfNode != null) {\n //assert edges.length == 1;\n startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;\n } else {\n startIndex = 0;\n }\n\n var stepAngle = Math.abs(endAngle - startAngle) / childCount;\n\n for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(node);\n\n // Don't back traverse to root node in current tree.\n if (currentNeighbor == parentOfNode) {\n continue;\n }\n\n var childStartAngle = (startAngle + branchCount * stepAngle) % 360;\n var childEndAngle = (childStartAngle + stepAngle) % 360;\n\n CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation);\n\n branchCount++;\n }\n};\n\nCoSELayout.maxDiagonalInTree = function (tree) {\n var maxDiagonal = Integer.MIN_VALUE;\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n var diagonal = node.getDiagonal();\n\n if (diagonal > maxDiagonal) {\n maxDiagonal = diagonal;\n }\n }\n\n return maxDiagonal;\n};\n\nCoSELayout.prototype.calcRepulsionRange = function () {\n // formula is 2 x (level + 1) x idealEdgeLength\n return 2 * (this.level + 1) * this.idealEdgeLength;\n};\n\n// Tiling methods\n\n// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's\nCoSELayout.prototype.groupZeroDegreeMembers = function () {\n var self = this;\n // array of [parent_id x oneDegreeNode_id]\n var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members\n this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled\n this.idToDummyNode = {}; // A map of id to dummy node \n\n var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled\n var allNodes = this.graphManager.getAllNodes();\n\n // Fill zero degree list\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n var parent = node.getParent();\n // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list\n if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) {\n zeroDegree.push(node);\n }\n }\n\n // Create a map of parent node and its zero degree members\n for (var i = 0; i < zeroDegree.length; i++) {\n var node = zeroDegree[i]; // Zero degree node itself\n var p_id = node.getParent().id; // Parent id\n\n if (typeof tempMemberGroups[p_id] === \"undefined\") tempMemberGroups[p_id] = [];\n\n tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups\n }\n\n // If there are at least two nodes at a level, create a dummy compound for them\n Object.keys(tempMemberGroups).forEach(function (p_id) {\n if (tempMemberGroups[p_id].length > 1) {\n var dummyCompoundId = \"DummyCompound_\" + p_id; // The id of dummy compound which will be created soon\n self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups\n\n var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound\n\n // Create a dummy compound with calculated id\n var dummyCompound = new CoSENode(self.graphManager);\n dummyCompound.id = dummyCompoundId;\n dummyCompound.paddingLeft = parent.paddingLeft || 0;\n dummyCompound.paddingRight = parent.paddingRight || 0;\n dummyCompound.paddingBottom = parent.paddingBottom || 0;\n dummyCompound.paddingTop = parent.paddingTop || 0;\n\n self.idToDummyNode[dummyCompoundId] = dummyCompound;\n\n var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);\n var parentGraph = parent.getChild();\n\n // Add dummy compound to parent the graph\n parentGraph.add(dummyCompound);\n\n // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent\n for (var i = 0; i < tempMemberGroups[p_id].length; i++) {\n var node = tempMemberGroups[p_id][i];\n\n parentGraph.remove(node);\n dummyParentGraph.add(node);\n }\n }\n });\n};\n\nCoSELayout.prototype.clearCompounds = function () {\n var childGraphMap = {};\n var idToNode = {};\n\n // Get compound ordering by finding the inner one first\n this.performDFSOnCompounds();\n\n for (var i = 0; i < this.compoundOrder.length; i++) {\n\n idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];\n childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());\n\n // Remove children of compounds\n this.graphManager.remove(this.compoundOrder[i].getChild());\n this.compoundOrder[i].child = null;\n }\n\n this.graphManager.resetAllNodes();\n\n // Tile the removed children\n this.tileCompoundMembers(childGraphMap, idToNode);\n};\n\nCoSELayout.prototype.clearZeroDegreeMembers = function () {\n var self = this;\n var tiledZeroDegreePack = this.tiledZeroDegreePack = [];\n\n Object.keys(this.memberGroups).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound\n\n tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n // Set the width and height of the dummy compound as calculated\n compoundNode.rect.width = tiledZeroDegreePack[id].width;\n compoundNode.rect.height = tiledZeroDegreePack[id].height;\n });\n};\n\nCoSELayout.prototype.repopulateCompounds = function () {\n for (var i = this.compoundOrder.length - 1; i >= 0; i--) {\n var lCompoundNode = this.compoundOrder[i];\n var id = lCompoundNode.id;\n var horizontalMargin = lCompoundNode.paddingLeft;\n var verticalMargin = lCompoundNode.paddingTop;\n\n this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin);\n }\n};\n\nCoSELayout.prototype.repopulateZeroDegreeMembers = function () {\n var self = this;\n var tiledPack = this.tiledZeroDegreePack;\n\n Object.keys(tiledPack).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id\n var horizontalMargin = compoundNode.paddingLeft;\n var verticalMargin = compoundNode.paddingTop;\n\n // Adjust the positions of nodes wrt its compound\n self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin);\n });\n};\n\nCoSELayout.prototype.getToBeTiled = function (node) {\n var id = node.id;\n //firstly check the previous results\n if (this.toBeTiled[id] != null) {\n return this.toBeTiled[id];\n }\n\n //only compound nodes are to be tiled\n var childGraph = node.getChild();\n if (childGraph == null) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n var children = childGraph.getNodes(); // Get the children nodes\n\n //a compound node is not to be tiled if all of its compound children are not to be tiled\n for (var i = 0; i < children.length; i++) {\n var theChild = children[i];\n\n if (this.getNodeDegree(theChild) > 0) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n //pass the children not having the compound structure\n if (theChild.getChild() == null) {\n this.toBeTiled[theChild.id] = false;\n continue;\n }\n\n if (!this.getToBeTiled(theChild)) {\n this.toBeTiled[id] = false;\n return false;\n }\n }\n this.toBeTiled[id] = true;\n return true;\n};\n\n// Get degree of a node depending of its edges and independent of its children\nCoSELayout.prototype.getNodeDegree = function (node) {\n var id = node.id;\n var edges = node.getEdges();\n var degree = 0;\n\n // For the edges connected\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n if (edge.getSource().id !== edge.getTarget().id) {\n degree = degree + 1;\n }\n }\n return degree;\n};\n\n// Get degree of a node with its children\nCoSELayout.prototype.getNodeDegreeWithChildren = function (node) {\n var degree = this.getNodeDegree(node);\n if (node.getChild() == null) {\n return degree;\n }\n var children = node.getChild().getNodes();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n degree += this.getNodeDegreeWithChildren(child);\n }\n return degree;\n};\n\nCoSELayout.prototype.performDFSOnCompounds = function () {\n this.compoundOrder = [];\n this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());\n};\n\nCoSELayout.prototype.fillCompexOrderByDFS = function (children) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.getChild() != null) {\n this.fillCompexOrderByDFS(child.getChild().getNodes());\n }\n if (this.getToBeTiled(child)) {\n this.compoundOrder.push(child);\n }\n }\n};\n\n/**\n* This method places each zero degree member wrt given (x,y) coordinates (top left).\n*/\nCoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) {\n x += compoundHorizontalMargin;\n y += compoundVerticalMargin;\n\n var left = x;\n\n for (var i = 0; i < organization.rows.length; i++) {\n var row = organization.rows[i];\n x = left;\n var maxHeight = 0;\n\n for (var j = 0; j < row.length; j++) {\n var lnode = row[j];\n\n lnode.rect.x = x; // + lnode.rect.width / 2;\n lnode.rect.y = y; // + lnode.rect.height / 2;\n\n x += lnode.rect.width + organization.horizontalPadding;\n\n if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height;\n }\n\n y += maxHeight + organization.verticalPadding;\n }\n};\n\nCoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) {\n var self = this;\n this.tiledMemberPack = [];\n\n Object.keys(childGraphMap).forEach(function (id) {\n // Get the compound node\n var compoundNode = idToNode[id];\n\n self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n compoundNode.rect.width = self.tiledMemberPack[id].width;\n compoundNode.rect.height = self.tiledMemberPack[id].height;\n });\n};\n\nCoSELayout.prototype.tileNodes = function (nodes, minWidth) {\n var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;\n var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;\n var organization = {\n rows: [],\n rowWidth: [],\n rowHeight: [],\n width: 0,\n height: minWidth, // assume minHeight equals to minWidth\n verticalPadding: verticalPadding,\n horizontalPadding: horizontalPadding\n };\n\n // Sort the nodes in ascending order of their areas\n nodes.sort(function (n1, n2) {\n if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1;\n if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1;\n return 0;\n });\n\n // Create the organization -> tile members\n for (var i = 0; i < nodes.length; i++) {\n var lNode = nodes[i];\n\n if (organization.rows.length == 0) {\n this.insertNodeToRow(organization, lNode, 0, minWidth);\n } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) {\n this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth);\n } else {\n this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);\n }\n\n this.shiftToLastRow(organization);\n }\n\n return organization;\n};\n\nCoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) {\n var minCompoundSize = minWidth;\n\n // Add new row if needed\n if (rowIndex == organization.rows.length) {\n var secondDimension = [];\n\n organization.rows.push(secondDimension);\n organization.rowWidth.push(minCompoundSize);\n organization.rowHeight.push(0);\n }\n\n // Update row width\n var w = organization.rowWidth[rowIndex] + node.rect.width;\n\n if (organization.rows[rowIndex].length > 0) {\n w += organization.horizontalPadding;\n }\n\n organization.rowWidth[rowIndex] = w;\n // Update compound width\n if (organization.width < w) {\n organization.width = w;\n }\n\n // Update height\n var h = node.rect.height;\n if (rowIndex > 0) h += organization.verticalPadding;\n\n var extraHeight = 0;\n if (h > organization.rowHeight[rowIndex]) {\n extraHeight = organization.rowHeight[rowIndex];\n organization.rowHeight[rowIndex] = h;\n extraHeight = organization.rowHeight[rowIndex] - extraHeight;\n }\n\n organization.height += extraHeight;\n\n // Insert node\n organization.rows[rowIndex].push(node);\n};\n\n//Scans the rows of an organization and returns the one with the min width\nCoSELayout.prototype.getShortestRowIndex = function (organization) {\n var r = -1;\n var min = Number.MAX_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n if (organization.rowWidth[i] < min) {\n r = i;\n min = organization.rowWidth[i];\n }\n }\n return r;\n};\n\n//Scans the rows of an organization and returns the one with the max width\nCoSELayout.prototype.getLongestRowIndex = function (organization) {\n var r = -1;\n var max = Number.MIN_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n\n if (organization.rowWidth[i] > max) {\n r = i;\n max = organization.rowWidth[i];\n }\n }\n\n return r;\n};\n\n/**\n* This method checks whether adding extra width to the organization violates\n* the aspect ratio(1) or not.\n*/\nCoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) {\n\n var sri = this.getShortestRowIndex(organization);\n\n if (sri < 0) {\n return true;\n }\n\n var min = organization.rowWidth[sri];\n\n if (min + organization.horizontalPadding + extraWidth <= organization.width) return true;\n\n var hDiff = 0;\n\n // Adding to an existing row\n if (organization.rowHeight[sri] < extraHeight) {\n if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];\n }\n\n var add_to_row_ratio;\n if (organization.width - min >= extraWidth + organization.horizontalPadding) {\n add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);\n } else {\n add_to_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n // Adding a new row for this node\n hDiff = extraHeight + organization.verticalPadding;\n var add_new_row_ratio;\n if (organization.width < extraWidth) {\n add_new_row_ratio = (organization.height + hDiff) / extraWidth;\n } else {\n add_new_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio;\n\n if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio;\n\n return add_to_row_ratio < add_new_row_ratio;\n};\n\n//If moving the last node from the longest row and adding it to the last\n//row makes the bounding box smaller, do it.\nCoSELayout.prototype.shiftToLastRow = function (organization) {\n var longest = this.getLongestRowIndex(organization);\n var last = organization.rowWidth.length - 1;\n var row = organization.rows[longest];\n var node = row[row.length - 1];\n\n var diff = node.width + organization.horizontalPadding;\n\n // Check if there is enough space on the last row\n if (organization.width - organization.rowWidth[last] > diff && longest != last) {\n // Remove the last element of the longest row\n row.splice(-1, 1);\n\n // Push it to the last row\n organization.rows[last].push(node);\n\n organization.rowWidth[longest] = organization.rowWidth[longest] - diff;\n organization.rowWidth[last] = organization.rowWidth[last] + diff;\n organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];\n\n // Update heights of the organization\n var maxHeight = Number.MIN_VALUE;\n for (var i = 0; i < row.length; i++) {\n if (row[i].height > maxHeight) maxHeight = row[i].height;\n }\n if (longest > 0) maxHeight += organization.verticalPadding;\n\n var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n\n organization.rowHeight[longest] = maxHeight;\n if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding;\n\n var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n organization.height += finalTotal - prevTotal;\n\n this.shiftToLastRow(organization);\n }\n};\n\nCoSELayout.prototype.tilingPreLayout = function () {\n if (CoSEConstants.TILE) {\n // Find zero degree nodes and create a compound for each level\n this.groupZeroDegreeMembers();\n // Tile and clear children of each compound\n this.clearCompounds();\n // Separately tile and clear zero degree nodes for each level\n this.clearZeroDegreeMembers();\n }\n};\n\nCoSELayout.prototype.tilingPostLayout = function () {\n if (CoSEConstants.TILE) {\n this.repopulateZeroDegreeMembers();\n this.repopulateCompounds();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: Tree Reduction methods\n// -----------------------------------------------------------------------------\n// Reduce trees \nCoSELayout.prototype.reduceTrees = function () {\n var prunedNodesAll = [];\n var containsLeaf = true;\n var node;\n\n while (containsLeaf) {\n var allNodes = this.graphManager.getAllNodes();\n var prunedNodesInStepTemp = [];\n containsLeaf = false;\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) {\n prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]);\n containsLeaf = true;\n }\n }\n if (containsLeaf == true) {\n var prunedNodesInStep = [];\n for (var j = 0; j < prunedNodesInStepTemp.length; j++) {\n if (prunedNodesInStepTemp[j][0].getEdges().length == 1) {\n prunedNodesInStep.push(prunedNodesInStepTemp[j]);\n prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);\n }\n }\n prunedNodesAll.push(prunedNodesInStep);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n }\n }\n this.prunedNodesAll = prunedNodesAll;\n};\n\n// Grow tree one step \nCoSELayout.prototype.growTree = function (prunedNodesAll) {\n var lengthOfPrunedNodesInStep = prunedNodesAll.length;\n var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1];\n\n var nodeData;\n for (var i = 0; i < prunedNodesInStep.length; i++) {\n nodeData = prunedNodesInStep[i];\n\n this.findPlaceforPrunedNode(nodeData);\n\n nodeData[2].add(nodeData[0]);\n nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);\n }\n\n prunedNodesAll.splice(prunedNodesAll.length - 1, 1);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n};\n\n// Find an appropriate position to replace pruned node, this method can be improved\nCoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) {\n\n var gridForPrunedNode;\n var nodeToConnect;\n var prunedNode = nodeData[0];\n if (prunedNode == nodeData[1].source) {\n nodeToConnect = nodeData[1].target;\n } else {\n nodeToConnect = nodeData[1].source;\n }\n var startGridX = nodeToConnect.startX;\n var finishGridX = nodeToConnect.finishX;\n var startGridY = nodeToConnect.startY;\n var finishGridY = nodeToConnect.finishY;\n\n var upNodeCount = 0;\n var downNodeCount = 0;\n var rightNodeCount = 0;\n var leftNodeCount = 0;\n var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount];\n\n if (startGridY > 0) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1;\n }\n }\n if (finishGridX < this.grid.length - 1) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1;\n }\n }\n if (finishGridY < this.grid[0].length - 1) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1;\n }\n }\n if (startGridX > 0) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1;\n }\n }\n var min = Integer.MAX_VALUE;\n var minCount;\n var minIndex;\n for (var j = 0; j < controlRegions.length; j++) {\n if (controlRegions[j] < min) {\n min = controlRegions[j];\n minCount = 1;\n minIndex = j;\n } else if (controlRegions[j] == min) {\n minCount++;\n }\n }\n\n if (minCount == 3 && min == 0) {\n if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) {\n gridForPrunedNode = 1;\n } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 0;\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 3;\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 2;\n }\n } else if (minCount == 2 && min == 0) {\n var random = Math.floor(Math.random() * 2);\n if (controlRegions[0] == 0 && controlRegions[1] == 0) {\n ;\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 1;\n }\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[0] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 3;\n }\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[1] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 3;\n }\n } else {\n if (random == 0) {\n gridForPrunedNode = 2;\n } else {\n gridForPrunedNode = 3;\n }\n }\n } else if (minCount == 4 && min == 0) {\n var random = Math.floor(Math.random() * 4);\n gridForPrunedNode = random;\n } else {\n gridForPrunedNode = minIndex;\n }\n\n if (gridForPrunedNode == 0) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2);\n } else if (gridForPrunedNode == 1) {\n prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n } else if (gridForPrunedNode == 2) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2);\n } else {\n prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n }\n};\n\nmodule.exports = CoSELayout;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar coseBase = {};\n\ncoseBase.layoutBase = __webpack_require__(0);\ncoseBase.CoSEConstants = __webpack_require__(1);\ncoseBase.CoSEEdge = __webpack_require__(2);\ncoseBase.CoSEGraph = __webpack_require__(3);\ncoseBase.CoSEGraphManager = __webpack_require__(4);\ncoseBase.CoSELayout = __webpack_require__(6);\ncoseBase.CoSENode = __webpack_require__(5);\n\nmodule.exports = coseBase;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"cose-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"cose-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cytoscapeCoseBilkent\"] = factory(require(\"cose-base\"));\n\telse\n\t\troot[\"cytoscapeCoseBilkent\"] = factory(root[\"coseBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants;\nvar FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants;\nvar CoSEConstants = __webpack_require__(0).CoSEConstants;\nvar CoSELayout = __webpack_require__(0).CoSELayout;\nvar CoSENode = __webpack_require__(0).CoSENode;\nvar PointD = __webpack_require__(0).layoutBase.PointD;\nvar DimensionD = __webpack_require__(0).layoutBase.DimensionD;\n\nvar defaults = {\n // Called on `layoutready`\n ready: function ready() {},\n // Called on `layoutstop`\n stop: function stop() {},\n // 'draft', 'default' or 'proof\" \n // - 'draft' fast cooling rate \n // - 'default' moderate cooling rate \n // - \"proof\" slow cooling rate\n quality: 'default',\n // include labels in node dimensions\n nodeDimensionsIncludeLabels: false,\n // number of ticks per frame; higher is faster but more jerky\n refresh: 30,\n // Whether to fit the network view after when done\n fit: true,\n // Padding on fit\n padding: 10,\n // Whether to enable incremental mode\n randomize: true,\n // Node repulsion (non overlapping) multiplier\n nodeRepulsion: 4500,\n // Ideal edge (non nested) length\n idealEdgeLength: 50,\n // Divisor to compute edge forces\n edgeElasticity: 0.45,\n // Nesting factor (multiplier) to compute ideal edge length for nested edges\n nestingFactor: 0.1,\n // Gravity force (constant)\n gravity: 0.25,\n // Maximum number of iterations to perform\n numIter: 2500,\n // For enabling tiling\n tile: true,\n // Type of layout animation. The option set is {'during', 'end', false}\n animate: 'end',\n // Duration for animate:end\n animationDuration: 500,\n // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingVertical: 10,\n // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingHorizontal: 10,\n // Gravity range (constant) for compounds\n gravityRangeCompound: 1.5,\n // Gravity force (constant) for compounds\n gravityCompound: 1.0,\n // Gravity range (constant)\n gravityRange: 3.8,\n // Initial cooling factor for incremental layout\n initialEnergyOnIncremental: 0.5\n};\n\nfunction extend(defaults, options) {\n var obj = {};\n\n for (var i in defaults) {\n obj[i] = defaults[i];\n }\n\n for (var i in options) {\n obj[i] = options[i];\n }\n\n return obj;\n};\n\nfunction _CoSELayout(_options) {\n this.options = extend(defaults, _options);\n getUserOptions(this.options);\n}\n\nvar getUserOptions = function getUserOptions(options) {\n if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion;\n if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;\n if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity;\n if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;\n if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;\n if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;\n if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;\n if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;\n if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;\n if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;\n\n if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1;\n\n CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;\n CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;\n CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;\n CoSEConstants.TILE = options.tile;\n CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;\n CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;\n};\n\n_CoSELayout.prototype.run = function () {\n var ready;\n var frameId;\n var options = this.options;\n var idToLNode = this.idToLNode = {};\n var layout = this.layout = new CoSELayout();\n var self = this;\n\n self.stopped = false;\n\n this.cy = this.options.cy;\n\n this.cy.trigger({ type: 'layoutstart', layout: this });\n\n var gm = layout.newGraphManager();\n this.gm = gm;\n\n var nodes = this.options.eles.nodes();\n var edges = this.options.eles.edges();\n\n this.root = gm.addRoot();\n this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout);\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var sourceNode = this.idToLNode[edge.data(\"source\")];\n var targetNode = this.idToLNode[edge.data(\"target\")];\n if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {\n var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);\n e1.id = edge.id();\n }\n }\n\n var getPositions = function getPositions(ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var theId = ele.data('id');\n var lNode = self.idToLNode[theId];\n\n return {\n x: lNode.getRect().getCenterX(),\n y: lNode.getRect().getCenterY()\n };\n };\n\n /*\n * Reposition nodes in iterations animatedly\n */\n var iterateAnimated = function iterateAnimated() {\n // Thigs to perform after nodes are repositioned on screen\n var afterReposition = function afterReposition() {\n if (options.fit) {\n options.cy.fit(options.eles, options.padding);\n }\n\n if (!ready) {\n ready = true;\n self.cy.one('layoutready', options.ready);\n self.cy.trigger({ type: 'layoutready', layout: self });\n }\n };\n\n var ticksPerFrame = self.options.refresh;\n var isDone;\n\n for (var i = 0; i < ticksPerFrame && !isDone; i++) {\n isDone = self.stopped || self.layout.tick();\n }\n\n // If layout is done\n if (isDone) {\n // If the layout is not a sublayout and it is successful perform post layout.\n if (layout.checkLayoutSuccess() && !layout.isSubLayout) {\n layout.doPostLayout();\n }\n\n // If layout has a tilingPostLayout function property call it.\n if (layout.tilingPostLayout) {\n layout.tilingPostLayout();\n }\n\n layout.isLayoutFinished = true;\n\n self.options.eles.nodes().positions(getPositions);\n\n afterReposition();\n\n // trigger layoutstop when the layout stops (e.g. finishes)\n self.cy.one('layoutstop', self.options.stop);\n self.cy.trigger({ type: 'layoutstop', layout: self });\n\n if (frameId) {\n cancelAnimationFrame(frameId);\n }\n\n ready = false;\n return;\n }\n\n var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling\n\n // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds)\n // use position of their ancestors or dummy ancestors\n options.eles.nodes().positions(function (ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n // If ele is a compound node, then its position will be defined by its children\n if (!ele.isParent()) {\n var theId = ele.id();\n var pNode = animationData[theId];\n var temp = ele;\n // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well)\n while (pNode == null) {\n pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')];\n animationData[theId] = pNode;\n temp = temp.parent()[0];\n if (temp == undefined) {\n break;\n }\n }\n if (pNode != null) {\n return {\n x: pNode.x,\n y: pNode.y\n };\n } else {\n return {\n x: ele.position('x'),\n y: ele.position('y')\n };\n }\n }\n });\n\n afterReposition();\n\n frameId = requestAnimationFrame(iterateAnimated);\n };\n\n /*\n * Listen 'layoutstarted' event and start animated iteration if animate option is 'during'\n */\n layout.addListener('layoutstarted', function () {\n if (self.options.animate === 'during') {\n frameId = requestAnimationFrame(iterateAnimated);\n }\n });\n\n layout.runLayout(); // Run cose layout\n\n /*\n * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed)\n */\n if (this.options.animate !== \"during\") {\n self.options.eles.nodes().not(\":parent\").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter\n ready = false;\n }\n\n return this; // chaining\n};\n\n//Get the top most ones of a list of nodes\n_CoSELayout.prototype.getTopMostNodes = function (nodes) {\n var nodesMap = {};\n for (var i = 0; i < nodes.length; i++) {\n nodesMap[nodes[i].id()] = true;\n }\n var roots = nodes.filter(function (ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var parent = ele.parent()[0];\n while (parent != null) {\n if (nodesMap[parent.id()]) {\n return false;\n }\n parent = parent.parent()[0];\n }\n return true;\n });\n\n return roots;\n};\n\n_CoSELayout.prototype.processChildrenList = function (parent, children, layout) {\n var size = children.length;\n for (var i = 0; i < size; i++) {\n var theChild = children[i];\n var children_of_children = theChild.children();\n var theNode;\n\n var dimensions = theChild.layoutDimensions({\n nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels\n });\n\n if (theChild.outerWidth() != null && theChild.outerHeight() != null) {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n } else {\n theNode = parent.add(new CoSENode(this.graphManager));\n }\n // Attach id to the layout node\n theNode.id = theChild.data(\"id\");\n // Attach the paddings of cy node to layout node\n theNode.paddingLeft = parseInt(theChild.css('padding'));\n theNode.paddingTop = parseInt(theChild.css('padding'));\n theNode.paddingRight = parseInt(theChild.css('padding'));\n theNode.paddingBottom = parseInt(theChild.css('padding'));\n\n //Attach the label properties to compound if labels will be included in node dimensions \n if (this.options.nodeDimensionsIncludeLabels) {\n if (theChild.isParent()) {\n var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w;\n var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h;\n var labelPos = theChild.css(\"text-halign\");\n theNode.labelWidth = labelWidth;\n theNode.labelHeight = labelHeight;\n theNode.labelPos = labelPos;\n }\n }\n\n // Map the layout node\n this.idToLNode[theChild.data(\"id\")] = theNode;\n\n if (isNaN(theNode.rect.x)) {\n theNode.rect.x = 0;\n }\n\n if (isNaN(theNode.rect.y)) {\n theNode.rect.y = 0;\n }\n\n if (children_of_children != null && children_of_children.length > 0) {\n var theNewGraph;\n theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);\n this.processChildrenList(theNewGraph, children_of_children, layout);\n }\n }\n};\n\n/**\n * @brief : called on continuous layouts to stop them before they finish\n */\n_CoSELayout.prototype.stop = function () {\n this.stopped = true;\n\n return this; // chaining\n};\n\nvar register = function register(cytoscape) {\n // var Layout = getLayout( cytoscape );\n\n cytoscape('layout', 'cose-bilkent', _CoSELayout);\n};\n\n// auto reg for globals\nif (typeof cytoscape !== 'undefined') {\n register(cytoscape);\n}\n\nmodule.exports = register;\n\n/***/ })\n/******/ ]);\n});", "import { createText } from '../../rendering-util/createText.js';\nimport type { FilledMindMapNode, MindmapDB } from './mindmapTypes.js';\nimport type { Point, D3Element } from '../../types.js';\nimport { parseFontSize } from '../../utils.js';\nimport type { MermaidConfig } from '../../config.type.js';\n\nconst MAX_SECTIONS = 12;\n\ntype ShapeFunction = (\n db: MindmapDB,\n elem: D3Element,\n node: FilledMindMapNode,\n section?: number\n) => void;\n\nconst defaultBkg: ShapeFunction = function (db, elem, node, section) {\n const rd = 5;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${\n node.width - 2 * rd\n } q5,0 5,5 v${node.height - rd} H0 Z`\n );\n\n elem\n .append('line')\n .attr('class', 'node-line-' + section)\n .attr('x1', 0)\n .attr('y1', node.height)\n .attr('x2', node.width)\n .attr('y2', node.height);\n};\n\nconst rectBkg: ShapeFunction = function (db, elem, node) {\n elem\n .append('rect')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('height', node.height)\n .attr('width', node.width);\n};\n\nconst cloudBkg: ShapeFunction = function (db, elem, node) {\n const w = node.width;\n const h = node.height;\n const r1 = 0.15 * w;\n const r2 = 0.25 * w;\n const r3 = 0.35 * w;\n const r4 = 0.2 * w;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}\n a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}\n a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2}\n\n a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65}\n\n a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}\n a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0}\n a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}\n\n a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}\n\n H0 V0 Z`\n );\n};\n\nconst bangBkg: ShapeFunction = function (db, elem, node) {\n const w = node.width;\n const h = node.height;\n const r = 0.15 * w;\n elem\n .append('path')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr(\n 'd',\n `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1}\n a${r},${r} 1 0,0 ${w * 0.25},${0}\n a${r},${r} 1 0,0 ${w * 0.25},${0}\n a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1}\n\n a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34}\n a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33}\n\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${0}\n a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15}\n\n a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34}\n a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33}\n\n H0 V0 Z`\n );\n};\n\nconst circleBkg: ShapeFunction = function (db, elem, node) {\n elem\n .append('circle')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('r', node.width / 2);\n};\n\nfunction insertPolygonShape(\n parent: D3Element,\n w: number,\n h: number,\n points: Point[],\n node: FilledMindMapNode\n) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('transform', 'translate(' + (node.width - w) / 2 + ', ' + h + ')');\n}\n\nconst hexagonBkg: ShapeFunction = function (\n _db: MindmapDB,\n elem: D3Element,\n node: FilledMindMapNode\n) {\n const h = node.height;\n const f = 4;\n const m = h / f;\n const w = node.width - node.padding + 2 * m;\n const points: Point[] = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n insertPolygonShape(elem, w, h, points, node);\n};\n\nconst roundedRectBkg: ShapeFunction = function (db, elem, node) {\n elem\n .append('rect')\n .attr('id', 'node-' + node.id)\n .attr('class', 'node-bkg node-' + db.type2Str(node.type))\n .attr('height', node.height)\n .attr('rx', node.padding)\n .attr('ry', node.padding)\n .attr('width', node.width);\n};\n\n/**\n * @param db - The database\n * @param elem - The D3 dom element in which the node is to be added\n * @param node - The node to be added\n * @param fullSection - ?\n * @param conf - The configuration object\n * @returns The height nodes dom element\n */\nexport const drawNode = async function (\n db: MindmapDB,\n elem: D3Element,\n node: FilledMindMapNode,\n fullSection: number,\n conf: MermaidConfig\n): Promise {\n const htmlLabels = conf.htmlLabels;\n const section = fullSection % (MAX_SECTIONS - 1);\n const nodeElem = elem.append('g');\n node.section = section;\n let sectionClass = 'section-' + section;\n if (section < 0) {\n sectionClass += ' section-root';\n }\n nodeElem.attr('class', (node.class ? node.class + ' ' : '') + 'mindmap-node ' + sectionClass);\n const bkgElem = nodeElem.append('g');\n\n // Create the wrapped text element\n const textElem = nodeElem.append('g');\n const description = node.descr.replace(/()/g, '\\n');\n await createText(\n textElem,\n description,\n {\n useHtmlLabels: htmlLabels,\n width: node.width,\n classes: 'mindmap-node-label',\n },\n conf\n );\n\n if (!htmlLabels) {\n textElem\n .attr('dy', '1em')\n .attr('alignment-baseline', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle');\n }\n const bbox = textElem.node().getBBox();\n const [fontSize] = parseFontSize(conf.fontSize);\n node.height = bbox.height + fontSize! * 1.1 * 0.5 + node.padding;\n node.width = bbox.width + 2 * node.padding;\n if (node.icon) {\n if (node.type === db.nodeType.CIRCLE) {\n node.height += 50;\n node.width += 50;\n const icon = nodeElem\n .append('foreignObject')\n .attr('height', '50px')\n .attr('width', node.width)\n .attr('style', 'text-align: center;');\n icon\n .append('div')\n .attr('class', 'icon-container')\n .append('i')\n .attr('class', 'node-icon-' + section + ' ' + node.icon);\n textElem.attr(\n 'transform',\n 'translate(' + node.width / 2 + ', ' + (node.height / 2 - 1.5 * node.padding) + ')'\n );\n } else {\n node.width += 50;\n const orgHeight = node.height;\n node.height = Math.max(orgHeight, 60);\n const heightDiff = Math.abs(node.height - orgHeight);\n const icon = nodeElem\n .append('foreignObject')\n .attr('width', '60px')\n .attr('height', node.height)\n .attr('style', 'text-align: center;margin-top:' + heightDiff / 2 + 'px;');\n\n icon\n .append('div')\n .attr('class', 'icon-container')\n .append('i')\n .attr('class', 'node-icon-' + section + ' ' + node.icon);\n textElem.attr(\n 'transform',\n 'translate(' + (25 + node.width / 2) + ', ' + (heightDiff / 2 + node.padding / 2) + ')'\n );\n }\n } else {\n if (!htmlLabels) {\n const dx = node.width / 2;\n const dy = node.padding / 2;\n textElem.attr('transform', 'translate(' + dx + ', ' + dy + ')');\n // textElem.attr('transform', 'translate(' + node.width / 2 + ', ' + node.padding / 2 + ')');\n } else {\n const dx = (node.width - bbox.width) / 2;\n const dy = (node.height - bbox.height) / 2;\n textElem.attr('transform', 'translate(' + dx + ', ' + dy + ')');\n }\n }\n\n switch (node.type) {\n case db.nodeType.DEFAULT:\n defaultBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.ROUNDED_RECT:\n roundedRectBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.RECT:\n rectBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.CIRCLE:\n bkgElem.attr('transform', 'translate(' + node.width / 2 + ', ' + +node.height / 2 + ')');\n circleBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.CLOUD:\n cloudBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.BANG:\n bangBkg(db, bkgElem, node, section);\n break;\n case db.nodeType.HEXAGON:\n hexagonBkg(db, bkgElem, node, section);\n break;\n }\n\n db.setElementForId(node.id, nodeElem);\n return node.height;\n};\n\nexport const positionNode = function (db: MindmapDB, node: FilledMindMapNode) {\n const nodeElem = db.getElementById(node.id);\n\n const x = node.x || 0;\n const y = node.y || 0;\n // Position the node to its coordinate\n nodeElem.attr('transform', 'translate(' + x + ',' + y + ')');\n};\n", "import cytoscape from 'cytoscape';\n// @ts-expect-error No types available\nimport coseBilkent from 'cytoscape-cose-bilkent';\nimport { select } from 'd3';\nimport type { MermaidConfig } from '../../config.type.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DrawDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport type { D3Element } from '../../types.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport type { FilledMindMapNode, MindmapDB, MindmapNode } from './mindmapTypes.js';\nimport { drawNode, positionNode } from './svgDraw.js';\nimport defaultConfig from '../../defaultConfig.js';\n\n// Inject the layout algorithm into cytoscape\ncytoscape.use(coseBilkent);\n\nasync function drawNodes(\n db: MindmapDB,\n svg: D3Element,\n mindmap: FilledMindMapNode,\n section: number,\n conf: MermaidConfig\n) {\n await drawNode(db, svg, mindmap, section, conf);\n if (mindmap.children) {\n await Promise.all(\n mindmap.children.map((child, index) =>\n drawNodes(db, svg, child, section < 0 ? index : section, conf)\n )\n );\n }\n}\n\ndeclare module 'cytoscape' {\n interface EdgeSingular {\n _private: {\n bodyBounds: unknown;\n rscratch: {\n startX: number;\n startY: number;\n midX: number;\n midY: number;\n endX: number;\n endY: number;\n };\n };\n }\n}\n\nfunction drawEdges(edgesEl: D3Element, cy: cytoscape.Core) {\n cy.edges().map((edge, id) => {\n const data = edge.data();\n if (edge[0]._private.bodyBounds) {\n const bounds = edge[0]._private.rscratch;\n log.trace('Edge: ', id, data);\n edgesEl\n .insert('path')\n .attr(\n 'd',\n `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `\n )\n .attr('class', 'edge section-edge-' + data.section + ' edge-depth-' + data.depth);\n }\n });\n}\n\nfunction addNodes(mindmap: MindmapNode, cy: cytoscape.Core, conf: MermaidConfig, level: number) {\n cy.add({\n group: 'nodes',\n data: {\n id: mindmap.id.toString(),\n labelText: mindmap.descr,\n height: mindmap.height,\n width: mindmap.width,\n level: level,\n nodeId: mindmap.id,\n padding: mindmap.padding,\n type: mindmap.type,\n },\n position: {\n x: mindmap.x!,\n y: mindmap.y!,\n },\n });\n if (mindmap.children) {\n mindmap.children.forEach((child) => {\n addNodes(child, cy, conf, level + 1);\n cy.add({\n group: 'edges',\n data: {\n id: `${mindmap.id}_${child.id}`,\n source: mindmap.id,\n target: child.id,\n depth: level,\n section: child.section,\n },\n });\n });\n }\n}\n\nfunction layoutMindmap(node: MindmapNode, conf: MermaidConfig): Promise {\n return new Promise((resolve) => {\n // Add temporary render element\n const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');\n const cy = cytoscape({\n container: document.getElementById('cy'), // container to render in\n style: [\n {\n selector: 'edge',\n style: {\n 'curve-style': 'bezier',\n },\n },\n ],\n });\n // Remove element after layout\n renderEl.remove();\n addNodes(node, cy, conf, 0);\n\n // Make cytoscape care about the dimensions of the nodes\n cy.nodes().forEach(function (n) {\n n.layoutDimensions = () => {\n const data = n.data();\n return { w: data.width, h: data.height };\n };\n });\n\n cy.layout({\n name: 'cose-bilkent',\n // @ts-ignore Types for cose-bilkent are not correct?\n quality: 'proof',\n styleEnabled: false,\n animate: false,\n }).run();\n cy.ready((e) => {\n log.info('Ready', e);\n resolve(cy);\n });\n });\n}\n\nfunction positionNodes(db: MindmapDB, cy: cytoscape.Core) {\n cy.nodes().map((node, id) => {\n const data = node.data();\n data.x = node.position().x;\n data.y = node.position().y;\n positionNode(db, data);\n const el = db.getElementById(data.nodeId);\n log.info('Id:', id, 'Position: (', node.position().x, ', ', node.position().y, ')', data);\n el.attr(\n 'transform',\n `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})`\n );\n el.attr('attr', `apa-${id})`);\n });\n}\n\nexport const draw: DrawDefinition = async (text, id, _version, diagObj) => {\n log.debug('Rendering mindmap diagram\\n' + text);\n\n const db = diagObj.db as MindmapDB;\n const mm = db.getMindmap();\n if (!mm) {\n return;\n }\n\n const conf = getConfig();\n conf.htmlLabels = false;\n\n const svg = selectSvgElement(id);\n\n // Draw the graph and start with drawing the nodes without proper position\n // this gives us the size of the nodes and we can set the positions later\n\n const edgesElem = svg.append('g');\n edgesElem.attr('class', 'mindmap-edges');\n const nodesElem = svg.append('g');\n nodesElem.attr('class', 'mindmap-nodes');\n await drawNodes(db, nodesElem, mm as FilledMindMapNode, -1, conf);\n\n // Next step is to layout the mindmap, giving each node a position\n\n const cy = await layoutMindmap(mm, conf);\n\n // After this we can draw, first the edges and the then nodes with the correct position\n drawEdges(edgesElem, cy);\n positionNodes(db, cy);\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(\n undefined,\n svg,\n conf.mindmap?.padding ?? defaultConfig.mindmap.padding,\n conf.mindmap?.useMaxWidth ?? defaultConfig.mindmap.useMaxWidth\n );\n};\n\nexport default {\n draw,\n};\n", "// @ts-expect-error Incorrect khroma types\nimport { darken, lighten, isDark } from 'khroma';\nimport type { DiagramStylesProvider } from '../../diagram-api/types.js';\n\nconst genSections: DiagramStylesProvider = (options) => {\n let sections = '';\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n options['lineColor' + i] = options['lineColor' + i] || options['cScaleInv' + i];\n if (isDark(options['lineColor' + i])) {\n options['lineColor' + i] = lighten(options['lineColor' + i], 20);\n } else {\n options['lineColor' + i] = darken(options['lineColor' + i], 20);\n }\n }\n\n for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {\n const sw = '' + (17 - 3 * i);\n sections += `\n .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${\n i - 1\n } polygon, .section-${i - 1} path {\n fill: ${options['cScale' + i]};\n }\n .section-${i - 1} text {\n fill: ${options['cScaleLabel' + i]};\n }\n .node-icon-${i - 1} {\n font-size: 40px;\n color: ${options['cScaleLabel' + i]};\n }\n .section-edge-${i - 1}{\n stroke: ${options['cScale' + i]};\n }\n .edge-depth-${i - 1}{\n stroke-width: ${sw};\n }\n .section-${i - 1} line {\n stroke: ${options['cScaleInv' + i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `;\n }\n return sections;\n};\n\n// TODO: These options seem incorrect.\nconst getStyles: DiagramStylesProvider = (options) =>\n `\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`;\nexport default getStyles;\n", "// @ts-ignore: JISON doesn't support types\nimport parser from './parser/mindmap.jison';\nimport db from './mindmapDb.js';\nimport renderer from './mindmapRenderer.js';\nimport styles from './styles.js';\nimport type { DiagramDefinition } from '../../diagram-api/types.js';\n\nexport const diagram: DiagramDefinition = {\n db,\n renderer,\n parser,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,9],$V1=[1,10],$V2=[1,5,10,12];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SANKEY\":4,\"NEWLINE\":5,\"csv\":6,\"opt_eof\":7,\"record\":8,\"csv_tail\":9,\"EOF\":10,\"field[source]\":11,\"COMMA\":12,\"field[target]\":13,\"field[value]\":14,\"field\":15,\"escaped\":16,\"non_escaped\":17,\"DQUOTE\":18,\"ESCAPED_TEXT\":19,\"NON_ESCAPED_TEXT\":20,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SANKEY\",5:\"NEWLINE\",10:\"EOF\",11:\"field[source]\",12:\"COMMA\",13:\"field[target]\",14:\"field[value]\",18:\"DQUOTE\",19:\"ESCAPED_TEXT\",20:\"NON_ESCAPED_TEXT\"},\nproductions_: [0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 7:\n\n const source = yy.findOrCreateNode($$[$0-4].trim().replaceAll('\"\"', '\"'));\n const target = yy.findOrCreateNode($$[$0-2].trim().replaceAll('\"\"', '\"'));\n const value = parseFloat($$[$0].trim());\n yy.addLink(source,target,value);\n \nbreak;\ncase 8: case 9: case 11:\n this.$=$$[$0]; \nbreak;\ncase 10:\n this.$=$$[$0-1]; \nbreak;\n}\n},\ntable: [{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:$V0,20:$V1},{1:[2,6],7:11,10:[1,12]},o($V1,[2,4],{9:13,5:[1,14]}),{12:[1,15]},o($V2,[2,8]),o($V2,[2,9]),{19:[1,16]},o($V2,[2,11]),{1:[2,1]},{1:[2,5]},o($V1,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:$V0,20:$V1},{15:18,16:7,17:8,18:$V0,20:$V1},{18:[1,19]},o($V1,[2,3]),{12:[1,20]},o($V2,[2,10]),{15:21,16:7,17:8,18:$V0,20:$V1},o([1,5,10],[2,7])],\ndefaultActions: {11:[2,1],12:[2,5]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.pushState('csv'); return 4; \nbreak;\ncase 1: return 10 \nbreak;\ncase 2: return 5 \nbreak;\ncase 3: return 12 \nbreak;\ncase 4: this.pushState('escaped_text'); return 18; \nbreak;\ncase 5: return 20 \nbreak;\ncase 6:this.popState('escaped_text'); return 18; \nbreak;\ncase 7: return 19; \nbreak;\n}\n},\nrules: [/^(?:sankey-beta\\b)/i,/^(?:$)/i,/^(?:((\\u000D\\u000A)|(\\u000A)))/i,/^(?:(\\u002C))/i,/^(?:(\\u0022))/i,/^(?:([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])*)/i,/^(?:(\\u0022)(?!(\\u0022)))/i,/^(?:(([\\u0020-\\u0021\\u0023-\\u002B\\u002D-\\u007E])|(\\u002C)|(\\u000D)|(\\u000A)|(\\u0022)(\\u0022))*)/i],\nconditions: {\"csv\":{\"rules\":[1,2,3,4,5,6,7],\"inclusive\":false},\"escaped_text\":{\"rules\":[6,7],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport common from '../common/common.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n setDiagramTitle,\n getDiagramTitle,\n clear as commonClear,\n} from '../common/commonDb.js';\n\n// Sankey diagram represented by nodes and links between those nodes\nlet links: SankeyLink[] = [];\n// Array of nodes guarantees their order\nlet nodes: SankeyNode[] = [];\n// We also have to track nodes uniqueness (by ID)\nlet nodesMap = new Map();\n\nconst clear = (): void => {\n links = [];\n nodes = [];\n nodesMap = new Map();\n commonClear();\n};\n\nclass SankeyLink {\n constructor(\n public source: SankeyNode,\n public target: SankeyNode,\n public value = 0\n ) {}\n}\n\n/**\n * @param source - Node where the link starts\n * @param target - Node where the link ends\n * @param value - Describes the amount to be passed\n */\nconst addLink = (source: SankeyNode, target: SankeyNode, value: number): void => {\n links.push(new SankeyLink(source, target, value));\n};\n\nclass SankeyNode {\n constructor(public ID: string) {}\n}\n\nconst findOrCreateNode = (ID: string): SankeyNode => {\n ID = common.sanitizeText(ID, getConfig());\n\n let node = nodesMap.get(ID);\n if (node === undefined) {\n node = new SankeyNode(ID);\n nodesMap.set(ID, node);\n nodes.push(node);\n }\n return node;\n};\n\nconst getNodes = () => nodes;\nconst getLinks = () => links;\n\nconst getGraph = () => ({\n nodes: nodes.map((node) => ({ id: node.ID })),\n links: links.map((link) => ({\n source: link.source.ID,\n target: link.target.ID,\n value: link.value,\n })),\n});\n\nexport default {\n nodesMap,\n getConfig: () => getConfig().sankey,\n getNodes,\n getLinks,\n getGraph,\n addLink,\n findOrCreateNode,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n getDiagramTitle,\n setDiagramTitle,\n clear,\n};\n", "export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n", "export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n", "export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n", "export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n", "import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n", "export default function constant(x) {\n return function() {\n return x;\n };\n}\n", "import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n", "var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We\u2019re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n", "export {default as path} from \"./path.js\";\n", "export default function(x) {\n return function constant() {\n return x;\n };\n}\n", "export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n", "export var slice = Array.prototype.slice;\n", "import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n", "export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {linkHorizontal, linkVertical, linkRadial} from \"./link/index.js\";\n\nexport {default as symbol, symbols} from \"./symbol.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n", "import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n", "export {default as sankey} from \"./sankey.js\";\nexport {center as sankeyCenter, left as sankeyLeft, right as sankeyRight, justify as sankeyJustify} from \"./align.js\";\nexport {default as sankeyLinkHorizontal} from \"./sankeyLinkHorizontal.js\";\n", "export class Uid {\n private static count = 0;\n id: string;\n href: string;\n\n public static next(name: string): Uid {\n return new Uid(name + ++Uid.count);\n }\n\n constructor(id: string) {\n this.id = id;\n this.href = `#${id}`;\n }\n\n toString(): string {\n return 'url(' + this.href + ')';\n }\n}\n", "import type { Diagram } from '../../Diagram.js';\nimport { getConfig, defaultConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n select as d3select,\n scaleOrdinal as d3scaleOrdinal,\n schemeTableau10 as d3schemeTableau10,\n} from 'd3';\nimport type { SankeyNode as d3SankeyNode } from 'd3-sankey';\nimport {\n sankey as d3Sankey,\n sankeyLinkHorizontal as d3SankeyLinkHorizontal,\n sankeyLeft as d3SankeyLeft,\n sankeyRight as d3SankeyRight,\n sankeyCenter as d3SankeyCenter,\n sankeyJustify as d3SankeyJustify,\n} from 'd3-sankey';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\nimport { Uid } from '../../rendering-util/uid.js';\nimport type { SankeyNodeAlignment } from '../../config.type.js';\n\n// Map config options to alignment functions\nconst alignmentsMap: Record<\n SankeyNodeAlignment,\n (node: d3SankeyNode, n: number) => number\n> = {\n left: d3SankeyLeft,\n right: d3SankeyRight,\n center: d3SankeyCenter,\n justify: d3SankeyJustify,\n};\n\n/**\n * Draws Sankey diagram.\n *\n * @param text - The text of the diagram\n * @param id - The id of the diagram which will be used as a DOM element id\u00A8\n * @param _version - Mermaid version from package.json\n * @param diagObj - A standard diagram containing the db and the text and type etc of the diagram\n */\nexport const draw = function (text: string, id: string, _version: string, diagObj: Diagram): void {\n // Get Sankey config\n const { securityLevel, sankey: conf } = getConfig();\n const defaultSankeyConfig = defaultConfig.sankey!;\n\n // TODO:\n // This code repeats for every diagram\n // Figure out what is happening there, probably it should be separated\n // The main thing is svg object that is a d3 wrapper for svg operations\n //\n let sandboxElement: any;\n if (securityLevel === 'sandbox') {\n sandboxElement = d3select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? d3select(sandboxElement.nodes()[0].contentDocument.body)\n : d3select('body');\n // @ts-ignore TODO root.select is not callable\n const svg = securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : d3select(`[id=\"${id}\"]`);\n\n // Establish svg dimensions and get width and height\n //\n const width = conf?.width ?? defaultSankeyConfig.width!;\n const height = conf?.height ?? defaultSankeyConfig.width!;\n const useMaxWidth = conf?.useMaxWidth ?? defaultSankeyConfig.useMaxWidth!;\n const nodeAlignment = conf?.nodeAlignment ?? defaultSankeyConfig.nodeAlignment!;\n const prefix = conf?.prefix ?? defaultSankeyConfig.prefix!;\n const suffix = conf?.suffix ?? defaultSankeyConfig.suffix!;\n const showValues = conf?.showValues ?? defaultSankeyConfig.showValues!;\n\n // Prepare data for construction based on diagObj.db\n // This must be a mutable object with `nodes` and `links` properties:\n //\n // {\n // \"nodes\": [ { \"id\": \"Alice\" }, { \"id\": \"Bob\" }, { \"id\": \"Carol\" } ],\n // \"links\": [ { \"source\": \"Alice\", \"target\": \"Bob\", \"value\": 23 }, { \"source\": \"Bob\", \"target\": \"Carol\", \"value\": 43 } ]\n // }\n //\n // @ts-ignore TODO: db should be coerced to sankey DB type\n const graph = diagObj.db.getGraph();\n\n // Get alignment function\n const nodeAlign = alignmentsMap[nodeAlignment];\n\n // Construct and configure a Sankey generator\n // That will be a function that calculates nodes and links dimensions\n //\n const nodeWidth = 10;\n const sankey = d3Sankey()\n .nodeId((d: any) => d.id) // we use 'id' property to identify node\n .nodeWidth(nodeWidth)\n .nodePadding(10 + (showValues ? 15 : 0))\n .nodeAlign(nodeAlign)\n .extent([\n [0, 0],\n [width, height],\n ]);\n\n // Compute the Sankey layout: calculate nodes and links positions\n // Our `graph` object will be mutated by this and enriched with other properties\n //\n sankey(graph);\n\n // Get color scheme for the graph\n const colorScheme = d3scaleOrdinal(d3schemeTableau10);\n\n // Create rectangles for nodes\n svg\n .append('g')\n .attr('class', 'nodes')\n .selectAll('.node')\n .data(graph.nodes)\n .join('g')\n .attr('class', 'node')\n .attr('id', (d: any) => (d.uid = Uid.next('node-')).id)\n .attr('transform', function (d: any) {\n return 'translate(' + d.x0 + ',' + d.y0 + ')';\n })\n .attr('x', (d: any) => d.x0)\n .attr('y', (d: any) => d.y0)\n .append('rect')\n .attr('height', (d: any) => {\n return d.y1 - d.y0;\n })\n .attr('width', (d: any) => d.x1 - d.x0)\n .attr('fill', (d: any) => colorScheme(d.id));\n\n const getText = ({ id, value }: { id: string; value: number }) => {\n if (!showValues) {\n return id;\n }\n return `${id}\\n${prefix}${Math.round(value * 100) / 100}${suffix}`;\n };\n\n // Create labels for nodes\n svg\n .append('g')\n .attr('class', 'node-labels')\n .attr('font-family', 'sans-serif')\n .attr('font-size', 14)\n .selectAll('text')\n .data(graph.nodes)\n .join('text')\n .attr('x', (d: any) => (d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6))\n .attr('y', (d: any) => (d.y1 + d.y0) / 2)\n .attr('dy', `${showValues ? '0' : '0.35'}em`)\n .attr('text-anchor', (d: any) => (d.x0 < width / 2 ? 'start' : 'end'))\n .text(getText);\n\n // Creates the paths that represent the links.\n const link = svg\n .append('g')\n .attr('class', 'links')\n .attr('fill', 'none')\n .attr('stroke-opacity', 0.5)\n .selectAll('.link')\n .data(graph.links)\n .join('g')\n .attr('class', 'link')\n .style('mix-blend-mode', 'multiply');\n\n const linkColor = conf?.linkColor ?? 'gradient';\n\n if (linkColor === 'gradient') {\n const gradient = link\n .append('linearGradient')\n .attr('id', (d: any) => (d.uid = Uid.next('linearGradient-')).id)\n .attr('gradientUnits', 'userSpaceOnUse')\n .attr('x1', (d: any) => d.source.x1)\n .attr('x2', (d: any) => d.target.x0);\n\n gradient\n .append('stop')\n .attr('offset', '0%')\n .attr('stop-color', (d: any) => colorScheme(d.source.id));\n\n gradient\n .append('stop')\n .attr('offset', '100%')\n .attr('stop-color', (d: any) => colorScheme(d.target.id));\n }\n\n let coloring: any;\n switch (linkColor) {\n case 'gradient':\n coloring = (d: any) => d.uid;\n break;\n case 'source':\n coloring = (d: any) => colorScheme(d.source.id);\n break;\n case 'target':\n coloring = (d: any) => colorScheme(d.target.id);\n break;\n default:\n coloring = linkColor;\n }\n\n link\n .append('path')\n .attr('d', d3SankeyLinkHorizontal())\n .attr('stroke', coloring)\n .attr('stroke-width', (d: any) => Math.max(1, d.width));\n\n setupGraphViewbox(undefined, svg, 0, useMaxWidth);\n};\n\nexport default {\n draw,\n};\n", "export const prepareTextForParsing = (text: string): string => {\n const textToParse = text\n .replaceAll(/^[^\\S\\n\\r]+|[^\\S\\n\\r]+$/g, '') // remove all trailing spaces for each row\n .replaceAll(/([\\n\\r])+/g, '\\n') // remove empty lines duplicated\n .trim();\n\n return textToParse;\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: jison doesn't export types\nimport parser from './parser/sankey.jison';\nimport db from './sankeyDB.js';\nimport renderer from './sankeyRenderer.js';\nimport { prepareTextForParsing } from './sankeyUtils.js';\n\nconst originalParse = parser.parse.bind(parser);\nparser.parse = (text: string) => originalParse(prepareTextForParsing(text));\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n};\n", "import { getConfig as commonGetConfig } from '../../config.js';\nimport type { PacketDiagramConfig } from '../../config.type.js';\nimport DEFAULT_CONFIG from '../../defaultConfig.js';\nimport { cleanAndMerge } from '../../utils.js';\nimport {\n clear as commonClear,\n getAccDescription,\n getAccTitle,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n} from '../common/commonDb.js';\nimport type { PacketDB, PacketData, PacketWord } from './types.js';\n\nconst defaultPacketData: PacketData = {\n packet: [],\n};\n\nlet data: PacketData = structuredClone(defaultPacketData);\n\nconst DEFAULT_PACKET_CONFIG: Required = DEFAULT_CONFIG.packet;\n\nconst getConfig = (): Required => {\n const config = cleanAndMerge({\n ...DEFAULT_PACKET_CONFIG,\n ...commonGetConfig().packet,\n });\n if (config.showBits) {\n config.paddingY += 10;\n }\n return config;\n};\n\nconst getPacket = (): PacketWord[] => data.packet;\n\nconst pushWord = (word: PacketWord) => {\n if (word.length > 0) {\n data.packet.push(word);\n }\n};\n\nconst clear = () => {\n commonClear();\n data = structuredClone(defaultPacketData);\n};\n\nexport const db: PacketDB = {\n pushWord,\n getPacket,\n getConfig,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n};\n", "import type { Packet } from '@mermaid-js/parser';\nimport { parse } from '@mermaid-js/parser';\nimport type { ParserDefinition } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { populateCommonDb } from '../common/populateCommonDb.js';\nimport { db } from './db.js';\nimport type { PacketBlock, PacketWord } from './types.js';\n\nconst maxPacketSize = 10_000;\n\nconst populate = (ast: Packet) => {\n populateCommonDb(ast, db);\n let lastByte = -1;\n let word: PacketWord = [];\n let row = 1;\n const { bitsPerRow } = db.getConfig();\n for (let { start, end, label } of ast.blocks) {\n if (end && end < start) {\n throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);\n }\n if (start !== lastByte + 1) {\n throw new Error(\n `Packet block ${start} - ${end ?? start} is not contiguous. It should start from ${\n lastByte + 1\n }.`\n );\n }\n lastByte = end ?? start;\n log.debug(`Packet block ${start} - ${lastByte} with label ${label}`);\n\n while (word.length <= bitsPerRow + 1 && db.getPacket().length < maxPacketSize) {\n const [block, nextBlock] = getNextFittingBlock({ start, end, label }, row, bitsPerRow);\n word.push(block);\n if (block.end + 1 === row * bitsPerRow) {\n db.pushWord(word);\n word = [];\n row++;\n }\n if (!nextBlock) {\n break;\n }\n ({ start, end, label } = nextBlock);\n }\n }\n db.pushWord(word);\n};\n\nconst getNextFittingBlock = (\n block: PacketBlock,\n row: number,\n bitsPerRow: number\n): [Required, PacketBlock | undefined] => {\n if (block.end === undefined) {\n block.end = block.start;\n }\n\n if (block.start > block.end) {\n throw new Error(`Block start ${block.start} is greater than block end ${block.end}.`);\n }\n\n if (block.end + 1 <= row * bitsPerRow) {\n return [block as Required, undefined];\n }\n\n return [\n {\n start: block.start,\n end: row * bitsPerRow - 1,\n label: block.label,\n },\n {\n start: row * bitsPerRow,\n end: block.end,\n label: block.label,\n },\n ];\n};\n\nexport const parser: ParserDefinition = {\n parse: async (input: string): Promise => {\n const ast: Packet = await parse('packet', input);\n log.debug(ast);\n populate(ast);\n },\n};\n", "import type { Diagram } from '../../Diagram.js';\nimport type { PacketDiagramConfig } from '../../config.type.js';\nimport type { DiagramRenderer, DrawDefinition, SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { PacketDB, PacketWord } from './types.js';\n\nconst draw: DrawDefinition = (_text, id, _version, diagram: Diagram) => {\n const db = diagram.db as PacketDB;\n const config = db.getConfig();\n const { rowHeight, paddingY, bitWidth, bitsPerRow } = config;\n const words = db.getPacket();\n const title = db.getDiagramTitle();\n const totalRowHeight = rowHeight + paddingY;\n const svgHeight = totalRowHeight * (words.length + 1) - (title ? 0 : rowHeight);\n const svgWidth = bitWidth * bitsPerRow + 2;\n const svg: SVG = selectSvgElement(id);\n\n svg.attr('viewbox', `0 0 ${svgWidth} ${svgHeight}`);\n configureSvgSize(svg, svgHeight, svgWidth, config.useMaxWidth);\n\n for (const [word, packet] of words.entries()) {\n drawWord(svg, packet, word, config);\n }\n\n svg\n .append('text')\n .text(title)\n .attr('x', svgWidth / 2)\n .attr('y', svgHeight - totalRowHeight / 2)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .attr('class', 'packetTitle');\n};\n\nconst drawWord = (\n svg: SVG,\n word: PacketWord,\n rowNumber: number,\n { rowHeight, paddingX, paddingY, bitWidth, bitsPerRow, showBits }: Required\n) => {\n const group: SVGGroup = svg.append('g');\n const wordY = rowNumber * (rowHeight + paddingY) + paddingY;\n for (const block of word) {\n const blockX = (block.start % bitsPerRow) * bitWidth + 1;\n const width = (block.end - block.start + 1) * bitWidth - paddingX;\n // Block rectangle\n group\n .append('rect')\n .attr('x', blockX)\n .attr('y', wordY)\n .attr('width', width)\n .attr('height', rowHeight)\n .attr('class', 'packetBlock');\n\n // Block label\n group\n .append('text')\n .attr('x', blockX + width / 2)\n .attr('y', wordY + rowHeight / 2)\n .attr('class', 'packetLabel')\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .text(block.label);\n\n if (!showBits) {\n continue;\n }\n // Start byte count\n const isSingleBlock = block.end === block.start;\n const bitNumberY = wordY - 2;\n group\n .append('text')\n .attr('x', blockX + (isSingleBlock ? width / 2 : 0))\n .attr('y', bitNumberY)\n .attr('class', 'packetByte start')\n .attr('dominant-baseline', 'auto')\n .attr('text-anchor', isSingleBlock ? 'middle' : 'start')\n .text(block.start);\n\n // Draw end byte count if it is not the same as start byte count\n if (!isSingleBlock) {\n group\n .append('text')\n .attr('x', blockX + width)\n .attr('y', bitNumberY)\n .attr('class', 'packetByte end')\n .attr('dominant-baseline', 'auto')\n .attr('text-anchor', 'end')\n .text(block.end);\n }\n }\n};\nexport const renderer: DiagramRenderer = { draw };\n", "import type { DiagramStylesProvider } from '../../diagram-api/types.js';\nimport { cleanAndMerge } from '../../utils.js';\nimport type { PacketStyleOptions } from './types.js';\n\nconst defaultPacketStyleOptions: PacketStyleOptions = {\n byteFontSize: '10px',\n startByteColor: 'black',\n endByteColor: 'black',\n labelColor: 'black',\n labelFontSize: '12px',\n titleColor: 'black',\n titleFontSize: '14px',\n blockStrokeColor: 'black',\n blockStrokeWidth: '1',\n blockFillColor: '#efefef',\n};\n\nexport const styles: DiagramStylesProvider = ({ packet }: { packet?: PacketStyleOptions } = {}) => {\n const options = cleanAndMerge(defaultPacketStyleOptions, packet);\n\n return `\n\t.packetByte {\n\t\tfont-size: ${options.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${options.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${options.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${options.labelColor};\n\t\tfont-size: ${options.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${options.titleColor};\n\t\tfont-size: ${options.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${options.blockStrokeColor};\n\t\tstroke-width: ${options.blockStrokeWidth};\n\t\tfill: ${options.blockFillColor};\n\t}\n\t`;\n};\n\nexport default styles;\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { db } from './db.js';\nimport { parser } from './parser.js';\nimport { renderer } from './renderer.js';\nimport { styles } from './styles.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles,\n};\n", "/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,7],$V1=[1,13],$V2=[1,14],$V3=[1,15],$V4=[1,19],$V5=[1,16],$V6=[1,17],$V7=[1,18],$V8=[8,30],$V9=[8,21,28,29,30,31,32,40,44,47],$Va=[1,23],$Vb=[1,24],$Vc=[8,15,16,21,28,29,30,31,32,40,44,47],$Vd=[8,15,16,21,27,28,29,30,31,32,40,44,47],$Ve=[1,49];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"spaceLines\":3,\"SPACELINE\":4,\"NL\":5,\"separator\":6,\"SPACE\":7,\"EOF\":8,\"start\":9,\"BLOCK_DIAGRAM_KEY\":10,\"document\":11,\"stop\":12,\"statement\":13,\"link\":14,\"LINK\":15,\"START_LINK\":16,\"LINK_LABEL\":17,\"STR\":18,\"nodeStatement\":19,\"columnsStatement\":20,\"SPACE_BLOCK\":21,\"blockStatement\":22,\"classDefStatement\":23,\"cssClassStatement\":24,\"styleStatement\":25,\"node\":26,\"SIZE\":27,\"COLUMNS\":28,\"id-block\":29,\"end\":30,\"block\":31,\"NODE_ID\":32,\"nodeShapeNLabel\":33,\"dirList\":34,\"DIR\":35,\"NODE_DSTART\":36,\"NODE_DEND\":37,\"BLOCK_ARROW_START\":38,\"BLOCK_ARROW_END\":39,\"classDef\":40,\"CLASSDEF_ID\":41,\"CLASSDEF_STYLEOPTS\":42,\"DEFAULT\":43,\"class\":44,\"CLASSENTITY_IDS\":45,\"STYLECLASS\":46,\"style\":47,\"STYLE_ENTITY_IDS\":48,\"STYLE_DEFINITION_DATA\":49,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACELINE\",5:\"NL\",7:\"SPACE\",8:\"EOF\",10:\"BLOCK_DIAGRAM_KEY\",15:\"LINK\",16:\"START_LINK\",17:\"LINK_LABEL\",18:\"STR\",21:\"SPACE_BLOCK\",27:\"SIZE\",28:\"COLUMNS\",29:\"id-block\",30:\"end\",31:\"block\",32:\"NODE_ID\",35:\"DIR\",36:\"NODE_DSTART\",37:\"NODE_DEND\",38:\"BLOCK_ARROW_START\",39:\"BLOCK_ARROW_END\",40:\"classDef\",41:\"CLASSDEF_ID\",42:\"CLASSDEF_STYLEOPTS\",43:\"DEFAULT\",44:\"class\",45:\"CLASSENTITY_IDS\",46:\"STYLECLASS\",47:\"style\",48:\"STYLE_ENTITY_IDS\",49:\"STYLE_DEFINITION_DATA\"},\nproductions_: [0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 4:\nyy.getLogger().debug('Rule: separator (NL) ');\nbreak;\ncase 5:\nyy.getLogger().debug('Rule: separator (Space) ');\nbreak;\ncase 6:\nyy.getLogger().debug('Rule: separator (EOF) ');\nbreak;\ncase 7:\n yy.getLogger().debug(\"Rule: hierarchy: \", $$[$0-1]); yy.setHierarchy($$[$0-1]); \nbreak;\ncase 8:\nyy.getLogger().debug('Stop NL ');\nbreak;\ncase 9:\nyy.getLogger().debug('Stop EOF ');\nbreak;\ncase 10:\nyy.getLogger().debug('Stop NL2 ');\nbreak;\ncase 11:\nyy.getLogger().debug('Stop EOF2 ');\nbreak;\ncase 12:\n yy.getLogger().debug(\"Rule: statement: \", $$[$0]); typeof $$[$0].length === 'number'?this.$ = $$[$0]:this.$ = [$$[$0]]; \nbreak;\ncase 13:\n yy.getLogger().debug(\"Rule: statement #2: \", $$[$0-1]); this.$ = [$$[$0-1]].concat($$[$0]); \nbreak;\ncase 14:\n yy.getLogger().debug(\"Rule: link: \", $$[$0], yytext); this.$={edgeTypeStr: $$[$0], label:''}; \nbreak;\ncase 15:\n yy.getLogger().debug(\"Rule: LABEL link: \", $$[$0-3], $$[$0-1], $$[$0]); this.$={edgeTypeStr: $$[$0], label:$$[$0-1]}; \nbreak;\ncase 18:\n const num=parseInt($$[$0]); const spaceId = yy.generateId(); this.$ = { id: spaceId, type:'space', label:'', width: num, children: [] }\nbreak;\ncase 23:\n\n yy.getLogger().debug('Rule: (nodeStatement link node) ', $$[$0-2], $$[$0-1], $$[$0], ' typestr: ',$$[$0-1].edgeTypeStr);\n const edgeData = yy.edgeStrToEdgeData($$[$0-1].edgeTypeStr)\n this.$ = [\n {id: $$[$0-2].id, label: $$[$0-2].label, type:$$[$0-2].type, directions: $$[$0-2].directions},\n {id: $$[$0-2].id + '-' + $$[$0].id, start: $$[$0-2].id, end: $$[$0].id, label: $$[$0-1].label, type: 'edge', directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: 'arrow_open' },\n {id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions}\n ];\n \nbreak;\ncase 24:\n yy.getLogger().debug('Rule: nodeStatement (abc88 node size) ', $$[$0-1], $$[$0]); this.$ = {id: $$[$0-1].id, label: $$[$0-1].label, type: yy.typeStr2Type($$[$0-1].typeStr), directions: $$[$0-1].directions, widthInColumns: parseInt($$[$0],10)}; \nbreak;\ncase 25:\n yy.getLogger().debug('Rule: nodeStatement (node) ', $$[$0]); this.$ = {id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns:1}; \nbreak;\ncase 26:\n yy.getLogger().debug('APA123', this? this:'na'); yy.getLogger().debug(\"COLUMNS: \", $$[$0]); this.$ = {type: 'column-setting', columns: $$[$0] === 'auto'?-1:parseInt($$[$0]) } \nbreak;\ncase 27:\n yy.getLogger().debug('Rule: id-block statement : ', $$[$0-2], $$[$0-1]); const id2 = yy.generateId(); this.$ = { ...$$[$0-2], type:'composite', children: $$[$0-1] }; \nbreak;\ncase 28:\n yy.getLogger().debug('Rule: blockStatement : ', $$[$0-2], $$[$0-1], $$[$0]); const id = yy.generateId(); this.$ = { id, type:'composite', label:'', children: $$[$0-1] }; \nbreak;\ncase 29:\n yy.getLogger().debug(\"Rule: node (NODE_ID separator): \", $$[$0]); this.$ = { id: $$[$0] }; \nbreak;\ncase 30:\n\n yy.getLogger().debug(\"Rule: node (NODE_ID nodeShapeNLabel separator): \", $$[$0-1], $$[$0]);\n this.$ = { id: $$[$0-1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions };\n \nbreak;\ncase 31:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0]); this.$ = [$$[$0]]; \nbreak;\ncase 32:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0-1], $$[$0]); this.$ = [$$[$0-1]].concat($$[$0]); \nbreak;\ncase 33:\n yy.getLogger().debug(\"Rule: nodeShapeNLabel: \", $$[$0-2], $$[$0-1], $$[$0]); this.$ = { typeStr: $$[$0-2] + $$[$0], label: $$[$0-1] }; \nbreak;\ncase 34:\n yy.getLogger().debug(\"Rule: BLOCK_ARROW nodeShapeNLabel: \", $$[$0-3], $$[$0-2], \" #3:\",$$[$0-1], $$[$0]); this.$ = { typeStr: $$[$0-3] + $$[$0], label: $$[$0-2], directions: $$[$0-1]}; \nbreak;\ncase 35: case 36:\n\n this.$ = { type: 'classDef', id: $$[$0-1].trim(), css: $$[$0].trim() };\n \nbreak;\ncase 37:\n\n //log.debug('apply class: id(s): ',$$[$0-1], ' style class: ', $$[$0]);\n this.$={ type: 'applyClass', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 38:\n\n this.$={ type: 'applyStyles', id: $$[$0-1].trim(), stylesStr: $$[$0].trim() };\n \nbreak;\n}\n},\ntable: [{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{8:[1,20]},o($V8,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:$V0,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7}),o($V9,[2,16],{14:22,15:$Va,16:$Vb}),o($V9,[2,17]),o($V9,[2,18]),o($V9,[2,19]),o($V9,[2,20]),o($V9,[2,21]),o($V9,[2,22]),o($Vc,[2,25],{27:[1,25]}),o($V9,[2,26]),{19:26,26:12,32:$V4},{11:27,13:4,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},o($Vd,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},o($V8,[2,13]),{26:35,32:$V4},{32:[2,14]},{17:[1,36]},o($Vc,[2,24]),{11:37,13:4,14:22,15:$Va,16:$Vb,19:5,20:6,21:$V0,22:8,23:9,24:10,25:11,26:12,28:$V1,29:$V2,31:$V3,32:$V4,40:$V5,44:$V6,47:$V7},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},o($Vd,[2,30]),{18:[1,43]},{18:[1,44]},o($Vc,[2,23]),{18:[1,45]},{30:[1,46]},o($V9,[2,28]),o($V9,[2,35]),o($V9,[2,36]),o($V9,[2,37]),o($V9,[2,38]),{37:[1,47]},{34:48,35:$Ve},{15:[1,50]},o($V9,[2,27]),o($Vd,[2,33]),{39:[1,51]},{34:52,35:$Ve,39:[2,31]},{32:[2,15]},o($Vd,[2,34]),{39:[2,32]}],\ndefaultActions: {20:[2,7],23:[2,14],50:[2,15],52:[2,32]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: return 10; \nbreak;\ncase 1: yy.getLogger().debug('Found space-block'); return 31;\nbreak;\ncase 2: yy.getLogger().debug('Found nl-block'); return 31;\nbreak;\ncase 3: yy.getLogger().debug('Found space-block'); return 29;\nbreak;\ncase 4: yy.getLogger().debug('.', yy_.yytext); /* skip all whitespace */ \nbreak;\ncase 5:yy.getLogger().debug('_', yy_.yytext); /* skip all whitespace */ \nbreak;\ncase 6: return 5 \nbreak;\ncase 7: yy_.yytext=-1; return 28; \nbreak;\ncase 8: yy_.yytext = yy_.yytext.replace(/columns\\s+/,''); yy.getLogger().debug('COLUMNS (LEX)', yy_.yytext); return 28; \nbreak;\ncase 9: this.pushState(\"md_string\");\nbreak;\ncase 10: return \"MD_STR\";\nbreak;\ncase 11: this.popState();\nbreak;\ncase 12:this.pushState(\"string\");\nbreak;\ncase 13: yy.getLogger().debug('LEX: POPPING STR:', yy_.yytext);this.popState();\nbreak;\ncase 14: yy.getLogger().debug('LEX: STR end:', yy_.yytext); return \"STR\";\nbreak;\ncase 15: yy_.yytext = yy_.yytext.replace(/space\\:/,'');yy.getLogger().debug('SPACE NUM (LEX)', yy_.yytext); return 21; \nbreak;\ncase 16: yy_.yytext = '1'; yy.getLogger().debug('COLUMNS (LEX)', yy_.yytext); return 21; \nbreak;\ncase 17:return 43;\nbreak;\ncase 18:return 'LINKSTYLE';\nbreak;\ncase 19:return 'INTERPOLATE';\nbreak;\ncase 20: this.pushState('CLASSDEF'); return 40; \nbreak;\ncase 21: this.popState(); this.pushState('CLASSDEFID'); return 'DEFAULT_CLASSDEF_ID' \nbreak;\ncase 22: this.popState(); this.pushState('CLASSDEFID'); return 41 \nbreak;\ncase 23: this.popState(); return 42 \nbreak;\ncase 24: this.pushState('CLASS'); return 44; \nbreak;\ncase 25: this.popState(); this.pushState('CLASS_STYLE'); return 45 \nbreak;\ncase 26: this.popState(); return 46 \nbreak;\ncase 27: this.pushState('STYLE_STMNT'); return 47; \nbreak;\ncase 28: this.popState(); this.pushState('STYLE_DEFINITION'); return 48 \nbreak;\ncase 29: this.popState(); return 49 \nbreak;\ncase 30: this.pushState(\"acc_title\");return 'acc_title'; \nbreak;\ncase 31: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 32: this.pushState(\"acc_descr\");return 'acc_descr'; \nbreak;\ncase 33: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 34: this.pushState(\"acc_descr_multiline\");\nbreak;\ncase 35: this.popState(); \nbreak;\ncase 36:return \"acc_descr_multiline_value\";\nbreak;\ncase 37:return 30;\nbreak;\ncase 38: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 39: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 40: this.popState();yy.getLogger().debug('Lex: ))'); return \"NODE_DEND\"; \nbreak;\ncase 41: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 42: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 43: this.popState();yy.getLogger().debug('Lex: (-'); return \"NODE_DEND\"; \nbreak;\ncase 44: this.popState();yy.getLogger().debug('Lex: -)'); return \"NODE_DEND\"; \nbreak;\ncase 45: this.popState();yy.getLogger().debug('Lex: (('); return \"NODE_DEND\"; \nbreak;\ncase 46: this.popState();yy.getLogger().debug('Lex: ]]'); return \"NODE_DEND\"; \nbreak;\ncase 47: this.popState();yy.getLogger().debug('Lex: ('); return \"NODE_DEND\"; \nbreak;\ncase 48: this.popState();yy.getLogger().debug('Lex: ])'); return \"NODE_DEND\"; \nbreak;\ncase 49: this.popState();yy.getLogger().debug('Lex: /]'); return \"NODE_DEND\"; \nbreak;\ncase 50: this.popState();yy.getLogger().debug('Lex: /]'); return \"NODE_DEND\"; \nbreak;\ncase 51: this.popState();yy.getLogger().debug('Lex: )]'); return \"NODE_DEND\"; \nbreak;\ncase 52: this.popState();yy.getLogger().debug('Lex: )'); return \"NODE_DEND\"; \nbreak;\ncase 53: this.popState();yy.getLogger().debug('Lex: ]>'); return \"NODE_DEND\"; \nbreak;\ncase 54: this.popState();yy.getLogger().debug('Lex: ]'); return \"NODE_DEND\"; \nbreak;\ncase 55: yy.getLogger().debug('Lexa: -)'); this.pushState('NODE');return 36; \nbreak;\ncase 56: yy.getLogger().debug('Lexa: (-'); this.pushState('NODE');return 36; \nbreak;\ncase 57: yy.getLogger().debug('Lexa: ))'); this.pushState('NODE');return 36; \nbreak;\ncase 58: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 59: yy.getLogger().debug('Lex: ((('); this.pushState('NODE');return 36; \nbreak;\ncase 60: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 61: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 62: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 63: yy.getLogger().debug('Lexc: >'); this.pushState('NODE');return 36; \nbreak;\ncase 64: yy.getLogger().debug('Lexa: (['); this.pushState('NODE');return 36; \nbreak;\ncase 65: yy.getLogger().debug('Lexa: )'); this.pushState('NODE');return 36; \nbreak;\ncase 66: this.pushState('NODE');return 36; \nbreak;\ncase 67: this.pushState('NODE');return 36; \nbreak;\ncase 68: this.pushState('NODE');return 36; \nbreak;\ncase 69: this.pushState('NODE');return 36; \nbreak;\ncase 70: this.pushState('NODE');return 36; \nbreak;\ncase 71: this.pushState('NODE');return 36; \nbreak;\ncase 72: this.pushState('NODE');return 36; \nbreak;\ncase 73: yy.getLogger().debug('Lexa: ['); this.pushState('NODE');return 36; \nbreak;\ncase 74: this.pushState('BLOCK_ARROW');yy.getLogger().debug('LEX ARR START');return 38; \nbreak;\ncase 75: yy.getLogger().debug('Lex: NODE_ID', yy_.yytext);return 32; \nbreak;\ncase 76: yy.getLogger().debug('Lex: EOF', yy_.yytext);return 8; \nbreak;\ncase 77: this.pushState(\"md_string\");\nbreak;\ncase 78: this.pushState(\"md_string\");\nbreak;\ncase 79: return \"NODE_DESCR\";\nbreak;\ncase 80: this.popState();\nbreak;\ncase 81: yy.getLogger().debug('Lex: Starting string');this.pushState(\"string\");\nbreak;\ncase 82: yy.getLogger().debug('LEX ARR: Starting string');this.pushState(\"string\");\nbreak;\ncase 83: yy.getLogger().debug('LEX: NODE_DESCR:', yy_.yytext); return \"NODE_DESCR\";\nbreak;\ncase 84:yy.getLogger().debug('LEX POPPING');this.popState();\nbreak;\ncase 85: yy.getLogger().debug('Lex: =>BAE'); this.pushState('ARROW_DIR'); \nbreak;\ncase 86: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (right): dir:',yy_.yytext);return \"DIR\"; \nbreak;\ncase 87: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (left):',yy_.yytext);return \"DIR\"; \nbreak;\ncase 88: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (x):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 89: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (y):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 90: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (up):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 91: yy_.yytext = yy_.yytext.replace(/^,\\s*/, ''); yy.getLogger().debug('Lex (down):',yy_.yytext); return \"DIR\"; \nbreak;\ncase 92: yy_.yytext=']>';yy.getLogger().debug('Lex (ARROW_DIR end):',yy_.yytext);this.popState();this.popState();return \"BLOCK_ARROW_END\"; \nbreak;\ncase 93: yy.getLogger().debug('Lex: LINK', '#'+yy_.yytext+'#'); return 15; \nbreak;\ncase 94: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 95: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 96: yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 97: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 98: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 99: yy.getLogger().debug('Lex: START_LINK', yy_.yytext);this.pushState(\"LLABEL\");return 16; \nbreak;\ncase 100: this.pushState(\"md_string\");\nbreak;\ncase 101: yy.getLogger().debug('Lex: Starting string');this.pushState(\"string\"); return \"LINK_LABEL\";\nbreak;\ncase 102: this.popState(); yy.getLogger().debug('Lex: LINK', '#'+yy_.yytext+'#'); return 15; \nbreak;\ncase 103: this.popState(); yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 104: this.popState(); yy.getLogger().debug('Lex: LINK', yy_.yytext); return 15; \nbreak;\ncase 105: yy.getLogger().debug('Lex: COLON', yy_.yytext); yy_.yytext=yy_.yytext.slice(1);return 27; \nbreak;\n}\n},\nrules: [/^(?:block-beta\\b)/,/^(?:block\\s+)/,/^(?:block\\n+)/,/^(?:block:)/,/^(?:[\\s]+)/,/^(?:[\\n]+)/,/^(?:((\\u000D\\u000A)|(\\u000A)))/,/^(?:columns\\s+auto\\b)/,/^(?:columns\\s+[\\d]+)/,/^(?:[\"][`])/,/^(?:[^`\"]+)/,/^(?:[`][\"])/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:space[:]\\d+)/,/^(?:space\\b)/,/^(?:default\\b)/,/^(?:linkStyle\\b)/,/^(?:interpolate\\b)/,/^(?:classDef\\s+)/,/^(?:DEFAULT\\s+)/,/^(?:\\w+\\s+)/,/^(?:[^\\n]*)/,/^(?:class\\s+)/,/^(?:(\\w+)+((,\\s*\\w+)*))/,/^(?:[^\\n]*)/,/^(?:style\\s+)/,/^(?:(\\w+)+((,\\s*\\w+)*))/,/^(?:[^\\n]*)/,/^(?:accTitle\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*:\\s*)/,/^(?:(?!\\n||)*[^\\n]*)/,/^(?:accDescr\\s*\\{\\s*)/,/^(?:[\\}])/,/^(?:[^\\}]*)/,/^(?:end\\b\\s*)/,/^(?:\\(\\(\\()/,/^(?:\\)\\)\\))/,/^(?:[\\)]\\))/,/^(?:\\}\\})/,/^(?:\\})/,/^(?:\\(-)/,/^(?:-\\))/,/^(?:\\(\\()/,/^(?:\\]\\])/,/^(?:\\()/,/^(?:\\]\\))/,/^(?:\\\\\\])/,/^(?:\\/\\])/,/^(?:\\)\\])/,/^(?:[\\)])/,/^(?:\\]>)/,/^(?:[\\]])/,/^(?:-\\))/,/^(?:\\(-)/,/^(?:\\)\\))/,/^(?:\\))/,/^(?:\\(\\(\\()/,/^(?:\\(\\()/,/^(?:\\{\\{)/,/^(?:\\{)/,/^(?:>)/,/^(?:\\(\\[)/,/^(?:\\()/,/^(?:\\[\\[)/,/^(?:\\[\\|)/,/^(?:\\[\\()/,/^(?:\\)\\)\\))/,/^(?:\\[\\\\)/,/^(?:\\[\\/)/,/^(?:\\[\\\\)/,/^(?:\\[)/,/^(?:<\\[)/,/^(?:[^\\(\\[\\n\\-\\)\\{\\}\\s\\<\\>:]+)/,/^(?:$)/,/^(?:[\"][`])/,/^(?:[\"][`])/,/^(?:[^`\"]+)/,/^(?:[`][\"])/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]+)/,/^(?:[\"])/,/^(?:\\]>\\s*\\()/,/^(?:,?\\s*right\\s*)/,/^(?:,?\\s*left\\s*)/,/^(?:,?\\s*x\\s*)/,/^(?:,?\\s*y\\s*)/,/^(?:,?\\s*up\\s*)/,/^(?:,?\\s*down\\s*)/,/^(?:\\)\\s*)/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?:\\s*~~[\\~]+\\s*)/,/^(?:\\s*[xo<]?--\\s*)/,/^(?:\\s*[xo<]?==\\s*)/,/^(?:\\s*[xo<]?-\\.\\s*)/,/^(?:[\"][`])/,/^(?:[\"])/,/^(?:\\s*[xo<]?--+[-xo>]\\s*)/,/^(?:\\s*[xo<]?==+[=xo>]\\s*)/,/^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/,/^(?::\\d+)/],\nconditions: {\"STYLE_DEFINITION\":{\"rules\":[29],\"inclusive\":false},\"STYLE_STMNT\":{\"rules\":[28],\"inclusive\":false},\"CLASSDEFID\":{\"rules\":[23],\"inclusive\":false},\"CLASSDEF\":{\"rules\":[21,22],\"inclusive\":false},\"CLASS_STYLE\":{\"rules\":[26],\"inclusive\":false},\"CLASS\":{\"rules\":[25],\"inclusive\":false},\"LLABEL\":{\"rules\":[100,101,102,103,104],\"inclusive\":false},\"ARROW_DIR\":{\"rules\":[86,87,88,89,90,91,92],\"inclusive\":false},\"BLOCK_ARROW\":{\"rules\":[77,82,85],\"inclusive\":false},\"NODE\":{\"rules\":[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],\"inclusive\":false},\"md_string\":{\"rules\":[10,11,79,80],\"inclusive\":false},\"space\":{\"rules\":[],\"inclusive\":false},\"string\":{\"rules\":[13,14,83,84],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[35,36],\"inclusive\":false},\"acc_descr\":{\"rules\":[33],\"inclusive\":false},\"acc_title\":{\"rules\":[31],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})(); \n\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "import clone from 'lodash-es/clone.js';\nimport * as configApi from '../../config.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramDB } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport { clear as commonClear } from '../common/commonDb.js';\nimport type { Block, ClassDef } from './blockTypes.js';\n\n// Initialize the node database for simple lookups\nlet blockDatabase = new Map();\nlet edgeList: Block[] = [];\nlet edgeCount = new Map();\n\nconst COLOR_KEYWORD = 'color';\nconst FILL_KEYWORD = 'fill';\nconst BG_FILL = 'bgFill';\nconst STYLECLASS_SEP = ',';\nconst config = getConfig();\n\nlet classes = new Map();\n\nconst sanitizeText = (txt: string) => common.sanitizeText(txt, config);\n\n/**\n * Called when the parser comes across a (style) class definition\n * @example classDef my-style fill:#f96;\n *\n * @param id - the id of this (style) class\n * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyleClass = function (id: string, styleAttributes = '') {\n // create a new style class object with this id\n let foundClass = classes.get(id);\n if (!foundClass) {\n foundClass = { id: id, styles: [], textStyles: [] };\n classes.set(id, foundClass); // This is a classDef\n }\n if (styleAttributes !== undefined && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n // remove any trailing ;\n const fixedAttrib = attrib.replace(/([^;]*);/, '$1').trim();\n\n // replace some style keywords\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n};\n\n/**\n * Called when the parser comes across a style definition\n * @example style my-block-id fill:#f96;\n *\n * @param id - the id of the block to style\n * @param styles - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyle2Node = function (id: string, styles = '') {\n const foundBlock = blockDatabase.get(id)!;\n if (styles !== undefined && styles !== null) {\n foundBlock.styles = styles.split(STYLECLASS_SEP);\n }\n};\n\n/**\n * Add a CSS/style class to the block with the given id.\n * If the block isn't already in the list of known blocks, add it.\n * Might be called by parser when a CSS/style class should be applied to a block\n *\n * @param itemIds - The id or a list of ids of the item(s) to apply the css class to\n * @param cssClassName - CSS class name\n */\nexport const setCssClass = function (itemIds: string, cssClassName: string) {\n itemIds.split(',').forEach(function (id: string) {\n let foundBlock = blockDatabase.get(id);\n if (foundBlock === undefined) {\n const trimmedId = id.trim();\n foundBlock = { id: trimmedId, type: 'na', children: [] } as Block;\n blockDatabase.set(trimmedId, foundBlock);\n }\n if (!foundBlock.classes) {\n foundBlock.classes = [];\n }\n foundBlock.classes.push(cssClassName);\n });\n};\n\nconst populateBlockDatabase = (_blockList: Block[], parent: Block): void => {\n const blockList = _blockList.flat();\n const children = [];\n for (const block of blockList) {\n if (block.label) {\n block.label = sanitizeText(block.label);\n }\n if (block.type === 'classDef') {\n addStyleClass(block.id, block.css);\n continue;\n }\n if (block.type === 'applyClass') {\n setCssClass(block.id, block?.styleClass ?? '');\n continue;\n }\n if (block.type === 'applyStyles') {\n if (block?.stylesStr) {\n addStyle2Node(block.id, block?.stylesStr);\n }\n continue;\n }\n if (block.type === 'column-setting') {\n parent.columns = block.columns ?? -1;\n } else if (block.type === 'edge') {\n const count = (edgeCount.get(block.id) ?? 0) + 1;\n edgeCount.set(block.id, count);\n block.id = count + '-' + block.id;\n edgeList.push(block);\n } else {\n if (!block.label) {\n if (block.type === 'composite') {\n block.label = '';\n // log.debug('abc89 composite', block);\n } else {\n block.label = block.id;\n }\n }\n const existingBlock = blockDatabase.get(block.id);\n\n if (existingBlock === undefined) {\n blockDatabase.set(block.id, block);\n } else {\n // Add newer relevant data to aggregated node\n if (block.type !== 'na') {\n existingBlock.type = block.type;\n }\n if (block.label !== block.id) {\n existingBlock.label = block.label;\n }\n }\n\n if (block.children) {\n populateBlockDatabase(block.children, block);\n }\n if (block.type === 'space') {\n // log.debug('abc95 space', block);\n const w = block.width ?? 1;\n for (let j = 0; j < w; j++) {\n const newBlock = clone(block);\n newBlock.id = newBlock.id + '-' + j;\n blockDatabase.set(newBlock.id, newBlock);\n children.push(newBlock);\n }\n } else if (existingBlock === undefined) {\n children.push(block);\n }\n }\n }\n parent.children = children;\n};\n\nlet blocks: Block[] = [];\nlet rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;\n\nconst clear = (): void => {\n log.debug('Clear called');\n commonClear();\n rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;\n blockDatabase = new Map([['root', rootBlock]]);\n blocks = [];\n classes = new Map();\n\n edgeList = [];\n edgeCount = new Map();\n};\n\nexport function typeStr2Type(typeStr: string) {\n log.debug('typeStr2Type', typeStr);\n switch (typeStr) {\n case '[]':\n return 'square';\n case '()':\n log.debug('we have a round');\n return 'round';\n case '(())':\n return 'circle';\n case '>]':\n return 'rect_left_inv_arrow';\n case '{}':\n return 'diamond';\n case '{{}}':\n return 'hexagon';\n case '([])':\n return 'stadium';\n case '[[]]':\n return 'subroutine';\n case '[()]':\n return 'cylinder';\n case '((()))':\n return 'doublecircle';\n case '[//]':\n return 'lean_right';\n case '[\\\\\\\\]':\n return 'lean_left';\n case '[/\\\\]':\n return 'trapezoid';\n case '[\\\\/]':\n return 'inv_trapezoid';\n case '<[]>':\n return 'block_arrow';\n default:\n return 'na';\n }\n}\n\nexport function edgeTypeStr2Type(typeStr: string): string {\n log.debug('typeStr2Type', typeStr);\n switch (typeStr) {\n case '==':\n return 'thick';\n default:\n return 'normal';\n }\n}\n\nexport function edgeStrToEdgeData(typeStr: string): string {\n switch (typeStr.trim()) {\n case '--x':\n return 'arrow_cross';\n case '--o':\n return 'arrow_circle';\n default:\n return 'arrow_point';\n }\n}\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\nconst setHierarchy = (block: Block[]): void => {\n rootBlock.children = block;\n populateBlockDatabase(block, rootBlock);\n blocks = rootBlock.children;\n};\n\nconst getColumns = (blockId: string): number => {\n const block = blockDatabase.get(blockId);\n if (!block) {\n return -1;\n }\n if (block.columns) {\n return block.columns;\n }\n if (!block.children) {\n return -1;\n }\n return block.children.length;\n};\n\n/**\n * Returns all the blocks as a flat array\n * @returns\n */\nconst getBlocksFlat = () => {\n return [...blockDatabase.values()];\n};\n/**\n * Returns the hierarchy of blocks\n * @returns\n */\nconst getBlocks = () => {\n return blocks || [];\n};\n\nconst getEdges = () => {\n return edgeList;\n};\nconst getBlock = (id: string) => {\n return blockDatabase.get(id);\n};\n\nconst setBlock = (block: Block) => {\n blockDatabase.set(block.id, block);\n};\n\nconst getLogger = () => console;\n\n/**\n * Return all of the style classes\n */\nexport const getClasses = function () {\n return classes;\n};\n\nconst db = {\n getConfig: () => configApi.getConfig().block,\n typeStr2Type: typeStr2Type,\n edgeTypeStr2Type: edgeTypeStr2Type,\n edgeStrToEdgeData,\n getLogger,\n getBlocksFlat,\n getBlocks,\n getEdges,\n setHierarchy,\n getBlock,\n setBlock,\n getColumns,\n getClasses,\n clear,\n generateId,\n} as const;\n\nexport type BlockDB = typeof db & DiagramDB;\nexport default db;\n", "import * as khroma from 'khroma';\n\n/** Returns the styles given options */\nexport interface BlockChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst fade = (color: string, opacity: number) => {\n // @ts-ignore TODO: incorrect types from khroma\n const channel = khroma.channel;\n\n const r = channel(color, 'r');\n const g = channel(color, 'g');\n const b = channel(color, 'b');\n\n // @ts-ignore incorrect types from khroma\n return khroma.rgba(r, g, b, opacity);\n};\n\nconst getStyles = (options: BlockChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span,p {\n color: ${options.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground, 0.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${fade(options.mainBkg, 0.5)};\n fill: ${fade(options.clusterBkg, 0.5)};\n stroke: ${fade(options.clusterBorder, 0.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span,p {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n", "import type { BlockDB } from './blockDB.js';\nimport type { Block } from './blockTypes.js';\nimport { log } from '../../logger.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\n// TODO: This means the number we provide in diagram's config will never be used. Should fix.\nconst padding = getConfig()?.block?.padding ?? 8;\n\ninterface BlockPosition {\n px: number;\n py: number;\n}\n\nexport function calculateBlockPosition(columns: number, position: number): BlockPosition {\n // log.debug('calculateBlockPosition abc89', columns, position);\n // Ensure that columns is a positive integer\n if (columns === 0 || !Number.isInteger(columns)) {\n throw new Error('Columns must be an integer !== 0.');\n }\n\n // Ensure that position is a non-negative integer\n if (position < 0 || !Number.isInteger(position)) {\n throw new Error('Position must be a non-negative integer.' + position);\n }\n\n if (columns < 0) {\n // Auto columns is set\n return { px: position, py: 0 };\n }\n if (columns === 1) {\n // Auto columns is set\n return { px: 0, py: position };\n }\n // Calculate posX and posY\n const px = position % columns;\n const py = Math.floor(position / columns);\n // log.debug('calculateBlockPosition abc89', columns, position, '=> (', px, py, ')');\n return { px, py };\n}\n\nconst getMaxChildSize = (block: Block) => {\n let maxWidth = 0;\n let maxHeight = 0;\n // find max width of children\n // log.debug('getMaxChildSize abc95 (start) parent:', block.id);\n for (const child of block.children) {\n const { width, height, x, y } = child.size ?? { width: 0, height: 0, x: 0, y: 0 };\n log.debug(\n 'getMaxChildSize abc95 child:',\n child.id,\n 'width:',\n width,\n 'height:',\n height,\n 'x:',\n x,\n 'y:',\n y,\n child.type\n );\n if (child.type === 'space') {\n continue;\n }\n if (width > maxWidth) {\n maxWidth = width / (block.widthInColumns ?? 1);\n }\n if (height > maxHeight) {\n maxHeight = height;\n }\n }\n return { width: maxWidth, height: maxHeight };\n};\n\nfunction setBlockSizes(block: Block, db: BlockDB, siblingWidth = 0, siblingHeight = 0) {\n log.debug(\n 'setBlockSizes abc95 (start)',\n block.id,\n block?.size?.x,\n 'block width =',\n block?.size,\n 'sieblingWidth',\n siblingWidth\n );\n if (!block?.size?.width) {\n block.size = {\n width: siblingWidth,\n height: siblingHeight,\n x: 0,\n y: 0,\n };\n }\n let maxWidth = 0;\n let maxHeight = 0;\n\n if (block.children?.length > 0) {\n for (const child of block.children) {\n setBlockSizes(child, db);\n }\n // find max width of children\n const childSize = getMaxChildSize(block);\n maxWidth = childSize.width;\n maxHeight = childSize.height;\n log.debug('setBlockSizes abc95 maxWidth of', block.id, ':s children is ', maxWidth, maxHeight);\n\n // set width of block to max width of children\n for (const child of block.children) {\n if (child.size) {\n log.debug(\n `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`\n );\n child.size.width =\n maxWidth * (child.widthInColumns ?? 1) + padding * ((child.widthInColumns ?? 1) - 1);\n child.size.height = maxHeight;\n child.size.x = 0;\n child.size.y = 0;\n\n log.debug(\n `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`\n );\n }\n }\n for (const child of block.children) {\n setBlockSizes(child, db, maxWidth, maxHeight);\n }\n\n const columns = block.columns ?? -1;\n let numItems = 0;\n for (const child of block.children) {\n numItems += child.widthInColumns ?? 1;\n }\n\n // The width and height in number blocks\n let xSize = block.children.length;\n if (columns > 0 && columns < numItems) {\n xSize = columns;\n }\n\n const ySize = Math.ceil(numItems / xSize);\n\n let width = xSize * (maxWidth + padding) + padding;\n let height = ySize * (maxHeight + padding) + padding;\n // If maxWidth\n if (width < siblingWidth) {\n log.debug(\n `Detected to small siebling: abc95 ${block.id} sieblingWidth ${siblingWidth} sieblingHeight ${siblingHeight} width ${width}`\n );\n width = siblingWidth;\n height = siblingHeight;\n const childWidth = (siblingWidth - xSize * padding - padding) / xSize;\n const childHeight = (siblingHeight - ySize * padding - padding) / ySize;\n // cspell:ignore indata\n log.debug('Size indata abc88', block.id, 'childWidth', childWidth, 'maxWidth', maxWidth);\n log.debug('Size indata abc88', block.id, 'childHeight', childHeight, 'maxHeight', maxHeight);\n log.debug('Size indata abc88 xSize', xSize, 'padding', padding);\n\n // set width of block to max width of children\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n child.size.height = childHeight;\n child.size.x = 0;\n child.size.y = 0;\n }\n }\n }\n\n log.debug(\n `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${\n block.children.length\n } width=${Math.max(width, block.size?.width || 0)}`\n );\n if (width < (block?.size?.width || 0)) {\n width = block?.size?.width || 0;\n\n // Grow children to fit\n const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length;\n if (num > 0) {\n const childWidth = (width - num * padding - padding) / num;\n log.debug('abc95 (growing to fit) width', block.id, width, block.size?.width, childWidth);\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n }\n }\n }\n }\n block.size = {\n width,\n height,\n x: 0,\n y: 0,\n };\n }\n\n log.debug(\n 'setBlockSizes abc94 (done)',\n block.id,\n block?.size?.x,\n block?.size?.width,\n block?.size?.y,\n block?.size?.height\n );\n}\n\nfunction layoutBlocks(block: Block, db: BlockDB) {\n log.debug(\n `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n const columns = block.columns ?? -1;\n log.debug('layoutBlocks columns abc95', block.id, '=>', columns, block);\n if (\n block.children && // find max width of children\n block.children.length > 0\n ) {\n const width = block?.children[0]?.size?.width ?? 0;\n const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding;\n\n log.debug('widthOfChildren 88', widthOfChildren, 'posX');\n\n // let first = true;\n let columnPos = 0;\n log.debug('abc91 block?.size?.x', block.id, block?.size?.x);\n let startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n let rowPos = 0;\n for (const child of block.children) {\n const parent = block;\n\n if (!child.size) {\n continue;\n }\n const { width, height } = child.size;\n const { px, py } = calculateBlockPosition(columns, columnPos);\n if (py != rowPos) {\n rowPos = py;\n startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n log.debug('New row in layout for block', block.id, ' and child ', child.id, rowPos);\n }\n log.debug(\n `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${parent?.size?.x},${parent?.size?.y}) parent: ${parent.id} width: ${width}${padding}`\n );\n if (parent.size) {\n const halfWidth = width / 2;\n child.size.x = startingPosX + padding + halfWidth;\n\n // cspell:ignore pyid\n log.debug(\n `abc91 layout blocks (calc) px, pyid:${\n child.id\n } startingPos=X${startingPosX} new startingPosX${\n child.size.x\n } ${halfWidth} padding=${padding} width=${width} halfWidth=${halfWidth} => x:${\n child.size.x\n } y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${\n (width * (child?.widthInColumns ?? 1)) / 2\n }`\n );\n\n startingPosX = child.size.x + halfWidth;\n\n child.size.y =\n parent.size.y - parent.size.height / 2 + py * (height + padding) + height / 2 + padding;\n\n log.debug(\n `abc88 layout blocks (calc) px, pyid:${\n child.id\n }startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${\n child.widthInColumns\n }(width * (child?.w || 1)) / 2${(width * (child?.widthInColumns ?? 1)) / 2}`\n );\n }\n if (child.children) {\n layoutBlocks(child, db);\n }\n columnPos += child?.widthInColumns ?? 1;\n log.debug('abc88 columnsPos', child, columnPos);\n }\n }\n log.debug(\n `layout blocks (<==layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n}\n\nfunction findBounds(\n block: Block,\n { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }\n) {\n if (block.size && block.id !== 'root') {\n const { x, y, width, height } = block.size;\n if (x - width / 2 < minX) {\n minX = x - width / 2;\n }\n if (y - height / 2 < minY) {\n minY = y - height / 2;\n }\n if (x + width / 2 > maxX) {\n maxX = x + width / 2;\n }\n if (y + height / 2 > maxY) {\n maxY = y + height / 2;\n }\n }\n if (block.children) {\n for (const child of block.children) {\n ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY }));\n }\n }\n return { minX, minY, maxX, maxY };\n}\n\nexport function layout(db: BlockDB) {\n const root = db.getBlock('root');\n if (!root) {\n return;\n }\n\n setBlockSizes(root, db, 0, 0);\n layoutBlocks(root, db);\n // Position blocks relative to parents\n // positionBlock(root, root, db);\n log.debug('getBlocks', JSON.stringify(root, null, 2));\n\n const { minX, minY, maxX, maxY } = findBounds(root);\n\n const height = maxY - minY;\n const width = maxX - minX;\n return { x: minX, y: minY, width, height };\n}\n", "import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { getConfig } from '../../config.js';\nimport { insertEdge, insertEdgeLabel, positionEdgeLabel } from '../../dagre-wrapper/edges.js';\nimport { insertNode, positionNode } from '../../dagre-wrapper/nodes.js';\nimport { getStylesFromArray } from '../../utils.js';\nimport type { BlockDB } from './blockDB.js';\nimport type { Block } from './blockTypes.js';\n\nfunction getNodeFromBlock(block: Block, db: BlockDB, positioned = false) {\n const vertex = block;\n\n let classStr = 'default';\n if ((vertex?.classes?.length || 0) > 0) {\n classStr = (vertex?.classes ?? []).join(' ');\n }\n classStr = classStr + ' flowchart-label';\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let radius = 0;\n let shape = '';\n let padding;\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radius = 5;\n shape = 'rect';\n break;\n case 'composite':\n radius = 0;\n shape = 'composite';\n padding = 0;\n break;\n case 'square':\n shape = 'rect';\n break;\n case 'diamond':\n shape = 'question';\n break;\n case 'hexagon':\n shape = 'hexagon';\n break;\n case 'block_arrow':\n shape = 'block_arrow';\n break;\n case 'odd':\n shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n shape = 'lean_right';\n break;\n case 'lean_left':\n shape = 'lean_left';\n break;\n case 'trapezoid':\n shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n shape = 'inv_trapezoid';\n break;\n case 'rect_left_inv_arrow':\n shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n shape = 'circle';\n break;\n case 'ellipse':\n shape = 'ellipse';\n break;\n case 'stadium':\n shape = 'stadium';\n break;\n case 'subroutine':\n shape = 'subroutine';\n break;\n case 'cylinder':\n shape = 'cylinder';\n break;\n case 'group':\n shape = 'rect';\n break;\n case 'doublecircle':\n shape = 'doublecircle';\n break;\n default:\n shape = 'rect';\n }\n\n const styles = getStylesFromArray(vertex?.styles ?? []);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n const vertexText = vertex.label;\n\n const bounds = vertex.size ?? { width: 0, height: 0, x: 0, y: 0 };\n // Add the node\n const node = {\n labelStyle: styles.labelStyle,\n shape: shape,\n labelText: vertexText,\n rx: radius,\n ry: radius,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n directions: vertex.directions,\n width: bounds.width,\n height: bounds.height,\n x: bounds.x,\n y: bounds.y,\n positioned,\n intersect: undefined,\n type: vertex.type,\n padding: padding ?? getConfig()?.block?.padding ?? 0,\n };\n return node;\n}\nasync function calculateBlockSize(\n elem: d3.Selection,\n block: any,\n db: any\n) {\n const node = getNodeFromBlock(block, db, false);\n if (node.type === 'group') {\n return;\n }\n\n // Add the element to the DOM to size it\n const nodeEl = await insertNode(elem, node);\n const boundingBox = nodeEl.node().getBBox();\n const obj = db.getBlock(node.id);\n obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl };\n db.setBlock(obj);\n nodeEl.remove();\n}\ntype ActionFun = typeof calculateBlockSize;\n\nexport async function insertBlockPositioned(elem: any, block: Block, db: any) {\n const node = getNodeFromBlock(block, db, true);\n // Add the element to the DOM to size it\n const obj = db.getBlock(node.id);\n if (obj.type !== 'space') {\n await insertNode(elem, node);\n block.intersect = node?.intersect;\n positionNode(node);\n }\n}\n\nexport async function performOperations(\n elem: d3.Selection,\n blocks: Block[],\n db: BlockDB,\n operation: ActionFun\n) {\n for (const block of blocks) {\n await operation(elem, block, db);\n if (block.children) {\n await performOperations(elem, block.children, db, operation);\n }\n }\n}\n\nexport async function calculateBlockSizes(elem: any, blocks: Block[], db: BlockDB) {\n await performOperations(elem, blocks, db, calculateBlockSize);\n}\n\nexport async function insertBlocks(\n elem: d3.Selection,\n blocks: Block[],\n db: BlockDB\n) {\n await performOperations(elem, blocks, db, insertBlockPositioned);\n}\n\nexport async function insertEdges(\n elem: any,\n edges: Block[],\n blocks: Block[],\n db: BlockDB,\n id: string\n) {\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n });\n g.setGraph({\n rankdir: 'TB',\n nodesep: 10,\n ranksep: 10,\n marginx: 8,\n marginy: 8,\n });\n\n for (const block of blocks) {\n if (block.size) {\n g.setNode(block.id, {\n width: block.size.width,\n height: block.size.height,\n intersect: block.intersect,\n });\n }\n }\n\n for (const edge of edges) {\n // elem, e, edge, clusterDb, diagramType, graph;\n if (edge.start && edge.end) {\n const startBlock = db.getBlock(edge.start);\n const endBlock = db.getBlock(edge.end);\n\n if (startBlock?.size && endBlock?.size) {\n const start = startBlock.size;\n const end = endBlock.size;\n const points = [\n { x: start.x, y: start.y },\n { x: start.x + (end.x - start.x) / 2, y: start.y + (end.y - start.y) / 2 },\n { x: end.x, y: end.y },\n ];\n // edge.points = points;\n insertEdge(\n elem,\n { v: edge.start, w: edge.end, name: edge.id },\n {\n ...edge,\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: 'edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1',\n },\n undefined,\n 'block',\n g,\n id\n );\n if (edge.label) {\n await insertEdgeLabel(elem, {\n ...edge,\n label: edge.label,\n labelStyle: 'stroke: #333; stroke-width: 1.5px;fill:none;',\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: 'edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1',\n });\n positionEdgeLabel(\n { ...edge, x: points[1].x, y: points[1].y },\n {\n originalPath: points,\n }\n );\n }\n }\n }\n }\n}\n", "import { select as d3select } from 'd3';\nimport type { Diagram } from '../../Diagram.js';\nimport * as configApi from '../../config.js';\nimport insertMarkers from '../../dagre-wrapper/markers.js';\nimport { log } from '../../logger.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\nimport type { BlockDB } from './blockDB.js';\nimport { layout } from './layout.js';\nimport { calculateBlockSizes, insertBlocks, insertEdges } from './renderHelpers.js';\n\nexport const getClasses = function (text: any, diagObj: any) {\n return diagObj.db.getClasses();\n};\n\nexport const draw = async function (\n text: string,\n id: string,\n _version: string,\n diagObj: Diagram\n): Promise {\n const { securityLevel, block: conf } = configApi.getConfig();\n const db = diagObj.db as BlockDB;\n let sandboxElement: any;\n if (securityLevel === 'sandbox') {\n sandboxElement = d3select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? d3select(sandboxElement.nodes()[0].contentDocument.body)\n : d3select('body');\n\n const svg =\n securityLevel === 'sandbox'\n ? root.select(`[id=\"${id}\"]`)\n : d3select(`[id=\"${id}\"]`);\n\n // Define the supported markers for the diagram\n const markers = ['point', 'circle', 'cross'];\n\n // Add the marker definitions to the svg as marker tags\n insertMarkers(svg, markers, diagObj.type, id);\n\n const bl = db.getBlocks();\n const blArr = db.getBlocksFlat();\n const edges = db.getEdges();\n\n const nodes = svg.insert('g').attr('class', 'block');\n await calculateBlockSizes(nodes, bl, db);\n const bounds = layout(db);\n await insertBlocks(nodes, bl, db);\n await insertEdges(nodes, edges, blArr, db, id);\n\n // Establish svg dimensions and get width and height\n // Why, oh why ????\n if (bounds) {\n const bounds2 = bounds;\n const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height)));\n const height = bounds2.height + magicFactor + 10;\n const width = bounds2.width + 10;\n const { useMaxWidth } = conf!;\n configureSvgSize(svg, height, width, !!useMaxWidth);\n log.debug('Here Bounds', bounds, bounds2);\n svg.attr(\n 'viewBox',\n `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}`\n );\n }\n};\n\nexport default {\n draw,\n getClasses,\n};\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\n// @ts-ignore: jison doesn't export types\nimport parser from './parser/block.jison';\nimport db from './blockDB.js';\nimport flowStyles from './styles.js';\nimport renderer from './blockRenderer.js';\n\nexport const diagram: DiagramDefinition = {\n parser,\n db,\n renderer,\n styles: flowStyles,\n};\n", "/**\n * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid\n * functionality and to render the diagrams to svg code!\n */\nimport { dedent } from 'ts-dedent';\nimport type { MermaidConfig } from './config.type.js';\nimport { detectType, registerLazyLoadedDiagrams } from './diagram-api/detectType.js';\nimport { addDiagrams } from './diagram-api/diagram-orchestration.js';\nimport { loadRegisteredDiagrams } from './diagram-api/loadDiagram.js';\nimport type { ExternalDiagramDefinition, SVG, SVGGroup } from './diagram-api/types.js';\nimport type { ParseErrorFunction } from './Diagram.js';\nimport type { UnknownDiagramError } from './errors.js';\nimport type { InternalHelpers } from './internals.js';\nimport { log } from './logger.js';\nimport { mermaidAPI } from './mermaidAPI.js';\nimport type { LayoutLoaderDefinition, RenderOptions } from './rendering-util/render.js';\nimport { registerLayoutLoaders } from './rendering-util/render.js';\nimport type { LayoutData } from './rendering-util/types.js';\nimport type { ParseOptions, ParseResult, RenderResult } from './types.js';\nimport type { DetailedError } from './utils.js';\nimport utils, { isDetailedError } from './utils.js';\n\nexport type {\n DetailedError,\n ExternalDiagramDefinition,\n InternalHelpers,\n LayoutData,\n LayoutLoaderDefinition,\n MermaidConfig,\n ParseErrorFunction,\n ParseOptions,\n ParseResult,\n RenderOptions,\n RenderResult,\n SVG,\n SVGGroup,\n UnknownDiagramError,\n};\n\nexport interface RunOptions {\n /**\n * The query selector to use when finding elements to render. Default: `\".mermaid\"`.\n */\n querySelector?: string;\n /**\n * The nodes to render. If this is set, `querySelector` will be ignored.\n */\n nodes?: ArrayLike;\n /**\n * A callback to call after each diagram is rendered.\n */\n postRenderCallback?: (id: string) => unknown;\n /**\n * If `true`, errors will be logged to the console, but not thrown. Default: `false`\n */\n suppressErrors?: boolean;\n}\n\nconst handleError = (error: unknown, errors: DetailedError[], parseError?: ParseErrorFunction) => {\n log.warn(error);\n if (isDetailedError(error)) {\n // handle case where error string and hash were\n // wrapped in object like`const error = { str, hash };`\n if (parseError) {\n parseError(error.str, error.hash);\n }\n errors.push({ ...error, message: error.str, error });\n } else {\n // assume it is just error string and pass it on\n if (parseError) {\n parseError(error);\n }\n if (error instanceof Error) {\n errors.push({\n str: error.message,\n message: error.message,\n hash: error.name,\n error,\n });\n }\n }\n};\n\n/**\n * ## run\n *\n * Function that goes through the document to find the chart definitions in there and render them.\n *\n * The function tags the processed attributes with the attribute data-processed and ignores found\n * elements with the attribute already set. This way the init function can be triggered several\n * times.\n *\n * ```mermaid\n * graph LR;\n * a(Find elements)-->b{Processed}\n * b-->|Yes|c(Leave element)\n * b-->|No |d(Transform)\n * ```\n *\n * Renders the mermaid diagrams\n *\n * @param options - Optional runtime configs\n */\nconst run = async function (\n options: RunOptions = {\n querySelector: '.mermaid',\n }\n) {\n try {\n await runThrowsErrors(options);\n } catch (e) {\n if (isDetailedError(e)) {\n log.error(e.str);\n }\n if (mermaid.parseError) {\n mermaid.parseError(e as string);\n }\n if (!options.suppressErrors) {\n log.error('Use the suppressErrors option to suppress these errors');\n throw e;\n }\n }\n};\n\nconst runThrowsErrors = async function (\n { postRenderCallback, querySelector, nodes }: Omit = {\n querySelector: '.mermaid',\n }\n) {\n const conf = mermaidAPI.getConfig();\n\n log.debug(`${!postRenderCallback ? 'No ' : ''}Callback function found`);\n\n let nodesToProcess: ArrayLike;\n if (nodes) {\n nodesToProcess = nodes;\n } else if (querySelector) {\n nodesToProcess = document.querySelectorAll(querySelector);\n } else {\n throw new Error('Nodes and querySelector are both undefined');\n }\n\n log.debug(`Found ${nodesToProcess.length} diagrams`);\n if (conf?.startOnLoad !== undefined) {\n log.debug('Start On Load: ' + conf?.startOnLoad);\n mermaidAPI.updateSiteConfig({ startOnLoad: conf?.startOnLoad });\n }\n\n // generate the id of the diagram\n const idGenerator = new utils.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed);\n\n let txt: string;\n const errors: DetailedError[] = [];\n\n // element is the current div with mermaid class\n // eslint-disable-next-line unicorn/prefer-spread\n for (const element of Array.from(nodesToProcess)) {\n log.info('Rendering diagram: ' + element.id);\n /*! Check if previously processed */\n if (element.getAttribute('data-processed')) {\n continue;\n }\n element.setAttribute('data-processed', 'true');\n\n const id = `mermaid-${idGenerator.next()}`;\n\n // Fetch the graph definition including tags\n txt = element.innerHTML;\n\n // transforms the html to pure text\n txt = dedent(utils.entityDecode(txt)) // removes indentation, required for YAML parsing\n .trim()\n .replace(//gi, '
    ');\n\n const init = utils.detectInit(txt);\n if (init) {\n log.debug('Detected early reinit: ', init);\n }\n try {\n const { svg, bindFunctions } = await render(id, txt, element);\n element.innerHTML = svg;\n if (postRenderCallback) {\n await postRenderCallback(id);\n }\n if (bindFunctions) {\n bindFunctions(element);\n }\n } catch (error) {\n handleError(error, errors, mermaid.parseError);\n }\n }\n if (errors.length > 0) {\n // TODO: We should be throwing an error object.\n throw errors[0];\n }\n};\n\n/**\n * Used to set configurations for mermaid.\n * This function should be called before the run function.\n * @param config - Configuration object for mermaid.\n */\n\nconst initialize = function (config: MermaidConfig) {\n mermaidAPI.initialize(config);\n};\n\n/**\n * ## init\n *\n * @deprecated Use {@link initialize} and {@link run} instead.\n *\n * Renders the mermaid diagrams\n *\n * @param config - **Deprecated**, please set configuration in {@link initialize}.\n * @param nodes - **Default**: `.mermaid`. One of the following:\n * - A DOM Node\n * - An array of DOM nodes (as would come from a jQuery selector)\n * - A W3C selector, a la `.mermaid`\n * @param callback - Called once for each rendered diagram's id.\n */\nconst init = async function (\n config?: MermaidConfig,\n nodes?: string | HTMLElement | NodeListOf,\n callback?: (id: string) => unknown\n) {\n log.warn('mermaid.init is deprecated. Please use run instead.');\n if (config) {\n initialize(config);\n }\n const runOptions: RunOptions = { postRenderCallback: callback, querySelector: '.mermaid' };\n if (typeof nodes === 'string') {\n runOptions.querySelector = nodes;\n } else if (nodes) {\n if (nodes instanceof HTMLElement) {\n runOptions.nodes = [nodes];\n } else {\n runOptions.nodes = nodes;\n }\n }\n await run(runOptions);\n};\n\n/**\n * Used to register external diagram types.\n * @param diagrams - Array of {@link ExternalDiagramDefinition}.\n * @param opts - If opts.lazyLoad is false, the diagrams will be loaded immediately.\n */\nconst registerExternalDiagrams = async (\n diagrams: ExternalDiagramDefinition[],\n {\n lazyLoad = true,\n }: {\n lazyLoad?: boolean;\n } = {}\n) => {\n addDiagrams();\n registerLazyLoadedDiagrams(...diagrams);\n if (lazyLoad === false) {\n await loadRegisteredDiagrams();\n }\n};\n\n/**\n * ##contentLoaded Callback function that is called when page is loaded. This functions fetches\n * configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the\n * page.\n */\nconst contentLoaded = function () {\n if (mermaid.startOnLoad) {\n const { startOnLoad } = mermaidAPI.getConfig();\n if (startOnLoad) {\n mermaid.run().catch((err) => log.error('Mermaid failed to initialize', err));\n }\n }\n};\n\nif (typeof document !== 'undefined') {\n /*!\n * Wait for document loaded before starting the execution\n */\n window.addEventListener('load', contentLoaded, false);\n}\n\n/**\n * ## setParseErrorHandler Alternative to directly setting parseError using:\n *\n * ```js\n * mermaid.parseError = function(err,hash) {\n * forExampleDisplayErrorInGui(err); // do something with the error\n * };\n * ```\n *\n * This is provided for environments where the mermaid object can't directly have a new member added\n * to it (eg. dart interop wrapper). (Initially there is no parseError member of mermaid).\n *\n * @param parseErrorHandler - New parseError() callback.\n */\nconst setParseErrorHandler = function (parseErrorHandler: (err: any, hash: any) => void) {\n mermaid.parseError = parseErrorHandler;\n};\n\nconst executionQueue: (() => Promise)[] = [];\nlet executionQueueRunning = false;\nconst executeQueue = async () => {\n if (executionQueueRunning) {\n return;\n }\n executionQueueRunning = true;\n while (executionQueue.length > 0) {\n const f = executionQueue.shift();\n if (f) {\n try {\n await f();\n } catch (e) {\n log.error('Error executing queue', e);\n }\n }\n }\n executionQueueRunning = false;\n};\n\n/**\n * Parse the text and validate the syntax.\n * @param text - The mermaid diagram definition.\n * @param parseOptions - Options for parsing. @see {@link ParseOptions}\n * @returns If valid, {@link ParseResult} otherwise `false` if parseOptions.suppressErrors is `true`.\n * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.\n *\n * @example\n * ```js\n * console.log(await mermaid.parse('flowchart \\n a --> b'));\n * // { diagramType: 'flowchart-v2' }\n * console.log(await mermaid.parse('wrong \\n a --> b', { suppressErrors: true }));\n * // false\n * console.log(await mermaid.parse('wrong \\n a --> b', { suppressErrors: false }));\n * // throws Error\n * console.log(await mermaid.parse('wrong \\n a --> b'));\n * // throws Error\n * ```\n */\nconst parse: typeof mermaidAPI.parse = async (text, parseOptions) => {\n return new Promise((resolve, reject) => {\n // This promise will resolve when the render call is done.\n // It will be queued first and will be executed when it is first in line\n const performCall = () =>\n new Promise((res, rej) => {\n mermaidAPI.parse(text, parseOptions).then(\n (r) => {\n // This resolves for the promise for the queue handling\n res(r);\n // This fulfills the promise sent to the value back to the original caller\n resolve(r);\n },\n (e) => {\n log.error('Error parsing', e);\n mermaid.parseError?.(e);\n rej(e);\n reject(e);\n }\n );\n });\n executionQueue.push(performCall);\n executeQueue().catch(reject);\n });\n};\n\n/**\n * Function that renders an svg with a graph from a chart definition. Usage example below.\n *\n * ```javascript\n * element = document.querySelector('#graphDiv');\n * const graphDefinition = 'graph TB\\na-->b';\n * const { svg, bindFunctions } = await mermaid.render('graphDiv', graphDefinition);\n * element.innerHTML = svg;\n * bindFunctions?.(element);\n * ```\n *\n * @remarks\n * Multiple calls to this function will be enqueued to run serially.\n *\n * @param id - The id for the SVG element (the element to be rendered)\n * @param text - The text for the graph definition\n * @param container - HTML element where the svg will be inserted. (Is usually element with the .mermaid class)\n * If no svgContainingElement is provided then the SVG element will be appended to the body.\n * Selector to element in which a div with the graph temporarily will be\n * inserted. If one is provided a hidden div will be inserted in the body of the page instead. The\n * element will be removed when rendering is completed.\n * @returns Returns the SVG Definition and BindFunctions.\n */\nconst render: typeof mermaidAPI.render = (id, text, container) => {\n return new Promise((resolve, reject) => {\n // This promise will resolve when the mermaidAPI.render call is done.\n // It will be queued first and will be executed when it is first in line\n const performCall = () =>\n new Promise((res, rej) => {\n mermaidAPI.render(id, text, container).then(\n (r) => {\n // This resolves for the promise for the queue handling\n res(r);\n // This fulfills the promise sent to the value back to the original caller\n resolve(r);\n },\n (e) => {\n log.error('Error parsing', e);\n mermaid.parseError?.(e);\n rej(e);\n reject(e);\n }\n );\n });\n executionQueue.push(performCall);\n executeQueue().catch(reject);\n });\n};\n\nexport interface Mermaid {\n startOnLoad: boolean;\n parseError?: ParseErrorFunction;\n /**\n * @deprecated Use {@link parse} and {@link render} instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.\n * @internal\n */\n mermaidAPI: typeof mermaidAPI;\n parse: typeof parse;\n render: typeof render;\n /**\n * @deprecated Use {@link initialize} and {@link run} instead.\n */\n init: typeof init;\n run: typeof run;\n registerLayoutLoaders: typeof registerLayoutLoaders;\n registerExternalDiagrams: typeof registerExternalDiagrams;\n initialize: typeof initialize;\n contentLoaded: typeof contentLoaded;\n setParseErrorHandler: typeof setParseErrorHandler;\n detectType: typeof detectType;\n}\n\nconst mermaid: Mermaid = {\n startOnLoad: true,\n mermaidAPI,\n parse,\n render,\n init,\n run,\n registerExternalDiagrams,\n registerLayoutLoaders,\n initialize,\n parseError: undefined,\n contentLoaded,\n setParseErrorHandler,\n detectType,\n};\n\nexport default mermaid;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'c4';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./c4Diagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'flowchart';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have conferred to only use new flow charts this function should always return false\n // as in not signalling true for a legacy flowchart\n if (\n config?.flowchart?.defaultRenderer === 'dagre-wrapper' ||\n config?.flowchart?.defaultRenderer === 'elk'\n ) {\n return false;\n }\n return /^\\s*graph/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./flowDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'flowchart-v2';\n\nconst detector: DiagramDetector = (txt, config) => {\n if (\n config?.flowchart?.defaultRenderer === 'dagre-d3' ||\n config?.flowchart?.defaultRenderer === 'elk'\n ) {\n return false;\n }\n\n // If we have configured to use dagre-wrapper then we should return true in this function for graph code thus making it use the new flowchart diagram\n if (/^\\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === 'dagre-wrapper') {\n return true;\n }\n return /^\\s*flowchart/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./flowDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'er';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*erDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./erDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type { DiagramDetector, DiagramLoader } from '../../diagram-api/types.js';\nimport type { ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'gitGraph';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*gitGraph/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./gitGraphDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'gantt';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*gantt/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./ganttDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'info';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*info/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./infoDiagram.js');\n return { id, diagram };\n};\n\nexport const info: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'pie';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*pie/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./pieDiagram.js');\n return { id, diagram };\n};\n\nexport const pie: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'quadrantChart';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*quadrantChart/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./quadrantDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'xychart';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*xychart-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./xychartDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'requirement';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*requirement(Diagram)?/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./requirementDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'sequence';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*sequenceDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./sequenceDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'class';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have configured to use dagre-wrapper then we should never return true in this function\n if (config?.class?.defaultRenderer === 'dagre-wrapper') {\n return false;\n }\n // We have not opted to use the new renderer so we should return true if we detect a class diagram\n return /^\\s*classDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./classDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'classDiagram';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have configured to use dagre-wrapper then we should return true in this function for classDiagram code thus making it use the new class diagram\n if (/^\\s*classDiagram/.test(txt) && config?.class?.defaultRenderer === 'dagre-wrapper') {\n return true;\n }\n // We have not opted to use the new renderer so we should return true if we detect a class diagram\n return /^\\s*classDiagram-v2/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./classDiagram-v2.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'state';\n\nconst detector: DiagramDetector = (txt, config) => {\n // If we have confirmed to only use new state diagrams this function should always return false\n // as in not signalling true for a legacy state diagram\n if (config?.state?.defaultRenderer === 'dagre-wrapper') {\n return false;\n }\n return /^\\s*stateDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./stateDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'stateDiagram';\n\nconst detector: DiagramDetector = (txt, config) => {\n if (/^\\s*stateDiagram-v2/.test(txt)) {\n return true;\n }\n if (/^\\s*stateDiagram/.test(txt) && config?.state?.defaultRenderer === 'dagre-wrapper') {\n return true;\n }\n return false;\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./stateDiagram-v2.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'journey';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*journey/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./journeyDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type { SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n/**\n * Draws an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param _text - Mermaid graph definition.\n * @param id - The text for the error\n * @param version - The version\n */\nexport const draw = (_text: string, id: string, version: string) => {\n log.debug('rendering svg for syntax error\\n');\n const svg: SVG = selectSvgElement(id);\n const g: SVGGroup = svg.append('g');\n\n svg.attr('viewBox', '0 0 2412 512');\n configureSvgSize(svg, 100, 512, true);\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z'\n );\n\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1440)\n .attr('y', 250)\n .attr('font-size', '150px')\n .style('text-anchor', 'middle')\n .text('Syntax error in text');\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1250)\n .attr('y', 400)\n .attr('font-size', '100px')\n .style('text-anchor', 'middle')\n .text(`mermaid version ${version}`);\n};\n\nexport const renderer = { draw };\n\nexport default renderer;\n", "import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { renderer } from './errorRenderer.js';\n\nconst diagram: DiagramDefinition = {\n db: {},\n renderer,\n parser: {\n parse: (): void => {\n return;\n },\n },\n};\n\nexport default diagram;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../../diagram-api/types.js';\n\nconst id = 'flowchart-elk';\n\nconst detector: DiagramDetector = (txt, config = {}): boolean => {\n if (\n // If diagram explicitly states flowchart-elk\n /^\\s*flowchart-elk/.test(txt) ||\n // If a flowchart/graph diagram has their default renderer set to elk\n (/^\\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')\n ) {\n config.layout = 'elk';\n return true;\n }\n return false;\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('../flowDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'timeline';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*timeline/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./timeline-definition.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\nconst id = 'mindmap';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*mindmap/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./mindmap-definition.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'sankey';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*sankey-beta/.test(txt);\n};\n\nconst loader = async () => {\n const { diagram } = await import('./sankeyDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import type {\n DiagramDetector,\n DiagramLoader,\n ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'packet';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*packet-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n const { diagram } = await import('./diagram.js');\n return { id, diagram };\n};\n\nexport const packet: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n", "import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'block';\n\nconst detector: DiagramDetector = (txt) => {\n return /^\\s*block-beta/.test(txt);\n};\n\nconst loader = async () => {\n const { diagram } = await import('./blockDiagram.js');\n return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n id,\n detector,\n loader,\n};\n\nexport default plugin;\n", "import c4 from '../diagrams/c4/c4Detector.js';\nimport flowchart from '../diagrams/flowchart/flowDetector.js';\nimport flowchartV2 from '../diagrams/flowchart/flowDetector-v2.js';\nimport er from '../diagrams/er/erDetector.js';\nimport git from '../diagrams/git/gitGraphDetector.js';\nimport gantt from '../diagrams/gantt/ganttDetector.js';\nimport { info } from '../diagrams/info/infoDetector.js';\nimport { pie } from '../diagrams/pie/pieDetector.js';\nimport quadrantChart from '../diagrams/quadrant-chart/quadrantDetector.js';\nimport xychart from '../diagrams/xychart/xychartDetector.js';\nimport requirement from '../diagrams/requirement/requirementDetector.js';\nimport sequence from '../diagrams/sequence/sequenceDetector.js';\nimport classDiagram from '../diagrams/class/classDetector.js';\nimport classDiagramV2 from '../diagrams/class/classDetector-V2.js';\nimport state from '../diagrams/state/stateDetector.js';\nimport stateV2 from '../diagrams/state/stateDetector-V2.js';\nimport journey from '../diagrams/user-journey/journeyDetector.js';\nimport errorDiagram from '../diagrams/error/errorDiagram.js';\nimport flowchartElk from '../diagrams/flowchart/elk/detector.js';\nimport timeline from '../diagrams/timeline/detector.js';\nimport mindmap from '../diagrams/mindmap/detector.js';\nimport sankey from '../diagrams/sankey/sankeyDetector.js';\nimport { packet } from '../diagrams/packet/detector.js';\nimport block from '../diagrams/block/blockDetector.js';\nimport { registerLazyLoadedDiagrams } from './detectType.js';\nimport { registerDiagram } from './diagramAPI.js';\n\nlet hasLoadedDiagrams = false;\nexport const addDiagrams = () => {\n if (hasLoadedDiagrams) {\n return;\n }\n // This is added here to avoid race-conditions.\n // We could optimize the loading logic somehow.\n hasLoadedDiagrams = true;\n registerDiagram('error', errorDiagram, (text) => {\n return text.toLowerCase().trim() === 'error';\n });\n registerDiagram(\n '---',\n // --- diagram type may appear if YAML front-matter is not parsed correctly\n {\n db: {\n clear: () => {\n // Quite ok, clear needs to be there for --- to work as a regular diagram\n },\n },\n styles: {}, // should never be used\n renderer: {\n draw: () => {\n // should never be used\n },\n },\n parser: {\n parse: () => {\n throw new Error(\n 'Diagrams beginning with --- are not valid. ' +\n 'If you were trying to use a YAML front-matter, please ensure that ' +\n \"you've correctly opened and closed the YAML front-matter with un-indented `---` blocks\"\n );\n },\n },\n init: () => null, // no op\n },\n (text) => {\n return text.toLowerCase().trimStart().startsWith('---');\n }\n );\n // Ordering of detectors is important. The first one to return true will be used.\n registerLazyLoadedDiagrams(\n c4,\n classDiagramV2,\n classDiagram,\n er,\n gantt,\n info,\n pie,\n requirement,\n sequence,\n flowchartElk,\n flowchartV2,\n flowchart,\n mindmap,\n timeline,\n git,\n stateV2,\n state,\n journey,\n quadrantChart,\n sankey,\n packet,\n xychart,\n block\n );\n};\n", "import { log } from '../logger.js';\nimport { detectors } from './detectType.js';\nimport { getDiagram, registerDiagram } from './diagramAPI.js';\n\nexport const loadRegisteredDiagrams = async () => {\n log.debug(`Loading registered diagrams`);\n // Load all lazy loaded diagrams in parallel\n const results = await Promise.allSettled(\n Object.entries(detectors).map(async ([key, { detector, loader }]) => {\n if (loader) {\n try {\n getDiagram(key);\n } catch {\n try {\n // Register diagram if it is not already registered\n const { diagram, id } = await loader();\n registerDiagram(id, diagram, detector);\n } catch (err) {\n // Remove failed diagram from detectors\n log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);\n delete detectors[key];\n throw err;\n }\n }\n }\n })\n );\n const failed = results.filter((result) => result.status === 'rejected');\n if (failed.length > 0) {\n log.error(`Failed to load ${failed.length} external diagrams`);\n for (const res of failed) {\n log.error(res);\n }\n throw new Error(`Failed to load ${failed.length} external diagrams`);\n }\n};\n", "/**\n * This file contains functions that are used internally by mermaid\n * and is not intended to be used by the end user.\n */\n// @ts-ignore TODO: Investigate D3 issue\nimport { select } from 'd3';\nimport { compile, serialize, stringify } from 'stylis';\n// @ts-ignore: TODO Fix ts errors\nimport { version } from '../package.json';\nimport * as configApi from './config.js';\nimport { addDiagrams } from './diagram-api/diagram-orchestration.js';\nimport { Diagram } from './Diagram.js';\nimport errorRenderer from './diagrams/error/errorRenderer.js';\nimport { attachFunctions } from './interactionDb.js';\nimport { log, setLogLevel } from './logger.js';\nimport getStyles from './styles.js';\nimport theme from './themes/index.js';\nimport DOMPurify from 'dompurify';\nimport type { MermaidConfig } from './config.type.js';\nimport { evaluate } from './diagrams/common/common.js';\nimport isEmpty from 'lodash-es/isEmpty.js';\nimport { setA11yDiagramInfo, addSVGa11yTitleDescription } from './accessibility.js';\nimport type { DiagramMetadata, DiagramStyleClassDef } from './diagram-api/types.js';\nimport { preprocessDiagram } from './preprocess.js';\nimport { decodeEntities } from './utils.js';\nimport { toBase64 } from './utils/base64.js';\nimport type { D3Element, ParseOptions, ParseResult, RenderResult } from './types.js';\nimport assignWithDepth from './assignWithDepth.js';\n\nconst MAX_TEXTLENGTH = 50_000;\nconst MAX_TEXTLENGTH_EXCEEDED_MSG =\n 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n\nconst SECURITY_LVL_SANDBOX = 'sandbox';\nconst SECURITY_LVL_LOOSE = 'loose';\n\nconst XMLNS_SVG_STD = 'http://www.w3.org/2000/svg';\nconst XMLNS_XLINK_STD = 'http://www.w3.org/1999/xlink';\nconst XMLNS_XHTML_STD = 'http://www.w3.org/1999/xhtml';\n\n// ------------------------------\n// iFrame\nconst IFRAME_WIDTH = '100%';\nconst IFRAME_HEIGHT = '100%';\nconst IFRAME_STYLES = 'border:0;margin:0;';\nconst IFRAME_BODY_STYLE = 'margin:0';\nconst IFRAME_SANDBOX_OPTS = 'allow-top-navigation-by-user-activation allow-popups';\nconst IFRAME_NOT_SUPPORTED_MSG = 'The \"iframe\" tag is not supported by your browser.';\n\n// DOMPurify settings for svgCode\nconst DOMPURIFY_TAGS = ['foreignobject'];\nconst DOMPURIFY_ATTR = ['dominant-baseline'];\n\nfunction processAndSetConfigs(text: string) {\n const processed = preprocessDiagram(text);\n configApi.reset();\n configApi.addDirective(processed.config ?? {});\n return processed;\n}\n\n/**\n * Parse the text and validate the syntax.\n * @param text - The mermaid diagram definition.\n * @param parseOptions - Options for parsing. @see {@link ParseOptions}\n * @returns An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.\n * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.\n */\nasync function parse(\n text: string,\n parseOptions: ParseOptions & { suppressErrors: true }\n): Promise;\nasync function parse(text: string, parseOptions?: ParseOptions): Promise;\nasync function parse(text: string, parseOptions?: ParseOptions): Promise {\n addDiagrams();\n try {\n const { code } = processAndSetConfigs(text);\n const diagram = await getDiagramFromText(code);\n return { diagramType: diagram.type };\n } catch (error) {\n if (parseOptions?.suppressErrors) {\n return false;\n }\n throw error;\n }\n}\n\n/**\n * Create a CSS style that starts with the given class name, then the element,\n * with an enclosing block that has each of the cssClasses followed by !important;\n * @param cssClass - CSS class name\n * @param element - CSS element\n * @param cssClasses - list of CSS styles to append after the element\n * @returns - the constructed string\n */\nexport const cssImportantStyles = (\n cssClass: string,\n element: string,\n cssClasses: string[] = []\n): string => {\n return `\\n.${cssClass} ${element} { ${cssClasses.join(' !important; ')} !important; }`;\n};\n\n/**\n * Create the user styles\n * @internal\n * @param config - configuration that has style and theme settings to use\n * @param classDefs - the classDefs in the diagram text. Might be null if none were defined. Usually is the result of a call to getClasses(...)\n * @returns the string with all the user styles\n */\nexport const createCssStyles = (\n config: MermaidConfig,\n classDefs: Map | null | undefined = new Map()\n): string => {\n let cssStyles = '';\n\n // user provided theme CSS info\n // If you add more configuration driven data into the user styles make sure that the value is\n // sanitized by the sanitize CSS function TODO where is this method? what should be used to replace it? refactor so that it's always sanitized\n if (config.themeCSS !== undefined) {\n cssStyles += `\\n${config.themeCSS}`;\n }\n\n if (config.fontFamily !== undefined) {\n cssStyles += `\\n:root { --mermaid-font-family: ${config.fontFamily}}`;\n }\n if (config.altFontFamily !== undefined) {\n cssStyles += `\\n:root { --mermaid-alt-font-family: ${config.altFontFamily}}`;\n }\n\n // classDefs defined in the diagram text\n if (classDefs instanceof Map) {\n const htmlLabels = config.htmlLabels ?? config.flowchart?.htmlLabels; // TODO why specifically check the Flowchart diagram config?\n\n const cssHtmlElements = ['> *', 'span']; // TODO make a constant\n const cssShapeElements = ['rect', 'polygon', 'ellipse', 'circle', 'path']; // TODO make a constant\n\n const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;\n\n // create the CSS styles needed for each styleClass definition and css element\n classDefs.forEach((styleClassDef) => {\n // create the css styles for each cssElement and the styles (only if there are styles)\n if (!isEmpty(styleClassDef.styles)) {\n cssElements.forEach((cssElement) => {\n cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles);\n });\n }\n // create the css styles for the tspan element and the text styles (only if there are textStyles)\n if (!isEmpty(styleClassDef.textStyles)) {\n cssStyles += cssImportantStyles(\n styleClassDef.id,\n 'tspan',\n (styleClassDef?.textStyles || []).map((s) => s.replace('color', 'fill'))\n );\n }\n });\n }\n return cssStyles;\n};\n\nexport const createUserStyles = (\n config: MermaidConfig,\n graphType: string,\n classDefs: Map | undefined,\n svgId: string\n): string => {\n const userCSSstyles = createCssStyles(config, classDefs);\n const allStyles = getStyles(graphType, userCSSstyles, config.themeVariables);\n\n // Now turn all of the styles into a (compiled) string that starts with the id\n // use the stylis library to compile the css, turn the results into a valid CSS string (serialize(...., stringify))\n // @see https://github.com/thysultan/stylis\n return serialize(compile(`${svgId}{${allStyles}}`), stringify);\n};\n\n/**\n * Clean up svgCode. Do replacements needed\n *\n * @param svgCode - the code to clean up\n * @param inSandboxMode - security level\n * @param useArrowMarkerUrls - should arrow marker's use full urls? (vs. just the anchors)\n * @returns the cleaned up svgCode\n */\nexport const cleanUpSvgCode = (\n svgCode = '',\n inSandboxMode: boolean,\n useArrowMarkerUrls: boolean\n): string => {\n let cleanedUpSvg = svgCode;\n\n // Replace marker-end urls with just the # anchor (remove the preceding part of the URL)\n if (!useArrowMarkerUrls && !inSandboxMode) {\n cleanedUpSvg = cleanedUpSvg.replace(\n /marker-end=\"url\\([\\d+./:=?A-Za-z-]*?#/g,\n 'marker-end=\"url(#'\n );\n }\n\n cleanedUpSvg = decodeEntities(cleanedUpSvg);\n\n // replace old br tags with newer style\n cleanedUpSvg = cleanedUpSvg.replace(/
    /g, '
    ');\n\n return cleanedUpSvg;\n};\n\n/**\n * Put the svgCode into an iFrame. Return the iFrame code\n *\n * @param svgCode - the svg code to put inside the iFrame\n * @param svgElement - the d3 node that has the current svgElement so we can get the height from it\n * @returns - the code with the iFrame that now contains the svgCode\n */\nexport const putIntoIFrame = (svgCode = '', svgElement?: D3Element): string => {\n const height = svgElement?.viewBox?.baseVal?.height\n ? svgElement.viewBox.baseVal.height + 'px'\n : IFRAME_HEIGHT;\n const base64encodedSrc = toBase64(`${svgCode}`);\n return ``;\n};\n\n/**\n * Append an enclosing div, then svg, then g (group) to the d3 parentRoot. Set attributes.\n * Only set the style attribute on the enclosing div if divStyle is given.\n * Only set the xmlns:xlink attribute on svg if svgXlink is given.\n * Return the last node appended\n *\n * @param parentRoot - the d3 node to append things to\n * @param id - the value to set the id attr to\n * @param enclosingDivId - the id to set the enclosing div to\n * @param divStyle - if given, the style to set the enclosing div to\n * @param svgXlink - if given, the link to set the new svg element to\n * @returns - returns the parentRoot that had nodes appended\n */\nexport const appendDivSvgG = (\n parentRoot: D3Element,\n id: string,\n enclosingDivId: string,\n divStyle?: string,\n svgXlink?: string\n): D3Element => {\n const enclosingDiv = parentRoot.append('div');\n enclosingDiv.attr('id', enclosingDivId);\n if (divStyle) {\n enclosingDiv.attr('style', divStyle);\n }\n\n const svgNode = enclosingDiv\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', XMLNS_SVG_STD);\n if (svgXlink) {\n svgNode.attr('xmlns:xlink', svgXlink);\n }\n\n svgNode.append('g');\n return parentRoot;\n};\n\n/**\n * Append an iFrame node to the given parentNode and set the id, style, and 'sandbox' attributes\n * Return the appended iframe d3 node\n *\n * @param parentNode - the d3 node to append the iFrame node to\n * @param iFrameId - id to use for the iFrame\n * @returns the appended iframe d3 node\n */\nfunction sandboxedIframe(parentNode: D3Element, iFrameId: string): D3Element {\n return parentNode\n .append('iframe')\n .attr('id', iFrameId)\n .attr('style', 'width: 100%; height: 100%;')\n .attr('sandbox', '');\n}\n\n/**\n * Remove any existing elements from the given document\n *\n * @param doc - the document to removed elements from\n * @param id - id for any existing SVG element\n * @param divSelector - selector for any existing enclosing div element\n * @param iFrameSelector - selector for any existing iFrame element\n */\nexport const removeExistingElements = (\n doc: Document,\n id: string,\n divId: string,\n iFrameId: string\n) => {\n // Remove existing SVG element if it exists\n doc.getElementById(id)?.remove();\n // Remove previous temporary element if it exists\n // Both div and iframe needs to be cleared in case there is a config change happening between renders.\n doc.getElementById(divId)?.remove();\n doc.getElementById(iFrameId)?.remove();\n};\n\n/**\n * @deprecated - use the `mermaid.render` function instead of `mermaid.mermaidAPI.render`\n *\n * Deprecated for external use.\n */\n\nconst render = async function (\n id: string,\n text: string,\n svgContainingElement?: Element\n): Promise {\n addDiagrams();\n\n const processed = processAndSetConfigs(text);\n text = processed.code;\n\n const config = configApi.getConfig();\n log.debug(config);\n\n // Check the maximum allowed text size\n if (text.length > (config?.maxTextSize ?? MAX_TEXTLENGTH)) {\n text = MAX_TEXTLENGTH_EXCEEDED_MSG;\n }\n\n const idSelector = '#' + id;\n const iFrameID = 'i' + id;\n const iFrameID_selector = '#' + iFrameID;\n const enclosingDivID = 'd' + id;\n const enclosingDivID_selector = '#' + enclosingDivID;\n\n const removeTempElements = () => {\n // -------------------------------------------------------------------------------\n // Remove the temporary HTML element if appropriate\n const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;\n const node = select(tmpElementSelector).node();\n if (node && 'remove' in node) {\n node.remove();\n }\n };\n\n let root: any = select('body');\n\n const isSandboxed = config.securityLevel === SECURITY_LVL_SANDBOX;\n const isLooseSecurityLevel = config.securityLevel === SECURITY_LVL_LOOSE;\n\n const fontFamily = config.fontFamily;\n\n // -------------------------------------------------------------------------------\n // Define the root d3 node\n // In regular execution the svgContainingElement will be the element with a mermaid class\n\n if (svgContainingElement !== undefined) {\n if (svgContainingElement) {\n svgContainingElement.innerHTML = '';\n }\n\n if (isSandboxed) {\n // If we are in sandboxed mode, we do everything mermaid related in a (sandboxed )iFrame\n const iframe = sandboxedIframe(select(svgContainingElement), iFrameID);\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select(svgContainingElement);\n }\n appendDivSvgG(root, id, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);\n } else {\n // No svgContainingElement was provided\n\n // If there is an existing element with the id, we remove it. This likely a previously rendered diagram\n removeExistingElements(document, id, enclosingDivID, iFrameID);\n\n // Add the temporary div used for rendering with the enclosingDivID.\n // This temporary div will contain a svg with the id == id\n\n if (isSandboxed) {\n // If we are in sandboxed mode, we do everything mermaid related in a (sandboxed) iFrame\n const iframe = sandboxedIframe(select('body'), iFrameID);\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select('body');\n }\n\n appendDivSvgG(root, id, enclosingDivID);\n }\n\n // -------------------------------------------------------------------------------\n // Create the diagram\n\n // Important that we do not create the diagram until after the directives have been included\n let diag: Diagram;\n let parseEncounteredException;\n\n try {\n diag = await Diagram.fromText(text, { title: processed.title });\n } catch (error) {\n if (config.suppressErrorRendering) {\n removeTempElements();\n throw error;\n }\n diag = await Diagram.fromText('error');\n parseEncounteredException = error;\n }\n\n // Get the temporary div element containing the svg\n const element = root.select(enclosingDivID_selector).node();\n const diagramType = diag.type;\n\n // -------------------------------------------------------------------------------\n // Create and insert the styles (user styles, theme styles, config styles)\n\n // Insert an element into svg. This is where we put the styles\n const svg = element.firstChild;\n const firstChild = svg.firstChild;\n const diagramClassDefs = diag.renderer.getClasses?.(text, diag);\n\n const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector);\n\n const style1 = document.createElement('style');\n style1.innerHTML = rules;\n svg.insertBefore(style1, firstChild);\n\n // -------------------------------------------------------------------------------\n // Draw the diagram with the renderer\n try {\n await diag.renderer.draw(text, id, version, diag);\n } catch (e) {\n if (config.suppressErrorRendering) {\n removeTempElements();\n } else {\n errorRenderer.draw(text, id, version);\n }\n throw e;\n }\n\n // This is the d3 node for the svg element\n const svgNode = root.select(`${enclosingDivID_selector} svg`);\n const a11yTitle: string | undefined = diag.db.getAccTitle?.();\n const a11yDescr: string | undefined = diag.db.getAccDescription?.();\n addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr);\n // -------------------------------------------------------------------------------\n // Clean up SVG code\n root.select(`[id=\"${id}\"]`).selectAll('foreignobject > *').attr('xmlns', XMLNS_XHTML_STD);\n\n // Fix for when the base tag is used\n let svgCode: string = root.select(enclosingDivID_selector).node().innerHTML;\n\n log.debug('config.arrowMarkerAbsolute', config.arrowMarkerAbsolute);\n svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config.arrowMarkerAbsolute));\n\n if (isSandboxed) {\n const svgEl = root.select(enclosingDivID_selector + ' svg').node();\n svgCode = putIntoIFrame(svgCode, svgEl);\n } else if (!isLooseSecurityLevel) {\n // Sanitize the svgCode using DOMPurify\n svgCode = DOMPurify.sanitize(svgCode, {\n ADD_TAGS: DOMPURIFY_TAGS,\n ADD_ATTR: DOMPURIFY_ATTR,\n });\n }\n\n attachFunctions();\n\n if (parseEncounteredException) {\n throw parseEncounteredException;\n }\n\n removeTempElements();\n\n return {\n diagramType,\n svg: svgCode,\n bindFunctions: diag.db.bindFunctions,\n };\n};\n\n/**\n * @param userOptions - Initial Mermaid options\n */\nfunction initialize(userOptions: MermaidConfig = {}) {\n const options = assignWithDepth({}, userOptions);\n // Handle legacy location of font-family configuration\n if (options?.fontFamily && !options.themeVariables?.fontFamily) {\n if (!options.themeVariables) {\n options.themeVariables = {};\n }\n options.themeVariables.fontFamily = options.fontFamily;\n }\n\n // Set default options\n configApi.saveConfigFromInitialize(options);\n\n if (options?.theme && options.theme in theme) {\n // Todo merge with user options\n options.themeVariables = theme[options.theme as keyof typeof theme].getThemeVariables(\n options.themeVariables\n );\n } else if (options) {\n options.themeVariables = theme.default.getThemeVariables(options.themeVariables);\n }\n\n const config =\n typeof options === 'object' ? configApi.setSiteConfig(options) : configApi.getSiteConfig();\n\n setLogLevel(config.logLevel);\n addDiagrams();\n}\n\nconst getDiagramFromText = (text: string, metadata: Pick = {}) => {\n const { code } = preprocessDiagram(text);\n return Diagram.fromText(code, metadata);\n};\n\n/**\n * Add accessibility (a11y) information to the diagram.\n *\n * @param diagramType - diagram type\n * @param svgNode - d3 node to insert the a11y title and desc info\n * @param a11yTitle - a11y title\n * @param a11yDescr - a11y description\n */\nfunction addA11yInfo(\n diagramType: string,\n svgNode: D3Element,\n a11yTitle?: string,\n a11yDescr?: string\n): void {\n setA11yDiagramInfo(svgNode, diagramType);\n addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr('id'));\n}\n\n/**\n * @internal - Use mermaid.function instead of mermaid.mermaidAPI.function\n */\nexport const mermaidAPI = Object.freeze({\n render,\n parse,\n getDiagramFromText,\n initialize,\n getConfig: configApi.getConfig,\n setConfig: configApi.setConfig,\n getSiteConfig: configApi.getSiteConfig,\n updateSiteConfig: configApi.updateSiteConfig,\n reset: () => {\n configApi.reset();\n },\n globalReset: () => {\n configApi.reset(configApi.defaultConfig);\n },\n defaultConfig: configApi.defaultConfig,\n});\n\nsetLogLevel(configApi.getConfig().logLevel);\nconfigApi.reset(configApi.getConfig());\nexport default mermaidAPI;\n", "export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n", "/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof (value, search, position) {\n\treturn value.indexOf(search, position)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n", "import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n", "import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n", "import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n", "import * as configApi from './config.js';\nimport { getDiagram, registerDiagram } from './diagram-api/diagramAPI.js';\nimport { detectType, getDiagramLoader } from './diagram-api/detectType.js';\nimport { UnknownDiagramError } from './errors.js';\nimport { encodeEntities } from './utils.js';\nimport type { DetailedError } from './utils.js';\nimport type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js';\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;\n\n/**\n * An object representing a parsed mermaid diagram definition.\n * @privateRemarks This is exported as part of the public mermaidAPI.\n */\nexport class Diagram {\n public static async fromText(text: string, metadata: Pick = {}) {\n const config = configApi.getConfig();\n const type = detectType(text, config);\n text = encodeEntities(text) + '\\n';\n try {\n getDiagram(type);\n } catch {\n const loader = getDiagramLoader(type);\n if (!loader) {\n throw new UnknownDiagramError(`Diagram ${type} not found.`);\n }\n // Diagram not available, loading it.\n // new diagram will try getDiagram again and if fails then it is a valid throw\n const { id, diagram } = await loader();\n registerDiagram(id, diagram);\n }\n const { db, parser, renderer, init } = getDiagram(type);\n if (parser.parser) {\n // The parser.parser.yy is only present in JISON parsers. So, we'll only set if required.\n parser.parser.yy = db;\n }\n db.clear?.();\n init?.(config);\n // This block was added for legacy compatibility. Use frontmatter instead of adding more special cases.\n if (metadata.title) {\n db.setDiagramTitle?.(metadata.title);\n }\n await parser.parse(text);\n return new Diagram(type, text, db, parser, renderer);\n }\n\n private constructor(\n public type: string,\n public text: string,\n public db: DiagramDefinition['db'],\n public parser: DiagramDefinition['parser'],\n public renderer: DiagramDefinition['renderer']\n ) {}\n\n async render(id: string, version: string) {\n await this.renderer.draw(this.text, id, version, this);\n }\n\n getParser() {\n return this.parser;\n }\n\n getType() {\n return this.type;\n }\n}\n", "let interactionFunctions: (() => void)[] = [];\nexport const addFunction = (func: () => void) => {\n interactionFunctions.push(func);\n};\nexport const attachFunctions = () => {\n interactionFunctions.forEach((f) => {\n f();\n });\n interactionFunctions = [];\n};\n", "/**\n * Accessibility (a11y) functions, types, helpers.\n *\n * @see https://www.w3.org/WAI/\n * @see https://www.w3.org/TR/wai-aria-1.1/\n * @see https://www.w3.org/TR/svg-aam-1.0/\n */\nimport type { D3Element } from './types.js';\n\n/**\n * SVG element role:\n * The SVG element role _should_ be set to 'graphics-document' per SVG standard\n * but in practice is not always done by browsers, etc. (As of 2022-12-08).\n * A fallback role of 'document' should be set for those browsers, etc., that only support ARIA 1.0.\n *\n * @see https://www.w3.org/TR/svg-aam-1.0/#roleMappingGeneralRules\n * @see https://www.w3.org/TR/graphics-aria-1.0/#graphics-document\n */\nconst SVG_ROLE = 'graphics-document document';\n\n/**\n * Add role and aria-roledescription to the svg element.\n *\n * @param svg - d3 object that contains the SVG HTML element\n * @param diagramType - diagram name for to the aria-roledescription\n */\nexport function setA11yDiagramInfo(svg: D3Element, diagramType: string) {\n svg.attr('role', SVG_ROLE);\n if (diagramType !== '') {\n svg.attr('aria-roledescription', diagramType);\n }\n}\n\n/**\n * Add an accessible title and/or description element to a chart.\n * The title is usually not displayed and the description is never displayed.\n *\n * The following charts display their title as a visual and accessibility element: gantt.\n *\n * @param svg - d3 node to insert the a11y title and desc info\n * @param a11yTitle - a11y title. undefined or empty strings mean to skip them\n * @param a11yDesc - a11y description. undefined or empty strings mean to skip them\n * @param baseId - id used to construct the a11y title and description id\n */\nexport function addSVGa11yTitleDescription(\n svg: D3Element,\n a11yTitle: string | undefined,\n a11yDesc: string | undefined,\n baseId: string\n): void {\n if (svg.insert === undefined) {\n return;\n }\n\n if (a11yDesc) {\n const descId = `chart-desc-${baseId}`;\n svg.attr('aria-describedby', descId);\n svg.insert('desc', ':first-child').attr('id', descId).text(a11yDesc);\n }\n if (a11yTitle) {\n const titleId = `chart-title-${baseId}`;\n svg.attr('aria-labelledby', titleId);\n svg.insert('title', ':first-child').attr('id', titleId).text(a11yTitle);\n }\n}\n", "/**\n * Remove all lines starting with `%%` from the text that don't contain a `%%{`\n * @param text - The text to remove comments from\n * @returns cleaned text\n */\nexport const cleanupComments = (text: string): string => {\n return text.replace(/^\\s*%%(?!{)[^\\n]+\\n?/gm, '').trimStart();\n};\n", "import type { GanttDiagramConfig, MermaidConfig } from '../config.type.js';\nimport { frontMatterRegex } from './regexes.js';\n// The \"* as yaml\" part is necessary for tree-shaking\nimport * as yaml from 'js-yaml';\n\ninterface FrontMatterMetadata {\n title?: string;\n // Allows custom display modes. Currently used for compact mode in gantt charts.\n displayMode?: GanttDiagramConfig['displayMode'];\n config?: MermaidConfig;\n}\n\nexport interface FrontMatterResult {\n text: string;\n metadata: FrontMatterMetadata;\n}\n\n/**\n * Extract and parse frontmatter from text, if present, and sets appropriate\n * properties in the provided db.\n * @param text - The text that may have a YAML frontmatter.\n * @returns text with frontmatter stripped out\n */\nexport function extractFrontMatter(text: string): FrontMatterResult {\n const matches = text.match(frontMatterRegex);\n if (!matches) {\n return {\n text,\n metadata: {},\n };\n }\n\n let parsed: FrontMatterMetadata =\n yaml.load(matches[1], {\n // To support config, we need JSON schema.\n // https://www.yaml.org/spec/1.2/spec.html#id2803231\n schema: yaml.JSON_SCHEMA,\n }) ?? {};\n\n // To handle runtime data type changes\n parsed = typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};\n\n const metadata: FrontMatterMetadata = {};\n\n // Only add properties that are explicitly supported, if they exist\n if (parsed.displayMode) {\n metadata.displayMode = parsed.displayMode.toString() as GanttDiagramConfig['displayMode'];\n }\n if (parsed.title) {\n metadata.title = parsed.title.toString();\n }\n if (parsed.config) {\n metadata.config = parsed.config;\n }\n\n return {\n text: text.slice(matches[0].length),\n metadata,\n };\n}\n", "\n/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '\u2192') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn\u2019t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out \u21D2 ns-plain-safe-out\n// c = flow-in \u21D2 ns-plain-safe-in\n// c = block-key \u21D2 ns-plain-safe-out\n// c = flow-key \u21D2 ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - \u201C:\u201D - \u201C#\u201D )\n// | ( /* An ns-char preceding */ \u201C#\u201D )\n// | ( \u201C:\u201D /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( \u201C?\u201D | \u201C:\u201D | \u201C-\u201D ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // \u201C-\u201D | \u201C?\u201D | \u201C:\u201D | \u201C,\u201D | \u201C[\u201D | \u201C]\u201D | \u201C{\u201D | \u201C}\u201D\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | \u201C#\u201D | \u201C&\u201D | \u201C*\u201D | \u201C!\u201D | \u201C|\u201D | \u201C=\u201D | \u201C>\u201D | \u201C'\u201D | \u201C\"\u201D\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | \u201C%\u201D | \u201C@\u201D | \u201C`\u201D)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// \u2022 No ending newline => unaffected; already using strip \"-\" chomping.\n// \u2022 Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth \u2264 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines\u2014\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | \u201C-\u201D\n // [39] ns-uri-char ::= \u201C%\u201D ns-hex-digit ns-hex-digit | ns-word-char | \u201C#\u201D\n // | \u201C;\u201D | \u201C/\u201D | \u201C?\u201D | \u201C:\u201D | \u201C@\u201D | \u201C&\u201D | \u201C=\u201D | \u201C+\u201D | \u201C$\u201D | \u201C,\u201D\n // | \u201C_\u201D | \u201C.\u201D | \u201C!\u201D | \u201C~\u201D | \u201C*\u201D | \u201C'\u201D | \u201C(\u201D | \u201C)\u201D | \u201C[\u201D | \u201C]\u201D\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport default jsYaml;\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n", "import { cleanupComments } from './diagram-api/comments.js';\nimport { extractFrontMatter } from './diagram-api/frontmatter.js';\nimport type { DiagramMetadata } from './diagram-api/types.js';\nimport utils, { cleanAndMerge, removeDirectives } from './utils.js';\n\nconst cleanupText = (code: string) => {\n return (\n code\n // parser problems on CRLF ignore all CR and leave LF;;\n .replace(/\\r\\n?/g, '\\n')\n // clean up html tags so that all attributes use single quotes, parser throws error on double quotes\n .replace(\n /<(\\w+)([^>]*)>/g,\n (match, tag, attributes) => '<' + tag + attributes.replace(/=\"([^\"]*)\"/g, \"='$1'\") + '>'\n )\n );\n};\n\nconst processFrontmatter = (code: string) => {\n const { text, metadata } = extractFrontMatter(code);\n const { displayMode, title, config = {} } = metadata;\n if (displayMode) {\n // Needs to be supported for legacy reasons\n if (!config.gantt) {\n config.gantt = {};\n }\n config.gantt.displayMode = displayMode;\n }\n return { title, config, text };\n};\n\nconst processDirectives = (code: string) => {\n const initDirective = utils.detectInit(code) ?? {};\n const wrapDirectives = utils.detectDirective(code, 'wrap');\n if (Array.isArray(wrapDirectives)) {\n initDirective.wrap = wrapDirectives.some(({ type }) => type === 'wrap');\n } else if (wrapDirectives?.type === 'wrap') {\n initDirective.wrap = true;\n }\n return {\n text: removeDirectives(code),\n directive: initDirective,\n };\n};\n\n/**\n * Preprocess the given code by cleaning it up, extracting front matter and directives,\n * cleaning and merging configuration, and removing comments.\n * @param code - The code to preprocess.\n * @returns The object containing the preprocessed code, title, and configuration.\n */\nexport function preprocessDiagram(code: string): DiagramMetadata & { code: string } {\n const cleanedCode = cleanupText(code);\n const frontMatterResult = processFrontmatter(cleanedCode);\n const directiveResult = processDirectives(frontMatterResult.text);\n const config = cleanAndMerge(frontMatterResult.config, directiveResult.directive);\n code = cleanupComments(directiveResult.text);\n return {\n code,\n title: frontMatterResult.title,\n config,\n };\n}\n", "export function toBase64(str: string) {\n // ref: https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem\n const utf8Bytes = new TextEncoder().encode(str);\n const utf8Str = Array.from(utf8Bytes, (byte) => String.fromCodePoint(byte)).join('');\n return btoa(utf8Str);\n}\n"], + "mappings": "6zBAAM,SAAUA,GACdC,EAAoC,SACpCC,EAAA,CAAA,EAAAC,EAAA,EAAAA,EAAA,UAAA,OAAAA,IAAAD,EAAAC,EAAA,CAAA,EAAA,UAAAA,CAAA,EAEA,IAAIC,EAAU,MAAM,KAAK,OAAOH,GAAU,SAAW,CAACA,CAAK,EAAIA,CAAK,EAGpEG,EAAQA,EAAQ,OAAS,CAAC,EAAIA,EAAQA,EAAQ,OAAS,CAAC,EAAE,QACxD,iBACA,EAAE,EAIJ,IAAMC,EAAgBD,EAAQ,OAAO,SAACE,EAAKC,EAAG,CAC5C,IAAMC,EAAUD,EAAI,MAAM,qBAAqB,EAC/C,OAAIC,EACKF,EAAI,OACTE,EAAQ,IAAI,SAACC,EAAK,CAAA,IAAAC,EAAAC,EAAK,OAAAA,GAAAD,EAAAD,EAAM,MAAM,QAAQ,KAAC,MAAAC,IAAA,OAAA,OAAAA,EAAE,UAAM,MAAAC,IAAA,OAAAA,EAAI,CAAC,CAAA,CAAC,EAGvDL,CACT,EAAa,CAAA,CAAE,EAGf,GAAID,EAAc,OAAQ,CACxB,IAAMO,EAAU,IAAI,OAAO;OAAW,KAAK,I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AAY,GACZ,gBAAmB,GACnB,oBAAuB,EACvB,WAAc,WACd,QAAW,GACX,YAAe,GACf,QAAW,QACb,EACA,QAAW,CACT,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,WAAc,IACd,MAAS,IACT,OAAU,GACV,UAAa,GACb,cAAiB,EACjB,WAAc,GACd,cAAiB,GACjB,aAAgB,SAChB,gBAAmB,EACnB,YAAe,GACf,aAAgB,GAChB,eAAkB,0BAClB,WAAc,GACd,gBAAmB,GACnB,cAAiB,KACjB,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,SACF,EACA,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,eAAkB,CAChB,MACF,CACF,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,oBAAuB,GACvB,cAAiB,GACjB,QAAW,EACX,WAAc,GACd,gBAAmB,gBACnB,WAAc,EAChB,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,cAAiB,GACjB,SAAY,EACZ,QAAW,EACX,WAAc,GACd,WAAc,IACd,WAAc,GACd,UAAa,GACb,WAAc,EACd,YAAe,EACf,eAAkB,KAClB,SAAY,GACZ,YAAe,GACf,iBAAoB,KACpB,kBAAqB,GACrB,OAAU,EACV,gBAAmB,eACrB,EACA,GAAM,CACJ,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,gBAAmB,KACnB,eAAkB,IAClB,gBAAmB,GACnB,cAAiB,GACjB,OAAU,OACV,KAAQ,WACR,SAAY,EACd,EACA,IAAO,CACL,YAAe,GACf,aAAgB,GAClB,EACA,cAAiB,CACf,YAAe,GACf,WAAc,IACd,YAAe,IACf,cAAiB,GACjB,aAAgB,GAChB,gBAAmB,EACnB,kBAAqB,EACrB,kBAAqB,EACrB,mBAAsB,GACtB,mBAAsB,GACtB,sBAAyB,GACzB,uBAA0B,EAC1B,iBAAoB,EACpB,mBAAsB,GACtB,YAAe,EACf,cAAiB,MACjB,cAAiB,OACjB,kCAAqC,EACrC,kCAAqC,CACvC,EACA,QAAW,CACT,YAAe,GACf,MAAS,IACT,OAAU,IACV,cAAiB,GACjB,aAAgB,GAChB,UAAa,GACb,MAAS,CACP,KAAQ,4BACR,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,SAAY,GACZ,WAAc,EACd,UAAa,EACb,aAAgB,GAChB,cAAiB,CACnB,EACA,MAAS,CACP,KAAQ,4BACR,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,UAAa,GACb,cAAiB,GACjB,aAAgB,EAChB,SAAY,GACZ,WAAc,EACd,UAAa,EACb,aAAgB,GAChB,cAAiB,CACnB,EACA,iBAAoB,WACpB,yBAA4B,EAC9B,EACA,YAAe,CACb,YAAe,GACf,UAAa,UACb,WAAc,OACd,iBAAoB,QACpB,kBAAqB,OACrB,eAAkB,IAClB,gBAAmB,IACnB,SAAY,GACZ,aAAgB,GAChB,YAAe,EACjB,EACA,QAAW,CACT,YAAe,GACf,QAAW,GACX,aAAgB,GAClB,EACA,SAAY,CACV,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,WAAc,IACd,MAAS,IACT,OAAU,GACV,UAAa,GACb,cAAiB,EACjB,WAAc,GACd,cAAiB,GACjB,aAAgB,SAChB,gBAAmB,EACnB,YAAe,GACf,aAAgB,GAChB,eAAkB,0BAClB,WAAc,GACd,gBAAmB,GACnB,cAAiB,KACjB,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,SACF,EACA,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,eAAkB,CAChB,MACF,EACA,kBAAqB,EACvB,EACA,SAAY,CACV,YAAe,GACf,eAAkB,GAClB,eAAkB,EAClB,UAAa,CACX,MAAS,GACT,OAAU,IACV,EAAK,IACL,EAAK,CACP,EACA,eAAkB,OAClB,gBAAmB,EACnB,gBAAmB,GACnB,aAAgB,GAChB,kBAAqB,GACrB,gBAAmB,GACnB,oBAAuB,EACzB,EAC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A,SACA,MACA,MACA,KACA,KACA,UACA,KACA,WACA,aACA,SACA,OACA,SACA,OACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,SACA,KACA,OACA,IACA,MACA,QACA,MACA,MACA,QACA,SACA,KACA,OACA,MACA,OACA,UACA,OACA,WACA,QACA,MACA,OACA,KACA,WACA,SACA,SACA,IACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,UACA,SACA,SACA,QACA,SACA,SACA,OACA,SACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OACA,KACA,QACA,KACA,IACA,KACA,MACA,QACA,KAAK,CACN,EAGYyE,EAAMzE,EAAO,CACxB,MACA,IACA,WACA,cACA,eACA,eACA,gBACA,mBACA,SACA,WACA,OACA,OACA,UACA,SACA,OACA,IACA,QACA,WACA,QACA,QACA,OACA,iBACA,SACA,OACA,WACA,QACA,OACA,UACA,UACA,WACA,iBACA,OACA,OACA,QACA,SACA,SACA,OACA,WACA,QACA,OACA,QACA,OACA,OAAO,CACR,EAEY0E,EAAa1E,EAAO,CAC/B,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,cAAc,CACf,EAMY2E,EAAgB3E,EAAO,CAClC,UACA,gBACA,SACA,UACA,YACA,mBACA,iBACA,gBACA,gBACA,gBACA,QACA,YACA,OACA,eACA,YACA,UACA,gBACA,SACA,MACA,aACA,UACA,KAAK,CACN,EAEY4E,EAAS5E,EAAO,CAC3B,OACA,WACA,SACA,UACA,QACA,SACA,KACA,aACA,gBACA,KACA,KACA,QACA,UACA,WACA,QACA,OACA,KACA,SACA,QACA,SACA,OACA,OACA,UACA,SACA,MACA,QACA,MACA,SACA,aACA,aAAa,CACd,EAIY6E,EAAmB7E,EAAO,CACrC,UACA,cACA,aACA,WACA,YACA,UACA,UACA,SACA,SACA,QACA,YACA,aACA,iBACA,cACA,MAAM,CACP,EAEY8E,EAAO9E,EAAO,CAAC,OAAO,CAAC,ECrRvBwE,EAAOxE,EAAO,CACzB,SACA,SACA,QACA,MACA,iBACA,eACA,uBACA,WACA,aACA,UACA,SACA,UACA,cACA,cACA,UACA,OACA,QACA,QACA,QACA,OACA,UACA,WACA,eACA,SACA,cACA,WACA,WACA,UACA,MACA,WACA,0BACA,wBACA,WACA,YACA,UACA,eACA,OACA,MACA,UACA,SACA,SACA,OACA,OACA,WACA,KACA,YACA,YACA,QACA,OACA,QACA,OACA,OACA,UACA,OACA,MACA,MACA,YACA,QACA,SACA,MACA,YACA,WACA,QACA,OACA,QACA,UACA,aACA,SACA,OACA,UACA,UACA,cACA,cACA,UACA,gBACA,sBACA,SACA,UACA,UACA,aACA,WACA,MACA,WACA,MACA,WACA,OACA,OACA,UACA,aACA,QACA,WACA,QACA,OACA,QACA,OACA,UACA,QACA,MACA,SACA,OACA,QACA,UACA,WACA,QACA,YACA,OACA,SACA,SACA,QACA,QACA,OACA,QACA,MAAM,CACP,EAEYyE,EAAMzE,EAAO,CACxB,gBACA,aACA,WACA,qBACA,SACA,gBACA,gBACA,UACA,gBACA,iBACA,QACA,OACA,KACA,QACA,OACA,gBACA,YACA,YACA,QACA,sBACA,8BACA,gBACA,kBACA,KACA,KACA,IACA,KACA,KACA,kBACA,YACA,UACA,UACA,MACA,WACA,YACA,MACA,OACA,eACA,YACA,SACA,cACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,KACA,KACA,KACA,KACA,aACA,WACA,gBACA,oBACA,SACA,OACA,KACA,kBACA,KACA,MACA,IACA,KACA,KACA,KACA,KACA,UACA,YACA,aACA,WACA,OACA,eACA,iBACA,eACA,mBACA,iBACA,QACA,aACA,aACA,eACA,eACA,cACA,cACA,mBACA,YACA,MACA,OACA,QACA,SACA,OACA,MACA,OACA,aACA,SACA,WACA,UACA,QACA,SACA,cACA,SACA,WACA,cACA,OACA,aACA,sBACA,mBACA,eACA,SACA,gBACA,sBACA,iBACA,IACA,KACA,KACA,SACA,OACA,OACA,cACA,YACA,UACA,SACA,SACA,QACA,OACA,kBACA,mBACA,mBACA,eACA,cACA,eACA,cACA,aACA,eACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,SACA,eACA,QACA,eACA,iBACA,WACA,UACA,UACA,YACA,mBACA,cACA,kBACA,iBACA,aACA,OACA,KACA,KACA,UACA,SACA,UACA,aACA,UACA,aACA,gBACA,gBACA,QACA,eACA,OACA,eACA,mBACA,mBACA,IACA,KACA,KACA,QACA,IACA,KACA,KACA,IACA,YAAY,CACb,EAEY4E,EAAS5E,EAAO,CAC3B,SACA,cACA,QACA,WACA,QACA,eACA,cACA,aACA,aACA,QACA,MACA,UACA,eACA,WACA,QACA,QACA,SACA,OACA,KACA,UACA,SACA,gBACA,SACA,SACA,iBACA,YACA,WACA,cACA,UACA,UACA,gBACA,WACA,WACA,OACA,WACA,WACA,aACA,UACA,SACA,SACA,cACA,gBACA,uBACA,YACA,YACA,aACA,WACA,iBACA,iBACA,YACA,UACA,QACA,OAAO,CACR,EAEY+E,EAAM/E,EAAO,CACxB,aACA,SACA,cACA,YACA,aAAa,CACd,EC1WYgF,GAAgB/E,EAAK,2BAA2B,EAChDgF,GAAWhF,EAAK,uBAAuB,EACvCiF,GAAcjF,EAAK,eAAe,EAClCkF,EAAYlF,EAAK,4BAA4B,EAC7CmF,GAAYnF,EAAK,gBAAgB,EACjCoF,GAAiBpF,EAC5B,2FACF,EACaqF,EAAoBrF,EAAK,uBAAuB,EAChDsF,EAAkBtF,EAC7B,6DACF,EACauF,EAAevF,EAAK,SAAS,EAC7BwF,GAAiBxF,EAAK,0BAA0B,uMCS7D,IAAMyF,GAAY,CAChBlC,QAAS,EACTmC,UAAW,EACXb,KAAM,EACNc,aAAc,EACdC,gBAAiB,EACjBC,WAAY,EACZC,uBAAwB,EACxBC,QAAS,EACTC,SAAU,EACVC,aAAc,GACdC,iBA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L,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,OAAK,gBACL,OAAK,gBACL,OAAK,UACL,OAAK,gBACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,UACL,OAAK,gBACL,O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mB,CACvB,YAAa,GACb,WAAAK,GACA,MAAA+B,IACA,OAAApB,IACA,KAAAH,IACA,IAAAhB,IACA,yBAAAwB,IACA,sBAAA0B,GACA,WAAA9B,IACA,WAAY,OACZ,cAAAU,IACA,qBAAAG,IACA,WAAAkB,EACF,EAEOC,IAAQjD", + "names": ["dedent", "templ", "values", "_i", "strings", "indentLengths", "arr", "str", "matches", "match", "_a", "_b", "pattern_1", "string", "value", "i", "endentations", "endentation", "indentedValue", "init_esm", "__esmMin", "__name", "require_dayjs_min", "__commonJSMin", "exports", "module", "n", "r", "s", "u", "a", "o", "c", "h", "d", "l", "$", "M", "__name", "t", "e", "m", "v", "i", "g", "D", "p", "S", "_", "w", "O", "b", "f", "y", "k", "import_dayjs", "LEVELS", "log", "setLogLevel", "format", "init_logger", "__esmMin", "__name", "_args", "level", "numericLevel", "dayjs", "frontMatterRegex", "directiveRegex", "anyCommentRegex", "init_regexes", "__esmMin", "UnknownDiagramError", "init_errors", "__esmMin", "__name", "message", "detectors", "detectType", "registerLazyLoadedDiagrams", "addDetector", "getDiagramLoader", "init_detectType", "__esmMin", "init_logger", "init_regexes", "init_errors", "__name", "text", "config", "frontMatterRegex", "directiveRegex", "anyCommentRegex", "key", "detector", "UnknownDiagramError", "diagrams", "id", "loader", "log", "parser", "c4Diagram_default", "init_c4Diagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "kv", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "assignWithDepth", "assignWithDepth_default", "init_assignWithDepth", "__esmMin", "__name", "dst", "src", "depth", "clobber", "config", "s", "key", "Channel", "channel_default", "init_channel", "__esmMin", "__name", "r", "g", "b", "h", "s", "l", "a", "c", "n", "p", "q", "t", "channel", "max", "min", "d", "Lang", "lang_default", "init_lang", "__esmMin", "__name", "number", "lower", "upper", "Unit", "unit_default", "init_unit", "__esmMin", "__name", "dec", "hex", "Utils", "utils_default", "init_utils", "__esmMin", "init_channel", "init_lang", "init_unit", "channel_default", "lang_default", "unit_default", "DEC2HEX", "TYPE", "init_constants", "__esmMin", "init_utils", "i", "utils_default", "Type", "type_default", "init_type", "__esmMin", "init_constants", "__name", "TYPE", "type", "Channels", "channels_default", "init_channels", "__esmMin", "init_utils", "init_type", "init_constants", "__name", "data", "color", "type_default", "TYPE", "h", "s", "l", "utils_default", "g", "b", "r", "a", "channels", "reusable_default", "init_reusable", "__esmMin", "init_channels", "channels_default", "Hex", "hex_default", "init_hex", "__esmMin", "init_reusable", "init_constants", "__name", "color", "match", "hex", "dec", "length", "hasAlpha", "isFullLength", "multiplier", "bits", "bitsOffset", "mask", "reusable_default", "channels", "r", "g", "b", "a", "DEC2HEX", "HSL", "hsl_default", "init_hsl", "__esmMin", "init_utils", "init_reusable", "__name", "hue", "match", "number", "unit", "utils_default", "color", "charCode", "h", "s", "l", "a", "isAlphaPercentage", "reusable_default", "channels", "Keyword", "keyword_default", "init_keyword", "__esmMin", "init_hex", "__name", "color", "hex", "hex_default", "channels", "name", "RGB", "rgb_default", "init_rgb", "__esmMin", "init_utils", "init_reusable", "__name", "color", "charCode", "match", "r", "isRedPercentage", "g", "isGreenPercentage", "b", "isBluePercentage", "a", "isAlphaPercentage", "reusable_default", "utils_default", "channels", "Color", "color_default", "init_color", "__esmMin", "init_hex", "init_hsl", "init_keyword", "init_rgb", "init_constants", "keyword_default", "hex_default", "rgb_default", "hsl_default", "__name", "color", "channels", "TYPE", "change", "change_default", "init_change", "__esmMin", "init_utils", "init_color", "__name", "color", "channels", "ch", "color_default", "c", "utils_default", "rgba", "rgba_default", "init_rgba", "__esmMin", "init_utils", "init_reusable", "init_color", "init_change", "__name", "r", "g", "b", "a", "change_default", "channels", "reusable_default", "utils_default", "color_default", "channel", "channel_default", "init_channel", "__esmMin", "init_utils", "init_color", "__name", "color", "utils_default", "color_default", "luminance", "luminance_default", "init_luminance", "__esmMin", "init_utils", "init_color", "__name", "color", "r", "g", "b", "color_default", "utils_default", "isLight", "is_light_default", "init_is_light", "__esmMin", "init_luminance", "__name", "color", "luminance_default", "isDark", "is_dark_default", "init_is_dark", "__esmMin", "init_is_light", "__name", "color", "is_light_default", "adjustChannel", "adjust_channel_default", "init_adjust_channel", "__esmMin", "init_utils", "init_color", "__name", "color", "channel", "amount", "channels", "color_default", "amountCurrent", "amountNext", "utils_default", "lighten", "lighten_default", "init_lighten", "__esmMin", "init_adjust_channel", "__name", "color", "amount", "adjust_channel_default", "darken", "darken_default", "init_darken", "__esmMin", "init_adjust_channel", "__name", "color", "amount", "adjust_channel_default", "adjust", "adjust_default", "init_adjust", "__esmMin", "init_color", "init_change", "__name", "color", "channels", "ch", "color_default", "changes", "c", "change_default", "mix", "mix_default", "init_mix", "__esmMin", "init_color", "init_rgba", "__name", "color1", "color2", "weight", "r1", "g1", "b1", "a1", "color_default", "r2", "g2", "b2", "a2", "weightScale", "weightNormalized", "alphaDelta", "weight1", "weight2", "r", "g", "b", "a", "rgba_default", "invert", "invert_default", "init_invert", "__esmMin", "init_color", "init_mix", "__name", "color", "weight", "inverse", "color_default", "mix_default", "init_methods", "__esmMin", "init_rgba", "init_channel", "init_is_dark", "init_lighten", "init_darken", "init_adjust", "init_invert", "init_dist", "__esmMin", "init_methods", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "init_erDiagram_oldHardcodedValues", "__esmMin", "mkBorder", "init_theme_helpers", "__esmMin", "init_dist", "__name", "col", "darkMode", "adjust_default", "Theme", "getThemeVariables", "init_theme_base", "__esmMin", "init_dist", "init_erDiagram_oldHardcodedValues", "init_theme_helpers", "__name", "adjust_default", "mkBorder", "invert_default", "darken_default", "lighten_default", "i", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_dark", "__esmMin", "init_dist", "init_theme_helpers", "__name", "lighten_default", "adjust_default", "invert_default", "mkBorder", "rgba_default", "darken_default", "i", "is_dark_default", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_default", "__esmMin", "init_dist", "init_theme_helpers", "init_erDiagram_oldHardcodedValues", "__name", "adjust_default", "mkBorder", "invert_default", "rgba_default", "darken_default", "i", "lighten_default", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_forest", "__esmMin", "init_dist", "init_erDiagram_oldHardcodedValues", "init_theme_helpers", "__name", "lighten_default", "mkBorder", "invert_default", "darken_default", "adjust_default", "i", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "Theme", "getThemeVariables", "init_theme_neutral", "__esmMin", "init_dist", "init_theme_helpers", "init_erDiagram_oldHardcodedValues", "__name", "lighten_default", "adjust_default", "mkBorder", "invert_default", "i", "darken_default", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "userOverrides", "theme", "themes_default", "init_themes", "__esmMin", "init_theme_base", "init_theme_dark", "init_theme_default", "init_theme_forest", "init_theme_neutral", "getThemeVariables", "config_schema_default", "init_config_schema", "__esmMin", "config", "keyify", "configKeys", "defaultConfig_default", "init_defaultConfig", "__esmMin", "init_themes", "init_config_schema", "config_schema_default", "themes_default", "__name", "obj", "prefix", "res", "el", "sanitizeDirective", "sanitizeCss", "init_sanitizeDirective", "__esmMin", "init_defaultConfig", "init_logger", "__name", "args", "log", "arg", "key", "configKeys", "cssMatchers", "cssKey", "k", "val", "str", "startCnt", "endCnt", "element", "defaultConfig", "siteConfig", "configFromInitialize", "directives", "currentConfig", "updateCurrentConfig", "setSiteConfig", "saveConfigFromInitialize", "updateSiteConfig", "getSiteConfig", "setConfig", "getConfig", "sanitize", "addDirective", "reset", "ConfigWarning", "issuedWarnings", "issueWarning", "checkConfig", "init_config", "__esmMin", "init_assignWithDepth", "init_logger", "init_themes", "init_defaultConfig", "init_sanitizeDirective", "defaultConfig_default", "assignWithDepth_default", "__name", "siteCfg", "_directives", "cfg", "sumOfDirectives", "d", "themes_default", "tmpConfigFromInitialize", "themeVariables", "conf", "options", "key", "log", "directive", "sanitizeDirective", "config", "warning", "entries", "setPrototypeOf", "isFrozen", "getPrototypeOf", "getOwnPropertyDescriptor", "Object", "freeze", "seal", "create", "apply", "construct", "Reflect", "__name", "x", "fun", "thisValue", "args", "Func", "arrayForEach", "unapply", "Array", "prototype", "forEach", "arrayPop", "pop", "arrayPush", "push", "stringToLowerCase", "String", "toLowerCase", "stringToString", "toString", "stringMatch", "match", "stringReplace", "replace", "stringIndexOf", "indexOf", "stringTrim", "trim", "objectHasOwnProperty", "hasOwnProperty", "regExpTest", "RegExp", "test", "typeErrorCreate", "unconstruct", "TypeError", "func", "thisArg", "_len", "arguments", "length", "_key", "_len2", "_key2", "addToSet", "set", "array", "transformCaseFunc", "undefined", "l", "element", "lcElement", "cleanArray", "index", "clone", "object", "newObject", "property", "value", "isArray", "constructor", "lookupGetter", "prop", "desc", "get", "fallbackValue", "html", "svg", "svgFilters", "svgDisallowed", "mathMl", "mathMlDisallowed", "text", "xml", "MUSTACHE_EXPR", "ERB_EXPR", "TMPLIT_EXPR", "DATA_ATTR", "ARIA_ATTR", "IS_ALLOWED_URI", "IS_SCRIPT_OR_DATA", "ATTR_WHITESPACE", "DOCTYPE_NAME", "CUSTOM_ELEMENT", "NODE_TYPE", "attribute", "cdataSection", "entityReference", "entityNode", "progressingInstruction", "comment", "document", "documentType", "documentFragment", "notation", "getGlobal", "window", "_createTrustedTypesPolicy", "trustedTypes", "purifyHostElement", "createPolicy", "suffix", "ATTR_NAME", "hasAttribute", "getAttribute", "policyName", "createHTML", "createScriptURL", "scriptUrl", "console", "warn", "createDOMPurify", "DOMPurify", "root", "version", "VERSION", "removed", "nodeType", "isSupported", "originalDocument", "currentScript", "DocumentFragment", "HTMLTemplateElement", "Node", "Element", "NodeFilter", "NamedNodeMap", "MozNamedAttrMap", "HTMLFormElement", "DOMParser", "ElementPrototype", "cloneNode", "remove", "getNextSibling", "getChildNodes", "getParentNode", "template", "createElement", "content", "ownerDocument", "trustedTypesPolicy", "emptyHTML", "implementation", "createNodeIterator", "createDocumentFragment", "getElementsByTagName", "importNode", "hooks", "createHTMLDocument", "EXPRESSIONS", "ALLOWED_TAGS", "DEFAULT_ALLOWED_TAGS", "TAGS", "ALLOWED_ATTR", "DEFAULT_ALLOWED_ATTR", "ATTRS", "CUSTOM_ELEMENT_HANDLING", "tagNameCheck", "writable", "configurable", "enumerable", "attributeNameCheck", "allowCustomizedBuiltInElements", "FORBID_TAGS", "FORBID_ATTR", "ALLOW_ARIA_ATTR", "ALLOW_DATA_ATTR", "ALLOW_UNKNOWN_PROTOCOLS", "ALLOW_SELF_CLOSE_IN_ATTR", "SAFE_FOR_TEMPLATES", "SAFE_FOR_XML", "WHOLE_DOCUMENT", "SET_CONFIG", "FORCE_BODY", "RETURN_DOM", "RETURN_DOM_FRAGMENT", "RETURN_TRUSTED_TYPE", "SANITIZE_DOM", "SANITIZE_NAMED_PROPS", "SANITIZE_NAMED_PROPS_PREFIX", "KEEP_CONTENT", "IN_PLACE", "USE_PROFILES", "FORBID_CONTENTS", "DEFAULT_FORBID_CONTENTS", "DATA_URI_TAGS", "DEFAULT_DATA_URI_TAGS", "URI_SAFE_ATTRIBUTES", "DEFAULT_URI_SAFE_ATTRIBUTES", "MATHML_NAMESPACE", "SVG_NAMESPACE", "HTML_NAMESPACE", "NAMESPACE", "IS_EMPTY_INPUT", "ALLOWED_NAMESPACES", "DEFAULT_ALLOWED_NAMESPACES", "PARSER_MEDIA_TYPE", "SUPPORTED_PARSER_MEDIA_TYPES", "DEFAULT_PARSER_MEDIA_TYPE", "CONFIG", "formElement", "isRegexOrFunction", "testValue", "Function", "_parseConfig", "cfg", "ADD_URI_SAFE_ATTR", "ADD_DATA_URI_TAGS", "ALLOWED_URI_REGEXP", "ADD_TAGS", "ADD_ATTR", "table", "tbody", "TRUSTED_TYPES_POLICY", "MATHML_TEXT_INTEGRATION_POINTS", "HTML_INTEGRATION_POINTS", "COMMON_SVG_AND_HTML_ELEMENTS", "ALL_SVG_TAGS", "ALL_MATHML_TAGS", "_checkValidNamespace", "parent", "tagName", "namespaceURI", "parentTagName", "Boolean", "_forceRemove", "node", "removeChild", "_removeAttribute", "name", "getAttributeNode", "from", "removeAttribute", "setAttribute", "_initDocument", "dirty", "doc", "leadingWhitespace", "matches", "dirtyPayload", "parseFromString", "documentElement", "createDocument", "innerHTML", "body", "insertBefore", "createTextNode", "childNodes", "call", "_createNodeIterator", "SHOW_ELEMENT", "SHOW_COMMENT", "SHOW_TEXT", "SHOW_PROCESSING_INSTRUCTION", "SHOW_CDATA_SECTION", "_isClobbered", "elm", "nodeName", "textContent", "attributes", "hasChildNodes", "_isNode", "_executeHook", "entryPoint", "currentNode", "data", "hook", "_sanitizeElements", "allowedTags", "firstElementChild", "_isBasicCustomElement", "parentNode", "childCount", "i", "childClone", "__removalCount", "expr", "_isValidAttribute", "lcTag", "lcName", "_sanitizeAttributes", "hookEvent", "attrName", "attrValue", "keepAttr", "allowedAttributes", "attr", "forceKeepAttr", "getAttributeType", "setAttributeNS", "_sanitizeShadowDOM", "fragment", "shadowNode", "shadowIterator", "nextNode", "sanitize", "importedNode", "returnNode", "appendChild", "firstChild", "nodeIterator", "shadowroot", "shadowrootmode", "serializedHTML", "outerHTML", "doctype", "setConfig", "clearConfig", "isValidAttribute", "tag", "addHook", "hookFunction", "removeHook", "removeHooks", "removeAllHooks", "purify", "katex_exports", "__export", "katex", "escape", "text", "ESCAPE_REGEX", "match", "ESCAPE_LOOKUP", "getDefaultValue", "schema", "type", "defaultType", "scriptFromCodepoint", "codepoint", "i", "scriptData", "script", "_i", "block", "supportedCodepoint", "allBlocks", "setFontMetrics", "fontName", "metrics", "fontMetricsData", "getCharacterMetrics", "character", "font", "mode", "ch", "extraCharacterMap", "getGlobalMetrics", "size", "sizeIndex", "fontMetricsBySizeIndex", "sigmasAndXis", "key", "assertSymbolDomNode", "group", "SymbolNode", "assertSpan", "Span", "defineSymbol", "replace", "name", "acceptUnicodeChar", "symbols", "defineFunction", "_ref", "names", "props", "handler", "htmlBuilder", "mathmlBuilder", "data", "_functions", "_htmlGroupBuilders", "_mathmlGroupBuilders", "defineFunctionBuilders", "_ref2", "buildHTMLUnbreakable", "children", "options", "body", "makeSpan$1", "strut", "makeEm", "buildHTML", "tree", "tag", "expression", "buildExpression$1", "eqnNum", "parts", "nobreak", "tagChild", "htmlNode", "newDocumentFragment", "DocumentFragment", "buildMathML", "texExpression", "isDisplayMode", "forMathmlOnly", "buildExpression", "wrapper", "MathNode", "utils", "mathMLTree", "annotation", "semantics", "math", "wrapperClass", "buildCommon", "assertNodeType", "node", "assertSymbolNodeType", "typedNode", "checkSymbolNodeType", "NON_ATOMS", "htmlBuilder$9", "elements", "makeSpan", "mathmlBuilder$8", "inner", "cdArrow", "arrowChar", "labels", "parser", "funcName", "cdArrowFunctionName", "leftLabel", "bareArrow", "sizedArrow", "rightLabel", "arrowGroup", "arrow", "parseCD", "parsedRows", "next", "ParseError", "row", "rowNodes", "cell", "newCell", "j", "isStartOfArrow", "labelNum", "inLabel", "k", "isLabelEnd", "wrappedArrow", "cols", "checkDelimiter", "delim", "context", "symDelim", "delimiters", "assertParsed", "defineEnvironment", "_environments", "defineMacro", "_macros", "getHLines", "hlineInfo", "nxt", "getAutoTag", "parseArray", "style", "hskipBeforeAndAfter", "addJot", "arraystretch", "colSeparationType", "autoTag", "singleRow", "emptySingleRow", "maxNumCols", "leqno", "stretch", "rowGaps", "hLinesBeforeRow", "tags", "beginRow", "__name", "endRow", "Token", "dCellStyle", "envName", "sizingGroup", "value", "baseOptions", "multiplier", "pos", "SourceLocation", "contains", "deflt", "uppercase", "hyphenate", "getBaseElem", "isCharacterBox", "assert", "protocolFromUrl", "SETTINGS_SCHEMA", "Settings", "Style", "D", "Dc", "T", "Tc", "S", "Sc", "SS", "SSc", "styles", "sup", "sub", "fracNum", "fracDen", "cramp", "text$1", "Style$1", "hLinePad", "sqrtMain", "sqrtSize1", "sqrtSize2", "sqrtSize3", "sqrtSize4", "phasePath", "sqrtTall", "sqrtPath", "innerPath", "path", "tallDelim", "sizeStyleMap", "sizeMultipliers", "sizeAtStyle", "Options", "ptPerUnit", "relativeUnit", "validUnit", "calculateSize", "createClass", "initNode", "toNode", "toMarkup", "Anchor", "Img", "iCombinations", "SvgNode", "PathNode", "LineNode", "ATOMS", "main", "ams", "accent", "bin", "close", "mathord", "op", "open", "punct", "rel", "spacing", "textord", "ligatures", "mathTextSymbols", "textSymbols", "_ch", "letters", "_ch2", "_i2", "wideChar", "_ch3", "_i3", "_ch4", "_i4", "extraLatin", "_ch5", "_i5", "wideLatinLetterData", "wideNumeralData", "wideCharacterFont", "lookupSymbol", "makeSymbol", "mathsym", "boldsymbol", "makeOrd", "canCombine", "tryCombineChars", "sizeElementFromChildren", "makeSpan$2", "makeSvgSpan", "makeLineSpan", "makeAnchor", "makeFragment", "wrapFragment", "getVListChildrenAndDepth", "makeVList", "makeGlue", "retrieveTextFontName", "fontMap", "svgData", "staticSvg", "thinspace", "mediumspace", "thickspace", "spacings", "tightSpacings", "normalizeArgument", "ordargument", "binLeftCanceller", "binRightCanceller", "styleMap$1", "DomEnum", "traverseNonSpaceNodes", "checkPartialGroup", "getOutermostNode", "getTypeOfDomTree", "makeNullDelimiter", "buildGroup$1", "TextNode", "SpaceNode", "makeText", "makeRow", "getVariant", "buildExpressionRow", "buildGroup", "optionsFromSettings", "displayWrap", "buildTree", "buildHTMLTree", "stretchyCodePoint", "mathMLnode", "katexImagesData", "groupLength", "svgSpan", "encloseSpan", "stretchy", "htmlBuilder$a", "mathmlBuilder$9", "NON_STRETCHY_ACCENT_REGEX", "paddedNode", "binrelClass", "htmlBuilder$8", "mathmlBuilder$7", "globalMap", "checkControlSequence", "getRHS", "letCommand", "getMetrics", "styleWrap", "centerSpan", "makeSmallDelim", "mathrmSize", "makeLargeDelim", "makeGlyphSpan", "makeInner", "lapInEms", "lap", "verts", "doubleVerts", "makeStackedDelim", "vbPad", "emPad", "sqrtSvg", "makeSqrtImage", "stackLargeDelimiters", "stackAlwaysDelimiters", "stackNeverDelimiters", "sizeToMaxHeight", "makeSizedDelim", "stackNeverDelimiterSequence", "stackAlwaysDelimiterSequence", "stackLargeDelimiterSequence", "delimTypeToFont", "traverseSequence", "makeCustomSizedDelim", "makeLeftRightDelim", "delimiter", "delimiterSizes", "htmlBuilder$7", "mathmlBuilder$6", "validateAmsEnvironmentContext", "htmlBuilder$6", "alignMap", "mathmlBuilder$5", "alignedHandler", "environments", "htmlBuilder$5", "mathmlBuilder$4", "fontAliases", "adjustStyle", "htmlBuilder$4", "mathmlBuilder$3", "stylArray", "delimFromValue", "htmlBuilder$3", "mathmlBuilder$2", "sizeData", "chooseMathStyle", "assembleSupSub", "noSuccessor", "htmlBuilder$2", "mathmlBuilder$1", "singleCharBigOps", "singleCharIntegrals", "htmlBuilder$1", "sizeFuncs", "styleMap", "htmlBuilderDelegate", "defaultVariant", "cssSpace", "regularSpace", "pad", "textFontFamilies", "textFontWeights", "textFontShapes", "optionsWithFont", "makeVerb", "functions", "spaceRegexString", "controlWordRegexString", "controlSymbolRegexString", "controlWordWhitespaceRegexString", "controlSpaceRegexString", "combiningDiacriticalMarkString", "combiningDiacriticalMarksEndRegex", "tokenRegexString", "Lexer", "Namespace", "macros", "digitToNumber", "newcommand", "dotsByToken", "spaceAfterDots", "latexRaiseA", "braketHelper", "implicitCommands", "MacroExpander", "unicodeSubRegEx", "uSubsAndSups", "unicodeAccents", "unicodeSymbols", "Parser", "parseTree", "render", "renderToString", "generateParseTree", "renderError", "renderToDomTree", "renderToHTMLTree", "init_katex", "__esmMin", "_SourceLocation", "lexer", "start", "end", "first", "second", "_Token", "loc", "endToken", "_ParseError", "message", "token", "error", "input", "underlined", "left", "right", "self", "list", "elem", "setting", "defaultIfUndefined", "str", "baseElem", "url", "protocol", "color", "def", "defs", "s", "n", "prop", "errorCode", "errorMsg", "strict", "trust", "id", "cramped", "b", "extraVinculum", "y", "x", "viewBoxHeight", "vertSegment", "height", "label", "midHeight", "className", "frag", "markup", "toText", "child", "_Options", "extension", "wantSize", "fontFamily", "fontWeight", "fontShape", "oldOptions", "unit", "sizeValue", "scale", "unitOptions", "classes", "cls", "tagName", "attr", "attribute", "href", "src", "alt", "depth", "italic", "skew", "width", "span", "needsSpan", "escaped", "attributes", "svgNS", "pathName", "alternate", "H", "L", "codePoint", "lookup", "symbolNode", "isFont", "fontOrFamily", "wideFontName", "wideFontClass", "fontClasses", "fontData", "_fontName", "_fontName2", "_fontName3", "prev", "_style", "chars", "maxFontSize", "thickness", "line", "anchor", "fragment", "params", "oldChildren", "_depth", "currPos", "diff", "bottom", "firstChild", "pstrutSize", "pstrut", "realChildren", "minPos", "maxPos", "_child", "_elem", "childWrap", "vlist", "rows", "emptySpan", "depthStrut", "topStrut", "vtable", "measurement", "rule", "baseFontName", "fontStylesName", "svgNode", "arg", "isRealGroup", "surrounding", "groups", "output", "glueOptions", "dummyPrev", "dummyNext", "isRoot", "prevType", "space", "nodes", "callback", "partialGroup", "nonspace", "result", "index", "side", "moreClasses", "groupNode", "isOrdgroup", "lastGroup", "_group", "lastChild", "settings", "katexNode", "mathMLNode", "_htmlNode", "buildSvgSpan_", "viewBoxWidth", "grp", "numChars", "_height", "imgIndex", "spans", "paths", "_minWidth", "_viewBoxHeight", "_height2", "numSvgChildren", "widthClasses", "aligns", "align1", "_path", "_svgNode", "_span", "minWidth", "topPad", "bottomPad", "img", "totalHeight", "lines", "base", "supSubGroup", "mustShift", "baseChar", "baseGroup", "accentBelow", "clearance", "accentBody", "accentFull", "accentWrap", "accentNode", "args", "isStretchy", "isShifty", "innerGroup", "kern", "optArgs", "newOptions", "upperGroup", "arrowPrefix", "lowerGroup", "arrowBody", "arrowShift", "upperShift", "lowerShift", "arrowNode", "upperNode", "lowerNode", "_lowerNode", "atom", "_ref3", "baseArg", "shiftedArg", "mclass", "baseOp", "supsub", "endChar", "parent", "number", "code", "breakOnTokenText", "newLine", "tok", "global", "macro", "numArgs", "insert", "tokens", "_ref4", "middle", "symbol", "toStyle", "delimSizeMultiplier", "shift", "center", "sizeClass", "corner", "heightTotal", "top", "repeat", "svgLabel", "topMetrics", "topHeightTotal", "repeatMetrics", "repeatHeightTotal", "bottomMetrics", "bottomHeightTotal", "middleHeightTotal", "middleFactor", "middleMetrics", "minHeight", "repeatCount", "realHeightTotal", "axisHeight", "stack", "pathStr", "svg", "innerHeight", "_innerHeight", "sqrtName", "pathNode", "sizeMultiplier", "spanHeight", "texHeight", "advanceWidth", "sequence", "heightDepth", "delimType", "delimiterFactor", "delimiterExtend", "maxDistFromAxis", "innerDepth", "hadMiddle", "leftDelim", "middleDelim", "isMiddle", "rightDelim", "colorOptions", "leftNode", "rightNode", "textNode", "middleNode", "imgShift", "isSingleChar", "lineWeight", "angleHeight", "ruleThickness", "fboxsep", "thk", "borderColor", "backgroundColor", "_ref5", "r", "c", "nr", "nc", "hlines", "pt", "arraycolsep", "localMultiplier", "baselineskip", "jot", "arrayskip", "arstrutHeight", "arstrutDepth", "setHLinePos", "hlinesInGap", "inrow", "outrow", "elt", "rowGap", "gap", "offset", "colDescriptions", "colSep", "colDescrNum", "tagSpans", "rw", "tagSpan", "colDescr", "firstSeparator", "lineType", "separator", "_shift", "sepwidth", "col", "_shift2", "dashes", "vListElems", "hline", "lineShift", "eqnNumCol", "tbl", "glue", "table", "menclose", "align", "columnLines", "prevTypeWasAlign", "iStart", "iEnd", "_cols", "rowLines", "separationType", "isSplit", "res", "numMaths", "numCols", "emptyGroup", "arg0", "isAligned", "styling", "ordgroup", "curMaths", "pregap", "symNode", "colalign", "nde", "ca", "colAlign", "payload", "nameGroup", "env", "_args", "endNameToken", "func", "originalStyle", "nstyle", "dstyle", "numerm", "hStrut", "dStrut", "denomm", "ruleWidth", "ruleSpacing", "numShift", "denomShift", "frac", "midShift", "candidateClearance", "delimSize", "isDisplay", "withDelims", "leftOp", "rightOp", "numer", "denom", "hasBarLine", "replaceWith", "delimString", "barNode", "barSize", "styl", "textOrd", "_ref6", "braceBody", "vSpan", "trustContext", "keyVal", "totalheight", "attributeStr", "mathFunction", "muUnit", "dimension", "fix", "outerMode", "supGroup", "subGroup", "slant", "baseShift", "subIsSingleCharacter", "finalGroup", "_bottom", "spacer", "hasLimits", "large", "stash", "oval", "operator", "fName", "childText", "isAllString", "word", "identifier", "defaultRuleThickness", "phantom", "amount", "dy", "smashHeight", "smashDepth", "tbArg", "letter", "smashedNode", "theta", "phi", "lineClearance", "minDelimiterHeight", "delimDepth", "rootm", "toShift", "rootVList", "rootVListWrap", "newStyle", "styleAttributes", "delegate", "_delegate", "isSup", "builderDelegate", "valueBase", "valueSup", "valueSub", "supm", "subm", "supShift", "subShift", "_newOptions", "minSupShift", "marginRight", "marginLeft", "isOiint", "maxWidth", "psi", "vlistElem", "_vlistElem", "isBrace", "isOver", "nodeType", "_base2", "_base", "variant", "ord", "padNode", "char", "nlIndex", "builtins", "globalMacros", "undefs", "undef", "t", "nextToken", "digit", "existsOK", "nonexistsOK", "exists", "argText", "thedots", "one", "middleDouble", "oldMiddle", "oldMiddleDouble", "midMacro", "double", "doubled", "expanded", "newMode", "isOptional", "delims", "isDelimited", "expandableOnly", "topToken", "expansion", "oldStackLength", "definition", "catcode", "stripped", "bodyLexer", "_Parser", "consume", "parse", "oldToken", "breakOnInfix", "lex", "overIndex", "numerNode", "denomNode", "numerBody", "denomBody", "symbolToken", "textordArray", "colorNode", "superscript", "subscript", "limits", "prime", "primes", "isSub", "subsupTokens", "funcData", "totalArgs", "argType", "optional", "modeName", "argToken", "regex", "firstToken", "lastToken", "isBlank", "groupEnd", "a", "v", "nucleus", "star", "family", "command", "toParse", "baseNode", "setupDompurifyHooks", "TEMPORARY_ATTRIBUTE", "DOMPurify", "node", "import_dompurify", "lineBreakRegex", "getRows", "setupDompurifyHooksIfNotSetup", "removeScript", "sanitizeMore", "sanitizeText", "sanitizeTextOrArray", "hasBreaks", "splitBreaks", "placeholderToBreak", "breakToPlaceholder", "getUrl", "evaluate", "getMax", "getMin", "parseGenericTypes", "countOccurrence", "shouldCombineSets", "processSet", "isMathMLSupported", "katexRegex", "hasKatex", "calculateMathMLDimensions", "renderKatex", "common_default", "init_common", "__esmMin", "__name", "s", "setup", "txt", "text", "config", "level", "a", "x", "useAbsolute", "url", "val", "values", "newValues", "value", "input", "inputSets", "output", "i", "thisSet", "previousSet", "nextSet", "string", "substring", "prevCount", "nextCount", "tildeCount", "hasStartingTilde", "chars", "first", "last", "divElem", "dim", "katex", "outputMode", "line", "_", "c", "d3Attrs", "calculateSvgSizeAttrs", "configureSvgSize", "setupGraphViewbox", "init_setupGraphViewbox", "__esmMin", "init_logger", "__name", "d3Elem", "attrs", "attr", "height", "width", "useMaxWidth", "svgElem", "graph", "padding", "svgBounds", "sWidth", "sHeight", "log", "vBox", "themes", "getStyles", "addStylesForDiagram", "styles_default", "init_styles", "__esmMin", "init_logger", "__name", "type", "userStyles", "options", "diagramStyles", "log", "diagramTheme", "commonDb_exports", "__export", "clear", "getAccDescription", "getAccTitle", "getDiagramTitle", "setAccDescription", "setAccTitle", "setDiagramTitle", "accTitle", "diagramTitle", "accDescription", "sanitizeText", "init_commonDb", "__esmMin", "init_common", "init_config", "__name", "txt", "getConfig", "log", "setLogLevel", "getConfig", "setConfig", "defaultConfig", "sanitizeText", "setupGraphViewbox", "getCommonDb", "diagrams", "registerDiagram", "getDiagram", "DiagramNotFoundError", "init_diagramAPI", "__esmMin", "init_detectType", "init_logger", "init_config", "init_common", "init_setupGraphViewbox", "init_styles", "init_commonDb", "__name", "text", "commonDb_exports", "id", "diagram", "detector", "addDetector", "addStylesForDiagram", "name", "c4ShapeArray", "boundaryParseStack", "currentBoundaryParse", "parentBoundaryParse", "boundaries", "rels", "title", "wrapEnabled", "c4ShapeInRow", "c4BoundaryInRow", "c4Type", "getC4Type", "setC4Type", "addRel", "addPersonOrSystem", "addContainer", "addComponent", "addPersonOrSystemBoundary", "addContainerBoundary", "addDeploymentNode", "popBoundaryParseStack", "updateElStyle", "updateRelStyle", "updateLayoutConfig", "getC4ShapeInRow", "getC4BoundaryInRow", "getCurrentBoundaryParse", "getParentBoundaryParse", "getC4ShapeArray", "getC4Shape", "getC4ShapeKeys", "getBoundaries", "getBoundarys", "getRels", "getTitle", "setWrap", "autoWrap", "clear", "LINETYPE", "ARROWTYPE", "PLACEMENT", "setTitle", "c4Db_default", "init_c4Db", "__esmMin", "init_diagramAPI", "init_common", "init_commonDb", "__name", "c4TypeParam", "sanitizeText", "getConfig", "type", "from", "to", "label", "techn", "descr", "sprite", "tags", "link", "rel", "old", "key", "value", "typeC4Shape", "alias", "personOrSystem", "container", "component", "boundary", "nodeType", "elementName", "bgColor", "fontColor", "borderColor", "shadowing", "shape", "legendText", "legendSprite", "element", "textColor", "lineColor", "offsetX", "offsetY", "c4ShapeInRowParam", "c4BoundaryInRowParam", "c4ShapeInRowValue", "c4BoundaryInRowValue", "parentBoundary", "wrapSetting", "txt", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "ascending", "a", "b", "init_ascending", "__esmMin", "__name", "descending", "a", "b", "init_descending", "__esmMin", "__name", "bisector", "f", "compare1", "compare2", "delta", "ascending", "__name", "d", "x", "descending", "zero", "left", "a", "lo", "hi", "mid", "right", "center", "i", "init_bisector", "__esmMin", "init_ascending", "init_descending", "number", "x", "init_number", "__esmMin", "__name", "ascendingBisect", "bisectRight", "bisectLeft", "bisectCenter", "bisect_default", "init_bisect", "__esmMin", "init_ascending", "init_bisector", "init_number", "bisector", "ascending", "number", "intern_get", "_intern", "_key", "value", "key", "intern_set", "intern_delete", "keyof", "InternMap", "init_src", "__esmMin", "__name", "entries", "tickSpec", "start", "stop", "count", "step", "power", "error", "factor", "e10", "e5", "e2", "i1", "i2", "inc", "ticks", "reverse", "n", "i", "tickIncrement", "tickStep", "init_ticks", "__esmMin", "__name", "max", "values", "valueof", "value", "index", "init_max", "__esmMin", "__name", "min", "values", "valueof", "value", "index", "init_min", "__esmMin", "__name", "range", "start", "stop", "step", "n", "i", "init_range", "__esmMin", "__name", "init_src", "__esmMin", "init_bisect", "init_bisector", "init_max", "init_min", "init_range", "init_ticks", "identity_default", "x", "init_identity", "__esmMin", "__name", "translateX", "x", "translateY", "y", "number", "scale", "d", "center", "offset", "entering", "axis", "orient", "tickArguments", "tickValues", "tickFormat", "tickSizeInner", "tickSizeOuter", "tickPadding", "k", "top", "left", "right", "transform", "bottom", "context", "values", "format", "identity_default", "spacing", "range", "range0", "range1", "position", "selection", "path", "tick", "tickExit", "tickEnter", "line", "text", "epsilon", "p", "__name", "_", "axisTop", "axisBottom", "init_axis", "__esmMin", "init_identity", "init_src", "__esmMin", "init_axis", "dispatch", "i", "n", "_", "t", "Dispatch", "parseTypenames", "typenames", "types", "name", "get", "type", "c", "set", "callback", "noop", "dispatch_default", "init_dispatch", "__esmMin", "__name", "typename", "T", "copy", "that", "args", "init_src", "__esmMin", "init_dispatch", "xhtml", "namespaces_default", "init_namespaces", "__esmMin", "namespace_default", "name", "prefix", "i", "namespaces_default", "init_namespace", "__esmMin", "init_namespaces", "__name", "creatorInherit", "name", "document", "uri", "xhtml", "creatorFixed", "fullname", "creator_default", "namespace_default", "init_creator", "__esmMin", "init_namespace", "init_namespaces", "__name", "none", "selector_default", "selector", "init_selector", "__esmMin", "__name", "select_default", "select", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "Selection", "init_select", "__esmMin", "init_selection", "init_selector", "__name", "array", "x", "init_array", "__esmMin", "__name", "empty", "selectorAll_default", "selector", "init_selectorAll", "__esmMin", "__name", "arrayAll", "select", "array", "selectAll_default", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "Selection", "init_selectAll", "__esmMin", "init_selection", "init_array", "init_selectorAll", "__name", "matcher_default", "selector", "childMatcher", "node", "init_matcher", "__esmMin", "__name", "childFind", "match", "find", "childFirst", "selectChild_default", "childMatcher", "init_selectChild", "__esmMin", "init_matcher", "__name", "children", "childrenFilter", "match", "filter", "selectChildren_default", "childMatcher", "init_selectChildren", "__esmMin", "init_matcher", "__name", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Selection", "init_filter", "__esmMin", "init_selection", "init_matcher", "__name", "sparse_default", "update", "init_sparse", "__esmMin", "__name", "enter_default", "Selection", "sparse_default", "EnterNode", "parent", "datum", "init_enter", "__esmMin", "init_sparse", "init_selection", "__name", "child", "next", "selector", "constant_default", "x", "init_constant", "__esmMin", "__name", "bindIndex", "parent", "group", "enter", "update", "exit", "data", "i", "node", "groupLength", "dataLength", "EnterNode", "bindKey", "key", "nodeByKeyValue", "keyValues", "keyValue", "datum", "data_default", "value", "bind", "parents", "groups", "constant_default", "m", "j", "arraylike", "enterGroup", "updateGroup", "exitGroup", "i0", "i1", "previous", "next", "Selection", "init_data", "__esmMin", "init_selection", "init_enter", "init_constant", "__name", "exit_default", "Selection", "sparse_default", "init_exit", "__esmMin", "init_sparse", "init_selection", "__name", "join_default", "onenter", "onupdate", "onexit", "enter", "update", "exit", "init_join", "__esmMin", "__name", "merge_default", "context", "selection", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Selection", "init_merge", "__esmMin", "init_selection", "__name", "order_default", "groups", "j", "m", "group", "next", "node", "init_order", "__esmMin", "__name", "sort_default", "compare", "ascending", "compareNode", "a", "b", "__name", "groups", "m", "sortgroups", "j", "group", "n", "sortgroup", "node", "i", "Selection", "init_sort", "__esmMin", "init_selection", "call_default", "callback", "init_call", "__esmMin", "__name", "nodes_default", "init_nodes", "__esmMin", "__name", "node_default", "groups", "j", "m", "group", "n", "node", "init_node", "__esmMin", "__name", "size_default", "size", "node", "init_size", "__esmMin", "__name", "empty_default", "init_empty", "__esmMin", "__name", "each_default", "callback", "groups", "j", "m", "group", "i", "n", "node", "init_each", "__esmMin", "__name", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "value", "attrConstantNS", "attrFunction", "v", "attrFunctionNS", "attr_default", "namespace_default", "node", "init_attr", "__esmMin", "init_namespace", "__name", "window_default", "node", "init_window", "__esmMin", "__name", "styleRemove", "name", "styleConstant", "value", "priority", "styleFunction", "v", "style_default", "styleValue", "node", "window_default", "init_style", "__esmMin", "init_window", "__name", "propertyRemove", "name", "propertyConstant", "value", "propertyFunction", "v", "property_default", "init_property", "__esmMin", "__name", "classArray", "string", "classList", "node", "ClassList", "classedAdd", "names", "list", "i", "n", "classedRemove", "classedTrue", "classedFalse", "classedFunction", "value", "classed_default", "name", "init_classed", "__esmMin", "__name", "textRemove", "textConstant", "value", "textFunction", "v", "text_default", "init_text", "__esmMin", "__name", "htmlRemove", "htmlConstant", "value", "htmlFunction", "v", "html_default", "init_html", "__esmMin", "__name", "raise", "raise_default", "init_raise", "__esmMin", "__name", "lower", "lower_default", "init_lower", "__esmMin", "__name", "append_default", "name", "create", "creator_default", "init_append", "__esmMin", "init_creator", "__name", "constantNull", "insert_default", "name", "before", "create", "creator_default", "select", "selector_default", "init_insert", "__esmMin", "init_creator", "init_selector", "__name", "remove", "parent", "remove_default", "init_remove", "__esmMin", "__name", "selection_cloneShallow", "clone", "parent", "selection_cloneDeep", "clone_default", "deep", "init_clone", "__esmMin", "__name", "datum_default", "value", "init_datum", "__esmMin", "__name", "contextListener", "listener", "event", "parseTypenames", "typenames", "t", "name", "i", "onRemove", "typename", "on", "j", "m", "o", "onAdd", "value", "options", "on_default", "n", "init_on", "__esmMin", "__name", "dispatchEvent", "node", "type", "params", "window", "window_default", "event", "dispatchConstant", "dispatchFunction", "dispatch_default", "init_dispatch", "__esmMin", "init_window", "__name", "iterator_default", "groups", "j", "m", "group", "n", "node", "init_iterator", "__esmMin", "__name", "Selection", "groups", "parents", "selection", "root", "selection_selection", "selection_default", "init_selection", "__esmMin", "init_select", "init_selectAll", "init_selectChild", "init_selectChildren", "init_filter", "init_data", "init_enter", "init_exit", "init_join", "init_merge", "init_order", "init_sort", "init_call", "init_nodes", "init_node", "init_size", "init_empty", "init_each", "init_attr", "init_style", "init_property", "init_classed", "init_text", "init_html", "init_raise", "init_lower", "init_append", "init_insert", "init_remove", "init_clone", "init_datum", "init_on", "init_dispatch", "init_iterator", "__name", "select_default", "selectAll_default", "selectChild_default", "selectChildren_default", "filter_default", "data_default", "enter_default", "exit_default", "join_default", "merge_default", "order_default", "sort_default", "call_default", "nodes_default", "node_default", "size_default", "empty_default", "each_default", "attr_default", "style_default", "property_default", "classed_default", "text_default", "html_default", "raise_default", "lower_default", "append_default", "insert_default", "remove_default", "clone_default", "datum_default", "on_default", "dispatch_default", "iterator_default", "select_default", "selector", "Selection", "root", "init_select", "__esmMin", "init_selection", "__name", "init_src", "__esmMin", "init_matcher", "init_namespace", "init_select", "init_selection", "init_selector", "init_selectorAll", "init_style", "init_src", "__esmMin", "define_default", "constructor", "factory", "prototype", "extend", "parent", "definition", "key", "init_define", "__esmMin", "__name", "Color", "color_formatHex", "color_formatHex8", "color_formatHsl", "hslConvert", "color_formatRgb", "color", "format", "m", "l", "reHex", "rgbn", "Rgb", "rgba", "reRgbInteger", "reRgbPercent", "reRgbaInteger", "reRgbaPercent", "reHslPercent", "hsla", "reHslaPercent", "named", "n", "r", "g", "b", "a", "rgbConvert", "o", "rgb", "opacity", "rgb_formatHex", "hex", "rgb_formatHex8", "rgb_formatRgb", "clampa", "clampi", "value", "h", "s", "Hsl", "min", "max", "hsl", "clamph", "clampt", "hsl2rgb", "m1", "m2", "darker", "brighter", "reI", "reN", "reP", "init_color", "__esmMin", "init_define", "__name", "define_default", "channels", "extend", "k", "radians", "degrees", "init_math", "__esmMin", "labConvert", "o", "Lab", "Hcl", "hcl2lab", "Rgb", "rgbConvert", "r", "rgb2lrgb", "g", "b", "y", "xyz2lab", "Yn", "x", "z", "Xn", "Zn", "lab", "l", "a", "opacity", "t3", "t2", "t0", "lab2xyz", "t1", "lrgb2rgb", "hclConvert", "h", "degrees", "hcl", "c", "radians", "K", "init_lab", "__esmMin", "init_define", "init_color", "init_math", "__name", "define_default", "extend", "Color", "k", "init_src", "__esmMin", "init_color", "init_lab", "basis", "t1", "v0", "v1", "v2", "v3", "t2", "t3", "basis_default", "values", "n", "t", "i", "init_basis", "__esmMin", "__name", "basisClosed_default", "values", "n", "t", "i", "v0", "v1", "v2", "v3", "basis", "init_basisClosed", "__esmMin", "init_basis", "__name", "constant_default", "init_constant", "__esmMin", "__name", "x", "linear", "a", "d", "t", "exponential", "b", "y", "hue", "constant_default", "gamma", "nogamma", "init_color", "__esmMin", "init_constant", "__name", "rgbSpline", "spline", "colors", "n", "r", "g", "b", "i", "color", "rgb", "t", "rgb_default", "rgbBasis", "rgbBasisClosed", "init_rgb", "__esmMin", "init_src", "init_basis", "init_basisClosed", "init_color", "__name", "rgbGamma", "y", "gamma", "start", "end", "opacity", "nogamma", "basis_default", "basisClosed_default", "numberArray_default", "a", "b", "n", "c", "t", "isNumberArray", "x", "init_numberArray", "__esmMin", "__name", "genericArray", "a", "b", "nb", "na", "x", "c", "i", "value_default", "t", "init_array", "__esmMin", "init_value", "__name", "date_default", "a", "b", "d", "t", "init_date", "__esmMin", "__name", "number_default", "a", "b", "t", "init_number", "__esmMin", "__name", "object_default", "a", "b", "i", "c", "k", "value_default", "t", "init_object", "__esmMin", "init_value", "__name", "zero", "b", "one", "t", "string_default", "a", "bi", "reA", "reB", "am", "bm", "bs", "i", "s", "q", "number_default", "o", "init_string", "__esmMin", "init_number", "__name", "value_default", "a", "b", "t", "c", "constant_default", "number_default", "color", "rgb_default", "string_default", "date_default", "isNumberArray", "numberArray_default", "genericArray", "object_default", "init_value", "__esmMin", "init_src", "init_rgb", "init_array", "init_date", "init_number", "init_object", "init_string", "init_constant", "init_numberArray", "__name", "round_default", "a", "b", "t", "init_round", "__esmMin", "__name", "decompose_default", "a", "b", "c", "d", "e", "f", "scaleX", "scaleY", "skewX", "degrees", "identity", "init_decompose", "__esmMin", "__name", "parseCss", "value", "m", "identity", "decompose_default", "parseSvg", "svgNode", "init_parse", "__esmMin", "init_decompose", "__name", "interpolateTransform", "parse", "pxComma", "pxParen", "degParen", "pop", "s", "__name", "translate", "xa", "ya", "xb", "yb", "q", "i", "number_default", "rotate", "a", "b", "skewX", "scale", "t", "n", "o", "interpolateTransformCss", "interpolateTransformSvg", "init_transform", "__esmMin", "init_number", "init_parse", "parseCss", "parseSvg", "hcl", "hue", "start", "end", "h", "c", "nogamma", "l", "opacity", "t", "hcl_default", "hclLong", "init_hcl", "__esmMin", "init_src", "init_color", "__name", "init_src", "__esmMin", "init_value", "init_number", "init_round", "init_string", "init_transform", "init_rgb", "init_hcl", "now", "clockNow", "setFrame", "clearNow", "clock", "clockSkew", "Timer", "timer", "callback", "delay", "time", "t", "timerFlush", "frame", "taskHead", "wake", "clockLast", "timeout", "nap", "poke", "pokeDelay", "t0", "t1", "t2", "taskTail", "sleep", "interval", "init_timer", "__esmMin", "f", "__name", "timeout_default", "callback", "delay", "time", "t", "Timer", "elapsed", "init_timeout", "__esmMin", "init_timer", "__name", "init_src", "__esmMin", "init_timer", "init_timeout", "schedule_default", "node", "name", "id", "index", "group", "timing", "schedules", "create", "emptyOn", "emptyTween", "CREATED", "init", "schedule", "get", "set", "STARTED", "self", "tween", "timer", "elapsed", "SCHEDULED", "start", "__name", "i", "j", "n", "o", "stop", "timeout_default", "RUNNING", "ENDED", "tick", "STARTING", "t", "ENDING", "init_schedule", "__esmMin", "init_src", "dispatch_default", "interrupt_default", "node", "name", "schedules", "schedule", "active", "empty", "i", "STARTING", "ENDING", "ENDED", "init_interrupt", "__esmMin", "init_schedule", "__name", "interrupt_default", "name", "init_interrupt", "__esmMin", "__name", "tweenRemove", "id", "name", "tween0", "tween1", "schedule", "set", "tween", "i", "n", "tweenFunction", "value", "t", "tween_default", "get", "tweenValue", "transition", "node", "init_tween", "__esmMin", "init_schedule", "__name", "interpolate_default", "a", "b", "c", "number_default", "color", "rgb_default", "string_default", "init_interpolate", "__esmMin", "init_src", "__name", "attrRemove", "name", "attrRemoveNS", "fullname", "attrConstant", "interpolate", "value1", "string00", "string1", "interpolate0", "string0", "attrConstantNS", "attrFunction", "value", "string10", "attrFunctionNS", "attr_default", "namespace_default", "i", "interpolateTransformSvg", "interpolate_default", "tweenValue", "init_attr", "__esmMin", "init_src", "init_tween", "init_interpolate", "__name", "attrInterpolate", "name", "i", "t", "attrInterpolateNS", "fullname", "attrTweenNS", "value", "t0", "i0", "tween", "__name", "attrTween", "attrTween_default", "key", "namespace_default", "init_attrTween", "__esmMin", "init_src", "delayFunction", "id", "value", "init", "delayConstant", "delay_default", "get", "init_delay", "__esmMin", "init_schedule", "__name", "durationFunction", "id", "value", "set", "durationConstant", "duration_default", "get", "init_duration", "__esmMin", "init_schedule", "__name", "easeConstant", "id", "value", "set", "ease_default", "get", "init_ease", "__esmMin", "init_schedule", "__name", "easeVarying", "id", "value", "v", "set", "easeVarying_default", "init_easeVarying", "__esmMin", "init_schedule", "__name", "filter_default", "match", "matcher_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "i", "Transition", "init_filter", "__esmMin", "init_src", "init_transition", "__name", "merge_default", "transition", "groups0", "groups1", "m0", "m1", "m", "merges", "j", "group0", "group1", "n", "merge", "node", "i", "Transition", "init_merge", "__esmMin", "init_transition", "__name", "start", "name", "t", "i", "onFunction", "id", "listener", "on0", "on1", "sit", "init", "set", "schedule", "on", "on_default", "get", "init_on", "__esmMin", "init_schedule", "__name", "removeFunction", "id", "parent", "i", "remove_default", "init_remove", "__esmMin", "__name", "select_default", "select", "name", "id", "selector_default", "groups", "m", "subgroups", "j", "group", "n", "subgroup", "node", "subnode", "i", "schedule_default", "get", "Transition", "init_select", "__esmMin", "init_src", "init_transition", "init_schedule", "__name", "selectAll_default", "select", "name", "id", "selectorAll_default", "groups", "m", "subgroups", "parents", "j", "group", "n", "node", "i", "children", "child", "inherit", "get", "k", "l", "schedule_default", "Transition", "init_selectAll", "__esmMin", "init_src", "init_transition", "init_schedule", "__name", "selection_default", "Selection", "init_selection", "__esmMin", "init_src", "__name", "styleNull", "name", "interpolate", "string00", "string10", "interpolate0", "string0", "styleValue", "string1", "styleRemove", "styleConstant", "value1", "styleFunction", "value", "styleMaybeRemove", "id", "on0", "on1", "listener0", "key", "event", "remove", "schedule", "set", "on", "listener", "style_default", "priority", "i", "interpolateTransformCss", "interpolate_default", "tweenValue", "init_style", "__esmMin", "init_src", "init_schedule", "init_tween", "init_interpolate", "__name", "styleInterpolate", "name", "i", "priority", "t", "styleTween", "value", "i0", "tween", "__name", "styleTween_default", "key", "init_styleTween", "__esmMin", "textConstant", "value", "textFunction", "value1", "text_default", "tweenValue", "init_text", "__esmMin", "init_tween", "__name", "textInterpolate", "i", "t", "textTween", "value", "t0", "i0", "tween", "__name", "textTween_default", "key", "init_textTween", "__esmMin", "transition_default", "name", "id0", "id1", "newId", "groups", "m", "j", "group", "n", "node", "i", "inherit", "get", "schedule_default", "Transition", "init_transition", "__esmMin", "init_schedule", "__name", "end_default", "on0", "on1", "that", "id", "size", "resolve", "reject", "cancel", "end", "__name", "schedule", "set", "on", "init_end", "__esmMin", "init_schedule", "Transition", "groups", "parents", "name", "id", "transition", "selection_default", "newId", "selection_prototype", "init_transition", "__esmMin", "init_src", "init_attr", "init_attrTween", "init_delay", "init_duration", "init_ease", "init_easeVarying", "init_filter", "init_merge", "init_on", "init_remove", "init_select", "init_selectAll", "init_selection", "init_style", "init_styleTween", "init_text", "init_textTween", "init_tween", "init_end", "__name", "select_default", "selectAll_default", "filter_default", "merge_default", "transition_default", "on_default", "attr_default", "attrTween_default", "style_default", "styleTween_default", "text_default", "textTween_default", "remove_default", "tween_default", "delay_default", "duration_default", "ease_default", "easeVarying_default", "end_default", "cubicInOut", "init_cubic", "__esmMin", "__name", "init_src", "__esmMin", "init_cubic", "inherit", "node", "id", "timing", "transition_default", "name", "Transition", "newId", "defaultTiming", "now", "groups", "m", "j", "group", "n", "i", "schedule_default", "init_transition", "__esmMin", "init_schedule", "init_src", "cubicInOut", "__name", "init_selection", "__esmMin", "init_src", "init_interrupt", "init_transition", "selection_default", "interrupt_default", "transition_default", "init_src", "__esmMin", "init_selection", "init_constant", "__esmMin", "init_event", "__esmMin", "init_noevent", "__esmMin", "number1", "e", "number2", "type", "abs", "max", "min", "X", "Y", "XY", "init_brush", "__esmMin", "init_src", "init_constant", "init_event", "init_noevent", "__name", "x", "xy", "y", "init_src", "__esmMin", "init_brush", "append", "strings", "i", "n", "appendRound", "digits", "d", "k", "path", "Path", "pi", "tau", "epsilon", "tauEpsilon", "init_path", "__esmMin", "__name", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "init_src", "__esmMin", "init_path", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "formatDecimal_default", "x", "formatDecimalParts", "p", "i", "coefficient", "init_formatDecimal", "__esmMin", "__name", "exponent_default", "x", "formatDecimalParts", "init_exponent", "__esmMin", "init_formatDecimal", "__name", "formatGroup_default", "grouping", "thousands", "value", "width", "t", "j", "g", "length", "init_formatGroup", "__esmMin", "__name", "formatNumerals_default", "numerals", "value", "i", "init_formatNumerals", "__esmMin", "__name", "formatSpecifier", "specifier", "match", "re", "FormatSpecifier", "init_formatSpecifier", "__esmMin", "__name", "formatTrim_default", "s", "out", "n", "i", "i0", "i1", "init_formatTrim", "__esmMin", "__name", "formatPrefixAuto_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "i", "prefixExponent", "n", "init_formatPrefixAuto", "__esmMin", "init_formatDecimal", "__name", "formatRounded_default", "x", "p", "d", "formatDecimalParts", "coefficient", "exponent", "init_formatRounded", "__esmMin", "init_formatDecimal", "__name", "formatTypes_default", "init_formatTypes", "__esmMin", "init_formatDecimal", "init_formatPrefixAuto", "init_formatRounded", "__name", "x", "p", "formatDecimal_default", "formatRounded_default", "formatPrefixAuto_default", "identity_default", "x", "init_identity", "__esmMin", "__name", "locale_default", "locale", "group", "identity_default", "formatGroup_default", "map", "currencyPrefix", "currencySuffix", "decimal", "numerals", "formatNumerals_default", "percent", "minus", "nan", "newFormat", "specifier", "formatSpecifier", "fill", "align", "sign", "symbol", "zero", "width", "comma", "precision", "trim", "type", "formatTypes_default", "prefix", "suffix", "formatType", "maybeSuffix", "format", "value", "valuePrefix", "valueSuffix", "i", "n", "c", "valueNegative", "formatTrim_default", "prefixes", "prefixExponent", "length", "padding", "__name", "formatPrefix", "f", "e", "exponent_default", "k", "init_locale", "__esmMin", "init_exponent", "init_formatGroup", "init_formatNumerals", "init_formatSpecifier", "init_formatTrim", "init_formatTypes", "init_formatPrefixAuto", "init_identity", "defaultLocale", "definition", "locale", "locale_default", "format", "formatPrefix", "init_defaultLocale", "__esmMin", "init_locale", "__name", "precisionFixed_default", "step", "exponent_default", "init_precisionFixed", "__esmMin", "init_exponent", "__name", "precisionPrefix_default", "step", "value", "exponent_default", "init_precisionPrefix", "__esmMin", "init_exponent", "__name", "precisionRound_default", "step", "max", "exponent_default", "init_precisionRound", "__esmMin", "init_exponent", "__name", "init_src", "__esmMin", "init_defaultLocale", "init_formatSpecifier", "init_precisionFixed", "init_precisionPrefix", "init_precisionRound", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "init_src", "__esmMin", "initRange", "domain", "range", "init_init", "__esmMin", "__name", "ordinal", "index", "InternMap", "domain", "range", "unknown", "implicit", "scale", "d", "i", "__name", "_", "value", "initRange", "init_ordinal", "__esmMin", "init_src", "init_init", "band", "scale", "ordinal", "domain", "ordinalRange", "r0", "r1", "step", "bandwidth", "round", "paddingInner", "paddingOuter", "align", "rescale", "n", "reverse", "start", "stop", "values", "range", "i", "__name", "_", "initRange", "init_band", "__esmMin", "init_src", "init_init", "init_ordinal", "constants", "x", "init_constant", "__esmMin", "__name", "number", "x", "init_number", "__esmMin", "__name", "identity", "x", "normalize", "a", "b", "constants", "clamper", "t", "bimap", "domain", "range", "interpolate", "d0", "d1", "r0", "r1", "polymap", "j", "d", "r", "i", "bisect_default", "copy", "source", "target", "transformer", "unit", "value_default", "transform", "untransform", "unknown", "clamp", "piecewise", "output", "input", "rescale", "n", "scale", "__name", "y", "number_default", "_", "number", "round_default", "u", "continuous", "init_continuous", "__esmMin", "init_src", "init_constant", "init_number", "tickFormat", "start", "stop", "count", "specifier", "step", "tickStep", "precision", "formatSpecifier", "value", "precisionPrefix_default", "formatPrefix", "precisionRound_default", "precisionFixed_default", "format", "init_tickFormat", "__esmMin", "init_src", "__name", "linearish", "scale", "domain", "count", "d", "ticks", "specifier", "tickFormat", "i0", "i1", "start", "stop", "prestep", "step", "maxIter", "tickIncrement", "linear", "continuous", "copy", "initRange", "init_linear", "__esmMin", "init_src", "init_continuous", "init_init", "init_tickFormat", "__name", "nice", "domain", "interval", "i0", "i1", "x0", "x1", "t", "init_nice", "__esmMin", "__name", "timeInterval", "floori", "offseti", "count", "field", "interval", "date", "__name", "d0", "d1", "step", "start", "stop", "range", "previous", "test", "end", "t0", "t1", "d", "init_interval", "__esmMin", "millisecond", "milliseconds", "init_millisecond", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "k", "second", "seconds", "init_second", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeMinute", "timeMinutes", "utcMinute", "utcMinutes", "init_minute", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeHour", "timeHours", "utcHour", "utcHours", "init_hour", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeDay", "timeDays", "utcDay", "utcDays", "unixDay", "unixDays", "init_day", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeWeekday", "i", "timeInterval", "date", "step", "start", "end", "utcWeekday", "timeSunday", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSundays", "timeMondays", "timeTuesdays", "timeWednesdays", "timeThursdays", "timeFridays", "timeSaturdays", "utcSunday", "utcMonday", "utcTuesday", "utcWednesday", "utcThursday", "utcFriday", "utcSaturday", "utcSundays", "utcMondays", "utcTuesdays", "utcWednesdays", "utcThursdays", "utcFridays", "utcSaturdays", "init_week", "__esmMin", "init_interval", "__name", "timeMonth", "timeMonths", "utcMonth", "utcMonths", "init_month", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "timeYear", "timeYears", "utcYear", "utcYears", "init_year", "__esmMin", "init_interval", "timeInterval", "date", "step", "start", "end", "k", "ticker", "year", "month", "week", "day", "hour", "minute", "tickIntervals", "second", "ticks", "start", "stop", "count", "reverse", "interval", "tickInterval", "__name", "target", "i", "bisector", "step", "tickStep", "millisecond", "t", "utcTicks", "utcTickInterval", "timeTicks", "timeTickInterval", "init_ticks", "__esmMin", "init_src", "init_millisecond", "init_second", "init_minute", "init_hour", "init_day", "init_week", "init_month", "init_year", "utcYear", "utcMonth", "utcSunday", "unixDay", "utcHour", "utcMinute", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "init_src", "__esmMin", "init_millisecond", "init_second", "init_minute", "init_hour", "init_day", "init_week", "init_month", "init_year", "init_ticks", "localDate", "d", "date", "utcDate", "newDate", "y", "m", "formatLocale", "locale", "locale_dateTime", "locale_date", "locale_time", "locale_periods", "locale_weekdays", "locale_shortWeekdays", "locale_months", "locale_shortMonths", "periodRe", "formatRe", "periodLookup", "formatLookup", "weekdayRe", "weekdayLookup", "shortWeekdayRe", "shortWeekdayLookup", "monthRe", "monthLookup", "shortMonthRe", "shortMonthLookup", "formats", "formatShortWeekday", "formatWeekday", "formatShortMonth", "formatMonth", "formatDayOfMonth", "formatMicroseconds", "formatYearISO", "formatFullYearISO", "formatHour24", "formatHour12", "formatDayOfYear", "formatMilliseconds", "formatMonthNumber", "formatMinutes", "formatPeriod", "formatQuarter", "formatUnixTimestamp", "formatUnixTimestampSeconds", "formatSeconds", "formatWeekdayNumberMonday", "formatWeekNumberSunday", "formatWeekNumberISO", "formatWeekdayNumberSunday", "formatWeekNumberMonday", "formatYear", "formatFullYear", "formatZone", "formatLiteralPercent", "utcFormats", "formatUTCShortWeekday", "formatUTCWeekday", "formatUTCShortMonth", "formatUTCMonth", "formatUTCDayOfMonth", "formatUTCMicroseconds", "formatUTCYearISO", "formatUTCFullYearISO", "formatUTCHour24", "formatUTCHour12", "formatUTCDayOfYear", "formatUTCMilliseconds", "formatUTCMonthNumber", "formatUTCMinutes", "formatUTCPeriod", "formatUTCQuarter", "formatUTCSeconds", "formatUTCWeekdayNumberMonday", "formatUTCWeekNumberSunday", "formatUTCWeekNumberISO", "formatUTCWeekdayNumberSunday", "formatUTCWeekNumberMonday", "formatUTCYear", "formatUTCFullYear", "formatUTCZone", "parses", "parseShortWeekday", "parseWeekday", "parseShortMonth", "parseMonth", "parseLocaleDateTime", "parseDayOfMonth", "parseMicroseconds", "parseYear", "parseFullYear", "parseHour24", "parseDayOfYear", "parseMilliseconds", "parseMonthNumber", "parseMinutes", "parsePeriod", "parseQuarter", "parseUnixTimestamp", "parseUnixTimestampSeconds", "parseSeconds", "parseWeekdayNumberMonday", "parseWeekNumberSunday", "parseWeekNumberISO", "parseWeekdayNumberSunday", "parseWeekNumberMonday", "parseLocaleDate", "parseLocaleTime", "parseZone", "parseLiteralPercent", "newFormat", "specifier", "string", "i", "j", "n", "c", "pad", "format", "pads", "__name", "newParse", "Z", "parseSpecifier", "week", "day", "utcMonday", "utcDay", "timeMonday", "timeDay", "parse", "f", "p", "value", "fill", "width", "sign", "length", "requote", "s", "requoteRe", "names", "name", "numberRe", "percentRe", "timeYear", "timeSunday", "dISO", "timeThursday", "z", "utcYear", "dow", "utcSunday", "UTCdISO", "utcThursday", "init_locale", "__esmMin", "init_src", "defaultLocale", "definition", "locale", "formatLocale", "timeFormat", "timeParse", "utcFormat", "utcParse", "init_defaultLocale", "__esmMin", "init_locale", "__name", "init_src", "__esmMin", "init_defaultLocale", "date", "number", "calendar", "ticks", "tickInterval", "year", "month", "week", "day", "hour", "minute", "second", "format", "scale", "continuous", "invert", "domain", "formatMillisecond", "formatSecond", "formatMinute", "formatHour", "formatDay", "formatWeek", "formatMonth", "formatYear", "tickFormat", "__name", "y", "_", "interval", "d", "count", "specifier", "nice", "copy", "time", "initRange", "timeTicks", "timeTickInterval", "timeYear", "timeMonth", "timeSunday", "timeDay", "timeHour", "timeMinute", "timeFormat", "init_time", "__esmMin", "init_src", "init_continuous", "init_init", "init_nice", "init_src", "__esmMin", "init_band", "init_linear", "init_ordinal", "init_time", "colors_default", "specifier", "n", "colors", "i", "init_colors", "__esmMin", "__name", "Tableau10_default", "init_Tableau10", "__esmMin", "init_colors", "colors_default", "init_src", "__esmMin", "init_Tableau10", "constant_default", "x", "__name", "init_constant", "__esmMin", "acos", "x", "pi", "asin", "halfPi", "abs", "atan2", "cos", "max", "min", "sin", "sqrt", "epsilon", "tau", "init_math", "__esmMin", "__name", "withPath", "shape", "digits", "_", "d", "Path", "init_path", "__esmMin", "init_src", "__name", "arcInnerRadius", "d", "arcOuterRadius", "arcStartAngle", "arcEndAngle", "arcPadAngle", "intersect", "x0", "y0", "x1", "y1", "x2", "y2", "x3", "y3", "x10", "y10", "x32", "y32", "t", "epsilon", "cornerTangents", "r1", "rc", "cw", "x01", "y01", "lo", "sqrt", "ox", "oy", "x11", "y11", "x00", "y00", "dx", "dy", "d2", "r", "D", "max", "cx0", "cy0", "cx1", "cy1", "dx0", "dy0", "dx1", "dy1", "arc_default", "innerRadius", "outerRadius", "cornerRadius", "constant_default", "padRadius", "startAngle", "endAngle", "padAngle", "context", "path", "withPath", "arc", "buffer", "r0", "a0", "halfPi", "a1", "da", "abs", "tau", "cos", "sin", "a01", "a11", "a00", "a10", "da0", "da1", "ap", "rp", "min", "rc0", "rc1", "t0", "t1", "p0", "asin", "p1", "oc", "pi", "ax", "ay", "bx", "by", "kc", "acos", "lc", "atan2", "__name", "a", "_", "init_arc", "__esmMin", "init_constant", "init_math", "init_path", "array_default", "x", "slice", "init_array", "__esmMin", "__name", "Linear", "context", "linear_default", "init_linear", "__esmMin", "__name", "x", "y", "x", "p", "y", "init_point", "__esmMin", "__name", "line_default", "x", "y", "defined", "constant_default", "context", "curve", "linear_default", "output", "path", "withPath", "line", "data", "i", "n", "array_default", "defined0", "buffer", "__name", "_", "init_line", "__esmMin", "init_array", "init_constant", "init_linear", "init_path", "init_point", "descending_default", "a", "b", "init_descending", "__esmMin", "__name", "identity_default", "d", "init_identity", "__esmMin", "__name", "pie_default", "value", "identity_default", "sortValues", "descending_default", "sort", "startAngle", "constant_default", "endAngle", "tau", "padAngle", "pie", "data", "i", "n", "array_default", "j", "k", "sum", "index", "arcs", "a0", "da", "a1", "p", "pa", "v", "__name", "_", "init_pie", "__esmMin", "init_array", "init_constant", "init_descending", "init_identity", "init_math", "bumpX", "context", "Bump", "bumpY", "init_bump", "__esmMin", "__name", "x", "y", "noop_default", "init_noop", "__esmMin", "__name", "point", "that", "x", "y", "Basis", "context", "basis_default", "init_basis", "__esmMin", "__name", "BasisClosed", "context", "basisClosed_default", "init_basisClosed", "__esmMin", "init_noop", "init_basis", "__name", "noop_default", "x", "y", "point", "BasisOpen", "context", "basisOpen_default", "init_basisOpen", "__esmMin", "init_basis", "__name", "x", "y", "x0", "y0", "point", "Bundle", "context", "beta", "Basis", "bundle_default", "init_bundle", "__esmMin", "init_basis", "__name", "x", "y", "j", "x0", "y0", "dx", "dy", "i", "t", "custom", "bundle", "point", "that", "x", "y", "Cardinal", "context", "tension", "cardinal_default", "init_cardinal", "__esmMin", "__name", "custom", "cardinal", "CardinalClosed", "context", "tension", "cardinalClosed_default", "init_cardinalClosed", "__esmMin", "init_noop", "init_cardinal", "__name", "noop_default", "x", "y", "point", "custom", "cardinal", "CardinalOpen", "context", "tension", "cardinalOpen_default", "init_cardinalOpen", "__esmMin", "init_cardinal", "__name", "x", "y", "point", "custom", "cardinal", "point", "that", "x", "y", "x1", "y1", "x2", "y2", "epsilon", "a", "n", "b", "m", "CatmullRom", "context", "alpha", "catmullRom_default", "init_catmullRom", "__esmMin", "init_math", "init_cardinal", "__name", "x23", "y23", "custom", "catmullRom", "Cardinal", "CatmullRomClosed", "context", "alpha", "catmullRomClosed_default", "init_catmullRomClosed", "__esmMin", "init_cardinalClosed", "init_noop", "init_catmullRom", "__name", "noop_default", "x", "y", "x23", "y23", "point", "custom", "catmullRom", "CardinalClosed", "CatmullRomOpen", "context", "alpha", "catmullRomOpen_default", "init_catmullRomOpen", "__esmMin", "init_cardinalOpen", "init_catmullRom", "__name", "x", "y", "x23", "y23", "point", "custom", "catmullRom", "CardinalOpen", "LinearClosed", "context", "linearClosed_default", "init_linearClosed", "__esmMin", "init_noop", "__name", "noop_default", "x", "y", "sign", "x", "slope3", "that", "x2", "y2", "h0", "h1", "s0", "s1", "p", "slope2", "t", "h", "point", "t0", "t1", "x0", "y0", "x1", "y1", "dx", "MonotoneX", "context", "MonotoneY", "ReflectContext", "monotoneX", "monotoneY", "init_monotone", "__esmMin", "__name", "y", "Natural", "context", "controlPoints", "x", "i", "n", "m", "a", "b", "r", "natural_default", "init_natural", "__esmMin", "__name", "y", "px", "py", "i0", "i1", "Step", "context", "t", "step_default", "stepBefore", "stepAfter", "init_step", "__esmMin", "__name", "x", "y", "x1", "init_src", "__esmMin", "init_arc", "init_line", "init_pie", "init_basisClosed", "init_basisOpen", "init_basis", "init_bump", "init_bundle", "init_cardinalClosed", "init_cardinalOpen", "init_cardinal", "init_catmullRomClosed", "init_catmullRomOpen", "init_catmullRom", "init_linearClosed", "init_linear", "init_monotone", "init_natural", "init_step", "init_constant", "__esmMin", "init_event", "__esmMin", "Transform", "k", "x", "y", "transform", "node", "identity", "init_transform", "__esmMin", "__name", "point", "location", "init_noevent", "__esmMin", "init_zoom", "__esmMin", "init_src", "init_constant", "init_event", "init_transform", "init_noevent", "init_src", "__esmMin", "init_zoom", "init_transform", "init_src", "__esmMin", "require_constants", "__commonJSMin", "exports", "require_dist", "__commonJSMin", "exports", "constants_1", "isRelativeUrlWithoutProtocol", "url", "__name", "decodeHtmlCharacters", "str", "removedNullByte", "match", "dec", "isValidUrl", "decodeURI", "uri", "sanitizeUrl", "charsToDecode", "decodedUrl", "sanitizedUrl", "trimmedUrl", "urlSchemeParseResults", "urlScheme", "backSanitized", "url_1", "import_sanitize_url", "drawRect", "drawBackgroundRect", "drawText", "drawImage", "drawEmbeddedImage", "getNoteRect", "getTextObj", "init_svgDrawCommon", "__esmMin", "init_common", "__name", "element", "rectData", "rectElement", "attrKey", "bounds", "textData", "nText", "lineBreakRegex", "textElem", "tspan", "elem", "x", "y", "link", "imageElement", "sanitizedLink", "import_sanitize_url", "drawRect", "drawImage", "drawRels", "drawBoundary", "drawC4Shape", "insertDatabaseIcon", "insertComputerIcon", "insertClockIcon", "insertArrowHead", "insertArrowEnd", "insertArrowFilledHead", "insertDynamicNumber", "insertArrowCrossHead", "getC4ShapeFont", "_drawTextCandidateFunc", "svgDraw_default", "init_svgDraw", "__esmMin", "init_common", "init_svgDrawCommon", "__name", "elem", "rectData", "width", "height", "x", "y", "link", "imageElem", "sanitizedLink", "rels", "conf", "relsElem", "rel", "textColor", "strokeColor", "offsetX", "offsetY", "url", "line", "messageConf", "boundary", "boundaryElem", "fillColor", "fontColor", "attrsValue", "boundaryConf", "c4Shape", "personImg", "c4ShapeElem", "rect", "getNoteRect", "c4ShapeFontConf", "textFontConf", "marker", "cnf", "typeC4Shape", "byText", "content", "g", "textAttrs", "text", "_setTextAttrs", "byTspan", "fontSize", "fontFamily", "fontWeight", "lines", "common_default", "i", "dy", "byFo", "s", "toText", "fromTextAttrsDict", "key", "freeGlobal", "freeGlobal_default", "init_freeGlobal", "__esmMin", "freeSelf", "root", "root_default", "init_root", "__esmMin", "init_freeGlobal", "freeGlobal_default", "Symbol", "Symbol_default", "init_Symbol", "__esmMin", "init_root", "root_default", "getRawTag", "value", "isOwn", "hasOwnProperty", "symToStringTag", "tag", "unmasked", "result", "nativeObjectToString", "objectProto", "getRawTag_default", "init_getRawTag", "__esmMin", "init_Symbol", "Symbol_default", "__name", "objectToString", "value", "nativeObjectToString", "objectProto", "objectToString_default", "init_objectToString", "__esmMin", "__name", "baseGetTag", "value", "undefinedTag", "nullTag", "symToStringTag", "getRawTag_default", "objectToString_default", "baseGetTag_default", "init_baseGetTag", "__esmMin", "init_Symbol", "init_getRawTag", "init_objectToString", "Symbol_default", "__name", "isObject", "value", "type", "isObject_default", "init_isObject", "__esmMin", "__name", "isFunction", "value", "isObject_default", "tag", "baseGetTag_default", "funcTag", "genTag", "asyncTag", "proxyTag", "isFunction_default", "init_isFunction", "__esmMin", "init_baseGetTag", "init_isObject", "__name", "coreJsData", "coreJsData_default", "init_coreJsData", "__esmMin", "init_root", "root_default", "isMasked", "func", "maskSrcKey", "isMasked_default", "init_isMasked", "__esmMin", "init_coreJsData", "uid", "coreJsData_default", "__name", "toSource", "func", "funcToString", "funcProto", "toSource_default", "init_toSource", "__esmMin", "__name", "baseIsNative", "value", "isObject_default", "isMasked_default", "pattern", "isFunction_default", "reIsNative", "reIsHostCtor", "toSource_default", "reRegExpChar", "funcProto", "objectProto", "funcToString", "hasOwnProperty", "baseIsNative_default", "init_baseIsNative", "__esmMin", "init_isFunction", "init_isMasked", "init_isObject", "init_toSource", "__name", "getValue", "object", "key", "getValue_default", "init_getValue", "__esmMin", "__name", "getNative", "object", "key", "value", "getValue_default", "baseIsNative_default", "getNative_default", "init_getNative", "__esmMin", "init_baseIsNative", "init_getValue", "__name", "nativeCreate", "nativeCreate_default", "init_nativeCreate", "__esmMin", "init_getNative", "getNative_default", "hashClear", "nativeCreate_default", "hashClear_default", "init_hashClear", "__esmMin", "init_nativeCreate", "__name", "hashDelete", "key", "result", "hashDelete_default", "init_hashDelete", "__esmMin", "__name", "hashGet", "key", "data", "nativeCreate_default", "result", "HASH_UNDEFINED", "hasOwnProperty", "objectProto", "hashGet_default", "init_hashGet", "__esmMin", "init_nativeCreate", "__name", "hashHas", "key", "data", "nativeCreate_default", "hasOwnProperty", "objectProto", "hashHas_default", "init_hashHas", "__esmMin", "init_nativeCreate", "__name", "hashSet", "key", "value", "data", "nativeCreate_default", "HASH_UNDEFINED", "hashSet_default", "init_hashSet", "__esmMin", "init_nativeCreate", "__name", "Hash", "entries", "index", "length", "entry", "Hash_default", "init_Hash", "__esmMin", "init_hashClear", "init_hashDelete", "init_hashGet", "init_hashHas", "init_hashSet", "__name", "hashClear_default", "hashDelete_default", "hashGet_default", "hashHas_default", "hashSet_default", "listCacheClear", "listCacheClear_default", "init_listCacheClear", "__esmMin", "__name", "eq", "value", "other", "eq_default", "init_eq", "__esmMin", "__name", "assocIndexOf", "array", "key", "length", "eq_default", "assocIndexOf_default", "init_assocIndexOf", "__esmMin", "init_eq", "__name", "listCacheDelete", "key", "data", "index", "assocIndexOf_default", "lastIndex", "splice", "arrayProto", "listCacheDelete_default", "init_listCacheDelete", "__esmMin", "init_assocIndexOf", "__name", "listCacheGet", "key", "data", "index", "assocIndexOf_default", "listCacheGet_default", "init_listCacheGet", "__esmMin", "init_assocIndexOf", "__name", "listCacheHas", "key", "assocIndexOf_default", "listCacheHas_default", "init_listCacheHas", "__esmMin", "init_assocIndexOf", "__name", "listCacheSet", "key", "value", "data", "index", "assocIndexOf_default", "listCacheSet_default", "init_listCacheSet", "__esmMin", "init_assocIndexOf", "__name", "ListCache", "entries", "index", "length", "entry", "ListCache_default", "init_ListCache", "__esmMin", "init_listCacheClear", "init_listCacheDelete", "init_listCacheGet", "init_listCacheHas", "init_listCacheSet", "__name", "listCacheClear_default", "listCacheDelete_default", "listCacheGet_default", "listCacheHas_default", "listCacheSet_default", "Map", "Map_default", "init_Map", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "mapCacheClear", "Hash_default", "Map_default", "ListCache_default", "mapCacheClear_default", "init_mapCacheClear", "__esmMin", "init_Hash", "init_ListCache", "init_Map", "__name", "isKeyable", "value", "type", "isKeyable_default", "init_isKeyable", "__esmMin", "__name", "getMapData", "map", "key", "data", "isKeyable_default", "getMapData_default", "init_getMapData", "__esmMin", "init_isKeyable", "__name", "mapCacheDelete", "key", "result", "getMapData_default", "mapCacheDelete_default", "init_mapCacheDelete", "__esmMin", "init_getMapData", "__name", "mapCacheGet", "key", "getMapData_default", "mapCacheGet_default", "init_mapCacheGet", "__esmMin", "init_getMapData", "__name", "mapCacheHas", "key", "getMapData_default", "mapCacheHas_default", "init_mapCacheHas", "__esmMin", "init_getMapData", "__name", "mapCacheSet", "key", "value", "data", "getMapData_default", "size", "mapCacheSet_default", "init_mapCacheSet", "__esmMin", "init_getMapData", "__name", "MapCache", "entries", "index", "length", "entry", "MapCache_default", "init_MapCache", "__esmMin", "init_mapCacheClear", "init_mapCacheDelete", "init_mapCacheGet", "init_mapCacheHas", "init_mapCacheSet", "__name", "mapCacheClear_default", "mapCacheDelete_default", "mapCacheGet_default", "mapCacheHas_default", "mapCacheSet_default", "memoize", "func", "resolver", "FUNC_ERROR_TEXT", "memoized", "__name", "args", "key", "cache", "result", "MapCache_default", "memoize_default", "init_memoize", "__esmMin", "init_MapCache", "stackClear", "ListCache_default", "stackClear_default", "init_stackClear", "__esmMin", "init_ListCache", "__name", "stackDelete", "key", "data", "result", "stackDelete_default", "init_stackDelete", "__esmMin", "__name", "stackGet", "key", "stackGet_default", "init_stackGet", "__esmMin", "__name", "stackHas", "key", "stackHas_default", "init_stackHas", "__esmMin", "__name", "stackSet", "key", "value", "data", "ListCache_default", "pairs", "Map_default", "LARGE_ARRAY_SIZE", "MapCache_default", "stackSet_default", "init_stackSet", "__esmMin", "init_ListCache", "init_Map", "init_MapCache", "__name", "Stack", "entries", "data", "ListCache_default", "Stack_default", "init_Stack", "__esmMin", "init_ListCache", "init_stackClear", "init_stackDelete", "init_stackGet", "init_stackHas", "init_stackSet", "__name", "stackClear_default", "stackDelete_default", "stackGet_default", "stackHas_default", "stackSet_default", "defineProperty", "defineProperty_default", "init_defineProperty", "__esmMin", "init_getNative", "func", "getNative_default", "baseAssignValue", "object", "key", "value", "defineProperty_default", "baseAssignValue_default", "init_baseAssignValue", "__esmMin", "init_defineProperty", "__name", "assignMergeValue", "object", "key", "value", "eq_default", "baseAssignValue_default", "assignMergeValue_default", "init_assignMergeValue", "__esmMin", "init_baseAssignValue", "init_eq", "__name", "createBaseFor", "fromRight", "object", "iteratee", "keysFunc", "index", "iterable", "props", "length", "key", "createBaseFor_default", "init_createBaseFor", "__esmMin", "__name", "baseFor", "baseFor_default", "init_baseFor", "__esmMin", "init_createBaseFor", "createBaseFor_default", "cloneBuffer", "buffer", "isDeep", "length", "result", "allocUnsafe", "freeExports", "freeModule", "moduleExports", "Buffer", "cloneBuffer_default", "init_cloneBuffer", "__esmMin", "init_root", "root_default", "__name", "Uint8Array", "Uint8Array_default", "init_Uint8Array", "__esmMin", "init_root", "root_default", "cloneArrayBuffer", "arrayBuffer", "result", "Uint8Array_default", "cloneArrayBuffer_default", "init_cloneArrayBuffer", "__esmMin", "init_Uint8Array", "__name", "cloneTypedArray", "typedArray", "isDeep", "buffer", "cloneArrayBuffer_default", "cloneTypedArray_default", "init_cloneTypedArray", "__esmMin", "init_cloneArrayBuffer", "__name", "copyArray", "source", "array", "index", "length", "copyArray_default", "init_copyArray", "__esmMin", "__name", "objectCreate", "baseCreate", "baseCreate_default", "init_baseCreate", "__esmMin", "init_isObject", "object", "__name", "proto", "isObject_default", "result", "overArg", "func", "transform", "arg", "overArg_default", "init_overArg", "__esmMin", "__name", "getPrototype", "getPrototype_default", "init_getPrototype", "__esmMin", "init_overArg", "overArg_default", "isPrototype", "value", "Ctor", "proto", "objectProto", "isPrototype_default", "init_isPrototype", "__esmMin", "__name", "initCloneObject", "object", "isPrototype_default", "baseCreate_default", "getPrototype_default", "initCloneObject_default", "init_initCloneObject", "__esmMin", "init_baseCreate", "init_getPrototype", "init_isPrototype", "__name", "isObjectLike", "value", "isObjectLike_default", "init_isObjectLike", "__esmMin", "__name", "baseIsArguments", "value", "isObjectLike_default", "baseGetTag_default", "argsTag", "baseIsArguments_default", "init_baseIsArguments", "__esmMin", "init_baseGetTag", "init_isObjectLike", "__name", "objectProto", "hasOwnProperty", "propertyIsEnumerable", "isArguments", "isArguments_default", "init_isArguments", "__esmMin", "init_baseIsArguments", "init_isObjectLike", "baseIsArguments_default", "value", "isObjectLike_default", "isArray", "isArray_default", "init_isArray", "__esmMin", "isLength", "value", "MAX_SAFE_INTEGER", "isLength_default", "init_isLength", "__esmMin", "__name", "isArrayLike", "value", "isLength_default", "isFunction_default", "isArrayLike_default", "init_isArrayLike", "__esmMin", "init_isFunction", "init_isLength", "__name", "isArrayLikeObject", "value", "isObjectLike_default", "isArrayLike_default", "isArrayLikeObject_default", "init_isArrayLikeObject", "__esmMin", "init_isArrayLike", "init_isObjectLike", "__name", "stubFalse", "stubFalse_default", "init_stubFalse", "__esmMin", "__name", "freeExports", "freeModule", "moduleExports", "Buffer", "nativeIsBuffer", "isBuffer", "isBuffer_default", "init_isBuffer", "__esmMin", "init_root", "init_stubFalse", "root_default", "stubFalse_default", "isPlainObject", "value", "isObjectLike_default", "baseGetTag_default", "objectTag", "proto", "getPrototype_default", "Ctor", "hasOwnProperty", "funcToString", "objectCtorString", "funcProto", "objectProto", "isPlainObject_default", "init_isPlainObject", "__esmMin", "init_baseGetTag", "init_getPrototype", "init_isObjectLike", "__name", "baseIsTypedArray", "value", "isObjectLike_default", "isLength_default", "typedArrayTags", "baseGetTag_default", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "baseIsTypedArray_default", "init_baseIsTypedArray", "__esmMin", "init_baseGetTag", "init_isLength", "init_isObjectLike", "__name", "baseUnary", "func", "value", "baseUnary_default", "init_baseUnary", "__esmMin", "__name", "freeExports", "freeModule", "moduleExports", "freeProcess", "nodeUtil", "nodeUtil_default", "init_nodeUtil", "__esmMin", "init_freeGlobal", "freeGlobal_default", "types", "nodeIsTypedArray", "isTypedArray", "isTypedArray_default", "init_isTypedArray", "__esmMin", "init_baseIsTypedArray", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsTypedArray_default", "safeGet", "object", "key", "safeGet_default", "init_safeGet", "__esmMin", "__name", "assignValue", "object", "key", "value", "objValue", "hasOwnProperty", "eq_default", "baseAssignValue_default", "objectProto", "assignValue_default", "init_assignValue", "__esmMin", "init_baseAssignValue", "init_eq", "__name", "copyObject", "source", "props", "object", "customizer", "isNew", "index", "length", "key", "newValue", "baseAssignValue_default", "assignValue_default", "copyObject_default", "init_copyObject", "__esmMin", "init_assignValue", "init_baseAssignValue", "__name", "baseTimes", "n", "iteratee", "index", "result", "baseTimes_default", "init_baseTimes", "__esmMin", "__name", "isIndex", "value", "length", "type", "MAX_SAFE_INTEGER", "reIsUint", "isIndex_default", "init_isIndex", "__esmMin", "__name", "arrayLikeKeys", "value", "inherited", "isArr", "isArray_default", "isArg", "isArguments_default", "isBuff", "isBuffer_default", "isType", "isTypedArray_default", "skipIndexes", "result", "baseTimes_default", "length", "key", "hasOwnProperty", "isIndex_default", "objectProto", "arrayLikeKeys_default", "init_arrayLikeKeys", "__esmMin", "init_baseTimes", "init_isArguments", "init_isArray", "init_isBuffer", "init_isIndex", "init_isTypedArray", "__name", "nativeKeysIn", "object", "result", "key", "nativeKeysIn_default", "init_nativeKeysIn", "__esmMin", "__name", "baseKeysIn", "object", "isObject_default", "nativeKeysIn_default", "isProto", "isPrototype_default", "result", "key", "hasOwnProperty", "objectProto", "baseKeysIn_default", "init_baseKeysIn", "__esmMin", "init_isObject", "init_isPrototype", "init_nativeKeysIn", "__name", "keysIn", "object", "isArrayLike_default", "arrayLikeKeys_default", "baseKeysIn_default", "keysIn_default", "init_keysIn", "__esmMin", "init_arrayLikeKeys", "init_baseKeysIn", "init_isArrayLike", "__name", "toPlainObject", "value", "copyObject_default", "keysIn_default", "toPlainObject_default", "init_toPlainObject", "__esmMin", "init_copyObject", "init_keysIn", "__name", "baseMergeDeep", "object", "source", "key", "srcIndex", "mergeFunc", "customizer", "stack", "objValue", "safeGet_default", "srcValue", "stacked", "assignMergeValue_default", "newValue", "isCommon", "isArr", "isArray_default", "isBuff", "isBuffer_default", "isTyped", "isTypedArray_default", "isArrayLikeObject_default", "copyArray_default", "cloneBuffer_default", "cloneTypedArray_default", "isPlainObject_default", "isArguments_default", "toPlainObject_default", "isObject_default", "isFunction_default", "initCloneObject_default", "baseMergeDeep_default", "init_baseMergeDeep", "__esmMin", "init_assignMergeValue", "init_cloneBuffer", "init_cloneTypedArray", "init_copyArray", "init_initCloneObject", "init_isArguments", "init_isArray", "init_isArrayLikeObject", "init_isBuffer", "init_isFunction", "init_isObject", "init_isPlainObject", "init_isTypedArray", "init_safeGet", "init_toPlainObject", "__name", "baseMerge", "object", "source", "srcIndex", "customizer", "stack", "baseFor_default", "srcValue", "key", "Stack_default", "isObject_default", "baseMergeDeep_default", "newValue", "safeGet_default", "assignMergeValue_default", "keysIn_default", "baseMerge_default", "init_baseMerge", "__esmMin", "init_Stack", "init_assignMergeValue", "init_baseFor", "init_baseMergeDeep", "init_isObject", "init_keysIn", "init_safeGet", "__name", "identity", "value", "identity_default", "init_identity", "__esmMin", "__name", "apply", "func", "thisArg", "args", "apply_default", "init_apply", "__esmMin", "__name", "overRest", "func", "start", "transform", "nativeMax", "args", "index", "length", "array", "otherArgs", "apply_default", "overRest_default", "init_overRest", "__esmMin", "init_apply", "__name", "constant", "value", "constant_default", "init_constant", "__esmMin", "__name", "baseSetToString", "baseSetToString_default", "init_baseSetToString", "__esmMin", "init_constant", "init_defineProperty", "init_identity", "defineProperty_default", "func", "string", "constant_default", "identity_default", "shortOut", "func", "count", "lastCalled", "stamp", "nativeNow", "remaining", "HOT_SPAN", "HOT_COUNT", "shortOut_default", "init_shortOut", "__esmMin", "__name", "setToString", "setToString_default", "init_setToString", "__esmMin", "init_baseSetToString", "init_shortOut", "shortOut_default", "baseSetToString_default", "baseRest", "func", "start", "setToString_default", "overRest_default", "identity_default", "baseRest_default", "init_baseRest", "__esmMin", "init_identity", "init_overRest", "init_setToString", "__name", "isIterateeCall", "value", "index", "object", "isObject_default", "type", "isArrayLike_default", "isIndex_default", "eq_default", "isIterateeCall_default", "init_isIterateeCall", "__esmMin", "init_eq", "init_isArrayLike", "init_isIndex", "init_isObject", "__name", "createAssigner", "assigner", "baseRest_default", "object", "sources", "index", "length", "customizer", "guard", "isIterateeCall_default", "source", "createAssigner_default", "init_createAssigner", "__esmMin", "init_baseRest", "init_isIterateeCall", "__name", "merge", "merge_default", "init_merge", "__esmMin", "init_baseMerge", "init_createAssigner", "createAssigner_default", "object", "source", "srcIndex", "baseMerge_default", "interpolateToCurve", "interpolate", "defaultCurve", "curveName", "d3CurveTypes", "formatUrl", "linkStr", "config", "url", "distance", "p1", "p2", "traverseEdge", "points", "prevPoint", "totalDistance", "point", "remainingDistance", "calculatePoint", "calcLabelPosition", "calcTerminalLabelPosition", "terminalMarkerSize", "position", "_points", "log", "distanceToCardinalityPoint", "center", "d", "angle", "cardinalityPosition", "getStylesFromArray", "arr", "style", "labelStyle", "element", "makeRandomHex", "length", "result", "characters", "charactersLength", "calculateTextHeight", "text", "calculateTextDimensions", "calculateTextWidth", "isDetailedError", "error", "cleanAndMerge", "defaultData", "data", "merge_default", "import_sanitize_url", "ZERO_WIDTH_SPACE", "directiveWithoutOpen", "detectInit", "detectDirective", "removeDirectives", "isSubstringInArray", "runFunc", "roundNumber", "calcCardinalityPosition", "cnt", "generateId", "random", "getTextObj", "drawSimpleText", "wrapLabel", "breakString", "InitIDGenerator", "decoder", "entityDecode", "insertTitle", "parseFontSize", "utils_default", "encodeEntities", "decodeEntities", "getEdgeId", "init_utils", "__esmMin", "init_src", "init_common", "init_sanitizeDirective", "init_logger", "init_detectType", "init_assignWithDepth", "init_memoize", "init_merge", "init_regexes", "basis_default", "basisClosed_default", "basisOpen_default", "bumpX", "bumpY", "bundle_default", "cardinalClosed_default", "cardinalOpen_default", "cardinal_default", "catmullRomClosed_default", "catmullRomOpen_default", "catmullRom_default", "linear_default", "linearClosed_default", "monotoneX", "monotoneY", "natural_default", "step_default", "stepAfter", "stepBefore", "__name", "inits", "results", "args", "init", "sanitizeDirective", "assignWithDepth_default", "type", "detectType", "prop", "commentWithoutDirectives", "match", "directiveRegex", "str", "i", "functionName", "params", "arrPaths", "len", "fnName", "obj", "num", "precision", "factor", "distanceToTraverse", "vectorDistance", "distanceRatio", "isRelationTypePresent", "initialPosition", "options", "elem", "textData", "nText", "common_default", "_fontSizePx", "textElem", "span", "memoize_default", "label", "maxWidth", "words", "completedLines", "nextLine", "word", "index", "wordLength", "nextLineLength", "hyphenatedStrings", "remainingWord", "line", "hyphenCharacter", "lines", "currentLine", "character", "currentCharacter", "isLastLine", "hyphenatedNextLine", "fontSize", "fontFamily", "fontWeight", "fontFamilies", "dims", "body", "select_default", "g", "cHeight", "dim", "textObj", "bBox", "deterministic", "seed", "html", "parent", "cssClass", "titleTopMargin", "title", "bounds", "fontSizeNumber", "txt", "s", "innerTxt", "from", "to", "counter", "prefix", "suffix", "calcC4ShapeTextWH", "textType", "c4Shape", "c4ShapeTextWrap", "textConf", "textLimitWidth", "wrapLabel", "common_default", "calculateTextHeight", "lines", "lineHeight", "line", "calculateTextWidth", "drawInsideBoundary", "diagram", "parentBoundaryAlias", "parentBounds", "currentBoundaries", "diagObj", "currentBounds", "Bounds", "c4BoundaryInRow", "i", "currentBoundary", "Y", "currentBoundaryTextWrap", "conf", "currentBoundaryLabelConf", "boundaryFont", "currentBoundaryTypeConf", "currentBoundaryDescrConf", "_x", "_y", "currentPersonOrSystemArray", "currentPersonOrSystemKeys", "drawC4ShapeArray", "nextCurrentBoundaries", "drawBoundary", "globalBoundaryMaxX", "globalBoundaryMaxY", "c4ShapeInRow", "setConf", "c4ShapeFont", "messageFont", "Point", "getIntersectPoint", "getIntersectPoints", "drawRels", "draw", "c4Renderer_default", "init_c4Renderer", "__esmMin", "init_src", "init_svgDraw", "init_logger", "init_c4Diagram", "init_common", "init_c4Db", "init_diagramAPI", "init_assignWithDepth", "init_utils", "init_setupGraphViewbox", "parser", "c4Db_default", "__name", "startx", "stopx", "starty", "stopy", "obj", "key", "val", "fun", "_startx", "_stopx", "_starty", "_stopy", "margin", "cnf", "assignWithDepth_default", "typeC4Shape", "boundary", "bounds", "boundaryTextWrap", "boundaryLabelConf", "svgDraw_default", "c4ShapeArray", "c4ShapeKeys", "c4ShapeKey", "c4ShapeTypeConf", "c4ShapeLabelConf", "c4ShapeTechnConf", "rectHeight", "rectWidth", "c4ShapeDescrConf", "x", "y", "fromNode", "endPoint", "x1", "y1", "x2", "y2", "fromCenterX", "fromCenterY", "dx", "dy", "tanDYX", "fromDYX", "returnPoint", "endNode", "endIntersectPoint", "startPoint", "rels", "getC4ShapeObj", "rel", "relTextWrap", "relConf", "points", "_text", "id", "_version", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "db", "log", "screenBounds", "title", "box", "height", "width", "configureSvgSize", "extraVertForTitle", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "c4Diagram_exports", "__export", "diagram", "init_c4Diagram", "__esmMin", "init_c4Db", "init_c4Renderer", "init_styles", "c4Diagram_default", "c4Db_default", "c4Renderer_default", "styles_default", "__name", "c4", "wrap", "getCompiledStyles", "classDefs", "compiledStyles", "customClass", "cssClass", "classes", "s", "MERMAID_DOM_ID_PREFIX", "vertexCounter", "config", "vertices", "edges", "subGraphs", "subGraphLookup", "tooltips", "subCount", "firstGraphFlag", "direction", "version", "funs", "sanitizeText", "lookUpDomId", "addVertex", "addSingleLink", "addLink", "updateLinkInterpolate", "updateLink", "addClass", "setDirection", "setClass", "setTooltip", "setClickFun", "setLink", "getTooltip", "setClickEvent", "bindFunctions", "getDirection", "getVertices", "getEdges", "getClasses", "setupToolTips", "clear", "setGen", "defaultStyle", "addSubGraph", "getPosForId", "secCount", "posCrossRef", "indexNodes2", "getDepthFirstPos", "indexNodes", "getSubGraphs", "firstGraph", "destructStartLink", "countChar", "destructEndLink", "destructLink", "exists", "makeUniq", "lex", "getTypeFromVertex", "findNode", "destructEdgeType", "addNodeFromVertex", "getData", "flowDb_default", "init_flowDb", "__esmMin", "init_src", "init_utils", "init_diagramAPI", "init_common", "init_logger", "init_commonDb", "getConfig", "__name", "txt", "common_default", "id", "vertex", "textObj", "type", "style", "dir", "props", "_start", "_end", "edge", "log", "linkTextObj", "start", "end", "positions", "interpolate", "pos", "ids", "classNode", "newStyle", "className", "subGraph", "tooltip", "functionName", "functionArgs", "domId", "argList", "i", "item", "elem", "utils_default", "linkStr", "target", "element", "fun", "tooltipElem", "select_default", "el", "rect", "ver", "_id", "list", "_title", "title", "uniq", "a", "prims", "objs", "nodeList", "nodes", "count", "posCount", "childPos", "res", "_str", "str", "stroke", "char", "length", "line", "dots", "_startStr", "info", "startInfo", "allSgs", "sg", "allSubgraphs", "node", "arrowTypeStart", "arrowTypeEnd", "parentDB", "subGraphDB", "look", "parentId", "isGroup", "e", "rawEdge", "index", "styles", "getEdgeId", "defaultConfig", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "expandAndDeduplicateDirections", "getArrowPoints", "init_blockArrowHelper", "__esmMin", "__name", "directions", "uniqueDirections", "direction", "duplicatedDirections", "bbox", "node", "f", "height", "midpoint", "width", "padding", "_getDefaults", "changeDefaults", "newDefaults", "_defaults", "escape", "html", "encode", "escapeTest", "escapeReplace", "getEscapeReplacement", "escapeTestNoEncode", "escapeReplaceNoEncode", "unescape", "unescapeTest", "_", "n", "edit", "regex", "opt", "source", "obj", "__name", "name", "val", "valSource", "caret", "cleanUrl", "href", "splitCells", "tableRow", "count", "row", "match", "offset", "str", "escaped", "curr", "cells", "rtrim", "c", "invert", "l", "suffLen", "currChar", "findClosingBracket", "b", "level", "i", "outputLink", "cap", "link", "raw", "lexer", "title", "text", "token", "indentCodeCompensation", "matchIndentToCode", "indentToCode", "node", "matchIndentInNode", "indentInNode", "marked", "src", "markedInstance", "escapeReplacements", "noopTest", "_Tokenizer", "newline", "blockCode", "fences", "hr", "heading", "bullet", "lheading", "_paragraph", "blockText", "_blockLabel", "def", "list", "_tag", "_comment", "paragraph", "blockquote", "blockNormal", "gfmTable", "blockGfm", "blockPedantic", "inlineCode", "br", "inlineText", "_punctuation", "punctuation", "blockSkip", "emStrongLDelim", "emStrongRDelimAst", "emStrongRDelimUnd", "anyPunctuation", "autolink", "_inlineComment", "tag", "_inlineLabel", "reflink", "nolink", "reflinkSearch", "inlineNormal", "inlinePedantic", "inlineGfm", "inlineBreaks", "block", "inline", "_Lexer", "_Renderer", "_TextRenderer", "_Parser", "_Hooks", "Marked", "options", "setOptions", "use", "walkTokens", "parseInline", "parser", "ch", "trimmed", "lines", "tokens", "inBlockquote", "currentLines", "currentRaw", "currentText", "top", "lastToken", "oldToken", "newText", "newToken", "bull", "isordered", "itemRegex", "endsWithBlankLine", "endEarly", "itemContents", "line", "t", "nextLine", "blankLine", "indent", "nextBulletRegex", "hrRegex", "fencesBeginRegex", "headingBeginRegex", "rawLine", "istask", "ischecked", "spacers", "hasMultipleLineBreaks", "headers", "aligns", "rows", "item", "align", "cell", "trimmedUrl", "rtrimSlash", "lastParenIndex", "linkLen", "links", "linkString", "maskedSrc", "prevChar", "lLength", "rDelim", "rLength", "delimTotal", "midDelimTotal", "endReg", "lastCharLength", "hasNonSpaceChars", "hasSpaceCharsOnBothEnds", "prevCapZero", "__Lexer", "rules", "next", "lastParagraphClipped", "leading", "tabs", "cutSrc", "extTokenizer", "startIndex", "tempSrc", "tempStart", "getStartIndex", "errMsg", "keepPrevChar", "lang", "langString", "code", "depth", "ordered", "start", "body", "j", "type", "startAttr", "itemBody", "checkbox", "checked", "header", "k", "content", "cleanHref", "out", "__Parser", "anyToken", "genericToken", "ret", "textToken", "renderer", "markdown", "#parseMarkdown", "args", "callback", "values", "tableToken", "listToken", "childTokens", "extensions", "pack", "opts", "ext", "prevRenderer", "extLevel", "prop", "rendererProp", "rendererFunc", "#convertRendererFunction", "tokenizer", "tokenizerProp", "tokenizerFunc", "prevTokenizer", "hooks", "hooksProp", "hooksFunc", "prevHook", "arg", "packWalktokens", "func", "loose", "task", "origOpt", "throwError", "#onError", "e", "silent", "async", "msg", "preprocessMarkdown", "markdown", "markdownAutoWrap", "withoutMultipleNewlines", "withoutExtraSpaces", "dedent", "markdownToLines", "config", "preprocessedMarkdown", "nodes", "marked", "lines", "currentLine", "processNode", "node", "parentType", "textLine", "index", "word", "contentNode", "__name", "treeNode", "markdownToHTML", "output", "init_handle_markdown_text", "__esmMin", "init_marked_esm", "init_esm", "splitTextToChars", "text", "s", "splitWordToFitWidth", "checkFit", "word", "characters", "splitWordToFitWidthRecursion", "usedChars", "remainingChars", "type", "nextChar", "rest", "newWord", "splitLineToFitWidth", "line", "content", "splitLineToFitWidthRecursion", "words", "lines", "newLine", "joiner", "nextWord", "lineWithNextWord", "init_splitText", "__esmMin", "__name", "applyStyle", "dom", "styleFn", "addHtmlSpan", "element", "node", "width", "classes", "addBackground", "fo", "div", "label", "hasKatex", "renderKatex", "common_default", "getConfig", "labelClass", "span", "bbox", "createTspan", "textElement", "lineIndex", "lineHeight", "computeWidthOfText", "parentNode", "line", "testElement", "testSpan", "updateTextContentAndStyles", "textLength", "computeDimensionOfText", "text", "textDimension", "createFormattedText", "g", "structuredText", "labelGroup", "bkg", "checkWidth", "__name", "linesUnderWidth", "splitLineToFitWidth", "preparedLine", "tspan", "padding", "wrappedLine", "word", "index", "innerTspan", "replaceIconSubstring", "s", "createText", "init_createText", "__esmMin", "init_diagramAPI", "init_common", "init_src", "init_logger", "init_handle_markdown_text", "init_utils", "init_splitText", "el", "style", "isTitle", "useHtmlLabels", "isNode", "addSvgBackground", "config", "log", "htmlText", "markdownToHTML", "decodedReplacedText", "decodeEntities", "inputForKatex", "sanitizeBR", "markdownToLines", "svgLabel", "nodeLabelTextStyle", "select_default", "edgeLabelRectStyle", "edgeLabelTextStyle", "applyStyle", "dom", "styleFn", "addHtmlLabel", "node", "fo", "select_default", "div", "label", "labelClass", "span", "createLabel", "createLabel_default", "init_createLabel", "__esmMin", "init_src", "init_logger", "init_diagramAPI", "init_common", "init_utils", "init_createText", "__name", "_vertexText", "style", "isTitle", "isNode", "vertexText", "evaluate", "getConfig", "log", "replaceIconSubstring", "decodeEntities", "svgLabel", "rows", "row", "tspan", "intersectNode", "node", "point", "intersect_node_default", "init_intersect_node", "__esmMin", "__name", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "intersect_ellipse_default", "init_intersect_ellipse", "__esmMin", "__name", "intersectCircle", "node", "rx", "point", "intersect_ellipse_default", "intersect_circle_default", "init_intersect_circle", "__esmMin", "init_intersect_ellipse", "__name", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "y", "sameSign", "intersect_line_default", "init_intersect_line", "__esmMin", "__name", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersect_line_default", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersect_polygon_default", "init_intersect_polygon", "__esmMin", "init_intersect_line", "__name", "intersectRect", "intersect_rect_default", "init_intersect_rect", "__esmMin", "__name", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "intersect_default", "init_intersect", "__esmMin", "init_intersect_node", "init_intersect_circle", "init_intersect_ellipse", "init_intersect_polygon", "init_intersect_rect", "intersect_node_default", "intersect_circle_default", "intersect_ellipse_default", "intersect_polygon_default", "intersect_rect_default", "insertPolygonShape", "parent", "w", "h", "points", "d", "labelHelper", "updateNodeBounds", "init_util", "__esmMin", "init_createLabel", "init_createText", "init_diagramAPI", "init_src", "init_common", "init_utils", "__name", "node", "_classes", "isNode", "config", "getConfig", "classes", "useHtmlLabels", "evaluate", "shapeSvg", "label", "labelText", "textNode", "text", "createText", "sanitizeText", "decodeEntities", "createLabel_default", "bbox", "halfPadding", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "width", "element", "note", "note_default", "init_note", "__esmMin", "init_util", "init_logger", "init_diagramAPI", "init_intersect", "__name", "parent", "node", "getConfig", "shapeSvg", "bbox", "halfPadding", "labelHelper", "log", "rect", "updateNodeBounds", "point", "intersect_default", "applyNodePropertyBorders", "rect", "borders", "totalWidth", "totalHeight", "strokeDashArray", "addBorder", "__name", "length", "skipBorder", "log", "formatClass", "getClassesFromNode", "question", "choice", "hexagon", "block_arrow", "rect_left_inv_arrow", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "rect_right_inv_arrow", "cylinder", "composite", "labelRect", "rectWithTitle", "stadium", "circle", "doublecircle", "subroutine", "start", "forkJoin", "end", "class_box", "shapes", "nodeElems", "insertNode", "setNodeElem", "clear", "positionNode", "init_nodes", "__esmMin", "init_src", "init_diagramAPI", "init_common", "init_logger", "init_blockArrowHelper", "init_createLabel", "init_intersect", "init_note", "init_util", "str", "node", "otherClasses", "parent", "shapeSvg", "bbox", "labelHelper", "w", "h", "s", "points", "questionElem", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "d", "f", "m", "hex", "getArrowPoints", "blockArrow", "el", "rx", "ry", "shape", "pos", "x", "y", "halfPadding", "propKeys", "propKey", "classes", "innerLine", "label", "text2", "title", "text", "createLabel_default", "evaluate", "getConfig", "div", "dv", "select_default", "textRows", "titleBox", "descr", "gap", "circleGroup", "outerCircle", "innerCircle", "dir", "width", "height", "rowPadding", "lineHeight", "topLine", "bottomLine", "maxWidth", "maxHeight", "labelContainer", "verticalPos", "hasInterface", "interfaceLabelText", "interfaceLabel", "interfaceBBox", "classTitleString", "classTitleLabel", "classTitleBBox", "classAttributes", "member", "parsedInfo", "parsedText", "lbl", "classMethods", "displayText", "diffX", "memberBBox", "note_default", "elem", "newEl", "target", "padding", "diff", "getDiagramElement", "init_insertElementsForSize", "__esmMin", "init_src", "init_nodes", "__name", "id", "securityLevel", "sandboxElement", "select_default", "getSubGraphTitleMargins", "init_subGraphTitleMargins", "__esmMin", "__name", "flowchart", "subGraphTitleTopMargin", "subGraphTitleBottomMargin", "subGraphTitleTotalMargin", "t", "s", "o", "h", "r", "e", "n", "a", "i", "c", "l", "k", "b", "f", "d", "g", "M", "y", "m", "u", "p", "x", "w", "P", "v", "S", "O", "L", "T", "A", "$", "j", "z", "G", "D", "F", "E", "q", "V", "_", "Z", "I", "C", "W", "R", "__name", "Q", "H", "N", "B", "J", "K", "U", "X", "Y", "tt", "et", "st", "nt", "ot", "at", "init_rough_esm", "__esmMin", "intersectRect", "intersect_rect_default", "init_intersect_rect", "__esmMin", "__name", "node", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "applyStyle", "dom", "styleFn", "addHtmlLabel", "node", "fo", "select_default", "div", "label", "hasKatex", "renderKatex", "common_default", "getConfig", "labelClass", "createLabel", "createLabel_default", "init_createLabel", "__esmMin", "init_src", "init_logger", "init_diagramAPI", "init_common", "init_utils", "__name", "_vertexText", "style", "isTitle", "isNode", "vertexText", "evaluate", "log", "decodeEntities", "s", "svgLabel", "rows", "row", "tspan", "createRoundedRectPathD", "init_roundedRectPath", "__esmMin", "__name", "x", "y", "totalWidth", "totalHeight", "radius", "solidStateFill", "compileStyles", "styles2Map", "styles2String", "userNodeOverrides", "init_handDrawnShapeStyles", "__esmMin", "init_diagramAPI", "__name", "color", "handDrawnSeed", "getConfig", "node", "stylesMap", "styles", "styleMap", "style", "key", "value", "stylesArray", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "options", "themeVariables", "nodeBorder", "mainBkg", "rect", "noteGroup", "roundedWithTitle", "divider", "squareRect", "shapes", "clusterElems", "insertCluster", "clear", "init_clusters", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_subGraphTitleMargins", "init_src", "init_rough_esm", "init_createText", "init_intersect_rect", "init_createLabel", "init_roundedRectPath", "init_handDrawnShapeStyles", "__name", "parent", "node", "log", "siteConfig", "getConfig", "themeVariables", "handDrawnSeed", "clusterBkg", "clusterBorder", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "styles2String", "shapeSvg", "useHtmlLabels", "evaluate", "labelEl", "text", "createText", "bbox", "div", "dv", "select_default", "width", "height", "x", "y", "rc", "at", "options", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "subGraphTitleTopMargin", "getSubGraphTitleMargins", "span", "rectBox", "point", "intersect_rect_default", "padding", "halfPadding", "altBackground", "compositeBackground", "compositeTitleBackground", "nodeBorder", "outerRectG", "label", "innerRect", "createLabel_default", "innerHeight", "innerY", "isAlt", "roughOuterNode", "roughInnerNode", "elem", "shape", "cluster", "calculateDeltaAndAngle", "point1", "point2", "pointTransformer", "x1", "y1", "x2", "y2", "deltaX", "deltaY", "markerOffsets", "getLineFunctionsWithOffset", "init_lineWithOffset", "__esmMin", "__name", "data", "edge", "d", "i", "offset", "angle", "addEdgeMarkers", "arrowTypesMap", "addEdgeMarker", "init_edgeMarker", "__esmMin", "init_logger", "__name", "svgPath", "edge", "url", "id", "diagramType", "position", "arrowType", "endMarkerType", "log", "suffix", "setTerminalWidth", "fo", "value", "getConfig", "extractCornerPoints", "points", "cornerPoints", "cornerPointPositions", "i", "prev", "curr", "next", "edgeLabels", "terminalLabels", "clear", "getLabelStyles", "insertEdgeLabel", "positionEdgeLabel", "outsideNode", "intersection", "cutPathAtIntersect", "findAdjacentPoint", "fixCorners", "insertEdge", "init_edges", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_createText", "init_utils", "init_lineWithOffset", "init_subGraphTitleMargins", "init_src", "init_rough_esm", "init_createLabel", "init_edgeMarker", "__name", "styleArray", "acc", "style", "elem", "edge", "useHtmlLabels", "evaluate", "labelElement", "createText", "log", "edgeLabel", "label", "bbox", "div", "dv", "select_default", "startLabelElement", "createLabel_default", "startEdgeLabelLeft", "inner", "slBox", "startEdgeLabelRight", "endLabelElement", "endEdgeLabelLeft", "endEdgeLabelRight", "paths", "path", "siteConfig", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "el", "x", "y", "pos", "utils_default", "node", "point", "dx", "dy", "w", "h", "outsidePoint", "insidePoint", "r", "Q", "R", "q", "res", "_x", "_y", "_points", "boundaryNode", "lastPointOutside", "isInside", "inter", "pointPresent", "p", "e", "pointA", "pointB", "distance", "xDiff", "yDiff", "length", "ratio", "lineData", "newLineData", "prevPoint", "nextPoint", "cornerPoint", "newPrevPoint", "newNextPoint", "a", "newCornerPoint", "clusterDb", "diagramType", "startNode", "endNode", "id", "handDrawnSeed", "pointsHasChanged", "tail", "head", "lastPoint", "secondLastPoint", "diffX", "diffY", "midPoint", "curve", "basis_default", "getLineFunctionsWithOffset", "lineFunction", "line_default", "strokeClasses", "svgPath", "linePath", "edgeStyles", "rc", "at", "svgPathNode", "d", "url", "addEdgeMarkers", "insertMarkers", "extension", "composition", "aggregation", "dependency", "lollipop", "point", "circle", "cross", "barb", "markers", "markers_default", "init_markers", "__esmMin", "init_logger", "__name", "elem", "markerArray", "type", "id", "markerName", "log", "labelHelper", "updateNodeBounds", "getNodeClasses", "init_util", "__esmMin", "init_createText", "init_diagramAPI", "init_src", "init_common", "init_utils", "__name", "parent", "node", "_classes", "cssClasses", "useHtmlLabels", "evaluate", "getConfig", "shapeSvg", "labelEl", "label", "text", "createText", "sanitizeText", "decodeEntities", "bbox", "halfPadding", "div", "dv", "select_default", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "width", "element", "extra", "intersectNode", "node", "point", "intersect_node_default", "init_intersect_node", "__esmMin", "__name", "intersectEllipse", "node", "rx", "ry", "point", "cx", "cy", "px", "py", "det", "dx", "dy", "intersect_ellipse_default", "init_intersect_ellipse", "__esmMin", "__name", "intersectCircle", "node", "rx", "point", "intersect_ellipse_default", "intersect_circle_default", "init_intersect_circle", "__esmMin", "init_intersect_ellipse", "__name", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "offset", "num", "y", "sameSign", "intersect_line_default", "init_intersect_line", "__esmMin", "__name", "intersectPolygon", "node", "polyPoints", "point", "x1", "y1", "intersections", "minX", "minY", "entry", "left", "top", "i", "p1", "p2", "intersect", "intersect_line_default", "p", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersect_polygon_default", "init_intersect_polygon", "__esmMin", "init_intersect_line", "__name", "intersect_default", "init_intersect", "__esmMin", "init_intersect_node", "init_intersect_circle", "init_intersect_ellipse", "init_intersect_polygon", "init_intersect_rect", "intersect_node_default", "intersect_circle_default", "intersect_ellipse_default", "intersect_polygon_default", "intersect_rect_default", "drawRect", "init_drawRect", "__esmMin", "init_util", "init_intersect", "init_roundedRectPath", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "parent", "node", "options", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "totalWidth", "totalHeight", "x", "y", "rect", "rx", "ry", "cssStyles", "rc", "at", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "updateNodeBounds", "point", "intersect_default", "state", "init_state", "__esmMin", "init_drawRect", "__name", "parent", "node", "drawRect", "roundedRect", "init_roundedRect", "__esmMin", "init_drawRect", "__name", "parent", "node", "options", "drawRect", "squareRect", "init_squareRect", "__esmMin", "init_drawRect", "__name", "parent", "node", "options", "drawRect", "stateStart", "init_stateStart", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "init_diagramAPI", "__name", "parent", "node", "themeVariables", "getConfig", "lineColor", "shapeSvg", "circle", "roughNode", "at", "solidStateFill", "updateNodeBounds", "point", "intersect_default", "stateEnd", "init_stateEnd", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "init_diagramAPI", "__name", "parent", "node", "themeVariables", "getConfig", "lineColor", "shapeSvg", "circle", "innerCircle", "rc", "at", "roughNode", "solidStateFill", "roughInnerNode", "updateNodeBounds", "point", "intersect_default", "forkJoin", "init_forkJoin", "__esmMin", "init_util", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "init_diagramAPI", "__name", "parent", "node", "dir", "themeVariables", "getConfig", "lineColor", "shapeSvg", "width", "height", "x", "y", "shape", "roughNode", "at", "solidStateFill", "updateNodeBounds", "nodeHeight", "nodeWidth", "nodePadding", "point", "intersect_default", "choice", "init_choice", "__esmMin", "init_intersect", "init_rough_esm", "init_handDrawnShapeStyles", "init_diagramAPI", "__name", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "themeVariables", "getConfig", "lineColor", "shapeSvg", "s", "points", "rc", "at", "pointArr", "d", "roughNode", "solidStateFill", "point", "intersect_default", "note", "init_note", "__esmMin", "init_logger", "init_util", "init_intersect", "init_diagramAPI", "init_rough_esm", "__name", "parent", "node", "themeVariables", "handDrawnSeed", "getConfig", "noteBorderColor", "noteBkgColor", "shapeSvg", "bbox", "labelHelper", "log", "cssStyles", "rect", "totalWidth", "totalHeight", "x", "y", "roughNode", "at", "updateNodeBounds", "point", "intersect_default", "stadium", "init_stadium", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_roundedRectPath", "__name", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "h", "w", "rect", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "createRoundedRectPathD", "roughNode", "updateNodeBounds", "point", "intersect_default", "rectWithTitle", "init_rectWithTitle", "__esmMin", "init_src", "init_common", "init_util", "init_createLabel", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_diagramAPI", "init_roundedRectPath", "init_logger", "__name", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "classes", "shapeSvg", "g", "label", "description", "title", "text", "createLabel_default", "bbox", "evaluate", "getConfig", "div", "dv", "select_default", "log", "textRows", "titleBox", "descr", "halfPadding", "totalWidth", "totalHeight", "x", "y", "rect", "innerLine", "rc", "at", "options", "userNodeOverrides", "roughNode", "createRoundedRectPathD", "roughLine", "updateNodeBounds", "point", "intersect_default", "insertPolygonShape", "parent", "w", "h", "points", "d", "init_insertPolygonShape", "__esmMin", "__name", "subroutine", "init_subroutine", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "halfPadding", "w", "h", "x", "y", "points", "rc", "at", "options", "userNodeOverrides", "roughNode", "l1", "l2", "rect", "cssStyles", "updateNodeBounds", "el", "insertPolygonShape", "point", "intersect_default", "createCylinderPathD", "createOuterCylinderPathD", "createInnerCylinderPathD", "cylinder", "init_cylinder", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "x", "y", "width", "height", "rx", "ry", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "cssStyles", "rc", "at", "outerPathData", "innerPathData", "outerNode", "userNodeOverrides", "innerLine", "pathData", "updateNodeBounds", "point", "pos", "intersect_default", "circle", "init_circle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "halfPadding", "labelHelper", "getNodeClasses", "radius", "circleElem", "cssStyles", "rc", "at", "options", "userNodeOverrides", "roughNode", "updateNodeBounds", "point", "log", "intersect_default", "doublecircle", "init_doubleCircle", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "__name", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "halfPadding", "labelHelper", "getNodeClasses", "outerRadius", "innerRadius", "circleGroup", "cssStyles", "rc", "at", "outerOptions", "userNodeOverrides", "innerOptions", "outerRoughNode", "innerRoughNode", "outerCircle", "innerCircle", "updateNodeBounds", "point", "log", "intersect_default", "createPolygonPathD", "rect_left_inv_arrow", "init_rectLeftInvArrow", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "createDecisionBoxPathD", "question", "init_question", "__esmMin", "init_logger", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "size", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "s", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "log", "intersect_default", "createHexagonPathD", "hexagon", "init_hexagon", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "m", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "f", "h", "w", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "createLeanRightPathD", "lean_right", "init_leanRight", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "createLeanLeftPathD", "lean_left", "init_leanLeft", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "createTrapezoidPathD", "trapezoid", "init_trapezoid", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "createInvertedTrapezoidPathD", "inv_trapezoid", "init_invertedTrapezoid", "__esmMin", "init_util", "init_intersect", "init_handDrawnShapeStyles", "init_rough_esm", "init_insertPolygonShape", "__name", "x", "y", "width", "height", "parent", "node", "labelStyles", "nodeStyles", "styles2String", "shapeSvg", "bbox", "labelHelper", "getNodeClasses", "w", "h", "points", "polygon", "cssStyles", "rc", "at", "options", "userNodeOverrides", "pathData", "roughNode", "insertPolygonShape", "updateNodeBounds", "point", "intersect_default", "labelRect", "init_labelRect", "__esmMin", "init_drawRect", "init_util", "init_intersect", "__name", "parent", "node", "shapeSvg", "labelHelper", "rect", "updateNodeBounds", "point", "intersect_default", "shapes", "nodeElems", "insertNode", "setNodeElem", "clear", "positionNode", "init_nodes", "__esmMin", "init_logger", "init_state", "init_roundedRect", "init_squareRect", "init_stateStart", "init_stateEnd", "init_forkJoin", "init_choice", "init_note", "init_stadium", "init_rectWithTitle", "init_diagramAPI", "init_subroutine", "init_cylinder", "init_circle", "init_doubleCircle", "init_rectLeftInvArrow", "init_question", "init_hexagon", "init_leanRight", "init_leanLeft", "init_trapezoid", "init_invertedTrapezoid", "init_labelRect", "state", "stateStart", "stateEnd", "forkJoin", "choice", "note", "roundedRect", "rectWithTitle", "squareRect", "stadium", "subroutine", "cylinder", "circle", "doublecircle", "rect_left_inv_arrow", "question", "hexagon", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "labelRect", "__name", "elem", "node", "dir", "newEl", "el", "target", "getConfig", "log", "padding", "diff", "internalHelpers", "init_internals", "__esmMin", "init_config", "init_common", "init_logger", "init_clusters", "init_edges", "init_markers", "init_nodes", "init_util", "init_utils", "common_default", "getConfig", "insertCluster", "insertEdge", "insertEdgeLabel", "markers_default", "insertNode", "interpolateToCurve", "labelHelper", "log", "positionEdgeLabel", "isSymbol", "value", "isObjectLike_default", "baseGetTag_default", "symbolTag", "isSymbol_default", "init_isSymbol", "__esmMin", "init_baseGetTag", "init_isObjectLike", "__name", "arrayMap", "array", "iteratee", "index", "length", "result", "arrayMap_default", "init_arrayMap", "__esmMin", "__name", "baseToString", "value", "isArray_default", "arrayMap_default", "isSymbol_default", "symbolToString", "result", "INFINITY", "symbolProto", "baseToString_default", "init_baseToString", "__esmMin", "init_Symbol", "init_arrayMap", "init_isArray", "init_isSymbol", "Symbol_default", "__name", "trimmedEndIndex", "string", "index", "reWhitespace", "trimmedEndIndex_default", "init_trimmedEndIndex", "__esmMin", "__name", "baseTrim", "string", "trimmedEndIndex_default", "reTrimStart", "baseTrim_default", "init_baseTrim", "__esmMin", "init_trimmedEndIndex", "__name", "toNumber", "value", "isSymbol_default", "NAN", "isObject_default", "other", "baseTrim_default", "isBinary", "reIsBinary", "reIsOctal", "freeParseInt", "reIsBadHex", "toNumber_default", "init_toNumber", "__esmMin", "init_baseTrim", "init_isObject", "init_isSymbol", "__name", "toFinite", "value", "toNumber_default", "INFINITY", "sign", "MAX_INTEGER", "toFinite_default", "init_toFinite", "__esmMin", "init_toNumber", "__name", "toInteger", "value", "result", "toFinite_default", "remainder", "toInteger_default", "init_toInteger", "__esmMin", "init_toFinite", "__name", "WeakMap", "WeakMap_default", "init_WeakMap", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "noop", "noop_default", "init_noop", "__esmMin", "__name", "arrayEach", "array", "iteratee", "index", "length", "arrayEach_default", "init_arrayEach", "__esmMin", "__name", "baseFindIndex", "array", "predicate", "fromIndex", "fromRight", "length", "index", "baseFindIndex_default", "init_baseFindIndex", "__esmMin", "__name", "baseIsNaN", "value", "baseIsNaN_default", "init_baseIsNaN", "__esmMin", "__name", "strictIndexOf", "array", "value", "fromIndex", "index", "length", "strictIndexOf_default", "init_strictIndexOf", "__esmMin", "__name", "baseIndexOf", "array", "value", "fromIndex", "strictIndexOf_default", "baseFindIndex_default", "baseIsNaN_default", "baseIndexOf_default", "init_baseIndexOf", "__esmMin", "init_baseFindIndex", "init_baseIsNaN", "init_strictIndexOf", "__name", "arrayIncludes", "array", "value", "length", "baseIndexOf_default", "arrayIncludes_default", "init_arrayIncludes", "__esmMin", "init_baseIndexOf", "__name", "nativeKeys", "nativeKeys_default", "init_nativeKeys", "__esmMin", "init_overArg", "overArg_default", "baseKeys", "object", "isPrototype_default", "nativeKeys_default", "result", "key", "hasOwnProperty", "objectProto", "baseKeys_default", "init_baseKeys", "__esmMin", "init_isPrototype", "init_nativeKeys", "__name", "keys", "object", "isArrayLike_default", "arrayLikeKeys_default", "baseKeys_default", "keys_default", "init_keys", "__esmMin", "init_arrayLikeKeys", "init_baseKeys", "init_isArrayLike", "__name", "objectProto", "hasOwnProperty", "assign", "assign_default", "init_assign", "__esmMin", "init_assignValue", "init_copyObject", "init_createAssigner", "init_isArrayLike", "init_isPrototype", "init_keys", "createAssigner_default", "object", "source", "isPrototype_default", "isArrayLike_default", "copyObject_default", "keys_default", "key", "assignValue_default", "isKey", "value", "object", "isArray_default", "type", "isSymbol_default", "reIsPlainProp", "reIsDeepProp", "isKey_default", "init_isKey", "__esmMin", "init_isArray", "init_isSymbol", "__name", "memoizeCapped", "func", "result", "memoize_default", "key", "cache", "MAX_MEMOIZE_SIZE", "memoizeCapped_default", "init_memoizeCapped", "__esmMin", "init_memoize", "__name", "rePropName", "reEscapeChar", "stringToPath", "stringToPath_default", "init_stringToPath", "__esmMin", "init_memoizeCapped", "memoizeCapped_default", "string", "result", "match", "number", "quote", "subString", "toString", "value", "baseToString_default", "toString_default", "init_toString", "__esmMin", "init_baseToString", "__name", "castPath", "value", "object", "isArray_default", "isKey_default", "stringToPath_default", "toString_default", "castPath_default", "init_castPath", "__esmMin", "init_isArray", "init_isKey", "init_stringToPath", "init_toString", "__name", "toKey", "value", "isSymbol_default", "result", "INFINITY", "toKey_default", "init_toKey", "__esmMin", "init_isSymbol", "__name", "baseGet", "object", "path", "castPath_default", "index", "length", "toKey_default", "baseGet_default", "init_baseGet", "__esmMin", "init_castPath", "init_toKey", "__name", "get", "object", "path", "defaultValue", "result", "baseGet_default", "get_default", "init_get", "__esmMin", "init_baseGet", "__name", "arrayPush", "array", "values", "index", "length", "offset", "arrayPush_default", "init_arrayPush", "__esmMin", "__name", "isFlattenable", "value", "isArray_default", "isArguments_default", "spreadableSymbol", "isFlattenable_default", "init_isFlattenable", "__esmMin", "init_Symbol", "init_isArguments", "init_isArray", "Symbol_default", "__name", "baseFlatten", "array", "depth", "predicate", "isStrict", "result", "index", "length", "isFlattenable_default", "value", "arrayPush_default", "baseFlatten_default", "init_baseFlatten", "__esmMin", "init_arrayPush", "init_isFlattenable", "__name", "flatten", "array", "length", "baseFlatten_default", "flatten_default", "init_flatten", "__esmMin", "init_baseFlatten", "__name", "flatRest", "func", "setToString_default", "overRest_default", "flatten_default", "flatRest_default", "init_flatRest", "__esmMin", "init_flatten", "init_overRest", "init_setToString", "__name", "baseSlice", "array", "start", "end", "index", "length", "result", "baseSlice_default", "init_baseSlice", "__esmMin", "__name", "hasUnicode", "string", "reHasUnicode", "rsAstralRange", "rsComboMarksRange", "reComboHalfMarksRange", "rsComboSymbolsRange", "rsComboRange", "rsVarRange", "rsZWJ", "hasUnicode_default", "init_hasUnicode", "__esmMin", "__name", "arrayReduce", "array", "iteratee", "accumulator", "initAccum", "index", "length", "arrayReduce_default", "init_arrayReduce", "__esmMin", "__name", "baseAssign", "object", "source", "copyObject_default", "keys_default", "baseAssign_default", "init_baseAssign", "__esmMin", "init_copyObject", "init_keys", "__name", "baseAssignIn", "object", "source", "copyObject_default", "keysIn_default", "baseAssignIn_default", "init_baseAssignIn", "__esmMin", "init_copyObject", "init_keysIn", "__name", "arrayFilter", "array", "predicate", "index", "length", "resIndex", "result", "value", "arrayFilter_default", "init_arrayFilter", "__esmMin", "__name", "stubArray", "stubArray_default", "init_stubArray", "__esmMin", "__name", "objectProto", "propertyIsEnumerable", "nativeGetSymbols", "getSymbols", "getSymbols_default", "init_getSymbols", "__esmMin", "init_arrayFilter", "init_stubArray", "object", "arrayFilter_default", "symbol", "stubArray_default", "copySymbols", "source", "object", "copyObject_default", "getSymbols_default", "copySymbols_default", "init_copySymbols", "__esmMin", "init_copyObject", "init_getSymbols", "__name", "nativeGetSymbols", "getSymbolsIn", "getSymbolsIn_default", "init_getSymbolsIn", "__esmMin", "init_arrayPush", "init_getPrototype", "init_getSymbols", "init_stubArray", "object", "result", "arrayPush_default", "getSymbols_default", "getPrototype_default", "stubArray_default", "copySymbolsIn", "source", "object", "copyObject_default", "getSymbolsIn_default", "copySymbolsIn_default", "init_copySymbolsIn", "__esmMin", "init_copyObject", "init_getSymbolsIn", "__name", "baseGetAllKeys", "object", "keysFunc", "symbolsFunc", "result", "isArray_default", "arrayPush_default", "baseGetAllKeys_default", "init_baseGetAllKeys", "__esmMin", "init_arrayPush", "init_isArray", "__name", "getAllKeys", "object", "baseGetAllKeys_default", "keys_default", "getSymbols_default", "getAllKeys_default", "init_getAllKeys", "__esmMin", "init_baseGetAllKeys", "init_getSymbols", "init_keys", "__name", "getAllKeysIn", "object", "baseGetAllKeys_default", "keysIn_default", "getSymbolsIn_default", "getAllKeysIn_default", "init_getAllKeysIn", "__esmMin", "init_baseGetAllKeys", "init_getSymbolsIn", "init_keysIn", "__name", "DataView", "DataView_default", "init_DataView", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "Promise", "Promise_default", "init_Promise", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "Set", "Set_default", "init_Set", "__esmMin", "init_getNative", "init_root", "getNative_default", "root_default", "mapTag", "objectTag", "promiseTag", "setTag", "weakMapTag", "dataViewTag", "dataViewCtorString", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "getTag", "getTag_default", "init_getTag", "__esmMin", "init_DataView", "init_Map", "init_Promise", "init_Set", "init_WeakMap", "init_baseGetTag", "init_toSource", "toSource_default", "DataView_default", "Map_default", "Promise_default", "Set_default", "WeakMap_default", "baseGetTag_default", "__name", "value", "result", "Ctor", "ctorString", "initCloneArray", "array", "length", "result", "hasOwnProperty", "objectProto", "initCloneArray_default", "init_initCloneArray", "__esmMin", "__name", "cloneDataView", "dataView", "isDeep", "buffer", "cloneArrayBuffer_default", "cloneDataView_default", "init_cloneDataView", "__esmMin", "init_cloneArrayBuffer", "__name", "cloneRegExp", "regexp", "result", "reFlags", "cloneRegExp_default", "init_cloneRegExp", "__esmMin", "__name", "cloneSymbol", "symbol", "symbolValueOf", "symbolProto", "cloneSymbol_default", "init_cloneSymbol", "__esmMin", "init_Symbol", "Symbol_default", "__name", "initCloneByTag", "object", "tag", "isDeep", "Ctor", "arrayBufferTag", "cloneArrayBuffer_default", "boolTag", "dateTag", "dataViewTag", "cloneDataView_default", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "cloneTypedArray_default", "mapTag", "numberTag", "stringTag", "regexpTag", "cloneRegExp_default", "setTag", "symbolTag", "cloneSymbol_default", "initCloneByTag_default", "init_initCloneByTag", "__esmMin", "init_cloneArrayBuffer", "init_cloneDataView", "init_cloneRegExp", "init_cloneSymbol", "init_cloneTypedArray", "__name", "baseIsMap", "value", "isObjectLike_default", "getTag_default", "mapTag", "baseIsMap_default", "init_baseIsMap", "__esmMin", "init_getTag", "init_isObjectLike", "__name", "nodeIsMap", "isMap", "isMap_default", "init_isMap", "__esmMin", "init_baseIsMap", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsMap_default", "baseIsSet", "value", "isObjectLike_default", "getTag_default", "setTag", "baseIsSet_default", "init_baseIsSet", "__esmMin", "init_getTag", "init_isObjectLike", "__name", "nodeIsSet", "isSet", "isSet_default", "init_isSet", "__esmMin", "init_baseIsSet", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsSet_default", "baseClone", "value", "bitmask", "customizer", "key", "object", "stack", "result", "isDeep", "CLONE_DEEP_FLAG", "isFlat", "CLONE_FLAT_FLAG", "isFull", "CLONE_SYMBOLS_FLAG", "isObject_default", "isArr", "isArray_default", "initCloneArray_default", "copyArray_default", "tag", "getTag_default", "isFunc", "funcTag", "genTag", "isBuffer_default", "cloneBuffer_default", "objectTag", "argsTag", "initCloneObject_default", "copySymbolsIn_default", "baseAssignIn_default", "copySymbols_default", "baseAssign_default", "cloneableTags", "initCloneByTag_default", "Stack_default", "stacked", "isSet_default", "subValue", "isMap_default", "keysFunc", "getAllKeysIn_default", "getAllKeys_default", "keysIn_default", "keys_default", "props", "arrayEach_default", "assignValue_default", "arrayTag", "boolTag", "dateTag", "errorTag", "mapTag", "numberTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "baseClone_default", "init_baseClone", "__esmMin", "init_Stack", "init_arrayEach", "init_assignValue", "init_baseAssign", "init_baseAssignIn", "init_cloneBuffer", "init_copyArray", "init_copySymbols", "init_copySymbolsIn", "init_getAllKeys", "init_getAllKeysIn", "init_getTag", "init_initCloneArray", "init_initCloneByTag", "init_initCloneObject", "init_isArray", "init_isBuffer", "init_isMap", "init_isObject", "init_isSet", "init_keys", "init_keysIn", "__name", "clone", "value", "baseClone_default", "CLONE_SYMBOLS_FLAG", "clone_default", "init_clone", "__esmMin", "init_baseClone", "__name", "cloneDeep", "value", "baseClone_default", "CLONE_DEEP_FLAG", "CLONE_SYMBOLS_FLAG", "cloneDeep_default", "init_cloneDeep", "__esmMin", "init_baseClone", "__name", "compact", "array", "index", "length", "resIndex", "result", "value", "compact_default", "init_compact", "__esmMin", "__name", "setCacheAdd", "value", "HASH_UNDEFINED", "setCacheAdd_default", "init_setCacheAdd", "__esmMin", "__name", "setCacheHas", "value", "setCacheHas_default", "init_setCacheHas", "__esmMin", "__name", "SetCache", "values", "index", "length", "MapCache_default", "SetCache_default", "init_SetCache", "__esmMin", "init_MapCache", "init_setCacheAdd", "init_setCacheHas", "__name", "setCacheAdd_default", "setCacheHas_default", "arraySome", "array", "predicate", "index", "length", "arraySome_default", "init_arraySome", "__esmMin", "__name", "cacheHas", "cache", "key", "cacheHas_default", "init_cacheHas", "__esmMin", "__name", "equalArrays", "array", "other", "bitmask", "customizer", "equalFunc", "stack", "isPartial", "COMPARE_PARTIAL_FLAG", "arrLength", "othLength", "arrStacked", "othStacked", "index", "result", "seen", "COMPARE_UNORDERED_FLAG", "SetCache_default", "arrValue", "othValue", "compared", "arraySome_default", "othIndex", "cacheHas_default", "equalArrays_default", "init_equalArrays", "__esmMin", "init_SetCache", "init_arraySome", "init_cacheHas", "__name", "mapToArray", "map", "index", "result", "value", "key", "mapToArray_default", "init_mapToArray", "__esmMin", "__name", "setToArray", "set", "index", "result", "value", "setToArray_default", "init_setToArray", "__esmMin", "__name", "equalByTag", "object", "other", "tag", "bitmask", "customizer", "equalFunc", "stack", "dataViewTag", "arrayBufferTag", "Uint8Array_default", "boolTag", "dateTag", "numberTag", "eq_default", "errorTag", "regexpTag", "stringTag", "mapTag", "convert", "mapToArray_default", "setTag", "isPartial", "COMPARE_PARTIAL_FLAG", "setToArray_default", "stacked", "COMPARE_UNORDERED_FLAG", "result", "equalArrays_default", "symbolTag", "symbolValueOf", "symbolProto", "equalByTag_default", "init_equalByTag", "__esmMin", "init_Symbol", "init_Uint8Array", "init_eq", "init_equalArrays", "init_mapToArray", "init_setToArray", "Symbol_default", "__name", "equalObjects", "object", "other", "bitmask", "customizer", "equalFunc", "stack", "isPartial", "COMPARE_PARTIAL_FLAG", "objProps", "getAllKeys_default", "objLength", "othProps", "othLength", "index", "key", "hasOwnProperty", "objStacked", "othStacked", "result", "skipCtor", "objValue", "othValue", "compared", "objCtor", "othCtor", "objectProto", "equalObjects_default", "init_equalObjects", "__esmMin", "init_getAllKeys", "__name", "baseIsEqualDeep", "object", "other", "bitmask", "customizer", "equalFunc", "stack", "objIsArr", "isArray_default", "othIsArr", "objTag", "arrayTag", "getTag_default", "othTag", "argsTag", "objectTag", "objIsObj", "othIsObj", "isSameTag", "isBuffer_default", "Stack_default", "isTypedArray_default", "equalArrays_default", "equalByTag_default", "COMPARE_PARTIAL_FLAG", "objIsWrapped", "hasOwnProperty", "othIsWrapped", "objUnwrapped", "othUnwrapped", "equalObjects_default", "objectProto", "baseIsEqualDeep_default", "init_baseIsEqualDeep", "__esmMin", "init_Stack", "init_equalArrays", "init_equalByTag", "init_equalObjects", "init_getTag", "init_isArray", "init_isBuffer", "init_isTypedArray", "__name", "baseIsEqual", "value", "other", "bitmask", "customizer", "stack", "isObjectLike_default", "baseIsEqualDeep_default", "baseIsEqual_default", "init_baseIsEqual", "__esmMin", "init_baseIsEqualDeep", "init_isObjectLike", "__name", "baseIsMatch", "object", "source", "matchData", "customizer", "index", "length", "noCustomizer", "data", "key", "objValue", "srcValue", "stack", "Stack_default", "result", "baseIsEqual_default", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseIsMatch_default", "init_baseIsMatch", "__esmMin", "init_Stack", "init_baseIsEqual", "__name", "isStrictComparable", "value", "isObject_default", "isStrictComparable_default", "init_isStrictComparable", "__esmMin", "init_isObject", "__name", "getMatchData", "object", "result", "keys_default", "length", "key", "value", "isStrictComparable_default", "getMatchData_default", "init_getMatchData", "__esmMin", "init_isStrictComparable", "init_keys", "__name", "matchesStrictComparable", "key", "srcValue", "object", "matchesStrictComparable_default", "init_matchesStrictComparable", "__esmMin", "__name", "baseMatches", "source", "matchData", "getMatchData_default", "matchesStrictComparable_default", "object", "baseIsMatch_default", "baseMatches_default", "init_baseMatches", "__esmMin", "init_baseIsMatch", "init_getMatchData", "init_matchesStrictComparable", "__name", "baseHasIn", "object", "key", "baseHasIn_default", "init_baseHasIn", "__esmMin", "__name", "hasPath", "object", "path", "hasFunc", "castPath_default", "index", "length", "result", "key", "toKey_default", "isLength_default", "isIndex_default", "isArray_default", "isArguments_default", "hasPath_default", "init_hasPath", "__esmMin", "init_castPath", "init_isArguments", "init_isArray", "init_isIndex", "init_isLength", "init_toKey", "__name", "hasIn", "object", "path", "hasPath_default", "baseHasIn_default", "hasIn_default", "init_hasIn", "__esmMin", "init_baseHasIn", "init_hasPath", "__name", "baseMatchesProperty", "path", "srcValue", "isKey_default", "isStrictComparable_default", "matchesStrictComparable_default", "toKey_default", "object", "objValue", "get_default", "hasIn_default", "baseIsEqual_default", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseMatchesProperty_default", "init_baseMatchesProperty", "__esmMin", "init_baseIsEqual", "init_get", "init_hasIn", "init_isKey", "init_isStrictComparable", "init_matchesStrictComparable", "init_toKey", "__name", "baseProperty", "key", "object", "baseProperty_default", "init_baseProperty", "__esmMin", "__name", "basePropertyDeep", "path", "object", "baseGet_default", "basePropertyDeep_default", "init_basePropertyDeep", "__esmMin", "init_baseGet", "__name", "property", "path", "isKey_default", "baseProperty_default", "toKey_default", "basePropertyDeep_default", "property_default", "init_property", "__esmMin", "init_baseProperty", "init_basePropertyDeep", "init_isKey", "init_toKey", "__name", "baseIteratee", "value", "identity_default", "isArray_default", "baseMatchesProperty_default", "baseMatches_default", "property_default", "baseIteratee_default", "init_baseIteratee", "__esmMin", "init_baseMatches", "init_baseMatchesProperty", "init_identity", "init_isArray", "init_property", "__name", "arrayAggregator", "array", "setter", "iteratee", "accumulator", "index", "length", "value", "arrayAggregator_default", "init_arrayAggregator", "__esmMin", "__name", "baseForOwn", "object", "iteratee", "baseFor_default", "keys_default", "baseForOwn_default", "init_baseForOwn", "__esmMin", "init_baseFor", "init_keys", "__name", "createBaseEach", "eachFunc", "fromRight", "collection", "iteratee", "isArrayLike_default", "length", "index", "iterable", "createBaseEach_default", "init_createBaseEach", "__esmMin", "init_isArrayLike", "__name", "baseEach", "baseEach_default", "init_baseEach", "__esmMin", "init_baseForOwn", "init_createBaseEach", "createBaseEach_default", "baseForOwn_default", "baseAggregator", "collection", "setter", "iteratee", "accumulator", "baseEach_default", "value", "key", "baseAggregator_default", "init_baseAggregator", "__esmMin", "init_baseEach", "__name", "createAggregator", "setter", "initializer", "collection", "iteratee", "func", "isArray_default", "arrayAggregator_default", "baseAggregator_default", "accumulator", "baseIteratee_default", "createAggregator_default", "init_createAggregator", "__esmMin", "init_arrayAggregator", "init_baseAggregator", "init_baseIteratee", "init_isArray", "__name", "now", "now_default", "init_now", "__esmMin", "init_root", "__name", "root_default", "objectProto", "hasOwnProperty", "defaults", "defaults_default", "init_defaults", "__esmMin", "init_baseRest", "init_eq", "init_isIterateeCall", "init_keysIn", "baseRest_default", "object", "sources", "index", "length", "guard", "isIterateeCall_default", "source", "props", "keysIn_default", "propsIndex", "propsLength", "key", "value", "eq_default", "arrayIncludesWith", "array", "value", "comparator", "index", "length", "arrayIncludesWith_default", "init_arrayIncludesWith", "__esmMin", "__name", "baseDifference", "array", "values", "iteratee", "comparator", "index", "includes", "arrayIncludes_default", "isCommon", "length", "result", "valuesLength", "arrayMap_default", "baseUnary_default", "arrayIncludesWith_default", "LARGE_ARRAY_SIZE", "cacheHas_default", "SetCache_default", "outer", "value", "computed", "valuesIndex", "baseDifference_default", "init_baseDifference", "__esmMin", "init_SetCache", "init_arrayIncludes", "init_arrayIncludesWith", "init_arrayMap", "init_baseUnary", "init_cacheHas", "__name", "difference", "difference_default", "init_difference", "__esmMin", "init_baseDifference", "init_baseFlatten", "init_baseRest", "init_isArrayLikeObject", "baseRest_default", "array", "values", "isArrayLikeObject_default", "baseDifference_default", "baseFlatten_default", "last", "array", "length", "last_default", "init_last", "__esmMin", "__name", "drop", "array", "n", "guard", "length", "toInteger_default", "baseSlice_default", "drop_default", "init_drop", "__esmMin", "init_baseSlice", "init_toInteger", "__name", "dropRight", "array", "n", "guard", "length", "toInteger_default", "baseSlice_default", "dropRight_default", "init_dropRight", "__esmMin", "init_baseSlice", "init_toInteger", "__name", "castFunction", "value", "identity_default", "castFunction_default", "init_castFunction", "__esmMin", "init_identity", "__name", "forEach", "collection", "iteratee", "func", "isArray_default", "arrayEach_default", "baseEach_default", "castFunction_default", "forEach_default", "init_forEach", "__esmMin", "init_arrayEach", "init_baseEach", "init_castFunction", "init_isArray", "__name", "init_each", "__esmMin", "init_forEach", "arrayEvery", "array", "predicate", "index", "length", "arrayEvery_default", "init_arrayEvery", "__esmMin", "__name", "baseEvery", "collection", "predicate", "result", "baseEach_default", "value", "index", "baseEvery_default", "init_baseEvery", "__esmMin", "init_baseEach", "__name", "every", "collection", "predicate", "guard", "func", "isArray_default", "arrayEvery_default", "baseEvery_default", "isIterateeCall_default", "baseIteratee_default", "every_default", "init_every", "__esmMin", "init_arrayEvery", "init_baseEvery", "init_baseIteratee", "init_isArray", "init_isIterateeCall", "__name", "baseFilter", "collection", "predicate", "result", "baseEach_default", "value", "index", "baseFilter_default", "init_baseFilter", "__esmMin", "init_baseEach", "__name", "filter", "collection", "predicate", "func", "isArray_default", "arrayFilter_default", "baseFilter_default", "baseIteratee_default", "filter_default", "init_filter", "__esmMin", "init_arrayFilter", "init_baseFilter", "init_baseIteratee", "init_isArray", "__name", "createFind", "findIndexFunc", "collection", "predicate", "fromIndex", "iterable", "isArrayLike_default", "iteratee", "baseIteratee_default", "keys_default", "__name", "key", "index", "createFind_default", "init_createFind", "__esmMin", "init_baseIteratee", "init_isArrayLike", "init_keys", "findIndex", "array", "predicate", "fromIndex", "length", "index", "toInteger_default", "nativeMax", "baseFindIndex_default", "baseIteratee_default", "findIndex_default", "init_findIndex", "__esmMin", "init_baseFindIndex", "init_baseIteratee", "init_toInteger", "__name", "find", "find_default", "init_find", "__esmMin", "init_createFind", "init_findIndex", "createFind_default", "findIndex_default", "head", "array", "head_default", "init_head", "__esmMin", "__name", "init_first", "__esmMin", "init_head", "baseMap", "collection", "iteratee", "index", "result", "isArrayLike_default", "baseEach_default", "value", "key", "baseMap_default", "init_baseMap", "__esmMin", "init_baseEach", "init_isArrayLike", "__name", "map", "collection", "iteratee", "func", "isArray_default", "arrayMap_default", "baseMap_default", "baseIteratee_default", "map_default", "init_map", "__esmMin", "init_arrayMap", "init_baseIteratee", "init_baseMap", "init_isArray", "__name", "flatMap", "collection", "iteratee", "baseFlatten_default", "map_default", "flatMap_default", "init_flatMap", "__esmMin", "init_baseFlatten", "init_map", "__name", "forIn", "object", "iteratee", "baseFor_default", "castFunction_default", "keysIn_default", "forIn_default", "init_forIn", "__esmMin", "init_baseFor", "init_castFunction", "init_keysIn", "__name", "forOwn", "object", "iteratee", "baseForOwn_default", "castFunction_default", "forOwn_default", "init_forOwn", "__esmMin", "init_baseForOwn", "init_castFunction", "__name", "objectProto", "hasOwnProperty", "groupBy", "groupBy_default", "init_groupBy", "__esmMin", "init_baseAssignValue", "init_createAggregator", "createAggregator_default", "result", "value", "key", "baseAssignValue_default", "baseGt", "value", "other", "baseGt_default", "init_baseGt", "__esmMin", "__name", "baseHas", "object", "key", "hasOwnProperty", "objectProto", "baseHas_default", "init_baseHas", "__esmMin", "__name", "has", "object", "path", "hasPath_default", "baseHas_default", "has_default", "init_has", "__esmMin", "init_baseHas", "init_hasPath", "__name", "isString", "value", "isArray_default", "isObjectLike_default", "baseGetTag_default", "stringTag", "isString_default", "init_isString", "__esmMin", "init_baseGetTag", "init_isArray", "init_isObjectLike", "__name", "baseValues", "object", "props", "arrayMap_default", "key", "baseValues_default", "init_baseValues", "__esmMin", "init_arrayMap", "__name", "values", "object", "baseValues_default", "keys_default", "values_default", "init_values", "__esmMin", "init_baseValues", "init_keys", "__name", "includes", "collection", "value", "fromIndex", "guard", "isArrayLike_default", "values_default", "toInteger_default", "length", "nativeMax", "isString_default", "baseIndexOf_default", "includes_default", "init_includes", "__esmMin", "init_baseIndexOf", "init_isArrayLike", "init_isString", "init_toInteger", "init_values", "__name", "indexOf", "array", "value", "fromIndex", "length", "index", "toInteger_default", "nativeMax", "baseIndexOf_default", "indexOf_default", "init_indexOf", "__esmMin", "init_baseIndexOf", "init_toInteger", "__name", "isEmpty", "value", "isArrayLike_default", "isArray_default", "isBuffer_default", "isTypedArray_default", "isArguments_default", "tag", "getTag_default", "mapTag", "setTag", "isPrototype_default", "baseKeys_default", "key", "hasOwnProperty", "objectProto", "isEmpty_default", "init_isEmpty", "__esmMin", "init_baseKeys", "init_getTag", "init_isArguments", "init_isArray", "init_isArrayLike", "init_isBuffer", "init_isPrototype", "init_isTypedArray", "__name", "baseIsRegExp", "value", "isObjectLike_default", "baseGetTag_default", "regexpTag", "baseIsRegExp_default", "init_baseIsRegExp", "__esmMin", "init_baseGetTag", "init_isObjectLike", "__name", "nodeIsRegExp", "isRegExp", "isRegExp_default", "init_isRegExp", "__esmMin", "init_baseIsRegExp", "init_baseUnary", "init_nodeUtil", "nodeUtil_default", "baseUnary_default", "baseIsRegExp_default", "isUndefined", "value", "isUndefined_default", "init_isUndefined", "__esmMin", "__name", "baseLt", "value", "other", "baseLt_default", "init_baseLt", "__esmMin", "__name", "mapValues", "object", "iteratee", "result", "baseIteratee_default", "baseForOwn_default", "value", "key", "baseAssignValue_default", "mapValues_default", "init_mapValues", "__esmMin", "init_baseAssignValue", "init_baseForOwn", "init_baseIteratee", "__name", "baseExtremum", "array", "iteratee", "comparator", "index", "length", "value", "current", "computed", "isSymbol_default", "result", "baseExtremum_default", "init_baseExtremum", "__esmMin", "init_isSymbol", "__name", "max", "array", "baseExtremum_default", "identity_default", "baseGt_default", "max_default", "init_max", "__esmMin", "init_baseExtremum", "init_baseGt", "init_identity", "__name", "min", "array", "baseExtremum_default", "identity_default", "baseLt_default", "min_default", "init_min", "__esmMin", "init_baseExtremum", "init_baseLt", "init_identity", "__name", "minBy", "array", "iteratee", "baseExtremum_default", "baseIteratee_default", "baseLt_default", "minBy_default", "init_minBy", "__esmMin", "init_baseExtremum", "init_baseIteratee", "init_baseLt", "__name", "negate", "predicate", "FUNC_ERROR_TEXT", "args", "negate_default", "init_negate", "__esmMin", "__name", "baseSet", "object", "path", "value", "customizer", "isObject_default", "castPath_default", "index", "length", "lastIndex", "nested", "key", "toKey_default", "newValue", "objValue", "isIndex_default", "assignValue_default", "baseSet_default", "init_baseSet", "__esmMin", "init_assignValue", "init_castPath", "init_isIndex", "init_isObject", "init_toKey", "__name", "basePickBy", "object", "paths", "predicate", "index", "length", "result", "path", "value", "baseGet_default", "baseSet_default", "castPath_default", "basePickBy_default", "init_basePickBy", "__esmMin", "init_baseGet", "init_baseSet", "init_castPath", "__name", "pickBy", "object", "predicate", "props", "arrayMap_default", "getAllKeysIn_default", "prop", "baseIteratee_default", "basePickBy_default", "value", "path", "pickBy_default", "init_pickBy", "__esmMin", "init_arrayMap", "init_baseIteratee", "init_basePickBy", "init_getAllKeysIn", "__name", "baseSortBy", "array", "comparer", "length", "baseSortBy_default", "init_baseSortBy", "__esmMin", "__name", "compareAscending", "value", "other", "valIsDefined", "valIsNull", "valIsReflexive", "valIsSymbol", "isSymbol_default", "othIsDefined", "othIsNull", "othIsReflexive", "othIsSymbol", "compareAscending_default", "init_compareAscending", "__esmMin", "init_isSymbol", "__name", "compareMultiple", "object", "other", "orders", "index", "objCriteria", "othCriteria", "length", "ordersLength", "result", "compareAscending_default", "order", "compareMultiple_default", "init_compareMultiple", "__esmMin", "init_compareAscending", "__name", "baseOrderBy", "collection", "iteratees", "orders", "arrayMap_default", "iteratee", "isArray_default", "value", "baseGet_default", "identity_default", "index", "baseUnary_default", "baseIteratee_default", "result", "baseMap_default", "key", "criteria", "baseSortBy_default", "object", "other", "compareMultiple_default", "baseOrderBy_default", "init_baseOrderBy", "__esmMin", "init_arrayMap", "init_baseGet", "init_baseIteratee", "init_baseMap", "init_baseSortBy", "init_baseUnary", "init_compareMultiple", "init_identity", "init_isArray", "__name", "asciiSize", "asciiSize_default", "init_asciiSize", "__esmMin", "init_baseProperty", "baseProperty_default", "unicodeSize", "string", "result", "reUnicode", "rsAstralRange", "rsComboMarksRange", "reComboHalfMarksRange", "rsComboSymbolsRange", "rsComboRange", "rsVarRange", "rsAstral", "rsCombo", "rsFitz", "rsModifier", "rsNonAstral", "rsRegional", "rsSurrPair", "rsZWJ", "reOptMod", "rsOptVar", "rsOptJoin", "rsSeq", "rsSymbol", "unicodeSize_default", "init_unicodeSize", "__esmMin", "__name", "stringSize", "string", "hasUnicode_default", "unicodeSize_default", "asciiSize_default", "stringSize_default", "init_stringSize", "__esmMin", "init_asciiSize", "init_hasUnicode", "init_unicodeSize", "__name", "basePick", "object", "paths", "basePickBy_default", "value", "path", "hasIn_default", "basePick_default", "init_basePick", "__esmMin", "init_basePickBy", "init_hasIn", "__name", "pick", "pick_default", "init_pick", "__esmMin", "init_basePick", "init_flatRest", "flatRest_default", "object", "paths", "basePick_default", "baseRange", "start", "end", "step", "fromRight", "index", "length", "nativeMax", "nativeCeil", "result", "baseRange_default", "init_baseRange", "__esmMin", "__name", "createRange", "fromRight", "start", "end", "step", "isIterateeCall_default", "toFinite_default", "baseRange_default", "createRange_default", "init_createRange", "__esmMin", "init_baseRange", "init_isIterateeCall", "init_toFinite", "__name", "range", "range_default", "init_range", "__esmMin", "init_createRange", "createRange_default", "baseReduce", "collection", "iteratee", "accumulator", "initAccum", "eachFunc", "value", "index", "baseReduce_default", "init_baseReduce", "__esmMin", "__name", "reduce", "collection", "iteratee", "accumulator", "func", "isArray_default", "arrayReduce_default", "baseReduce_default", "initAccum", "baseIteratee_default", "baseEach_default", "reduce_default", "init_reduce", "__esmMin", "init_arrayReduce", "init_baseEach", "init_baseIteratee", "init_baseReduce", "init_isArray", "__name", "reject", "collection", "predicate", "func", "isArray_default", "arrayFilter_default", "baseFilter_default", "negate_default", "baseIteratee_default", "reject_default", "init_reject", "__esmMin", "init_arrayFilter", "init_baseFilter", "init_baseIteratee", "init_isArray", "init_negate", "__name", "size", "collection", "isArrayLike_default", "isString_default", "stringSize_default", "tag", "getTag_default", "mapTag", "setTag", "baseKeys_default", "size_default", "init_size", "__esmMin", "init_baseKeys", "init_getTag", "init_isArrayLike", "init_isString", "init_stringSize", "__name", "baseSome", "collection", "predicate", "result", "baseEach_default", "value", "index", "baseSome_default", "init_baseSome", "__esmMin", "init_baseEach", "__name", "some", "collection", "predicate", "guard", "func", "isArray_default", "arraySome_default", "baseSome_default", "isIterateeCall_default", "baseIteratee_default", "some_default", "init_some", "__esmMin", "init_arraySome", "init_baseIteratee", "init_baseSome", "init_isArray", "init_isIterateeCall", "__name", "sortBy", "sortBy_default", "init_sortBy", "__esmMin", "init_baseFlatten", "init_baseOrderBy", "init_baseRest", "init_isIterateeCall", "baseRest_default", "collection", "iteratees", "length", "isIterateeCall_default", "baseOrderBy_default", "baseFlatten_default", "INFINITY", "createSet", "createSet_default", "init_createSet", "__esmMin", "init_Set", "init_noop", "init_setToArray", "Set_default", "setToArray_default", "values", "noop_default", "baseUniq", "array", "iteratee", "comparator", "index", "includes", "arrayIncludes_default", "length", "isCommon", "result", "seen", "arrayIncludesWith_default", "LARGE_ARRAY_SIZE", "set", "createSet_default", "setToArray_default", "cacheHas_default", "SetCache_default", "outer", "value", "computed", "seenIndex", "baseUniq_default", "init_baseUniq", "__esmMin", "init_SetCache", "init_arrayIncludes", "init_arrayIncludesWith", "init_cacheHas", "init_createSet", "init_setToArray", "__name", "union", "union_default", "init_union", "__esmMin", "init_baseFlatten", "init_baseRest", "init_baseUniq", "init_isArrayLikeObject", "baseRest_default", "arrays", "baseUniq_default", "baseFlatten_default", "isArrayLikeObject_default", "uniq", "array", "baseUniq_default", "uniq_default", "init_uniq", "__esmMin", "init_baseUniq", "__name", "uniqBy", "array", "iteratee", "baseUniq_default", "baseIteratee_default", "uniqBy_default", "init_uniqBy", "__esmMin", "init_baseIteratee", "init_baseUniq", "__name", "uniqueId", "prefix", "id", "idCounter", "toString_default", "uniqueId_default", "init_uniqueId", "__esmMin", "init_toString", "__name", "baseZipObject", "props", "values", "assignFunc", "index", "length", "valsLength", "result", "value", "baseZipObject_default", "init_baseZipObject", "__esmMin", "__name", "zipObject", "props", "values", "baseZipObject_default", "assignValue_default", "zipObject_default", "init_zipObject", "__esmMin", "init_assignValue", "init_baseZipObject", "__name", "init_lodash", "__esmMin", "init_assign", "init_clone", "init_cloneDeep", "init_compact", "init_constant", "init_defaults", "init_difference", "init_drop", "init_dropRight", "init_each", "init_every", "init_filter", "init_find", "init_first", "init_flatMap", "init_flatten", "init_forEach", "init_forIn", "init_forOwn", "init_groupBy", "init_has", "init_identity", "init_includes", "init_indexOf", "init_isArray", "init_isEmpty", "init_isFunction", "init_isObject", "init_isRegExp", "init_isString", "init_isUndefined", "init_keys", "init_last", "init_map", "init_mapValues", "init_max", "init_merge", "init_min", "init_minBy", "init_noop", "init_now", "init_pick", "init_pickBy", "init_range", "init_reduce", "init_reject", "init_size", "init_some", "init_sortBy", "init_union", "init_uniq", "init_uniqueId", "init_values", "init_zipObject", "incrementOrInitEntry", "map", "k", "decrementOrRemoveEntry", "edgeArgsToId", "isDirected", "v_", "w_", "name", "v", "w", "tmp", "EDGE_KEY_DELIM", "isUndefined_default", "DEFAULT_EDGE_NAME", "edgeArgsToObj", "edgeObj", "edgeObjToId", "GRAPH_NODE", "Graph", "init_graph", "__esmMin", "init_lodash", "__name", "opts", "has_default", "constant_default", "label", "newDefault", "isFunction_default", "keys_default", "self", "filter_default", "isEmpty_default", "vs", "value", "args", "forEach_default", "removeEdge", "e", "child", "parent", "ancestor", "children", "predsV", "sucsV", "preds", "union_default", "neighbors", "filter", "copy", "parents", "findParent", "values_default", "reduce_default", "valueSpecified", "arg0", "edge", "u", "inV", "edges", "outV", "inEdges", "init_graphlib", "__esmMin", "init_graph", "unlink", "entry", "filterOutLinks", "k", "v", "List", "init_list", "__esmMin", "__name", "sentinel", "strs", "curr", "greedyFAS", "g", "weightFn", "state", "buildState", "DEFAULT_WEIGHT_FN", "results", "doGreedyFAS", "flatten_default", "map_default", "e", "buckets", "zeroIdx", "sources", "sinks", "entry", "removeNode", "i", "collectPredecessors", "forEach_default", "edge", "weight", "uEntry", "assignBucket", "w", "wEntry", "fasGraph", "Graph", "maxIn", "maxOut", "v", "prevWeight", "edgeWeight", "range_default", "List", "init_greedy_fas", "__esmMin", "init_lodash", "init_graphlib", "init_list", "constant_default", "__name", "run", "g", "fas", "greedyFAS", "weightFn", "dfsFAS", "forEach_default", "e", "label", "uniqueId_default", "__name", "stack", "visited", "dfs", "v", "has_default", "undo", "forwardName", "init_acyclic", "__esmMin", "init_lodash", "init_greedy_fas", "addDummyNode", "g", "type", "attrs", "name", "v", "uniqueId_default", "simplify", "simplified", "Graph", "forEach_default", "e", "simpleLabel", "label", "asNonCompoundGraph", "intersectRect", "rect", "point", "x", "y", "dx", "dy", "w", "h", "sx", "sy", "buildLayerMatrix", "layering", "map_default", "range_default", "maxRank", "node", "rank", "isUndefined_default", "normalizeRanks", "min", "min_default", "has_default", "removeEmptyRanks", "offset", "layers", "delta", "nodeRankFactor", "vs", "i", "addBorderNode", "prefix", "order", "max_default", "partition", "collection", "fn", "result", "value", "time", "start", "now_default", "notime", "init_util", "__esmMin", "init_lodash", "init_graphlib", "__name", "addBorderSegments", "g", "dfs", "v", "children", "node", "forEach_default", "has_default", "rank", "maxRank", "addBorderNode", "__name", "prop", "prefix", "sg", "sgNode", "label", "prev", "curr", "addDummyNode", "init_add_border_segments", "__esmMin", "init_lodash", "init_util", "adjust", "g", "rankDir", "swapWidthHeight", "undo", "reverseY", "swapXY", "forEach_default", "v", "swapWidthHeightOne", "attrs", "w", "reverseYOne", "edge", "has_default", "swapXYOne", "x", "init_coordinate_system", "__esmMin", "init_lodash", "__name", "run", "g", "forEach_default", "edge", "normalizeEdge", "v", "vRank", "w", "wRank", "name", "edgeLabel", "labelRank", "dummy", "attrs", "i", "addDummyNode", "undo", "node", "origLabel", "init_normalize", "__esmMin", "init_lodash", "init_util", "__name", "longestPath", "g", "visited", "dfs", "v", "label", "has_default", "rank", "min_default", "map_default", "e", "__name", "forEach_default", "slack", "init_util", "__esmMin", "init_lodash", "feasibleTree", "g", "t", "Graph", "start", "size", "edge", "delta", "tightTree", "findMinSlackEdge", "slack", "shiftRanks", "dfs", "v", "forEach_default", "e", "edgeV", "w", "__name", "minBy_default", "init_feasible_tree", "__esmMin", "init_lodash", "init_graphlib", "init_util", "init_components", "__esmMin", "init_priority_queue", "__esmMin", "DEFAULT_WEIGHT_FUNC", "init_dijkstra", "__esmMin", "init_lodash", "init_priority_queue", "constant_default", "init_dijkstra_all", "__esmMin", "init_dijkstra", "init_tarjan", "__esmMin", "init_find_cycles", "__esmMin", "init_tarjan", "DEFAULT_WEIGHT_FUNC", "init_floyd_warshall", "__esmMin", "init_lodash", "constant_default", "topsort", "g", "visited", "stack", "results", "visit", "node", "has_default", "CycleException", "forEach_default", "__name", "size_default", "init_topsort", "__esmMin", "init_lodash", "init_is_acyclic", "__esmMin", "init_topsort", "dfs", "g", "vs", "order", "isArray_default", "navigation", "acc", "visited", "forEach_default", "v", "doDfs", "postorder", "has_default", "w", "init_dfs", "__esmMin", "init_lodash", "__name", "postorder", "g", "vs", "dfs", "init_postorder", "__esmMin", "init_dfs", "__name", "preorder", "g", "vs", "dfs", "init_preorder", "__esmMin", "init_dfs", "__name", "init_prim", "__esmMin", "init_priority_queue", "init_graph", "init_alg", "__esmMin", "init_components", "init_dijkstra", "init_dijkstra_all", "init_find_cycles", "init_floyd_warshall", "init_is_acyclic", "init_postorder", "init_preorder", "init_prim", "init_tarjan", "init_topsort", "networkSimplex", "g", "simplify", "longestPath", "t", "feasibleTree", "initLowLimValues", "initCutValues", "e", "f", "leaveEdge", "enterEdge", "exchangeEdges", "vs", "postorder", "forEach_default", "v", "assignCutValue", "child", "childLab", "parent", "calcCutValue", "childIsTail", "graphEdge", "cutValue", "isOutEdge", "other", "pointsToHead", "otherWeight", "isTreeEdge", "otherCutValue", "tree", "root", "dfsAssignLowLim", "visited", "nextLim", "low", "label", "w", "has_default", "find_default", "edge", "vLabel", "wLabel", "tailLabel", "flip", "candidates", "filter_default", "isDescendant", "minBy_default", "slack", "updateRanks", "preorder", "flipped", "u", "rootLabel", "init_network_simplex", "__esmMin", "init_lodash", "init_alg", "init_util", "init_feasible_tree", "__name", "rank", "g", "networkSimplexRanker", "tightTreeRanker", "longestPathRanker", "longestPath", "feasibleTree", "networkSimplex", "init_rank", "__esmMin", "init_feasible_tree", "init_network_simplex", "init_util", "__name", "run", "g", "root", "addDummyNode", "depths", "treeDepths", "height", "max_default", "values_default", "nodeSep", "forEach_default", "e", "weight", "sumWeights", "child", "dfs", "v", "children", "top", "addBorderNode", "bottom", "label", "childNode", "childTop", "childBottom", "thisWeight", "minlen", "depth", "__name", "reduce_default", "acc", "cleanup", "graphLabel", "edge", "init_nesting_graph", "__esmMin", "init_lodash", "init_util", "addSubgraphConstraints", "g", "cg", "vs", "prev", "rootPrev", "forEach_default", "v", "child", "parent", "prevChild", "init_add_subgraph_constraints", "__esmMin", "init_lodash", "__name", "buildLayerGraph", "g", "rank", "relationship", "root", "createRootNode", "result", "Graph", "v", "forEach_default", "node", "parent", "e", "u", "edge", "weight", "isUndefined_default", "has_default", "uniqueId_default", "init_build_layer_graph", "__esmMin", "init_lodash", "init_graphlib", "__name", "crossCount", "g", "layering", "cc", "i", "twoLayerCrossCount", "northLayer", "southLayer", "southPos", "zipObject_default", "map_default", "v", "southEntries", "flatten_default", "sortBy_default", "e", "firstIndex", "treeSize", "tree", "forEach_default", "entry", "index", "weightSum", "init_cross_count", "__esmMin", "init_lodash", "__name", "initOrder", "g", "visited", "simpleNodes", "filter_default", "v", "maxRank", "max_default", "map_default", "layers", "range_default", "dfs", "has_default", "node", "forEach_default", "__name", "orderedVs", "sortBy_default", "init_init_order", "__esmMin", "init_lodash", "barycenter", "g", "movable", "map_default", "v", "inV", "result", "reduce_default", "acc", "e", "edge", "nodeU", "init_barycenter", "__esmMin", "init_lodash", "__name", "resolveConflicts", "entries", "cg", "mappedEntries", "forEach_default", "entry", "i", "tmp", "isUndefined_default", "e", "entryV", "entryW", "sourceSet", "filter_default", "doResolveConflicts", "handleIn", "vEntry", "uEntry", "mergeEntries", "__name", "handleOut", "wEntry", "map_default", "pick_default", "target", "source", "sum", "weight", "init_resolve_conflicts", "__esmMin", "init_lodash", "sort", "entries", "biasRight", "parts", "partition", "entry", "has_default", "sortable", "unsortable", "sortBy_default", "vs", "sum", "weight", "vsIndex", "compareWithBias", "consumeUnsortable", "forEach_default", "result", "flatten_default", "index", "last", "last_default", "bias", "entryV", "entryW", "init_sort", "__esmMin", "init_lodash", "init_util", "__name", "sortSubgraph", "g", "v", "cg", "biasRight", "movable", "node", "bl", "br", "subgraphs", "filter_default", "w", "barycenters", "barycenter", "forEach_default", "entry", "subgraphResult", "has_default", "mergeBarycenters", "entries", "resolveConflicts", "expandSubgraphs", "result", "sort", "flatten_default", "blPred", "brPred", "target", "other", "isUndefined_default", "init_sort_subgraph", "__esmMin", "init_lodash", "init_barycenter", "init_resolve_conflicts", "init_sort", "__name", "order", "g", "maxRank", "downLayerGraphs", "buildLayerGraphs", "range_default", "upLayerGraphs", "layering", "initOrder", "assignOrder", "bestCC", "best", "i", "lastBest", "sweepLayerGraphs", "buildLayerMatrix", "cc", "crossCount", "cloneDeep_default", "ranks", "relationship", "map_default", "rank", "buildLayerGraph", "layerGraphs", "biasRight", "cg", "Graph", "forEach_default", "lg", "root", "sorted", "sortSubgraph", "v", "addSubgraphConstraints", "layer", "init_order", "__esmMin", "init_lodash", "init_graphlib", "init_util", "init_add_subgraph_constraints", "init_build_layer_graph", "init_cross_count", "init_init_order", "init_sort_subgraph", "__name", "parentDummyChains", "g", "postorderNums", "postorder", "forEach_default", "v", "node", "edgeObj", "pathData", "findPath", "path", "lca", "pathIdx", "pathV", "ascending", "w", "vPath", "wPath", "low", "lim", "parent", "result", "dfs", "__name", "init_parent_dummy_chains", "__esmMin", "init_lodash", "findType1Conflicts", "g", "layering", "conflicts", "visitLayer", "prevLayer", "layer", "k0", "scanPos", "prevLayerLength", "lastNode", "last_default", "forEach_default", "v", "i", "w", "findOtherInnerSegmentNode", "k1", "scanNode", "u", "uLabel", "uPos", "addConflict", "__name", "reduce_default", "findType2Conflicts", "scan", "south", "southPos", "southEnd", "prevNorthBorder", "nextNorthBorder", "range_default", "uNode", "north", "prevNorthPos", "nextNorthPos", "southLookahead", "predecessors", "find_default", "tmp", "conflictsV", "hasConflict", "has_default", "verticalAlignment", "neighborFn", "root", "align", "pos", "order", "prevIdx", "ws", "sortBy_default", "mp", "il", "horizontalCompaction", "reverseSep", "xs", "blockG", "buildBlockGraph", "borderType", "iterate", "setXsFunc", "nextNodesFunc", "stack", "elem", "visited", "pass1", "acc", "e", "pass2", "min", "node", "blockGraph", "Graph", "graphLabel", "sepFn", "sep", "vRoot", "uRoot", "prevMax", "findSmallestWidthAlignment", "xss", "minBy_default", "values_default", "max", "forIn_default", "x", "halfWidth", "width", "alignCoordinates", "alignTo", "alignToVals", "alignToMin", "min_default", "alignToMax", "max_default", "vert", "horiz", "alignment", "delta", "xsVals", "mapValues_default", "balance", "ignore", "map_default", "positionX", "buildLayerMatrix", "merge_default", "adjustedLayering", "inner", "smallestWidth", "nodeSep", "edgeSep", "vLabel", "wLabel", "sum", "init_bk", "__esmMin", "init_lodash", "init_graphlib", "init_util", "position", "g", "asNonCompoundGraph", "positionY", "forOwn_default", "positionX", "x", "v", "layering", "buildLayerMatrix", "rankSep", "prevY", "forEach_default", "layer", "maxHeight", "max_default", "map_default", "init_position", "__esmMin", "init_lodash", "init_util", "init_bk", "__name", "layout", "g", "opts", "time", "notime", "layoutGraph", "buildLayoutGraph", "runLayout", "updateInputGraph", "makeSpaceForEdgeLabels", "removeSelfEdges", "run", "rank", "asNonCompoundGraph", "injectEdgeLabelProxies", "removeEmptyRanks", "cleanup", "normalizeRanks", "assignRankMinMax", "removeEdgeLabelProxies", "parentDummyChains", "addBorderSegments", "order", "insertSelfEdges", "adjust", "position", "positionSelfEdges", "removeBorderNodes", "undo", "fixupEdgeLabelCoords", "translateGraph", "assignNodeIntersects", "reversePointsForReversedEdges", "inputGraph", "forEach_default", "v", "inputLabel", "layoutLabel", "e", "has_default", "Graph", "graph", "canonicalize", "merge_default", "graphDefaults", "selectNumberAttrs", "graphNumAttrs", "pick_default", "graphAttrs", "node", "defaults_default", "nodeNumAttrs", "nodeDefaults", "edge", "edgeDefaults", "edgeNumAttrs", "edgeAttrs", "w", "label", "addDummyNode", "maxRank", "max_default", "minX", "maxX", "minY", "maxY", "graphLabel", "marginX", "marginY", "getExtremes", "attrs", "x", "y", "h", "__name", "p", "nodeV", "nodeW", "p1", "p2", "intersectRect", "t", "b", "l", "last_default", "r", "layers", "buildLayerMatrix", "layer", "orderShift", "i", "selfEdge", "selfNode", "dx", "dy", "obj", "mapValues_default", "newAttrs", "k", "init_layout", "__esmMin", "init_lodash", "init_graphlib", "init_add_border_segments", "init_coordinate_system", "init_acyclic", "init_normalize", "init_rank", "init_nesting_graph", "init_order", "init_parent_dummy_chains", "init_position", "init_util", "init_dagre", "__esmMin", "init_acyclic", "init_layout", "init_normalize", "init_rank", "write", "g", "json", "writeNodes", "writeEdges", "isUndefined_default", "clone_default", "map_default", "v", "nodeValue", "parent", "node", "edgeValue", "edge", "init_json", "__esmMin", "init_lodash", "init_graph", "__name", "clusterDb", "descendants", "parents", "clear", "isDescendant", "edgeInCluster", "copy", "extractDescendants", "findCommonEdges", "findNonClusterChild", "getAnchorId", "adjustClustersAndEdges", "extractor", "sorter", "sortNodesByHierarchy", "init_mermaid_graphlib", "__esmMin", "init_logger", "init_graphlib", "init_json", "__name", "id", "ancestorId", "ancestorDescendants", "log", "edge", "clusterId", "clusterDescendants", "graph", "newGraph", "rootId", "nodes", "node", "data", "edges", "e", "children", "res", "child", "id1", "id2", "edges1", "edges2", "edges1Prim", "edges2Prim", "edgeIn1", "reserve", "_id", "commonEdges", "depth", "d1", "d2", "nonClusterChild", "parent", "v", "w", "specialId1", "specialId2", "edge1", "edgeMid", "edge2", "write", "hasChildren", "dir", "clusterGraph", "Graph", "result", "sorted", "dagre_exports", "__export", "render", "recursiveRender", "init_dagre", "__esmMin", "init_json", "init_graphlib", "init_markers", "init_util", "init_mermaid_graphlib", "init_nodes", "init_clusters", "init_edges", "init_logger", "init_subGraphTitleMargins", "init_diagramAPI", "__name", "_elem", "graph", "diagramType", "id", "parentCluster", "siteConfig", "log", "write", "dir", "elem", "clusters", "edgePaths", "edgeLabels", "nodes", "v", "node", "data", "ranksep", "nodesep", "o", "newEl", "updateNodeBounds", "setNodeElem", "findNonClusterChild", "clusterDb", "insertNode", "edgePromises", "e", "edge", "insertEdgeLabel", "layout", "diff", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "sortNodesByHierarchy", "positionNode", "halfPadding", "labelHeight", "offsetY", "insertCluster", "parent", "point", "startNode", "endNode", "paths", "insertEdge", "positionEdgeLabel", "n", "data4Layout", "svg", "Graph", "element", "markers_default", "clear", "adjustClustersAndEdges", "getConfig", "layoutAlgorithms", "registerLayoutLoaders", "registerDefaultLayoutLoaders", "render", "getRegisteredLayoutAlgorithm", "init_render", "__esmMin", "init_internals", "init_logger", "__name", "loaders", "loader", "data4Layout", "svg", "layoutDefinition", "internalHelpers", "algorithm", "fallback", "log", "setupViewPortForSVG", "calculateDimensionsWithPadding", "createViewBox", "init_setupViewPortForSVG", "__esmMin", "init_setupGraphViewbox", "init_logger", "__name", "svg", "padding", "cssDiagram", "useMaxWidth", "width", "height", "x", "y", "configureSvgSize", "viewBox", "log", "bounds", "getClasses", "draw", "flowRenderer_v3_unified_default", "init_flowRenderer_v3_unified", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_insertElementsForSize", "init_render", "init_setupViewPortForSVG", "init_utils", "init_flowDb", "__name", "text", "diagramObj", "id", "_version", "diag", "log", "securityLevel", "conf", "layout", "getConfig", "sandboxElement", "select_default", "doc", "data4Layout", "svg", "getDiagramElement", "direction", "getDirection", "getRegisteredLayoutAlgorithm", "render", "padding", "utils_default", "setupViewPortForSVG", "vertex", "node", "link", "linkNode", "shape", "label", "parser", "flow_default", "init_flow", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "$VT", "$VU", "$VV", "$VW", "$VX", "$VY", "$VZ", "$V_", "$V$", "$V01", "$V11", "$V21", "$V31", "$V41", "$V51", "$V61", "$V71", "$V81", "$V91", "$Va1", "$Vb1", "$Vc1", "$Vd1", "$Ve1", "$Vf1", "$Vg1", "$Vh1", "$Vi1", "$Vj1", "$Vk1", "$Vl1", "$Vm1", "$Vn1", "$Vo1", "$Vp1", "$Vq1", "$Vr1", "$Vs1", "$Vt1", "$Vu1", "$Vv1", "$Vw1", "$Vx1", "$Vy1", "$Vz1", "$VA1", "$VB1", "$VC1", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "inf", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "fade", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "color", "opacity", "channel", "channel_default", "r", "g", "b", "rgba_default", "options", "flowDiagram_exports", "__export", "diagram", "init_flowDiagram", "__esmMin", "init_diagramAPI", "init_flowDb", "init_flowRenderer_v3_unified", "init_flow", "init_styles", "flow_default", "flowDb_default", "flowRenderer_v3_unified_default", "styles_default", "__name", "cnf", "setConfig", "parser", "erDiagram_default", "init_erDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "entities", "relationships", "Cardinality", "Identification", "addEntity", "getEntities", "addAttributes", "addRelationship", "getRelationships", "clear", "erDb_default", "init_erDb", "__esmMin", "init_logger", "init_diagramAPI", "init_commonDb", "__name", "name", "alias", "log", "entityName", "attribs", "entity", "i", "entA", "rolA", "entB", "rSpec", "rel", "getConfig", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "setDiagramTitle", "getDiagramTitle", "ERMarkers", "insertMarkers", "erMarkers_default", "init_erMarkers", "__esmMin", "__name", "elem", "conf", "marker", "regex_default", "init_regex", "__esmMin", "validate", "uuid", "regex_default", "validate_default", "init_validate", "__esmMin", "init_regex", "__name", "unsafeStringify", "arr", "offset", "byteToHex", "init_stringify", "__esmMin", "i", "__name", "parse", "uuid", "validate_default", "v", "arr", "parse_default", "init_parse", "__esmMin", "init_validate", "__name", "stringToBytes", "str", "bytes", "i", "v35", "name", "version", "hashfunc", "generateUUID", "value", "namespace", "buf", "offset", "_namespace", "parse_default", "unsafeStringify", "__name", "DNS", "URL", "init_v35", "__esmMin", "init_stringify", "init_parse", "f", "s", "x", "y", "z", "ROTL", "n", "sha1", "bytes", "K", "H", "msg", "i", "l", "N", "M", "arr", "j", "W", "t", "a", "b", "c", "e", "T", "sha1_default", "init_sha1", "__esmMin", "__name", "v5", "v5_default", "init_v5", "__esmMin", "init_v35", "init_sha1", "v35", "sha1_default", "init_esm_browser", "__esmMin", "init_v5", "generateId", "str", "prefix", "simplifiedStr", "BAD_ID_CHARS_REGEXP", "strWithHyphen", "v5_default", "MERMAID_ERDIAGRAM_UUID", "conf", "entityNameIds", "setConf", "drawAttributes", "drawEntities", "adjustEntities", "getEdgeName", "addRelationships", "relCnt", "drawRelationshipFromLayout", "draw", "erRenderer_default", "init_erRenderer", "__esmMin", "init_graphlib", "init_src", "init_dagre", "init_diagramAPI", "init_logger", "init_utils", "init_erMarkers", "init_setupGraphViewbox", "init_common", "init_esm_browser", "__name", "cnf", "keys", "key", "groupNode", "entityTextNode", "attributes", "heightPadding", "widthPadding", "attrFontSize", "labelBBox", "attributeNodes", "hasKeyType", "hasComment", "maxTypeWidth", "maxNameWidth", "maxKeyWidth", "maxCommentWidth", "cumulativeHeight", "attrNum", "item", "attrPrefix", "nodeHeight", "attributeType", "parseGenericTypes", "typeNode", "getConfig", "nameNode", "attributeNode", "typeBBox", "nameBBox", "keyTypeNodeText", "keyTypeNode", "keyTypeBBox", "commentNode", "commentNodeBBox", "widthPaddingFactor", "maxWidth", "bBox", "spareColumnWidth", "heightOffset", "attribStyle", "alignY", "typeRect", "nameXOffset", "nameRect", "keyTypeAndCommentXOffset", "keyTypeRect", "svgNode", "entities", "graph", "firstOne", "entityName", "entityId", "textId", "textNode", "entityWidth", "entityHeight", "rectBBox", "v", "rel", "relationships", "g", "svg", "insert", "diagObj", "edge", "lineFunction", "line_default", "d", "basis_default", "svgPath", "url", "erMarkers_default", "len", "labelPoint", "labelId", "text", "id", "_version", "log", "securityLevel", "sandboxElement", "select_default", "Graph", "firstEntity", "layout", "padding", "utils_default", "svgBounds", "width", "height", "configureSvgSize", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "erDiagram_exports", "__export", "diagram", "init_erDiagram", "__esmMin", "init_erDb", "init_erRenderer", "init_styles", "erDiagram_default", "erDb_default", "erRenderer_default", "styles_default", "isAstNode", "obj", "isReference", "isAstNodeDescription", "isLinkingError", "isCompositeCstNode", "node", "isLeafCstNode", "isRootCstNode", "AbstractAstReflection", "init_syntax_tree", "__esmMin", "__name", "type", "subtype", "supertype", "nested", "existing", "result", "allTypes", "types", "possibleSubType", "toString", "item", "isIterable", "obj", "stream", "collections", "collection", "StreamImpl", "iterator", "state", "DONE_RESULT", "next", "EMPTY_STREAM", "TreeStreamImpl", "Reduction", "init_stream", "__esmMin", "_StreamImpl", "__name", "startFn", "nextFn", "count", "result", "keyFn", "valueFn", "entryStream", "element", "other", "separator", "value", "addSeparator", "searchElement", "fromIndex", "index", "predicate", "callbackfn", "done", "initialValue", "previousValue", "mapped", "depth", "skipCount", "i", "maxSize", "by", "set", "e", "key", "otherKeySet", "ownKey", "root", "children", "options", "sum", "a", "b", "product", "min", "max", "cst_utils_exports", "__export", "DefaultNameRegexp", "RangeComparison", "compareRange", "findCommentNode", "findDeclarationNodeAtOffset", "findLeafNodeAtOffset", "findLeafNodeBeforeOffset", "flattenCst", "getInteriorNodes", "getNextNode", "getPreviousNode", "getStartlineNode", "inRange", "isChildNode", "isCommentNode", "streamCst", "toDocumentSegment", "tokenToRange", "node", "TreeStreamImpl", "element", "isCompositeCstNode", "isLeafCstNode", "child", "parent", "token", "offset", "end", "range", "to", "startInside", "endInside", "cstNode", "nameRegexp", "localOffset", "textAtOffset", "commentNames", "previous", "isRootCstNode", "endIndex", "e", "searchResult", "binarySearch", "closest", "left", "right", "closestNode", "middle", "middleNode", "hidden", "index", "last", "next", "line", "selfIndex", "start", "commonParent", "getCommonParent", "a", "b", "aParents", "getParentChain", "bParents", "current", "i", "aParent", "bParent", "chain", "init_cst_utils", "__esmMin", "init_syntax_tree", "init_stream", "__name", "assertUnreachable", "_", "ErrorWithLocation", "init_errors", "__esmMin", "__name", "node", "message", "ast_exports", "__export", "AbstractElement", "AbstractRule", "AbstractType", "Action", "Alternatives", "ArrayLiteral", "ArrayType", "Assignment", "BooleanLiteral", "CharacterRange", "Condition", "Conjunction", "CrossReference", "Disjunction", "EndOfFile", "Grammar", "GrammarImport", "Group", "InferredType", "Interface", "Keyword", "LangiumGrammarAstReflection", "LangiumGrammarTerminals", "NamedArgument", "NegatedToken", "Negation", "NumberLiteral", "Parameter", "ParameterReference", "ParserRule", "ReferenceType", "RegexToken", "ReturnType", "RuleCall", "SimpleType", "StringLiteral", "TerminalAlternatives", "TerminalGroup", "TerminalRule", "TerminalRuleCall", "Type", "TypeAttribute", "TypeDefinition", "UnionType", "UnorderedGroup", "UntilToken", "ValueLiteral", "Wildcard", "isAbstractElement", "isAbstractRule", "isAbstractType", "isAction", "isAlternatives", "isArrayLiteral", "isArrayType", "isAssignment", "isBooleanLiteral", "isCharacterRange", "isCondition", "isConjunction", "isCrossReference", "isDisjunction", "isEndOfFile", "isFeatureName", "isGrammar", "isGrammarImport", "isGroup", "isInferredType", "isInterface", "isKeyword", "isNamedArgument", "isNegatedToken", "isNegation", "isNumberLiteral", "isParameter", "isParameterReference", "isParserRule", "isPrimitiveType", "isReferenceType", "isRegexToken", "isReturnType", "isRuleCall", "isSimpleType", "isStringLiteral", "isTerminalAlternatives", "isTerminalGroup", "isTerminalRule", "isTerminalRuleCall", "isType", "isTypeAttribute", "isTypeDefinition", "isUnionType", "isUnorderedGroup", "isUntilToken", "isValueLiteral", "isWildcard", "reflection", "item", "init_ast", "__esmMin", "init_syntax_tree", "__name", "AbstractAstReflection", "subtype", "supertype", "refInfo", "referenceId", "type", "ast_utils_exports", "__export", "assignMandatoryProperties", "copyAstNode", "findLocalReferences", "findRootNode", "getContainerOfType", "getDocument", "hasContainerOfType", "linkContentToContainer", "streamAllContents", "streamAst", "streamContents", "streamReferences", "node", "name", "value", "item", "index", "isAstNode", "typePredicate", "predicate", "result", "options", "range", "StreamImpl", "state", "property", "isAstNodeInRange", "element", "DONE_RESULT", "root", "TreeStreamImpl", "astNode", "nodeRange", "_a", "inRange", "isReference", "targetNode", "lookup", "refs", "refInfo", "stream", "reflection", "typeMetaData", "genericNode", "copyDefaultValue", "propertyType", "buildReference", "copy", "copiedArray", "init_ast_utils", "__esmMin", "init_syntax_tree", "init_stream", "init_cst_utils", "__name", "cc", "char", "insertToSet", "item", "set", "subItem", "addFlag", "flagObj", "flagKey", "x", "ASSERT_EXISTS", "obj", "ASSERT_NEVER_REACH_HERE", "isCharacter", "init_utils", "__esmMin", "__name", "digitsCharCodes", "wordCharCodes", "whitespaceCodes", "init_character_classes", "__esmMin", "init_utils", "i", "cc", "hexDigitPattern", "decimalPattern", "decimalPatternNoZero", "RegExpParser", "init_regexp_parser", "__esmMin", "init_utils", "init_character_classes", "__name", "newState", "input", "value", "flags", "addFlag", "alts", "begin", "terms", "type", "ASSERT_EXISTS", "disjunction", "ASSERT_NEVER_REACH_HERE", "isBacktracking", "range", "atLeast", "atMost", "atom", "cc", "set", "complement", "digitsCharCodes", "whitespaceCodes", "wordCharCodes", "escapeCode", "letter", "escapedChar", "nextChar", "from", "isFromSingleChar", "isCharacter", "to", "isToSingleChar", "insertToSet", "capturing", "groupAst", "number", "howMuch", "prevState", "howMany", "hexString", "hexChar", "char", "BaseRegExpVisitor", "init_base_regexp_visitor", "__esmMin", "__name", "node", "key", "child", "subChild", "init_api", "__esmMin", "init_regexp_parser", "init_base_regexp_visitor", "regexp_utils_exports", "__export", "NEWLINE_REGEXP", "escapeRegExp", "getCaseInsensitivePattern", "getTerminalParts", "isMultilineComment", "isWhitespace", "partialMatches", "partialRegExp", "regexp", "pattern", "regexpParser", "parts", "alternative", "visitor", "value", "keyword", "letter", "regex", "input", "partial", "match", "re", "source", "i", "process", "result", "tmp", "appendRaw", "nbChars", "__name", "appendOptional", "TerminalRegExpVisitor", "init_regexp_utils", "__esmMin", "init_api", "RegExpParser", "BaseRegExpVisitor", "node", "char", "escapedChar", "set", "grammar_utils_exports", "__export", "findAssignment", "findNameAssignment", "findNodeForKeyword", "findNodeForProperty", "findNodesForKeyword", "findNodesForKeywordInternal", "findNodesForProperty", "getActionAtElement", "getActionType", "getAllReachableRules", "getCrossReferenceTerminal", "getEntryRule", "getExplicitRuleType", "getHiddenRules", "getRuleType", "getTypeName", "isArrayCardinality", "isArrayOperator", "isCommentTerminal", "isDataType", "isDataTypeRule", "isOptionalCardinality", "terminalRegex", "grammar", "isParserRule", "isTerminalRule", "allTerminals", "ruleNames", "entryRule", "topMostRules", "rule", "ruleDfs", "rules", "visitedSet", "streamAllContents", "node", "isRuleCall", "isTerminalRuleCall", "refRule", "crossRef", "nameAssigment", "terminalRule", "property", "findNodesForPropertyInternal", "index", "nodes", "element", "first", "nodeFeature", "getContainerOfType", "isAssignment", "isCompositeCstNode", "e", "keyword", "isKeyword", "treeIterator", "streamCst", "result", "keywordNodes", "childNode", "cstNode", "astNode", "_a", "assignment", "type", "startNode", "isInferredType", "isAction", "assertUnreachable", "findNameAssignmentInternal", "cache", "go", "refType", "childAssignment", "__name", "isSimpleType", "parent", "isGroup", "elements", "item", "action", "isAbstractElement", "cardinality", "operator", "isDataTypeRuleInternal", "visited", "isDataTypeInternal", "isArrayType", "isReferenceType", "isUnionType", "ref", "isType", "isInterface", "isReturnType", "actionType", "_b", "_c", "flags", "source", "abstractElementToRegex", "flagText", "value", "name", "isTerminalAlternatives", "terminalAlternativesToRegex", "isTerminalGroup", "terminalGroupToRegex", "isCharacterRange", "characterRangeToRegex", "withCardinality", "isNegatedToken", "negateTokenToRegex", "isUntilToken", "untilTokenToRegex", "isRegexToken", "lastSlash", "regexFlags", "isWildcard", "WILDCARD", "alternatives", "group", "until", "negate", "range", "keywordToRegex", "escapeRegExp", "regex", "options", "init_grammar_utils", "__esmMin", "init_errors", "init_ast", "init_syntax_tree", "init_ast_utils", "init_cst_utils", "init_regexp_utils", "createGrammarConfig", "services", "rules", "grammar", "rule", "isTerminalRule", "isCommentTerminal", "isMultilineComment", "terminalRegex", "DefaultNameRegexp", "init_grammar_config", "__esmMin", "init_cst_utils", "init_grammar_utils", "init_regexp_utils", "init_ast", "__name", "init_version", "__esmMin", "PRINT_ERROR", "msg", "PRINT_WARNING", "init_print", "__esmMin", "__name", "timer", "func", "start", "val", "init_timer", "__esmMin", "__name", "toFastProperties", "toBecomeFast", "FakeConstructor", "__name", "fakeInstance", "fakeAccess", "init_to_fast_properties", "__esmMin", "init_api", "__esmMin", "init_print", "init_timer", "init_to_fast_properties", "tokenLabel", "tokType", "hasTokenLabel", "obj", "isString_default", "serializeGrammar", "topRules", "map_default", "serializeProduction", "node", "convertDefinition", "definition", "__name", "NonTerminal", "serializedNonTerminal", "Alternative", "Option", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "Terminal", "RepetitionWithSeparator", "Repetition", "Alternation", "serializedTerminal", "pattern", "isRegExp_default", "Rule", "AbstractProduction", "init_model", "__esmMin", "init_lodash", "value", "_definition", "visitor", "forEach_default", "prod", "options", "assign_default", "pickBy_default", "v", "GAstVisitor", "init_visitor", "__esmMin", "init_model", "__name", "node", "nodeAny", "NonTerminal", "Alternative", "Option", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Alternation", "Terminal", "Rule", "isSequenceProd", "prod", "Alternative", "Option", "Repetition", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Terminal", "Rule", "isOptionalProd", "alreadyVisited", "Alternation", "some_default", "subProd", "NonTerminal", "includes_default", "AbstractProduction", "every_default", "isBranchingProd", "getProductionDslName", "init_helpers", "__esmMin", "init_lodash", "init_model", "__name", "init_api", "__esmMin", "init_model", "init_visitor", "init_helpers", "restForRepetitionWithSeparator", "repSepProd", "currRest", "prevRest", "Option", "Terminal", "RestWalker", "init_rest", "__esmMin", "init_lodash", "init_api", "__name", "prod", "forEach_default", "subProd", "index", "drop_default", "NonTerminal", "Alternative", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Alternation", "terminal", "refProd", "flatProd", "fullOrRest", "optionProd", "atLeastOneProd", "fullAtLeastOneRest", "atLeastOneSepProd", "fullAtLeastOneSepRest", "manyProd", "fullManyRest", "manySepProd", "fullManySepRest", "orProd", "alt", "prodWrapper", "first", "prod", "NonTerminal", "Terminal", "firstForTerminal", "isSequenceProd", "firstForSequence", "isBranchingProd", "firstForBranching", "firstSet", "seq", "nextSubProdIdx", "hasInnerProdsRemaining", "currSubProd", "isLastInnerProdOptional", "isOptionalProd", "uniq_default", "allAlternativesFirsts", "map_default", "innerProd", "flatten_default", "terminal", "init_first", "__esmMin", "init_lodash", "init_api", "__name", "IN", "init_constants", "__esmMin", "computeAllProdsFollows", "topProductions", "reSyncFollows", "forEach_default", "topProd", "currRefsFollow", "ResyncFollowsWalker", "assign_default", "buildBetweenProdsFollowPrefix", "inner", "occurenceInParent", "IN", "init_follow", "__esmMin", "init_rest", "init_first", "init_lodash", "init_constants", "init_api", "RestWalker", "__name", "terminal", "currRest", "prevRest", "refProd", "followName", "fullRest", "restProd", "Alternative", "t_in_topProd_follows", "first", "getRegExpAst", "regExp", "regExpStr", "regExpAstCache", "regExpAst", "regExpParser", "clearRegExpParserCache", "init_reg_exp_parser", "__esmMin", "init_api", "RegExpParser", "__name", "getOptimizedStartCodesIndices", "regExp", "ensureOptimizations", "ast", "getRegExpAst", "firstCharOptimizedIndices", "e", "complementErrorMessage", "PRINT_WARNING", "failedOptimizationPrefixMsg", "msgSuffix", "PRINT_ERROR", "result", "ignoreCase", "terms", "term", "atom", "addOptimizedIdxToResult", "forEach_default", "code", "range", "rangeCode", "minOptimizationVal", "minUnOptVal", "maxUnOptVal", "minOptIdx", "charCodeToOptimizedIndex", "maxOptIdx", "currOptIdx", "isOptionalQuantifier", "isWholeOptional", "values_default", "optimizedCharIdx", "handleIgnoreCase", "char", "upperChar", "lowerChar", "findCode", "setNode", "targetCharCodes", "find_default", "codeOrRange", "includes_default", "targetCode", "quantifier", "isArray_default", "every_default", "canMatchCharCode", "charCodes", "pattern", "charCodeFinder", "CharCodeFinder", "init_reg_exp", "__esmMin", "init_api", "init_lodash", "init_reg_exp_parser", "init_lexer", "__name", "BaseRegExpVisitor", "node", "analyzeTokenTypes", "tokenTypes", "options", "defaults_default", "SUPPORT_STICKY", "__name", "msg", "action", "tracer", "initCharCodeToOptimizedIndexMap", "onlyRelevantTypes", "reject_default", "currType", "PATTERN", "Lexer", "hasCustom", "allTransformedPatterns", "map_default", "currPattern", "isRegExp_default", "regExpSource", "includes_default", "addStickyFlag", "addStartOfInput", "isFunction_default", "escapedRegExpString", "wrappedRegExp", "patternIdxToType", "patternIdxToGroup", "patternIdxToLongerAltIdxArr", "patternIdxToPushMode", "patternIdxToPopMode", "clazz", "groupName", "isString_default", "isUndefined_default", "longerAltType", "isArray_default", "type", "indexOf_default", "has_default", "patternIdxToCanLineTerminator", "lineTerminatorCharCodes", "getCharCodes", "tokType", "checkLineBreaksIssues", "canMatchCharCode", "patternIdxToIsCustom", "patternIdxToShort", "emptyGroups", "patternIdxToConfig", "isCustomPattern", "isShortPattern", "reduce_default", "acc", "x", "idx", "canBeOptimized", "charCodeToPatternIdxToConfig", "result", "currTokType", "charCode", "optimizedIdx", "charCodeToOptimizedIndex", "addToMapOfArrays", "lastOptimizedIdx", "forEach_default", "charOrInt", "currOptimizedIdx", "PRINT_ERROR", "failedOptimizationPrefixMsg", "optimizedCodes", "getOptimizedStartCodesIndices", "isEmpty_default", "code", "validatePatterns", "validModesNames", "errors", "missingResult", "findMissingPatterns", "invalidResult", "findInvalidPatterns", "validTokenTypes", "validateRegExpPattern", "findInvalidGroupType", "findModesThatDoNotExist", "findUnreachablePatterns", "withRegExpPatterns", "filter_default", "findEndOfInputAnchor", "findStartOfInputAnchor", "findUnsupportedFlags", "findDuplicatePatterns", "findEmptyMatchRegExps", "tokenTypesWithMissingPattern", "LexerDefinitionErrorType", "valid", "difference_default", "tokenTypesWithInvalidPattern", "pattern", "EndAnchorFinder", "BaseRegExpVisitor", "node", "invalidRegex", "regexpAst", "getRegExpAst", "endAnchorVisitor", "end_of_input", "matchesEmptyString", "StartAnchorFinder", "startAnchorVisitor", "start_of_input", "invalidFlags", "found", "identicalPatterns", "outerType", "innerType", "compact_default", "duplicatePatterns", "currIdenticalSet", "setOfIdentical", "tokenTypeNames", "head_default", "invalidTypes", "group", "validModes", "invalidModes", "canBeTested", "noMetaChar", "testIdx", "str", "tokenType", "testTokenType", "regExpArray", "regExp", "find_default", "char", "flags", "performRuntimeChecks", "lexerDefinition", "trackLines", "lineTerminatorCharacters", "DEFAULT_MODE", "MODES", "currModeValue", "currModeName", "currIdx", "longerAlt", "currLongerAlt", "performWarningRuntimeChecks", "warnings", "hasAnyLineBreak", "allTokenTypes", "flatten_default", "values_default", "concreteTokenTypes", "terminatorCharCodes", "currIssue", "warningDescriptor", "buildLineBreakIssueMessage", "cloneEmptyGroups", "clonedResult", "groupKeys", "keys_default", "currKey", "currGroupValue", "e", "details", "charsOrCodes", "numOrString", "map", "key", "value", "minOptimizationVal", "charCodeToOptimizedIdxMap", "i", "LineTerminatorOptimizedTester", "init_lexer", "__esmMin", "init_api", "init_lexer_public", "init_lodash", "init_reg_exp", "init_reg_exp_parser", "text", "len", "c", "tokenStructuredMatcher", "tokInstance", "tokConstructor", "instanceType", "tokenStructuredMatcherNoCategories", "token", "tokType", "augmentTokenTypes", "tokenTypes", "tokenTypesAndParents", "expandCategories", "assignTokenDefaultProps", "assignCategoriesMapProp", "assignCategoriesTokensProp", "forEach_default", "result", "clone_default", "categories", "searching", "compact_default", "flatten_default", "map_default", "currTokType", "newCategories", "difference_default", "isEmpty_default", "hasShortKeyProperty", "tokenIdxToClass", "tokenShortNameIdx", "hasCategoriesProperty", "isArray_default", "hasExtendingTokensTypesProperty", "hasExtendingTokensTypesMapProperty", "val", "key", "singleAssignCategoriesToksMap", "path", "nextNode", "pathNode", "nextCategory", "newPath", "includes_default", "has_default", "isTokenType", "init_tokens", "__esmMin", "init_lodash", "__name", "defaultLexerErrorProvider", "init_lexer_errors_public", "__esmMin", "token", "fullText", "startOffset", "length", "line", "column", "LexerDefinitionErrorType", "DEFAULT_LEXER_CONFIG", "Lexer", "init_lexer_public", "__esmMin", "init_lexer", "init_lodash", "init_api", "init_tokens", "init_lexer_errors_public", "init_reg_exp_parser", "defaultLexerErrorProvider", "__name", "lexerDefinition", "config", "phaseDesc", "phaseImpl", "indent", "time", "value", "timer", "traceMethod", "assign_default", "traceInitVal", "actualDefinition", "hasOnlySingleMode", "LineTerminatorOptimizedTester", "isArray_default", "clone_default", "DEFAULT_MODE", "performRuntimeChecks", "performWarningRuntimeChecks", "forEach_default", "currModeValue", "currModeName", "reject_default", "currTokType", "isUndefined_default", "allModeNames", "keys_default", "currModDef", "currModName", "validatePatterns", "isEmpty_default", "augmentTokenTypes", "currAnalyzeResult", "analyzeTokenTypes", "allErrMessagesString", "map_default", "error", "warningDescriptor", "PRINT_WARNING", "SUPPORT_STICKY", "identity_default", "noop_default", "unOptimizedModes", "reduce_default", "cannotBeOptimized", "canBeOptimized", "modeName", "clearRegExpParserCache", "toFastProperties", "text", "initialMode", "i", "j", "k", "matchAltImage", "longerAlt", "matchedImage", "payload", "altPayload", "imageLength", "group", "tokType", "newToken", "errLength", "droppedChar", "msg", "match", "orgText", "orgLength", "offset", "matchedTokensIndex", "guessedNumberOfTokens", "matchedTokens", "errors", "line", "column", "groups", "cloneEmptyGroups", "trackLines", "lineTerminatorPattern", "currModePatternsLength", "patternIdxToConfig", "currCharCodeToPatternIdxToConfig", "modeStack", "emptyArray", "getPossiblePatterns", "getPossiblePatternsSlow", "getPossiblePatternsOptimized", "charCode", "optimizedCharIdx", "charCodeToOptimizedIndex", "possiblePatterns", "pop_mode", "popToken", "newMode", "last_default", "modeCanBeOptimized", "push_mode", "currConfig", "recoveryEnabled", "nextCharCode", "chosenPatternIdxToConfig", "chosenPatternsLength", "currPattern", "singleCharCode", "longerAltLength", "longerAltConfig", "longerAltPattern", "numOfLTsInMatch", "foundTerminator", "lastLTEndOffset", "errorStartOffset", "errorLine", "errorColumn", "foundResyncPoint", "pushMode", "length", "regExp", "newLastIndex", "lastLTIdx", "lastCharIsLT", "fixForEndingInLT", "oldColumn", "image", "startOffset", "tokenTypeIdx", "tokenType", "startLine", "startColumn", "tokenVector", "index", "tokenToAdd", "token", "pattern", "regExpArray", "tokenLabel", "tokType", "hasTokenLabel", "obj", "isString_default", "createToken", "config", "createTokenInternal", "pattern", "tokenType", "isUndefined_default", "has_default", "PARENT", "CATEGORIES", "augmentTokenTypes", "LABEL", "GROUP", "POP_MODE", "PUSH_MODE", "LONGER_ALT", "LINE_BREAKS", "START_CHARS_HINT", "createTokenInstance", "image", "startOffset", "endOffset", "startLine", "endLine", "startColumn", "endColumn", "tokenMatcher", "token", "tokenStructuredMatcher", "EOF", "init_tokens_public", "__esmMin", "init_lodash", "init_lexer_public", "init_tokens", "__name", "Lexer", "defaultParserErrorProvider", "defaultGrammarResolverErrorProvider", "defaultGrammarValidatorErrorProvider", "init_errors_public", "__esmMin", "init_tokens_public", "init_lodash", "init_api", "expected", "actual", "previous", "ruleName", "hasTokenLabel", "tokenLabel", "firstRedundant", "expectedPathsPerAlt", "customUserDescription", "errPrefix", "errSuffix", "head_default", "allLookAheadPaths", "reduce_default", "result", "currAltPaths", "nextValidTokenSequences", "map_default", "currPath", "currTokenType", "calculatedDescription", "itemMsg", "idx", "expectedIterationPaths", "topLevelRule", "undefinedRule", "duplicateProds", "getExtraProductionArgument", "prod", "Terminal", "NonTerminal", "__name", "topLevelName", "duplicateProd", "index", "dslName", "getProductionDslName", "extraArgument", "hasExplicitIndex", "msg", "rule", "options", "pathMsg", "currTok", "occurrence", "currtok", "currMessage", "pathNames", "currRule", "leftRecursivePath", "Rule", "resolveGrammar", "topLevels", "errMsgProvider", "refResolver", "GastRefResolverVisitor", "init_resolver", "__esmMin", "init_parser", "init_lodash", "init_api", "__name", "GAstVisitor", "nameToTopRule", "forEach_default", "values_default", "prod", "node", "ref", "msg", "ParserDefinitionErrorType", "possiblePathsFrom", "targetDef", "maxLength", "currPath", "clone_default", "result", "remainingPathWith", "nextDef", "drop_default", "__name", "getAlternativesForProd", "definition", "alternatives", "prod", "Alternative", "NonTerminal", "Option", "RepetitionMandatory", "newDef", "Repetition", "RepetitionMandatoryWithSeparator", "Terminal", "RepetitionWithSeparator", "Alternation", "forEach_default", "currAlt", "isEmpty_default", "nextPossibleTokensAfter", "initialDef", "tokenVector", "tokMatcher", "maxLookAhead", "EXIT_NON_TERMINAL", "EXIT_NON_TERMINAL_ARR", "EXIT_ALTERNATIVE", "foundCompletePath", "tokenVectorLength", "minimalAlternativesIndex", "possiblePaths", "last_default", "currDef", "currIdx", "currRuleStack", "currOccurrenceStack", "nextPath", "dropRight_default", "nextIdx", "actualToken", "newRuleStack", "newOccurrenceStack", "nextPathWithout", "nextPathWith", "secondIteration", "separatorGast", "nthRepetition", "i", "currAltPath", "Rule", "expandTopLevelRule", "topRule", "newCurrOccurrenceStack", "AbstractNextPossibleTokensWalker", "NextAfterTokenWalker", "AbstractNextTerminalAfterProductionWalker", "NextTerminalAfterManyWalker", "NextTerminalAfterManySepWalker", "NextTerminalAfterAtLeastOneWalker", "NextTerminalAfterAtLeastOneSepWalker", "init_interpreter", "__esmMin", "init_lodash", "init_first", "init_rest", "init_api", "RestWalker", "topProd", "path", "prevRest", "refProd", "currRest", "fullRest", "terminal", "restProd", "first", "occurrence", "manyProd", "firstAfterMany", "head_default", "manySepProd", "firstAfterManySep", "atLeastOneProd", "firstAfterAtLeastOne", "atleastOneSepProd", "firstAfterfirstAfterAtLeastOneSep", "getProdType", "prod", "Option", "PROD_TYPE", "Repetition", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Alternation", "getLookaheadPaths", "options", "occurrence", "rule", "prodType", "maxLookahead", "type", "getLookaheadPathsForOr", "getLookaheadPathsForOptionalProd", "buildLookaheadFuncForOr", "ruleGrammar", "hasPredicates", "dynamicTokensEnabled", "laFuncBuilder", "lookAheadPaths", "tokenMatcher", "areTokenCategoriesNotUsed", "tokenStructuredMatcherNoCategories", "tokenStructuredMatcher", "buildLookaheadFuncForOptionalProd", "k", "lookaheadBuilder", "buildAlternativesLookAheadFunc", "alts", "numOfAlts", "areAllOneTokenLookahead", "every_default", "currAlt", "currPath", "orAlts", "predicates", "map_default", "t", "currNumOfPaths", "currPredicate", "nextPath", "j", "currPathLength", "i", "nextToken", "singleTokenAlts", "flatten_default", "choiceToAlt", "reduce_default", "result", "idx", "forEach_default", "currTokType", "has_default", "currExtendingType", "buildSingleAlternativeLookaheadFunction", "alt", "numOfPaths", "singleTokensTypes", "isEmpty_default", "expectedTokenUniqueKey", "initializeArrayOfArrays", "size", "pathToHashKeys", "path", "keys", "tokType", "longerKeys", "currShorterKey", "categoriesKeySuffix", "isUniquePrefixHash", "altKnownPathsKeys", "searchPathKeys", "currAltIdx", "otherAltKnownPathsKeys", "searchIdx", "searchKey", "lookAheadSequenceFromAlternatives", "altsDefs", "partialAlts", "possiblePathsFrom", "finalResult", "altsHashes", "currAltPaths", "dict", "item", "currKey", "newData", "pathLength", "currDataset", "altIdx", "currAltPathsAndSuffixes", "currPathIdx", "currPathPrefix", "suffixDef", "prefixKeys", "currAltResult", "containsPath", "newPartialPathsAndSuffixes", "key", "orProd", "visitor", "InsideDefinitionFinderVisitor", "insideDefVisitor", "insideDef", "afterDef", "RestDefinitionFinderWalker", "insideFlat", "Alternative", "afterFlat", "alternative", "searchPath", "compareOtherPath", "otherPath", "searchTok", "otherTok", "isStrictPrefixOfPath", "prefix", "other", "otherTokType", "singleAltPaths", "singlePath", "token", "init_lookahead", "__esmMin", "init_lodash", "init_interpreter", "init_rest", "init_tokens", "init_api", "__name", "RestWalker", "topProd", "targetOccurrence", "targetProdType", "node", "expectedProdType", "currRest", "prevRest", "optionProd", "atLeastOneProd", "atLeastOneSepProd", "manyProd", "manySepProd", "GAstVisitor", "targetRef", "expectedProdName", "validateLookahead", "options", "lookaheadValidationErrorMessages", "map_default", "errorMessage", "ParserDefinitionErrorType", "validateGrammar", "topLevels", "tokenTypes", "errMsgProvider", "grammarName", "duplicateErrors", "flatMap_default", "currTopLevel", "validateDuplicateProductions", "termsNamespaceConflictErrors", "checkTerminalAndNoneTerminalsNameSpace", "tooManyAltsErrors", "curRule", "validateTooManyAlts", "duplicateRulesError", "validateRuleDoesNotAlreadyExist", "topLevelRule", "collectorVisitor", "OccurrenceValidationCollector", "allRuleProductions", "productionGroups", "groupBy_default", "identifyProductionForDuplicates", "duplicates", "pickBy_default", "currGroup", "values_default", "currDuplicates", "firstProd", "head_default", "msg", "dslName", "getProductionDslName", "defError", "param", "getExtraProductionArgument", "prod", "Terminal", "NonTerminal", "rule", "allRules", "className", "errors", "reduce_default", "result", "errMsg", "validateRuleIsOverridden", "ruleName", "definedRulesNames", "includes_default", "validateNoLeftRecursion", "topRule", "currRule", "path", "nextNonTerminals", "getFirstNoneTerminal", "isEmpty_default", "validNextSteps", "difference_default", "errorsFromNextSteps", "currRefRule", "newPath", "clone_default", "definition", "Alternative", "Option", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Alternation", "flatten_default", "currSubDef", "isFirstOptional", "isOptionalProd", "hasMore", "rest", "drop_default", "validateEmptyOrAlternative", "orCollector", "OrCollector", "ors", "currOr", "exceptLast", "dropRight_default", "currAlternative", "currAltIdx", "possibleFirstInAlt", "nextPossibleTokensAfter", "tokenStructuredMatcher", "validateAmbiguousAlternationAlternatives", "globalMaxLookahead", "reject_default", "currOccurrence", "actualMaxLookahead", "alternatives", "getLookaheadPathsForOr", "altsAmbiguityErrors", "checkAlternativesAmbiguities", "altsPrefixAmbiguityErrors", "checkPrefixAlternativesAmbiguities", "validateSomeNonEmptyLookaheadPath", "topLevelRules", "maxLookahead", "forEach_default", "currTopRule", "RepetitionCollector", "currProd", "prodType", "getProdType", "pathsInsideProduction", "getLookaheadPathsForOptionalProd", "alternation", "foundAmbiguousPaths", "identicalAmbiguities", "currAlt", "currPath", "altsCurrPathAppearsIn", "currOtherAlt", "currOtherAltIdx", "containsPath", "currAmbDescriptor", "ambgIndices", "pathsAndIndices", "idx", "currPathsAndIdx", "compact_default", "currPathAndIdx", "targetIdx", "targetPath", "prefixAmbiguitiesPathsAndIndices", "filter_default", "searchPathAndIdx", "isStrictPrefixOfPath", "currAmbPathAndIdx", "occurrence", "tokenNames", "currToken", "currRuleName", "init_checks", "__esmMin", "init_lodash", "init_parser", "init_api", "init_lookahead", "init_interpreter", "init_tokens", "__name", "GAstVisitor", "subrule", "option", "manySep", "atLeastOne", "atLeastOneSep", "many", "or", "terminal", "node", "resolveGrammar", "options", "actualOptions", "defaults_default", "defaultGrammarResolverErrorProvider", "topRulesTable", "forEach_default", "rule", "validateGrammar", "defaultGrammarValidatorErrorProvider", "init_gast_resolver_public", "__esmMin", "init_lodash", "init_resolver", "init_checks", "init_errors_public", "__name", "isRecognitionException", "error", "includes_default", "RECOGNITION_EXCEPTION_NAMES", "MISMATCHED_TOKEN_EXCEPTION", "NO_VIABLE_ALT_EXCEPTION", "EARLY_EXIT_EXCEPTION", "NOT_ALL_INPUT_PARSED_EXCEPTION", "RecognitionException", "MismatchedTokenException", "NoViableAltException", "NotAllInputParsedException", "EarlyExitException", "init_exceptions_public", "__esmMin", "init_lodash", "__name", "message", "token", "previousToken", "attemptInRepetitionRecovery", "prodFunc", "args", "lookaheadFunc", "dslMethodIdx", "prodOccurrence", "nextToksWalker", "notStuck", "key", "firstAfterRepInfo", "currRuleName", "ruleGrammar", "expectTokAfterLastMatch", "nextTokIdx", "isEndOfRule", "EOF", "EOF_FOLLOW_KEY", "IN_RULE_RECOVERY_EXCEPTION", "InRuleRecoveryException", "Recoverable", "init_recoverable", "__esmMin", "init_tokens_public", "init_lodash", "init_exceptions_public", "init_constants", "init_parser", "__name", "message", "config", "has_default", "DEFAULT_PARSER_CONFIG", "tokType", "tokToInsert", "createTokenInstance", "grammarRule", "grammarRuleArgs", "lookAheadFunc", "expectedTokType", "reSyncTokType", "savedLexerState", "resyncedTokens", "passedResyncPoint", "nextTokenWithoutResync", "currToken", "generateErrorMessage", "previousToken", "msg", "error", "MismatchedTokenException", "dropRight_default", "tokIdxInRule", "grammarPath", "follows", "nextTok", "expectedToken", "isEmpty_default", "mismatchedTok", "find_default", "possibleFollowsTokType", "tokenTypeIdx", "followKey", "currentRuleReSyncSet", "includes_default", "allPossibleReSyncTokTypes", "nextToken", "k", "foundMatch", "resyncTokType", "tokenMatcher", "currRuleShortName", "currRuleIdx", "prevRuleShortName", "explicitRuleStack", "explicitOccurrenceStack", "map_default", "ruleName", "idx", "followStack", "currKey", "flatten_default", "followName", "IN", "token", "resyncTokens", "pathRuleStack", "pathOccurrenceStack", "clone_default", "currShortName", "getKeyForAutomaticLookahead", "ruleIdx", "dslMethodIdx", "occurrence", "init_keys", "__esmMin", "__name", "LLkLookaheadStrategy", "init_llk_lookahead", "__esmMin", "init_lodash", "init_errors_public", "init_parser", "init_checks", "init_lookahead", "__name", "options", "_a", "DEFAULT_PARSER_CONFIG", "leftRecursionErrors", "isEmpty_default", "emptyAltErrors", "ambiguousAltsErrors", "emptyRepetitionErrors", "rules", "flatMap_default", "currTopRule", "validateNoLeftRecursion", "defaultGrammarValidatorErrorProvider", "validateEmptyOrAlternative", "maxLookahead", "validateAmbiguousAlternationAlternatives", "validateSomeNonEmptyLookaheadPath", "buildLookaheadFuncForOr", "buildAlternativesLookAheadFunc", "buildLookaheadFuncForOptionalProd", "getProdType", "buildSingleAlternativeLookaheadFunction", "collectMethods", "rule", "collectorVisitor", "dslMethods", "LooksAhead", "DslMethodsCollectorVisitor", "init_looksahead", "__esmMin", "init_lodash", "init_parser", "init_keys", "init_api", "init_llk_lookahead", "__name", "config", "has_default", "DEFAULT_PARSER_CONFIG", "LLkLookaheadStrategy", "rules", "forEach_default", "currRule", "alternation", "repetition", "option", "repetitionMandatory", "repetitionMandatoryWithSeparator", "repetitionWithSeparator", "currProd", "prodIdx", "getProductionDslName", "laFunc", "key", "getKeyForAutomaticLookahead", "prodOccurrence", "prodKey", "prodType", "prodMaxLookahead", "dslMethodName", "dslMethodIdx", "occurrence", "currRuleShortName", "value", "GAstVisitor", "manySep", "atLeastOne", "atLeastOneSep", "many", "or", "setNodeLocationOnlyOffset", "currNodeLocation", "newLocationInfo", "setNodeLocationFull", "addTerminalToCst", "node", "token", "tokenTypeName", "addNoneTerminalToCst", "ruleName", "ruleResult", "init_cst", "__esmMin", "__name", "defineNameProp", "obj", "nameValue", "NAME", "init_lang_extensions", "__esmMin", "__name", "defaultVisit", "ctx", "param", "childrenNames", "keys_default", "childrenNamesLength", "currChildName", "currChildArray", "currChildArrayLength", "j", "currChild", "createBaseSemanticVisitorConstructor", "grammarName", "ruleNames", "derivedConstructor", "__name", "defineNameProp", "semanticProto", "cstNode", "isArray_default", "isUndefined_default", "semanticDefinitionErrors", "validateVisitor", "isEmpty_default", "errorMessages", "map_default", "currDefError", "createBaseVisitorConstructorWithDefaults", "baseConstructor", "withDefaultsProto", "forEach_default", "ruleName", "visitorInstance", "validateMissingCstMethods", "missingRuleNames", "filter_default", "currRuleName", "isFunction_default", "errors", "CstVisitorDefinitionError", "compact_default", "init_cst_visitor", "__esmMin", "init_lodash", "init_lang_extensions", "TreeBuilder", "init_tree_builder", "__esmMin", "init_cst", "init_lodash", "init_cst_visitor", "init_parser", "__name", "config", "has_default", "DEFAULT_PARSER_CONFIG", "noop_default", "setNodeLocationFull", "setNodeLocationOnlyOffset", "cstNode", "nextToken", "fullRuleName", "ruleCstNode", "prevToken", "loc", "key", "consumedToken", "rootCst", "addTerminalToCst", "ruleCstResult", "ruleName", "preCstNode", "addNoneTerminalToCst", "isUndefined_default", "newBaseCstVisitorConstructor", "createBaseSemanticVisitorConstructor", "keys_default", "newConstructor", "createBaseVisitorConstructorWithDefaults", "ruleStack", "occurrenceStack", "LexerAdapter", "init_lexer_adapter", "__esmMin", "init_parser", "__name", "newInput", "END_OF_FILE", "howMuch", "soughtIdx", "newState", "RecognizerApi", "init_recognizer_api", "__esmMin", "init_lodash", "init_exceptions_public", "init_parser", "init_errors_public", "init_checks", "init_api", "__name", "impl", "idx", "tokType", "options", "ruleToCall", "actionORMethodDef", "altsOrOpts", "name", "implementation", "config", "DEFAULT_RULE_CONFIG", "includes_default", "error", "defaultGrammarValidatorErrorProvider", "ParserDefinitionErrorType", "ruleImplementation", "ruleErrors", "validateRuleIsOverridden", "grammarRule", "args", "orgState", "e", "isRecognitionException", "serializeGrammar", "values_default", "RecognizerEngine", "init_recognizer_engine", "__esmMin", "init_lodash", "init_keys", "init_exceptions_public", "init_lookahead", "init_interpreter", "init_parser", "init_recoverable", "init_tokens_public", "init_tokens", "__name", "tokenVocabulary", "config", "tokenStructuredMatcherNoCategories", "has_default", "isArray_default", "isEmpty_default", "reduce_default", "acc", "tokType", "every_default", "flatten_default", "values_default", "isTokenType", "allTokenTypes", "uniqueTokens", "uniq_default", "isObject_default", "clone_default", "EOF", "noTokenCategoriesUsed", "tokenConstructor", "tokenStructuredMatcher", "augmentTokenTypes", "ruleName", "impl", "resyncEnabled", "DEFAULT_RULE_CONFIG", "recoveryValueFunc", "shortName", "invokeRuleWithTry", "args", "cst", "e", "resyncEnabledConfig", "isFirstInvokedRule", "reSyncEnabled", "isRecognitionException", "recogError", "reSyncTokType", "partialCstResult", "actionORMethodDef", "occurrence", "key", "lookAheadFunc", "action", "predicate", "orgLookaheadFunction", "prodOccurrence", "laKey", "notStuck", "PROD_TYPE", "NextTerminalAfterAtLeastOneWalker", "options", "separator", "separatorLookAheadFunc", "NextTerminalAfterAtLeastOneSepWalker", "lookaheadFunction", "NextTerminalAfterManyWalker", "NextTerminalAfterManySepWalker", "nextTerminalAfterWalker", "beforeIteration", "altsOrOpts", "alts", "altIdxToTake", "firstRedundantTok", "errMsg", "NotAllInputParsedException", "ruleToCall", "idx", "ruleResult", "consumedToken", "nextToken", "eFromConsumption", "msg", "previousToken", "MismatchedTokenException", "follows", "eFromInRuleRecovery", "IN_RULE_RECOVERY_EXCEPTION", "savedErrors", "savedRuleStack", "newState", "fullName", "idxInCallingRule", "ErrorHandler", "init_error_handler", "__esmMin", "init_exceptions_public", "init_lodash", "init_lookahead", "init_parser", "__name", "config", "has_default", "DEFAULT_PARSER_CONFIG", "error", "isRecognitionException", "clone_default", "newErrors", "occurrence", "prodType", "userDefinedErrMsg", "ruleName", "ruleGrammar", "insideProdPaths", "getLookaheadPathsForOptionalProd", "actualTokens", "i", "msg", "EarlyExitException", "errMsgTypes", "lookAheadPathsPerAlternative", "getLookaheadPathsForOr", "previousToken", "errMsg", "NoViableAltException", "ContentAssist", "init_context_assist", "__esmMin", "init_interpreter", "init_lodash", "__name", "startRuleName", "precedingInput", "startRuleGast", "isUndefined_default", "nextPossibleTokensAfter", "grammarPath", "topRuleName", "head_default", "topProduction", "NextAfterTokenWalker", "recordProd", "prodConstructor", "mainProdArg", "occurrence", "handleSep", "assertMethodIdxIsValid", "prevProd", "last_default", "grammarAction", "isFunction_default", "newProd", "has_default", "RECORDING_NULL_OBJECT", "recordOrProd", "hasOptions", "isArray_default", "alts", "newOrProd", "Alternation", "hasPredicates", "some_default", "currAlt", "forEach_default", "currAltFlat", "Alternative", "getIdxSuffix", "idx", "MAX_METHOD_IDX", "error", "HANDLE_SEPARATOR", "RFT", "RECORDING_PHASE_TOKEN", "RECORDING_PHASE_CSTNODE", "GastRecorder", "init_gast_recorder", "__esmMin", "init_lodash", "init_api", "init_lexer_public", "init_tokens", "init_tokens_public", "init_parser", "init_keys", "createToken", "Lexer", "augmentTokenTypes", "createTokenInstance", "__name", "config", "i", "arg1", "arg2", "that", "impl", "grammarRule", "args", "howMuch", "END_OF_FILE", "name", "def", "newTopLevelRule", "Rule", "originalError", "actionORMethodDef", "Option", "RepetitionMandatory", "options", "RepetitionMandatoryWithSeparator", "Repetition", "RepetitionWithSeparator", "altsOrOpts", "ruleToCall", "ruleName", "newNoneTerminal", "NonTerminal", "tokType", "hasShortKeyProperty", "Terminal", "PerformanceTracer", "init_perf_tracer", "__esmMin", "init_lodash", "init_api", "init_parser", "__name", "config", "has_default", "userTraceInitPerf", "traceIsNumber", "DEFAULT_PARSER_CONFIG", "phaseDesc", "phaseImpl", "indent", "time", "value", "timer", "traceMethod", "applyMixins", "derivedCtor", "baseCtors", "baseCtor", "baseProto", "propName", "basePropDescriptor", "init_apply_mixins", "__esmMin", "__name", "EMPTY_ALT", "value", "END_OF_FILE", "DEFAULT_PARSER_CONFIG", "DEFAULT_RULE_CONFIG", "ParserDefinitionErrorType", "Parser", "EmbeddedActionsParser", "init_parser", "__esmMin", "init_lodash", "init_api", "init_follow", "init_tokens_public", "init_errors_public", "init_gast_resolver_public", "init_recoverable", "init_looksahead", "init_tree_builder", "init_lexer_adapter", "init_recognizer_api", "init_recognizer_engine", "init_error_handler", "init_context_assist", "init_gast_recorder", "init_perf_tracer", "init_apply_mixins", "init_checks", "createTokenInstance", "EOF", "defaultParserErrorProvider", "__name", "_Parser", "parserInstance", "defErrorsMsgs", "className", "toFastProperties", "forEach_default", "currRuleName", "originalGrammarAction", "recordedRuleGast", "resolverErrors", "resolveGrammar", "values_default", "isEmpty_default", "validationErrors", "validateGrammar", "defaultGrammarValidatorErrorProvider", "lookaheadValidationErrors", "validateLookahead", "allFollows", "computeAllProdsFollows", "_b", "_a", "map_default", "defError", "tokenVocabulary", "config", "that", "has_default", "applyMixins", "Recoverable", "LooksAhead", "TreeBuilder", "LexerAdapter", "RecognizerEngine", "RecognizerApi", "ErrorHandler", "ContentAssist", "GastRecorder", "PerformanceTracer", "configClone", "clone_default", "init_model", "__esmMin", "init_api", "init_generate", "__esmMin", "init_api", "__esmMin", "init_model", "init_generate", "init_render_public", "__esmMin", "init_version", "init_api", "__esmMin", "init_version", "init_parser", "init_lexer_public", "init_tokens_public", "init_lookahead", "init_llk_lookahead", "init_errors_public", "init_exceptions_public", "init_lexer_errors_public", "init_render_public", "buildATNKey", "rule", "type", "occurrence", "createATN", "rules", "atn", "createRuleStartAndStopATNStates", "ruleLength", "i", "ruleBlock", "block", "buildRuleHandle", "start", "newState", "ATN_RULE_START", "stop", "ATN_RULE_STOP", "atom", "production", "Terminal", "tokenRef", "NonTerminal", "ruleRef", "Alternation", "alternation", "Option", "option", "Repetition", "repetition", "RepetitionWithSeparator", "repetitionSep", "RepetitionMandatory", "repetitionMandatory", "RepetitionMandatoryWithSeparator", "repetitionMandatorySep", "starState", "ATN_STAR_BLOCK_START", "defineDecisionState", "handle", "makeAlts", "star", "sep", "plusState", "ATN_PLUS_BLOCK_START", "plus", "ATN_BASIC", "alts", "map_default", "e", "optional", "handles", "filter_default", "makeBlock", "blkStart", "blkEnd", "loop", "ATN_PLUS_LOOP_BACK", "end", "ATN_LOOP_END", "epsilon", "entry", "ATN_STAR_LOOP_ENTRY", "loopEnd", "ATN_STAR_LOOP_BACK", "state", "ATN_BLOCK_END", "alt", "getProdType", "altsLength", "transition", "isRuleTransition", "RuleTransition", "ruleTransition", "next", "removeState", "first", "last", "tokenType", "left", "right", "addTransition", "AtomTransition", "currentRule", "nonTerminal", "call", "a", "b", "EpsilonTransition", "partial", "t", "AbstractTransition", "init_atn", "__esmMin", "init_map", "init_filter", "init_api", "__name", "target", "ruleStart", "followState", "getATNConfigKey", "config", "alt", "e", "DFA_ERROR", "ATNConfigSet", "init_dfa", "__esmMin", "init_map", "__name", "key", "map_default", "value", "k", "createDFACache", "startState", "decision", "map", "predicateSet", "key", "existing", "isLL1Sequence", "sequences", "allowEmpty", "fullSet", "alt", "altSet", "tokType", "indices", "index", "initATNSimulator", "atn", "decisionLength", "decisionToDFA", "i", "adaptivePredict", "dfaCaches", "logging", "dfa", "start", "closure", "computeStartState", "addDFAState", "newDFAState", "performLookahead", "s0", "previousD", "path", "t", "d", "getExistingTargetState", "computeLookaheadTarget", "DFA_ERROR", "buildAdaptivePredictError", "token", "lookahead", "reach", "computeReachSet", "addDFAEdge", "newState", "predictedAlt", "getUniqueAlt", "hasConflictTerminatingPrediction", "prediction", "min_default", "reportLookaheadAmbiguity", "ambiguityIndices", "prefixPath", "atnState", "topLevelRule", "production", "message", "buildAmbiguityError", "options", "pathMsg", "map_default", "currtok", "tokenLabel", "occurrence", "currMessage", "getProductionDslName", "prod", "NonTerminal", "Option", "Alternation", "RepetitionMandatory", "RepetitionMandatoryWithSeparator", "RepetitionWithSeparator", "Repetition", "Terminal", "previous", "current", "nextTransitions", "flatMap_default", "e", "nextTokenTypes", "uniqBy_default", "AtomTransition", "state", "configs", "intermediate", "ATNConfigSet", "skippedStopStates", "c", "ATN_RULE_STOP", "transitionLength", "transition", "target", "getReachableTarget", "hasConfigInRuleStopState", "tokenMatcher", "from", "to", "mapKey", "numberOfTransitions", "config", "p", "atnStack", "followConfig", "getEpsilonTarget", "EpsilonTransition", "RuleTransition", "stack", "allConfigsInRuleStopStates", "altSets", "getConflictingAltSets", "hasConflictingAltSet", "hasStateAssociatedWithOneAlt", "configToAlts", "getATNConfigKey", "alts", "value", "PredicateSet", "EMPTY_PREDICATES", "LLStarLookaheadStrategy", "init_all_star_lookahead", "__esmMin", "init_api", "init_atn", "init_dfa", "init_min", "init_flatMap", "init_uniqBy", "init_map", "init_flatten", "init_forEach", "init_isEmpty", "init_reduce", "__name", "size", "LLkLookaheadStrategy", "_a", "createATN", "prodOccurrence", "rule", "hasPredicates", "dynamicTokensEnabled", "dfas", "buildATNKey", "decisionIndex", "partialAlts", "getLookaheadPaths", "currAlt", "choiceToAlt", "reduce_default", "result", "idx", "forEach_default", "currTokType", "currExtendingType", "orAlts", "nextToken", "gate", "predicates", "length", "prodType", "g", "singleTokensTypes", "flatten_default", "isEmpty_default", "expectedTokenUniqueKey", "init_lib", "__esmMin", "init_all_star_lookahead", "DocumentUri", "URI", "integer", "uinteger", "Position", "Range", "Location", "LocationLink", "Color", "ColorInformation", "ColorPresentation", "FoldingRangeKind", "FoldingRange", "DiagnosticRelatedInformation", "DiagnosticSeverity", "DiagnosticTag", "CodeDescription", "Diagnostic", "Command", "TextEdit", "ChangeAnnotation", "ChangeAnnotationIdentifier", "AnnotatedTextEdit", "TextDocumentEdit", "CreateFile", "RenameFile", "DeleteFile", "WorkspaceEdit", "TextDocumentIdentifier", "VersionedTextDocumentIdentifier", "OptionalVersionedTextDocumentIdentifier", "TextDocumentItem", "MarkupKind", "MarkupContent", "CompletionItemKind", "InsertTextFormat", "CompletionItemTag", "InsertReplaceEdit", "InsertTextMode", "CompletionItemLabelDetails", "CompletionItem", "CompletionList", "MarkedString", "Hover", "ParameterInformation", "SignatureInformation", "DocumentHighlightKind", "DocumentHighlight", "SymbolKind", "SymbolTag", "SymbolInformation", "WorkspaceSymbol", "DocumentSymbol", "CodeActionKind", "CodeActionTriggerKind", "CodeActionContext", "CodeAction", "CodeLens", "FormattingOptions", "DocumentLink", "SelectionRange", "SemanticTokenTypes", "SemanticTokenModifiers", "SemanticTokens", "InlineValueText", "InlineValueVariableLookup", "InlineValueEvaluatableExpression", "InlineValueContext", "InlayHintKind", "InlayHintLabelPart", "InlayHint", "StringValue", "InlineCompletionItem", "InlineCompletionList", "InlineCompletionTriggerKind", "SelectedCompletionInfo", "InlineCompletionContext", "WorkspaceFolder", "TextDocument", "FullTextDocument", "Is", "init_main", "__esmMin", "is", "value", "__name", "create", "line", "character", "candidate", "one", "two", "three", "four", "uri", "range", "targetUri", "targetRange", "targetSelectionRange", "originSelectionRange", "red", "green", "blue", "alpha", "color", "label", "textEdit", "additionalTextEdits", "startLine", "endLine", "startCharacter", "endCharacter", "kind", "collapsedText", "result", "location", "message", "severity", "code", "source", "relatedInformation", "_a", "title", "command", "args", "replace", "newText", "insert", "position", "del", "needsConfirmation", "description", "annotation", "textDocument", "edits", "options", "oldUri", "newUri", "change", "version", "languageId", "text", "items", "isIncomplete", "fromPlainText", "plainText", "documentation", "parameters", "name", "containerName", "detail", "selectionRange", "children", "diagnostics", "only", "triggerKind", "kindOrCommandOrEdit", "checkKind", "data", "tabSize", "insertSpaces", "target", "parent", "variableName", "caseSensitiveLookup", "expression", "frameId", "stoppedLocation", "createSnippet", "insertText", "filterText", "selectedCompletionInfo", "content", "applyEdits", "document", "sortedEdits", "mergeSort", "a", "b", "diff", "lastModifiedOffset", "i", "e", "startOffset", "endOffset", "compare", "p", "left", "right", "leftIdx", "rightIdx", "start", "end", "event", "lineOffsets", "isLineStart", "ch", "offset", "low", "high", "mid", "lineOffset", "nextLineOffset", "toString", "defined", "undefined", "boolean", "string", "number", "numberRange", "min", "max", "func", "objectLiteral", "typedArray", "check", "CstNodeBuilder", "AbstractCstNode", "LeafCstNodeImpl", "CompositeCstNodeImpl", "CstNodeContainer", "RootCstNodeImpl", "init_cst_node_builder", "__esmMin", "init_main", "init_syntax_tree", "init_cst_utils", "__name", "input", "feature", "compositeNode", "token", "leafNode", "tokenToRange", "node", "parent", "index", "item", "current", "hiddenTokens", "hiddenNode", "tokenStart", "tokenEnd", "i", "child", "childStart", "childEnd", "isCompositeCstNode", "_a", "_b", "value", "offset", "length", "range", "tokenType", "hidden", "firstNode", "lastNode", "firstRange", "lastRange", "Position", "_CstNodeContainer", "items", "start", "count", "isDataTypeNode", "node", "DatatypeSymbol", "ruleSuffix", "withRuleSuffix", "AbstractLangiumParser", "LangiumParser", "AbstractParserErrorMessageProvider", "LangiumParserErrorMessageProvider", "LangiumCompletionParser", "defaultConfig", "ChevrotainWrapper", "init_langium_parser", "__esmMin", "init_api", "init_lib", "init_ast", "init_grammar_utils", "init_ast_utils", "init_cst_node_builder", "__name", "name", "services", "tokens", "idx", "choices", "callback", "CstNodeBuilder", "rule", "impl", "type", "isDataTypeRule", "getTypeName", "ruleMethod", "input", "lexerResult", "result", "$type", "implementation", "args", "tokenType", "feature", "token", "leafNode", "assignment", "isCrossRef", "current", "convertedValue", "isKeyword", "text", "cstNode", "subruleResult", "resultKind", "object", "newItem", "action", "last", "pop", "obj", "linkContentToContainer", "assignMandatoryProperties", "getContainerOfType", "isAssignment", "isCrossReference", "operator", "value", "item", "target", "source", "existingValue", "newValue", "options", "defaultParserErrorProvider", "expected", "actual", "firstRedundant", "size", "element", "index", "EmbeddedActionsParser", "config", "useDefaultLookahead", "LLkLookaheadStrategy", "LLStarLookaheadStrategy", "createParser", "grammar", "parser", "tokens", "buildRules", "parserContext", "reachable", "getAllReachableRules", "parserRules", "stream", "isParserRule", "rule", "ctx", "buildElement", "element", "ignoreGuard", "method", "isKeyword", "buildKeyword", "isAction", "buildAction", "isAssignment", "isCrossReference", "buildCrossReference", "isRuleCall", "buildRuleCall", "isAlternatives", "buildAlternatives", "isUnorderedGroup", "buildUnorderedGroup", "isGroup", "buildGroup", "isEndOfFile", "idx", "__name", "EOF", "ErrorWithLocation", "wrap", "getGuardCondition", "action", "actionType", "getTypeName", "ruleCall", "predicate", "buildRuleCallPredicate", "args", "getRule", "isTerminalRule", "getToken", "assertUnreachable", "namedArgs", "predicates", "e", "buildPredicate", "ruleArgs", "i", "ruleTarget", "condition", "isDisjunction", "left", "right", "isConjunction", "isNegation", "value", "isParameterReference", "name", "isBooleanLiteral", "alternatives", "methods", "predicatedMethod", "guard", "alt", "gate", "group", "orIdx", "idFunc", "groupIdx", "lParser", "stackId", "key", "groupState", "trackedAlternatives", "wrapped", "crossRef", "terminal", "terminalRule", "keyword", "assignment", "findNameAssignment", "assignTerminal", "token", "cardinality", "EMPTY_ALT", "getRuleName", "item", "parent", "ruleName", "init_parser_builder_base", "__esmMin", "init_api", "init_ast", "init_errors", "init_stream", "init_grammar_utils", "createCompletionParser", "services", "grammar", "lexer", "parser", "LangiumCompletionParser", "createParser", "init_completion_parser_builder", "__esmMin", "init_langium_parser", "init_parser_builder_base", "__name", "createLangiumParser", "services", "parser", "prepareLangiumParser", "grammar", "lexer", "LangiumParser", "createParser", "init_langium_parser_builder", "__esmMin", "init_langium_parser", "init_parser_builder_base", "__name", "DefaultTokenBuilder", "init_token_builder", "__esmMin", "init_api", "init_ast", "init_ast_utils", "init_grammar_utils", "init_regexp_utils", "init_stream", "__name", "grammar", "options", "reachableRules", "stream", "getAllReachableRules", "terminalTokens", "tokens", "terminalToken", "pattern", "isWhitespace", "rules", "isTerminalRule", "e", "terminal", "regex", "terminalRegex", "tokenType", "Lexer", "stickyRegex", "text", "offset", "isParserRule", "rule", "streamAllContents", "isKeyword", "a", "b", "keyword", "caseInsensitive", "getCaseInsensitivePattern", "longerAlts", "token", "partialMatches", "DefaultValueConverter", "ValueConverter", "init_value_converter", "__esmMin", "init_ast", "init_grammar_utils", "__name", "input", "cstNode", "feature", "isCrossReference", "getCrossReferenceTerminal", "isRuleCall", "rule", "_a", "getRuleType", "convertString", "result", "i", "c", "c1", "convertEscapeCharacter", "char", "convertID", "convertInt", "convertBigint", "convertDate", "convertNumber", "convertBoolean", "require_ral", "__commonJSMin", "exports", "_ral", "RAL", "__name", "install", "ral", "require_is", "__commonJSMin", "exports", "boolean", "value", "__name", "string", "number", "error", "func", "array", "stringArray", "elem", "require_events", "__commonJSMin", "exports", "ral_1", "Event", "_disposable", "CallbackList", "__name", "callback", "context", "bucket", "foundCallbackWithDifferentContext", "len", "args", "ret", "callbacks", "contexts", "i", "e", "Emitter", "_Emitter", "_options", "listener", "thisArgs", "disposables", "result", "event", "require_cancellation", "__commonJSMin", "exports", "ral_1", "Is", "events_1", "CancellationToken", "is", "value", "candidate", "__name", "shortcutEvent", "callback", "context", "handle", "MutableToken", "CancellationTokenSource", "cancellation_exports", "init_cancellation", "__esmMin", "__reExport", "delayNextTick", "resolve", "startCancelableOperation", "lastTick", "setInterruptionPeriod", "period", "globalInterruptionPeriod", "isOperationCancelled", "err", "OperationCancelled", "interruptAndCheck", "token", "current", "Deferred", "init_promise_utils", "__esmMin", "init_cancellation", "__name", "reject", "arg", "mergeSort", "data", "compare", "p", "left", "right", "leftIdx", "rightIdx", "i", "computeLineOffsets", "text", "isAtLineStart", "textOffset", "result", "ch", "isEOL", "char", "getWellformedRange", "range", "start", "end", "getWellformedEdit", "textEdit", "FullTextDocument", "TextDocument", "init_main", "__esmMin", "_FullTextDocument", "__name", "uri", "languageId", "version", "content", "changes", "change", "startOffset", "endOffset", "startLine", "endLine", "lineOffsets", "addedLineOffsets", "len", "diff", "offset", "low", "high", "mid", "line", "position", "lineOffset", "nextLineOffset", "event", "candidate", "create", "update", "document", "applyEdits", "edits", "sortedEdits", "a", "b", "lastModifiedOffset", "spans", "e", "URI", "Utils", "assertPath", "path", "TypeError", "JSON", "stringify", "normalizeStringPosix", "allowAboveRoot", "code", "res", "lastSegmentLength", "lastSlash", "dots", "i", "length", "charCodeAt", "lastSlashIndex", "lastIndexOf", "slice", "posix", "resolve", "__name", "cwd", "resolvedPath", "resolvedAbsolute", "arguments", "process", "normalize", "isAbsolute", "trailingSeparator", "join", "joined", "arg", "relative", "from", "to", "fromStart", "fromEnd", "fromLen", "toStart", "toLen", "lastCommonSep", "fromCode", "out", "_makeLong", "dirname", "hasRoot", "end", "matchedSlash", "basename", "ext", "start", "extIdx", "firstNonSlashEnd", "extname", "startDot", "startPart", "preDotState", "format", "pathObject", "sep", "dir", "root", "base", "name", "parse", "ret", "delimiter", "win32", "module", "exports", "__webpack_module_cache__", "__webpack_require__", "moduleId", "cachedModule", "__webpack_modules__", "d", "definition", "key", "o", "Object", "defineProperty", "enumerable", "get", "obj", "prop", "prototype", "hasOwnProperty", "call", "r", "Symbol", "toStringTag", "value", "isWindows", "f", "P", "platform", "navigator", "userAgent", "indexOf", "_schemePattern", "_singleSlashStart", "_doubleSlashStart", "_validateUri", "_strict", "scheme", "Error", "authority", "query", "fragment", "test", "_empty", "_slash", "_regexp", "thing", "fsPath", "with", "toString", "schemeOrData", "this", "uriToFsPath", "change", "Uri", "match", "exec", "percentDecode", "replace", "idx", "substring", "components", "result", "skipEncoding", "_asFormatted", "toJSON", "data", "_formatted", "external", "_fsPath", "_sep", "_pathSepMarker", "$mid", "encodeTable", "encodeURIComponentFast", "uriComponent", "isPath", "isAuthority", "nativeEncodePos", "pos", "encodeURIComponent", "charAt", "substr", "escaped", "encodeURIComponentMinimal", "uri", "keepDriveLetterCasing", "toLowerCase", "encoder", "userinfo", "String", "fromCharCode", "decodeURIComponentGraceful", "str", "decodeURIComponent", "_rEncodedAsHex", "A", "posixPath", "slash", "t", "joinPath", "paths", "resolvePath", "slashAdded", "LIB", "UriUtils", "init_uri_utils", "__esmMin", "init_esm", "Utils", "equals", "a", "b", "__name", "relative", "from", "to", "fromPath", "toPath", "fromParts", "e", "toParts", "i", "backPart", "toPart", "DocumentState", "DefaultLangiumDocumentFactory", "DefaultLangiumDocuments", "init_documents", "__esmMin", "init_main", "init_cancellation", "init_stream", "init_uri_utils", "__name", "services", "uri", "cancellationToken", "content", "textDocument", "URI", "text", "model", "parseResult", "cancelToken", "document", "textDocumentGetter", "oldText", "_a", "_b", "serviceRegistry", "textDoc", "TextDocument", "stream", "uriString", "langiumDoc", "DefaultLinker", "init_linker", "__esmMin", "init_cancellation", "init_syntax_tree", "init_ast_utils", "init_promise_utils", "init_documents", "__name", "services", "document", "cancelToken", "node", "streamAst", "interruptAndCheck", "streamReferences", "ref", "refInfo", "description", "isLinkingError", "linkedNode", "err", "property", "refNode", "refText", "linker", "reference", "isAstNode", "isAstNodeDescription", "refData", "getDocument", "DocumentState", "_a", "nodeDescription", "doc", "targetDescription", "referenceType", "isNamed", "node", "DefaultNameProvider", "init_name_provider", "__esmMin", "init_grammar_utils", "__name", "findNodeForProperty", "DefaultReferences", "init_references", "__esmMin", "init_grammar_utils", "init_syntax_tree", "init_ast_utils", "init_cst_utils", "init_stream", "init_uri_utils", "__name", "services", "sourceCstNode", "assignment", "findAssignment", "nodeElem", "reference", "isReference", "ref", "nameNode", "isChildNode", "astNode", "targetNode", "options", "refs", "indexReferences", "UriUtils", "stream", "doc", "getDocument", "path", "toDocumentSegment", "MultiMap", "BiMap", "init_collections", "__esmMin", "init_stream", "__name", "elements", "key", "value", "Reduction", "stream", "a", "values", "index", "_a", "callbackfn", "array", "DefaultScopeComputation", "init_scope_computation", "__esmMin", "init_cancellation", "init_ast_utils", "init_collections", "init_promise_utils", "__name", "services", "document", "cancelToken", "parentNode", "children", "streamContents", "exports", "node", "interruptAndCheck", "name", "rootNode", "scopes", "MultiMap", "streamAllContents", "container", "StreamScope", "MapScope", "EMPTY_SCOPE", "init_scope", "__esmMin", "init_stream", "__name", "elements", "outerScope", "options", "_a", "name", "local", "e", "element", "localName", "elementStream", "stream", "EMPTY_STREAM", "DisposableCache", "SimpleCache", "ContextCache", "DocumentCache", "WorkspaceCache", "init_caching", "__esmMin", "__name", "disposable", "key", "value", "provider", "converter", "contextKey", "contextCache", "mapKey", "documentCache", "sharedServices", "uri", "changed", "deleted", "allUris", "DefaultScopeProvider", "init_scope_provider", "__esmMin", "init_scope", "init_ast_utils", "init_stream", "init_caching", "__name", "services", "WorkspaceCache", "context", "scopes", "referenceType", "precomputed", "getDocument", "currentNode", "allDescriptions", "stream", "desc", "result", "i", "elements", "outerScope", "options", "StreamScope", "s", "e", "name", "_context", "MapScope", "isAstNodeWithComment", "node", "isIntermediateReference", "obj", "DefaultJsonSerializer", "init_json_serializer", "__esmMin", "init_esm", "init_syntax_tree", "init_ast_utils", "init_grammar_utils", "__name", "services", "options", "specificReplacer", "defaultReplacer", "key", "value", "replacer", "getDocument", "content", "root", "refText", "sourceText", "textRegions", "comments", "uriConverter", "isReference", "refValue", "$refText", "targetDocument", "targetUri", "targetPath", "_b", "_a", "isAstNode", "astNode", "_c", "_d", "comment", "createDocumentSegment", "cstNode", "textRegion", "assignments", "propertyAssignments", "findNodesForProperty", "container", "containerProperty", "containerIndex", "propertyName", "item", "index", "element", "mutable", "property", "reference", "error", "ref", "uri", "fragmentIndex", "documentUri", "URI", "document", "err", "DefaultServiceRegistry", "init_service_registry", "__esmMin", "init_uri_utils", "__name", "language", "ext", "uri", "UriUtils", "services", "diagnosticData", "code", "ValidationCategory", "ValidationRegistry", "init_validation_registry", "__esmMin", "init_collections", "init_promise_utils", "init_stream", "__name", "services", "MultiMap", "checksRecord", "thisObj", "category", "type", "ch", "callbacks", "check", "entry", "node", "accept", "cancelToken", "err", "isOperationCancelled", "message", "subtype", "categories", "checks", "stream", "getDiagnosticRange", "info", "cstNode", "findNodeForProperty", "findNodeForKeyword", "toDiagnosticSeverity", "severity", "DefaultDocumentValidator", "DocumentValidator", "init_document_validator", "__esmMin", "init_cancellation", "init_grammar_utils", "init_ast_utils", "init_cst_utils", "init_promise_utils", "init_validation_registry", "__name", "services", "document", "options", "cancelToken", "parseResult", "diagnostics", "interruptAndCheck", "d", "_a", "err", "isOperationCancelled", "_options", "lexerError", "diagnostic", "diagnosticData", "parserError", "range", "token", "position", "tokenToRange", "reference", "linkingError", "rootNode", "validationItems", "acceptor", "message", "streamAst", "node", "checks", "check", "DefaultAstNodeDescriptionProvider", "DefaultReferenceDescriptionProvider", "init_ast_descriptions", "__esmMin", "init_cancellation", "init_syntax_tree", "init_ast_utils", "init_cst_utils", "init_promise_utils", "init_uri_utils", "__name", "services", "node", "name", "document", "getDocument", "path", "nameNodeSegment", "nameSegmentGetter", "_a", "toDocumentSegment", "cancelToken", "descr", "rootNode", "astNode", "streamAst", "interruptAndCheck", "streamReferences", "refInfo", "isLinkingError", "description", "targetNodeDescr", "refCstNode", "docUri", "UriUtils", "DefaultAstNodeLocator", "init_ast_node_locator", "__esmMin", "__name", "node", "containerPath", "newSegment", "$containerProperty", "$containerIndex", "path", "previousValue", "currentValue", "propertyIndex", "property", "arrayIndex", "array", "DefaultConfigurationProvider", "init_configuration", "__esmMin", "init_promise_utils", "__name", "services", "Deferred", "params", "_b", "_a", "languages", "lang", "configToUpdate", "configs", "conf", "idx", "change", "section", "configuration", "language", "sectionName", "languageId", "Disposable", "init_disposable", "__esmMin", "create", "callback", "__name", "DefaultDocumentBuilder", "init_document_builder", "__esmMin", "init_cancellation", "init_disposable", "init_collections", "init_promise_utils", "init_stream", "init_validation_registry", "init_documents", "__name", "services", "MultiMap", "DocumentState", "documents", "options", "cancelToken", "document", "key", "buildState", "previousCategories", "_a", "categories", "_b", "ValidationCategory", "c", "e", "changed", "deleted", "deletedUri", "changedUri", "newDocument", "allChangedUris", "stream", "uri", "doc", "interruptAndCheck", "rebuildDocuments", "listener", "changedUris", "ref", "callback", "Disposable", "index", "scopeComputation", "toBeValidated", "state", "targetState", "filtered", "uriOrToken", "OperationCancelled", "resolve", "reject", "buildDisposable", "cancelDisposable", "listeners", "validator", "validationSetting", "diagnostics", "newCategories", "DefaultIndexManager", "init_index_manager", "__esmMin", "init_ast_utils", "init_caching", "init_cancellation", "init_stream", "init_uri_utils", "__name", "services", "ContextCache", "targetNode", "astNodePath", "targetDocUri", "getDocument", "result", "docRefs", "refDescr", "UriUtils", "stream", "nodeType", "uris", "documentUris", "uri", "_a", "e", "uriString", "document", "cancelToken", "exports", "indexData", "changedUris", "references", "ref", "DefaultWorkspaceManager", "init_workspace_manager", "__esmMin", "init_cancellation", "init_promise_utils", "init_uri_utils", "__name", "services", "Deferred", "params", "_a", "_params", "token", "folders", "cancelToken", "documents", "interruptAndCheck", "fileExtensions", "e", "collector", "document", "wf", "entry", "_folders", "_collector", "workspaceFolder", "URI", "folderPath", "content", "_workspaceFolder", "name", "UriUtils", "extname", "isTokenTypeArray", "tokenVocabulary", "isIMultiModeLexerDefinition", "isTokenTypeDictionary", "DefaultLexer", "init_lexer", "__esmMin", "init_api", "__name", "services", "tokens", "lexerTokens", "Lexer", "text", "chevrotainResult", "_a", "buildTokens", "res", "token", "parseJSDoc", "node", "start", "options", "opts", "position", "Position", "lines", "getLines", "normalizedOptions", "normalizeOptions", "tokens", "tokenize", "parseJSDocComment", "isJSDoc", "first", "last", "firstRegex", "lastRegex", "content", "NEWLINE_REGEXP", "context", "currentLine", "currentCharacter", "i", "line", "index", "match", "_a", "_b", "_c", "lastCharacter", "skipWhitespace", "Range", "tagRegex", "tagMatch", "fullMatch", "value", "end", "rest", "inlineTagMatches", "inlineTagRegex", "buildInlineTokens", "tags", "lineIndex", "characterIndex", "lastIndex", "matchIndex", "startContent", "offset", "tagName", "endContent", "nonWhitespaceRegex", "whitespaceEndRegex", "startPosition", "JSDocCommentImpl", "elements", "element", "parseJSDocElement", "_d", "next", "parseJSDocTag", "parseJSDocText", "appendEmptyLine", "token", "JSDocLineImpl", "firstToken", "lastToken", "parseJSDocInline", "JSDocTextImpl", "parseJSDocLine", "inline", "tagToken", "name", "nextToken", "docLine", "JSDocTagImpl", "textDoc", "range", "normalizeOption", "option", "escaped", "escapeRegExp", "renderInlineTag", "tag", "display", "displayStart", "renderLinkDefault", "URI", "fillNewlines", "text", "init_jsdoc", "__esmMin", "init_main", "init_regexp_utils", "init_uri_utils", "__name", "e", "rendered", "marker", "JSDocDocumentationProvider", "init_documentation_provider", "__esmMin", "init_ast_utils", "init_jsdoc", "__name", "services", "node", "comment", "isJSDoc", "parseJSDoc", "link", "display", "tag", "name", "description", "_a", "line", "character", "uri", "_node", "_tag", "precomputed", "getDocument", "currentNode", "e", "DefaultCommentProvider", "init_comment_provider", "__esmMin", "init_json_serializer", "init_cst_utils", "__name", "services", "node", "isAstNodeWithComment", "_a", "findCommentNode", "event_exports", "init_event", "__esmMin", "__reExport", "DefaultAsyncParser", "AbstractThreadedAsyncParser", "ParserWorker", "init_async_parser", "__esmMin", "init_promise_utils", "init_event", "__name", "services", "text", "worker", "deferred", "cancelToken", "Deferred", "timeout", "cancellation", "result", "hydrated", "err", "index", "OperationCancelled", "sendMessage", "onMessage", "onError", "terminate", "parseResult", "error", "DefaultWorkspaceLock", "init_workspace_lock", "__esmMin", "init_cancellation", "init_promise_utils", "__name", "action", "tokenSource", "queue", "cancellationToken", "deferred", "Deferred", "entry", "entries", "result", "err", "isOperationCancelled", "DefaultHydrator", "init_hydrator", "__esmMin", "init_cst_node_builder", "init_ast", "init_syntax_tree", "init_ast_utils", "init_collections", "init_cst_utils", "__name", "services", "BiMap", "result", "e", "node", "astNodes", "cstNodes", "astNode", "streamAst", "cstNode", "streamCst", "context", "obj", "name", "value", "arr", "item", "isAstNode", "isReference", "reference", "isRootCstNode", "isCompositeCstNode", "child", "isLeafCstNode", "root", "cst", "RootCstNodeImpl", "CompositeCstNodeImpl", "parent", "num", "cstNodeObj", "hydrated", "tokenType", "offset", "length", "startLine", "startColumn", "endLine", "endColumn", "hidden", "LeafCstNodeImpl", "id", "element", "isAbstractElement", "createDefaultCoreModule", "context", "__name", "services", "DefaultCommentProvider", "JSDocDocumentationProvider", "DefaultAsyncParser", "createGrammarConfig", "createLangiumParser", "createCompletionParser", "DefaultValueConverter", "DefaultTokenBuilder", "DefaultLexer", "LangiumParserErrorMessageProvider", "DefaultAstNodeLocator", "DefaultAstNodeDescriptionProvider", "DefaultReferenceDescriptionProvider", "DefaultLinker", "DefaultNameProvider", "DefaultScopeProvider", "DefaultScopeComputation", "DefaultReferences", "DefaultHydrator", "DefaultJsonSerializer", "DefaultDocumentValidator", "ValidationRegistry", "createDefaultSharedCoreModule", "DefaultServiceRegistry", "DefaultLangiumDocuments", "DefaultLangiumDocumentFactory", "DefaultDocumentBuilder", "DefaultIndexManager", "DefaultWorkspaceManager", "DefaultWorkspaceLock", "DefaultConfigurationProvider", "init_default_module", "__esmMin", "init_grammar_config", "init_completion_parser_builder", "init_langium_parser_builder", "init_token_builder", "init_value_converter", "init_linker", "init_name_provider", "init_references", "init_scope_computation", "init_scope_provider", "init_json_serializer", "init_service_registry", "init_document_validator", "init_validation_registry", "init_ast_descriptions", "init_ast_node_locator", "init_configuration", "init_document_builder", "init_documents", "init_index_manager", "init_workspace_manager", "init_lexer", "init_documentation_provider", "init_comment_provider", "init_langium_parser", "init_async_parser", "init_workspace_lock", "init_hydrator", "inject", "module1", "module2", "module3", "module4", "module5", "module6", "module7", "module8", "module9", "module", "_merge", "_inject", "eagerLoad", "item", "isProxy", "value", "injector", "proxy", "__name", "obj", "prop", "_resolve", "_", "__requested__", "error", "target", "source", "key", "value2", "value1", "Module", "init_dependency_injection", "__esmMin", "m1", "m2", "init_services", "__esmMin", "init_documentation", "__esmMin", "init_comment_provider", "init_documentation_provider", "init_jsdoc", "init_language_meta_data", "__esmMin", "init_languages", "__esmMin", "init_grammar_config", "init_language_meta_data", "init_parser_config", "__esmMin", "init_parser", "__esmMin", "init_async_parser", "init_completion_parser_builder", "init_cst_node_builder", "init_langium_parser_builder", "init_langium_parser", "init_lexer", "init_parser_config", "init_token_builder", "init_value_converter", "init_references", "__esmMin", "init_linker", "init_name_provider", "init_scope", "init_scope_computation", "init_scope_provider", "init_serializer", "__esmMin", "init_hydrator", "init_json_serializer", "EmptyFileSystemProvider", "EmptyFileSystem", "init_file_system_provider", "__esmMin", "__name", "createMinimalGrammarServices", "shared", "inject", "createDefaultSharedCoreModule", "EmptyFileSystem", "minimalSharedGrammarModule", "grammar", "createDefaultCoreModule", "minimalGrammarModule", "loadGrammarFromJson", "json", "services", "astNode", "URI", "_a", "init_grammar_loader", "__esmMin", "init_default_module", "init_dependency_injection", "init_ast", "init_file_system_provider", "init_uri_utils", "__name", "LangiumGrammarAstReflection", "utils_exports", "__export", "ast_utils_exports", "BiMap", "cancellation_exports", "ContextCache", "cst_utils_exports", "DONE_RESULT", "Deferred", "Disposable", "DisposableCache", "DocumentCache", "EMPTY_STREAM", "ErrorWithLocation", "grammar_utils_exports", "MultiMap", "OperationCancelled", "Reduction", "regexp_utils_exports", "SimpleCache", "StreamImpl", "TreeStreamImpl", "URI", "UriUtils", "WorkspaceCache", "assertUnreachable", "delayNextTick", "interruptAndCheck", "isOperationCancelled", "loadGrammarFromJson", "setInterruptionPeriod", "startCancelableOperation", "stream", "init_utils", "__esmMin", "init_caching", "init_event", "__reExport", "event_exports", "init_collections", "init_disposable", "init_errors", "init_grammar_loader", "init_promise_utils", "init_stream", "init_uri_utils", "init_ast_utils", "init_cancellation", "init_cst_utils", "init_grammar_utils", "init_regexp_utils", "init_validation", "__esmMin", "init_document_validator", "init_validation_registry", "init_workspace", "__esmMin", "init_ast_descriptions", "init_ast_node_locator", "init_configuration", "init_document_builder", "init_documents", "init_file_system_provider", "init_index_manager", "init_workspace_lock", "init_workspace_manager", "lib_exports", "__export", "AbstractAstReflection", "AbstractCstNode", "AbstractLangiumParser", "AbstractParserErrorMessageProvider", "AbstractThreadedAsyncParser", "ast_utils_exports", "BiMap", "cancellation_exports", "CompositeCstNodeImpl", "ContextCache", "CstNodeBuilder", "cst_utils_exports", "DONE_RESULT", "DatatypeSymbol", "DefaultAstNodeDescriptionProvider", "DefaultAstNodeLocator", "DefaultAsyncParser", "DefaultCommentProvider", "DefaultConfigurationProvider", "DefaultDocumentBuilder", "DefaultDocumentValidator", "DefaultHydrator", "DefaultIndexManager", "DefaultJsonSerializer", "DefaultLangiumDocumentFactory", "DefaultLangiumDocuments", "DefaultLexer", "DefaultLinker", "DefaultNameProvider", "DefaultReferenceDescriptionProvider", "DefaultReferences", "DefaultScopeComputation", "DefaultScopeProvider", "DefaultServiceRegistry", "DefaultTokenBuilder", "DefaultValueConverter", "DefaultWorkspaceLock", "DefaultWorkspaceManager", "Deferred", "Disposable", "DisposableCache", "DocumentCache", "DocumentState", "DocumentValidator", "EMPTY_SCOPE", "EMPTY_STREAM", "EmptyFileSystem", "EmptyFileSystemProvider", "ErrorWithLocation", "ast_exports", "grammar_utils_exports", "JSDocDocumentationProvider", "LangiumCompletionParser", "LangiumParser", "LangiumParserErrorMessageProvider", "LeafCstNodeImpl", "MapScope", "Module", "MultiMap", "OperationCancelled", "ParserWorker", "Reduction", "regexp_utils_exports", "RootCstNodeImpl", "SimpleCache", "StreamImpl", "StreamScope", "TextDocument", "TreeStreamImpl", "URI", "UriUtils", "ValidationCategory", "ValidationRegistry", "ValueConverter", "WorkspaceCache", "assertUnreachable", "createCompletionParser", "createDefaultCoreModule", "createDefaultSharedCoreModule", "createGrammarConfig", "createLangiumParser", "delayNextTick", "diagnosticData", "eagerLoad", "getDiagnosticRange", "inject", "interruptAndCheck", "isAstNode", "isAstNodeDescription", "isAstNodeWithComment", "isCompositeCstNode", "isIMultiModeLexerDefinition", "isJSDoc", "isLeafCstNode", "isLinkingError", "isNamed", "isOperationCancelled", "isReference", "isRootCstNode", "isTokenTypeArray", "isTokenTypeDictionary", "loadGrammarFromJson", "parseJSDoc", "prepareLangiumParser", "setInterruptionPeriod", "startCancelableOperation", "stream", "toDiagnosticSeverity", "init_lib", "__esmMin", "init_default_module", "init_dependency_injection", "init_service_registry", "init_services", "init_syntax_tree", "init_documentation", "init_languages", "init_parser", "init_references", "init_serializer", "init_utils", "__reExport", "utils_exports", "init_validation", "init_workspace", "init_ast", "isBranch", "item", "reflection", "Branch", "isCommit", "Commit", "isCommon", "Common", "isGitGraph", "GitGraph", "isInfo", "Info", "isMerge", "Merge", "isPacket", "Packet", "isPacketBlock", "PacketBlock", "isPie", "Pie", "isPieSection", "PieSection", "__defProp", "__name", "Statement", "Checkout", "CherryPicking", "Direction", "MermaidAstReflection", "loadedInfoGrammar", "InfoGrammar", "loadedPacketGrammar", "PacketGrammar", "loadedPieGrammar", "PieGrammar", "loadedGitGraphGrammar", "GitGraphGrammar", "InfoLanguageMetaData", "PacketLanguageMetaData", "PieLanguageMetaData", "GitGraphLanguageMetaData", "MermaidGeneratedSharedModule", "InfoGeneratedModule", "PacketGeneratedModule", "PieGeneratedModule", "GitGraphGeneratedModule", "accessibilityDescrRegex", "accessibilityTitleRegex", "titleRegex", "rulesRegexes", "AbstractMermaidValueConverter", "CommonValueConverter", "AbstractMermaidTokenBuilder", "CommonTokenBuilder", "init_chunk_U3TRWOCV", "__esmMin", "init_lib", "target", "value", "AbstractAstReflection", "subtype", "supertype", "refInfo", "referenceId", "type", "loadGrammarFromJson", "DefaultValueConverter", "rule", "input", "cstNode", "_cstNode", "regex", "match", "_rule", "_input", "DefaultTokenBuilder", "keywords", "rules", "terminalTokens", "options", "tokenTypes", "tokenType", "createGitGraphServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "GitGraph", "createDefaultCoreModule", "GitGraphGeneratedModule", "GitGraphModule", "GitGraphTokenBuilder", "init_chunk_QE2ZKFLT", "__esmMin", "init_chunk_U3TRWOCV", "init_lib", "AbstractMermaidTokenBuilder", "__name", "CommonValueConverter", "createInfoServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Info", "createDefaultCoreModule", "InfoGeneratedModule", "InfoModule", "InfoTokenBuilder", "init_chunk_O2VHLUZY", "__esmMin", "init_chunk_U3TRWOCV", "init_lib", "AbstractMermaidTokenBuilder", "__name", "CommonValueConverter", "createPacketServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Packet", "createDefaultCoreModule", "PacketGeneratedModule", "PacketModule", "PacketTokenBuilder", "init_chunk_HTBTGXD4", "__esmMin", "init_chunk_U3TRWOCV", "init_lib", "AbstractMermaidTokenBuilder", "__name", "CommonValueConverter", "createPieServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Pie", "createDefaultCoreModule", "PieGeneratedModule", "PieModule", "PieTokenBuilder", "PieValueConverter", "init_chunk_NM56GJBF", "__esmMin", "init_chunk_U3TRWOCV", "init_lib", "AbstractMermaidTokenBuilder", "__name", "AbstractMermaidValueConverter", "rule", "input", "_cstNode", "info_PWGDJKR5_exports", "__export", "InfoModule", "createInfoServices", "init_info_PWGDJKR5", "__esmMin", "init_chunk_O2VHLUZY", "init_chunk_U3TRWOCV", "packet_7PPW3X5M_exports", "__export", "PacketModule", "createPacketServices", "init_packet_7PPW3X5M", "__esmMin", "init_chunk_HTBTGXD4", "init_chunk_U3TRWOCV", "pie_RF5LNP4B_exports", "__export", "PieModule", "createPieServices", "init_pie_RF5LNP4B", "__esmMin", "init_chunk_NM56GJBF", "init_chunk_U3TRWOCV", "gitGraph_F2EDSAW4_exports", "__export", "GitGraphModule", "createGitGraphServices", "init_gitGraph_F2EDSAW4", "__esmMin", "init_chunk_QE2ZKFLT", "init_chunk_U3TRWOCV", "parse", "diagramType", "text", "initializer", "initializers", "parsers", "result", "MermaidParseError", "init_mermaid_parser_core", "__esmMin", "init_chunk_QE2ZKFLT", "init_chunk_O2VHLUZY", "init_chunk_HTBTGXD4", "init_chunk_NM56GJBF", "init_chunk_U3TRWOCV", "__name", "createInfoServices2", "parser", "createPacketServices2", "createPieServices2", "createGitGraphServices2", "lexerErrors", "err", "parserErrors", "populateCommonDb", "ast", "db", "init_populateCommonDb", "__esmMin", "__name", "commitType", "init_gitGraphTypes", "__esmMin", "ImperativeState", "init_imperativeState", "__esmMin", "init", "__name", "getID", "random", "uniqBy", "list", "fn", "recordMap", "out", "item", "key", "upsert", "arr", "newVal", "index", "prettyPrintCommitHistory", "commitArr", "commit", "line", "c", "label", "branch", "state", "log", "newCommit", "DEFAULT_GITGRAPH_CONFIG", "getConfig", "setDirection", "setOptions", "getOptions", "merge", "cherryPick", "checkout", "prettyPrint", "clear", "getBranchesAsObjArray", "getBranches", "getCommits", "getCommitsArray", "getCurrentBranch", "getDirection", "getHead", "db", "init_gitGraphAst", "__esmMin", "init_logger", "init_utils", "init_config", "init_common", "init_commonDb", "init_gitGraphTypes", "init_imperativeState", "init_defaultConfig", "defaultConfig_default", "__name", "cleanAndMerge", "ImperativeState", "config", "mainBranchName", "mainBranchOrder", "dir", "rawOptString", "commitDB", "msg", "id", "type", "tags", "common_default", "tag", "commitType", "branchDB", "name", "order", "mergeDB", "otherBranch", "customId", "overrideType", "customTags", "currentBranchCheck", "otherBranchCheck", "currentCommit", "otherCommit", "error", "verifiedBranch", "cherryPickDB", "sourceId", "targetId", "parentCommitId", "sourceCommit", "sourceCommitBranch", "currentCommitId", "node", "branchConfig", "i", "a", "b", "o", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "populate", "parseStatement", "parseCommit", "parseBranch", "parseMerge", "parseCheckout", "parseCherryPicking", "parser", "init_gitGraphParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_gitGraphAst", "init_gitGraphTypes", "__name", "ast", "db", "populateCommonDb", "statement", "stmt", "log", "commit", "commitType", "branch", "merge", "checkout", "cherryPicking", "input", "parse", "DEFAULT_CONFIG", "DEFAULT_GITGRAPH_CONFIG", "LAYOUT_OFFSET", "COMMIT_STEP", "PX", "PY", "THEME_COLOR_LIMIT", "branchPos", "commitPos", "defaultPos", "allCommitsDict", "lanes", "maxPos", "dir", "clear", "drawText", "findClosestParent", "findClosestParentBT", "setParallelBTPos", "findClosestParentPos", "calculateCommitPosition", "setCommitPosition", "setRootPosition", "drawCommitBullet", "drawCommitLabel", "drawCommitTags", "getCommitClassType", "calculatePosition", "getCommitPosition", "drawCommits", "shouldRerouteArrow", "findLane", "drawArrow", "drawArrows", "drawBranches", "setBranchPosition", "draw", "gitGraphRenderer_default", "init_gitGraphRenderer", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_utils", "init_gitGraphTypes", "getConfig", "__name", "txt", "svgLabel", "row", "tspan", "parents", "closestParent", "comparisonFunc", "targetPosition", "a", "b", "parent", "parentPosition", "maxPosition", "sortedKeys", "commits", "curPos", "roots", "key", "commit", "x", "y", "p", "closestParentPos", "branch", "gBullets", "commitPosition", "typeClass", "branchIndex", "commitSymbolType", "commitType", "circle", "circle2", "gLabels", "pos", "wrapper", "labelBkg", "text", "bbox", "r_x", "r_y", "yOffset", "maxTagBboxWidth", "maxTagBboxHeight", "tagElements", "tagValue", "rect", "hole", "tag", "tagBbox", "h2", "ly", "yOrigin", "defaultCommitPosition", "isParallelCommits", "posWithOffset", "svg", "modifyGraph", "keys", "sortKeys", "seqA", "seqB", "commitA", "commitB", "p1", "p2", "allCommits", "branchToGetCurve", "isOnBranchToGetCurve", "isBetweenCommits", "commitX", "y1", "y2", "depth", "candidate", "lane", "diff", "arrowNeedsRerouting", "arc", "arc2", "radius", "offset", "colorClassNum", "lineDef", "lineY", "lineX", "gArrows", "branches", "g", "index", "adjustIndexForTheme", "line", "name", "labelElement", "bkg", "label", "rotateCommitLabel", "id", "ver", "diagObj", "log", "db", "diagram", "select_default", "branchLabel", "utils_default", "setupGraphViewbox", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "i", "gitGraphDiagram_exports", "__export", "diagram", "init_gitGraphDiagram", "__esmMin", "init_gitGraphParser", "init_gitGraphAst", "init_gitGraphRenderer", "init_styles", "parser", "db", "gitGraphRenderer_default", "styles_default", "parser", "gantt_default", "init_gantt", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "require_isoWeek", "__commonJSMin", "exports", "module", "e", "t", "i", "s", "a", "__name", "d", "n", "o", "r", "u", "require_customParseFormat", "__commonJSMin", "exports", "module", "e", "t", "n", "r", "o", "s", "__name", "a", "f", "u", "i", "c", "h", "l", "d", "m", "M", "Y", "p", "v", "D", "g", "require_advancedFormat", "__commonJSMin", "exports", "module", "e", "t", "r", "s", "a", "getTaskTags", "data", "task", "tags", "matchFound", "t", "pattern", "regex", "import_sanitize_url", "import_dayjs", "import_isoWeek", "import_customParseFormat", "import_advancedFormat", "WEEKEND_START_DAY", "dateFormat", "axisFormat", "tickInterval", "todayMarker", "includes", "excludes", "links", "sections", "tasks", "currentSection", "displayMode", "funs", "inclusiveEndDates", "topAxis", "weekday", "weekend", "lastOrder", "clear", "setAxisFormat", "getAxisFormat", "setTickInterval", "getTickInterval", "setTodayMarker", "getTodayMarker", "setDateFormat", "enableInclusiveEndDates", "endDatesAreInclusive", "enableTopAxis", "topAxisEnabled", "setDisplayMode", "getDisplayMode", "getDateFormat", "setIncludes", "getIncludes", "setExcludes", "getExcludes", "getLinks", "addSection", "getSections", "getTasks", "isInvalidDate", "setWeekday", "getWeekday", "setWeekend", "checkTaskDates", "fixTaskDates", "getStartDate", "parseDuration", "getEndDate", "taskCnt", "parseId", "compileData", "parseData", "lastTask", "lastTaskID", "rawTasks", "taskDb", "addTask", "findTaskById", "addTaskOrg", "compileTasks", "setLink", "setClass", "setClickFun", "pushFun", "setClickEvent", "bindFunctions", "ganttDb_default", "init_ganttDb", "__esmMin", "init_logger", "init_diagramAPI", "init_utils", "init_commonDb", "dayjs", "dayjsIsoWeek", "dayjsCustomParseFormat", "dayjsAdvancedFormat", "__name", "txt", "allItemsProcessed", "maxDepth", "iterationCount", "date", "startDay", "startTime", "originalEndTime", "fixedEndTime", "renderEndTime", "endTime", "invalid", "prevTime", "str", "afterStatement", "latestTask", "id", "today", "mDate", "log", "d", "statement", "inclusive", "untilStatement", "earliestTask", "parsedDate", "durationValue", "durationUnit", "newEndTime", "idStr", "prevTask", "dataStr", "ds", "i", "endTimeData", "prevTaskId", "descr", "rawTask", "taskInfo", "pos", "newTask", "compileTask", "allProcessed", "ids", "_linkStr", "linkStr", "getConfig", "className", "functionName", "functionArgs", "argList", "item", "utils_default", "callbackFunction", "elem", "element", "fun", "setAccTitle", "getAccTitle", "setDiagramTitle", "getDiagramTitle", "setAccDescription", "getAccDescription", "import_dayjs", "setConf", "mapWeekdayToTimeFunction", "getMaxIntersections", "w", "draw", "ganttRenderer_default", "init_ganttRenderer", "__esmMin", "init_logger", "init_src", "init_common", "init_diagramAPI", "init_setupGraphViewbox", "__name", "log", "timeMonday", "timeTuesday", "timeWednesday", "timeThursday", "timeFriday", "timeSaturday", "timeSunday", "tasks", "orderOffset", "timeline", "sorted", "b", "maxIntersections", "element", "j", "text", "id", "version", "diagObj", "conf", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "doc", "elem", "taskArray", "categories", "checkUnique", "categoryHeights", "h", "categoryElements", "intersections", "category", "categoryHeight", "task", "svg", "timeScale", "time", "min", "d", "max", "taskCompare", "a", "taskA", "taskB", "result", "makeGantt", "configureSvgSize", "pageWidth", "pageHeight", "barHeight", "gap", "topPadding", "leftPadding", "colorScale", "linear", "hcl_default", "drawExcludeDays", "makeGrid", "drawRects", "vertLabels", "drawToday", "theArray", "theGap", "theTopPad", "theSidePad", "theBarHeight", "theColorScale", "uniqueTasks", "item", "i", "rectangles", "links", "res", "classStr", "secNum", "taskClass", "startX", "endX", "textWidth", "taskType", "o", "taskRect", "taskText", "oldParent", "Link", "excludes", "includes", "minTime", "maxTime", "startTime", "endTime", "dayjs", "dateFormat", "excludeRanges", "range", "renderEnd", "bottomXAxis", "axisBottom", "timeFormat", "resultTickInterval", "every", "interval", "weekday", "millisecond", "second", "timeMinute", "timeHour", "timeDay", "timeMonth", "topXAxis", "axisTop", "prevGap", "numOccurrences", "rows", "common_default", "dy", "svgLabel", "row", "tspan", "todayMarker", "todayG", "today", "todayLine", "arr", "hash", "l", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "ganttDiagram_exports", "__export", "diagram", "init_ganttDiagram", "__esmMin", "init_gantt", "init_ganttDb", "init_ganttRenderer", "init_styles", "gantt_default", "ganttDb_default", "ganttRenderer_default", "styles_default", "parser", "init_infoParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "__name", "input", "ast", "parse", "log", "version", "init_package", "__esmMin", "DEFAULT_INFO_DB", "getVersion", "db", "init_infoDb", "__esmMin", "init_package", "version", "__name", "selectSvgElement", "init_selectSvgElement", "__esmMin", "init_src", "init_diagramAPI", "__name", "id", "securityLevel", "getConfig", "root", "select_default", "doc", "draw", "renderer", "init_infoRenderer", "__esmMin", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "__name", "text", "id", "version", "log", "svg", "selectSvgElement", "configureSvgSize", "infoDiagram_exports", "__export", "diagram", "init_infoDiagram", "__esmMin", "init_infoParser", "init_infoDb", "init_infoRenderer", "parser", "db", "renderer", "DEFAULT_PIE_CONFIG", "DEFAULT_PIE_DB", "sections", "showData", "config", "getConfig", "clear", "addSection", "getSections", "setShowData", "getShowData", "db", "init_pieDb", "__esmMin", "init_logger", "init_commonDb", "init_defaultConfig", "defaultConfig_default", "__name", "label", "value", "log", "toggle", "setDiagramTitle", "getDiagramTitle", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "populateDb", "parser", "init_pieParser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_pieDb", "__name", "ast", "db", "populateCommonDb", "input", "parse", "log", "getStyles", "pieStyles_default", "init_pieStyles", "__esmMin", "__name", "options", "createPieArcs", "draw", "renderer", "init_pieRenderer", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "init_utils", "__name", "sections", "pieData", "element", "a", "b", "pie_default", "d3Section", "text", "id", "_version", "diagObj", "log", "db", "globalConfig", "getConfig", "pieConfig", "cleanAndMerge", "MARGIN", "LEGEND_RECT_SIZE", "LEGEND_SPACING", "height", "pieWidth", "svg", "selectSvgElement", "group", "themeVariables", "outerStrokeWidth", "parseFontSize", "textPosition", "radius", "arcGenerator", "arc_default", "labelArcGenerator", "arcs", "myGeneratedColors", "color", "ordinal", "datum", "sum", "section", "legend", "_datum", "index", "offset", "horizontal", "vertical", "label", "value", "longestTextWidth", "node", "totalWidth", "configureSvgSize", "pieDiagram_exports", "__export", "diagram", "init_pieDiagram", "__esmMin", "init_pieParser", "init_pieDb", "init_pieStyles", "init_pieRenderer", "parser", "db", "renderer", "pieStyles_default", "parser", "quadrant_default", "init_quadrant", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "$VT", "$VU", "$VV", "$VW", "$VX", "$VY", "$VZ", "$V_", "$V$", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "defaultThemeVariables", "QuadrantBuilder", "init_quadrantBuilder", "__esmMin", "init_src", "init_defaultConfig", "init_logger", "init_theme_default", "getThemeVariables", "__name", "defaultConfig_default", "log", "data", "points", "className", "styles", "config", "themeConfig", "xAxisPosition", "showXAxis", "showYAxis", "showTitle", "xAxisSpaceCalculation", "xAxisSpace", "yAxisSpaceCalculation", "yAxisSpace", "titleSpaceCalculation", "titleSpace", "quadrantLeft", "quadrantTop", "quadrantWidth", "quadrantHeight", "quadrantHalfWidth", "quadrantHalfHeight", "spaceData", "quadrantSpace", "drawXAxisLabelsInMiddle", "drawYAxisLabelsInMiddle", "axisLabels", "quadrants", "quadrant", "xAxis", "linear", "yAxis", "point", "classStyles", "halfExternalBorderWidth", "calculatedSpace", "validateHexCode", "value", "validateNumber", "validateSizeInPixels", "InvalidStyleError", "init_utils", "__esmMin", "__name", "style", "type", "textSanitizer", "text", "sanitizeText", "config", "setQuadrant1Text", "textObj", "quadrantBuilder", "setQuadrant2Text", "setQuadrant3Text", "setQuadrant4Text", "setXAxisLeftText", "setXAxisRightText", "setYAxisTopText", "setYAxisBottomText", "parseStyles", "styles", "stylesObject", "style", "key", "value", "validateNumber", "InvalidStyleError", "validateHexCode", "validateSizeInPixels", "addPoint", "className", "x", "y", "addClass", "setWidth", "width", "setHeight", "height", "getQuadrantData", "getConfig", "themeVariables", "quadrantChartConfig", "getDiagramTitle", "clear", "quadrantDb_default", "init_quadrantDb", "__esmMin", "init_diagramAPI", "init_common", "init_commonDb", "init_quadrantBuilder", "init_utils", "__name", "QuadrantBuilder", "setAccTitle", "getAccTitle", "setDiagramTitle", "getAccDescription", "setAccDescription", "draw", "quadrantRenderer_default", "init_quadrantRenderer", "__esmMin", "init_src", "init_diagramAPI", "init_logger", "init_setupGraphViewbox", "__name", "txt", "id", "_version", "diagObj", "getDominantBaseLine", "horizontalPos", "getTextAnchor", "verticalPos", "getTransformation", "data", "conf", "getConfig", "log", "securityLevel", "sandboxElement", "select_default", "svg", "group", "width", "height", "configureSvgSize", "quadrantData", "quadrantsGroup", "borderGroup", "dataPointGroup", "labelGroup", "titleGroup", "quadrants", "dataPoints", "quadrantDiagram_exports", "__export", "diagram", "init_quadrantDiagram", "__esmMin", "init_quadrant", "init_quadrantDb", "init_quadrantRenderer", "quadrant_default", "quadrantDb_default", "quadrantRenderer_default", "__name", "parser", "xychart_default", "init_xychart", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "isBarPlot", "data", "isBandAxisData", "isLinearAxisData", "init_interfaces", "__esmMin", "__name", "TextDimensionCalculatorWithFont", "init_textDimensionCalculator", "__esmMin", "init_createText", "parentGroup", "__name", "texts", "fontSize", "acc", "cur", "dimension", "elem", "t", "bbox", "computeDimensionOfText", "width", "height", "BaseAxis", "init_baseAxis", "__esmMin", "axisConfig", "title", "textDimensionCalculator", "axisThemeConfig", "__name", "range", "axisPosition", "tick", "availableSpace", "availableHeight", "spaceRequired", "maxPadding", "heightRequired", "availableWidth", "widthRequired", "point", "drawableElement", "x", "y", "BandAxis", "init_bandAxis", "__esmMin", "init_src", "init_logger", "init_baseAxis", "BaseAxis", "__name", "axisConfig", "axisThemeConfig", "categories", "title", "textDimensionCalculator", "band", "range", "log", "value", "LinearAxis", "init_linearAxis", "__esmMin", "init_src", "init_baseAxis", "BaseAxis", "__name", "axisConfig", "axisThemeConfig", "domain", "title", "textDimensionCalculator", "linear", "value", "getAxis", "data", "axisConfig", "axisThemeConfig", "tmpSVGGroup", "textDimensionCalculator", "TextDimensionCalculatorWithFont", "isBandAxisData", "BandAxis", "LinearAxis", "init_axis", "__esmMin", "init_interfaces", "init_textDimensionCalculator", "init_bandAxis", "init_linearAxis", "__name", "getChartTitleComponent", "chartConfig", "chartData", "chartThemeConfig", "tmpSVGGroup", "textDimensionCalculator", "TextDimensionCalculatorWithFont", "ChartTitle", "init_chartTitle", "__esmMin", "init_textDimensionCalculator", "__name", "point", "availableSpace", "titleDimension", "widthRequired", "heightRequired", "drawableElem", "LinePlot", "init_linePlot", "__esmMin", "init_src", "plotData", "xAxis", "yAxis", "orientation", "plotIndex", "__name", "finalData", "d", "path", "line_default", "BarPlot", "init_barPlot", "__esmMin", "barData", "boundingRect", "xAxis", "yAxis", "orientation", "plotIndex", "__name", "finalData", "d", "barWidth", "barWidthHalf", "data", "getPlotComponent", "chartConfig", "chartData", "chartThemeConfig", "BasePlot", "init_plot", "__esmMin", "init_linePlot", "init_barPlot", "__name", "xAxis", "yAxis", "point", "availableSpace", "drawableElem", "i", "plot", "linePlot", "LinePlot", "barPlot", "BarPlot", "Orchestrator", "init_orchestrator", "__esmMin", "init_axis", "init_chartTitle", "init_plot", "init_interfaces", "chartConfig", "chartData", "chartThemeConfig", "tmpSVGGroup", "getChartTitleComponent", "getPlotComponent", "getAxis", "__name", "availableWidth", "availableHeight", "plotX", "plotY", "chartWidth", "chartHeight", "spaceUsed", "p", "isBarPlot", "titleYEnd", "drawableElem", "component", "XYChartBuilder", "init_chartBuilder", "__esmMin", "init_orchestrator", "__name", "config", "chartData", "chartThemeConfig", "tmpSVGGroup", "Orchestrator", "getChartDefaultThemeConfig", "defaultThemeVariables", "getThemeVariables", "config", "getConfig", "cleanAndMerge", "getChartDefaultConfig", "defaultConfig_default", "getChartDefaultData", "textSanitizer", "text", "sanitizeText", "setTmpSVGG", "SVGG", "tmpSVGGroup", "setOrientation", "orientation", "xyChartConfig", "setXAxisTitle", "title", "xyChartData", "setXAxisRangeData", "min", "max", "hasSetXAxis", "setXAxisBand", "categories", "c", "setYAxisTitle", "setYAxisRangeData", "hasSetYAxis", "setYAxisRangeFromPlotData", "data", "minValue", "maxValue", "prevMinValue", "isLinearAxisData", "prevMaxValue", "transformDataWithoutCategory", "retData", "isBandAxisData", "i", "step", "getPlotColorFromPalette", "plotIndex", "plotColorPalette", "setLineData", "plotData", "setBarData", "getDrawableElem", "getDiagramTitle", "XYChartBuilder", "xyChartThemeConfig", "getChartThemeConfig", "getChartConfig", "clear", "xychartDb_default", "init_xychartDb", "__esmMin", "init_config", "init_defaultConfig", "init_theme_default", "init_utils", "init_common", "init_commonDb", "init_chartBuilder", "init_interfaces", "color", "__name", "setAccTitle", "getAccTitle", "setDiagramTitle", "getAccDescription", "setAccDescription", "draw", "xychartRenderer_default", "init_xychartRenderer", "__esmMin", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "__name", "txt", "id", "_version", "diagObj", "db", "themeConfig", "chartConfig", "getDominantBaseLine", "horizontalPos", "getTextAnchor", "verticalPos", "getTextTransformation", "data", "log", "svg", "selectSvgElement", "group", "background", "configureSvgSize", "shapes", "groups", "getGroup", "gList", "elem", "prefix", "i", "parent", "shape", "shapeGroup", "xychartDiagram_exports", "__export", "diagram", "init_xychartDiagram", "__esmMin", "init_xychart", "init_xychartDb", "init_xychartRenderer", "xychart_default", "xychartDb_default", "xychartRenderer_default", "parser", "requirementDiagram_default", "init_requirementDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "relations", "latestRequirement", "requirements", "latestElement", "elements", "RequirementType", "RiskLevel", "VerifyType", "Relationships", "addRequirement", "getRequirements", "setNewReqId", "setNewReqText", "setNewReqRisk", "setNewReqVerifyMethod", "addElement", "getElements", "setNewElementType", "setNewElementDocRef", "addRelationship", "getRelationships", "clear", "requirementDb_default", "init_requirementDb", "__esmMin", "init_diagramAPI", "init_logger", "init_commonDb", "__name", "name", "type", "id", "text", "risk", "verifyMethod", "log", "docRef", "src", "dst", "getConfig", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "ReqMarkers", "insertLineEndings", "requirementMarkers_default", "init_requirementMarkers", "__esmMin", "__name", "parentNode", "conf", "containsNode", "conf", "relCnt", "newRectNode", "newTitleNode", "newBodyNode", "addEdgeLabel", "drawRelationshipFromLayout", "drawReqs", "drawElements", "addRelationships", "adjustEntities", "elementString", "draw", "requirementRenderer_default", "init_requirementRenderer", "__esmMin", "init_src", "init_dagre", "init_graphlib", "init_diagramAPI", "init_logger", "init_setupGraphViewbox", "init_common", "init_requirementMarkers", "__name", "parentNode", "id", "txts", "x", "title", "i", "textStr", "yPadding", "linePadding", "totalY", "yStart", "body", "currentRow", "charLimit", "wrappedTxts", "currentTextLen", "firstPart", "lastStr", "svgPath", "txt", "len", "labelPoint", "labelId", "labelBBox", "svg", "rel", "g", "insert", "diagObj", "edge", "lineFunction", "line_default", "d", "common_default", "requirementMarkers_default", "reqs", "graph", "svgNode", "req", "reqName", "log", "groupNode", "textId", "rectNode", "nodes", "titleNodeInfo", "bodyNode", "rectBBox", "els", "el", "elName", "relationships", "src", "dst", "v", "str", "text", "_version", "getConfig", "securityLevel", "sandboxElement", "select_default", "Graph", "requirements", "elements", "layout", "padding", "svgBounds", "width", "height", "configureSvgSize", "requirementDiagram_exports", "__export", "diagram", "init_requirementDiagram", "__esmMin", "init_requirementDb", "init_styles", "init_requirementRenderer", "requirementDiagram_default", "requirementDb_default", "requirementRenderer_default", "styles_default", "parser", "sequenceDiagram_default", "init_sequenceDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "insertLinks", "actor", "links", "key", "insertProperties", "properties", "boxEnd", "state", "addBox", "addActor", "activationCount", "addMessage", "addSignal", "hasAtLeastOneBox", "hasAtLeastOneBoxWithTitle", "getMessages", "getBoxes", "getActors", "getCreatedActors", "getDestroyedActors", "getActor", "getActorKeys", "enableSequenceNumbers", "disableSequenceNumbers", "showSequenceNumbers", "setWrap", "extractWrap", "autoWrap", "clear", "parseMessage", "parseBoxData", "LINETYPE", "ARROWTYPE", "PLACEMENT", "addNote", "addLinks", "addALink", "addProperties", "addDetails", "getActorProperty", "apply", "sequenceDb_default", "init_sequenceDb", "__esmMin", "init_diagramAPI", "init_logger", "init_imperativeState", "init_common", "init_commonDb", "ImperativeState", "__name", "data", "id", "name", "description", "type", "assignedBox", "old", "prevActorInRecords", "part", "i", "count", "idFrom", "idTo", "message", "answer", "messageType", "activate", "error", "b", "wrapSetting", "text", "wrap", "getConfig", "str", "trimmedStr", "cleanedText", "log", "match", "color", "title", "style", "sanitizeText", "placement", "note", "actors", "actorId", "sanitizedText", "e", "sep", "label", "link", "elem", "details", "param", "item", "setAccTitle", "getAccTitle", "getDiagramTitle", "setDiagramTitle", "setAccDescription", "getAccDescription", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "import_sanitize_url", "ACTOR_TYPE_WIDTH", "TOP_ACTOR_CLASS", "BOTTOM_ACTOR_CLASS", "ACTOR_BOX_CLASS", "ACTOR_MAN_FIGURE_CLASS", "drawRect", "drawPopup", "popupMenuToggle", "drawKatex", "drawText", "drawLabel", "actorCnt", "fixLifeLineHeights", "drawActorTypeParticipant", "drawActorTypeActor", "drawActor", "drawBox", "anchorElement", "drawActivation", "drawLoop", "drawBackgroundRect", "insertDatabaseIcon", "insertComputerIcon", "insertClockIcon", "insertArrowHead", "insertArrowFilledHead", "insertSequenceNumber", "insertArrowCrossHead", "getTextObj", "getNoteRect", "_drawTextCandidateFunc", "_drawMenuItemTextCandidateFunc", "svgDraw_default", "init_svgDraw", "__esmMin", "init_common", "init_svgDrawCommon", "init_utils", "init_config", "__name", "elem", "rectData", "actor", "minMenuWidth", "textAttrs", "forceMenus", "links", "displayValue", "g", "actorClass", "menuWidth", "rectElem", "linkY", "key", "linkElem", "sanitizedLink", "popId", "textData", "msgModel", "textElem", "lines", "renderKatex", "getConfig", "dim", "rectDim", "startx", "stopx", "starty", "temp", "prevTextHeight", "textHeight", "common_default", "_textFontSize", "_textFontSizePx", "parseFontSize", "textElems", "dy", "yfunc", "i", "line", "text", "ZERO_WIDTH_SPACE", "span", "txtObject", "genPoints", "x", "y", "width", "height", "cut", "polygon", "diagram", "actors", "actorKeys", "conf", "actorKey", "actorDOM", "isFooter", "actorY", "center", "centerY", "boxplusLineGroup", "rect", "cssclass", "iconSrc", "drawEmbeddedImage", "drawImage", "hasKatex", "bounds", "actElem", "cssClass", "circle", "box", "verticalPos", "actorActivations", "loopModel", "labelText", "boxMargin", "boxTextMargin", "labelBoxHeight", "labelBoxWidth", "fontFamily", "fontSize", "fontWeight", "drawLoopLine", "stopy", "item", "txt", "idx", "sectionHeight", "te", "acc", "curr", "byText", "content", "_setTextAttrs", "byTspan", "actorFontSize", "actorFontFamily", "actorFontWeight", "_actorFontSize", "_actorFontSizePx", "byFo", "s", "byKatex", "calculateMathMLDimensions", "toText", "fromTextAttrsDict", "boundMessage", "_diagram", "msgModel", "bounds", "startx", "stopx", "message", "lines", "common_default", "isKatexMsg", "hasKatex", "textDims", "calculateMathMLDimensions", "getConfig", "utils_default", "messageFont", "conf", "lineHeight", "lineStartY", "totalOffset", "textWidth", "dx", "adjustLoopHeightForWrap", "loopWidths", "msg", "preMargin", "postMargin", "addLoopFn", "heightAdjust", "loopWidth", "textConf", "log", "adjustCreatedDestroyedData", "index", "actors", "createdActors", "destroyedActors", "receiverAdjustment", "actor", "adjustment", "__name", "senderAdjustment", "ACTOR_TYPE_WIDTH", "getMaxMessageWidthPerActor", "messages", "diagObj", "maxMessageWidthPerActor", "isNote", "isMessage", "textFont", "noteFont", "wrappedMessage", "messageWidth", "calculateActorMargins", "actorToMessageWidth", "boxes", "maxHeight", "prop", "actorFont", "actDims", "actorKey", "nextActor", "actorWidth", "maxBoxHeight", "box", "totalWidth", "total", "aKey", "boxMsgDimensions", "minWidth", "missing", "drawNote", "drawMessage", "addActorRenderingData", "drawActors", "drawActorsPopup", "setConf", "actorActivations", "activationBounds", "draw", "getRequiredPopupWidth", "buildNoteModel", "buildMessageModel", "calculateLoopBounds", "sequenceRenderer_default", "init_sequenceRenderer", "__esmMin", "init_src", "init_svgDraw", "init_logger", "init_common", "init_svgDrawCommon", "init_diagramAPI", "init_assignWithDepth", "init_utils", "init_setupGraphViewbox", "it", "acc", "h", "boxModel", "actorModel", "loopModel", "noteModel", "obj", "key", "val", "fun", "starty", "stopy", "_self", "cnt", "updateFn", "type", "item", "n", "_startx", "_stopx", "_starty", "_stopy", "diagram", "actorRect", "stackedSize", "x", "svgDraw_default", "lastActorActivationIdx", "activation", "title", "fill", "loop", "bump", "elem", "rect", "getNoteRect", "g", "rectElem", "textObj", "getTextObj", "textElem", "drawKatex", "drawText", "textHeight", "te", "curr", "cnf", "sequenceIndex", "sequenceVisible", "line", "url", "actorKeys", "verticalPos", "isFooter", "prevWidth", "prevMargin", "prevBox", "height", "doc", "maxWidth", "minMenuWidth", "menuDimensions", "assignWithDepth_default", "actorObj", "activations", "left", "right", "_text", "id", "_version", "securityLevel", "sequence", "sandboxElement", "select_default", "root", "hasBoxes", "hasBoxTitles", "newActors", "activeEnd", "activationData", "sequenceIndexStep", "messagesToDraw", "backgrounds", "e", "fixLifeLineHeights", "requiredBoxSize", "boxHeight", "boxWidth", "width", "configureSvgSize", "extraVertForTitle", "requiredPopupWidth", "labelWidth", "fromActor", "toActor", "shouldWrap", "textDimensions", "fromLeft", "fromRight", "toLeft", "toRight", "isArrowToRight", "isArrowToActivation", "adjustValue", "value", "allBounds", "boundedWidth", "msgDims", "_maxWidthPerActor", "loops", "stack", "current", "toAdd", "a", "stk", "from", "to", "sequenceDiagram_exports", "__export", "diagram", "init_sequenceDiagram", "__esmMin", "init_sequenceDb", "init_styles", "init_sequenceRenderer", "sequenceDiagram_default", "sequenceDb_default", "sequenceRenderer_default", "styles_default", "__name", "wrap", "parser", "classDiagram_default", "init_classDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "visibilityValues", "ClassMember", "init_classTypes", "__esmMin", "init_diagramAPI", "init_common", "__name", "input", "memberType", "sanitizedInput", "sanitizeText", "getConfig", "displayText", "parseGenericTypes", "cssStyle", "potentialClassifier", "match", "detectedVisibility", "lastChar", "length", "firstChar", "MERMAID_DOM_ID_PREFIX", "relations", "classes", "notes", "classCounter", "namespaces", "namespaceCounter", "functions", "sanitizeText", "splitClassNameAndType", "setClassLabel", "addClass", "lookUpDomId", "clear", "getClass", "getClasses", "getRelations", "getNotes", "addRelation", "addAnnotation", "addMember", "addMembers", "addNote", "cleanupLabel", "setCssClass", "setTooltip", "getTooltip", "setLink", "setClickEvent", "setClickFunc", "bindFunctions", "lineType", "relationType", "setupToolTips", "direction", "getDirection", "setDirection", "addNamespace", "getNamespace", "getNamespaces", "addClassesToNamespace", "setCssStyle", "classDb_default", "init_classDb", "__esmMin", "init_src", "init_logger", "init_diagramAPI", "init_common", "init_utils", "init_commonDb", "init_classTypes", "__name", "txt", "common_default", "getConfig", "_id", "id", "genericType", "className", "split", "label", "type", "name", "relation", "log", "annotation", "validatedClassName", "member", "theClass", "memberString", "ClassMember", "members", "text", "note", "ids", "classNode", "tooltip", "namespace", "linkStr", "target", "config", "utils_default", "functionName", "functionArgs", "_domId", "domId", "elemId", "argList", "i", "item", "elem", "element", "fun", "tooltipElem", "select_default", "el", "rect", "dir", "classNames", "styles", "thisClass", "s", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "edgeCount", "drawEdge", "drawClass", "getClassTitleString", "drawNote", "addTspan", "svgDraw_default", "init_svgDraw", "__esmMin", "init_src", "init_utils", "init_logger", "init_common", "__name", "elem", "path", "relation", "conf", "diagObj", "getRelationType", "type", "p", "lineData", "lineFunction", "line_default", "d", "basis_default", "svgPath", "url", "x", "y", "l", "labelPosition", "utils_default", "p1_card_x", "p1_card_y", "p2_card_x", "p2_card_y", "cardinality_1_point", "cardinality_2_point", "log", "g", "label", "bounds", "classDef", "id", "classInfo", "title", "isFirst", "member", "titleText2", "classTitleString", "classTitle", "titleHeight", "membersLine", "membersBox", "methodsLine", "members", "methods", "method", "classBox", "cssClassStr", "rectWidth", "parseGenericTypes", "note", "_diagObj", "noteInfo", "text", "lines", "line", "noteBox", "textEl", "displayText", "cssStyle", "tSpan", "idCache", "padding", "getGraphId", "insertMarkers", "draw", "classRenderer_default", "init_classRenderer", "__esmMin", "init_src", "init_dagre", "init_graphlib", "init_logger", "init_svgDraw", "init_setupGraphViewbox", "init_diagramAPI", "__name", "label", "foundEntry", "entry", "elem", "text", "id", "_version", "diagObj", "conf", "getConfig", "log", "securityLevel", "sandboxElement", "select_default", "root", "diagram", "g", "Graph", "classes", "keys", "key", "classDef", "node", "svgDraw_default", "relation", "note", "layout", "v", "e", "svgBounds", "width", "height", "configureSvgSize", "vBox", "classDiagram_exports", "__export", "diagram", "init_classDiagram", "__esmMin", "init_classDb", "init_styles", "init_classRenderer", "classDiagram_default", "classDb_default", "classRenderer_default", "styles_default", "__name", "cnf", "insertMarkers", "extension", "composition", "aggregation", "dependency", "lollipop", "point", "circle", "cross", "barb", "markers", "markers_default", "init_markers", "__esmMin", "init_logger", "__name", "elem", "markerArray", "type", "id", "markerName", "log", "clusterDb", "descendants", "parents", "clear", "isDescendant", "edgeInCluster", "copy", "extractDescendants", "findNonClusterChild", "getAnchorId", "adjustClustersAndEdges", "extractor", "sorter", "sortNodesByHierarchy", "init_mermaid_graphlib", "__esmMin", "init_logger", "init_json", "init_graphlib", "__name", "id", "ancestorId", "log", "edge", "clusterId", "graph", "newGraph", "rootId", "nodes", "node", "data", "edges", "e", "children", "res", "child", "_id", "depth", "d1", "d2", "nonClusterChild", "parent", "v", "w", "specialId", "edge1", "edge2", "write", "hasChildren", "dir", "clusterGraph", "Graph", "result", "sorted", "rect", "noteGroup", "roundedWithTitle", "divider", "shapes", "clusterElems", "insertCluster", "clear", "init_clusters", "__esmMin", "init_intersect_rect", "init_logger", "init_createLabel", "init_createText", "init_src", "init_diagramAPI", "init_common", "init_subGraphTitleMargins", "__name", "parent", "node", "log", "siteConfig", "getConfig", "shapeSvg", "useHtmlLabels", "evaluate", "label", "text", "createText", "createLabel_default", "bbox", "div", "dv", "select_default", "padding", "halfPadding", "width", "subGraphTitleTopMargin", "getSubGraphTitleMargins", "rectBox", "point", "intersect_rect_default", "innerRect", "elem", "shape", "addEdgeMarkers", "arrowTypesMap", "addEdgeMarker", "init_edgeMarker", "__esmMin", "init_logger", "__name", "svgPath", "edge", "url", "id", "diagramType", "position", "arrowType", "endMarkerType", "log", "suffix", "setTerminalWidth", "fo", "value", "getConfig", "edgeLabels", "terminalLabels", "clear", "insertEdgeLabel", "positionEdgeLabel", "outsideNode", "intersection", "cutPathAtIntersect", "insertEdge", "init_edges", "__esmMin", "init_logger", "init_createLabel", "init_createText", "init_src", "init_diagramAPI", "init_utils", "init_common", "init_lineWithOffset", "init_subGraphTitleMargins", "init_edgeMarker", "__name", "elem", "edge", "config", "useHtmlLabels", "evaluate", "labelElement", "createText", "createLabel_default", "edgeLabel", "label", "bbox", "div", "dv", "select_default", "startLabelElement", "startEdgeLabelLeft", "inner", "slBox", "startEdgeLabelRight", "endLabelElement", "endEdgeLabelLeft", "endEdgeLabelRight", "paths", "log", "path", "siteConfig", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "el", "x", "y", "pos", "utils_default", "node", "point", "dx", "dy", "w", "h", "outsidePoint", "insidePoint", "r", "Q", "R", "q", "res", "_x", "_y", "_points", "boundaryNode", "points", "lastPointOutside", "isInside", "inter", "pointPresent", "p", "e", "clusterDb", "diagramType", "graph", "id", "pointsHasChanged", "tail", "head", "lineData", "curve", "basis_default", "getLineFunctionsWithOffset", "lineFunction", "line_default", "strokeClasses", "svgPath", "url", "addEdgeMarkers", "recursiveRender", "render", "init_dagre_wrapper", "__esmMin", "init_dagre", "init_json", "init_markers", "init_util", "init_mermaid_graphlib", "init_nodes", "init_clusters", "init_edges", "init_logger", "init_subGraphTitleMargins", "init_diagramAPI", "__name", "_elem", "graph", "diagramType", "id", "parentCluster", "siteConfig", "log", "write", "dir", "elem", "clusters", "edgePaths", "edgeLabels", "nodes", "v", "node", "data", "ranksep", "nodesep", "o", "newEl", "updateNodeBounds", "setNodeElem", "findNonClusterChild", "clusterDb", "insertNode", "e", "edge", "insertEdgeLabel", "layout", "diff", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "sortNodesByHierarchy", "positionNode", "insertCluster", "point", "paths", "insertEdge", "positionEdgeLabel", "n", "markers", "markers_default", "clear", "adjustClustersAndEdges", "getConfig", "getArrowMarker", "type", "marker", "sanitizeText", "conf", "addNamespaces", "addClasses", "addNotes", "addRelations", "setConf", "draw", "classRenderer_v2_default", "init_classRenderer_v2", "__esmMin", "init_src", "init_graphlib", "init_logger", "init_diagramAPI", "init_dagre_wrapper", "init_utils", "init_setupGraphViewbox", "init_common", "__name", "txt", "common_default", "getConfig", "namespaces", "g", "_id", "diagObj", "log", "vertex", "node", "classes", "parent", "cssClassStr", "styles", "getStylesFromArray", "vertexText", "radius", "notes", "startEdgeId", "note", "i", "cssNoteStr", "edgeId", "edgeData", "interpolateToCurve", "linear_default", "relations", "cnt", "edge", "getEdgeId", "cnf", "text", "id", "_version", "securityLevel", "nodeSpacing", "rankSpacing", "Graph", "sandboxElement", "select_default", "root", "svg", "element", "render", "utils_default", "setupGraphViewbox", "doc", "labels", "label", "dim", "rect", "classDiagram_v2_exports", "__export", "diagram", "init_classDiagram_v2", "__esmMin", "init_classDiagram", "init_classDb", "init_styles", "init_classRenderer_v2", "classDiagram_default", "classDb_default", "classRenderer_v2_default", "styles_default", "__name", "cnf", "parser", "stateDiagram_default", "init_stateDiagram", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "stateStmt", "relDescription", "id", "description", "parts", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "DEFAULT_DIAGRAM_DIRECTION", "DEFAULT_NESTED_DOC_DIR", "STMT_STATE", "STMT_RELATION", "STMT_CLASSDEF", "STMT_STYLEDEF", "STMT_APPLYCLASS", "DEFAULT_STATE_TYPE", "DIVIDER_TYPE", "G_EDGE_STYLE", "G_EDGE_ARROWHEADSTYLE", "G_EDGE_LABELPOS", "G_EDGE_LABELTYPE", "G_EDGE_THICKNESS", "SHAPE_STATE", "SHAPE_STATE_WITH_DESC", "SHAPE_START", "SHAPE_END", "SHAPE_DIVIDER", "SHAPE_GROUP", "SHAPE_NOTE", "SHAPE_NOTEGROUP", "CSS_DIAGRAM", "CSS_STATE", "CSS_DIAGRAM_STATE", "CSS_EDGE", "CSS_NOTE", "CSS_NOTE_EDGE", "CSS_EDGE_NOTE_EDGE", "CSS_DIAGRAM_NOTE", "CSS_CLUSTER", "CSS_DIAGRAM_CLUSTER", "CSS_CLUSTER_ALT", "CSS_DIAGRAM_CLUSTER_ALT", "PARENT", "NOTE", "DOMID_STATE", "DOMID_TYPE_SPACER", "NOTE_ID", "PARENT_ID", "init_stateCommon", "__esmMin", "stateDomId", "itemId", "counter", "type", "typeSpacer", "DOMID_TYPE_SPACER", "typeStr", "DOMID_STATE", "insertOrUpdateNode", "nodes", "nodeData", "classes", "cssClass", "classDef", "existingNodeData", "node", "getClassesFromDbInfo", "dbInfoItem", "getStylesFromDbInfo", "nodeDb", "graphItemCount", "setupDoc", "getDir", "dataFetcher", "reset", "init_dataFetcher", "__esmMin", "init_diagramAPI", "init_logger", "init_common", "init_stateCommon", "__name", "parentParsedItem", "doc", "diagramStates", "edges", "altFlag", "look", "log", "item", "STMT_STATE", "DEFAULT_STATE_TYPE", "STMT_RELATION", "edgeData", "G_EDGE_STYLE", "common_default", "getConfig", "G_EDGE_ARROWHEADSTYLE", "G_EDGE_LABELPOS", "G_EDGE_LABELTYPE", "G_EDGE_THICKNESS", "CSS_EDGE", "parsedItem", "defaultDir", "DEFAULT_NESTED_DOC_DIR", "dir", "parsedItemDoc", "parent", "dbState", "classStr", "style", "shape", "SHAPE_STATE", "SHAPE_START", "SHAPE_END", "CSS_DIAGRAM_STATE", "newNode", "SHAPE_STATE_WITH_DESC", "SHAPE_GROUP", "DIVIDER_TYPE", "SHAPE_DIVIDER", "CSS_DIAGRAM_CLUSTER", "CSS_DIAGRAM_CLUSTER_ALT", "noteData", "SHAPE_NOTE", "CSS_DIAGRAM_NOTE", "NOTE_ID", "NOTE", "parentNodeId", "PARENT_ID", "groupData", "SHAPE_NOTEGROUP", "PARENT", "from", "to", "CSS_EDGE_NOTE_EDGE", "getDir", "getClasses", "draw", "stateRenderer_v3_unified_default", "init_stateRenderer_v3_unified", "__esmMin", "init_diagramAPI", "init_logger", "init_insertElementsForSize", "init_render", "init_setupViewPortForSVG", "init_utils", "init_stateCommon", "__name", "parsedItem", "defaultDir", "DEFAULT_NESTED_DOC_DIR", "dir", "parsedItemDoc", "text", "diagramObj", "id", "_version", "diag", "log", "securityLevel", "conf", "layout", "getConfig", "data4Layout", "svg", "getDiagramElement", "render", "padding", "utils_default", "setupViewPortForSVG", "CSS_DIAGRAM", "newClassesList", "startIdIfNeeded", "id", "fixedId", "START_NODE", "startEndCount", "START_TYPE", "startTypeIfNeeded", "type", "DEFAULT_STATE_TYPE", "endIdIfNeeded", "END_NODE", "END_TYPE", "endTypeIfNeeded", "addRelationObjs", "item1", "item2", "relationTitle", "id1", "type1", "id2", "type2", "addState", "currentDocument", "common_default", "getConfig", "COLOR_KEYWORD", "FILL_KEYWORD", "BG_FILL", "STYLECLASS_SEP", "nodes", "edges", "direction", "rootDoc", "classes", "newDoc", "documents", "dividerCnt", "lineType", "relationType", "clone", "setRootDoc", "getRootDoc", "docTranslator", "getRootDocV2", "extract", "clear", "getState", "getStates", "logDocuments", "getRelations", "addRelation", "addDescription", "cleanupLabel", "getDividerId", "addStyleClass", "getClasses", "setCssClass", "setStyle", "setTextStyle", "getDirection", "setDirection", "trimColon", "getData", "stateDb_default", "init_stateDb", "__esmMin", "init_logger", "init_utils", "init_common", "init_diagramAPI", "init_commonDb", "init_dataFetcher", "init_stateRenderer_v3_unified", "init_stateCommon", "__name", "DEFAULT_DIAGRAM_DIRECTION", "o", "log", "parent", "node", "first", "STMT_RELATION", "STMT_STATE", "doc", "currentDoc", "i", "DIVIDER_TYPE", "newNode", "generateId", "docNode", "_doc", "item", "STMT_CLASSDEF", "STMT_STYLEDEF", "ids", "styles", "foundState", "trimmedId", "s", "STMT_APPLYCLASS", "diagramStates", "look", "reset", "dataFetcher", "descr", "note", "textStyles", "des", "doc2", "cssClass", "style", "textStyle", "saveCommon", "title", "theState", "_descr", "label", "styleAttributes", "foundClass", "attrib", "fixedAttrib", "newStyle2", "itemIds", "cssClassName", "itemId", "styleText", "dir", "str", "config", "getDir", "getAccTitle", "setAccTitle", "getAccDescription", "setAccDescription", "setDiagramTitle", "getDiagramTitle", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "idCache", "set", "get", "keys", "size", "id_cache_default", "init_id_cache", "__esmMin", "__name", "key", "val", "k", "drawStartState", "drawDivider", "drawSimpleState", "drawDescrState", "addTitleAndBox", "drawEndState", "drawForkJoinState", "_drawLongText", "drawNote", "drawState", "edgeCount", "drawEdge", "init_shapes", "__esmMin", "init_src", "init_id_cache", "init_stateDb", "init_utils", "init_common", "init_diagramAPI", "init_logger", "__name", "g", "getConfig", "stateDef", "state", "classBox", "addTspan", "textEl", "txt", "isFirst", "tSpan", "titleBox", "titleHeight", "description", "isSecond", "descr", "descrLine", "descrBox", "width", "altBkg", "pad", "dblPad", "orgBox", "orgWidth", "orgX", "title", "titleWidth", "startX", "graphBox", "lineY", "height", "tmp", "_text", "x", "y", "textHeight", "textElem", "text", "lines", "common_default", "tHeight", "line", "span", "textBounds", "note", "rectElem", "textWidth", "elem", "id", "stateInfo", "stateBox", "id_cache_default", "path", "relation", "getRelationType", "type", "stateDb_default", "p", "lineData", "lineFunction", "line_default", "d", "basis_default", "svgPath", "url", "label", "utils_default", "rows", "titleRows", "maxWidth", "minX", "i", "boundsTmp", "log", "boxHeight", "heightAdj", "bounds", "conf", "transformationLog", "setConf", "insertMarkers", "draw", "getLabelWidth", "renderDoc", "stateRenderer_default", "init_stateRenderer", "__esmMin", "init_src", "init_dagre", "init_graphlib", "init_logger", "init_common", "init_shapes", "init_diagramAPI", "init_setupGraphViewbox", "__name", "elem", "text", "id", "_version", "diagObj", "getConfig", "securityLevel", "sandboxElement", "select_default", "root", "doc", "log", "diagram", "rootDoc", "padding", "bounds", "width", "height", "svgWidth", "configureSvgSize", "parentId", "altBkg", "domDocument", "graph", "Graph", "i", "edgeFreeDoc", "states", "relations", "keys", "first", "key", "stateDef", "node", "sub", "addTitleAndBox", "boxBounds", "drawState", "noteDef", "note", "cnt", "relation", "common_default", "layout", "svgElem", "v", "divider", "parent", "pWidth", "pShift", "stateBox", "e", "drawEdge", "stateInfo", "stateDiagram_exports", "__export", "diagram", "init_stateDiagram", "__esmMin", "init_stateDb", "init_styles", "init_stateRenderer", "stateDiagram_default", "stateDb_default", "stateRenderer_default", "styles_default", "__name", "cnf", "stateDiagram_v2_exports", "__export", "diagram", "init_stateDiagram_v2", "__esmMin", "init_stateDiagram", "init_stateDb", "init_styles", "init_stateRenderer_v3_unified", "stateDiagram_default", "stateDb_default", "stateRenderer_v3_unified_default", "styles_default", "__name", "cnf", "parser", "journey_default", "init_journey", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "currentSection", "sections", "tasks", "rawTasks", "clear", "addSection", "getSections", "getTasks", "updateActors", "addTask", "addTaskOrg", "compileTasks", "getActors", "journeyDb_default", "init_journeyDb", "__esmMin", "init_diagramAPI", "init_commonDb", "__name", "txt", "allItemsProcessed", "maxDepth", "iterationCount", "tempActors", "task", "descr", "taskData", "pieces", "score", "peeps", "peopleList", "s", "rawTask", "newTask", "compileTask", "pos", "allProcessed", "i", "getConfig", "setDiagramTitle", "getDiagramTitle", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "getStyles", "styles_default", "init_styles", "__esmMin", "__name", "options", "drawRect", "drawFace", "drawCircle", "drawText", "drawLabel", "drawSection", "taskCount", "drawTask", "drawBackgroundRect", "_drawTextCandidateFunc", "initGraphics", "svgDraw_default", "init_svgDraw", "__esmMin", "init_src", "init_svgDrawCommon", "__name", "elem", "rectData", "element", "faceData", "circleElement", "face", "smile", "arc", "arc_default", "sad", "ambivalent", "circleData", "textData", "txtObject", "genPoints", "x", "y", "width", "height", "cut", "polygon", "section", "conf", "g", "rect", "getNoteRect", "task", "center", "maxHeight", "xPos", "person", "colour", "circle", "bounds", "byText", "content", "textAttrs", "text", "_setTextAttrs", "byTspan", "taskFontSize", "taskFontFamily", "lines", "i", "dy", "byFo", "body", "toText", "fromTextAttrsDict", "key", "graphics", "drawActorLegend", "diagram", "conf", "getConfig", "yPos", "actors", "person", "colour", "circleData", "svgDraw_default", "labelData", "setConf", "LEFT_MARGIN", "draw", "bounds", "fills", "textColours", "drawTasks", "journeyRenderer_default", "init_journeyRenderer", "__esmMin", "init_src", "init_svgDraw", "init_diagramAPI", "init_setupGraphViewbox", "__name", "cnf", "key", "text", "id", "version", "diagObj", "securityLevel", "sandboxElement", "select_default", "root", "tasks", "title", "actorNames", "member", "actorPos", "actorName", "box", "height", "width", "configureSvgSize", "extraVertForTitle", "obj", "val", "fun", "startx", "starty", "stopx", "stopy", "_self", "cnt", "updateFn", "type", "item", "n", "_startx", "_stopx", "_starty", "_stopy", "bump", "verticalPos", "lastSection", "sectionVHeight", "taskPos", "sectionNumber", "fill", "num", "i", "task", "taskInSectionCount", "currentSection", "taskIndex", "section", "taskActors", "acc", "journeyDiagram_exports", "__export", "diagram", "init_journeyDiagram", "__esmMin", "init_journey", "init_journeyDb", "init_styles", "init_journeyRenderer", "journey_default", "journeyDb_default", "journeyRenderer_default", "styles_default", "__name", "cnf", "parser", "timeline_default", "init_timeline", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "timelineDb_exports", "__export", "addEvent", "addSection", "addTask", "addTaskOrg", "clear", "timelineDb_default", "getCommonDb", "getSections", "getTasks", "currentSection", "currentTaskId", "sections", "tasks", "rawTasks", "compileTasks", "init_timelineDb", "__esmMin", "init_commonDb", "__name", "commonDb_exports", "txt", "allItemsProcessed", "maxDepth", "iterationCount", "period", "length", "event", "rawTask", "task", "descr", "newTask", "compileTask", "pos", "allProcessed", "i", "wrap", "text", "width", "select_default", "words", "word", "line", "lineHeight", "y", "dy", "tspan", "j", "MAX_SECTIONS", "drawRect", "drawFace", "drawCircle", "drawText", "drawLabel", "drawSection", "taskCount", "drawTask", "drawBackgroundRect", "getTextObj", "getNoteRect", "_drawTextCandidateFunc", "initGraphics", "drawNode", "getVirtualNodeHeight", "defaultBkg", "svgDraw_default", "init_svgDraw", "__esmMin", "init_src", "__name", "elem", "rectData", "rectElem", "element", "faceData", "circleElement", "face", "smile", "arc", "arc_default", "sad", "ambivalent", "circleData", "textData", "nText", "textElem", "span", "txtObject", "genPoints", "x", "height", "cut", "polygon", "section", "conf", "g", "rect", "task", "center", "maxHeight", "bounds", "byText", "content", "textAttrs", "colour", "_setTextAttrs", "byTspan", "taskFontSize", "taskFontFamily", "lines", "i", "byFo", "body", "toText", "fromTextAttrsDict", "key", "graphics", "node", "fullSection", "nodeElem", "bkgElem", "bbox", "fontSize", "draw", "drawTasks", "drawEvents", "timelineRenderer_default", "init_timelineRenderer", "__esmMin", "init_src", "init_svgDraw", "init_logger", "init_diagramAPI", "init_setupGraphViewbox", "__name", "text", "id", "version", "diagObj", "conf", "getConfig", "LEFT_MARGIN", "log", "securityLevel", "sandboxElement", "select_default", "svg", "tasks", "title", "svgDraw_default", "sections", "maxSectionHeight", "maxTaskHeight", "depthY", "sectionBeginY", "masterX", "masterY", "sectionNumber", "hasSections", "section", "sectionNode", "sectionHeight", "maxEventCount", "maxEventLineLength", "i", "task", "taskNode", "taskHeight", "maxEventLineLengthTemp", "event", "eventNode", "tasksForSection", "sectionNodeWrapper", "node", "box", "setupGraphViewbox", "diagram", "sectionColor", "isWithoutSections", "taskWrapper", "lineWrapper", "lineLength", "events", "maxEventHeight", "eventBeginY", "eventWrapper", "eventHeight", "genSections", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "options", "sections", "i", "is_dark_default", "lighten_default", "darken_default", "sw", "timeline_definition_exports", "__export", "diagram", "init_timeline_definition", "__esmMin", "init_timeline", "init_timelineDb", "init_timelineRenderer", "init_styles", "timelineDb_exports", "timelineRenderer_default", "timeline_default", "styles_default", "parser", "mindmap_default", "init_mindmap", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "nodes", "cnt", "elements", "clear", "getParent", "getMindmap", "addNode", "nodeType", "getType", "setElementForId", "decorateNode", "type2Str", "getLogger", "getElementById", "db", "mindmapDb_default", "init_mindmapDb", "__esmMin", "init_diagramAPI", "init_common", "init_logger", "init_defaultConfig", "__name", "level", "i", "id", "descr", "type", "log", "conf", "getConfig", "padding", "defaultConfig_default", "node", "sanitizeText", "parent", "startStr", "endStr", "element", "decoration", "config", "_typeof", "obj", "_classCallCheck", "instance", "Constructor", "_defineProperties", "target", "props", "i", "descriptor", "_createClass", "protoProps", "staticProps", "_defineProperty$1", "key", "value", "_slicedToArray", "arr", "_arrayWithHoles", "_iterableToArrayLimit", "_unsupportedIterableToArray", "_nonIterableRest", "_i", "_arr", "_n", "_d", "_s", "_e", "err", "o", "minLen", "_arrayLikeToArray", "n", "len", "arr2", "_createForOfIteratorHelper", "allowArrayLike", "it", "F", "__name", "e", "normalCompletion", "didErr", "step", "isObject", "type", "createCommonjsModule", "fn", "module", "trimmedEndIndex", "string", "index", "reWhitespace", "baseTrim", "_trimmedEndIndex", "reTrimStart", "getRawTag", "isOwn", "hasOwnProperty$4", "symToStringTag$1", "tag", "unmasked", "result", "nativeObjectToString$1", "objectToString", "nativeObjectToString", "baseGetTag", "undefinedTag", "nullTag", "symToStringTag", "_getRawTag", "_objectToString", "isObjectLike", "isSymbol", "isObjectLike_1", "_baseGetTag", "symbolTag", "toNumber", "isSymbol_1", "NAN", "isObject_1", "other", "_baseTrim", "isBinary", "reIsBinary", "reIsOctal", "freeParseInt", "reIsBadHex", "debounce", "func", "wait", "options", "lastArgs", "lastThis", "maxWait", "timerId", "lastCallTime", "lastInvokeTime", "leading", "maxing", "trailing", "FUNC_ERROR_TEXT$1", "toNumber_1", "nativeMax", "invokeFunc", "time", "args", "thisArg", "leadingEdge", "timerExpired", "remainingWait", "timeSinceLastCall", "timeSinceLastInvoke", "timeWaiting", "nativeMin", "shouldInvoke", "now_1", "trailingEdge", "cancel", "flush", "debounced", "isInvoking", "clusteringDistance", "method", "length", "getP", "getQ", "nodeP", "nodeQ", "impl", "fn$6", "distances", "isKey", "object", "isArray_1", "reIsPlainProp", "reIsDeepProp", "isFunction", "funcTag", "genTag", "asyncTag", "proxyTag", "isMasked", "maskSrcKey", "toSource", "funcToString$1", "baseIsNative", "_isMasked", "pattern", "isFunction_1", "reIsNative", "reIsHostCtor", "_toSource", "getValue$1", "getNative", "_getValue", "_baseIsNative", "hashClear", "_nativeCreate", "hashDelete", "hashGet", "data", "HASH_UNDEFINED$1", "hasOwnProperty$2", "hashHas", "hasOwnProperty$1", "hashSet", "HASH_UNDEFINED", "Hash", "entries", "entry", "listCacheClear", "eq", "assocIndexOf", "array", "eq_1", "listCacheDelete", "_assocIndexOf", "lastIndex", "splice", "listCacheGet", "listCacheHas", "listCacheSet", "ListCache", "mapCacheClear", "_Hash", "_Map", "_ListCache", "isKeyable", "getMapData", "map", "_isKeyable", "mapCacheDelete", "_getMapData", "mapCacheGet", "mapCacheHas", "mapCacheSet", "size", "MapCache", "memoize", "resolver", "FUNC_ERROR_TEXT", "memoized", "cache", "_MapCache", "memoizeCapped", "memoize_1", "MAX_MEMOIZE_SIZE", "arrayMap", "iteratee", "baseToString", "_arrayMap", "symbolToString", "INFINITY$1", "toString$1", "_baseToString", "castPath", "_isKey", "_stringToPath", "toString_1", "toKey", "INFINITY", "baseGet", "path", "_castPath", "_toKey", "get", "defaultValue", "_baseGet", "baseAssignValue", "_defineProperty", "assignValue", "objValue", "hasOwnProperty", "_baseAssignValue", "isIndex", "MAX_SAFE_INTEGER", "reIsUint", "baseSet", "customizer", "nested", "newValue", "_isIndex", "_assignValue", "set", "_baseSet", "copyArray", "source", "toPath", "_copyArray", "forEachCompound", "eles", "includeSelf", "recursiveStep", "q", "did", "Set$1", "cy", "hasCompounds", "ele", "_ele", "addChildren", "children", "child", "addParent", "parent", "addParentAndChildren", "defineDegreeFunction", "callback", "includeLoops", "self", "degree", "node", "connectedEdges", "edge", "defineDegreeBoundsFunction", "degreeFn", "ret", "nodes", "returnFalse", "returnTrue", "Emitter", "opts", "emptyOpts", "context", "defaultsKeys", "defaults$8", "styleCache", "_p", "val", "cacheStyleFunction", "hashString", "cachePrototypeStyleFunction", "selfFn", "checkCompound", "parentOk", "parents", "defineDerivedStateFunction", "specs", "ok", "edgeOkViaNode", "hasCompoundNodes", "src", "tgt", "defineSwitchFunction", "params", "changedEles", "handler", "_handler", "addlEvents", "able", "changed", "overrideAble", "changedColl", "defineSwitchSet", "elesfn$3", "defineSourceFunction", "selector", "sources", "defineEdgesWithFunction", "otherNodes", "elements", "p", "h", "edges", "edgeData", "thisToOther", "otherToThis", "edgeConnectsThisAndOther", "defineParallelEdgesFunction", "defaults", "extend", "edge1", "edge1_p", "src1", "srcid1", "tgtid1", "srcEdges1", "j", "edge2", "edge2data", "tgtid2", "srcid2", "codirected", "oppdirected", "generateCubicBezier", "mX1", "mY1", "mX2", "mY2", "NEWTON_ITERATIONS", "NEWTON_MIN_SLOPE", "SUBDIVISION_PRECISION", "SUBDIVISION_MAX_ITERATIONS", "kSplineTableSize", "kSampleStepSize", "float32ArraySupported", "mSampleValues", "A", "aA1", "aA2", "B", "C", "calcBezier", "aT", "getSlope", "newtonRaphsonIterate", "aX", "aGuessT", "currentSlope", "currentX", "calcSampleValues", "_i2", "binarySubdivide", "aA", "aB", "currentT", "getTForX", "intervalStart", "currentSample", "lastSample", "dist", "guessForT", "initialSlope", "_precomputed", "precompute", "f", "str", "getEasedValue", "start", "end", "percent", "easingFn", "getValue", "prop", "spec", "ease", "startProp", "endProp", "propSpec", "number$1", "easedArr", "si", "ei", "step$1", "ani", "now", "isCore", "isEles", "ani_p", "pEasing", "startTime", "style", "easings", "easingVals", "easingProp", "name", "easing", "startPos", "endPos", "newPos", "valid", "startPan", "endPan", "pan", "animatingPan", "startZoom", "endZoom", "animatingZoom", "bound", "_name", "easedVal", "startAnimation", "stepAll", "doneEles", "stepOne", "current", "queue", "ranAnis", "next", "callbacks", "_callbacks", "cb", "ranEleAni", "handledThisEle", "ranCoreAni", "BreadthFirstLayout", "defaults$7", "deprecatedOptionDefaults", "CircleLayout", "defaults$6", "ConcentricLayout", "defaults$5", "CoseLayout", "defaults$4", "notEdges", "sourceId", "targetId", "hasSource", "hasTarget", "GridLayout", "defaults$3", "NullLayout", "defaults$2", "PresetLayout", "defaults$1", "RandomLayout", "NullRenderer", "drawPreparedRoundCorner", "ctx", "roundCorner", "getRoundCorner", "previousPoint", "currentPoint", "nextPoint", "radiusMax", "isArcRadius", "calcCornerArc", "x", "y", "cRadius", "startX", "startY", "stopX", "stopY", "v1", "radDirection", "v2", "drawDirection", "getPts", "pts", "retPts", "pushBezierPts", "r", "qbezierAt$1", "p1", "p2", "p3", "t", "qbezierAt", "bpts", "polygon", "points", "pt", "triangleBackcurve", "controlPoint", "firstPt", "triangleTee", "trianglePoints", "teePoints", "triPts", "teePts", "firstTeePt", "circleTriangle", "rx", "ry", "firstTrPt", "circle", "roundRect", "width", "height", "radius", "stroke", "b64ToBlob", "b64", "mimeType", "bytes", "buff", "buffUint8", "b64UriToB64", "b64uri", "output", "canvas", "getB64Uri", "Promise$1", "resolve", "reject", "blob", "CanvasRenderer", "containerWindow", "document", "CRp", "tapHlOffAttr", "tapHlOffStyle", "containerStyle", "container", "styleMap", "ms", "k", "emptyBb", "makeBoundingBox", "getBoxCenter", "bb", "getCenterOffset", "backgroundTimestampHasChanged", "same", "getStyleKey", "getLabelKey", "getSourceLabelKey", "getTargetLabelKey", "drawElement", "scaledLabelShown", "useEleOpacity", "drawLabel", "drawSourceLabel", "drawTargetLabel", "getElementBox", "getLabelBox", "getSourceLabelBox", "getTargetLabelBox", "isLabelVisibleAtScale", "getElementRotationPoint", "addTextMargin", "prefix", "pre", "getRsPt", "rs", "getLabelRotationPoint", "getSourceLabelRotationPoint", "getTargetLabelRotationPoint", "getElementRotationOffset", "getSourceLabelRotationOffset", "getTargetLabelRotationOffset", "getLabelRotationOffset", "eleTxrCache", "ElementTextureCache", "lblTxrCache", "slbTxrCache", "tlbTxrCache", "lyrTxrCache", "LayeredTextureCache", "willDraw", "refineInLayers", "reqs", "setExtension", "registrant", "ext", "overrideErr", "field", "warn", "Core", "Collection", "Layout", "plainObject", "layoutProto", "optLayoutFns", "fnName", "regStop", "anis", "getCy", "layout", "emitterOpts", "evt", "define", "BaseRenderer", "getExtension", "bProto", "RegistrantRenderer", "rProto", "Renderer", "proto", "pName", "pVal", "existsInR", "_pName", "error", "setMap", "extensions", "getMap", "setModule", "moduleType", "moduleName", "modules", "getModule", "_window", "navigator", "typeofstr", "typeofobj", "typeoffn", "typeofhtmlele", "instanceStr", "integer", "htmlElement", "elementOrCollection", "element", "collection", "core", "stylesheet", "event", "emptyString", "domElement", "boundingBox", "promise", "memoize$1", "camel2dash", "dash2camel", "prependCamel", "capitalize", "number", "rgba", "rgbaNoBackRefs", "hsla", "hslaNoBackRefs", "hex3", "hex6", "ascending", "descending", "hex2tuple", "hsl2tuple", "rgb2tuple", "colorname2tuple", "color2tuple", "colors", "commonjsGlobal", "freeGlobal", "_freeGlobal", "freeSelf", "root", "_root", "Symbol$1", "_Symbol", "objectProto$5", "objectProto$4", "debounce_1", "performance", "pnow", "raf", "requestAnimationFrame", "performanceNow", "DEFAULT_HASH_SEED", "K", "DEFAULT_HASH_SEED_ALT", "hashIterableInts", "hashInt", "hashIntAlt", "combineHashes", "combineHashesArray", "hashArrays", "hashIntsArray", "hashStrings", "hashStringsArray", "warningsEnabled", "warnSupported", "traceSupported", "MAX_INT$1", "trueify", "falsify", "zeroify", "noop$1", "warnings", "clone", "copy", "copyArray$1", "uuid", "_staticEmptyObject", "staticEmptyObject", "defaults$g", "removeFromArray", "clearArray", "push", "getPrefixedProperty", "setPrefixedProperty", "ObjectMap", "Map$2", "undef", "ObjectSet", "Element", "defineSearch", "elesfn$v", "heap$1", "heap", "dijkstraDefaults", "elesfn$u", "elesfn$t", "aStarDefaults", "elesfn$s", "floydWarshallDefaults", "elesfn$r", "bellmanFordDefaults", "elesfn$q", "sqrt2", "collapse", "contractUntil", "elesfn$p", "copyPosition", "modelToRenderedPosition", "renderedToModelPosition", "array2point", "min", "max", "mean", "median", "deg2rad", "getAngleFromDisp", "log2", "signum", "sqdist", "inPlaceSumNormalize", "qbezierPtAt", "lineAt", "copyBoundingBox", "clearBoundingBox", "shiftBoundingBox", "updateBoundingBox", "expandBoundingBoxByPoint", "expandBoundingBox", "expandBoundingBoxSides", "assignBoundingBox", "boundingBoxesIntersect", "inBoundingBox", "pointInBoundingBox", "boundingBoxInBoundingBox", "roundRectangleIntersectLine", "inLineVicinity", "inBezierVicinity", "solveQuadratic", "solveCubic", "sqdistToQuadraticBezier", "sqdistToFiniteLine", "pointInsidePolygonPoints", "pointInsidePolygon", "pointInsideRoundPolygon", "joinLines", "expandPolygon", "intersectLineEllipse", "checkInEllipse", "intersectLineCircle", "midOfThree", "finiteLinesIntersect", "polygonIntersectLine", "roundPolygonIntersectLine", "shortenIntersection", "generateUnitNgonPointsFitToSquare", "fitPolygonToSquare", "generateUnitNgonPoints", "getRoundRectangleRadius", "getRoundPolygonRadius", "getCutRectangleCornerLength", "bezierPtsToQuadCoeff", "getBarrelCurveConstants", "pageRankDefaults", "elesfn$o", "defaults$f", "elesfn$n", "defaults$e", "elesfn$m", "defaults$d", "elesfn$l", "defaults$c", "setOptions$3", "getSimilarity$1", "addLoops", "normalize", "mmult", "expand", "inflate", "hasConverged", "assign$2", "isDuplicate", "removeDuplicates", "markovClustering", "markovClustering$1", "identity", "absDiff", "addAbsDiff", "addSquaredDiff", "sqrt", "maxAbsDiff", "getDistance", "defaults$b", "setOptions$2", "getDist", "randomCentroids", "classify", "buildCluster", "haveValuesConverged", "haveMatricesConverged", "seenBefore", "randomMedoids", "findCost", "kMeans", "kMedoids", "updateCentroids", "updateMembership", "assign$1", "fuzzyCMeans", "kClustering", "defaults$a", "linkageAliases", "setOptions$1", "mergeClosest", "getAllChildren", "buildDendrogram", "buildClustersFromTree", "hierarchicalClustering", "hierarchicalClustering$1", "defaults$9", "setOptions", "getSimilarity", "getPreference", "findExemplars", "assignClusters", "assign", "affinityPropagation", "affinityPropagation$1", "hierholzerDefaults", "elesfn$k", "hopcroftTarjanBiconnected", "hopcroftTarjanBiconnected$1", "tarjanStronglyConnected", "tarjanStronglyConnected$1", "elesfn$j", "STATE_PENDING", "STATE_FULFILLED", "STATE_REJECTED", "api", "deliver", "execute", "execute_handlers", "Animation", "anifn", "define$3", "isArray", "coreJsData", "_coreJsData", "funcProto$1", "reRegExpChar", "funcProto", "objectProto$3", "funcToString", "hasOwnProperty$3", "_getNative", "nativeCreate", "_hashClear", "_hashDelete", "objectProto$2", "_hashGet", "objectProto$1", "_hashHas", "_hashSet", "_listCacheClear", "arrayProto", "_listCacheDelete", "_listCacheGet", "_listCacheHas", "_listCacheSet", "Map$1", "_mapCacheClear", "_mapCacheDelete", "_mapCacheGet", "_mapCacheHas", "_mapCacheSet", "_memoizeCapped", "rePropName", "reEscapeChar", "stringToPath", "symbolProto", "get_1", "defineProperty", "objectProto", "set_1", "toPath_1", "define$2", "define$1", "elesfn$i", "elesfn$h", "tokens", "newQuery", "Type", "stateSelectors", "lookup", "stateSelectorMatches", "stateSelectorRegex", "cleanMetaChars", "replaceLastQuery", "exprs", "consumeExpr", "consumeWhitespace", "parse", "toString", "parse$1", "valCmp", "boolCmp", "existCmp", "data$1", "meta", "match", "matches$1", "filter", "matches", "matching", "Selector", "selfn", "elesfn$g", "elesfn$f", "fn$5", "elesfn$e", "elesfn$d", "fn$4", "elesfn$c", "beforePositionSet", "positionDef", "position", "fn$3", "elesfn$b", "noninf", "updateBounds", "updateBoundsFromBox", "prefixedProperty", "updateBoundsFromArrow", "updateBoundsFromLabel", "updateBoundsFromOutline", "boundingBoxImpl", "getKey", "getBoundingBoxPosKey", "cachedBoundingBoxImpl", "defBbOpts", "defBbOptsKey", "filledBbOpts", "bounds", "fn$2", "elesfn$a", "defineDimFns", "widthHeight", "ifEdge", "ifEdgeRenderedPosition", "ifEdgeRenderedPositions", "controlPoints", "segmentPoints", "sourceEndpoint", "targetEndpoint", "midpoint", "renderedName", "edgePoints", "dimensions", "Event", "eventRegex", "universalNamespace", "forEachEvent", "makeEventObj", "forEachEventObj", "emitterOptions$1", "argSelector$1", "elesfn$9", "elesfn$8", "fn$1", "elesfn$7", "zIndexSort", "elesfn$6", "defineSymbolIterator", "getLayoutDimensionOptions", "elesfn$5", "elesfn$4", "eleTakesUpSpace", "eleInteractive", "parentInteractive", "eleVisible", "edgeVisibleViaNode", "elesfn$2", "defineDagExtremity", "defineDagOneHop", "defineDagAllHops", "elesfn$1", "corefn$9", "generateSpringRK4", "cubicBezier", "corefn$8", "emitterOptions", "argSelector", "elesfn", "corefn$7", "corefn$6", "corefn$5", "rendererDefaults", "corefn$4", "corefn$3", "styfn$8", "TRUE", "FALSE", "styfn$7", "styfn$6", "styfn$5", "styfn$4", "styfn$3", "styfn$2", "styfn$1", "Style", "styfn", "corefn$2", "defaultSelectionType", "corefn$1", "corefn", "getInfo", "setInfo", "DEBUG", "createLayoutInfo", "findLCA", "findLCA_aux", "printLayoutInfo", "randomizePositions", "getScaleInBoundsFn", "refreshPositions", "calculateNodeForces", "randomDistance", "nodeRepulsion", "nodesOverlap", "findClippingPoint", "calculateEdgeForces", "calculateGravityForces", "propagateForces", "updatePositions", "limitForce", "updateAncestryBoundaries", "separateComponents", "noop", "throwImgErr", "BRp$f", "BRp$e", "BRp$d", "sinA", "sinA90", "angle", "halfAngle", "lenOut", "limit", "lastPoint", "asVec", "invertVec", "BRp$c", "BRp$b", "BRp$a", "BRp$9", "lineAngleFromDelta", "lineAngle", "bezierAngle", "BRp$8", "TOO_SMALL_CUT_RECT", "warnedCutRect", "BRp$7", "BRp$6", "BRp$5", "BRp$4", "BRp$3", "BRp$2", "BRp$1", "beforeRenderCallbacks", "BR", "BRp", "fullFpsTime", "defs", "ElementTextureCacheLookup", "minTxrH", "txrStepH", "minLvl$1", "maxLvl$1", "maxZoom$1", "eleTxrSpacing", "defTxrWidth", "maxTxrW", "maxTxrH", "minUtility", "maxFullness", "maxFullnessChecks", "deqCost$1", "deqAvgCost$1", "deqNoDrawCost$1", "deqFastCost$1", "deqRedrawThreshold$1", "maxDeqSize$1", "getTxrReasons", "initDefaults", "ETCp", "defNumLayers", "minLvl", "maxLvl", "maxZoom", "deqRedrawThreshold", "refineEleDebounceTime", "deqCost", "deqAvgCost", "deqNoDrawCost", "deqFastCost", "maxDeqSize", "invalidThreshold", "maxLayerArea", "useHighQualityEleTxrReqs", "LTCp", "layerIdPool", "MAX_INT", "CRp$a", "CRp$9", "getZeroRotation", "getLabelRotation", "getSourceLabelRotation", "getTargetLabelRotation", "getOpacity", "getTextOpacity", "CRp$8", "drawEdgeOverlayUnderlay", "CRp$7", "CRp$6", "CRp$5", "drawNodeOverlayUnderlay", "CRp$4", "motionBlurDelay", "CRp$3", "sin0", "cos0", "sin", "cos", "ellipseStepSize", "CRp$2", "CRp$1", "CR", "pathsImpld", "renderer", "incExts", "extension", "Stylesheet", "sheetfn", "version", "cytoscape", "init_cytoscape_esm", "__esmMin", "keyFn", "memoizedFn", "v", "a", "b", "keys", "hex", "shortHex", "g", "base", "hsl", "s", "l", "hue2rgb", "m", "rgb", "isPct", "channel", "atLeastOneIsPct", "allArePct", "alpha", "color", "iterator", "seed", "hash", "num", "hash1", "hash2", "hashes", "hashes1", "hashes2", "ints", "strs", "msg", "enabled", "_defaults", "filledOpts", "optVal", "oneCopy", "otherArr", "el", "propName", "arrayOrObjectSet", "_this", "restore", "group", "rpos", "zoom", "classes", "cls", "bypass", "roots", "directed", "Q", "connectedNodes", "connectedBy", "id2depth", "V", "found", "_this$byGroup", "vi", "viId", "_loop", "vId", "depth", "prevEdge", "prevNode", "vwEdges", "w", "wId", "_ret", "connectedEles", "exports", "Heap", "defaultCmp", "floor", "heapify", "heappop", "heappush", "heappushpop", "heapreplace", "insort", "nlargest", "nsmallest", "updateItem", "_siftdown", "_siftup", "lo", "hi", "cmp", "mid", "item", "lastelt", "returnitem", "_ref", "_len", "_ref1", "_results", "_results1", "_j", "pos", "elem", "los", "startpos", "newitem", "parentpos", "childpos", "endpos", "rightpos", "factory", "_dijkstraDefaults", "weight", "weightFn", "prev", "knownDist", "setDist", "d", "distBetween", "u", "uvs", "smallestDistance", "smallestEdge", "_weight", "smalletsDist", "uid", "neighbors", "vid", "vDist", "alt", "S", "numNodes", "forest", "findSetIndex", "setUIndex", "setVIndex", "setU", "setV", "_aStarDefaults", "goal", "heuristic", "sid", "tid", "gScore", "fScore", "closedSetIds", "openSet", "openSetIds", "cameFrom", "cameFromEdge", "addToOpenSet", "id", "cMin", "cMinId", "popFromOpenSet", "isInOpenSet", "steps", "pathNode", "pathNodeId", "pathEdge", "wSrc", "wTgt", "wid", "tempScore", "_floydWarshallDefault", "N", "Nsq", "indexOf", "atIndex", "edgeNext", "st", "ts", "ik", "ij", "kj", "getArgEle", "indexOfArgEle", "res", "from", "to", "fromNode", "_bellmanFordDefaults", "infoMap", "hasNegativeWeightCycle", "negativeWeightCycles", "numEdges", "getNodeFromTo", "distanceTo", "pathTo", "thisStart", "_getInfo", "pred", "info", "replacedEdge", "checkForEdgeReplacement", "node1", "node2", "info1", "info2", "srcInfo", "tgtInfo", "negativeWeightCycleIds", "_edge", "_src", "_tgt", "_weight2", "srcDist", "tgtDist", "negativeNodes", "numNegativeNodes", "cycle", "_node", "smallestId", "smallestIndex", "c", "cycleId", "edgeIndex", "nodeMap", "remainingEdges", "edgeInfo", "sourceIn", "targetIn", "partition1", "partition2", "newEdges", "metaNodeMap", "sizeLimit", "numIter", "stopSize", "edgeIndexes", "minCutSize", "minCutEdgeIndexes", "minCutNodeMap", "metaNodeMap2", "copyNodesMap", "_i3", "iter", "_i4", "edgesState", "edgesState2", "res1", "res2", "cut", "witnessNodePartition", "_i5", "partitionId", "constructComponent", "subset", "component", "components", "begin", "total", "sort", "includeHoles", "off", "deg", "dispX", "dispY", "dx", "dy", "p0", "vec", "vecDist", "normVec", "bb1", "bb2", "padding", "top", "right", "bottom", "left", "_padding", "nodeX", "nodeY", "cornerRadius", "halfWidth", "halfHeight", "doWidth", "doHeight", "straightLineIntersections", "topStartX", "topStartY", "topEndX", "topEndY", "rightStartX", "rightStartY", "rightEndX", "rightEndY", "bottomStartX", "bottomStartY", "bottomEndX", "bottomEndY", "leftStartX", "leftStartY", "leftEndX", "leftEndY", "arcIntersections", "topLeftCenterX", "topLeftCenterY", "topRightCenterX", "topRightCenterY", "bottomRightCenterX", "bottomRightCenterY", "bottomLeftCenterX", "bottomLeftCenterY", "lx1", "ly1", "lx2", "ly2", "tolerance", "x1", "x2", "y1", "y2", "x3", "y3", "sqrtR", "denom", "root1", "root2", "epsilon", "discriminant", "dum1", "term1", "r13", "zeroThreshold", "minDistanceSquared", "curX", "curY", "distSquared", "offset", "line", "lineSq", "hypSq", "dotProduct", "adjSq", "up", "basePoints", "centerX", "centerY", "direction", "transformedPoints", "expandedLineSet", "corners", "cutPolygonPoints", "corner", "squaredDistance", "lineSet", "vertices", "currentLineStartX", "currentLineStartY", "currentLineEndX", "currentLineEndY", "nextLineStartX", "nextLineStartY", "nextLineEndX", "nextLineEndY", "intersection", "pad", "currentPointX", "currentPointY", "nextPointX", "nextPointY", "offsetX", "offsetY", "offsetLength", "normalizedOffsetX", "normalizedOffsetY", "ellipseWradius", "ellipseHradius", "newLength", "lenProportion", "t1", "t2", "tMin", "tMax", "inRangeParams", "nearIntersectionX", "nearIntersectionY", "farIntersectionX", "farIntersectionY", "x4", "y4", "infiniteLines", "dx13", "dx21", "dx43", "dy13", "dy21", "dy43", "ua_t", "ub_t", "u_b", "ua", "ub", "flptThreshold", "_min", "_max", "intersections", "doTransform", "currentY", "nextX", "nextY", "lines", "lowestIntersection", "lowestSquaredDistance", "amount", "disp", "lenRatio", "sides", "rotationRadians", "minX", "minY", "maxX", "maxY", "sx", "sy", "increment", "startAngle", "currentAngle", "_pageRankDefaults", "dampingFactor", "precision", "iterations", "numNodesSqd", "matrix", "columnSum", "additionalProb", "srcId", "tgtId", "_n2", "_n3", "eigenvector", "temp", "previous", "_i6", "_j2", "_n4", "diff", "_i7", "delta", "indegrees", "outdegrees", "maxIndegree", "maxOutdegree", "_currDegree", "degrees", "maxDegree", "currDegree", "callingEles", "_options", "incoming", "outgoing", "k_in", "k_out", "s_in", "s_out", "connEdges", "harmonic", "closenesses", "maxCloseness", "fw", "currCloseness", "node_i", "_defaults2", "dijkstra", "totalDistance", "weighted", "_C", "P", "_vid", "_v", "vEle", "edgeWeight", "_w", "_w2", "_v2", "attributes", "M", "sum", "col", "row", "_row", "expandFactor", "_M", "inflateFactor", "n2", "roundFactor", "clusters", "cluster", "c1", "c2", "id2position", "sim", "isStillMoving", "currentMax", "init", "visit", "post", "dim", "centroid", "mode", "noNodeP", "ndim", "centroids", "distance", "assignment", "sensitivityThreshold", "medoids", "potentialNewMedoid", "cost", "newCentroid", "curCost", "minCosts", "U", "numerator", "denominator", "_c", "_U", "pow", "_c2", "_c3", "preferredAlias", "dists", "mins", "minKey", "attrs", "n1", "_dist", "merged", "cur", "key1", "key2", "leftStr", "rightStr", "leaves", "retClusters", "dmp", "pref", "validPrefs", "attr", "preference", "R", "indices", "exemplars", "_ei", "ii", "maxI", "maxSum", "old", "Rp", "se", "_i8", "max2", "AS", "_i9", "_j3", "_j4", "_i10", "E", "_sum", "_i11", "_j5", "exemplarsIndices", "clusterIndices", "_i12", "clusterIndex", "_hierholzerDefaults", "dflag", "oddIn", "oddOut", "startVertex", "ind", "outd", "d1", "d2", "walk", "currentNode", "subtour", "adj", "adjTail", "adjHead", "trail", "edgeCount", "stack", "visitedEdges", "buildComponent", "cutset", "nodeId", "biconnectedSearch", "otherNodeId", "edgeId", "cutVertices", "stronglyConnectedSearch", "sourceNodeId", "targetNodeId", "componentNodes", "componentEdges", "executor", "onFulfilled", "onRejected", "curr", "state", "handlers", "then", "resolved", "ps", "resolveAll", "rejectAll", "vals", "doneCount", "fulfill", "isPromise", "opts2", "isEle", "tAni", "wasPlaying", "swap", "_pa", "startStyleProp", "selfIsArrayLike", "all", "complete", "properties", "propertiesEmpty", "panBy", "cyPan", "center", "centerPan", "fit", "fitVp", "vp", "clearQueue", "jumpToEnd", "quote", "subString", "single", "isPathLike", "change", "_valid", "names", "i_a", "l_a", "_i_a", "_l_a", "_privateFields", "_keys", "_key", "validKeyToDelete", "events", "offArgs", "onArgs", "_classes", "classesSet", "eleClasses", "changedEle", "eleHasClass", "className", "toggle", "toggleUndefd", "il", "hasClass", "changedNow", "duration", "ops", "op", "selToFn", "sel", "$1", "examiningQuery", "replacementQuery", "query", "_ref2", "_ref3", "_ref4", "_ref5", "_ref6", "_ref7", "_ref8", "_ref9", "_ref10", "variable", "_ref11", "_ref12", "comparatorOp", "valueIsString", "_ref13", "_ref14", "boolOp", "_ref15", "_ref16", "currentSubject", "compoundCount", "lastQ", "nextQuery", "edgeQuery", "srcTgtQ", "_source", "_target", "nhoodQ", "neighbor", "parentChildQuery", "compound", "subject", "_child", "_parent", "_parent2", "_child2", "pcQChecks", "ancChQuery", "descendant", "ancestor", "_descendant", "_ancestor", "_ancestor2", "_descendant2", "adQChecks", "topQ", "topChk", "topType", "remaining", "expr", "consumed", "currentQuery", "exprInfo", "clean", "cleanVal", "space", "checkToString", "check", "operator", "_operator", "_field", "_field2", "_operator2", "_field3", "queryToString", "lhs", "sub", "rhs", "chk", "fieldVal", "isFieldStr", "isFieldNum", "isValStr", "fieldStr", "valStr", "caseInsensitive", "notExpr", "isIneqCmp", "stateSelector", "qA", "qB", "selectorFunction", "otherSel", "selObj", "thisLength", "collectionLength", "nhood", "arg1", "arg2", "arg3", "arg4", "selectorOrEles", "tch", "ch", "cacheHit", "ancestors", "eleChildren", "add", "silent", "oldPos", "_fn", "_pos", "setting", "ppos", "_ele2", "hasParent", "relativeToParent", "origin", "_hasParent", "_relativeToParent", "_origin", "force", "update", "includeLabels", "computeBiasValues", "propDiff", "propBias", "propBiasComplement", "biasDiff", "biasComplementDiff", "biasTotal", "computePaddingValues", "paddingObject", "relativeTo", "leftVal", "rightVal", "topVal", "bottomVal", "widthBiasDiffs", "diffLeft", "diffRight", "heightBiasDiffs", "diffTop", "diffBottom", "b2", "rstyle", "halfArW", "arrowType", "bbs", "prefixDash", "label", "halign", "valign", "labelWidth", "labelHeight", "labelX", "labelY", "marginX", "marginY", "isEdge", "rotation", "outlineWidth", "borderWidth", "halfBorderWidth", "marginOfError", "lh", "lw", "lw_2", "lh_2", "bbPrefix", "isAutorotate", "isPfValue", "theta", "xo", "yo", "rotate", "px1y1", "px1y2", "px2y1", "px2y2", "bbPrefixRot", "bbRot", "outlineOpacity", "outlineOffset", "nodeShape", "outlineSize", "scaleX", "scaleY", "xOffset", "yOffset", "hDelta", "wDelta", "oBounds", "styleEnabled", "headless", "isNode", "ex1", "ex2", "ey1", "ey2", "manualExpansion", "isDisplayed", "displayed", "overlayOpacity", "overlayPadding", "underlayOpacity", "underlayPadding", "wHalf", "halfW", "halfH", "curveStyle", "hpts", "_temp", "n1pos", "n2pos", "_temp2", "_temp3", "ghost", "gx", "gy", "bbBody", "bbOverlay", "bbLabels", "tf", "usingDefOpts", "currPosKey", "isPosKeySame", "useCache", "isDirty", "needRecalc", "storeOldPos", "getOldPos", "border", "od", "getPoint", "getPoints", "rName", "q1", "q2", "qualifier", "conf", "confOverrides", "eventList", "namespace", "eventObj", "listeners", "listener", "extraParams", "manualCallback", "numListenersBeforeEmit", "_loop2", "selector1", "selector2", "arg", "argSel", "_filter", "filterEles", "include", "toRemove", "remove", "col1", "col2", "col1Smaller", "colS", "colL", "inOther", "both", "retEles", "toAdd", "toAddEle", "unmergedLastEle", "lastEleI", "lastEle", "lastEleId", "toRmFn", "mapFn", "initialValue", "valFn", "maxEle", "minEle", "getDepth", "depthDiff", "getEleDepth", "eleDiff", "zDiff", "thisSize", "sortFn", "sorted", "srcDepth", "tgtDepth", "typeofUndef", "isIteratorSupported", "dims", "bbDim", "layoutEles", "getMemoizeKey", "fnMem", "calculateSpacing", "spacing", "nodesBb", "spacingVector", "useSpacingFactor", "spacingBb", "getFinalPos", "animateNode", "fitAni", "zoomPanAni", "dirty", "notifyRenderer", "bEles", "updatedEles", "property", "includeNonDefault", "overriddenStyle", "pstyle", "updateTransitions", "parentOpacity", "opacity", "disqualified", "oEles", "sEles", "sElesIds", "newNext", "nid", "otherNode", "visited", "unvisited", "visitInComponent", "cmpt", "unique", "removed", "createdElements", "elesIds", "json", "_data", "_l", "element$1", "_data2", "move", "newParentValSpecd", "checkSwitch", "trueFnName", "falseFnName", "obj_k", "jsons", "elesArr", "addToPool", "cy_p", "removeFromElements", "_private", "_data3", "fields", "fieldsLength", "badSourceOrTarget", "_data4", "parentId", "specifiedParent", "selfAsParent", "restored", "_ele3", "toUpdateStyle", "removeFromPool", "elesToRemove", "elesToRemoveIds", "addConnectedEdges", "alreadyAdded", "removeEdgeRef", "removeParallelRef", "pllEdge", "alteredParents", "removeChildRef", "pid", "_ele4", "pllEdges", "elesStillInside", "_ele5", "removedElements", "_ele6", "struct", "modifyPool", "srcExists", "tgtExists", "_data5", "parentExists", "pidToAssign", "updated", "_data6", "_jsons", "elesByGroup", "_jsons2", "grs", "elesArray", "jl", "_json", "springAccelerationForState", "springEvaluateStateWithDerivative", "initialState", "dt", "derivative", "springIntegrateState", "dxdt", "dvdt", "springRK4Factory", "tension", "friction", "initState", "time_lapsed", "DT", "have_duration", "last_state", "percentComplete", "bezier", "spring", "headlessStep", "eventName", "eventEles", "bool", "ids", "pxRatio", "RendererProto", "rOpts", "domEle", "ie", "cxtMeta", "cxtStyle", "app", "hintsDiff", "oldCxtKey", "newCxtKey", "dualCxtKey", "cachedVal", "diffProps", "addedProp", "cxt", "oldHasCxt", "newHasCxt", "cxtHasDiffed", "cxtHasMappedProps", "laterCxtOverrides", "laterCxt", "hasLaterCxt", "cxtKey", "prevKey", "contextSelectorMatches", "cxtStyles", "hasCxt", "retDiffProps", "types", "diffPropName", "cxtProp", "eleProp", "mapping", "fnValue", "retDiffProp", "propNames", "propGrKeys", "propHash", "seedKey", "oldStyleKey", "overriddenStyles", "grKey", "updateGrKey1", "updateGrKey2", "updateGrKey", "updateGrKeyWStr", "strVal", "cleanNum", "parsedProp", "propInfo", "_grKey", "normalizedNumberVal", "numberVal", "haveNormNum", "haveUnitedNum", "haveNum", "units", "_grKey2", "grHash", "sk", "labelKeys", "sourceLabelKeys", "targetLabelKeys", "_p$styleKeys", "nodeBody", "nodeBorder", "nodeOutline", "backgroundImage", "pie", "nodeKeys", "flatProp", "propIsBypass", "origProp", "origPropIsBypass", "flatPropMapping", "getVal", "checkTriggers", "fromVal", "toVal", "printMappingErr", "fieldWidth", "r1", "r2", "g1", "g2", "b1", "a1", "a2", "clr", "calcValue", "_fields", "_fieldVal", "fnRetVal", "keepBypasses", "delay", "anyPrev", "styProp", "diffProp", "prevProp", "fromProp", "toProp", "initVal", "initDt", "fromValue", "toValue", "getTrigger", "onTrigger", "triggerCheck", "isBypass", "_parsedProp", "specifiedProps", "_name2", "_value", "_parsedProp2", "_prop", "isColor", "isMulti", "oldValue", "px", "isRenderedVal", "subproperty", "styleProp", "strValue", "getRenderedValue", "getValueStringWithUnits", "isArrayValue", "haveUnits", "aniProps", "aniProp", "propsObj", "chVal", "css", "selAndBlockStr", "blockRem", "propAndValStr", "removeSelAndBlockFromRemaining", "removePropAndValFromRem", "nothingLeftToParse", "selAndBlock", "selectorStr", "blockStr", "invalidBlock", "_nothingLeftToParse", "propAndVal", "propStr", "hex3$1", "hex6$1", "mapData", "mapArg", "urlRegexes", "valArr", "unitsArr", "val1", "val2", "str1", "str2", "empty1", "empty2", "mainLabel", "sourceLabel", "targetLabel", "labelDimensions", "commonLabel", "behavior", "visibility", "overlay", "underlay", "transition", "nodeSizeHashOverride", "edgeLine", "edgeArrow", "arrowPrefixes", "triggersBounds", "propGroups", "propGroupNames", "propGroupKeys", "aliases", "alias", "pointsToProp", "aliasProp", "rawProps", "parsedProps", "propIsFlat", "flatKey", "bypassKey", "valueKey", "argHash", "propCache", "passedValue", "mapped", "_mapped", "valueMin", "valueMax", "pfValArr", "hasEnum", "checkEnums", "en", "implicitUnits", "unitsRegex", "propsStr", "propsSplit", "tuple", "enumProp", "regexes", "regex", "ele_p", "mapVal", "currentSelectorIsCore", "newStyle", "selType", "arg0", "viewportState", "bbe", "currentPan", "currentZoom", "bail", "pan1", "zoom1", "zoom2", "pan2", "zoomDefd", "panDefd", "zoomFailed", "panFailed", "z", "rb", "_int", "reg", "readies", "head", "defVal", "def", "altVal", "loadExtData", "extData", "anyIsPromise", "rendererOptions", "setElesAndLayout", "onload", "ondone", "oldEles", "layoutOpts", "thens", "initStyle", "initEles", "ownerDocument", "getFreshRef", "idInJson", "updateEles", "gr", "toMod", "_toMod$_i", "parentsToRemove", "flat", "graph", "maximal", "rootsArray", "comp", "compRoots", "depths", "foundByBfs", "addToDepth", "changeDepth", "newDepth", "pNode", "orphanNodes", "assignDepthsAt", "assignDepths", "adjustMaximally", "shifted", "eInfo", "incomers", "maxDepth", "incmr", "iInfo", "enqueue", "dequeue", "didShift", "minDistance", "nbb", "cachedWeightedPercent", "getWeightedPercent", "eleDepth", "samples", "bf", "nDepth", "apct", "bpct", "orphanDepth", "biggestDepthSize", "maxDepthSize", "getPosition", "_getInfo2", "depthSize", "distanceX", "distanceY", "radiusStepSize", "epos", "clockwise", "sweep", "dTheta", "dcos", "dsin", "rMin", "getPos", "nodeValues", "maxNodeSize", "levelWidth", "levels", "currentLevel", "minDist", "firstLvlHasMulti", "maxR", "rStep", "level", "rDeltaMax", "_r", "_level", "rDelta", "_level2", "_level3", "_dTheta", "_r2", "_val", "layoutInfo", "refresh", "mainLoop", "done", "getScaledPos", "loopRet", "frame", "id2cmptId", "tempNode", "tempGraph", "p_id", "node_id", "node_ix", "tempEdge", "idealLength", "elasticity", "sourceIx", "targetIx", "sourceGraph", "targetGraph", "lca", "lcaGraph", "graphIx", "nodeIx", "childGraphIx", "coseBB", "lnode", "pctX", "pctY", "_step", "cmptId1", "cmptId2", "directionX", "directionY", "maxRandDist", "overlap", "forceX", "forceY", "point1", "point2", "distanceSqr", "dX", "dY", "overlapX", "overlapY", "X", "Y", "H", "W", "dirSlope", "nodeSlope", "lx", "ly", "distThreshold", "fx", "fy", "nodeIndex", "offX", "offY", "childNode", "tempForce", "flag", "cid", "totalA", "usedW", "rowH", "maxRowW", "cells", "splits", "rows", "cols", "small", "large", "oRows", "oCols", "sm", "lg", "_sm", "_lg", "cellWidth", "cellHeight", "cellUsed", "used", "use", "moveToNextCell", "id2manPos", "rcPos", "posIsFn", "arrowShapes", "bbCollide", "translation", "edgeWidth", "inside", "transform", "xRotated", "yRotated", "xScaled", "yScaled", "xTranslated", "yTranslated", "transformPoints", "pointsToArr", "standardGap", "defineArrowShape", "defn", "ptsTrans", "ctrlPt", "ctrlPtTrans", "circleInside", "shiftFactor", "y0", "crossLinePts", "clientX", "clientY", "offsets", "offsetLeft", "offsetTop", "scale", "rect", "styleValue", "clientWidth", "clientHeight", "paddingHor", "paddingVer", "borderHor", "unscaledW", "unscaledH", "interactiveElementsOnly", "isTouch", "near", "edgeThreshold", "nodeThreshold", "labelThreshold", "minSqDist", "nearEdge", "nearNode", "addEle", "sqDist", "checkNode", "hw", "hh", "shape", "checkEdge", "styleWidth", "widthSq", "width2", "arSize", "arrows", "ar", "preprop", "checkLabel", "th", "text", "eventsEnabled", "ox", "oy", "box", "x1c", "x2c", "y1c", "y2c", "boxBb", "nodeBb", "allInside", "isHaystack", "isBezier", "isMultibezier", "isSegments", "isCompound", "isSelf", "endX", "endY", "midX", "midY", "bX", "bY", "i2", "i1", "cpts", "bp0x", "bp0y", "bp1x", "bp1y", "ic", "i3", "pp", "originalV", "invertedV", "pairInfo", "posPts", "intersectionPts", "vectorNormInverse", "midptPts", "srcManEndpt", "tgtManEndpt", "haveManualEndPts", "recalcVectorNormInverse", "edgeDistances", "_this$manualEndptToPx", "_this$manualEndptToPx2", "_this$manualEndptToPx3", "_this$manualEndptToPx4", "endPts", "srcPos", "tgtPos", "srcW", "tgtW", "srcH", "tgtH", "halfRadius", "segmentWs", "segmentDs", "segmentRs", "segmentTs", "segmentsN", "lastRadius", "lastRadiusType", "w1", "w2", "_this$findMidptPtsEtc", "adjustedMidpt", "edgeIsUnbundled", "dirCounts", "ctrlptDists", "ctrlptDist", "loopDir", "loopSwp", "stepSize", "loopDist", "loopAngle", "outAngle", "inAngle", "dc", "loopW", "loopaPos", "loopbPos", "loopPos", "minCompoundStretch", "compoundStretchA", "compoundStretchB", "edgeIsSwapped", "ctrlptWs", "bezierN", "ctrlptWeight", "multi", "normctrlptDist", "manctrlptDist", "sign", "distanceFromMidpoint", "_this$findMidptPtsEtc2", "VERTICAL", "HORIZONTAL", "LEFTWARD", "RIGHTWARD", "DOWNWARD", "UPWARD", "AUTO", "dIncludesNodeBody", "taxiDir", "rawTaxiDir", "taxiTurn", "turnIsPercent", "taxiTurnPfVal", "turnIsNegative", "minD", "dw", "dh", "pdx", "pdy", "subDWH", "dxy", "dwh", "isExplicitDir", "isVert", "pl", "sgnL", "forcedDir", "getIsTooClose", "isTooCloseSrc", "isTooCloseTgt", "isTooClose", "lShapeInsideSrc", "lShapeInsideTgt", "_lShapeInsideSrc", "_lShapeInsideTgt", "_y", "_x", "_x2", "_x3", "_y2", "_y3", "_y4", "_x4", "_x5", "_x6", "_y5", "_y6", "srcShape", "tgtShape", "srcCornerRadius", "tgtCornerRadius", "srcRs", "tgtRs", "badStart", "badAStart", "badEnd", "badAEnd", "minCpADistFactor", "arrowW", "minCpADist", "startACpDist", "closeStartACp", "endACpDist", "closeEndACp", "overlapping", "cpD", "cpL", "cpM", "cpProj", "srcCtrlPtIntn", "_cpD", "_cpL", "_cpM", "_radius", "_cpProj", "tgtCtrlPtIntn", "mt", "point", "factor", "hashTable", "pairId", "map2", "pairIds", "haystackEdges", "edgeIsBezier", "srcIndex", "tgtIndex", "tableEntry", "swappedpairInfo", "firstEdge", "_curveStyle", "_edgeIsUnbundled", "srcOutside", "srcIntn", "tgtOutside", "tgtIntn", "vector", "vectorNorm", "passedPairInfo", "npos", "intersect", "tgtArShape", "srcArShape", "et", "taxi", "segments", "hasEndpts", "overrideEndpts", "srcManEndptVal", "tgtManEndptVal", "p1_i", "p2_i", "cpStart", "cpEnd", "srcArrowFromPt", "tgtArrowFromPt", "trs", "lw2", "lh2", "va", "ha", "labelIntersect", "refPt", "intSqdist", "labIntSqdist", "labInt2SqDist", "arrowEnd", "edgeEnd", "srs", "_lw", "_lh", "_lx", "_ly", "_lw2", "_lh2", "_va", "_ha", "_labelIntersect", "_refPt", "_intSqdist", "_labIntSqdist", "_minSqDist", "_labInt2SqDist", "arrowStart", "edgeStart", "lpts", "content", "textX", "textY", "nodeWidth", "nodeHeight", "nodePos", "textHalign", "textValign", "t0", "lp0", "lp1", "setRs", "midAngle", "createControlPointInfo", "ctrlpts", "nProjs", "addSegment", "cp", "prevSegment", "segment", "prevCp", "calculateEndProjection", "isSrc", "cps", "selected", "startDist", "totalDist", "_cp", "_seg", "lastSeg", "seg", "tSegment", "segDt", "di", "d0", "pD", "_t", "labelDims", "lineHeight", "textWrap", "numLines", "normPerLineHeight", "labelLineHeight", "pfd", "textTransform", "rscratch", "wrapStyle", "labelKey", "zwsp", "maxW", "overflow", "overflowAny", "wrappedLines", "separatorRegex", "lineDims", "lineW", "processedLine", "separatorMatches", "subline", "previousIndex", "_iterator", "separatorMatch", "wordSeparator", "word", "testLine", "testDims", "testW", "_maxW", "ellipsized", "ellipsis", "incLastCh", "widthWithNextCh", "justification", "cacheKey", "existingVal", "fStyle", "family", "c2d", "ds", "metrics", "rot", "rotStr", "elesToUpdate", "dirtyStyleCaches", "updateEleCalcs", "fns", "isCleanConnected", "_p2", "_rstyle", "_p3", "_rstyle2", "grabTargets", "forceRecalc", "url", "crossOrigin", "onLoad", "imageCache", "image", "dataUriPrefix", "isDataUri", "useCapture", "tgtIsDom", "supportsPassive", "on", "isSelected", "triggerEvents", "isMultSelKeyDown", "allowPanningPassthrough", "down", "downs", "allowPassthrough", "setGrabbed", "setFreed", "setInDragLayer", "setOutDragLayer", "setGrabTarget", "removeGrabTarget", "addToDragList", "list", "listHasEle", "addDescendantsToDrag", "innerNodes", "addNodesToDrag", "updateAncestorsInDragLayer", "addNodeToDrag", "freeDraggedElements", "grabbedEles", "blurActiveDomElement", "haveMutationsApi", "haveResizeObserverApi", "mutns", "mutn", "rNodes", "rNode", "onResize", "forEachUp", "invalidateCoords", "inBoxSelection", "eventInContainer", "containerPageCoords", "positions", "atLeastOnePosInside", "tParent", "containerIsTarget", "gpos", "select", "nears", "draggedElements", "checkForTaphold", "cxtEvt", "makeEvent", "triggerGrab", "selectedNodes", "capture", "preventDefault", "mdownPos", "mdownGPos", "last", "isOverThresholdDrag", "dx2", "dy2", "dist2", "multSelKeyDown", "updateDragDelta", "dragDelta", "goIntoBoxMode", "deltaP", "mdPos", "justStartedDrag", "totalShift", "clickTimeout", "didDoubleClick", "prevClickTimeStamp", "cxtTap", "eleWouldBeSelected", "downWasGrabbed", "wheelHandler", "needsWheelFix", "newZoom", "f1x1", "f1y1", "f2x1", "f2y1", "distance1", "distance1Sq", "center1", "modelCenter1", "containerWidth", "containerHeight", "twoFingersStartInside", "distanceSq", "touchstartHandler", "earlier", "cxtDistThreshold", "cxtDistThresholdSq", "near1", "near2", "draggedEles", "sPos", "touch0", "touchmoveHandler", "startGPos", "f1x2", "f1y2", "f2x2", "f2y2", "distance2Sq", "factorSq", "distThresholdSq", "factorThreshold", "factorThresholdSq", "de_p", "_start", "distance2", "df1x", "df1y", "df2x", "df2y", "tx", "ty", "ctrx", "ctry", "touchcancelHandler", "touchendHandler", "didDoubleTouch", "touchTimeout", "prevTouchTimeStamp", "ctxTapend", "ctxTap", "startWasGrabbed", "rdist2", "pointers", "makeTouch", "makePointer", "addPointer", "removePointer", "updatePointer", "addTouchesToEvent", "pointerIsMouse", "diam", "cl", "xBegin", "xEnd", "yBegin", "yEnd", "cPts", "cutTrianglePts", "bPts", "approximateBarrelCurvePts", "m0", "m1", "m2", "curveConstants", "hOffset", "wOffset", "ctrlPtXOffset", "barrelCurvePts", "getCurveT", "curvePts", "x0", "xMin", "xMax", "yMin", "yMax", "coeff", "validRoots", "curveRegions", "cornerPts", "bezY", "topIntersections", "outerWidth", "outerHeight", "nodeShapes", "diamondPoints", "star5Points", "outerPoints", "innerPoints", "innerRadius", "tagPoints", "priority", "cbs", "renderFn", "requestTime", "endTime", "ctr", "stylesheetId", "stylesheetAlreadyExists", "computedStyle", "binding", "queueRedraw", "frameStartTime", "avgRenderTime", "renderTime", "deqd", "extent", "pixelRatio", "frameDuration", "timeAvailable", "thisDeqd", "doesEleInvalidateKey", "idsByKey", "currKey", "newKey", "lvl", "cachesByLvl", "lvls", "caches", "entireKeyInvalidated", "initOptions", "txrH", "rtxtrQs", "rtxtrQ", "k2q", "reason", "eleScaledH", "eleScaledW", "eleCache", "txrQ", "txr", "addNewTxr", "scalableFrom", "otherCache", "deqing", "highQualityReq", "downscaleReq", "higherCache", "oneUpCache", "downscale", "lowerCache", "_l2", "invalid", "noOtherElesUseCache", "_cache", "eleCaches", "minW", "existingReq", "req", "dequeued", "cacheExists", "qSort", "layer", "firstGet", "layersByLvl", "layers", "lvlComplete", "tmpLayers", "checkTempLevels", "canUseAsTmpLvl", "checkLvls", "dir", "getBb", "makeLayer", "after", "area", "maxElesPerLayer", "allowLazyQueueing", "existingLayer", "numElesInLayers", "haveLayers", "rLyr", "elesQ", "hasId", "eleDeqs", "layersInLevel", "replaced", "shiftToOriginWithBb", "showLabel", "showOverlay", "showOpacity", "getRotation", "smooth", "rotPt", "oldGlobalAlpha", "requestHighQuality", "_r$data", "badLine", "shouldDrawOverlay", "shouldDrawOpacity", "lineOpacity", "lineStyle", "lineCap", "lineOutlineWidth", "lineOutlineColor", "effectiveLineOpacity", "effectiveArrowOpacity", "drawLine", "strokeOpacity", "drawLineOutline", "drawOverlay", "drawUnderlay", "drawArrows", "arrowOpacity", "drawText", "ghostOpacity", "effectiveGhostOpacity", "overlayOrUnderlay", "usePaths", "canvasCxt", "pathCacheHit", "lineDashPattern", "lineDashOffset", "pathCacheKey", "keyMatches", "normal", "triangleHead", "arrowShape", "arrowClearFill", "arrowFill", "pArrowWidth", "arrowWidth", "edgeOpacity", "gco", "fill", "shapeWidth", "canvasContext", "shapeImpl", "cachedPath", "img", "ix", "iy", "iw", "ih", "nodeOpacity", "styleObj", "getIndexedStyle", "repeat", "nodeW", "nodeH", "paddingX2", "nodeTW", "nodeTH", "clip", "shouldClip", "imgOpacity", "imgW", "imgH", "posXUnits", "posXPfVal", "offXUnits", "offXPfVal", "posYUnits", "posYPfVal", "offYUnits", "offYPfVal", "gAlpha", "smoothingEnabled", "isSmoothingSwitched", "computedSize", "minSize", "_label", "srcLabel", "tgtLabel", "applyRotation", "labelStyle", "labelSize", "labelFamily", "labelWeight", "outlineColor", "pdash", "textAngle", "orgTextX", "orgTextY", "textW", "textH", "backgroundOpacity", "borderOpacity", "textBorderWidth", "backgroundPadding", "styleShape", "rounded", "roundRadius", "bgX", "bgY", "bgW", "bgH", "textFill", "textBackgroundColor", "textStroke", "textLineWidth", "textBorderColor", "textBorderStyle", "whiteWidth", "lineWidth", "halfTextW", "eleOpacity", "bgImgProp", "urls", "urlDefined", "numImages", "defd", "bgImgCrossOrigin", "darkness", "bgOpacity", "borderColor", "borderStyle", "borderJoin", "borderCap", "borderPosition", "borderPattern", "borderOffset", "outlineStyle", "setupShapeColor", "bgOpy", "setupBorderColor", "bdrOpy", "setupOutlineColor", "otlnOpy", "getPath", "pathCache", "shapePts", "shapePath", "drawShape", "drawImages", "prevBging", "totalCompleted", "bgContainment", "drawPie", "redrawShape", "pieOpacity", "darken", "darkenOpacity", "drawBorder", "region", "drawOutline", "bWidth", "sWidth", "sHeight", "_path", "outlinePath", "sMult", "_pad", "effGhostOpacity", "cyStyle", "pieSize", "lastPercent", "angleStart", "angleDelta", "angleEnd", "backingStore", "needToCreateCache", "shapeStyleName", "gradientStyle", "_end", "_width", "_height", "hasPositions", "backgroundFill", "backgroundColor", "lineFill", "lineColor", "mbPxRatio", "canvasWidth", "canvasHeight", "canvasContainer", "forcedContext", "drawAllLayers", "drawOnlyNodeLayer", "forcedZoom", "forcedPan", "needDraw", "textureDraw", "motionBlur", "inNodeDragGesture", "motionBlurFadeEffect", "effectiveZoom", "effectivePan", "prevVp", "viewportIsDiff", "mbclear", "setContextTransform", "clear", "ePan", "eZoom", "texture", "outsideBgColor", "outsideBgOpacity", "vpManip", "hideEdges", "needMbClear", "useBuffer", "timeToRender", "fps", "maxFps", "cxtNode", "txtNode", "cxtDrag", "txtDrag", "drawMotionBlur", "txt", "needClear", "pxr", "cornerLength", "barrelCurveConstants", "xPos", "yPos", "rw", "rh", "buffer", "ctrRect", "specdMaxDims", "maxScaleW", "maxScaleH", "buffCanvas", "buffCxt", "zsortedEles", "require_layout_base", "__commonJSMin", "exports", "module", "__name", "root", "factory", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "LayoutConstants", "LGraphObject", "IGeometry", "IMath", "LEdge", "source", "target", "vEdge", "prop", "node", "graph", "otherEnd", "clipPointCoordinates", "vGraphObject", "Integer", "RectangleD", "RandomSeed", "PointD", "LNode", "gm", "loc", "size", "vNode", "width", "height", "upperLeft", "dimension", "cx", "cy", "x", "y", "dx", "dy", "to", "edgeList", "edge", "self", "other", "neighbors", "withNeighborsList", "childNode", "children", "nodes", "i", "noOfChildren", "randomCenterX", "randomCenterY", "minX", "maxX", "minY", "maxY", "childGraph", "trans", "left", "top", "leftTop", "vLeftTop", "pt", "dim", "LGraphManager", "Point", "LinkedList", "LGraph", "parent", "obj2", "vGraph", "obj1", "sourceNode", "targetNode", "newNode", "newEdge", "obj", "edgesToBeRemoved", "s", "index", "sourceIndex", "targetIndex", "nodeTop", "nodeLeft", "margin", "lNode", "recursive", "right", "bottom", "nodeRight", "nodeBottom", "boundingRect", "queue", "visited", "currentNode", "neighborEdges", "currentNeighbor", "childrenOfNode", "neighborEdge", "childrenOfNeighbor", "noOfVisitedInThisGraph", "visitedNode", "layout", "ngraph", "nnode", "newGraph", "parentNode", "sourceGraph", "targetGraph", "lObj", "nodesToBeRemoved", "nodeList", "graphs", "firstNode", "secondNode", "ownerGraph", "sourceAncestorGraph", "targetAncestorGraph", "edges", "firstOwnerGraph", "secondOwnerGraph", "depth", "FDLayoutConstants", "rectA", "rectB", "overlapAmount", "separationBuffer", "directions", "slope", "moveByY", "moveByX", "result", "p1x", "p1y", "p2x", "p2y", "topLeftAx", "topLeftAy", "topRightAx", "bottomLeftAx", "bottomLeftAy", "bottomRightAx", "halfWidthA", "halfHeightA", "topLeftBx", "topLeftBy", "topRightBx", "bottomLeftBx", "bottomLeftBy", "bottomRightBx", "halfWidthB", "halfHeightB", "clipPointAFound", "clipPointBFound", "slopeA", "slopeB", "slopePrime", "cardinalDirectionA", "cardinalDirectionB", "tempPointAx", "tempPointAy", "tempPointBx", "tempPointBy", "line", "s1", "s2", "f1", "f2", "x1", "y1", "x2", "y2", "x3", "y3", "x4", "y4", "a1", "a2", "b1", "b2", "c1", "c2", "denom", "Cx", "Cy", "Nx", "Ny", "C_angle", "p1", "p2", "p3", "p4", "a", "b", "c", "d", "p", "q", "r", "det", "lambda", "gamma", "_createClass", "defineProperties", "props", "descriptor", "Constructor", "protoProps", "staticProps", "_classCallCheck", "instance", "nodeFrom", "add", "prev", "next", "list", "_remove", "vals", "_this", "v", "val", "otherNode", "current", "_typeof", "UniqueIDGeneretor", "id", "arg", "type", "_toConsumableArray", "arr", "arr2", "Transform", "Emitter", "Layout", "isRemoteUse", "isLayoutSuccessfull", "allEdges", "newLeftTop", "flatForest", "isForest", "allNodes", "isFlat", "toBeVisited", "parents", "unProcessedNodes", "temp", "dummyNodes", "dummyNode", "dummyEdge", "k", "lEdge", "path", "ebp", "sliderValue", "defaultValue", "minDiv", "maxMul", "minValue", "maxValue", "removedNodes", "remainingDegrees", "foundCenter", "centerNode", "degree", "tempList", "tempList2", "neighbours", "neighbour", "otherDegree", "newDegree", "wox", "woy", "wex", "wey", "dox", "doy", "dex", "dey", "xDevice", "worldExtX", "yDevice", "worldExtY", "xWorld", "deviceExtX", "yWorld", "deviceExtY", "inPoint", "outPoint", "FDLayout", "lcaDepth", "sizeOfSourceInLca", "sizeOfTargetInLca", "lEdges", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "j", "nodeA", "nodeB", "lNodes", "processedNodeSet", "idealLength", "length", "springForce", "springForceX", "springForceY", "clipPoints", "distanceX", "distanceY", "distanceSquared", "distance", "repulsionForce", "repulsionForceX", "repulsionForceY", "childrenConstant", "ownerCenterX", "ownerCenterY", "absDistanceX", "absDistanceY", "estimatedSize", "converged", "oscilating", "sizeX", "sizeY", "grid", "startX", "finishX", "startY", "finishY", "surrounding", "FDLayoutEdge", "FDLayoutNode", "_startX", "_finishX", "_startY", "_finishY", "DimensionD", "HashMap", "key", "theId", "HashSet", "keys", "Quicksort", "A", "compareFunction", "NeedlemanWunsch", "sequence1", "sequence2", "match_score", "mismatch_penalty", "gap_penalty", "_i", "_j", "_i2", "_j2", "diag", "up", "maxOf", "indices", "inProcessAlignments", "indexes", "array", "layoutBase", "event", "callback", "l", "data", "require_cose_base", "__commonJSMin", "exports", "module", "__name", "root", "factory", "__WEBPACK_EXTERNAL_MODULE_0__", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "FDLayoutConstants", "CoSEConstants", "prop", "FDLayoutEdge", "CoSEEdge", "source", "target", "vEdge", "LGraph", "CoSEGraph", "parent", "graphMgr", "vGraph", "LGraphManager", "CoSEGraphManager", "layout", "FDLayoutNode", "IMath", "CoSENode", "gm", "loc", "size", "vNode", "dX", "dY", "nodes", "node", "i", "pred1", "next", "processed", "FDLayout", "LayoutConstants", "Point", "PointD", "Layout", "Integer", "IGeometry", "Transform", "CoSELayout", "createBendsAsNeeded", "allNodes", "intersection", "x", "forest", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "pData", "rect", "id", "layoutEnded", "nodeList", "graph", "graphs", "edges", "visited", "edge", "edgeList", "k", "multiEdge", "currentStartingPoint", "numberOfColumns", "height", "currentY", "currentX", "point", "tree", "centerNode", "startingPoint", "radialSep", "bounds", "transform", "bottomRight", "parentOfNode", "startAngle", "endAngle", "distance", "radialSeparation", "halfInterval", "nodeAngle", "teta", "cos_teta", "x_", "y_", "neighborEdges", "childCount", "branchCount", "incEdgesCount", "startIndex", "temp", "index", "stepAngle", "currentNeighbor", "childStartAngle", "childEndAngle", "maxDiagonal", "diagonal", "self", "tempMemberGroups", "zeroDegree", "p_id", "dummyCompoundId", "dummyCompound", "dummyParentGraph", "parentGraph", "childGraphMap", "idToNode", "tiledZeroDegreePack", "compoundNode", "lCompoundNode", "horizontalMargin", "verticalMargin", "tiledPack", "childGraph", "children", "theChild", "degree", "child", "organization", "y", "compoundHorizontalMargin", "compoundVerticalMargin", "left", "row", "maxHeight", "j", "lnode", "minWidth", "verticalPadding", "horizontalPadding", "n1", "n2", "lNode", "rowIndex", "minCompoundSize", "secondDimension", "w", "h", "extraHeight", "r", "min", "max", "extraWidth", "sri", "hDiff", "add_to_row_ratio", "add_new_row_ratio", "longest", "last", "diff", "prevTotal", "finalTotal", "prunedNodesAll", "containsLeaf", "prunedNodesInStepTemp", "prunedNodesInStep", "lengthOfPrunedNodesInStep", "nodeData", "gridForPrunedNode", "nodeToConnect", "prunedNode", "startGridX", "finishGridX", "startGridY", "finishGridY", "upNodeCount", "downNodeCount", "rightNodeCount", "leftNodeCount", "controlRegions", "minCount", "minIndex", "random", "coseBase", "require_cytoscape_cose_bilkent", "__commonJSMin", "exports", "module", "__name", "root", "factory", "__WEBPACK_EXTERNAL_MODULE_0__", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "LayoutConstants", "FDLayoutConstants", "CoSEConstants", "CoSELayout", "CoSENode", "PointD", "DimensionD", "defaults", "extend", "options", "obj", "i", "_CoSELayout", "_options", "getUserOptions", "ready", "frameId", "idToLNode", "layout", "self", "gm", "nodes", "edges", "edge", "sourceNode", "targetNode", "e1", "getPositions", "ele", "theId", "lNode", "iterateAnimated", "afterReposition", "ticksPerFrame", "isDone", "animationData", "pNode", "temp", "nodesMap", "roots", "parent", "children", "size", "theChild", "children_of_children", "theNode", "dimensions", "labelWidth", "labelHeight", "labelPos", "theNewGraph", "register", "cytoscape", "insertPolygonShape", "parent", "w", "h", "points", "node", "d", "MAX_SECTIONS", "defaultBkg", "rectBkg", "cloudBkg", "bangBkg", "circleBkg", "hexagonBkg", "roundedRectBkg", "drawNode", "positionNode", "init_svgDraw", "__esmMin", "init_createText", "init_utils", "__name", "db", "elem", "section", "r1", "r2", "r3", "r4", "r", "_db", "m", "fullSection", "conf", "htmlLabels", "nodeElem", "sectionClass", "bkgElem", "textElem", "description", "createText", "bbox", "fontSize", "parseFontSize", "orgHeight", "heightDiff", "dx", "dy", "x", "y", "drawNodes", "db", "svg", "mindmap", "section", "conf", "drawNode", "child", "index", "drawEdges", "edgesEl", "cy", "edge", "id", "data", "bounds", "log", "addNodes", "level", "layoutMindmap", "node", "resolve", "renderEl", "select_default", "cytoscape", "n", "e", "positionNodes", "positionNode", "el", "import_cytoscape_cose_bilkent", "draw", "mindmapRenderer_default", "init_mindmapRenderer", "__esmMin", "init_cytoscape_esm", "init_src", "init_diagramAPI", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "init_svgDraw", "init_defaultConfig", "coseBilkent", "__name", "text", "_version", "diagObj", "mm", "getConfig", "selectSvgElement", "edgesElem", "nodesElem", "setupGraphViewbox", "defaultConfig_default", "genSections", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "options", "sections", "i", "is_dark_default", "lighten_default", "darken_default", "sw", "mindmap_definition_exports", "__export", "diagram", "init_mindmap_definition", "__esmMin", "init_mindmap", "init_mindmapDb", "init_mindmapRenderer", "init_styles", "mindmapDb_default", "mindmapRenderer_default", "mindmap_default", "styles_default", "parser", "sankey_default", "init_sankey", "__esmMin", "o", "__name", "k", "v", "l", "$V0", "$V1", "$V2", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "source", "target", "value", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "links", "nodes", "nodesMap", "clear", "SankeyLink", "addLink", "SankeyNode", "findOrCreateNode", "getNodes", "getLinks", "getGraph", "sankeyDB_default", "init_sankeyDB", "__esmMin", "init_diagramAPI", "init_common", "init_commonDb", "__name", "source", "target", "value", "ID", "common_default", "getConfig", "node", "link", "getAccTitle", "setAccTitle", "getAccDescription", "setAccDescription", "getDiagramTitle", "setDiagramTitle", "max", "values", "valueof", "value", "index", "init_max", "__esmMin", "__name", "min", "values", "valueof", "value", "index", "init_min", "__esmMin", "__name", "sum", "values", "valueof", "value", "index", "init_sum", "__esmMin", "__name", "init_src", "__esmMin", "init_max", "init_min", "init_sum", "targetDepth", "d", "left", "node", "right", "n", "justify", "center", "min", "init_align", "__esmMin", "init_src", "__name", "constant", "x", "init_constant", "__esmMin", "__name", "ascendingSourceBreadth", "a", "b", "ascendingBreadth", "ascendingTargetBreadth", "value", "d", "defaultId", "defaultNodes", "graph", "defaultLinks", "find", "nodeById", "id", "node", "computeLinkBreadths", "nodes", "y0", "y1", "link", "Sankey", "x0", "x1", "dx", "dy", "py", "align", "justify", "sort", "linkSort", "links", "iterations", "sankey", "computeNodeLinks", "computeNodeValues", "computeNodeDepths", "computeNodeHeights", "computeNodeBreadths", "__name", "_", "constant", "i", "source", "target", "sourceLinks", "targetLinks", "sum", "n", "current", "next", "x", "computeNodeLayers", "max", "kx", "columns", "column", "initializeNodeBreadths", "ky", "min", "c", "y", "reorderLinks", "alpha", "beta", "relaxRightToLeft", "relaxLeftToRight", "w", "v", "targetTop", "reorderNodeLinks", "resolveCollisions", "sourceTop", "subject", "resolveCollisionsBottomToTop", "resolveCollisionsTopToBottom", "width", "init_sankey", "__esmMin", "init_src", "init_align", "init_constant", "Path", "path", "pi", "tau", "epsilon", "tauEpsilon", "path_default", "init_path", "__esmMin", "__name", "x", "y", "x1", "y1", "x2", "y2", "r", "x0", "y0", "x21", "y21", "x01", "y01", "l01_2", "x20", "y20", "l21_2", "l20_2", "l21", "l01", "l", "t01", "t21", "a0", "a1", "ccw", "dx", "dy", "cw", "da", "w", "h", "init_src", "__esmMin", "init_path", "constant_default", "x", "__name", "init_constant", "__esmMin", "x", "p", "y", "init_point", "__esmMin", "__name", "slice", "init_array", "__esmMin", "linkSource", "d", "linkTarget", "link", "curve", "source", "target", "x", "y", "context", "buffer", "argv", "slice", "s", "t", "path_default", "__name", "_", "constant_default", "curveHorizontal", "x0", "y0", "x1", "y1", "linkHorizontal", "init_link", "__esmMin", "init_src", "init_array", "init_constant", "init_point", "init_src", "__esmMin", "init_link", "horizontalSource", "d", "horizontalTarget", "sankeyLinkHorizontal_default", "linkHorizontal", "init_sankeyLinkHorizontal", "__esmMin", "init_src", "__name", "init_src", "__esmMin", "init_sankey", "init_align", "init_sankeyLinkHorizontal", "Uid", "init_uid", "__esmMin", "_Uid", "__name", "name", "id", "alignmentsMap", "draw", "sankeyRenderer_default", "init_sankeyRenderer", "__esmMin", "init_diagramAPI", "init_src", "init_setupGraphViewbox", "init_uid", "left", "right", "center", "justify", "__name", "text", "id", "_version", "diagObj", "securityLevel", "conf", "getConfig", "defaultSankeyConfig", "defaultConfig", "sandboxElement", "select_default", "root", "svg", "width", "height", "useMaxWidth", "nodeAlignment", "prefix", "suffix", "showValues", "graph", "nodeAlign", "Sankey", "d", "colorScheme", "ordinal", "Tableau10_default", "Uid", "getText", "value", "link", "linkColor", "gradient", "coloring", "sankeyLinkHorizontal_default", "setupGraphViewbox", "prepareTextForParsing", "init_sankeyUtils", "__esmMin", "__name", "text", "sankeyDiagram_exports", "__export", "diagram", "originalParse", "init_sankeyDiagram", "__esmMin", "init_sankey", "init_sankeyDB", "init_sankeyRenderer", "init_sankeyUtils", "sankey_default", "text", "prepareTextForParsing", "sankeyDB_default", "sankeyRenderer_default", "defaultPacketData", "data", "DEFAULT_PACKET_CONFIG", "getConfig", "getPacket", "pushWord", "clear", "db", "init_db", "__esmMin", "init_config", "init_defaultConfig", "init_utils", "init_commonDb", "defaultConfig_default", "__name", "config", "cleanAndMerge", "word", "setAccTitle", "getAccTitle", "setDiagramTitle", "getDiagramTitle", "getAccDescription", "setAccDescription", "maxPacketSize", "populate", "getNextFittingBlock", "parser", "init_parser", "__esmMin", "init_mermaid_parser_core", "init_logger", "init_populateCommonDb", "init_db", "__name", "ast", "populateCommonDb", "db", "lastByte", "word", "row", "bitsPerRow", "start", "end", "label", "log", "block", "nextBlock", "input", "parse", "draw", "drawWord", "renderer", "init_renderer", "__esmMin", "init_selectSvgElement", "init_setupGraphViewbox", "__name", "_text", "id", "_version", "diagram", "db", "config", "rowHeight", "paddingY", "bitWidth", "bitsPerRow", "words", "title", "totalRowHeight", "svgHeight", "svgWidth", "svg", "selectSvgElement", "configureSvgSize", "word", "packet", "rowNumber", "paddingX", "showBits", "group", "wordY", "block", "blockX", "width", "isSingleBlock", "bitNumberY", "defaultPacketStyleOptions", "styles", "init_styles", "__esmMin", "init_utils", "__name", "packet", "options", "cleanAndMerge", "diagram_exports", "__export", "diagram", "init_diagram", "__esmMin", "init_db", "init_parser", "init_renderer", "init_styles", "parser", "db", "renderer", "styles", "parser", "block_default", "init_block", "__esmMin", "o", "__name", "v", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "num", "spaceId", "edgeData", "id2", "id", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer", "sharedState", "k", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "typeStr2Type", "typeStr", "log", "edgeTypeStr2Type", "edgeStrToEdgeData", "blockDatabase", "edgeList", "edgeCount", "COLOR_KEYWORD", "FILL_KEYWORD", "BG_FILL", "STYLECLASS_SEP", "config", "classes", "sanitizeText", "addStyleClass", "addStyle2Node", "setCssClass", "populateBlockDatabase", "blocks", "rootBlock", "clear", "cnt", "generateId", "setHierarchy", "getColumns", "getBlocksFlat", "getBlocks", "getEdges", "getBlock", "setBlock", "getLogger", "getClasses", "db", "blockDB_default", "init_blockDB", "__esmMin", "init_clone", "init_config", "init_diagramAPI", "init_logger", "init_common", "init_commonDb", "getConfig", "__name", "txt", "common_default", "id", "styleAttributes", "foundClass", "attrib", "fixedAttrib", "newStyle2", "styles", "foundBlock", "itemIds", "cssClassName", "trimmedId", "_blockList", "parent", "blockList", "children", "block", "count", "existingBlock", "w", "j", "newBlock", "clone_default", "blockId", "fade", "getStyles", "styles_default", "init_styles", "__esmMin", "init_dist", "__name", "color", "opacity", "channel", "channel_default", "r", "g", "b", "rgba_default", "options", "calculateBlockPosition", "columns", "position", "px", "py", "setBlockSizes", "block", "db", "siblingWidth", "siblingHeight", "log", "maxWidth", "maxHeight", "child", "childSize", "getMaxChildSize", "padding", "numItems", "xSize", "ySize", "width", "height", "childWidth", "childHeight", "num", "layoutBlocks", "widthOfChildren", "columnPos", "startingPosX", "rowPos", "parent", "halfWidth", "findBounds", "minX", "minY", "maxX", "maxY", "x", "y", "layout", "root", "init_layout", "__esmMin", "init_logger", "init_diagramAPI", "getConfig", "__name", "getNodeFromBlock", "block", "db", "positioned", "vertex", "classStr", "radius", "shape", "padding", "styles", "getStylesFromArray", "vertexText", "bounds", "getConfig", "calculateBlockSize", "elem", "node", "nodeEl", "insertNode", "boundingBox", "obj", "insertBlockPositioned", "positionNode", "performOperations", "blocks", "operation", "calculateBlockSizes", "insertBlocks", "insertEdges", "edges", "id", "g", "Graph", "edge", "startBlock", "endBlock", "start", "end", "points", "insertEdge", "insertEdgeLabel", "positionEdgeLabel", "init_renderHelpers", "__esmMin", "init_graphlib", "init_config", "init_edges", "init_nodes", "init_utils", "__name", "getClasses", "draw", "blockRenderer_default", "init_blockRenderer", "__esmMin", "init_src", "init_config", "init_markers", "init_logger", "init_setupGraphViewbox", "init_layout", "init_renderHelpers", "__name", "text", "diagObj", "id", "_version", "securityLevel", "conf", "getConfig", "db", "sandboxElement", "select_default", "root", "svg", "markers_default", "bl", "blArr", "edges", "nodes", "calculateBlockSizes", "bounds", "layout", "insertBlocks", "insertEdges", "bounds2", "magicFactor", "height", "width", "useMaxWidth", "configureSvgSize", "log", "blockDiagram_exports", "__export", "diagram", "init_blockDiagram", "__esmMin", "init_block", "init_blockDB", "init_styles", "init_blockRenderer", "block_default", "blockDB_default", "blockRenderer_default", "styles_default", "mermaid_exports", "__export", "mermaid_default", "init_esm", "init_detectType", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "c4Detector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "flowDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "flowDetector_v2_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "erDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "gitGraphDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "ganttDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "info", "id", "detector", "__name", "txt", "loader", "diagram", "pie", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "quadrantDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "xychartDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "requirementDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "sequenceDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "classDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "classDetector_V2_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "stateDetector_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "stateDetector_V2_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "journeyDetector_default", "init_logger", "init_selectSvgElement", "init_setupGraphViewbox", "draw", "__name", "_text", "id", "version", "log", "svg", "selectSvgElement", "g", "configureSvgSize", "renderer", "errorRenderer_default", "diagram", "renderer", "__name", "errorDiagram_default", "id", "detector", "__name", "txt", "config", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "detector_default", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "sankeyDetector_default", "id", "detector", "__name", "txt", "loader", "diagram", "packet", "id", "detector", "__name", "txt", "loader", "diagram", "plugin", "blockDetector_default", "init_detectType", "init_diagramAPI", "hasLoadedDiagrams", "addDiagrams", "__name", "registerDiagram", "errorDiagram_default", "text", "registerLazyLoadedDiagrams", "c4Detector_default", "classDetector_V2_default", "classDetector_default", "erDetector_default", "ganttDetector_default", "info", "pie", "requirementDetector_default", "sequenceDetector_default", "detector_default", "flowDetector_v2_default", "flowDetector_default", "gitGraphDetector_default", "stateDetector_V2_default", "stateDetector_default", "journeyDetector_default", "quadrantDetector_default", "sankeyDetector_default", "packet", "xychartDetector_default", "blockDetector_default", "init_logger", "init_detectType", "init_diagramAPI", "loadRegisteredDiagrams", "__name", "log", "failed", "detectors", "key", "detector", "loader", "getDiagram", "diagram", "id", "registerDiagram", "err", "result", "res", "init_logger", "init_src", "COMMENT", "RULESET", "DECLARATION", "IMPORT", "KEYFRAMES", "LAYER", "abs", "from", "trim", "value", "__name", "replace", "value", "pattern", "replacement", "__name", "indexof", "search", "position", "charat", "index", "substr", "begin", "end", "strlen", "sizeof", "append", "array", "line", "column", "length", "position", "character", "characters", "node", "value", "root", "parent", "type", "props", "children", "siblings", "__name", "char", "character", "__name", "prev", "position", "charat", "characters", "column", "line", "next", "length", "peek", "caret", "slice", "begin", "end", "substr", "token", "type", "alloc", "value", "strlen", "dealloc", "delimit", "trim", "delimiter", "whitespace", "type", "character", "peek", "next", "token", "__name", "escaping", "index", "count", "next", "character", "slice", "caret", "peek", "__name", "delimiter", "type", "position", "commenter", "from", "identifier", "token", "compile", "value", "dealloc", "parse", "alloc", "__name", "root", "parent", "rule", "rules", "rulesets", "pseudo", "points", "declarations", "index", "offset", "length", "atrule", "property", "previous", "variable", "scanning", "ampersand", "character", "type", "props", "children", "reference", "characters", "next", "charat", "indexof", "replace", "delimit", "abs", "whitespace", "escaping", "caret", "peek", "append", "comment", "commenter", "strlen", "declaration", "ruleset", "prev", "from", "identifier", "siblings", "post", "size", "sizeof", "i", "j", "k", "x", "y", "substr", "z", "trim", "node", "RULESET", "COMMENT", "char", "DECLARATION", "serialize", "children", "callback", "output", "i", "__name", "stringify", "element", "index", "LAYER", "IMPORT", "DECLARATION", "COMMENT", "KEYFRAMES", "RULESET", "strlen", "init_package", "init_config", "init_config", "init_diagramAPI", "init_detectType", "init_errors", "init_utils", "Diagram", "_Diagram", "type", "text", "db", "parser", "renderer", "__name", "metadata", "config", "getConfig", "detectType", "encodeEntities", "getDiagram", "loader", "getDiagramLoader", "UnknownDiagramError", "id", "diagram", "registerDiagram", "init", "version", "interactionFunctions", "attachFunctions", "__name", "interactionFunctions", "f", "init_logger", "init_styles", "init_themes", "import_dompurify", "init_common", "init_isEmpty", "SVG_ROLE", "setA11yDiagramInfo", "svg", "diagramType", "__name", "addSVGa11yTitleDescription", "a11yTitle", "a11yDesc", "baseId", "descId", "titleId", "cleanupComments", "__name", "text", "init_regexes", "isNothing", "subject", "__name", "isObject", "toArray", "sequence", "extend", "target", "source", "index", "length", "key", "sourceKeys", "repeat", "string", "count", "result", "cycle", "isNegativeZero", "number", "isNothing_1", "isObject_1", "toArray_1", "repeat_1", "isNegativeZero_1", "extend_1", "common", "formatError", "exception", "compact", "where", "message", "YAMLException$1", "reason", "mark", "getLine", "buffer", "lineStart", "lineEnd", "position", "maxLineLength", "head", "tail", "maxHalfLength", "padStart", "max", "makeSnippet", "options", "re", "lineStarts", "lineEnds", "match", "foundLineNo", "i", "line", "lineNoLength", "snippet", "TYPE_CONSTRUCTOR_OPTIONS", "YAML_NODE_KINDS", "compileStyleAliases", "map", "style", "alias", "Type$1", "tag", "name", "data", "type", "compileList", "schema", "currentType", "newIndex", "previousType", "previousIndex", "compileMap", "collectType", "Schema$1", "definition", "implicit", "explicit", "type$1", "str", "seq", "failsafe", "resolveYamlNull", "constructYamlNull", "isNull", "object", "_null", "resolveYamlBoolean", "constructYamlBoolean", "isBoolean", "bool", "isHexCode", "c", "isOctCode", "isDecCode", "resolveYamlInteger", "hasDigits", "ch", "constructYamlInteger", "value", "sign", "isInteger", "int", "obj", "YAML_FLOAT_PATTERN", "resolveYamlFloat", "constructYamlFloat", "SCIENTIFIC_WITHOUT_DOT", "representYamlFloat", "res", "isFloat", "float", "json", "core", "YAML_DATE_REGEXP", "YAML_TIMESTAMP_REGEXP", "resolveYamlTimestamp", "constructYamlTimestamp", "year", "month", "day", "hour", "minute", "second", "fraction", "delta", "tz_hour", "tz_minute", "date", "representYamlTimestamp", "timestamp", "resolveYamlMerge", "merge", "BASE64_MAP", "resolveYamlBinary", "code", "idx", "bitlen", "constructYamlBinary", "tailbits", "input", "bits", "representYamlBinary", "isBinary", "binary", "_hasOwnProperty$3", "_toString$2", "resolveYamlOmap", "objectKeys", "pair", "pairKey", "pairHasKey", "constructYamlOmap", "omap", "_toString$1", "resolveYamlPairs", "keys", "constructYamlPairs", "pairs", "_hasOwnProperty$2", "resolveYamlSet", "constructYamlSet", "set", "_default", "_hasOwnProperty$1", "CONTEXT_FLOW_IN", "CONTEXT_FLOW_OUT", "CONTEXT_BLOCK_IN", "CONTEXT_BLOCK_OUT", "CHOMPING_CLIP", "CHOMPING_STRIP", "CHOMPING_KEEP", "PATTERN_NON_PRINTABLE", "PATTERN_NON_ASCII_LINE_BREAKS", "PATTERN_FLOW_INDICATORS", "PATTERN_TAG_HANDLE", "PATTERN_TAG_URI", "_class", "is_EOL", "is_WHITE_SPACE", "is_WS_OR_EOL", "is_FLOW_INDICATOR", "fromHexCode", "lc", "escapedHexLen", "fromDecimalCode", "simpleEscapeSequence", "charFromCodepoint", "simpleEscapeCheck", "simpleEscapeMap", "State$1", "generateError", "state", "throwError", "throwWarning", "directiveHandlers", "args", "major", "minor", "handle", "prefix", "captureSegment", "start", "end", "checkJson", "_position", "_length", "_character", "_result", "mergeMappings", "destination", "overridableKeys", "quantity", "storeMappingPair", "keyTag", "keyNode", "valueNode", "startLine", "startLineStart", "startPos", "readLineBreak", "skipSeparationSpace", "allowComments", "checkIndent", "lineBreaks", "testDocumentSeparator", "writeFoldedLines", "readPlainScalar", "nodeIndent", "withinFlowCollection", "preceding", "following", "captureStart", "captureEnd", "hasPendingContent", "_line", "_lineStart", "_lineIndent", "_kind", "readSingleQuotedScalar", "readDoubleQuotedScalar", "hexLength", "hexResult", "tmp", "readFlowCollection", "readNext", "_pos", "_tag", "_anchor", "terminator", "isPair", "isExplicitPair", "isMapping", "composeNode", "readBlockScalar", "folding", "chomping", "didReadContent", "detectedIndent", "textIndent", "emptyLines", "atMoreIndented", "readBlockSequence", "detected", "readBlockMapping", "flowIndent", "allowCompact", "_keyLine", "_keyLineStart", "_keyPos", "atExplicitKey", "readTagProperty", "isVerbatim", "isNamed", "tagHandle", "tagName", "readAnchorProperty", "readAlias", "parentIndent", "nodeContext", "allowToSeek", "allowBlockStyles", "allowBlockScalars", "allowBlockCollections", "indentStatus", "atNewLine", "hasContent", "typeIndex", "typeQuantity", "typeList", "blockIndent", "readDocument", "documentStart", "directiveName", "directiveArgs", "hasDirectives", "loadDocuments", "nullpos", "loadAll$1", "iterator", "documents", "load$1", "loadAll_1", "load_1", "loader", "_toString", "_hasOwnProperty", "CHAR_BOM", "CHAR_TAB", "CHAR_LINE_FEED", "CHAR_CARRIAGE_RETURN", "CHAR_SPACE", "CHAR_EXCLAMATION", "CHAR_DOUBLE_QUOTE", "CHAR_SHARP", "CHAR_PERCENT", "CHAR_AMPERSAND", "CHAR_SINGLE_QUOTE", "CHAR_ASTERISK", "CHAR_COMMA", "CHAR_MINUS", "CHAR_COLON", "CHAR_EQUALS", "CHAR_GREATER_THAN", "CHAR_QUESTION", "CHAR_COMMERCIAL_AT", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "CHAR_GRAVE_ACCENT", "CHAR_LEFT_CURLY_BRACKET", "CHAR_VERTICAL_LINE", "CHAR_RIGHT_CURLY_BRACKET", "ESCAPE_SEQUENCES", "DEPRECATED_BOOLEANS_SYNTAX", "DEPRECATED_BASE60_SYNTAX", "compileStyleMap", "encodeHex", "character", "QUOTING_TYPE_SINGLE", "QUOTING_TYPE_DOUBLE", "State", "indentString", "spaces", "ind", "next", "generateNextLine", "level", "testImplicitResolving", "isWhitespace", "isPrintable", "isNsCharOrWhitespace", "isPlainSafe", "prev", "inblock", "cIsNsCharOrWhitespace", "cIsNsChar", "isPlainSafeFirst", "isPlainSafeLast", "codePointAt", "pos", "first", "needIndentIndicator", "leadingSpaceRe", "STYLE_PLAIN", "STYLE_SINGLE", "STYLE_LITERAL", "STYLE_FOLDED", "STYLE_DOUBLE", "chooseScalarStyle", "singleLineOnly", "indentPerLevel", "lineWidth", "testAmbiguousType", "quotingType", "forceQuotes", "char", "prevChar", "hasLineBreak", "hasFoldableLine", "shouldTrackWidth", "previousLineBreak", "plain", "writeScalar", "iskey", "indent", "testAmbiguity", "blockHeader", "dropEndingNewline", "foldString", "escapeString", "indentIndicator", "clip", "keep", "chomp", "width", "lineRe", "nextLF", "foldLine", "prevMoreIndented", "moreIndented", "breakRe", "curr", "escapeSeq", "writeFlowSequence", "writeNode", "writeBlockSequence", "writeFlowMapping", "objectKeyList", "objectKey", "objectValue", "pairBuffer", "writeBlockMapping", "explicitPair", "detectType", "block", "isblockseq", "tagStr", "objectOrArray", "duplicateIndex", "duplicate", "getDuplicateReferences", "objects", "duplicatesIndexes", "inspectNode", "dump$1", "dump_1", "dumper", "renamed", "from", "to", "JSON_SCHEMA", "json", "load", "loader", "loadAll", "dump", "dumper", "safeLoad", "renamed", "safeLoadAll", "safeDump", "extractFrontMatter", "text", "matches", "frontMatterRegex", "parsed", "load", "JSON_SCHEMA", "metadata", "__name", "init_utils", "cleanupText", "__name", "code", "match", "tag", "attributes", "processFrontmatter", "text", "metadata", "extractFrontMatter", "displayMode", "title", "config", "processDirectives", "initDirective", "utils_default", "wrapDirectives", "type", "removeDirectives", "preprocessDiagram", "cleanedCode", "frontMatterResult", "directiveResult", "cleanAndMerge", "cleanupComments", "init_utils", "toBase64", "str", "utf8Bytes", "utf8Str", "byte", "__name", "init_assignWithDepth", "MAX_TEXTLENGTH", "MAX_TEXTLENGTH_EXCEEDED_MSG", "SECURITY_LVL_SANDBOX", "SECURITY_LVL_LOOSE", "XMLNS_SVG_STD", "XMLNS_XLINK_STD", "XMLNS_XHTML_STD", "IFRAME_WIDTH", "IFRAME_HEIGHT", "IFRAME_STYLES", "IFRAME_BODY_STYLE", "IFRAME_SANDBOX_OPTS", "IFRAME_NOT_SUPPORTED_MSG", "DOMPURIFY_TAGS", "DOMPURIFY_ATTR", "processAndSetConfigs", "text", "processed", "preprocessDiagram", "reset", "addDirective", "__name", "parse", "parseOptions", "addDiagrams", "code", "getDiagramFromText", "error", "cssImportantStyles", "cssClass", "element", "cssClasses", "createCssStyles", "config", "classDefs", "cssStyles", "cssElements", "styleClassDef", "isEmpty_default", "cssElement", "s", "createUserStyles", "graphType", "svgId", "userCSSstyles", "allStyles", "styles_default", "serialize", "compile", "stringify", "cleanUpSvgCode", "svgCode", "inSandboxMode", "useArrowMarkerUrls", "cleanedUpSvg", "decodeEntities", "putIntoIFrame", "svgElement", "height", "base64encodedSrc", "toBase64", "appendDivSvgG", "parentRoot", "id", "enclosingDivId", "divStyle", "svgXlink", "enclosingDiv", "svgNode", "sandboxedIframe", "parentNode", "iFrameId", "removeExistingElements", "doc", "divId", "render", "svgContainingElement", "getConfig", "log", "idSelector", "iFrameID", "iFrameID_selector", "enclosingDivID", "enclosingDivID_selector", "removeTempElements", "node", "select_default", "isSandboxed", "root", "isLooseSecurityLevel", "fontFamily", "iframe", "diag", "parseEncounteredException", "Diagram", "diagramType", "svg", "firstChild", "diagramClassDefs", "rules", "style1", "version", "e", "errorRenderer_default", "a11yTitle", "a11yDescr", "addA11yInfo", "evaluate", "svgEl", "DOMPurify", "attachFunctions", "initialize", "userOptions", "options", "assignWithDepth_default", "saveConfigFromInitialize", "themes_default", "setSiteConfig", "getSiteConfig", "setLogLevel", "metadata", "setA11yDiagramInfo", "addSVGa11yTitleDescription", "mermaidAPI", "setConfig", "updateSiteConfig", "defaultConfig", "init_render", "init_utils", "handleError", "__name", "error", "errors", "parseError", "log", "isDetailedError", "run", "options", "runThrowsErrors", "mermaid", "postRenderCallback", "querySelector", "nodes", "conf", "mermaidAPI", "nodesToProcess", "idGenerator", "utils_default", "txt", "element", "id", "dedent", "init", "svg", "bindFunctions", "render", "initialize", "config", "callback", "runOptions", "registerExternalDiagrams", "diagrams", "lazyLoad", "addDiagrams", "registerLazyLoadedDiagrams", "loadRegisteredDiagrams", "contentLoaded", "startOnLoad", "err", "setParseErrorHandler", "parseErrorHandler", "executionQueue", "executionQueueRunning", "executeQueue", "f", "parse", "text", "parseOptions", "resolve", "reject", "performCall", "res", "rej", "r", "e", "container", "registerLayoutLoaders", "detectType", "mermaid_default"] +} diff --git a/doc/conf.py b/doc/conf.py index 3c6cf492a..433a2408f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -170,6 +170,11 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +mermaid_version = "" +html_js_files = [ + "js/mermaid.min.js", +] + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' From 4538bf7584469e61ff35219de138149d6fd5d86a Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 09:49:20 +0200 Subject: [PATCH 28/49] tests: move fixtures in TestUserCreation to the bottom The first thing one should see is the actual test, not details regarding the setup. This follows the general suggestion to place the high-level functions on the top, and the functions which are dependencies more towards the bottom. --- tests/lib/user/test_create_user.py | 68 +++++++++++++++--------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/lib/user/test_create_user.py b/tests/lib/user/test_create_user.py index c849a9085..a059f3e74 100644 --- a/tests/lib/user/test_create_user.py +++ b/tests/lib/user/test_create_user.py @@ -26,40 +26,6 @@ class UserData: class TestUserCreation: - @pytest.fixture(scope="class") - def member_group(self, class_session): - return factories.property.MemberPropertyGroupFactory.create() - - @pytest.fixture(scope="class") - def room(self, class_session): - return factories.RoomFactory.create(patched_with_subnet=True) - - @pytest.fixture(scope="class") - def user_data(self) -> UserData: - return UserData( - name="Hans", - login="hans66", - email="hans@hans.de", - mac="12:11:11:11:11:11", - birthdate=date.fromisoformat("1990-01-01"), - ) - - @pytest.fixture(scope="class", autouse=True) - def new_user(self, class_session, user_data, room, processor, member_group): - from unittest.mock import patch - - with patch("pycroft.lib.user.user_send_mails"): - new_user, _ = create_user( - user_data.name, - user_data.login, - user_data.email, - user_data.birthdate, - processor=processor, - groups=(member_group,), - address=room.address, - ) - return new_user - def test_user_base_data(self, new_user, user_data, room): assert new_user.name == user_data.name assert new_user.login == user_data.login @@ -106,3 +72,37 @@ def test_mail_content(self, processor, member_group, room, mail_capture): ) assert_mail_reasonable(assert_one(mail_capture), subject_re="Willkommen") + + @pytest.fixture(scope="class") + def member_group(self, class_session): + return factories.property.MemberPropertyGroupFactory.create() + + @pytest.fixture(scope="class") + def room(self, class_session): + return factories.RoomFactory.create(patched_with_subnet=True) + + @pytest.fixture(scope="class") + def user_data(self) -> UserData: + return UserData( + name="Hans", + login="hans66", + email="hans@hans.de", + mac="12:11:11:11:11:11", + birthdate=date.fromisoformat("1990-01-01"), + ) + + @pytest.fixture(scope="class", autouse=True) + def new_user(self, class_session, user_data, room, processor, member_group): + from unittest.mock import patch + + with patch("pycroft.lib.user.user_send_mails"): + new_user, _ = create_user( + user_data.name, + user_data.login, + user_data.email, + user_data.birthdate, + processor=processor, + groups=(member_group,), + address=room.address, + ) + return new_user From f6a6bc9bed9ea77bb10e47342c82f5271c873a68 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 13:20:43 +0200 Subject: [PATCH 29/49] Provide separate function for login hash calculation --- pycroft/helpers/user.py | 6 ++++++ tests/model/test_unix_tombstone.py | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pycroft/helpers/user.py b/pycroft/helpers/user.py index e02a1473f..3d8d1c75f 100644 --- a/pycroft/helpers/user.py +++ b/pycroft/helpers/user.py @@ -8,6 +8,7 @@ import random import string import typing as t +from hashlib import sha512 from passlib.apps import ldap_context from passlib.context import CryptContext @@ -66,6 +67,11 @@ def verify_password(plaintext_password: str, hash: str) -> bool: return False +def login_hash(login: str) -> bytes: + """Hashes a login with sha512, as is done in the `User.login_hash` generated column.""" + return sha512(login.encode()).digest() + + def generate_random_str(length: int) -> str: """ Generates an aplhanumeric random string diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index 890adf9e5..6b8b3d997 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -3,22 +3,21 @@ # the Apache License, Version 2.0. See the LICENSE file for details import typing as t from contextlib import contextmanager -from hashlib import sha512 import pytest from sqlalchemy import inspect, update, text from sqlalchemy.exc import IntegrityError from sqlalchemy.orm import Session +from pycroft.helpers.user import login_hash from pycroft.model.user import User from pycroft.model.unix_account import UnixTombstone, UnixAccount from tests import factories as f -L_HASH: bytes = sha512(b"mylogin").digest() +L_HASH: bytes = login_hash("mylogin") -@pytest.mark.meta def test_login_hash_correct(session): user = f.UserFactory(login="mylogin") assert user.login_hash == L_HASH @@ -57,7 +56,7 @@ def test_valid_tombstone_combinations(session: Session): for h, uid in ( (None, 10000), (L_HASH, None), - (sha512(b"login2").digest(), 10001), + (login_hash("login2"), 10001), (None, 20000), ) ) @@ -140,7 +139,7 @@ def test_user_login_change_works_when_changing_tombstone(self, session, user): def test_user_login_change_fails_when_creating_new_tombstone(self, session, user): login_new = user.login + "_" - hash_hew: bytes = sha512(login_new.encode()).digest() + hash_hew: bytes = login_hash(login_new) MATCH_RE = "User tombstone.*and unix account tombstone.*differ" with ( pytest.raises(IntegrityError, match=MATCH_RE), From 32658bc8d55f68d1bd0bbb154925bd6acb15dd09 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 13:48:24 +0200 Subject: [PATCH 30/49] Add function checking for login availability --- pycroft/lib/user.py | 31 +++++++++++++++++++---- tests/lib/user/test_login_availability.py | 25 ++++++++++++++++++ 2 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 tests/lib/user/test_login_availability.py diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index cf4ecd27f..cbce05600 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -17,7 +17,7 @@ from difflib import SequenceMatcher from collections.abc import Iterable -from sqlalchemy import func, select, Boolean, String, ColumnElement, ScalarResult +from sqlalchemy import exists, func, select, Boolean, String, ColumnElement, ScalarResult from sqlalchemy.orm import Session from pycroft import config, property @@ -26,7 +26,7 @@ from pycroft.helpers.i18n import deferred_gettext from pycroft.helpers.interval import closed, Interval, starting_from from pycroft.helpers.printing import generate_user_sheet as generate_pdf -from pycroft.helpers.user import generate_random_str +from pycroft.helpers.user import generate_random_str, login_hash from pycroft.helpers.utc import DateTimeTz from pycroft.lib.address import get_or_create_address from pycroft.lib.exc import PycroftLibException @@ -62,7 +62,7 @@ PropertyGroup, Membership, ) -from pycroft.model.unix_account import UnixAccount +from pycroft.model.unix_account import UnixAccount, UnixTombstone from pycroft.model.webstorage import WebStorage from pycroft.task import send_mails_async @@ -274,9 +274,15 @@ def create_user( :param passwd_hash: Use password hash instead of generating a new password :param send_confirm_mail: If a confirmation mail should be send to the user :return: + + :raises LoginTakenException: if the login is used or has been used in the past """ now = session.utcnow() + + if not login_available(login, session.session): + raise LoginTakenException(login) + plain_password: str | None = user_helper.generate_password(12) # create a new user new_user = User( @@ -321,6 +327,20 @@ def create_user( return new_user, plain_password +def login_available(login: str, session: Session) -> bool: + """Check whether there is a tombstone with the hash of the given login""" + hash = login_hash(login) + stmt = select( + ~exists( + select() + .select_from(UnixTombstone) + .filter(UnixTombstone.login_hash == hash) + .add_columns(1) + ) + ) + return session.scalar(stmt) + + @with_transaction def move_in( user: User, @@ -1139,8 +1159,9 @@ def send_confirmation_email(user: BaseUser) -> None: class LoginTakenException(PycroftLibException): - def __init__(self) -> None: - super().__init__("Login already taken") + def __init__(self, login: str | None = None) -> None: + msg = "Login already taken" if not login else f"Login {login!r} already taken" + super().__init__(msg) class EmailTakenException(PycroftLibException): diff --git a/tests/lib/user/test_login_availability.py b/tests/lib/user/test_login_availability.py new file mode 100644 index 000000000..5c1944122 --- /dev/null +++ b/tests/lib/user/test_login_availability.py @@ -0,0 +1,25 @@ +import pytest + +from pycroft.helpers.user import login_hash +from pycroft.lib.user import login_available +from pycroft.model.unix_account import UnixTombstone + + +def test_login_reuse_present(session, processor): + assert not login_available(processor.login, session) + + +LOGIN = "taken" + + +def test_login_reuse_past(session, tombstone): + assert not login_available(LOGIN, session) + assert login_available(f"not-{LOGIN}", session) + + +@pytest.fixture(scope="module") +def tombstone(module_session) -> UnixTombstone: + ts = UnixTombstone(login_hash=login_hash(LOGIN)) + with module_session.begin_nested(): + module_session.add(ts) + return ts From 2305d6fa94ea092ff9ea990111768f87f4b0035d Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 13:59:17 +0200 Subject: [PATCH 31/49] qa: Use backref instead of custom query --- pycroft/lib/user.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index cbce05600..3e20d54ff 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1190,18 +1190,16 @@ def __init__(self) -> None: def get_similar_users_in_room(name: str, room: Room, ratio: float = 0.75) -> list[User]: - """ - Get users with a 75% name match already exists in the room + """Get inhabitants of a room with a name similar to the given name. + + Eagerloading hints: + - `room.users` """ if room is None: return [] - return [ - user - for user in (User.q.filter_by(room=room).all()) - if SequenceMatcher(None, name, user.name).ratio() > ratio - ] + return [user for user in room.users if SequenceMatcher(None, name, user.name).ratio() > ratio] def check_similar_user_in_room(name: str, room: Room) -> None: @@ -1209,7 +1207,7 @@ def check_similar_user_in_room(name: str, room: Room) -> None: Raise an error if an user with a 75% name match already exists in the room """ - if len(get_similar_users_in_room(name, room)) > 0: + if get_similar_users_in_room(name, room): raise UserExistsInRoomException From 3d25a38d67be0552513a4c24f7c25924a89493de Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 14:12:38 +0200 Subject: [PATCH 32/49] Reorder checks in `check_user_data` --- pycroft/lib/user.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index 3e20d54ff..7e99df211 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1231,28 +1231,25 @@ def check_new_user_data( ignore_similar_name: bool = False, allow_existing: bool = False, ) -> None: - user_swdd_person_id = get_user_by_swdd_person_id(swdd_person_id) + if room is not None and not ignore_similar_name: + check_similar_user_in_room(name, room) + if move_in_date is not None: + if move_in_date > (session.utcnow() + timedelta(days=180)).date() or move_in_date < session.utcnow().date(): + raise MoveInDateInvalidException + + user_swdd_person_id = get_user_by_swdd_person_id(swdd_person_id) if user_swdd_person_id and not allow_existing: raise UserExistsException user_login = User.q.filter_by(login=login).first() - if user_login is not None and not allow_existing: raise LoginTakenException user_email = User.q.filter_by(email=email).first() - if user_email is not None and not allow_existing: raise EmailTakenException - if room is not None and not ignore_similar_name: - check_similar_user_in_room(name, room) - - if move_in_date is not None: - if move_in_date > (session.utcnow() + timedelta(days=180)).date() or move_in_date < session.utcnow().date(): - raise MoveInDateInvalidException - @with_transaction def create_member_request( From 3afcb3f35cfae54cf06b10b559f2054a5cc62195 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 14:22:41 +0200 Subject: [PATCH 33/49] qa: Improve readability of move_in_date check --- pycroft/lib/user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index 7e99df211..0a9c8c0d7 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1235,7 +1235,8 @@ def check_new_user_data( check_similar_user_in_room(name, room) if move_in_date is not None: - if move_in_date > (session.utcnow() + timedelta(days=180)).date() or move_in_date < session.utcnow().date(): + utcnow = session.utcnow() + if not utcnow.date() <= move_in_date <= (utcnow + timedelta(days=180)).date(): raise MoveInDateInvalidException user_swdd_person_id = get_user_by_swdd_person_id(swdd_person_id) From 2b07ce9ad7f66cf9776c8841ef80bfb8623117b6 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 14:24:47 +0200 Subject: [PATCH 34/49] qa: Group similar user data checks --- pycroft/lib/user.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index 0a9c8c0d7..8f3eead0b 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1239,16 +1239,28 @@ def check_new_user_data( if not utcnow.date() <= move_in_date <= (utcnow + timedelta(days=180)).date(): raise MoveInDateInvalidException + if not allow_existing: + check_new_user_data_unused(login=login, email=email, swdd_person_id=swdd_person_id) + + +def check_new_user_data_unused(login: str, email: str, swdd_person_id: int) -> None: + """Check whether some user data from a member request is already used. + + :raises UserExistsException: + :raises LoginTakenException: + :raises EmailTakenException: + """ user_swdd_person_id = get_user_by_swdd_person_id(swdd_person_id) - if user_swdd_person_id and not allow_existing: + if user_swdd_person_id: raise UserExistsException + # This is broken: add test to verify! user_login = User.q.filter_by(login=login).first() - if user_login is not None and not allow_existing: + if user_login is not None: raise LoginTakenException user_email = User.q.filter_by(email=email).first() - if user_email is not None and not allow_existing: + if user_email is not None: raise EmailTakenException From 6d6cfe3a85fee1d254fad5017daa773eb9f4cf03 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 14:49:07 +0200 Subject: [PATCH 35/49] Remove behavior-changing parameter `allow_existing` --- pycroft/lib/user.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index 8f3eead0b..a171432c9 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1229,7 +1229,6 @@ def check_new_user_data( room: Room | None, move_in_date: date | None, ignore_similar_name: bool = False, - allow_existing: bool = False, ) -> None: if room is not None and not ignore_similar_name: check_similar_user_in_room(name, room) @@ -1239,9 +1238,6 @@ def check_new_user_data( if not utcnow.date() <= move_in_date <= (utcnow + timedelta(days=180)).date(): raise MoveInDateInvalidException - if not allow_existing: - check_new_user_data_unused(login=login, email=email, swdd_person_id=swdd_person_id) - def check_new_user_data_unused(login: str, email: str, swdd_person_id: int) -> None: """Check whether some user data from a member request is already used. @@ -1283,8 +1279,9 @@ def create_member_request( swdd_person_id, room, move_in_date, - allow_existing=previous_dorm is not None, ) + if previous_dorm is None: + check_new_user_data_unused(login=login, email=email, swdd_person_id=swdd_person_id) if swdd_person_id is not None and room is not None: tenancies = get_relevant_tenancies(swdd_person_id) From 3a6c9bf2a9642d8824f4422392afe1a4b0702ed1 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 14:51:24 +0200 Subject: [PATCH 36/49] qa: Extract use of `session.utcnow()` --- pycroft/lib/user.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index a171432c9..75f5da359 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1312,8 +1312,10 @@ def finish_member_request( if prm.room is None: raise ValueError("Room is None") - if prm.move_in_date is not None and prm.move_in_date < session.utcnow().date(): - prm.move_in_date = session.utcnow().date() + utcnow = session.utcnow() + + if prm.move_in_date is not None and prm.move_in_date < utcnow.date(): + prm.move_in_date = utcnow.date() check_new_user_data(prm.login, prm.email, prm.name, prm.swdd_person_id, prm.room, prm.move_in_date, ignore_similar_name) @@ -1334,9 +1336,8 @@ def finish_member_request( message = deferred_gettext("Created from registration {}.").format(str(prm.id)).to_json() log_user_event(message, processor, user) - if move_in_datetime > session.utcnow(): - make_member_of(user, config.pre_member_group, processor, - closed(session.utcnow(), None)) + if move_in_datetime > utcnow: + make_member_of(user, config.pre_member_group, processor, closed(utcnow, None)) session.session.delete(prm) From 1b607e39bc11bacd79a5b0df86f5052a3edaddff Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 14:58:13 +0200 Subject: [PATCH 37/49] qa: extract `user_from_pre_member` --- pycroft/lib/user.py | 46 ++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index 75f5da359..bf94cfcad 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1320,21 +1320,18 @@ def finish_member_request( check_new_user_data(prm.login, prm.email, prm.name, prm.swdd_person_id, prm.room, prm.move_in_date, ignore_similar_name) - user, _ = create_user(prm.name, prm.login, prm.email, prm.birthdate, groups=[], - processor=processor, address=prm.room.address, passwd_hash=prm.passwd_hash) - - processor = processor if processor is not None else user - - user.swdd_person_id = prm.swdd_person_id - user.email_confirmed = prm.email_confirmed + user = user_from_pre_member(prm, processor=processor) move_in_datetime = utc.with_min_time(prm.move_in_date) - - move_in(user, prm.room.building_id, prm.room.level, prm.room.number, None, - processor if processor is not None else user, when=move_in_datetime) - - message = deferred_gettext("Created from registration {}.").format(str(prm.id)).to_json() - log_user_event(message, processor, user) + move_in( + user, + prm.room.building_id, + prm.room.level, + prm.room.number, + None, + processor if processor is not None else user, + when=move_in_datetime, + ) if move_in_datetime > utcnow: make_member_of(user, config.pre_member_group, processor, closed(utcnow, None)) @@ -1344,6 +1341,29 @@ def finish_member_request( return user +def user_from_pre_member(pre_member: PreMember, processor: User) -> User: + user, _ = create_user( + pre_member.name, + pre_member.login, + pre_member.email, + pre_member.birthdate, + groups=[], + processor=processor, + address=pre_member.room.address, + passwd_hash=pre_member.passwd_hash, + ) + + processor = processor if processor is not None else user + + user.swdd_person_id = pre_member.swdd_person_id + user.email_confirmed = pre_member.email_confirmed + + message = deferred_gettext("Created from registration {}.").format(str(pre_member.id)).to_json() + log_user_event(message, processor, user) + return user + + + @with_transaction def confirm_mail_address( key: str, From ebe6fb8672cfc40f17467943f04e4f749e57e252 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 15:10:28 +0200 Subject: [PATCH 38/49] Expand tombstone tests --- tests/lib/user/test_login_availability.py | 35 +++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/tests/lib/user/test_login_availability.py b/tests/lib/user/test_login_availability.py index 5c1944122..c9854806c 100644 --- a/tests/lib/user/test_login_availability.py +++ b/tests/lib/user/test_login_availability.py @@ -1,7 +1,7 @@ import pytest from pycroft.helpers.user import login_hash -from pycroft.lib.user import login_available +from pycroft.lib.user import login_available, LoginTakenException, check_new_user_data_unused from pycroft.model.unix_account import UnixTombstone @@ -12,12 +12,41 @@ def test_login_reuse_present(session, processor): LOGIN = "taken" -def test_login_reuse_past(session, tombstone): +def test_tombstoned_login_not_available(session): assert not login_available(LOGIN, session) + + +def test_tombstoned_login_fails_check(session): + with pytest.raises(LoginTakenException): + check(LOGIN) + + +def test_existing_login_not_available(session, processor): + assert not login_available(processor.login, session) + + +def test_existing_login_fails_check(session, processor): + with pytest.raises(LoginTakenException): + check(processor.login) + + +def test_unused_login_available(session): assert login_available(f"not-{LOGIN}", session) -@pytest.fixture(scope="module") +def test_unused_login_passes_check(session): + login = f"not-{LOGIN}" + try: + check(login) + except LoginTakenException: + pytest.fail(f"login {login!r} did not pass user data check") + + +def check(login: str): + check_new_user_data_unused(login=login, email="unused@unused.com", swdd_person_id="9999999") + + +@pytest.fixture(scope="module", autouse=True) def tombstone(module_session) -> UnixTombstone: ts = UnixTombstone(login_hash=login_hash(LOGIN)) with module_session.begin_nested(): From 089fabc824c69c3b994e09ad5773d1b25073352c Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 15:13:46 +0200 Subject: [PATCH 39/49] Make new user data login availability check tombstone-aware --- pycroft/lib/user.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pycroft/lib/user.py b/pycroft/lib/user.py index bf94cfcad..1500853fc 100644 --- a/pycroft/lib/user.py +++ b/pycroft/lib/user.py @@ -1250,9 +1250,7 @@ def check_new_user_data_unused(login: str, email: str, swdd_person_id: int) -> N if user_swdd_person_id: raise UserExistsException - # This is broken: add test to verify! - user_login = User.q.filter_by(login=login).first() - if user_login is not None: + if not login_available(login, session=session.session): raise LoginTakenException user_email = User.q.filter_by(email=email).first() From fcd6ba2d38b121609ce9e5c7e2239a4a46173c34 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 17:10:24 +0200 Subject: [PATCH 40/49] Fix arg splitting in Justfile See https://github.com/casey/just/issues/647#issuecomment-1404056424 and https://just.systems/man/en/chapter_27.html#positional-arguments --- justfile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/justfile b/justfile index 416df8a8b..eb5fbb9b7 100644 --- a/justfile +++ b/justfile @@ -93,24 +93,30 @@ _ensure_schema_dir: run: (_up "dev-app") # spawn a shell in the `test-app` container +[positional-arguments] test-shell *args: - {{ drc }} run --rm test-app shell {{ args }} + {{ drc }} run --rm test-app shell "$@" # spawn a shell in the `dev-app` container +[positional-arguments] dev-shell *args: - {{ drc }} run --rm dev-app shell {{ args }} + {{ drc }} run --rm dev-app shell "$@" # run an alembic command against the `dev-db` -alembic command *args: - {{ drc }} --progress=none run --rm dev-migrate shell flask alembic {{ command }} {{ args }} +[positional-arguments] +alembic *args: + {{ drc }} --progress=none run --rm dev-migrate shell flask alembic "$@" + # run an interactive postgres shell in the dev-db container +[positional-arguments] dev-psql *args: (_up "dev-db") - {{ dev-psql }} {{ args }} + {{ dev-psql }} "$@" # run an interactive postgres shell in the test-db container +[positional-arguments] test-psql *args: (_up "test-db") - {{ test-psql }} {{ args }} + {{ test-psql }} "$@" # give a quick overview over the schema in the dev-db. From d1a5fd292a6b67c99c5a672fae9376d00ebccf30 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Wed, 4 Sep 2024 17:10:51 +0200 Subject: [PATCH 41/49] add `revision` to alembic wrapper --- scripts/alembic_wrapper.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/alembic_wrapper.py b/scripts/alembic_wrapper.py index 7a2a8a295..bc2058283 100755 --- a/scripts/alembic_wrapper.py +++ b/scripts/alembic_wrapper.py @@ -64,5 +64,13 @@ def stamp(obj: ContextObject, revision: str): command.stamp(obj.alembic_cfg, revision) +@cli.command(help=command.stamp.__doc__) +@click.pass_obj +@click.option("-m", "--message", "message") +@click.option("--autogenerate", is_flag=True, default=False) +def revision(obj: ContextObject, message: str, autogenerate: bool): + command.revision(obj.alembic_cfg, message=message, autogenerate=autogenerate) + + if __name__ == '__main__': cli() From 0e7d232a0bdf766a29d2da916fba911609bb1cd2 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sun, 8 Sep 2024 20:07:30 +0200 Subject: [PATCH 42/49] Upgrade `uv-pre-commit` --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a967736b6..53232d874 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: hooks: - id: ruff - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.1.29 + rev: 0.4.7 hooks: - id: pip-compile name: "pip-compile: requirements.txt" From d4a65475f4f87768d196af72b8f63a1261ba3a3b Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sun, 8 Sep 2024 20:14:30 +0200 Subject: [PATCH 43/49] Add `rich` to prod requirements Required for the `alembic diff` custom flask cli command --- pyproject.toml | 1 + requirements.dev.txt | 85 ++++++++++++++++++++++++++++++++++++++++--- requirements.prod.txt | 67 +++++++++++++++++++++++++++++++--- requirements.txt | 65 ++++++++++++++++++++++++++++++--- 4 files changed, 203 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b745f107b..5137d2a73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ dependencies = [ "pydantic ~= 2.4.0", "python-dotenv ~= 0.21.0", "reportlab ~= 3.6.13", # usersheet generation + "rich ~= 13.8.0", "sentry-sdk[Flask] ~= 1.29.2", "simplejson ~= 3.11.1", # decimal serialization "SQLAlchemy >= 2.0.1", diff --git a/requirements.dev.txt b/requirements.dev.txt index 418a13258..a8819c312 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -81,7 +81,9 @@ aiohttp==3.9.5 \ --hash=sha256:f64fd07515dad67f24b6ea4a66ae2876c01031de91c93075b8093f07c0a2d93d \ --hash=sha256:fcde4c397f673fdec23e6b05ebf8d4751314fa7c24f93334bf1f1364c1c69ac7 \ --hash=sha256:ff84aeb864e0fac81f676be9f4685f0527b660f1efdc40dcede3c251ef1e867f - # via mac-vendor-lookup + # via + # pycroft (pyproject.toml) + # mac-vendor-lookup aiosignal==1.3.1 \ --hash=sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc \ --hash=sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17 @@ -93,6 +95,7 @@ alabaster==0.7.16 \ alembic==1.9.4 \ --hash=sha256:4d3bd32ecdbb7bbfb48a9fe9e6d6fd6a831a1b59d03e26e292210237373e7db5 \ --hash=sha256:6f1c2207369bf4f49f952057a33bb017fbe5c148c2a773b46906b806ea6e825f + # via pycroft (pyproject.toml) amqp==5.2.0 \ --hash=sha256:827cb12fb0baa892aad844fd95258143bce4027fdac4fccddbc43330fd281637 \ --hash=sha256:a1ecff425ad063ad42a486c902807d1482311481c8ad95a72694b2975e75f7fd @@ -128,6 +131,7 @@ babel==2.14.0 \ --hash=sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363 \ --hash=sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287 # via + # pycroft (pyproject.toml) # flask-babel # sphinx beautifulsoup4==4.12.3 \ @@ -146,6 +150,7 @@ blinker==1.7.0 \ --hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \ --hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182 # via + # pycroft (pyproject.toml) # flask # sentry-sdk cachecontrol==0.14.0 \ @@ -155,9 +160,11 @@ cachecontrol==0.14.0 \ celery==5.2.7 \ --hash=sha256:138420c020cd58d6707e6257b6beda91fd39af7afde5d36c6334d175302c0e14 \ --hash=sha256:fafbd82934d30f8a004f81e8f7a062e31413a23d444be8ee3326553915958c6d + # via pycroft (pyproject.toml) celery-types==0.9.3 \ --hash=sha256:534f1e60abb277b0287c1731acd0110c18b51ba0dcb93ddb3c401949dff70010 \ --hash=sha256:d666647b13ab06217373b5d2a302c8b58f61bdf809bfaf904c63b16c3d363f59 + # via pycroft (pyproject.toml) certifi==2024.2.2 \ --hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ --hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 @@ -260,6 +267,7 @@ click==8.1.7 \ --hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \ --hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de # via + # pycroft (pyproject.toml) # celery # click-didyoumean # click-plugins @@ -332,7 +340,9 @@ coverage==6.5.0 \ --hash=sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3 \ --hash=sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84 \ --hash=sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987 - # via pytest-cov + # via + # pycroft (pyproject.toml) + # pytest-cov cssutils==2.11.1 \ --hash=sha256:0563a76513b6af6eebbe788c3bf3d01c920e46b3f90c8416738c5cfc773ff8e2 \ --hash=sha256:a67bfdfdff4f3867fab43698ec4897c1a828eca5973f4073321b3bccaf1199b1 @@ -369,9 +379,11 @@ elementpath==4.4.0 \ email-validator==1.1.3 \ --hash=sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b \ --hash=sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7 + # via pycroft (pyproject.toml) factory-boy==3.2.1 \ --hash=sha256:a98d277b0c047c75eb6e4ab8508a7f81fb03d2cb21986f627913546ef7a2a55e \ --hash=sha256:eb02a7dd1b577ef606b75a253b9818e6f9eaf996d94449c9d5ebb124f90dc795 + # via pycroft (pyproject.toml) faker==24.7.1 \ --hash=sha256:39d34c63f0d62ed574161e23fe32008917b923d18098ce94c2650fe16463b7d5 \ --hash=sha256:73f2bd886e8ce751e660c7d37a6c0a128aab5e1551359335bb79cfea0f4fabfc @@ -385,10 +397,12 @@ filelock==3.15.4 \ fints==3.1.0 \ --hash=sha256:426f6af1a79dce75ef9d475da926c8fc407c1bb3da13acf9fb52f5f0449b58d8 \ --hash=sha256:f4fb814f26d447257249c3af24f8abbb2bf2726dbbb0ee0e1ad832a9a010b487 + # via pycroft (pyproject.toml) flask==3.0.3 \ --hash=sha256:34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3 \ --hash=sha256:ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842 # via + # pycroft (pyproject.toml) # flask-babel # flask-login # flask-restful @@ -398,18 +412,24 @@ flask==3.0.3 \ flask-babel==4.0.0 \ --hash=sha256:638194cf91f8b301380f36d70e2034c77ee25b98cb5d80a1626820df9a6d4625 \ --hash=sha256:dbeab4027a3f4a87678a11686496e98e1492eb793cbdd77ab50f4e9a2602a593 + # via pycroft (pyproject.toml) flask-login==0.6.3 \ --hash=sha256:5e23d14a607ef12806c699590b89d0f0e0d67baeec599d75947bf9c147330333 \ --hash=sha256:849b25b82a436bf830a054e74214074af59097171562ab10bfa999e6b78aae5d + # via pycroft (pyproject.toml) flask-restful==0.3.10 \ --hash=sha256:1cf93c535172f112e080b0d4503a8d15f93a48c88bdd36dd87269bdaf405051b \ --hash=sha256:fe4af2ef0027df8f9b4f797aba20c5566801b6ade995ac63b588abf1a59cec37 + # via pycroft (pyproject.toml) flask-testing==0.8.1 \ --hash=sha256:0a734d7b68e63a9410b413cd7b1f96456f9a858bd09a6222d465650cc782eb01 + # via pycroft (pyproject.toml) flask-wtf==1.1.2 \ --hash=sha256:134f45f3155ebdbb2b44fe8e5b498a0956d34a16b10a53fadcb7a865c0b3cea2 \ --hash=sha256:b51cfa7ad14e03de432a6268e8341354939d0beebf30fce66f8617a93e55e2a0 - # via wtforms-widgets + # via + # pycroft (pyproject.toml) + # wtforms-widgets frozenlist==1.4.1 \ --hash=sha256:04ced3e6a46b4cfffe20f9ae482818e34eba9b5fb0ce4056e4cc9b6e212d09b7 \ --hash=sha256:0633c8d5337cb5c77acbccc6357ac49a1770b8c487e5b3505c57b949b4b82e98 \ @@ -498,6 +518,7 @@ gitdb==4.0.11 \ gitpython==3.1.43 \ --hash=sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c \ --hash=sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff + # via pycroft (pyproject.toml) greenlet==3.0.3 \ --hash=sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67 \ --hash=sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6 \ @@ -559,6 +580,7 @@ greenlet==3.0.3 \ --hash=sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33 # via sqlalchemy guzzle-sphinx-theme @ git+https://github.com/agdsn/guzzle_sphinx_theme.git@977d49fcbdf2b3df9660d813d4b33369391923e1 + # via pycroft (pyproject.toml) html5lib==1.1 \ --hash=sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d \ --hash=sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f @@ -589,6 +611,7 @@ jinja2==3.1.4 \ --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d # via + # pycroft (pyproject.toml) # flask # flask-babel # sphinx @@ -596,6 +619,7 @@ jinja2==3.1.4 \ jsonschema==3.2.0 \ --hash=sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163 \ --hash=sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a + # via pycroft (pyproject.toml) kombu==5.3.6 \ --hash=sha256:49f1e62b12369045de2662f62cc584e7df83481a513db83b01f87b5b9785e378 \ --hash=sha256:f3da5b570a147a5da8280180aa80b03807283d63ea5081fcdb510d18242431d9 @@ -603,6 +627,7 @@ kombu==5.3.6 \ ldap3==2.5.2 \ --hash=sha256:3f67c83185b1f0df8fdf6b52fa42c55bc9e9b7120c8b7fec60f0d6003c536d18 \ --hash=sha256:dd9be8ea27773c4ffc18ede0b95c3ca1eb12513a184590b9f8ae423db3f71eb9 + # via pycroft (pyproject.toml) livereload==2.6.3 \ --hash=sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869 \ --hash=sha256:ad4ac6f53b2d62bb6ce1a5e6e96f1f00976a32348afedcb4b6d68df2a1d346e4 @@ -610,10 +635,15 @@ livereload==2.6.3 \ mac-vendor-lookup==0.1.12 \ --hash=sha256:74e1723e177d4deb02977148d3fa04a7916f4bf93268e2afe3240529272bf80d \ --hash=sha256:aeec6eac01b07e6558d889b51f475a1e1e938e09cab409a069ab6a43b13cba58 + # via pycroft (pyproject.toml) mako==1.3.2 \ --hash=sha256:2a0c8ad7f6274271b3bb7467dd37cf9cc6dab4bc19cb69a4ef10669402de698e \ --hash=sha256:32a99d70754dfce237019d17ffe4a282d2d3351b9c476e90d8a60e63f133b80c # via alembic +markdown-it-py==3.0.0 \ + --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ + --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb + # via rich markupsafe==2.1.5 \ --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ @@ -676,6 +706,7 @@ markupsafe==2.1.5 \ --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 # via + # pycroft (pyproject.toml) # jinja2 # mako # sentry-sdk @@ -686,7 +717,13 @@ markupsafe==2.1.5 \ marshmallow==3.20.2 \ --hash=sha256:4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd \ --hash=sha256:c21d4b98fee747c130e6bc8f45c4b3199ea66bc00c12ee1f639f0aeca034d5e9 - # via webargs + # via + # pycroft (pyproject.toml) + # webargs +mdurl==0.1.2 \ + --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ + --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + # via markdown-it-py more-itertools==10.3.0 \ --hash=sha256:e5d93ef411224fbcef366a6e8ddc4c5781bc6359d43412a65dd5964e46111463 \ --hash=sha256:ea6a02e24a9161e51faad17a8782b92a0df82c12c1c8886fec7f0c3fa1a1b320 @@ -752,7 +789,9 @@ msgpack==1.0.8 \ mt-940==4.19.0 \ --hash=sha256:5d109e8dc4b490a4b92ec0153713710eb067b36b350ce1ff60c406afddc7d3cd \ --hash=sha256:cb0da41f6be6c6da1116d1e8284b2bf0eeee1d684e3a36b2e4add601d1fd7113 - # via fints + # via + # pycroft (pyproject.toml) + # fints multidict==6.0.5 \ --hash=sha256:01265f5e40f5a17f8241d52656ed27192be03bfa8764d88e8220141d1e4b3556 \ --hash=sha256:0275e35209c27a3f7951e1ce7aaf93ce0d163b28948444bec61dd7badc6d3f8c \ @@ -875,6 +914,7 @@ mypy==1.8.0 \ --hash=sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4 \ --hash=sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410 \ --hash=sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55 + # via pycroft (pyproject.toml) mypy-extensions==1.0.0 \ --hash=sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d \ --hash=sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782 @@ -886,6 +926,7 @@ natsort==8.4.0 \ netaddr==1.3.0 \ --hash=sha256:5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a \ --hash=sha256:c2c6a8ebe5554ce33b7d5b3a306b71bbb373e000bbbf2350dd5213cc56e3dbbe + # via pycroft (pyproject.toml) packaging==24.0 \ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 @@ -897,6 +938,7 @@ packaging==24.0 \ passlib==1.7.4 \ --hash=sha256:aa6bca462b8d8bda89c70b382f0c298a20b5560af6cbfa2dce410c0a2fb669f1 \ --hash=sha256:defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04 + # via pycroft (pyproject.toml) pillow==10.3.0 \ --hash=sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c \ --hash=sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2 \ @@ -1053,6 +1095,7 @@ psycopg2-binary==2.9.9 \ --hash=sha256:f7ae5d65ccfbebdfa761585228eb4d0df3a8b15cfb53bd953e713e09fbb12957 \ --hash=sha256:f7fc5a5acafb7d6ccca13bfa8c90f8c51f13d8fb87d95656d3950f0158d3ce53 \ --hash=sha256:f9b5571d33660d5009a8b3c25dc1db560206e2d2f89d3df1cb32d72c0d117d52 + # via pycroft (pyproject.toml) py==1.11.0 \ --hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \ --hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378 @@ -1064,6 +1107,7 @@ pyasn1==0.6.0 \ pydantic==2.4.2 \ --hash=sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7 \ --hash=sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1 + # via pycroft (pyproject.toml) pydantic-core==2.10.1 \ --hash=sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e \ --hash=sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33 \ @@ -1175,10 +1219,12 @@ pydantic-core==2.10.1 \ pydot==1.4.2 \ --hash=sha256:248081a39bcb56784deb018977e428605c1c758f10897a339fce1dd728ff007d \ --hash=sha256:66c98190c65b8d2e2382a441b4c0edfdb4f4c025ef9cb9874de478fb0793a451 + # via pycroft (pyproject.toml) pygments==2.17.2 \ --hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \ --hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367 # via + # rich # sphinx # sphinx-prompt # sphinx-tabs @@ -1223,6 +1269,7 @@ pyinstrument==4.2.0 \ --hash=sha256:eb4c05fafca2ca28847bc368d2bcb6d4cd45c9613e85f7f65dfca5bf5fab86a3 \ --hash=sha256:ec175b77b3fd6bc5dbd3042ec1a3ef8d0c7db0ec5ee6993c50e583c7c7cd4af7 \ --hash=sha256:f2702f043e6ccc02720076fdc4bc86de50d2a465bd72393251dd5eea5a5ac821 + # via pycroft (pyproject.toml) pyparsing==3.1.2 \ --hash=sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad \ --hash=sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742 @@ -1265,14 +1312,17 @@ pytest==7.0.1 \ --hash=sha256:9ce3ff477af913ecf6321fe337b93a2c0dcf2a0a1439c43f5452112c1e4280db \ --hash=sha256:e30905a0c131d3d94b89624a1cc5afec3e0ba2fbdb151867d8e0ebd49850f171 # via + # pycroft (pyproject.toml) # pytest-cov # pytest-timeout pytest-cov==4.0.0 \ --hash=sha256:2feb1b751d66a8bd934e5edfa2e961d11309dc37b73b0eabe73b5945fee20f6b \ --hash=sha256:996b79efde6433cdbd0088872dbc5fb3ed7fe1578b68cdbba634f14bb8dd0470 + # via pycroft (pyproject.toml) pytest-timeout==2.1.0 \ --hash=sha256:c07ca07404c612f8abbe22294b23c368e2e5104b521c1790195561f37e1ac3d9 \ --hash=sha256:f6f50101443ce70ad325ceb4473c4255e9d74e3c7cd0ef827309dfa4c0d975c6 + # via pycroft (pyproject.toml) python-dateutil==2.9.0.post0 \ --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 @@ -1280,6 +1330,7 @@ python-dateutil==2.9.0.post0 \ python-dotenv==0.21.1 \ --hash=sha256:1c93de8f636cde3ce377292818d0e440b6e45a82f215c3744979151fa8151c49 \ --hash=sha256:41e12e0318bebc859fcc4d97d4db8d20ad21721a6aa5047dd59f090391cb549a + # via pycroft (pyproject.toml) pytz==2024.1 \ --hash=sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812 \ --hash=sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319 @@ -1333,6 +1384,7 @@ reportlab==3.6.13 \ --hash=sha256:f1993a68c0edc45895d3df350d01b0456efe79aaf309cef777762742be501f2a \ --hash=sha256:faeebde62f0f6ad86985bec5685411260393d2eb7ba907972da56af586b644e8 \ --hash=sha256:ff09a0a1e5cef05309ac09dfc5185e8151d927bcf45470d2f540c96260f8a355 + # via pycroft (pyproject.toml) requests==2.32.2 \ --hash=sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289 \ --hash=sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c @@ -1341,6 +1393,10 @@ requests==2.32.2 \ # cachecontrol # fints # sphinx +rich==13.8.0 \ + --hash=sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc \ + --hash=sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4 + # via pycroft (pyproject.toml) ruamel-yaml==0.18.6 \ --hash=sha256:57b53ba33def16c4f3d807c0ccbc00f8a6081827e81ba2491691b76882d0c636 \ --hash=sha256:8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b @@ -1415,9 +1471,11 @@ ruff==0.3.5 \ --hash=sha256:dc56bb16a63c1303bd47563c60482a1512721053d93231cf7e9e1c6954395a0e \ --hash=sha256:dfd3504e881082959b4160ab02f7a205f0fadc0a9619cc481982b6837b2fd4c0 \ --hash=sha256:faeeae9905446b975dcf6d4499dc93439b131f1443ee264055c5716dd947af55 + # via pycroft (pyproject.toml) sentry-sdk==1.29.2 \ --hash=sha256:3e17215d8006612e2df02b0e73115eb8376c37e3f586d8436fa41644e605074d \ --hash=sha256:a99ee105384788c3f228726a88baf515fe7b5f1d2d0f215a03d194369f158df7 + # via pycroft (pyproject.toml) sepaxml==2.6.1 \ --hash=sha256:939c12236779e6a3d7221d3557921abd6e30b0bfd369e67815ea55bccaacd688 \ --hash=sha256:f110e4a11322c1ea46f86550d703468b109343b4cece1d5b792d394f03d86110 @@ -1436,6 +1494,7 @@ simplejson==3.11.1 \ --hash=sha256:86aa9fd492230c4b8b6814fcf089b36ffba2cec4d0635c8c642135b9067ebbd7 \ --hash=sha256:8d73b96a6ee7c81fd49dac7225e3846fd60b54a0b5b93a0aaea04c5a5d2e7bf2 \ --hash=sha256:a6939199c30b78ae31e62e6913f0e12cb71a4a5ad67c259e0a98688df027a5de + # via pycroft (pyproject.toml) six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 @@ -1463,6 +1522,7 @@ sphinx==7.3.7 \ --hash=sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3 \ --hash=sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc # via + # pycroft (pyproject.toml) # autodocsumm # guzzle-sphinx-theme # sphinx-autobuild @@ -1475,6 +1535,7 @@ sphinx==7.3.7 \ sphinx-autobuild==2021.3.14 \ --hash=sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac \ --hash=sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05 + # via pycroft (pyproject.toml) sphinx-autodoc-typehints==2.2.2 \ --hash=sha256:128e600eeef63b722f3d8dac6403594592c8cade3ba66fd11dcb997465ee259d \ --hash=sha256:b98337a8530c95b73ba0c65465847a8ab0a13403bdc81294d5ef396bbd1f783e @@ -1485,6 +1546,7 @@ sphinx-jinja2-compat==0.3.0 \ # via sphinx-toolbox sphinx-paramlinks==0.6.0 \ --hash=sha256:746a0816860aa3fff5d8d746efcbec4deead421f152687411db1d613d29f915e + # via pycroft (pyproject.toml) sphinx-prompt==1.8.0 \ --hash=sha256:369ecc633f0711886f9b3a078c83264245be1adf46abeeb9b88b5519e4b51007 \ --hash=sha256:47482f86fcec29662fdfd23e7c04ef03582714195d01f5d565403320084372ed @@ -1496,6 +1558,7 @@ sphinx-tabs==3.4.5 \ sphinx-toolbox==3.7.0 \ --hash=sha256:045db70e6d73241ff0b922f2e76597e2cc4904dbabef9fc6f3a46718b0e48d51 \ --hash=sha256:9ea800fb6b2ecc5f382ab3547b415029fe9603b0b7eeb4c15c5da77c1eb5f21a + # via pycroft (pyproject.toml) sphinxcontrib-applehelp==1.0.8 \ --hash=sha256:c40a4f96f3776c4393d933412053962fac2b84f4c99a7982ba42e09576a70619 \ --hash=sha256:cb61eb0ec1b61f349e5cc36b2028e9e7ca765be05e49641c97241274753067b4 @@ -1506,6 +1569,7 @@ sphinxcontrib-devhelp==1.0.6 \ # via sphinx sphinxcontrib-fulltoc==1.2.0 \ --hash=sha256:c845d62fc467f3135d4543e9f10e13ef91852683bd1c90fd19d07f9d36757cd9 + # via pycroft (pyproject.toml) sphinxcontrib-htmlhelp==2.0.5 \ --hash=sha256:0dc87637d5de53dd5eec3a6a01753b1ccf99494bd756aafecd74b4fa9e729015 \ --hash=sha256:393f04f112b4d2f53d93448d4bce35842f62b307ccdc549ec1585e950bc35e04 @@ -1513,6 +1577,7 @@ sphinxcontrib-htmlhelp==2.0.5 \ sphinxcontrib-httpdomain==1.8.1 \ --hash=sha256:21eefe1270e4d9de8d717cc89ee92cc4871b8736774393bafc5e38a6bb77b1d5 \ --hash=sha256:6c2dfe6ca282d75f66df333869bb0ce7331c01b475db6809ff9d107b7cdfe04b + # via pycroft (pyproject.toml) sphinxcontrib-jsmath==1.0.1 \ --hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178 \ --hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8 @@ -1520,6 +1585,7 @@ sphinxcontrib-jsmath==1.0.1 \ sphinxcontrib-mermaid==0.9.2 \ --hash=sha256:252ef13dd23164b28f16d8b0205cf184b9d8e2b714a302274d9f59eb708e77af \ --hash=sha256:6795a72037ca55e65663d2a2c1a043d636dc3d30d418e56dd6087d1459d98a5d + # via pycroft (pyproject.toml) sphinxcontrib-qthelp==1.0.7 \ --hash=sha256:053dedc38823a80a7209a80860b16b722e9e0209e32fea98c90e4e6624588ed6 \ --hash=sha256:e2ae3b5c492d58fcbd73281fbd27e34b8393ec34a073c792642cd8e529288182 @@ -1579,6 +1645,7 @@ sqlalchemy==2.0.29 \ --hash=sha256:ea311d4ee9a8fa67f139c088ae9f905fcf0277d6cd75c310a21a88bf85e130f5 \ --hash=sha256:fecd5089c4be1bcc37c35e9aa678938d2888845a134dd016de457b942cf5a758 # via + # pycroft (pyproject.toml) # alembic # wtforms-sqlalchemy tabulate==0.9.0 \ @@ -1609,12 +1676,15 @@ tornado==6.4.1 \ types-jsonschema==4.3.2 \ --hash=sha256:22a7524400e3b5e4c9ea9e78454c3804a6ba10b04a016d44b6efc7cbca722446 \ --hash=sha256:ad8967224a97849f87ca3179304b9d8e9d32b8011a011efe41c983d874b7f8aa + # via pycroft (pyproject.toml) types-netaddr==1.3.0.20240530 \ --hash=sha256:354998d018e326da4f1d9b005fc91137b7c2c473aaf03c4ef64bf83c6861b440 \ --hash=sha256:742c2ec1f202b666f544223e2616b34f1f13df80c91e5aeaaa93a72e4d0774ea + # via pycroft (pyproject.toml) types-passlib==1.7.7.20240327 \ --hash=sha256:3a3b7f4258b71034d2e2f4f307d6810f9904f906cdf375514c8bdbdb28a4ad23 \ --hash=sha256:4cce6a1a3a6afee9fc4728b4d9784300764ac2be747f5bcc01646d904b85f4bb + # via pycroft (pyproject.toml) typing-extensions==4.11.0 \ --hash=sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0 \ --hash=sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a @@ -1667,6 +1737,7 @@ watchdog==2.3.1 \ --hash=sha256:d9f9ed26ed22a9d331820a8432c3680707ea8b54121ddcc9dc7d9f2ceeb36906 \ --hash=sha256:ea5d86d1bcf4a9d24610aa2f6f25492f441960cf04aed2bd9a97db439b643a7b \ --hash=sha256:efe3252137392a471a2174d721e1037a0e6a5da7beb72a021e662b7000a9903f + # via pycroft (pyproject.toml) wcwidth==0.2.13 \ --hash=sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859 \ --hash=sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5 @@ -1674,6 +1745,7 @@ wcwidth==0.2.13 \ webargs==8.3.0 \ --hash=sha256:69d7ac874d746b6f4f47eac923c2abf6fc7788dfca2ebcfd9f4ac52ec9646446 \ --hash=sha256:cab207941b0686c4d086c823632ddcd4343151644341a32fcf50b8eaa71e31c7 + # via pycroft (pyproject.toml) webencodings==0.5.1 \ --hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \ --hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 @@ -1757,10 +1829,12 @@ wrapt==1.16.0 \ --hash=sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d \ --hash=sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a \ --hash=sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4 + # via pycroft (pyproject.toml) wtforms==2.3.3 \ --hash=sha256:7b504fc724d0d1d4d5d5c114e778ec88c37ea53144683e084215eed5155ada4c \ --hash=sha256:81195de0ac94fbc8368abbaf9197b88c4f3ffd6c2719b5bf5fc9da744f3d829c # via + # pycroft (pyproject.toml) # flask-wtf # wtforms-sqlalchemy # wtforms-widgets @@ -1771,6 +1845,7 @@ wtforms-sqlalchemy==0.3 \ wtforms-widgets==1.0.2 \ --hash=sha256:36a10e303d9c52ad2a1c47a944295561abcc915cb0aeeb24df6d507d02cc1e48 \ --hash=sha256:442473ecf01df69ad93095504b310c65ed6095f74a75d0387af3c95cc2467ee4 + # via pycroft (pyproject.toml) xmlschema==3.2.0 \ --hash=sha256:541d96893691aae3cb93ea36a85dde18327012e26e0c51d610f4f79e7fc86f7b \ --hash=sha256:7ad8b4838fee0cfbfc3a5c7d38e33964cf5ebd2c20e2aa23ea813b6793438f9c diff --git a/requirements.prod.txt b/requirements.prod.txt index 81b07d49b..41a1c5866 100644 --- a/requirements.prod.txt +++ b/requirements.prod.txt @@ -81,7 +81,9 @@ aiohttp==3.9.5 \ --hash=sha256:f64fd07515dad67f24b6ea4a66ae2876c01031de91c93075b8093f07c0a2d93d \ --hash=sha256:fcde4c397f673fdec23e6b05ebf8d4751314fa7c24f93334bf1f1364c1c69ac7 \ --hash=sha256:ff84aeb864e0fac81f676be9f4685f0527b660f1efdc40dcede3c251ef1e867f - # via mac-vendor-lookup + # via + # pycroft (pyproject.toml) + # mac-vendor-lookup aiosignal==1.3.1 \ --hash=sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc \ --hash=sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17 @@ -89,6 +91,7 @@ aiosignal==1.3.1 \ alembic==1.9.4 \ --hash=sha256:4d3bd32ecdbb7bbfb48a9fe9e6d6fd6a831a1b59d03e26e292210237373e7db5 \ --hash=sha256:6f1c2207369bf4f49f952057a33bb017fbe5c148c2a773b46906b806ea6e825f + # via pycroft (pyproject.toml) amqp==5.2.0 \ --hash=sha256:827cb12fb0baa892aad844fd95258143bce4027fdac4fccddbc43330fd281637 \ --hash=sha256:a1ecff425ad063ad42a486c902807d1482311481c8ad95a72694b2975e75f7fd @@ -110,7 +113,9 @@ attrs==23.2.0 \ babel==2.14.0 \ --hash=sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363 \ --hash=sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287 - # via flask-babel + # via + # pycroft (pyproject.toml) + # flask-babel billiard==3.6.4.0 \ --hash=sha256:299de5a8da28a783d51b197d496bef4f1595dd023a93a4f59dde1886ae905547 \ --hash=sha256:87103ea78fa6ab4d5c751c4909bcff74617d985de7fa8b672cf8618afd5a875b @@ -123,11 +128,13 @@ blinker==1.7.0 \ --hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \ --hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182 # via + # pycroft (pyproject.toml) # flask # sentry-sdk celery==5.2.7 \ --hash=sha256:138420c020cd58d6707e6257b6beda91fd39af7afde5d36c6334d175302c0e14 \ --hash=sha256:fafbd82934d30f8a004f81e8f7a062e31413a23d444be8ee3326553915958c6d + # via pycroft (pyproject.toml) certifi==2024.2.2 \ --hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ --hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 @@ -230,6 +237,7 @@ click==8.1.7 \ --hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \ --hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de # via + # pycroft (pyproject.toml) # celery # click-didyoumean # click-plugins @@ -258,13 +266,16 @@ elementpath==4.4.0 \ email-validator==1.1.3 \ --hash=sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b \ --hash=sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7 + # via pycroft (pyproject.toml) fints==3.1.0 \ --hash=sha256:426f6af1a79dce75ef9d475da926c8fc407c1bb3da13acf9fb52f5f0449b58d8 \ --hash=sha256:f4fb814f26d447257249c3af24f8abbb2bf2726dbbb0ee0e1ad832a9a010b487 + # via pycroft (pyproject.toml) flask==3.0.3 \ --hash=sha256:34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3 \ --hash=sha256:ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842 # via + # pycroft (pyproject.toml) # flask-babel # flask-login # flask-restful @@ -273,16 +284,21 @@ flask==3.0.3 \ flask-babel==4.0.0 \ --hash=sha256:638194cf91f8b301380f36d70e2034c77ee25b98cb5d80a1626820df9a6d4625 \ --hash=sha256:dbeab4027a3f4a87678a11686496e98e1492eb793cbdd77ab50f4e9a2602a593 + # via pycroft (pyproject.toml) flask-login==0.6.3 \ --hash=sha256:5e23d14a607ef12806c699590b89d0f0e0d67baeec599d75947bf9c147330333 \ --hash=sha256:849b25b82a436bf830a054e74214074af59097171562ab10bfa999e6b78aae5d + # via pycroft (pyproject.toml) flask-restful==0.3.10 \ --hash=sha256:1cf93c535172f112e080b0d4503a8d15f93a48c88bdd36dd87269bdaf405051b \ --hash=sha256:fe4af2ef0027df8f9b4f797aba20c5566801b6ade995ac63b588abf1a59cec37 + # via pycroft (pyproject.toml) flask-wtf==1.1.2 \ --hash=sha256:134f45f3155ebdbb2b44fe8e5b498a0956d34a16b10a53fadcb7a865c0b3cea2 \ --hash=sha256:b51cfa7ad14e03de432a6268e8341354939d0beebf30fce66f8617a93e55e2a0 - # via wtforms-widgets + # via + # pycroft (pyproject.toml) + # wtforms-widgets frozenlist==1.4.1 \ --hash=sha256:04ced3e6a46b4cfffe20f9ae482818e34eba9b5fb0ce4056e4cc9b6e212d09b7 \ --hash=sha256:0633c8d5337cb5c77acbccc6357ac49a1770b8c487e5b3505c57b949b4b82e98 \ @@ -371,6 +387,7 @@ gitdb==4.0.11 \ gitpython==3.1.43 \ --hash=sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c \ --hash=sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff + # via pycroft (pyproject.toml) greenlet==3.0.3 \ --hash=sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67 \ --hash=sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6 \ @@ -448,11 +465,13 @@ jinja2==3.1.4 \ --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d # via + # pycroft (pyproject.toml) # flask # flask-babel jsonschema==3.2.0 \ --hash=sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163 \ --hash=sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a + # via pycroft (pyproject.toml) kombu==5.3.6 \ --hash=sha256:49f1e62b12369045de2662f62cc584e7df83481a513db83b01f87b5b9785e378 \ --hash=sha256:f3da5b570a147a5da8280180aa80b03807283d63ea5081fcdb510d18242431d9 @@ -460,13 +479,19 @@ kombu==5.3.6 \ ldap3==2.5.2 \ --hash=sha256:3f67c83185b1f0df8fdf6b52fa42c55bc9e9b7120c8b7fec60f0d6003c536d18 \ --hash=sha256:dd9be8ea27773c4ffc18ede0b95c3ca1eb12513a184590b9f8ae423db3f71eb9 + # via pycroft (pyproject.toml) mac-vendor-lookup==0.1.12 \ --hash=sha256:74e1723e177d4deb02977148d3fa04a7916f4bf93268e2afe3240529272bf80d \ --hash=sha256:aeec6eac01b07e6558d889b51f475a1e1e938e09cab409a069ab6a43b13cba58 + # via pycroft (pyproject.toml) mako==1.3.2 \ --hash=sha256:2a0c8ad7f6274271b3bb7467dd37cf9cc6dab4bc19cb69a4ef10669402de698e \ --hash=sha256:32a99d70754dfce237019d17ffe4a282d2d3351b9c476e90d8a60e63f133b80c # via alembic +markdown-it-py==3.0.0 \ + --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ + --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb + # via rich markupsafe==2.1.5 \ --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ @@ -529,6 +554,7 @@ markupsafe==2.1.5 \ --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 # via + # pycroft (pyproject.toml) # jinja2 # mako # sentry-sdk @@ -538,11 +564,19 @@ markupsafe==2.1.5 \ marshmallow==3.20.2 \ --hash=sha256:4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd \ --hash=sha256:c21d4b98fee747c130e6bc8f45c4b3199ea66bc00c12ee1f639f0aeca034d5e9 - # via webargs + # via + # pycroft (pyproject.toml) + # webargs +mdurl==0.1.2 \ + --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ + --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + # via markdown-it-py mt-940==4.19.0 \ --hash=sha256:5d109e8dc4b490a4b92ec0153713710eb067b36b350ce1ff60c406afddc7d3cd \ --hash=sha256:cb0da41f6be6c6da1116d1e8284b2bf0eeee1d684e3a36b2e4add601d1fd7113 - # via fints + # via + # pycroft (pyproject.toml) + # fints multidict==6.0.5 \ --hash=sha256:01265f5e40f5a17f8241d52656ed27192be03bfa8764d88e8220141d1e4b3556 \ --hash=sha256:0275e35209c27a3f7951e1ce7aaf93ce0d163b28948444bec61dd7badc6d3f8c \ @@ -640,6 +674,7 @@ multidict==6.0.5 \ netaddr==1.3.0 \ --hash=sha256:5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a \ --hash=sha256:c2c6a8ebe5554ce33b7d5b3a306b71bbb373e000bbbf2350dd5213cc56e3dbbe + # via pycroft (pyproject.toml) packaging==24.0 \ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 @@ -649,6 +684,7 @@ packaging==24.0 \ passlib==1.7.4 \ --hash=sha256:aa6bca462b8d8bda89c70b382f0c298a20b5560af6cbfa2dce410c0a2fb669f1 \ --hash=sha256:defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04 + # via pycroft (pyproject.toml) pillow==10.3.0 \ --hash=sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c \ --hash=sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2 \ @@ -797,6 +833,7 @@ psycopg2-binary==2.9.9 \ --hash=sha256:f7ae5d65ccfbebdfa761585228eb4d0df3a8b15cfb53bd953e713e09fbb12957 \ --hash=sha256:f7fc5a5acafb7d6ccca13bfa8c90f8c51f13d8fb87d95656d3950f0158d3ce53 \ --hash=sha256:f9b5571d33660d5009a8b3c25dc1db560206e2d2f89d3df1cb32d72c0d117d52 + # via pycroft (pyproject.toml) pyasn1==0.6.0 \ --hash=sha256:3a35ab2c4b5ef98e17dfdec8ab074046fbda76e281c5a706ccd82328cfc8f64c \ --hash=sha256:cca4bb0f2df5504f02f6f8a775b6e416ff9b0b3b16f7ee80b5a3153d9b804473 @@ -804,6 +841,7 @@ pyasn1==0.6.0 \ pydantic==2.4.2 \ --hash=sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7 \ --hash=sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1 + # via pycroft (pyproject.toml) pydantic-core==2.10.1 \ --hash=sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e \ --hash=sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33 \ @@ -912,6 +950,10 @@ pydantic-core==2.10.1 \ --hash=sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6 \ --hash=sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521 # via pydantic +pygments==2.18.0 \ + --hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \ + --hash=sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a + # via rich pyrsistent==0.20.0 \ --hash=sha256:0724c506cd8b63c69c7f883cc233aac948c1ea946ea95996ad8b1380c25e1d3f \ --hash=sha256:09848306523a3aba463c4b49493a760e7a6ca52e4826aa100ee99d8d39b7ad1e \ @@ -949,6 +991,7 @@ pyrsistent==0.20.0 \ python-dotenv==0.21.1 \ --hash=sha256:1c93de8f636cde3ce377292818d0e440b6e45a82f215c3744979151fa8151c49 \ --hash=sha256:41e12e0318bebc859fcc4d97d4db8d20ad21721a6aa5047dd59f090391cb549a + # via pycroft (pyproject.toml) pytz==2024.1 \ --hash=sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812 \ --hash=sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319 @@ -1002,13 +1045,19 @@ reportlab==3.6.13 \ --hash=sha256:f1993a68c0edc45895d3df350d01b0456efe79aaf309cef777762742be501f2a \ --hash=sha256:faeebde62f0f6ad86985bec5685411260393d2eb7ba907972da56af586b644e8 \ --hash=sha256:ff09a0a1e5cef05309ac09dfc5185e8151d927bcf45470d2f540c96260f8a355 + # via pycroft (pyproject.toml) requests==2.32.2 \ --hash=sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289 \ --hash=sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c # via fints +rich==13.8.0 \ + --hash=sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc \ + --hash=sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4 + # via pycroft (pyproject.toml) sentry-sdk==1.29.2 \ --hash=sha256:3e17215d8006612e2df02b0e73115eb8376c37e3f586d8436fa41644e605074d \ --hash=sha256:a99ee105384788c3f228726a88baf515fe7b5f1d2d0f215a03d194369f158df7 + # via pycroft (pyproject.toml) sepaxml==2.6.1 \ --hash=sha256:939c12236779e6a3d7221d3557921abd6e30b0bfd369e67815ea55bccaacd688 \ --hash=sha256:f110e4a11322c1ea46f86550d703468b109343b4cece1d5b792d394f03d86110 @@ -1027,6 +1076,7 @@ simplejson==3.11.1 \ --hash=sha256:86aa9fd492230c4b8b6814fcf089b36ffba2cec4d0635c8c642135b9067ebbd7 \ --hash=sha256:8d73b96a6ee7c81fd49dac7225e3846fd60b54a0b5b93a0aaea04c5a5d2e7bf2 \ --hash=sha256:a6939199c30b78ae31e62e6913f0e12cb71a4a5ad67c259e0a98688df027a5de + # via pycroft (pyproject.toml) six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 @@ -1089,6 +1139,7 @@ sqlalchemy==2.0.29 \ --hash=sha256:ea311d4ee9a8fa67f139c088ae9f905fcf0277d6cd75c310a21a88bf85e130f5 \ --hash=sha256:fecd5089c4be1bcc37c35e9aa678938d2888845a134dd016de457b942cf5a758 # via + # pycroft (pyproject.toml) # alembic # wtforms-sqlalchemy text-unidecode==1.3 \ @@ -1110,8 +1161,10 @@ urllib3==2.2.2 \ # sentry-sdk uwsgi==2.0.24 \ --hash=sha256:77b6dd5cd633f4ae87ee393f7701f617736815499407376e78f3d16467523afe + # via pycroft (pyproject.toml) uwsgitop==0.12 \ --hash=sha256:4f9330951f0fb9633226de36cf0c28c04dcf323efab608834aa81f638b6019b2 + # via pycroft (pyproject.toml) vine==5.1.0 \ --hash=sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc \ --hash=sha256:8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0 @@ -1126,6 +1179,7 @@ wcwidth==0.2.13 \ webargs==8.3.0 \ --hash=sha256:69d7ac874d746b6f4f47eac923c2abf6fc7788dfca2ebcfd9f4ac52ec9646446 \ --hash=sha256:cab207941b0686c4d086c823632ddcd4343151644341a32fcf50b8eaa71e31c7 + # via pycroft (pyproject.toml) webencodings==0.5.1 \ --hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \ --hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 @@ -1207,10 +1261,12 @@ wrapt==1.16.0 \ --hash=sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d \ --hash=sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a \ --hash=sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4 + # via pycroft (pyproject.toml) wtforms==2.3.3 \ --hash=sha256:7b504fc724d0d1d4d5d5c114e778ec88c37ea53144683e084215eed5155ada4c \ --hash=sha256:81195de0ac94fbc8368abbaf9197b88c4f3ffd6c2719b5bf5fc9da744f3d829c # via + # pycroft (pyproject.toml) # flask-wtf # wtforms-sqlalchemy # wtforms-widgets @@ -1221,6 +1277,7 @@ wtforms-sqlalchemy==0.3 \ wtforms-widgets==1.0.2 \ --hash=sha256:36a10e303d9c52ad2a1c47a944295561abcc915cb0aeeb24df6d507d02cc1e48 \ --hash=sha256:442473ecf01df69ad93095504b310c65ed6095f74a75d0387af3c95cc2467ee4 + # via pycroft (pyproject.toml) xmlschema==3.2.0 \ --hash=sha256:541d96893691aae3cb93ea36a85dde18327012e26e0c51d610f4f79e7fc86f7b \ --hash=sha256:7ad8b4838fee0cfbfc3a5c7d38e33964cf5ebd2c20e2aa23ea813b6793438f9c diff --git a/requirements.txt b/requirements.txt index 71bdeab0c..a62eb8878 100644 --- a/requirements.txt +++ b/requirements.txt @@ -81,7 +81,9 @@ aiohttp==3.9.5 \ --hash=sha256:f64fd07515dad67f24b6ea4a66ae2876c01031de91c93075b8093f07c0a2d93d \ --hash=sha256:fcde4c397f673fdec23e6b05ebf8d4751314fa7c24f93334bf1f1364c1c69ac7 \ --hash=sha256:ff84aeb864e0fac81f676be9f4685f0527b660f1efdc40dcede3c251ef1e867f - # via mac-vendor-lookup + # via + # pycroft (pyproject.toml) + # mac-vendor-lookup aiosignal==1.3.1 \ --hash=sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc \ --hash=sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17 @@ -89,6 +91,7 @@ aiosignal==1.3.1 \ alembic==1.9.4 \ --hash=sha256:4d3bd32ecdbb7bbfb48a9fe9e6d6fd6a831a1b59d03e26e292210237373e7db5 \ --hash=sha256:6f1c2207369bf4f49f952057a33bb017fbe5c148c2a773b46906b806ea6e825f + # via pycroft (pyproject.toml) amqp==5.2.0 \ --hash=sha256:827cb12fb0baa892aad844fd95258143bce4027fdac4fccddbc43330fd281637 \ --hash=sha256:a1ecff425ad063ad42a486c902807d1482311481c8ad95a72694b2975e75f7fd @@ -110,7 +113,9 @@ attrs==23.2.0 \ babel==2.14.0 \ --hash=sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363 \ --hash=sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287 - # via flask-babel + # via + # pycroft (pyproject.toml) + # flask-babel billiard==3.6.4.0 \ --hash=sha256:299de5a8da28a783d51b197d496bef4f1595dd023a93a4f59dde1886ae905547 \ --hash=sha256:87103ea78fa6ab4d5c751c4909bcff74617d985de7fa8b672cf8618afd5a875b @@ -123,11 +128,13 @@ blinker==1.7.0 \ --hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \ --hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182 # via + # pycroft (pyproject.toml) # flask # sentry-sdk celery==5.2.7 \ --hash=sha256:138420c020cd58d6707e6257b6beda91fd39af7afde5d36c6334d175302c0e14 \ --hash=sha256:fafbd82934d30f8a004f81e8f7a062e31413a23d444be8ee3326553915958c6d + # via pycroft (pyproject.toml) certifi==2024.2.2 \ --hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ --hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 @@ -230,6 +237,7 @@ click==8.1.7 \ --hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \ --hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de # via + # pycroft (pyproject.toml) # celery # click-didyoumean # click-plugins @@ -258,13 +266,16 @@ elementpath==4.4.0 \ email-validator==1.1.3 \ --hash=sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b \ --hash=sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7 + # via pycroft (pyproject.toml) fints==3.1.0 \ --hash=sha256:426f6af1a79dce75ef9d475da926c8fc407c1bb3da13acf9fb52f5f0449b58d8 \ --hash=sha256:f4fb814f26d447257249c3af24f8abbb2bf2726dbbb0ee0e1ad832a9a010b487 + # via pycroft (pyproject.toml) flask==3.0.3 \ --hash=sha256:34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3 \ --hash=sha256:ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842 # via + # pycroft (pyproject.toml) # flask-babel # flask-login # flask-restful @@ -273,16 +284,21 @@ flask==3.0.3 \ flask-babel==4.0.0 \ --hash=sha256:638194cf91f8b301380f36d70e2034c77ee25b98cb5d80a1626820df9a6d4625 \ --hash=sha256:dbeab4027a3f4a87678a11686496e98e1492eb793cbdd77ab50f4e9a2602a593 + # via pycroft (pyproject.toml) flask-login==0.6.3 \ --hash=sha256:5e23d14a607ef12806c699590b89d0f0e0d67baeec599d75947bf9c147330333 \ --hash=sha256:849b25b82a436bf830a054e74214074af59097171562ab10bfa999e6b78aae5d + # via pycroft (pyproject.toml) flask-restful==0.3.10 \ --hash=sha256:1cf93c535172f112e080b0d4503a8d15f93a48c88bdd36dd87269bdaf405051b \ --hash=sha256:fe4af2ef0027df8f9b4f797aba20c5566801b6ade995ac63b588abf1a59cec37 + # via pycroft (pyproject.toml) flask-wtf==1.1.2 \ --hash=sha256:134f45f3155ebdbb2b44fe8e5b498a0956d34a16b10a53fadcb7a865c0b3cea2 \ --hash=sha256:b51cfa7ad14e03de432a6268e8341354939d0beebf30fce66f8617a93e55e2a0 - # via wtforms-widgets + # via + # pycroft (pyproject.toml) + # wtforms-widgets frozenlist==1.4.1 \ --hash=sha256:04ced3e6a46b4cfffe20f9ae482818e34eba9b5fb0ce4056e4cc9b6e212d09b7 \ --hash=sha256:0633c8d5337cb5c77acbccc6357ac49a1770b8c487e5b3505c57b949b4b82e98 \ @@ -371,6 +387,7 @@ gitdb==4.0.11 \ gitpython==3.1.43 \ --hash=sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c \ --hash=sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff + # via pycroft (pyproject.toml) greenlet==3.0.3 \ --hash=sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67 \ --hash=sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6 \ @@ -448,11 +465,13 @@ jinja2==3.1.4 \ --hash=sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369 \ --hash=sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d # via + # pycroft (pyproject.toml) # flask # flask-babel jsonschema==3.2.0 \ --hash=sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163 \ --hash=sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a + # via pycroft (pyproject.toml) kombu==5.3.6 \ --hash=sha256:49f1e62b12369045de2662f62cc584e7df83481a513db83b01f87b5b9785e378 \ --hash=sha256:f3da5b570a147a5da8280180aa80b03807283d63ea5081fcdb510d18242431d9 @@ -460,13 +479,19 @@ kombu==5.3.6 \ ldap3==2.5.2 \ --hash=sha256:3f67c83185b1f0df8fdf6b52fa42c55bc9e9b7120c8b7fec60f0d6003c536d18 \ --hash=sha256:dd9be8ea27773c4ffc18ede0b95c3ca1eb12513a184590b9f8ae423db3f71eb9 + # via pycroft (pyproject.toml) mac-vendor-lookup==0.1.12 \ --hash=sha256:74e1723e177d4deb02977148d3fa04a7916f4bf93268e2afe3240529272bf80d \ --hash=sha256:aeec6eac01b07e6558d889b51f475a1e1e938e09cab409a069ab6a43b13cba58 + # via pycroft (pyproject.toml) mako==1.3.2 \ --hash=sha256:2a0c8ad7f6274271b3bb7467dd37cf9cc6dab4bc19cb69a4ef10669402de698e \ --hash=sha256:32a99d70754dfce237019d17ffe4a282d2d3351b9c476e90d8a60e63f133b80c # via alembic +markdown-it-py==3.0.0 \ + --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ + --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb + # via rich markupsafe==2.1.5 \ --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ @@ -529,6 +554,7 @@ markupsafe==2.1.5 \ --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 # via + # pycroft (pyproject.toml) # jinja2 # mako # sentry-sdk @@ -538,11 +564,19 @@ markupsafe==2.1.5 \ marshmallow==3.20.2 \ --hash=sha256:4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd \ --hash=sha256:c21d4b98fee747c130e6bc8f45c4b3199ea66bc00c12ee1f639f0aeca034d5e9 - # via webargs + # via + # pycroft (pyproject.toml) + # webargs +mdurl==0.1.2 \ + --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ + --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + # via markdown-it-py mt-940==4.19.0 \ --hash=sha256:5d109e8dc4b490a4b92ec0153713710eb067b36b350ce1ff60c406afddc7d3cd \ --hash=sha256:cb0da41f6be6c6da1116d1e8284b2bf0eeee1d684e3a36b2e4add601d1fd7113 - # via fints + # via + # pycroft (pyproject.toml) + # fints multidict==6.0.5 \ --hash=sha256:01265f5e40f5a17f8241d52656ed27192be03bfa8764d88e8220141d1e4b3556 \ --hash=sha256:0275e35209c27a3f7951e1ce7aaf93ce0d163b28948444bec61dd7badc6d3f8c \ @@ -640,6 +674,7 @@ multidict==6.0.5 \ netaddr==1.3.0 \ --hash=sha256:5c3c3d9895b551b763779ba7db7a03487dc1f8e3b385af819af341ae9ef6e48a \ --hash=sha256:c2c6a8ebe5554ce33b7d5b3a306b71bbb373e000bbbf2350dd5213cc56e3dbbe + # via pycroft (pyproject.toml) packaging==24.0 \ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 @@ -649,6 +684,7 @@ packaging==24.0 \ passlib==1.7.4 \ --hash=sha256:aa6bca462b8d8bda89c70b382f0c298a20b5560af6cbfa2dce410c0a2fb669f1 \ --hash=sha256:defd50f72b65c5402ab2c573830a6978e5f202ad0d984793c8dde2c4152ebe04 + # via pycroft (pyproject.toml) pillow==10.3.0 \ --hash=sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c \ --hash=sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2 \ @@ -797,6 +833,7 @@ psycopg2-binary==2.9.9 \ --hash=sha256:f7ae5d65ccfbebdfa761585228eb4d0df3a8b15cfb53bd953e713e09fbb12957 \ --hash=sha256:f7fc5a5acafb7d6ccca13bfa8c90f8c51f13d8fb87d95656d3950f0158d3ce53 \ --hash=sha256:f9b5571d33660d5009a8b3c25dc1db560206e2d2f89d3df1cb32d72c0d117d52 + # via pycroft (pyproject.toml) pyasn1==0.6.0 \ --hash=sha256:3a35ab2c4b5ef98e17dfdec8ab074046fbda76e281c5a706ccd82328cfc8f64c \ --hash=sha256:cca4bb0f2df5504f02f6f8a775b6e416ff9b0b3b16f7ee80b5a3153d9b804473 @@ -804,6 +841,7 @@ pyasn1==0.6.0 \ pydantic==2.4.2 \ --hash=sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7 \ --hash=sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1 + # via pycroft (pyproject.toml) pydantic-core==2.10.1 \ --hash=sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e \ --hash=sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33 \ @@ -912,6 +950,10 @@ pydantic-core==2.10.1 \ --hash=sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6 \ --hash=sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521 # via pydantic +pygments==2.18.0 \ + --hash=sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199 \ + --hash=sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a + # via rich pyrsistent==0.20.0 \ --hash=sha256:0724c506cd8b63c69c7f883cc233aac948c1ea946ea95996ad8b1380c25e1d3f \ --hash=sha256:09848306523a3aba463c4b49493a760e7a6ca52e4826aa100ee99d8d39b7ad1e \ @@ -949,6 +991,7 @@ pyrsistent==0.20.0 \ python-dotenv==0.21.1 \ --hash=sha256:1c93de8f636cde3ce377292818d0e440b6e45a82f215c3744979151fa8151c49 \ --hash=sha256:41e12e0318bebc859fcc4d97d4db8d20ad21721a6aa5047dd59f090391cb549a + # via pycroft (pyproject.toml) pytz==2024.1 \ --hash=sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812 \ --hash=sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319 @@ -1002,13 +1045,19 @@ reportlab==3.6.13 \ --hash=sha256:f1993a68c0edc45895d3df350d01b0456efe79aaf309cef777762742be501f2a \ --hash=sha256:faeebde62f0f6ad86985bec5685411260393d2eb7ba907972da56af586b644e8 \ --hash=sha256:ff09a0a1e5cef05309ac09dfc5185e8151d927bcf45470d2f540c96260f8a355 + # via pycroft (pyproject.toml) requests==2.32.2 \ --hash=sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289 \ --hash=sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c # via fints +rich==13.8.0 \ + --hash=sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc \ + --hash=sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4 + # via pycroft (pyproject.toml) sentry-sdk==1.29.2 \ --hash=sha256:3e17215d8006612e2df02b0e73115eb8376c37e3f586d8436fa41644e605074d \ --hash=sha256:a99ee105384788c3f228726a88baf515fe7b5f1d2d0f215a03d194369f158df7 + # via pycroft (pyproject.toml) sepaxml==2.6.1 \ --hash=sha256:939c12236779e6a3d7221d3557921abd6e30b0bfd369e67815ea55bccaacd688 \ --hash=sha256:f110e4a11322c1ea46f86550d703468b109343b4cece1d5b792d394f03d86110 @@ -1027,6 +1076,7 @@ simplejson==3.11.1 \ --hash=sha256:86aa9fd492230c4b8b6814fcf089b36ffba2cec4d0635c8c642135b9067ebbd7 \ --hash=sha256:8d73b96a6ee7c81fd49dac7225e3846fd60b54a0b5b93a0aaea04c5a5d2e7bf2 \ --hash=sha256:a6939199c30b78ae31e62e6913f0e12cb71a4a5ad67c259e0a98688df027a5de + # via pycroft (pyproject.toml) six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 @@ -1089,6 +1139,7 @@ sqlalchemy==2.0.29 \ --hash=sha256:ea311d4ee9a8fa67f139c088ae9f905fcf0277d6cd75c310a21a88bf85e130f5 \ --hash=sha256:fecd5089c4be1bcc37c35e9aa678938d2888845a134dd016de457b942cf5a758 # via + # pycroft (pyproject.toml) # alembic # wtforms-sqlalchemy text-unidecode==1.3 \ @@ -1122,6 +1173,7 @@ wcwidth==0.2.13 \ webargs==8.3.0 \ --hash=sha256:69d7ac874d746b6f4f47eac923c2abf6fc7788dfca2ebcfd9f4ac52ec9646446 \ --hash=sha256:cab207941b0686c4d086c823632ddcd4343151644341a32fcf50b8eaa71e31c7 + # via pycroft (pyproject.toml) webencodings==0.5.1 \ --hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \ --hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 @@ -1203,10 +1255,12 @@ wrapt==1.16.0 \ --hash=sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d \ --hash=sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a \ --hash=sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4 + # via pycroft (pyproject.toml) wtforms==2.3.3 \ --hash=sha256:7b504fc724d0d1d4d5d5c114e778ec88c37ea53144683e084215eed5155ada4c \ --hash=sha256:81195de0ac94fbc8368abbaf9197b88c4f3ffd6c2719b5bf5fc9da744f3d829c # via + # pycroft (pyproject.toml) # flask-wtf # wtforms-sqlalchemy # wtforms-widgets @@ -1217,6 +1271,7 @@ wtforms-sqlalchemy==0.3 \ wtforms-widgets==1.0.2 \ --hash=sha256:36a10e303d9c52ad2a1c47a944295561abcc915cb0aeeb24df6d507d02cc1e48 \ --hash=sha256:442473ecf01df69ad93095504b310c65ed6095f74a75d0387af3c95cc2467ee4 + # via pycroft (pyproject.toml) xmlschema==3.2.0 \ --hash=sha256:541d96893691aae3cb93ea36a85dde18327012e26e0c51d610f4f79e7fc86f7b \ --hash=sha256:7ad8b4838fee0cfbfc3a5c7d38e33964cf5ebd2c20e2aa23ea813b6793438f9c From 11befc20240d59db1a0f5c54de9ba8c41adfc97c Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Sun, 8 Sep 2024 19:58:59 +0200 Subject: [PATCH 44/49] Add `alembic check` and a custom `alembic diff` --- justfile | 4 ++- scripts/alembic_wrapper.py | 73 +++++++++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index eb5fbb9b7..e8cbca488 100644 --- a/justfile +++ b/justfile @@ -126,7 +126,9 @@ schema-status: (_up "dev-db") `{{ dev-psql }} -q -t -c 'table pycroft.alembic_version'` @echo "Schema version in {{ sql_dump }}: " \ `grep 'COPY.*alembic_version' -A1 {{ sql_dump }} | sed -n '2p'` - {{ drc }} --progress=none run --rm dev-app alembic check 2>&1 | tail -n1 + {{ drc }} --progress=none run --rm dev-app flask alembic check 2>&1 | tail -n1 + +schema-diff: (_up "dev-db") (alembic "diff") # upgrade the (imported or created) schema to the current revision schema-upgrade: (_up "dev-db") (alembic "upgrade" "head") diff --git a/scripts/alembic_wrapper.py b/scripts/alembic_wrapper.py index bc2058283..306010c09 100755 --- a/scripts/alembic_wrapper.py +++ b/scripts/alembic_wrapper.py @@ -1,12 +1,22 @@ #!/usr/bin/env python3 import logging import sys +import typing as t from dataclasses import dataclass import click from alembic import command +from alembic import autogenerate as autogen +from alembic.migration import MigrationContext from alembic.config import Config +from rich import print +from rich.console import RenderableType +from rich.table import Table +from rich.text import Text +from sqlalchemy import Connection + from pycroft.model.alembic import get_alembic_config +from pycroft.model.base import ModelBase from .connection import get_connection_string, try_create_connection @@ -14,6 +24,7 @@ @dataclass class ContextObject: alembic_cfg: Config + conn: Connection logger: logging.Logger @@ -29,6 +40,7 @@ def cli(ctx, verbose: bool): conn, engine = try_create_connection(get_connection_string(), logger=logger, wait_for_db=False, echo=verbose) ctx.obj = ContextObject( + conn=conn, logger=logger, alembic_cfg=get_alembic_config(), ) @@ -43,6 +55,21 @@ def current(obj: ContextObject): command.current(obj.alembic_cfg) +@cli.command(help=command.check.__doc__) +@click.pass_obj +def check(obj: ContextObject): + command.check(obj.alembic_cfg) + + +@cli.command() +@click.pass_obj +def diff(obj: ContextObject): + # https://alembic.sqlalchemy.org/en/latest/api/autogenerate.html#getting-diffs + migration_context = MigrationContext.configure(obj.conn) + metadata = ModelBase.metadata + print(render_diffset(autogen.compare_metadata(migration_context, metadata))) + + @cli.command(help=command.upgrade.__doc__) @click.pass_obj @click.argument('revision') @@ -64,7 +91,7 @@ def stamp(obj: ContextObject, revision: str): command.stamp(obj.alembic_cfg, revision) -@cli.command(help=command.stamp.__doc__) +@cli.command(help=command.revision.__doc__) @click.pass_obj @click.option("-m", "--message", "message") @click.option("--autogenerate", is_flag=True, default=False) @@ -72,5 +99,49 @@ def revision(obj: ContextObject, message: str, autogenerate: bool): command.revision(obj.alembic_cfg, message=message, autogenerate=autogenerate) +def render_diffset(diffs) -> t.Iterator[tuple[t.Any, ...]]: + table = Table(show_header=False, box=None) + for diff in diffs: + table.add_row(*render_diff_tuple(diff)) + return table + + +def render_diff_tuple(diff_tuple) -> tuple[RenderableType, RenderableType]: + + diff_op, *rest = diff_tuple + + if isinstance(diff_op, tuple): + assert not rest + diff_op, *rest = diff_op + + if not rest: + col2 = "" + else: + obj, *extra = rest + if obj is not None: + col2 = Text.from_markup(f"[bold]{obj}[/] {extra!r}") + else: + col2 = Text.from_markup(f"{extra!r}") + + return render_diff_op(diff_op), col2 + + +def render_diff_op(diff_op: str) -> Text: + if op := try_strip(diff_op, "add_"): + return Text.from_markup(f"[bold green]+{op}[/]") + elif op := try_strip(diff_op, "remove_"): + return Text.from_markup(f"[bold red]-{op}[/]") + elif op := try_strip(diff_op, "modify_"): + return Text.from_markup(f"[bold blue]~{op}[/]") + else: + return Text.from_markup(f"[bold yellow]`{diff_op}`[/]") + + +def try_strip(string: str, prefix: str) -> str | None: + if string.startswith(prefix): + return string.removeprefix(prefix) + return None + + if __name__ == '__main__': cli() From 3ce87bbf27d8ecd83b6197f7577708faec161c77 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 9 Sep 2024 11:52:14 +0200 Subject: [PATCH 45/49] add known options to `alembic upgrade` wrapper --- scripts/alembic_wrapper.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/alembic_wrapper.py b/scripts/alembic_wrapper.py index 306010c09..1566045f0 100755 --- a/scripts/alembic_wrapper.py +++ b/scripts/alembic_wrapper.py @@ -73,7 +73,14 @@ def diff(obj: ContextObject): @cli.command(help=command.upgrade.__doc__) @click.pass_obj @click.argument('revision') -def upgrade(obj: ContextObject, revision: str): +@click.option("--sql", is_flag=True) +@click.option("--tag") +def upgrade( + obj: ContextObject, + revision: str, + sql: bool = False, + tag: str | None = None, +): command.upgrade(obj.alembic_cfg, revision) From 94848cf2856d3cf13455c2f1fcda556d11234cae Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 9 Sep 2024 11:54:33 +0200 Subject: [PATCH 46/49] add tombstone schema migrations --- .../5234d7ac2b4a_add_unixtombstone.py | 336 ++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 pycroft/model/alembic/versions/5234d7ac2b4a_add_unixtombstone.py diff --git a/pycroft/model/alembic/versions/5234d7ac2b4a_add_unixtombstone.py b/pycroft/model/alembic/versions/5234d7ac2b4a_add_unixtombstone.py new file mode 100644 index 000000000..328eb2e56 --- /dev/null +++ b/pycroft/model/alembic/versions/5234d7ac2b4a_add_unixtombstone.py @@ -0,0 +1,336 @@ +"""Add UnixTombstone + +Revision ID: 5234d7ac2b4a +Revises: bc0e0dd480d4 +Create Date: 2024-09-09 08:17:24.686578 + +""" + +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = "5234d7ac2b4a" +down_revision = "bc0e0dd480d4" +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute(sa.text("create extension if not exists pgcrypto")) + op.create_table( + "unix_tombstone", + sa.Column("uid", sa.Integer(), nullable=True), + sa.Column("login_hash", sa.LargeBinary(length=512), nullable=True), + sa.CheckConstraint("uid is not null or login_hash is not null"), + sa.UniqueConstraint("login_hash"), + sa.UniqueConstraint("uid"), + sa.UniqueConstraint("uid", "login_hash"), + ) + op.create_index( + "login_hash_only_unique", + "unix_tombstone", + ["uid"], + unique=True, + postgresql_where=sa.text("login_hash IS NULL"), + ) + op.create_index( + "uid_only_unique", + "unix_tombstone", + ["login_hash"], + unique=True, + postgresql_where=sa.text("uid IS NULL"), + ) + op.add_column( + "pre_member", + sa.Column( + "login_hash", + sa.LargeBinary(length=512), + sa.Computed("digest(login, 'sha512')"), + nullable=True, + ), + ) + + op.execute( + """ + insert into unix_tombstone (uid, login_hash) + select ua.uid, digest(u.login, 'sha512') + from "user" u full join unix_account ua on u.unix_account_id=ua.id; + """ + ) + + op.create_foreign_key(None, "unix_account", "unix_tombstone", ["uid"], ["uid"], deferrable=True) + # NOTE: pre_member does not actually have an FKey to unix_tombstone! + # The col is there nonetheless. + op.add_column( + "user", + sa.Column( + "login_hash", + sa.LargeBinary(length=512), + sa.Computed("digest(login, 'sha512')"), + nullable=True, + ), + ) + # This changes user → unix_account to `ON DELETE SET NULL` + op.drop_constraint("user_unix_account_id_fkey", "user", type_="foreignkey") + op.create_foreign_key( + "user_unix_account_id_fkey", + "user", + "unix_account", + ["unix_account_id"], + ["id"], + ondelete="SET NULL", + ) + # / + + op.create_foreign_key( + "user_login_hash_fkey", + "user", + "unix_tombstone", + ["login_hash"], + ["login_hash"], + deferrable=True, + ) + + connection = op.get_bind() + connection.execute(sa.text(SQL_TRIGGERS_CREATE)) + + +def downgrade(): + op.drop_constraint("user_login_hash_fkey", "user", type_="foreignkey") + op.drop_constraint("unix_account_uid_fkey", "unix_account", type_="foreignkey") + + op.drop_constraint("user_unix_account_id_fkey", "user", type_="foreignkey") + op.create_foreign_key( + "user_unix_account_id_fkey", "user", "unix_account", ["unix_account_id"], ["id"] + ) + + op.drop_column("user", "login_hash") + op.drop_column("pre_member", "login_hash") + op.drop_index( + "uid_only_unique", table_name="unix_tombstone", postgresql_where=sa.text("uid IS NULL") + ) + op.drop_index( + "login_hash_only_unique", + table_name="unix_tombstone", + postgresql_where=sa.text("login_hash IS NULL"), + ) + op.drop_table("unix_tombstone") + + connection = op.get_bind() + connection.execute(sa.text(SQL_TRIGGERS_DROP)) + + +# > from pycroft.model import unix_account as ua +# > from tests.model.ddl import literal_compile +# > print("\n".join(literal_compile(c).replace("%%", "%") for _, c, d in ua.manager.objects)) +SQL_TRIGGERS_CREATE = """ +CREATE OR REPLACE FUNCTION check_unix_tombstone_lifecycle() RETURNS trigger STABLE LANGUAGE plpgsql AS $$ +BEGIN + IF (NEW.login_hash IS NULL AND OLD.login_hash IS NOT NULL) THEN + RAISE EXCEPTION 'Removing login_hash from tombstone is invalid' + USING ERRCODE = 'check_violation'; + END IF; + IF (NEW.uid IS NULL AND OLD.uid IS NOT NULL) THEN + RAISE EXCEPTION 'Removing uid from tombstone is invalid' + USING ERRCODE = 'check_violation'; + END IF; + RETURN NEW; +END; +$$; +CREATE TRIGGER check_unix_tombstone_lifecycle_trigger BEFORE UPDATE ON unix_tombstone FOR EACH ROW EXECUTE PROCEDURE check_unix_tombstone_lifecycle(); +CREATE OR REPLACE FUNCTION unix_account_ensure_tombstone() RETURNS trigger VOLATILE STRICT LANGUAGE plpgsql AS $$ +DECLARE + v_user "user"; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; +BEGIN + select * into v_user from "user" u where u.unix_account_id = NEW.id; + select * into v_ua_ts from unix_tombstone ts where ts.uid = NEW.uid; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on u.login_hash = ts.login_hash + where u.unix_account_id = NEW.id; + + IF v_user IS NULL THEN + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid) values (NEW.uid); + END IF; + RETURN NEW; + END IF; + -- NOTE: v_user not null implies that we are in an UPDATE, not a CREATE, + -- because otherwise it would be impossible for an existing user to reference this UA. + + IF v_ua_ts IS NULL THEN + insert into unix_tombstone (uid, login_hash) values (NEW.uid, v_user.login_hash); + END IF; + + RETURN NEW; +END; +$$; +CREATE TRIGGER unix_account_ensure_tombstone_trigger BEFORE INSERT ON unix_account FOR EACH ROW EXECUTE PROCEDURE unix_account_ensure_tombstone(); +CREATE OR REPLACE FUNCTION user_ensure_tombstone() RETURNS trigger VOLATILE STRICT LANGUAGE plpgsql AS $$ +DECLARE + v_ua unix_account; + v_login_ts unix_tombstone; + v_ua_ts unix_tombstone; + v_u_login_hash bytea; +BEGIN + select * into v_ua from unix_account ua where ua.id = NEW.unix_account_id; + -- hash not generated yet, because we are a BEFORE trigger! + select digest(NEW.login, 'sha512') into v_u_login_hash; + + select ts.* into v_login_ts from "user" u + join unix_tombstone ts on v_u_login_hash = ts.login_hash + where u.id = NEW.id; + + IF TG_OP = 'INSERT' THEN + IF not v_login_ts IS NULL THEN + RAISE EXCEPTION + 'User with login=% already exists. Please choose a different login.', + NEW.login + USING ERRCODE = 'foreign_key_violation'; + END IF; + + IF v_ua IS NULL THEN + insert into unix_tombstone (uid, login_hash) values (null, v_u_login_hash); + -- on conflict: raise! want to prohibit re-use after all. + ELSE + IF v_ua_ts.login_hash IS NOT NULL AND v_ua_ts.login_hash != v_login_ts.login_hash THEN + RAISE EXCEPTION + 'Refusing to re-couple user (login=%), which had a unix account in the past, ' + 'to a new unix-account (uid=%). ' + 'Manually update the tombstones if you know what you are doing.', + NEW.login, v_ua.uid + USING ERRCODE = 'check_violation'; + END IF; + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua.uid; + END IF; + RETURN NEW; + END IF; + + ------------ + -- UPDATE -- + ------------ + + IF NEW.unix_account_id = OLD.unix_account_id THEN + -- NOTE: this also means we _do nothing_ on a `login` update. + -- This is a conscious decision, because we want the SQL operator + -- to handle tombstones explicitly in this scenario. + RETURN NEW; + END IF; + + IF v_ua IS NULL THEN + -- this is an UPDATE user SET unix_account_id=null. Nothing to do. + RETURN NEW; + END IF; + + ----------------------- + -- User → UA exists; -- + ----------------------- + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + + IF NOT v_ua_ts.login_hash IS NULL AND v_ua_ts.login_hash <> v_u_login_hash THEN + RAISE EXCEPTION + 'Refusing to re-couple unix-account (uid=%), which belonged to a user in the past, to another user (login=%).' + 'Manually update the tombstones if you know what you are doing.', + v_ua.uid, NEW.login + USING ERRCODE = 'check_violation'; + END IF; + + ASSERT NOT v_login_ts IS NULL, 'existing user % does not have a tombstone', NEW.login; + IF v_login_ts.uid IS NULL THEN + -- gonna update ua's tombstone, so let's throw away user's tombstone + set constraints user_login_hash_fkey deferred; + delete from unix_tombstone where login_hash = v_u_login_hash; + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; + set constraints user_login_hash_fkey immediate; + ELSE + -- this smells wrong: either they already share a tombstone, + -- or the user already _had_ a unix account! + IF NOT v_ua_ts.login_hash IS NULL AND v_ua_ts.login_hash != v_login_ts.login_hash THEN + RAISE EXCEPTION + 'Refusing to re-couple user (login=%), which had a unix account in the past, ' + 'to a new unix-account (uid=%). ' + 'Manually update the tombstones if you know what you are doing.', + NEW.login, v_ua.uid + USING ERRCODE = 'check_violation'; + END IF; + END IF; + + update unix_tombstone ts set login_hash = v_u_login_hash where ts.uid = v_ua_ts.uid; + RETURN NEW; +END; +$$; +CREATE TRIGGER user_ensure_tombstone_trigger BEFORE INSERT OR UPDATE OF unix_account_id, login ON "user" FOR EACH ROW EXECUTE PROCEDURE user_ensure_tombstone(); +CREATE OR REPLACE FUNCTION check_tombstone_consistency() RETURNS trigger VOLATILE STRICT LANGUAGE plpgsql AS $$ +DECLARE + v_user "user"; + v_ua unix_account; + v_user_ts unix_tombstone; + v_ua_ts unix_tombstone; +BEGIN + IF TG_TABLE_NAME = 'user' THEN + v_user := NEW; + select * into v_ua from unix_account where unix_account.id = NEW.unix_account_id; + ELSIF TG_TABLE_NAME = 'unix_account' THEN + v_ua := NEW; + select * into v_user from "user" u where u.unix_account_id = NEW.id; + ELSE + RAISE EXCEPTION + 'trigger can only be invoked on user or unix_account tables, not %', + TG_TABLE_NAME + USING ERRCODE = 'feature_not_supported'; + END IF; + + IF v_ua IS NULL OR v_user IS NULL THEN + RETURN NEW; -- no consistency to satisfy + END IF; + ASSERT NOT v_user IS NULL, 'v_user is null!'; + ASSERT NOT v_user.login IS NULL, format('user.login is null (%s): %s (type %s)', v_user.login, v_user, pg_typeof(v_user)); + + select * into v_user_ts from unix_tombstone ts where ts.login_hash = v_user.login_hash; + select * into v_ua_ts from unix_tombstone ts where ts.uid = v_ua.uid; + + -- this should already be ensured by the `ensure_*_tombstone` triggers, + -- but we are defensive here to ensure consistency no matter what + IF v_ua_ts IS NULL THEN + ASSERT NOT v_ua IS NULL, 'unix_account is null'; + RAISE EXCEPTION + 'unix account with id=% (uid=%) has no tombstone.', v_ua.id, v_ua.uid + USING ERRCODE = 'foreign_key_violation'; + END IF; + IF v_user_ts IS NULL THEN + RAISE EXCEPTION + 'user % with id=% (login=%) has no tombstone.', v_user, v_user.id, v_user.login + USING ERRCODE = 'foreign_key_violation'; + END IF; + + if v_user_ts <> v_ua_ts THEN + RAISE EXCEPTION + 'User tombstone (uid=%, login_hash=%) and unix account tombstone (uid=%, login_hash=%) differ!', + v_user_ts.uid, v_user_ts.login_hash, v_ua_ts.uid, v_ua_ts.login_hash + USING ERRCODE = 'check_violation'; + END IF; + + RETURN NEW; +END; +$$; +CREATE CONSTRAINT TRIGGER user_check_tombstone_consistency_trigger AFTER INSERT OR UPDATE OF unix_account_id, login ON "user" DEFERRABLE FOR EACH ROW EXECUTE PROCEDURE check_tombstone_consistency(); +CREATE CONSTRAINT TRIGGER unix_account_check_tombstone_consistency_trigger AFTER INSERT OR UPDATE OF uid ON unix_account DEFERRABLE FOR EACH ROW EXECUTE PROCEDURE check_tombstone_consistency() +""" + +# > from pycroft.model import unix_account as ua +# > from tests.model.ddl import literal_compile +# > print("\n".join(literal_compile(d).replace("%%", "%") for _, c, d in ua.manager.objects)) +SQL_TRIGGERS_DROP = """ +DROP FUNCTION IF EXISTS check_unix_tombstone_lifecycle(); +DROP TRIGGER IF EXISTS check_unix_tombstone_lifecycle_trigger ON unix_tombstone; +DROP TRIGGER IF EXISTS unix_account_ensure_tombstone_trigger ON unix_account; +DROP FUNCTION IF EXISTS unix_account_ensure_tombstone(); +DROP TRIGGER IF EXISTS user_ensure_tombstone_trigger ON "user"; +DROP FUNCTION IF EXISTS user_ensure_tombstone(); +DROP TRIGGER IF EXISTS user_check_tombstone_consistency_trigger ON "user"; +DROP TRIGGER IF EXISTS unix_account_check_tombstone_consistency_trigger ON unix_account; +DROP FUNCTION IF EXISTS check_tombstone_consistency(); +""" From 3561e0e4f6cefb00cadb98c3da4f4956210d442f Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 9 Sep 2024 12:06:08 +0200 Subject: [PATCH 47/49] Remove superfluous test This is already covered in other tests --- tests/model/test_unix_tombstone.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/model/test_unix_tombstone.py b/tests/model/test_unix_tombstone.py index 6b8b3d997..281aa7cac 100644 --- a/tests/model/test_unix_tombstone.py +++ b/tests/model/test_unix_tombstone.py @@ -94,11 +94,6 @@ def test_unix_account_uid_change_does_not_change_tombstone(session, unix_account session.flush() -class TestUserLoginHashFKey: - # TODO test user add, modify, delete - pass - - @contextmanager def constraints_deferred(session: Session, constraints: t.LiteralString = "all"): session.execute(text(f"set constraints {constraints} deferred")) From 736907622e4fa878133baf724167dc260ad9b9af Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 9 Sep 2024 12:23:38 +0200 Subject: [PATCH 48/49] Don't validate schema version by default This is necessary to not break commands like `create-model`. In prod, the flag should of course be set to `True`. --- scripts/server_run.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/server_run.py b/scripts/server_run.py index 256a5b610..baa3bc9fc 100755 --- a/scripts/server_run.py +++ b/scripts/server_run.py @@ -30,7 +30,7 @@ ) -def prepare_server(echo=False) -> PycroftFlask: +def prepare_server(echo=False, ensure_schema=False) -> PycroftFlask: if echo: logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) @@ -42,8 +42,10 @@ def prepare_server(echo=False) -> PycroftFlask: app.config.from_prefixed_env() engine = create_engine(get_connection_string()) - with engine.connect() as connection: - _ensure_schema_up_to_date(app, connection) + if ensure_schema: + with engine.connect() as connection: + _ensure_schema_up_to_date(app, connection) + _setup_simple_profiling(app) set_scoped_session( scoped_session( From 29485cdb11594261bbc419feeb31eb834842a031 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Mon, 9 Sep 2024 12:24:35 +0200 Subject: [PATCH 49/49] Fix `docker-compose.dev.yml` whitespace --- docker-compose.dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 08380260c..7db28eaee 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -57,7 +57,7 @@ services: "--watch", "doc/_static", "--watch", "ldap_sync", "--watch", "web", - ] + ] healthcheck: test: curl --fail http://localhost:8000 ports: